]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
7a621aa9c627509170685877e0349e2c8d66cda2
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.729 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20210105.
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 environment when running as root
787   --enable-symlinks       make tic use symbolic links not hard links
788   --enable-broken_linker  compile with broken-linker support code
789   --enable-bsdpad         recognize BSD-style prefix padding
790   --enable-widec          compile with wide-char/UTF-8 code
791   --disable-lp64          allow chtype to be long (ignore _LP64)
792   --disable-largefile     omit support for large files
793   --disable-tparm-varargs compile tparm() without varargs interface
794   --disable-tic-depends   link tic library without explicit dependency on ncurses library
795   --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
796   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
797   --with-bool=TYPE        override fallback type of bool variable
798   --with-caps=alt         compile with alternate Caps file
799   --with-chtype=TYPE      override type of chtype
800   --with-ospeed=TYPE      override type of ospeed variable
801   --with-mmask-t=TYPE     override type of mmask_t
802   --with-ccharw-max=XXX   override size CCHARW_MAX
803   --enable-signed-char    compile using signed Boolean's in term.h
804   --with-tparm-arg=TYPE   override parameter type of tparm
805   --with-rcs-ids          compile-in RCS identifiers
806 Options to Specify How Manpages are Installed:
807   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
808                           optionally formatted/catonly, e.g., gzip,formatted
809   --with-manpage-renames  specify manpage-renaming
810   --with-manpage-aliases  specify manpage-aliases using .so
811   --with-manpage-symlinks specify manpage-aliases using symlinks
812   --with-manpage-tbl      specify manpage processing with tbl
813 Extensions:
814   --disable-ext-funcs     disable function-extensions
815   --enable-sp-funcs       enable SCREEN-extensions
816   --enable-term-driver    enable terminal-driver
817   --enable-const          compile with extra/non-standard const
818   --enable-ext-colors     compile for 256-color support
819   --enable-ext-mouse      compile for extended mouse-encoding
820   --enable-ext-putwin     compile with extended putwin/screendump
821   --enable-no-padding     compile with $NCURSES_NO_PADDING code
822   --enable-sigwinch       compile with SIGWINCH handler
823   --enable-tcap-names     compile with user-definable terminal capabilities
824 Reentrant Code:
825   --with-pthread          use POSIX thread library
826   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
827   --enable-weak-symbols   enable weak-symbols for pthreads
828   --enable-reentrant      compile with reentrant code
829   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
830   --enable-opaque-form    make form-library structures "opaque"
831   --enable-opaque-menu    make menu-library structures "opaque"
832   --enable-opaque-panel   make panel-library structures "opaque"
833   --with-wrap-prefix=XXX  override prefix used for public variables
834 Development Code:
835   --without-develop       disable development options
836   --enable-hard-tabs      compile with hard-tabs code
837   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
838 Experimental Code:
839   --disable-assumed-color do not assume anything about default-colors
840   --disable-hashmap       compile without hashmap scrolling-optimization
841   --enable-colorfgbg      compile-in experimental $COLORFGBG code
842   --enable-fvisibility    compile with -fvisibility=hidden
843   --enable-interop        compile-in interop bindings
844   --enable-safe-sprintf   compile with experimental safe-sprintf code
845   --disable-scroll-hints  compile without scroll-hints code
846   --enable-wgetch-events  compile with wgetch-events code
847   --enable-exp-win32      compile with experimental-Windows driver
848 Testing/development Options:
849   --disable-echo          do not display "compiling" commands
850   --disable-stripping     do not strip (debug info) installed executables
851   --enable-warnings       test: turn on gcc compiler warnings
852   --enable-string-hacks   work around bogus compiler/loader warnings
853   --enable-assertions     test: turn on generation of assertion code
854   --with-dmalloc          test: use Gray Watson's dmalloc library
855   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
856   --with-valgrind         test: use valgrind
857   --disable-leaks         test: free permanent memory, analyze leaks
858   --enable-expanded       test: generate functions for certain macros
859   --disable-macros        test: use functions rather than macros
860   --with-trace            test: add trace() function to all models of ncurses
861   --disable-gnat-projects test: disable GNAT projects even if usable
862 Ada Binding Options:
863   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
864   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
865   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
866   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
867   --with-ada-libname=XXX  override default Ada library-name
868   --with-form-libname=XXX override form basename of library
869   --with-menu-libname=XXX override menu basename of library
870   --with-panel-libname=XXX override panel basename of library
871   --with-cxx-libname=XXX override ncurses++ basename of library
872
873 Some influential environment variables:
874   CC          C compiler command
875   CFLAGS      C compiler flags
876   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
877               nonstandard directory <lib dir>
878   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
879               headers in a nonstandard directory <include dir>
880   CPP         C preprocessor
881   CXX         C++ compiler command
882   CXXFLAGS    C++ compiler flags
883   CXXCPP      C++ preprocessor
884
885 Use these variables to override the choices made by `configure' or to help
886 it to find libraries and programs with nonstandard names/locations.
887
888 EOF
889 fi
890
891 if test "$ac_init_help" = "recursive"; then
892   # If there are subdirs, report their specific --help.
893   ac_popdir=`pwd`
894   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
895     cd "$ac_subdir"
896     # A "../" for each directory in /$ac_subdir.
897     ac_dots=`echo "$ac_subdir" |
898              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
899
900     case "$srcdir" in
901     .) # No --srcdir option.  We are building in place.
902       ac_sub_srcdir="$srcdir" ;;
903     [\\/]* | ?:[\\/]* ) # Absolute path.
904       ac_sub_srcdir="$srcdir/$ac_subdir" ;;
905     *) # Relative path.
906       ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
907     esac
908
909     # Check for guested configure; otherwise get Cygnus style configure.
910     if test -f "$ac_sub_srcdir/configure.gnu"; then
911       echo
912       $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
913     elif test -f "$ac_sub_srcdir/configure"; then
914       echo
915       $SHELL "$ac_sub_srcdir/configure" --help=recursive
916     elif test -f "$ac_sub_srcdir/configure.ac" ||
917            test -f "$ac_sub_srcdir/configure.in"; then
918       echo
919       "$ac_configure" --help
920     else
921       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
922     fi
923     cd "$ac_popdir"
924   done
925 fi
926
927 test -n "$ac_init_help" && exit 0
928 if "$ac_init_version"; then
929   cat <<\EOF
930
931 Copyright 2003-2020,2021        Thomas E. Dickey
932 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
933 Free Software Foundation, Inc.
934 This configure script is free software; the Free Software Foundation
935 gives unlimited permission to copy, distribute and modify it.
936 EOF
937   exit 0
938 fi
939 exec 5>config.log
940 cat >&5 <<EOF
941 This file contains any messages produced by compilers while
942 running configure, to aid debugging if configure makes a mistake.
943
944 It was created by $as_me, which was
945 generated by GNU Autoconf 2.52.20210105.  Invocation command line was
946
947   $ $0 $@
948
949 EOF
950 {
951 cat <<_ASUNAME
952 ## ---------- ##
953 ## Platform.  ##
954 ## ---------- ##
955
956 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
957 uname -m = `(uname -m) 2>/dev/null || echo unknown`
958 uname -r = `(uname -r) 2>/dev/null || echo unknown`
959 uname -s = `(uname -s) 2>/dev/null || echo unknown`
960 uname -v = `(uname -v) 2>/dev/null || echo unknown`
961
962 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
963 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
964
965 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
966 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
967 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
968 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
969 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
970 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
971 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
972
973 PATH = $PATH
974
975 _ASUNAME
976 } >&5
977
978 cat >&5 <<EOF
979 ## ------------ ##
980 ## Core tests.  ##
981 ## ------------ ##
982
983 EOF
984
985 # Keep a trace of the command line.
986 # Strip out --no-create and --no-recursion so they do not pile up.
987 # Also quote any args containing shell meta-characters.
988 ac_configure_args=
989 ac_sep=
990 for ac_arg
991 do
992   case "$ac_arg" in
993   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
994   | --no-cr | --no-c) ;;
995   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
996   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
997   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
998     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
999     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1000     ac_sep=" " ;;
1001   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
1002      ac_sep=" " ;;
1003   esac
1004   # Get rid of the leading space.
1005 done
1006
1007 # When interrupted or exit'd, cleanup temporary files, and complete
1008 # config.log.  We remove comments because anyway the quotes in there
1009 # would cause problems or look ugly.
1010 trap 'exit_status=$?
1011   # Save into config.log some information that might help in debugging.
1012   echo >&5
1013   echo "## ----------------- ##" >&5
1014   echo "## Cache variables.  ##" >&5
1015   echo "## ----------------- ##" >&5
1016   echo >&5
1017   # The following way of writing the cache mishandles newlines in values,
1018 {
1019   (set) 2>&1 |
1020     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1021     *ac_space=\ *)
1022       sed -n \
1023         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1024           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1025       ;;
1026     *)
1027       sed -n \
1028         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1029       ;;
1030     esac;
1031 } >&5
1032   sed "/^$/d" confdefs.h >conftest.log
1033   if test -s conftest.log; then
1034     echo >&5
1035     echo "## ------------ ##" >&5
1036     echo "## confdefs.h.  ##" >&5
1037     echo "## ------------ ##" >&5
1038     echo >&5
1039     cat conftest.log >&5
1040   fi
1041   (echo; echo) >&5
1042   test "$ac_signal" != 0 &&
1043     echo "$as_me: caught signal $ac_signal" >&5
1044   echo "$as_me: exit $exit_status" >&5
1045   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1046     exit $exit_status
1047      ' 0
1048 for ac_signal in 1 2 13 15; do
1049   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1050 done
1051 ac_signal=0
1052
1053 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1054 rm -rf conftest* confdefs.h
1055 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1056 echo >confdefs.h
1057
1058 # Let the site file select an alternate cache file if it wants to.
1059 # Prefer explicitly selected file to automatically selected ones.
1060 if test -z "$CONFIG_SITE"; then
1061   if test "x$prefix" != xNONE; then
1062     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1063   else
1064     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1065   fi
1066 fi
1067 for ac_site_file in $CONFIG_SITE; do
1068   if test -r "$ac_site_file"; then
1069     { echo "$as_me:1069: loading site script $ac_site_file" >&5
1070 echo "$as_me: loading site script $ac_site_file" >&6;}
1071     cat "$ac_site_file" >&5
1072     . "$ac_site_file"
1073   fi
1074 done
1075
1076 if test -r "$cache_file"; then
1077   # Some versions of bash will fail to source /dev/null (special
1078   # files actually), so we avoid doing that.
1079   if test -f "$cache_file"; then
1080     { echo "$as_me:1080: loading cache $cache_file" >&5
1081 echo "$as_me: loading cache $cache_file" >&6;}
1082     case $cache_file in
1083       [\\/]* | ?:[\\/]* ) . $cache_file;;
1084       *)                      . ./$cache_file;;
1085     esac
1086   fi
1087 else
1088   { echo "$as_me:1088: creating cache $cache_file" >&5
1089 echo "$as_me: creating cache $cache_file" >&6;}
1090   >$cache_file
1091 fi
1092
1093 # Check that the precious variables saved in the cache have kept the same
1094 # value.
1095 ac_cache_corrupted=false
1096 for ac_var in `(set) 2>&1 |
1097                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1098   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1099   eval ac_new_set=\$ac_env_${ac_var}_set
1100   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1101   eval ac_new_val="\$ac_env_${ac_var}_value"
1102   case "$ac_old_set,$ac_new_set" in
1103     set,)
1104       { echo "$as_me:1104: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1105 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1106       ac_cache_corrupted=: ;;
1107     ,set)
1108       { echo "$as_me:1108: error: \`$ac_var' was not set in the previous run" >&5
1109 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1110       ac_cache_corrupted=: ;;
1111     ,);;
1112     *)
1113       if test "x$ac_old_val" != "x$ac_new_val"; then
1114         { echo "$as_me:1114: error: \`$ac_var' has changed since the previous run:" >&5
1115 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1116         { echo "$as_me:1116:   former value:  $ac_old_val" >&5
1117 echo "$as_me:   former value:  $ac_old_val" >&2;}
1118         { echo "$as_me:1118:   current value: $ac_new_val" >&5
1119 echo "$as_me:   current value: $ac_new_val" >&2;}
1120         ac_cache_corrupted=:
1121       fi;;
1122   esac
1123   # Pass precious variables to config.status.  It doesn't matter if
1124   # we pass some twice (in addition to the command line arguments).
1125   if test "$ac_new_set" = set; then
1126     case "$ac_new_val" in
1127     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1128       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1129       ac_configure_args="$ac_configure_args '$ac_arg'"
1130       ;;
1131     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1132        ;;
1133     esac
1134   fi
1135 done
1136 if "$ac_cache_corrupted"; then
1137   { echo "$as_me:1137: error: changes in the environment can compromise the build" >&5
1138 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1139   { { echo "$as_me:1139: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1140 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1141    { (exit 1); exit 1; }; }
1142 fi
1143
1144 ac_ext=c
1145 ac_cpp='$CPP $CPPFLAGS'
1146 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1147 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1148 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1149 ac_main_return="return"
1150
1151 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1152   *c*,-n*) ECHO_N=
1153            ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1154            ECHO_T='     '
1155            ;;
1156   *c*,*  ) ECHO_N=-n
1157            ECHO_C=
1158            ECHO_T=
1159            ;;
1160   *)       ECHO_N=
1161            ECHO_C='\c'
1162            ECHO_T=
1163            ;;
1164 esac
1165 echo "#! $SHELL" >conftest.sh
1166 echo  "exit 0"   >>conftest.sh
1167 chmod +x conftest.sh
1168 if { (echo "$as_me:1168: PATH=\".;.\"; conftest.sh") >&5
1169   (PATH=".;."; conftest.sh) 2>&5
1170   ac_status=$?
1171   echo "$as_me:1171: \$? = $ac_status" >&5
1172   (exit "$ac_status"); }; then
1173   ac_path_separator=';'
1174 else
1175   ac_path_separator=:
1176 fi
1177 PATH_SEPARATOR="$ac_path_separator"
1178 rm -f conftest.sh
1179
1180 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1181
1182 top_builddir=`pwd`
1183
1184 for ac_prog in ggrep grep
1185 do
1186   # Extract the first word of "$ac_prog", so it can be a program name with args.
1187 set dummy $ac_prog; ac_word=$2
1188 echo "$as_me:1188: checking for $ac_word" >&5
1189 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1190 if test "${ac_cv_prog_GREP+set}" = set; then
1191   echo $ECHO_N "(cached) $ECHO_C" >&6
1192 else
1193   if test -n "$GREP"; then
1194   ac_cv_prog_GREP="$GREP" # Let the user override the test.
1195 else
1196   ac_save_IFS=$IFS; IFS=$ac_path_separator
1197 ac_dummy="$PATH"
1198 for ac_dir in $ac_dummy; do
1199   IFS=$ac_save_IFS
1200   test -z "$ac_dir" && ac_dir=.
1201   $as_executable_p "$ac_dir/$ac_word" || continue
1202 ac_cv_prog_GREP="$ac_prog"
1203 echo "$as_me:1203: found $ac_dir/$ac_word" >&5
1204 break
1205 done
1206
1207 fi
1208 fi
1209 GREP=$ac_cv_prog_GREP
1210 if test -n "$GREP"; then
1211   echo "$as_me:1211: result: $GREP" >&5
1212 echo "${ECHO_T}$GREP" >&6
1213 else
1214   echo "$as_me:1214: result: no" >&5
1215 echo "${ECHO_T}no" >&6
1216 fi
1217
1218   test -n "$GREP" && break
1219 done
1220 test -n "$GREP" || GREP=": "
1221
1222 echo "$as_me:1222: checking for egrep" >&5
1223 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1224 if test "${ac_cv_path_EGREP+set}" = set; then
1225   echo $ECHO_N "(cached) $ECHO_C" >&6
1226 else
1227   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
1228    then ac_cv_path_EGREP="$GREP -E"
1229    else
1230      for ac_prog in gegrep egrep
1231 do
1232   # Extract the first word of "$ac_prog", so it can be a program name with args.
1233 set dummy $ac_prog; ac_word=$2
1234 echo "$as_me:1234: checking for $ac_word" >&5
1235 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1236 if test "${ac_cv_path_EGREP+set}" = set; then
1237   echo $ECHO_N "(cached) $ECHO_C" >&6
1238 else
1239   case $EGREP in
1240   [\\/]* | ?:[\\/]*)
1241   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
1242   ;;
1243   *)
1244   ac_save_IFS=$IFS; IFS=$ac_path_separator
1245 ac_dummy="$PATH"
1246 for ac_dir in $ac_dummy; do
1247   IFS=$ac_save_IFS
1248   test -z "$ac_dir" && ac_dir=.
1249   if $as_executable_p "$ac_dir/$ac_word"; then
1250    ac_cv_path_EGREP="$ac_dir/$ac_word"
1251    echo "$as_me:1251: found $ac_dir/$ac_word" >&5
1252    break
1253 fi
1254 done
1255
1256   ;;
1257 esac
1258 fi
1259 EGREP=$ac_cv_path_EGREP
1260
1261 if test -n "$EGREP"; then
1262   echo "$as_me:1262: result: $EGREP" >&5
1263 echo "${ECHO_T}$EGREP" >&6
1264 else
1265   echo "$as_me:1265: result: no" >&5
1266 echo "${ECHO_T}no" >&6
1267 fi
1268
1269   test -n "$EGREP" && break
1270 done
1271 test -n "$EGREP" || EGREP=": "
1272
1273      test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:1273: error: cannot find workable egrep" >&5
1274 echo "$as_me: error: cannot find workable egrep" >&2;}
1275    { (exit 1); exit 1; }; }
1276    fi
1277 fi
1278 echo "$as_me:1278: result: $ac_cv_path_EGREP" >&5
1279 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
1280  EGREP="$ac_cv_path_EGREP"
1281
1282 NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1283 NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1284 NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1285 cf_cv_abi_version=${NCURSES_MAJOR}
1286 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1287 cf_cv_timestamp=`date`
1288 echo "$as_me:1288: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1289 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1290
1291 if test -f "$srcdir/VERSION" ; then
1292         echo "$as_me:1292: checking for package version" >&5
1293 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1294
1295         # if there are not enough fields, cut returns the last one...
1296         cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
1297         cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
1298         cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
1299
1300         # this is how CF_BUNDLED_INTL uses $VERSION:
1301         VERSION="$cf_field1"
1302
1303         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1304         test -z "$VERSION_MAJOR" && { { echo "$as_me:1304: error: missing major-version" >&5
1305 echo "$as_me: error: missing major-version" >&2;}
1306    { (exit 1); exit 1; }; }
1307
1308         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1309         test -z "$VERSION_MINOR" && { { echo "$as_me:1309: error: missing minor-version" >&5
1310 echo "$as_me: error: missing minor-version" >&2;}
1311    { (exit 1); exit 1; }; }
1312
1313         echo "$as_me:1313: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1314 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1315
1316         echo "$as_me:1316: checking for package patch date" >&5
1317 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1318         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1319         case .$VERSION_PATCH in
1320         (.)
1321                 { { echo "$as_me:1321: error: missing patch-date $VERSION_PATCH" >&5
1322 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1323    { (exit 1); exit 1; }; }
1324                 ;;
1325         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1326                 ;;
1327         (*)
1328                 { { echo "$as_me:1328: error: illegal patch-date $VERSION_PATCH" >&5
1329 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1330    { (exit 1); exit 1; }; }
1331                 ;;
1332         esac
1333         echo "$as_me:1333: result: $VERSION_PATCH" >&5
1334 echo "${ECHO_T}$VERSION_PATCH" >&6
1335 else
1336         { { echo "$as_me:1336: error: did not find $srcdir/VERSION" >&5
1337 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1338    { (exit 1); exit 1; }; }
1339 fi
1340
1341 # show the actual data that we have for versions:
1342 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1343
1344 echo "${as_me:-configure}:1344: testing ABI VERSION $VERSION ..." 1>&5
1345
1346 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1347
1348 echo "${as_me:-configure}:1348: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1349
1350 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1351
1352 echo "${as_me:-configure}:1352: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1353
1354 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1355
1356 echo "${as_me:-configure}:1356: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1357
1358         cf_PACKAGE=NCURSES
1359         PACKAGE=ncurses
1360
1361 cat >>confdefs.h <<EOF
1362 #define PACKAGE "$PACKAGE"
1363 EOF
1364
1365 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1366
1367         cat >>confdefs.h <<EOF
1368 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1369 EOF
1370
1371         cat >>confdefs.h <<EOF
1372 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1373 EOF
1374
1375 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1376
1377 # Check whether --with-rel-version or --without-rel-version was given.
1378 if test "${with_rel_version+set}" = set; then
1379   withval="$with_rel_version"
1380   { echo "$as_me:1380: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1381 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1382  cf_cv_rel_version=$withval
1383 fi;
1384
1385  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1386  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1387
1388 if test -n "$NCURSES_MAJOR" ; then
1389   case $NCURSES_MAJOR in
1390   ([0-9]*)
1391         ;;
1392   (*)
1393         { { echo "$as_me:1393: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1394 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1395    { (exit 1); exit 1; }; }
1396         ;;
1397   esac
1398 else
1399   { { echo "$as_me:1399: error: Release major-version value is empty" >&5
1400 echo "$as_me: error: Release major-version value is empty" >&2;}
1401    { (exit 1); exit 1; }; }
1402 fi
1403
1404 if test -n "$NCURSES_MINOR" ; then
1405   case $NCURSES_MINOR in
1406   ([0-9]*)
1407         ;;
1408   (*)
1409         { { echo "$as_me:1409: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1410 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1411    { (exit 1); exit 1; }; }
1412         ;;
1413   esac
1414 else
1415   { { echo "$as_me:1415: error: Release minor-version value is empty" >&5
1416 echo "$as_me: error: Release minor-version value is empty" >&2;}
1417    { (exit 1); exit 1; }; }
1418 fi
1419
1420 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1421
1422 # Check whether --with-abi-version or --without-abi-version was given.
1423 if test "${with_abi_version+set}" = set; then
1424   withval="$with_abi_version"
1425
1426         if test "x$cf_cv_abi_version" != "x$withval"
1427         then
1428                 { echo "$as_me:1428: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1429 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1430                 case "$cf_cv_rel_version" in
1431                 (5.*)
1432                         cf_cv_rel_version=$withval.0
1433                         ;;
1434                 (6.*)
1435                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1436                         ;;
1437                 esac
1438         fi
1439         cf_cv_abi_version=$withval
1440 fi;
1441
1442 if test -n "$cf_cv_abi_version" ; then
1443   case $cf_cv_abi_version in
1444   ([0-9]*)
1445         ;;
1446   (*)
1447         { { echo "$as_me:1447: error: ABI version is not a number: $cf_cv_abi_version" >&5
1448 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1449    { (exit 1); exit 1; }; }
1450         ;;
1451   esac
1452 else
1453   { { echo "$as_me:1453: error: ABI version value is empty" >&5
1454 echo "$as_me: error: ABI version value is empty" >&2;}
1455    { (exit 1); exit 1; }; }
1456 fi
1457
1458 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1459 then
1460         case "$cf_cv_rel_version" in
1461         (5.*)
1462                 cf_cv_rel_version=$with_abi_version.0
1463                 ;;
1464         esac
1465 fi
1466
1467 ac_aux_dir=
1468 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1469   if test -f "$ac_dir/install-sh"; then
1470     ac_aux_dir=$ac_dir
1471     ac_install_sh="$ac_aux_dir/install-sh -c"
1472     break
1473   elif test -f "$ac_dir/install.sh"; then
1474     ac_aux_dir=$ac_dir
1475     ac_install_sh="$ac_aux_dir/install.sh -c"
1476     break
1477   elif test -f "$ac_dir/shtool"; then
1478     ac_aux_dir=$ac_dir
1479     ac_install_sh="$ac_aux_dir/shtool install -c"
1480     break
1481   fi
1482 done
1483 if test -z "$ac_aux_dir"; then
1484   { { echo "$as_me:1484: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1485 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1486    { (exit 1); exit 1; }; }
1487 fi
1488 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1489 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1490 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1491
1492 # Make sure we can run config.sub.
1493 $ac_config_sub sun4 >/dev/null 2>&1 ||
1494   { { echo "$as_me:1494: error: cannot run $ac_config_sub" >&5
1495 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1496    { (exit 1); exit 1; }; }
1497
1498 echo "$as_me:1498: checking build system type" >&5
1499 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1500 if test "${ac_cv_build+set}" = set; then
1501   echo $ECHO_N "(cached) $ECHO_C" >&6
1502 else
1503   ac_cv_build_alias=$build_alias
1504 test -z "$ac_cv_build_alias" &&
1505   ac_cv_build_alias=`$ac_config_guess`
1506 test -z "$ac_cv_build_alias" &&
1507   { { echo "$as_me:1507: error: cannot guess build type; you must specify one" >&5
1508 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1509    { (exit 1); exit 1; }; }
1510 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1511   { { echo "$as_me:1511: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1512 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1513    { (exit 1); exit 1; }; }
1514
1515 fi
1516 echo "$as_me:1516: result: $ac_cv_build" >&5
1517 echo "${ECHO_T}$ac_cv_build" >&6
1518 build=$ac_cv_build
1519 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1520 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1521 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1522
1523 echo "$as_me:1523: checking host system type" >&5
1524 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1525 if test "${ac_cv_host+set}" = set; then
1526   echo $ECHO_N "(cached) $ECHO_C" >&6
1527 else
1528   ac_cv_host_alias=$host_alias
1529 test -z "$ac_cv_host_alias" &&
1530   ac_cv_host_alias=$ac_cv_build_alias
1531 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1532   { { echo "$as_me:1532: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1533 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1534    { (exit 1); exit 1; }; }
1535
1536 fi
1537 echo "$as_me:1537: result: $ac_cv_host" >&5
1538 echo "${ECHO_T}$ac_cv_host" >&6
1539 host=$ac_cv_host
1540 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1541 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1542 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1543
1544 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1545         echo "$as_me:1545: checking target system type" >&5
1546 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1547 if test "${ac_cv_target+set}" = set; then
1548   echo $ECHO_N "(cached) $ECHO_C" >&6
1549 else
1550   ac_cv_target_alias=$target_alias
1551 test "x$ac_cv_target_alias" = "x" &&
1552   ac_cv_target_alias=$ac_cv_host_alias
1553 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1554   { { echo "$as_me:1554: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1555 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1556    { (exit 1); exit 1; }; }
1557
1558 fi
1559 echo "$as_me:1559: result: $ac_cv_target" >&5
1560 echo "${ECHO_T}$ac_cv_target" >&6
1561 target=$ac_cv_target
1562 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1563 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1564 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1565
1566 # The aliases save the names the user supplied, while $host etc.
1567 # will get canonicalized.
1568 test -n "$target_alias" &&
1569   test "$program_prefix$program_suffix$program_transform_name" = \
1570     NONENONEs,x,x, &&
1571   program_prefix=${target_alias}-
1572         system_name="$host_os"
1573 else
1574         system_name="`(uname -s -r) 2>/dev/null`"
1575         if test -z "$system_name" ; then
1576                 system_name="`(hostname) 2>/dev/null`"
1577         fi
1578 fi
1579 test -n "$system_name" &&
1580 cat >>confdefs.h <<EOF
1581 #define SYSTEM_NAME "$system_name"
1582 EOF
1583
1584 if test "${cf_cv_system_name+set}" = set; then
1585   echo $ECHO_N "(cached) $ECHO_C" >&6
1586 else
1587   cf_cv_system_name="$system_name"
1588 fi
1589
1590 test -z "$system_name" && system_name="$cf_cv_system_name"
1591 test -n "$cf_cv_system_name" && echo "$as_me:1591: result: Configuring for $cf_cv_system_name" >&5
1592 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1593
1594 if test ".$system_name" != ".$cf_cv_system_name" ; then
1595         echo "$as_me:1595: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1596 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1597         { { echo "$as_me:1597: error: \"Please remove config.cache and try again.\"" >&5
1598 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1599    { (exit 1); exit 1; }; }
1600 fi
1601
1602 # Check whether --with-system-type or --without-system-type was given.
1603 if test "${with_system_type+set}" = set; then
1604   withval="$with_system_type"
1605   { echo "$as_me:1605: WARNING: overriding system type to $withval" >&5
1606 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1607         cf_cv_system_name=$withval
1608         host_os=$withval
1609
1610 fi;
1611
1612 ###     Save the given $CFLAGS to allow user-override.
1613 cf_user_CFLAGS="$CFLAGS"
1614
1615 ###     Default install-location
1616 echo "$as_me:1616: checking for fgrep" >&5
1617 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1618 if test "${ac_cv_path_FGREP+set}" = set; then
1619   echo $ECHO_N "(cached) $ECHO_C" >&6
1620 else
1621   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1622    then ac_cv_path_FGREP="$GREP -F"
1623    else
1624      for ac_prog in gfgrep fgrep
1625 do
1626   # Extract the first word of "$ac_prog", so it can be a program name with args.
1627 set dummy $ac_prog; ac_word=$2
1628 echo "$as_me:1628: checking for $ac_word" >&5
1629 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1630 if test "${ac_cv_path_FGREP+set}" = set; then
1631   echo $ECHO_N "(cached) $ECHO_C" >&6
1632 else
1633   case $FGREP in
1634   [\\/]* | ?:[\\/]*)
1635   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1636   ;;
1637   *)
1638   ac_save_IFS=$IFS; IFS=$ac_path_separator
1639 ac_dummy="$PATH"
1640 for ac_dir in $ac_dummy; do
1641   IFS=$ac_save_IFS
1642   test -z "$ac_dir" && ac_dir=.
1643   if $as_executable_p "$ac_dir/$ac_word"; then
1644    ac_cv_path_FGREP="$ac_dir/$ac_word"
1645    echo "$as_me:1645: found $ac_dir/$ac_word" >&5
1646    break
1647 fi
1648 done
1649
1650   ;;
1651 esac
1652 fi
1653 FGREP=$ac_cv_path_FGREP
1654
1655 if test -n "$FGREP"; then
1656   echo "$as_me:1656: result: $FGREP" >&5
1657 echo "${ECHO_T}$FGREP" >&6
1658 else
1659   echo "$as_me:1659: result: no" >&5
1660 echo "${ECHO_T}no" >&6
1661 fi
1662
1663   test -n "$FGREP" && break
1664 done
1665 test -n "$FGREP" || FGREP=": "
1666
1667      test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1667: error: cannot find workable fgrep" >&5
1668 echo "$as_me: error: cannot find workable fgrep" >&2;}
1669    { (exit 1); exit 1; }; }
1670    fi
1671 fi
1672 echo "$as_me:1672: result: $ac_cv_path_FGREP" >&5
1673 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1674  FGREP="$ac_cv_path_FGREP"
1675
1676 echo "$as_me:1676: checking for prefix" >&5
1677 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1678 if test "x$prefix" = "xNONE" ; then
1679         case "$cf_cv_system_name" in
1680                 # non-vendor systems don't have a conflict
1681         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1682                 prefix=/usr
1683                 ;;
1684         (*)     prefix=$ac_default_prefix
1685                 ;;
1686         esac
1687 fi
1688 echo "$as_me:1688: result: $prefix" >&5
1689 echo "${ECHO_T}$prefix" >&6
1690
1691 if test "x$prefix" = "xNONE" ; then
1692 echo "$as_me:1692: checking for default include-directory" >&5
1693 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1694 test -n "$verbose" && echo 1>&6
1695 for cf_symbol in \
1696         "$includedir" \
1697         "$includedir/ncurses" \
1698         "$prefix/include" \
1699         "$prefix/include/ncurses" \
1700         /usr/local/include \
1701         /usr/local/include/ncurses \
1702         /usr/include \
1703         /usr/include/ncurses
1704 do
1705         cf_dir=`eval echo "$cf_symbol"`
1706         if test -f "$cf_dir/curses.h" ; then
1707         if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1708                 includedir="$cf_symbol"
1709                 test -n "$verbose"  && echo $ECHO_N "   found " 1>&6
1710                 break
1711         fi
1712         fi
1713         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1714 done
1715 echo "$as_me:1715: result: $includedir" >&5
1716 echo "${ECHO_T}$includedir" >&6
1717 fi
1718
1719 ### Defaults for ncurses ABI
1720
1721 case x$cf_cv_abi_version in
1722 (x[6789])
1723         cf_dft_ext_colors=yes
1724         cf_dft_ext_const=yes
1725         cf_dft_ext_mouse=yes
1726         cf_dft_ext_putwin=yes
1727         cf_dft_ext_spfuncs=yes
1728         cf_dft_filter_syms=yes
1729         cf_dft_chtype=uint32_t
1730         cf_dft_mmask_t=uint32_t
1731         cf_dft_interop=yes
1732         cf_dft_tparm_arg=intptr_t
1733         cf_dft_with_lp64=yes
1734         ;;
1735 (*)
1736         cf_dft_ext_colors=no
1737         cf_dft_ext_const=no
1738         cf_dft_ext_mouse=no
1739         cf_dft_ext_putwin=no
1740         cf_dft_ext_spfuncs=no
1741         cf_dft_filter_syms=no
1742         cf_dft_chtype=auto
1743         cf_dft_mmask_t=auto
1744         cf_dft_interop=no
1745         cf_dft_tparm_arg=long
1746         cf_dft_with_lp64=no
1747         ;;
1748 esac
1749
1750 ###     Checks for programs.
1751
1752 # Check whether --with-ada or --without-ada was given.
1753 if test "${with_ada+set}" = set; then
1754   withval="$with_ada"
1755   cf_with_ada=$withval
1756 else
1757   cf_with_ada=yes
1758 fi;
1759
1760 if test "x$cf_with_ada" = xyes
1761 then
1762         cf_prog_cc="gnatgcc gcc cc"
1763 else
1764         cf_prog_cc="gcc cc"
1765 fi
1766
1767 ac_ext=c
1768 ac_cpp='$CPP $CPPFLAGS'
1769 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1770 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1771 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1772 ac_main_return="return"
1773 if test -n "$ac_tool_prefix"; then
1774   for ac_prog in $cf_prog_cc
1775   do
1776     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1777 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1778 echo "$as_me:1778: checking for $ac_word" >&5
1779 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1780 if test "${ac_cv_prog_CC+set}" = set; then
1781   echo $ECHO_N "(cached) $ECHO_C" >&6
1782 else
1783   if test -n "$CC"; then
1784   ac_cv_prog_CC="$CC" # Let the user override the test.
1785 else
1786   ac_save_IFS=$IFS; IFS=$ac_path_separator
1787 ac_dummy="$PATH"
1788 for ac_dir in $ac_dummy; do
1789   IFS=$ac_save_IFS
1790   test -z "$ac_dir" && ac_dir=.
1791   $as_executable_p "$ac_dir/$ac_word" || continue
1792 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1793 echo "$as_me:1793: found $ac_dir/$ac_word" >&5
1794 break
1795 done
1796
1797 fi
1798 fi
1799 CC=$ac_cv_prog_CC
1800 if test -n "$CC"; then
1801   echo "$as_me:1801: result: $CC" >&5
1802 echo "${ECHO_T}$CC" >&6
1803 else
1804   echo "$as_me:1804: result: no" >&5
1805 echo "${ECHO_T}no" >&6
1806 fi
1807
1808     test -n "$CC" && break
1809   done
1810 fi
1811 if test -z "$CC"; then
1812   ac_ct_CC=$CC
1813   for ac_prog in $cf_prog_cc
1814 do
1815   # Extract the first word of "$ac_prog", so it can be a program name with args.
1816 set dummy $ac_prog; ac_word=$2
1817 echo "$as_me:1817: checking for $ac_word" >&5
1818 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1819 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1820   echo $ECHO_N "(cached) $ECHO_C" >&6
1821 else
1822   if test -n "$ac_ct_CC"; then
1823   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1824 else
1825   ac_save_IFS=$IFS; IFS=$ac_path_separator
1826 ac_dummy="$PATH"
1827 for ac_dir in $ac_dummy; do
1828   IFS=$ac_save_IFS
1829   test -z "$ac_dir" && ac_dir=.
1830   $as_executable_p "$ac_dir/$ac_word" || continue
1831 ac_cv_prog_ac_ct_CC="$ac_prog"
1832 echo "$as_me:1832: found $ac_dir/$ac_word" >&5
1833 break
1834 done
1835
1836 fi
1837 fi
1838 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1839 if test -n "$ac_ct_CC"; then
1840   echo "$as_me:1840: result: $ac_ct_CC" >&5
1841 echo "${ECHO_T}$ac_ct_CC" >&6
1842 else
1843   echo "$as_me:1843: result: no" >&5
1844 echo "${ECHO_T}no" >&6
1845 fi
1846
1847   test -n "$ac_ct_CC" && break
1848 done
1849
1850   CC=$ac_ct_CC
1851 fi
1852
1853 test -z "$CC" && { { echo "$as_me:1853: error: no acceptable cc found in \$PATH" >&5
1854 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1855    { (exit 1); exit 1; }; }
1856
1857 # Provide some information about the compiler.
1858 echo "$as_me:1858:" \
1859      "checking for C compiler version" >&5
1860 ac_compiler=`set X $ac_compile; echo "$2"`
1861 { (eval echo "$as_me:1861: \"$ac_compiler --version </dev/null >&5\"") >&5
1862   (eval $ac_compiler --version </dev/null >&5) 2>&5
1863   ac_status=$?
1864   echo "$as_me:1864: \$? = $ac_status" >&5
1865   (exit "$ac_status"); }
1866 { (eval echo "$as_me:1866: \"$ac_compiler -v </dev/null >&5\"") >&5
1867   (eval $ac_compiler -v </dev/null >&5) 2>&5
1868   ac_status=$?
1869   echo "$as_me:1869: \$? = $ac_status" >&5
1870   (exit "$ac_status"); }
1871 { (eval echo "$as_me:1871: \"$ac_compiler -V </dev/null >&5\"") >&5
1872   (eval $ac_compiler -V </dev/null >&5) 2>&5
1873   ac_status=$?
1874   echo "$as_me:1874: \$? = $ac_status" >&5
1875   (exit "$ac_status"); }
1876
1877 cat >"conftest.$ac_ext" <<_ACEOF
1878 #line 1878 "configure"
1879 #include "confdefs.h"
1880
1881 int
1882 main (void)
1883 {
1884
1885   ;
1886   return 0;
1887 }
1888 _ACEOF
1889 ac_clean_files_save=$ac_clean_files
1890 ac_clean_files="$ac_clean_files a.out a.exe"
1891 # Try to create an executable without -o first, disregard a.out.
1892 # It will help us diagnose broken compilers, and finding out an intuition
1893 # of exeext.
1894 echo "$as_me:1894: checking for C compiler default output" >&5
1895 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1896 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1897 if { (eval echo "$as_me:1897: \"$ac_link_default\"") >&5
1898   (eval $ac_link_default) 2>&5
1899   ac_status=$?
1900   echo "$as_me:1900: \$? = $ac_status" >&5
1901   (exit "$ac_status"); }; then
1902   # Find the output, starting from the most likely.  This scheme is
1903 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1904 # resort.
1905 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1906                 ls a.out conftest 2>/dev/null;
1907                 ls a.* conftest.* 2>/dev/null`; do
1908   case $ac_file in
1909     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1910     a.out ) # We found the default executable, but exeext='' is most
1911             # certainly right.
1912             break;;
1913     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1914           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1915           export ac_cv_exeext
1916           break;;
1917     * ) break;;
1918   esac
1919 done
1920 else
1921   echo "$as_me: failed program was:" >&5
1922 cat "conftest.$ac_ext" >&5
1923 { { echo "$as_me:1923: error: C compiler cannot create executables" >&5
1924 echo "$as_me: error: C compiler cannot create executables" >&2;}
1925    { (exit 77); exit 77; }; }
1926 fi
1927
1928 ac_exeext=$ac_cv_exeext
1929 echo "$as_me:1929: result: $ac_file" >&5
1930 echo "${ECHO_T}$ac_file" >&6
1931
1932 # Check the compiler produces executables we can run.  If not, either
1933 # the compiler is broken, or we cross compile.
1934 echo "$as_me:1934: checking whether the C compiler works" >&5
1935 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1936 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1937 # If not cross compiling, check that we can run a simple program.
1938 if test "$cross_compiling" != yes; then
1939   if { ac_try='./$ac_file'
1940   { (eval echo "$as_me:1940: \"$ac_try\"") >&5
1941   (eval $ac_try) 2>&5
1942   ac_status=$?
1943   echo "$as_me:1943: \$? = $ac_status" >&5
1944   (exit "$ac_status"); }; }; then
1945     cross_compiling=no
1946   else
1947     if test "$cross_compiling" = maybe; then
1948         cross_compiling=yes
1949     else
1950         { { echo "$as_me:1950: error: cannot run C compiled programs.
1951 If you meant to cross compile, use \`--host'." >&5
1952 echo "$as_me: error: cannot run C compiled programs.
1953 If you meant to cross compile, use \`--host'." >&2;}
1954    { (exit 1); exit 1; }; }
1955     fi
1956   fi
1957 fi
1958 echo "$as_me:1958: result: yes" >&5
1959 echo "${ECHO_T}yes" >&6
1960
1961 rm -f a.out a.exe "conftest$ac_cv_exeext"
1962 ac_clean_files=$ac_clean_files_save
1963 # Check the compiler produces executables we can run.  If not, either
1964 # the compiler is broken, or we cross compile.
1965 echo "$as_me:1965: checking whether we are cross compiling" >&5
1966 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1967 echo "$as_me:1967: result: $cross_compiling" >&5
1968 echo "${ECHO_T}$cross_compiling" >&6
1969
1970 echo "$as_me:1970: checking for executable suffix" >&5
1971 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1972 if { (eval echo "$as_me:1972: \"$ac_link\"") >&5
1973   (eval $ac_link) 2>&5
1974   ac_status=$?
1975   echo "$as_me:1975: \$? = $ac_status" >&5
1976   (exit "$ac_status"); }; then
1977   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1978 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1979 # work properly (i.e., refer to `conftest.exe'), while it won't with
1980 # `rm'.
1981 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1982   case $ac_file in
1983     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1984     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1985           export ac_cv_exeext
1986           break;;
1987     * ) break;;
1988   esac
1989 done
1990 else
1991   { { echo "$as_me:1991: error: cannot compute EXEEXT: cannot compile and link" >&5
1992 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1993    { (exit 1); exit 1; }; }
1994 fi
1995
1996 rm -f "conftest$ac_cv_exeext"
1997 echo "$as_me:1997: result: $ac_cv_exeext" >&5
1998 echo "${ECHO_T}$ac_cv_exeext" >&6
1999
2000 rm -f "conftest.$ac_ext"
2001 EXEEXT=$ac_cv_exeext
2002 ac_exeext=$EXEEXT
2003 echo "$as_me:2003: checking for object suffix" >&5
2004 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2005 if test "${ac_cv_objext+set}" = set; then
2006   echo $ECHO_N "(cached) $ECHO_C" >&6
2007 else
2008   cat >"conftest.$ac_ext" <<_ACEOF
2009 #line 2009 "configure"
2010 #include "confdefs.h"
2011
2012 int
2013 main (void)
2014 {
2015
2016   ;
2017   return 0;
2018 }
2019 _ACEOF
2020 rm -f conftest.o conftest.obj
2021 if { (eval echo "$as_me:2021: \"$ac_compile\"") >&5
2022   (eval $ac_compile) 2>&5
2023   ac_status=$?
2024   echo "$as_me:2024: \$? = $ac_status" >&5
2025   (exit "$ac_status"); }; then
2026   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2027   case $ac_file in
2028     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
2029     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2030        break;;
2031   esac
2032 done
2033 else
2034   echo "$as_me: failed program was:" >&5
2035 cat "conftest.$ac_ext" >&5
2036 { { echo "$as_me:2036: error: cannot compute OBJEXT: cannot compile" >&5
2037 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2038    { (exit 1); exit 1; }; }
2039 fi
2040
2041 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
2042 fi
2043 echo "$as_me:2043: result: $ac_cv_objext" >&5
2044 echo "${ECHO_T}$ac_cv_objext" >&6
2045 OBJEXT=$ac_cv_objext
2046 ac_objext=$OBJEXT
2047 echo "$as_me:2047: checking whether we are using the GNU C compiler" >&5
2048 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2049 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2050   echo $ECHO_N "(cached) $ECHO_C" >&6
2051 else
2052   cat >"conftest.$ac_ext" <<_ACEOF
2053 #line 2053 "configure"
2054 #include "confdefs.h"
2055
2056 int
2057 main (void)
2058 {
2059 #ifndef __GNUC__
2060        choke me
2061 #endif
2062
2063   ;
2064   return 0;
2065 }
2066 _ACEOF
2067 rm -f "conftest.$ac_objext"
2068 if { (eval echo "$as_me:2068: \"$ac_compile\"") >&5
2069   (eval $ac_compile) 2>&5
2070   ac_status=$?
2071   echo "$as_me:2071: \$? = $ac_status" >&5
2072   (exit "$ac_status"); } &&
2073          { ac_try='test -s "conftest.$ac_objext"'
2074   { (eval echo "$as_me:2074: \"$ac_try\"") >&5
2075   (eval $ac_try) 2>&5
2076   ac_status=$?
2077   echo "$as_me:2077: \$? = $ac_status" >&5
2078   (exit "$ac_status"); }; }; then
2079   ac_compiler_gnu=yes
2080 else
2081   echo "$as_me: failed program was:" >&5
2082 cat "conftest.$ac_ext" >&5
2083 ac_compiler_gnu=no
2084 fi
2085 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2086 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2087
2088 fi
2089 echo "$as_me:2089: result: $ac_cv_c_compiler_gnu" >&5
2090 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2091 GCC=`test $ac_compiler_gnu = yes && echo yes`
2092 ac_test_CFLAGS=${CFLAGS+set}
2093 ac_save_CFLAGS=$CFLAGS
2094 CFLAGS="-g"
2095 echo "$as_me:2095: checking whether $CC accepts -g" >&5
2096 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2097 if test "${ac_cv_prog_cc_g+set}" = set; then
2098   echo $ECHO_N "(cached) $ECHO_C" >&6
2099 else
2100   cat >"conftest.$ac_ext" <<_ACEOF
2101 #line 2101 "configure"
2102 #include "confdefs.h"
2103
2104 int
2105 main (void)
2106 {
2107
2108   ;
2109   return 0;
2110 }
2111 _ACEOF
2112 rm -f "conftest.$ac_objext"
2113 if { (eval echo "$as_me:2113: \"$ac_compile\"") >&5
2114   (eval $ac_compile) 2>&5
2115   ac_status=$?
2116   echo "$as_me:2116: \$? = $ac_status" >&5
2117   (exit "$ac_status"); } &&
2118          { ac_try='test -s "conftest.$ac_objext"'
2119   { (eval echo "$as_me:2119: \"$ac_try\"") >&5
2120   (eval $ac_try) 2>&5
2121   ac_status=$?
2122   echo "$as_me:2122: \$? = $ac_status" >&5
2123   (exit "$ac_status"); }; }; then
2124   ac_cv_prog_cc_g=yes
2125 else
2126   echo "$as_me: failed program was:" >&5
2127 cat "conftest.$ac_ext" >&5
2128 ac_cv_prog_cc_g=no
2129 fi
2130 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2131 fi
2132 echo "$as_me:2132: result: $ac_cv_prog_cc_g" >&5
2133 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2134 if test "$ac_test_CFLAGS" = set; then
2135   CFLAGS=$ac_save_CFLAGS
2136 elif test $ac_cv_prog_cc_g = yes; then
2137   if test "$GCC" = yes; then
2138     CFLAGS="-g -O2"
2139   else
2140     CFLAGS="-g"
2141   fi
2142 else
2143   if test "$GCC" = yes; then
2144     CFLAGS="-O2"
2145   else
2146     CFLAGS=
2147   fi
2148 fi
2149 # Some people use a C++ compiler to compile C.  Since we use `exit',
2150 # in C++ we need to declare it.  In case someone uses the same compiler
2151 # for both compiling C and C++ we need to have the C++ compiler decide
2152 # the declaration of exit, since it's the most demanding environment.
2153 cat >"conftest.$ac_ext" <<_ACEOF
2154 #ifndef __cplusplus
2155   choke me
2156 #endif
2157 _ACEOF
2158 rm -f "conftest.$ac_objext"
2159 if { (eval echo "$as_me:2159: \"$ac_compile\"") >&5
2160   (eval $ac_compile) 2>&5
2161   ac_status=$?
2162   echo "$as_me:2162: \$? = $ac_status" >&5
2163   (exit "$ac_status"); } &&
2164          { ac_try='test -s "conftest.$ac_objext"'
2165   { (eval echo "$as_me:2165: \"$ac_try\"") >&5
2166   (eval $ac_try) 2>&5
2167   ac_status=$?
2168   echo "$as_me:2168: \$? = $ac_status" >&5
2169   (exit "$ac_status"); }; }; then
2170   for ac_declaration in \
2171    ''\
2172    '#include <stdlib.h>' \
2173    'extern "C" void std::exit (int) throw (); using std::exit;' \
2174    'extern "C" void std::exit (int); using std::exit;' \
2175    'extern "C" void exit (int) throw ();' \
2176    'extern "C" void exit (int);' \
2177    'void exit (int);'
2178 do
2179   cat >"conftest.$ac_ext" <<_ACEOF
2180 #line 2180 "configure"
2181 #include "confdefs.h"
2182 #include <stdlib.h>
2183 $ac_declaration
2184 int
2185 main (void)
2186 {
2187 exit (42);
2188   ;
2189   return 0;
2190 }
2191 _ACEOF
2192 rm -f "conftest.$ac_objext"
2193 if { (eval echo "$as_me:2193: \"$ac_compile\"") >&5
2194   (eval $ac_compile) 2>&5
2195   ac_status=$?
2196   echo "$as_me:2196: \$? = $ac_status" >&5
2197   (exit "$ac_status"); } &&
2198          { ac_try='test -s "conftest.$ac_objext"'
2199   { (eval echo "$as_me:2199: \"$ac_try\"") >&5
2200   (eval $ac_try) 2>&5
2201   ac_status=$?
2202   echo "$as_me:2202: \$? = $ac_status" >&5
2203   (exit "$ac_status"); }; }; then
2204   :
2205 else
2206   echo "$as_me: failed program was:" >&5
2207 cat "conftest.$ac_ext" >&5
2208 continue
2209 fi
2210 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2211   cat >"conftest.$ac_ext" <<_ACEOF
2212 #line 2212 "configure"
2213 #include "confdefs.h"
2214 $ac_declaration
2215 int
2216 main (void)
2217 {
2218 exit (42);
2219   ;
2220   return 0;
2221 }
2222 _ACEOF
2223 rm -f "conftest.$ac_objext"
2224 if { (eval echo "$as_me:2224: \"$ac_compile\"") >&5
2225   (eval $ac_compile) 2>&5
2226   ac_status=$?
2227   echo "$as_me:2227: \$? = $ac_status" >&5
2228   (exit "$ac_status"); } &&
2229          { ac_try='test -s "conftest.$ac_objext"'
2230   { (eval echo "$as_me:2230: \"$ac_try\"") >&5
2231   (eval $ac_try) 2>&5
2232   ac_status=$?
2233   echo "$as_me:2233: \$? = $ac_status" >&5
2234   (exit "$ac_status"); }; }; then
2235   break
2236 else
2237   echo "$as_me: failed program was:" >&5
2238 cat "conftest.$ac_ext" >&5
2239 fi
2240 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2241 done
2242 rm -rf conftest*
2243 if test -n "$ac_declaration"; then
2244   echo '#ifdef __cplusplus' >>confdefs.h
2245   echo "$ac_declaration"    >>confdefs.h
2246   echo '#endif'             >>confdefs.h
2247 fi
2248
2249 else
2250   echo "$as_me: failed program was:" >&5
2251 cat "conftest.$ac_ext" >&5
2252 fi
2253 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2254 ac_ext=c
2255 ac_cpp='$CPP $CPPFLAGS'
2256 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2257 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2258 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2259 ac_main_return="return"
2260
2261 GCC_VERSION=none
2262 if test "$GCC" = yes ; then
2263         echo "$as_me:2263: checking version of $CC" >&5
2264 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2265         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.].*//'`"
2266         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2267         echo "$as_me:2267: result: $GCC_VERSION" >&5
2268 echo "${ECHO_T}$GCC_VERSION" >&6
2269 fi
2270
2271 INTEL_COMPILER=no
2272
2273 if test "$GCC" = yes ; then
2274         case "$host_os" in
2275         (linux*|gnu*)
2276                 echo "$as_me:2276: checking if this is really Intel C compiler" >&5
2277 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2278                 cf_save_CFLAGS="$CFLAGS"
2279                 CFLAGS="$CFLAGS -no-gcc"
2280                 cat >"conftest.$ac_ext" <<_ACEOF
2281 #line 2281 "configure"
2282 #include "confdefs.h"
2283
2284 int
2285 main (void)
2286 {
2287
2288 #ifdef __INTEL_COMPILER
2289 #else
2290 make an error
2291 #endif
2292
2293   ;
2294   return 0;
2295 }
2296 _ACEOF
2297 rm -f "conftest.$ac_objext"
2298 if { (eval echo "$as_me:2298: \"$ac_compile\"") >&5
2299   (eval $ac_compile) 2>&5
2300   ac_status=$?
2301   echo "$as_me:2301: \$? = $ac_status" >&5
2302   (exit "$ac_status"); } &&
2303          { ac_try='test -s "conftest.$ac_objext"'
2304   { (eval echo "$as_me:2304: \"$ac_try\"") >&5
2305   (eval $ac_try) 2>&5
2306   ac_status=$?
2307   echo "$as_me:2307: \$? = $ac_status" >&5
2308   (exit "$ac_status"); }; }; then
2309   INTEL_COMPILER=yes
2310 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2311
2312 else
2313   echo "$as_me: failed program was:" >&5
2314 cat "conftest.$ac_ext" >&5
2315 fi
2316 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2317                 CFLAGS="$cf_save_CFLAGS"
2318                 echo "$as_me:2318: result: $INTEL_COMPILER" >&5
2319 echo "${ECHO_T}$INTEL_COMPILER" >&6
2320                 ;;
2321         esac
2322 fi
2323
2324 CLANG_COMPILER=no
2325
2326 if test "$GCC" = yes ; then
2327         echo "$as_me:2327: checking if this is really Clang C compiler" >&5
2328 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2329         cf_save_CFLAGS="$CFLAGS"
2330         cat >"conftest.$ac_ext" <<_ACEOF
2331 #line 2331 "configure"
2332 #include "confdefs.h"
2333
2334 int
2335 main (void)
2336 {
2337
2338 #ifdef __clang__
2339 #else
2340 make an error
2341 #endif
2342
2343   ;
2344   return 0;
2345 }
2346 _ACEOF
2347 rm -f "conftest.$ac_objext"
2348 if { (eval echo "$as_me:2348: \"$ac_compile\"") >&5
2349   (eval $ac_compile) 2>&5
2350   ac_status=$?
2351   echo "$as_me:2351: \$? = $ac_status" >&5
2352   (exit "$ac_status"); } &&
2353          { ac_try='test -s "conftest.$ac_objext"'
2354   { (eval echo "$as_me:2354: \"$ac_try\"") >&5
2355   (eval $ac_try) 2>&5
2356   ac_status=$?
2357   echo "$as_me:2357: \$? = $ac_status" >&5
2358   (exit "$ac_status"); }; }; then
2359   CLANG_COMPILER=yes
2360
2361 else
2362   echo "$as_me: failed program was:" >&5
2363 cat "conftest.$ac_ext" >&5
2364 fi
2365 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2366         CFLAGS="$cf_save_CFLAGS"
2367         echo "$as_me:2367: result: $CLANG_COMPILER" >&5
2368 echo "${ECHO_T}$CLANG_COMPILER" >&6
2369 fi
2370
2371 CLANG_VERSION=none
2372
2373 if test "x$CLANG_COMPILER" = "xyes" ; then
2374         case "$CC" in
2375         (c[1-9][0-9]|*/c[1-9][0-9])
2376                 { echo "$as_me:2376: WARNING: replacing broken compiler alias $CC" >&5
2377 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2378                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2379                 CC=clang
2380                 ;;
2381         esac
2382
2383         echo "$as_me:2383: checking version of $CC" >&5
2384 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2385         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.].*//'`"
2386         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2387         echo "$as_me:2387: result: $CLANG_VERSION" >&5
2388 echo "${ECHO_T}$CLANG_VERSION" >&6
2389
2390         for cf_clang_opt in \
2391                 -Qunused-arguments \
2392                 -Wno-error=implicit-function-declaration
2393         do
2394                 echo "$as_me:2394: checking if option $cf_clang_opt works" >&5
2395 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2396                 cf_save_CFLAGS="$CFLAGS"
2397                 CFLAGS="$CFLAGS $cf_clang_opt"
2398                 cat >"conftest.$ac_ext" <<_ACEOF
2399 #line 2399 "configure"
2400 #include "confdefs.h"
2401
2402                         #include <stdio.h>
2403 int
2404 main (void)
2405 {
2406
2407                         printf("hello!\\n");
2408   ;
2409   return 0;
2410 }
2411 _ACEOF
2412 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2413 if { (eval echo "$as_me:2413: \"$ac_link\"") >&5
2414   (eval $ac_link) 2>&5
2415   ac_status=$?
2416   echo "$as_me:2416: \$? = $ac_status" >&5
2417   (exit "$ac_status"); } &&
2418          { ac_try='test -s "conftest$ac_exeext"'
2419   { (eval echo "$as_me:2419: \"$ac_try\"") >&5
2420   (eval $ac_try) 2>&5
2421   ac_status=$?
2422   echo "$as_me:2422: \$? = $ac_status" >&5
2423   (exit "$ac_status"); }; }; then
2424
2425                         cf_clang_optok=yes
2426 else
2427   echo "$as_me: failed program was:" >&5
2428 cat "conftest.$ac_ext" >&5
2429
2430                         cf_clang_optok=no
2431 fi
2432 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2433                 echo "$as_me:2433: result: $cf_clang_optok" >&5
2434 echo "${ECHO_T}$cf_clang_optok" >&6
2435                 CFLAGS="$cf_save_CFLAGS"
2436                 if test "$cf_clang_optok" = yes; then
2437                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2438
2439 echo "${as_me:-configure}:2439: testing adding option $cf_clang_opt ..." 1>&5
2440
2441         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2442         CFLAGS="${CFLAGS}$cf_clang_opt"
2443
2444                 fi
2445         done
2446 fi
2447
2448 echo "$as_me:2448: checking for $CC option to accept ANSI C" >&5
2449 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2450 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2451   echo $ECHO_N "(cached) $ECHO_C" >&6
2452 else
2453   ac_cv_prog_cc_stdc=no
2454 ac_save_CC=$CC
2455 cat >"conftest.$ac_ext" <<_ACEOF
2456 #line 2456 "configure"
2457 #include "confdefs.h"
2458 #include <stdarg.h>
2459 #include <stdio.h>
2460 #include <sys/types.h>
2461 #include <sys/stat.h>
2462 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2463 struct buf { int x; };
2464 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2465 static char *e (p, i)
2466      char **p;
2467      int i;
2468 {
2469   return p[i];
2470 }
2471 static char *f (char * (*g) (char **, int), char **p, ...)
2472 {
2473   char *s;
2474   va_list v;
2475   va_start (v,p);
2476   s = g (p, va_arg (v,int));
2477   va_end (v);
2478   return s;
2479 }
2480 int test (int i, double x);
2481 struct s1 {int (*f) (int a);};
2482 struct s2 {int (*f) (double a);};
2483 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2484 int argc;
2485 char **argv;
2486 int
2487 main (void)
2488 {
2489 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2490   ;
2491   return 0;
2492 }
2493 _ACEOF
2494 # Don't try gcc -ansi; that turns off useful extensions and
2495 # breaks some systems' header files.
2496 # AIX                   -qlanglvl=ansi
2497 # Ultrix and OSF/1      -std1
2498 # HP-UX 10.20 and later -Ae
2499 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2500 # SVR4                  -Xc -D__EXTENSIONS__
2501 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2502 do
2503   CC="$ac_save_CC $ac_arg"
2504   rm -f "conftest.$ac_objext"
2505 if { (eval echo "$as_me:2505: \"$ac_compile\"") >&5
2506   (eval $ac_compile) 2>&5
2507   ac_status=$?
2508   echo "$as_me:2508: \$? = $ac_status" >&5
2509   (exit "$ac_status"); } &&
2510          { ac_try='test -s "conftest.$ac_objext"'
2511   { (eval echo "$as_me:2511: \"$ac_try\"") >&5
2512   (eval $ac_try) 2>&5
2513   ac_status=$?
2514   echo "$as_me:2514: \$? = $ac_status" >&5
2515   (exit "$ac_status"); }; }; then
2516   ac_cv_prog_cc_stdc=$ac_arg
2517 break
2518 else
2519   echo "$as_me: failed program was:" >&5
2520 cat "conftest.$ac_ext" >&5
2521 fi
2522 rm -f "conftest.$ac_objext"
2523 done
2524 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2525 CC=$ac_save_CC
2526
2527 fi
2528
2529 case "x$ac_cv_prog_cc_stdc" in
2530   x|xno)
2531     echo "$as_me:2531: result: none needed" >&5
2532 echo "${ECHO_T}none needed" >&6 ;;
2533   *)
2534     echo "$as_me:2534: result: $ac_cv_prog_cc_stdc" >&5
2535 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2536     CC="$CC $ac_cv_prog_cc_stdc" ;;
2537 esac
2538
2539 # This should have been defined by AC_PROG_CC
2540 : "${CC:=cc}"
2541
2542 echo "$as_me:2542: checking \$CFLAGS variable" >&5
2543 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2544 case "x$CFLAGS" in
2545 (*-[IUD]*)
2546         echo "$as_me:2546: result: broken" >&5
2547 echo "${ECHO_T}broken" >&6
2548         { echo "$as_me:2548: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2549 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2550         cf_flags="$CFLAGS"
2551         CFLAGS=
2552         for cf_arg in $cf_flags
2553         do
2554
2555 cf_fix_cppflags=no
2556 cf_new_cflags=
2557 cf_new_cppflags=
2558 cf_new_extra_cppflags=
2559
2560 for cf_add_cflags in $cf_arg
2561 do
2562 case "$cf_fix_cppflags" in
2563 (no)
2564         case "$cf_add_cflags" in
2565         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2566                 case "$cf_add_cflags" in
2567                 (-D*)
2568                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2569
2570                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2571                                 && test -z "${cf_tst_cflags}" \
2572                                 && cf_fix_cppflags=yes
2573
2574                         if test "$cf_fix_cppflags" = yes ; then
2575
2576         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2577         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2578
2579                                 continue
2580                         elif test "${cf_tst_cflags}" = "\"'" ; then
2581
2582         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2583         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2584
2585                                 continue
2586                         fi
2587                         ;;
2588                 esac
2589                 case "$CPPFLAGS" in
2590                 (*$cf_add_cflags)
2591                         ;;
2592                 (*)
2593                         case "$cf_add_cflags" in
2594                         (-D*)
2595                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2596
2597 CPPFLAGS=`echo "$CPPFLAGS" | \
2598         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2599                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2600
2601                                 ;;
2602                         esac
2603
2604         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2605         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2606
2607                         ;;
2608                 esac
2609                 ;;
2610         (*)
2611
2612         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2613         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2614
2615                 ;;
2616         esac
2617         ;;
2618 (yes)
2619
2620         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2621         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2622
2623         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2624
2625         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2626                 && test -z "${cf_tst_cflags}" \
2627                 && cf_fix_cppflags=no
2628         ;;
2629 esac
2630 done
2631
2632 if test -n "$cf_new_cflags" ; then
2633
2634         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2635         CFLAGS="${CFLAGS}$cf_new_cflags"
2636
2637 fi
2638
2639 if test -n "$cf_new_cppflags" ; then
2640
2641         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2642         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2643
2644 fi
2645
2646 if test -n "$cf_new_extra_cppflags" ; then
2647
2648         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2649         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2650
2651 fi
2652
2653         done
2654         ;;
2655 (*)
2656         echo "$as_me:2656: result: ok" >&5
2657 echo "${ECHO_T}ok" >&6
2658         ;;
2659 esac
2660
2661 echo "$as_me:2661: checking \$CC variable" >&5
2662 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2663 case "$CC" in
2664 (*[\ \  ]-*)
2665         echo "$as_me:2665: result: broken" >&5
2666 echo "${ECHO_T}broken" >&6
2667         { echo "$as_me:2667: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2668 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2669         # humor him...
2670         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2671         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2672         CC="$cf_prog"
2673         for cf_arg in $cf_flags
2674         do
2675                 case "x$cf_arg" in
2676                 (x-[IUDfgOW]*)
2677
2678 cf_fix_cppflags=no
2679 cf_new_cflags=
2680 cf_new_cppflags=
2681 cf_new_extra_cppflags=
2682
2683 for cf_add_cflags in $cf_arg
2684 do
2685 case "$cf_fix_cppflags" in
2686 (no)
2687         case "$cf_add_cflags" in
2688         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2689                 case "$cf_add_cflags" in
2690                 (-D*)
2691                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2692
2693                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2694                                 && test -z "${cf_tst_cflags}" \
2695                                 && cf_fix_cppflags=yes
2696
2697                         if test "$cf_fix_cppflags" = yes ; then
2698
2699         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2700         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2701
2702                                 continue
2703                         elif test "${cf_tst_cflags}" = "\"'" ; then
2704
2705         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2706         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2707
2708                                 continue
2709                         fi
2710                         ;;
2711                 esac
2712                 case "$CPPFLAGS" in
2713                 (*$cf_add_cflags)
2714                         ;;
2715                 (*)
2716                         case "$cf_add_cflags" in
2717                         (-D*)
2718                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2719
2720 CPPFLAGS=`echo "$CPPFLAGS" | \
2721         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2722                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2723
2724                                 ;;
2725                         esac
2726
2727         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2728         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2729
2730                         ;;
2731                 esac
2732                 ;;
2733         (*)
2734
2735         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2736         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2737
2738                 ;;
2739         esac
2740         ;;
2741 (yes)
2742
2743         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2744         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2745
2746         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2747
2748         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2749                 && test -z "${cf_tst_cflags}" \
2750                 && cf_fix_cppflags=no
2751         ;;
2752 esac
2753 done
2754
2755 if test -n "$cf_new_cflags" ; then
2756
2757         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2758         CFLAGS="${CFLAGS}$cf_new_cflags"
2759
2760 fi
2761
2762 if test -n "$cf_new_cppflags" ; then
2763
2764         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2765         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2766
2767 fi
2768
2769 if test -n "$cf_new_extra_cppflags" ; then
2770
2771         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2772         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2773
2774 fi
2775
2776                         ;;
2777                 (*)
2778                         CC="$CC $cf_arg"
2779                         ;;
2780                 esac
2781         done
2782         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2783
2784 echo "${as_me:-configure}:2784: testing resulting CC: '$CC' ..." 1>&5
2785
2786         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2787
2788 echo "${as_me:-configure}:2788: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2789
2790         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2791
2792 echo "${as_me:-configure}:2792: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2793
2794         ;;
2795 (*)
2796         echo "$as_me:2796: result: ok" >&5
2797 echo "${ECHO_T}ok" >&6
2798         ;;
2799 esac
2800
2801 ac_ext=c
2802 ac_cpp='$CPP $CPPFLAGS'
2803 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2804 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2805 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2806 ac_main_return="return"
2807 echo "$as_me:2807: checking how to run the C preprocessor" >&5
2808 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2809 # On Suns, sometimes $CPP names a directory.
2810 if test -n "$CPP" && test -d "$CPP"; then
2811   CPP=
2812 fi
2813 if test -z "$CPP"; then
2814   if test "${ac_cv_prog_CPP+set}" = set; then
2815   echo $ECHO_N "(cached) $ECHO_C" >&6
2816 else
2817       # Double quotes because CPP needs to be expanded
2818     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2819     do
2820       ac_preproc_ok=false
2821 for ac_c_preproc_warn_flag in '' yes
2822 do
2823   # Use a header file that comes with gcc, so configuring glibc
2824   # with a fresh cross-compiler works.
2825   # On the NeXT, cc -E runs the code through the compiler's parser,
2826   # not just through cpp. "Syntax error" is here to catch this case.
2827   cat >"conftest.$ac_ext" <<_ACEOF
2828 #line 2828 "configure"
2829 #include "confdefs.h"
2830 #include <assert.h>
2831                      Syntax error
2832 _ACEOF
2833 if { (eval echo "$as_me:2833: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2834   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2835   ac_status=$?
2836   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2837   rm -f conftest.er1
2838   cat conftest.err >&5
2839   echo "$as_me:2839: \$? = $ac_status" >&5
2840   (exit "$ac_status"); } >/dev/null; then
2841   if test -s conftest.err; then
2842     ac_cpp_err=$ac_c_preproc_warn_flag
2843   else
2844     ac_cpp_err=
2845   fi
2846 else
2847   ac_cpp_err=yes
2848 fi
2849 if test -z "$ac_cpp_err"; then
2850   :
2851 else
2852   echo "$as_me: failed program was:" >&5
2853   cat "conftest.$ac_ext" >&5
2854   # Broken: fails on valid input.
2855 continue
2856 fi
2857 rm -f conftest.err "conftest.$ac_ext"
2858
2859   # OK, works on sane cases.  Now check whether non-existent headers
2860   # can be detected and how.
2861   cat >"conftest.$ac_ext" <<_ACEOF
2862 #line 2862 "configure"
2863 #include "confdefs.h"
2864 #include <ac_nonexistent.h>
2865 _ACEOF
2866 if { (eval echo "$as_me:2866: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2867   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2868   ac_status=$?
2869   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2870   rm -f conftest.er1
2871   cat conftest.err >&5
2872   echo "$as_me:2872: \$? = $ac_status" >&5
2873   (exit "$ac_status"); } >/dev/null; then
2874   if test -s conftest.err; then
2875     ac_cpp_err=$ac_c_preproc_warn_flag
2876   else
2877     ac_cpp_err=
2878   fi
2879 else
2880   ac_cpp_err=yes
2881 fi
2882 if test -z "$ac_cpp_err"; then
2883   # Broken: success on invalid input.
2884 continue
2885 else
2886   echo "$as_me: failed program was:" >&5
2887   cat "conftest.$ac_ext" >&5
2888   # Passes both tests.
2889 ac_preproc_ok=:
2890 break
2891 fi
2892 rm -f conftest.err "conftest.$ac_ext"
2893
2894 done
2895 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2896 rm -f conftest.err "conftest.$ac_ext"
2897 if $ac_preproc_ok; then
2898   break
2899 fi
2900
2901     done
2902     ac_cv_prog_CPP=$CPP
2903
2904 fi
2905   CPP=$ac_cv_prog_CPP
2906 else
2907   ac_cv_prog_CPP=$CPP
2908 fi
2909 echo "$as_me:2909: result: $CPP" >&5
2910 echo "${ECHO_T}$CPP" >&6
2911 ac_preproc_ok=false
2912 for ac_c_preproc_warn_flag in '' yes
2913 do
2914   # Use a header file that comes with gcc, so configuring glibc
2915   # with a fresh cross-compiler works.
2916   # On the NeXT, cc -E runs the code through the compiler's parser,
2917   # not just through cpp. "Syntax error" is here to catch this case.
2918   cat >"conftest.$ac_ext" <<_ACEOF
2919 #line 2919 "configure"
2920 #include "confdefs.h"
2921 #include <assert.h>
2922                      Syntax error
2923 _ACEOF
2924 if { (eval echo "$as_me:2924: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2925   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2926   ac_status=$?
2927   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2928   rm -f conftest.er1
2929   cat conftest.err >&5
2930   echo "$as_me:2930: \$? = $ac_status" >&5
2931   (exit "$ac_status"); } >/dev/null; then
2932   if test -s conftest.err; then
2933     ac_cpp_err=$ac_c_preproc_warn_flag
2934   else
2935     ac_cpp_err=
2936   fi
2937 else
2938   ac_cpp_err=yes
2939 fi
2940 if test -z "$ac_cpp_err"; then
2941   :
2942 else
2943   echo "$as_me: failed program was:" >&5
2944   cat "conftest.$ac_ext" >&5
2945   # Broken: fails on valid input.
2946 continue
2947 fi
2948 rm -f conftest.err "conftest.$ac_ext"
2949
2950   # OK, works on sane cases.  Now check whether non-existent headers
2951   # can be detected and how.
2952   cat >"conftest.$ac_ext" <<_ACEOF
2953 #line 2953 "configure"
2954 #include "confdefs.h"
2955 #include <ac_nonexistent.h>
2956 _ACEOF
2957 if { (eval echo "$as_me:2957: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2958   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2959   ac_status=$?
2960   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2961   rm -f conftest.er1
2962   cat conftest.err >&5
2963   echo "$as_me:2963: \$? = $ac_status" >&5
2964   (exit "$ac_status"); } >/dev/null; then
2965   if test -s conftest.err; then
2966     ac_cpp_err=$ac_c_preproc_warn_flag
2967   else
2968     ac_cpp_err=
2969   fi
2970 else
2971   ac_cpp_err=yes
2972 fi
2973 if test -z "$ac_cpp_err"; then
2974   # Broken: success on invalid input.
2975 continue
2976 else
2977   echo "$as_me: failed program was:" >&5
2978   cat "conftest.$ac_ext" >&5
2979   # Passes both tests.
2980 ac_preproc_ok=:
2981 break
2982 fi
2983 rm -f conftest.err "conftest.$ac_ext"
2984
2985 done
2986 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2987 rm -f conftest.err "conftest.$ac_ext"
2988 if $ac_preproc_ok; then
2989   :
2990 else
2991   { { echo "$as_me:2991: error: C preprocessor \"$CPP\" fails sanity check" >&5
2992 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2993    { (exit 1); exit 1; }; }
2994 fi
2995
2996 ac_ext=c
2997 ac_cpp='$CPP $CPPFLAGS'
2998 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2999 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3000 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3001 ac_main_return="return"
3002
3003 if test $ac_cv_c_compiler_gnu = yes; then
3004     echo "$as_me:3004: checking whether $CC needs -traditional" >&5
3005 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
3006 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
3007   echo $ECHO_N "(cached) $ECHO_C" >&6
3008 else
3009     ac_pattern="Autoconf.*'x'"
3010   cat >"conftest.$ac_ext" <<_ACEOF
3011 #line 3011 "configure"
3012 #include "confdefs.h"
3013 #include <sgtty.h>
3014 int Autoconf = TIOCGETP;
3015 _ACEOF
3016 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3017   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3018   ac_cv_prog_gcc_traditional=yes
3019 else
3020   ac_cv_prog_gcc_traditional=no
3021 fi
3022 rm -rf conftest*
3023
3024   if test $ac_cv_prog_gcc_traditional = no; then
3025     cat >"conftest.$ac_ext" <<_ACEOF
3026 #line 3026 "configure"
3027 #include "confdefs.h"
3028 #include <termio.h>
3029 int Autoconf = TCGETA;
3030 _ACEOF
3031 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3032   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3033   ac_cv_prog_gcc_traditional=yes
3034 fi
3035 rm -rf conftest*
3036
3037   fi
3038 fi
3039 echo "$as_me:3039: result: $ac_cv_prog_gcc_traditional" >&5
3040 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3041   if test $ac_cv_prog_gcc_traditional = yes; then
3042     CC="$CC -traditional"
3043   fi
3044 fi
3045
3046 echo "$as_me:3046: checking whether $CC understands -c and -o together" >&5
3047 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3048 if test "${cf_cv_prog_CC_c_o+set}" = set; then
3049   echo $ECHO_N "(cached) $ECHO_C" >&6
3050 else
3051
3052 cat > conftest.$ac_ext <<CF_EOF
3053 int main(void)
3054 {
3055         ${cf_cv_main_return:-return}(0);
3056 }
3057 CF_EOF
3058 # We do the test twice because some compilers refuse to overwrite an
3059 # existing .o file with -o, though they will create one.
3060 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3061 if { (eval echo "$as_me:3061: \"$ac_try\"") >&5
3062   (eval $ac_try) 2>&5
3063   ac_status=$?
3064   echo "$as_me:3064: \$? = $ac_status" >&5
3065   (exit "$ac_status"); } &&
3066   test -f conftest2.$ac_objext && { (eval echo "$as_me:3066: \"$ac_try\"") >&5
3067   (eval $ac_try) 2>&5
3068   ac_status=$?
3069   echo "$as_me:3069: \$? = $ac_status" >&5
3070   (exit "$ac_status"); };
3071 then
3072   eval cf_cv_prog_CC_c_o=yes
3073 else
3074   eval cf_cv_prog_CC_c_o=no
3075 fi
3076 rm -rf ./conftest*
3077
3078 fi
3079 if test "$cf_cv_prog_CC_c_o" = yes; then
3080   echo "$as_me:3080: result: yes" >&5
3081 echo "${ECHO_T}yes" >&6
3082 else
3083   echo "$as_me:3083: result: no" >&5
3084 echo "${ECHO_T}no" >&6
3085 fi
3086
3087 if test "$cross_compiling" = yes ; then
3088         LDCONFIG=:
3089 else
3090         case "$cf_cv_system_name" in
3091         (dragonfly*|mirbsd*|freebsd*)
3092                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
3093                 ;;
3094         (*) LDPATH=$PATH:/sbin:/usr/sbin
3095                 # Extract the first word of "ldconfig", so it can be a program name with args.
3096 set dummy ldconfig; ac_word=$2
3097 echo "$as_me:3097: checking for $ac_word" >&5
3098 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3099 if test "${ac_cv_path_LDCONFIG+set}" = set; then
3100   echo $ECHO_N "(cached) $ECHO_C" >&6
3101 else
3102   case $LDCONFIG in
3103   [\\/]* | ?:[\\/]*)
3104   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
3105   ;;
3106   *)
3107   ac_save_IFS=$IFS; IFS=$ac_path_separator
3108 ac_dummy="$LDPATH"
3109 for ac_dir in $ac_dummy; do
3110   IFS=$ac_save_IFS
3111   test -z "$ac_dir" && ac_dir=.
3112   if $as_executable_p "$ac_dir/$ac_word"; then
3113    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
3114    echo "$as_me:3114: found $ac_dir/$ac_word" >&5
3115    break
3116 fi
3117 done
3118
3119   ;;
3120 esac
3121 fi
3122 LDCONFIG=$ac_cv_path_LDCONFIG
3123
3124 if test -n "$LDCONFIG"; then
3125   echo "$as_me:3125: result: $LDCONFIG" >&5
3126 echo "${ECHO_T}$LDCONFIG" >&6
3127 else
3128   echo "$as_me:3128: result: no" >&5
3129 echo "${ECHO_T}no" >&6
3130 fi
3131
3132                 ;;
3133         esac
3134 fi
3135
3136 echo "$as_me:3136: checking if you want to ensure bool is consistent with C++" >&5
3137 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
3138
3139 # Check whether --with-cxx or --without-cxx was given.
3140 if test "${with_cxx+set}" = set; then
3141   withval="$with_cxx"
3142   cf_with_cxx=$withval
3143 else
3144   cf_with_cxx=yes
3145 fi;
3146 echo "$as_me:3146: result: $cf_with_cxx" >&5
3147 echo "${ECHO_T}$cf_with_cxx" >&6
3148 if test "X$cf_with_cxx" = Xno ; then
3149         CXX=""
3150         GXX=""
3151 else
3152         # with autoconf 2.13, we can change the error to a warning:
3153                 ac_ext=cc
3154 ac_cpp='$CXXCPP $CPPFLAGS'
3155 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3156 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3157 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3158 ac_main_return="return"
3159 if test -n "$ac_tool_prefix"; then
3160   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3161   do
3162     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3163 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3164 echo "$as_me:3164: checking for $ac_word" >&5
3165 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3166 if test "${ac_cv_prog_CXX+set}" = set; then
3167   echo $ECHO_N "(cached) $ECHO_C" >&6
3168 else
3169   if test -n "$CXX"; then
3170   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3171 else
3172   ac_save_IFS=$IFS; IFS=$ac_path_separator
3173 ac_dummy="$PATH"
3174 for ac_dir in $ac_dummy; do
3175   IFS=$ac_save_IFS
3176   test -z "$ac_dir" && ac_dir=.
3177   $as_executable_p "$ac_dir/$ac_word" || continue
3178 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3179 echo "$as_me:3179: found $ac_dir/$ac_word" >&5
3180 break
3181 done
3182
3183 fi
3184 fi
3185 CXX=$ac_cv_prog_CXX
3186 if test -n "$CXX"; then
3187   echo "$as_me:3187: result: $CXX" >&5
3188 echo "${ECHO_T}$CXX" >&6
3189 else
3190   echo "$as_me:3190: result: no" >&5
3191 echo "${ECHO_T}no" >&6
3192 fi
3193
3194     test -n "$CXX" && break
3195   done
3196 fi
3197 if test -z "$CXX"; then
3198   ac_ct_CXX=$CXX
3199   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3200 do
3201   # Extract the first word of "$ac_prog", so it can be a program name with args.
3202 set dummy $ac_prog; ac_word=$2
3203 echo "$as_me:3203: checking for $ac_word" >&5
3204 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3205 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3206   echo $ECHO_N "(cached) $ECHO_C" >&6
3207 else
3208   if test -n "$ac_ct_CXX"; then
3209   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3210 else
3211   ac_save_IFS=$IFS; IFS=$ac_path_separator
3212 ac_dummy="$PATH"
3213 for ac_dir in $ac_dummy; do
3214   IFS=$ac_save_IFS
3215   test -z "$ac_dir" && ac_dir=.
3216   $as_executable_p "$ac_dir/$ac_word" || continue
3217 ac_cv_prog_ac_ct_CXX="$ac_prog"
3218 echo "$as_me:3218: found $ac_dir/$ac_word" >&5
3219 break
3220 done
3221
3222 fi
3223 fi
3224 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3225 if test -n "$ac_ct_CXX"; then
3226   echo "$as_me:3226: result: $ac_ct_CXX" >&5
3227 echo "${ECHO_T}$ac_ct_CXX" >&6
3228 else
3229   echo "$as_me:3229: result: no" >&5
3230 echo "${ECHO_T}no" >&6
3231 fi
3232
3233   test -n "$ac_ct_CXX" && break
3234 done
3235 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3236
3237   CXX=$ac_ct_CXX
3238 fi
3239
3240 # Provide some information about the compiler.
3241 echo "$as_me:3241:" \
3242      "checking for C++ compiler version" >&5
3243 ac_compiler=`set X $ac_compile; echo $2`
3244 { (eval echo "$as_me:3244: \"$ac_compiler --version </dev/null >&5\"") >&5
3245   (eval $ac_compiler --version </dev/null >&5) 2>&5
3246   ac_status=$?
3247   echo "$as_me:3247: \$? = $ac_status" >&5
3248   (exit "$ac_status"); }
3249 { (eval echo "$as_me:3249: \"$ac_compiler -v </dev/null >&5\"") >&5
3250   (eval $ac_compiler -v </dev/null >&5) 2>&5
3251   ac_status=$?
3252   echo "$as_me:3252: \$? = $ac_status" >&5
3253   (exit "$ac_status"); }
3254 { (eval echo "$as_me:3254: \"$ac_compiler -V </dev/null >&5\"") >&5
3255   (eval $ac_compiler -V </dev/null >&5) 2>&5
3256   ac_status=$?
3257   echo "$as_me:3257: \$? = $ac_status" >&5
3258   (exit "$ac_status"); }
3259
3260 echo "$as_me:3260: checking whether we are using the GNU C++ compiler" >&5
3261 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3262 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3263   echo $ECHO_N "(cached) $ECHO_C" >&6
3264 else
3265   cat >"conftest.$ac_ext" <<_ACEOF
3266 #line 3266 "configure"
3267 #include "confdefs.h"
3268
3269 int
3270 main (void)
3271 {
3272 #ifndef __GNUC__
3273        choke me
3274 #endif
3275
3276   ;
3277   return 0;
3278 }
3279 _ACEOF
3280 rm -f "conftest.$ac_objext"
3281 if { (eval echo "$as_me:3281: \"$ac_compile\"") >&5
3282   (eval $ac_compile) 2>&5
3283   ac_status=$?
3284   echo "$as_me:3284: \$? = $ac_status" >&5
3285   (exit "$ac_status"); } &&
3286          { ac_try='test -s "conftest.$ac_objext"'
3287   { (eval echo "$as_me:3287: \"$ac_try\"") >&5
3288   (eval $ac_try) 2>&5
3289   ac_status=$?
3290   echo "$as_me:3290: \$? = $ac_status" >&5
3291   (exit "$ac_status"); }; }; then
3292   ac_compiler_gnu=yes
3293 else
3294   echo "$as_me: failed program was:" >&5
3295 cat "conftest.$ac_ext" >&5
3296 ac_compiler_gnu=no
3297 fi
3298 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3299 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3300
3301 fi
3302 echo "$as_me:3302: result: $ac_cv_cxx_compiler_gnu" >&5
3303 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3304 GXX=`test $ac_compiler_gnu = yes && echo yes`
3305 ac_test_CXXFLAGS=${CXXFLAGS+set}
3306 ac_save_CXXFLAGS=$CXXFLAGS
3307 CXXFLAGS="-g"
3308 echo "$as_me:3308: checking whether $CXX accepts -g" >&5
3309 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3310 if test "${ac_cv_prog_cxx_g+set}" = set; then
3311   echo $ECHO_N "(cached) $ECHO_C" >&6
3312 else
3313   cat >"conftest.$ac_ext" <<_ACEOF
3314 #line 3314 "configure"
3315 #include "confdefs.h"
3316
3317 int
3318 main (void)
3319 {
3320
3321   ;
3322   return 0;
3323 }
3324 _ACEOF
3325 rm -f "conftest.$ac_objext"
3326 if { (eval echo "$as_me:3326: \"$ac_compile\"") >&5
3327   (eval $ac_compile) 2>&5
3328   ac_status=$?
3329   echo "$as_me:3329: \$? = $ac_status" >&5
3330   (exit "$ac_status"); } &&
3331          { ac_try='test -s "conftest.$ac_objext"'
3332   { (eval echo "$as_me:3332: \"$ac_try\"") >&5
3333   (eval $ac_try) 2>&5
3334   ac_status=$?
3335   echo "$as_me:3335: \$? = $ac_status" >&5
3336   (exit "$ac_status"); }; }; then
3337   ac_cv_prog_cxx_g=yes
3338 else
3339   echo "$as_me: failed program was:" >&5
3340 cat "conftest.$ac_ext" >&5
3341 ac_cv_prog_cxx_g=no
3342 fi
3343 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3344 fi
3345 echo "$as_me:3345: result: $ac_cv_prog_cxx_g" >&5
3346 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3347 if test "$ac_test_CXXFLAGS" = set; then
3348   CXXFLAGS=$ac_save_CXXFLAGS
3349 elif test $ac_cv_prog_cxx_g = yes; then
3350   if test "$GXX" = yes; then
3351     CXXFLAGS="-g -O2"
3352   else
3353     CXXFLAGS="-g"
3354   fi
3355 else
3356   if test "$GXX" = yes; then
3357     CXXFLAGS="-O2"
3358   else
3359     CXXFLAGS=
3360   fi
3361 fi
3362 for ac_declaration in \
3363    ''\
3364    '#include <stdlib.h>' \
3365    'extern "C" void std::exit (int) throw (); using std::exit;' \
3366    'extern "C" void std::exit (int); using std::exit;' \
3367    'extern "C" void exit (int) throw ();' \
3368    'extern "C" void exit (int);' \
3369    'void exit (int);'
3370 do
3371   cat >"conftest.$ac_ext" <<_ACEOF
3372 #line 3372 "configure"
3373 #include "confdefs.h"
3374 #include <stdlib.h>
3375 $ac_declaration
3376 int
3377 main (void)
3378 {
3379 exit (42);
3380   ;
3381   return 0;
3382 }
3383 _ACEOF
3384 rm -f "conftest.$ac_objext"
3385 if { (eval echo "$as_me:3385: \"$ac_compile\"") >&5
3386   (eval $ac_compile) 2>&5
3387   ac_status=$?
3388   echo "$as_me:3388: \$? = $ac_status" >&5
3389   (exit "$ac_status"); } &&
3390          { ac_try='test -s "conftest.$ac_objext"'
3391   { (eval echo "$as_me:3391: \"$ac_try\"") >&5
3392   (eval $ac_try) 2>&5
3393   ac_status=$?
3394   echo "$as_me:3394: \$? = $ac_status" >&5
3395   (exit "$ac_status"); }; }; then
3396   :
3397 else
3398   echo "$as_me: failed program was:" >&5
3399 cat "conftest.$ac_ext" >&5
3400 continue
3401 fi
3402 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3403   cat >"conftest.$ac_ext" <<_ACEOF
3404 #line 3404 "configure"
3405 #include "confdefs.h"
3406 $ac_declaration
3407 int
3408 main (void)
3409 {
3410 exit (42);
3411   ;
3412   return 0;
3413 }
3414 _ACEOF
3415 rm -f "conftest.$ac_objext"
3416 if { (eval echo "$as_me:3416: \"$ac_compile\"") >&5
3417   (eval $ac_compile) 2>&5
3418   ac_status=$?
3419   echo "$as_me:3419: \$? = $ac_status" >&5
3420   (exit "$ac_status"); } &&
3421          { ac_try='test -s "conftest.$ac_objext"'
3422   { (eval echo "$as_me:3422: \"$ac_try\"") >&5
3423   (eval $ac_try) 2>&5
3424   ac_status=$?
3425   echo "$as_me:3425: \$? = $ac_status" >&5
3426   (exit "$ac_status"); }; }; then
3427   break
3428 else
3429   echo "$as_me: failed program was:" >&5
3430 cat "conftest.$ac_ext" >&5
3431 fi
3432 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3433 done
3434 rm -rf conftest*
3435 if test -n "$ac_declaration"; then
3436   echo '#ifdef __cplusplus' >>confdefs.h
3437   echo "$ac_declaration"    >>confdefs.h
3438   echo '#endif'             >>confdefs.h
3439 fi
3440
3441 ac_ext=c
3442 ac_cpp='$CPP $CPPFLAGS'
3443 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3444 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3445 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3446 ac_main_return="return"
3447
3448         ac_ext=cc
3449 ac_cpp='$CXXCPP $CPPFLAGS'
3450 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3451 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3452 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3453 ac_main_return="return"
3454
3455         if test "x$cf_with_cxx" != xno
3456         then
3457                 # Several of the C++ configurations do not work, particularly when
3458                 # cross-compiling (20140913 -TD)
3459                 echo "$as_me:3459: checking if $CXX works" >&5
3460 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3461
3462                 save_CPPFLAGS="$CPPFLAGS"
3463                 eval cf_includedir=${includedir}
3464                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3465
3466 cat >"conftest.$ac_ext" <<_ACEOF
3467 #line 3467 "configure"
3468 #include "confdefs.h"
3469
3470 #include <stdlib.h>
3471 #include <stdio.h>
3472
3473 int
3474 main (void)
3475 {
3476
3477                 printf("Hello world!\n")
3478
3479   ;
3480   return 0;
3481 }
3482 _ACEOF
3483 rm -f "conftest.$ac_objext"
3484 if { (eval echo "$as_me:3484: \"$ac_compile\"") >&5
3485   (eval $ac_compile) 2>&5
3486   ac_status=$?
3487   echo "$as_me:3487: \$? = $ac_status" >&5
3488   (exit "$ac_status"); } &&
3489          { ac_try='test -s "conftest.$ac_objext"'
3490   { (eval echo "$as_me:3490: \"$ac_try\"") >&5
3491   (eval $ac_try) 2>&5
3492   ac_status=$?
3493   echo "$as_me:3493: \$? = $ac_status" >&5
3494   (exit "$ac_status"); }; }; then
3495   cf_cxx_works=yes
3496 else
3497   echo "$as_me: failed program was:" >&5
3498 cat "conftest.$ac_ext" >&5
3499 cf_cxx_works=no
3500 fi
3501 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3502                 CPPFLAGS="$save_CPPFLAGS"
3503
3504                 echo "$as_me:3504: result: $cf_cxx_works" >&5
3505 echo "${ECHO_T}$cf_cxx_works" >&6
3506                 if test "x$cf_cxx_works" = xno
3507                 then
3508                         { echo "$as_me:3508: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3509 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3510                         cf_with_cxx=no; CXX=""; GXX="";
3511                 fi
3512         fi
3513         ac_ext=c
3514 ac_cpp='$CPP $CPPFLAGS'
3515 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3516 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3517 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3518 ac_main_return="return"
3519
3520         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3521         if test "$CXX" = "g++" ; then
3522                 # Extract the first word of "g++", so it can be a program name with args.
3523 set dummy g++; ac_word=$2
3524 echo "$as_me:3524: checking for $ac_word" >&5
3525 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3526 if test "${ac_cv_path_CXX+set}" = set; then
3527   echo $ECHO_N "(cached) $ECHO_C" >&6
3528 else
3529   case $CXX in
3530   [\\/]* | ?:[\\/]*)
3531   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3532   ;;
3533   *)
3534   ac_save_IFS=$IFS; IFS=$ac_path_separator
3535 ac_dummy="$PATH"
3536 for ac_dir in $ac_dummy; do
3537   IFS=$ac_save_IFS
3538   test -z "$ac_dir" && ac_dir=.
3539   if $as_executable_p "$ac_dir/$ac_word"; then
3540    ac_cv_path_CXX="$ac_dir/$ac_word"
3541    echo "$as_me:3541: found $ac_dir/$ac_word" >&5
3542    break
3543 fi
3544 done
3545
3546   ;;
3547 esac
3548 fi
3549 CXX=$ac_cv_path_CXX
3550
3551 if test -n "$CXX"; then
3552   echo "$as_me:3552: result: $CXX" >&5
3553 echo "${ECHO_T}$CXX" >&6
3554 else
3555   echo "$as_me:3555: result: no" >&5
3556 echo "${ECHO_T}no" >&6
3557 fi
3558
3559         fi
3560         case "x$CXX" in
3561         (x|xg++)
3562                 { echo "$as_me:3562: WARNING: You don't have any C++ compiler, too bad" >&5
3563 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3564                 cf_with_cxx=no; CXX=""; GXX="";
3565                 ;;
3566         esac
3567 fi
3568
3569 GXX_VERSION=none
3570 if test "$GXX" = yes; then
3571         echo "$as_me:3571: checking version of ${CXX:-g++}" >&5
3572 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3573         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3574         if test -z "$GXX_VERSION"
3575         then
3576                 GXX_VERSION=unknown
3577                 GXX=no
3578         fi
3579         echo "$as_me:3579: result: $GXX_VERSION" >&5
3580 echo "${ECHO_T}$GXX_VERSION" >&6
3581 fi
3582
3583 case "$GXX_VERSION" in
3584 ([1-9][0-9].*)
3585         ;;
3586 (1.*|2.[0-6]*)
3587         { echo "$as_me:3587: WARNING: templates do not work" >&5
3588 echo "$as_me: WARNING: templates do not work" >&2;}
3589         ;;
3590 esac
3591
3592 echo "$as_me:3592: checking if you want to build C++ binding and demo" >&5
3593 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3594
3595 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3596 if test "${with_cxx_binding+set}" = set; then
3597   withval="$with_cxx_binding"
3598   cf_with_cxx_binding=$withval
3599 else
3600   cf_with_cxx_binding=$cf_with_cxx
3601 fi;
3602 echo "$as_me:3602: result: $cf_with_cxx_binding" >&5
3603 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3604
3605 echo "$as_me:3605: checking if you want to build with Ada" >&5
3606 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3607 echo "$as_me:3607: result: $cf_with_ada" >&5
3608 echo "${ECHO_T}$cf_with_ada" >&6
3609
3610 echo "$as_me:3610: checking if you want to install terminal database" >&5
3611 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3612
3613 # Check whether --enable-db-install or --disable-db-install was given.
3614 if test "${enable_db_install+set}" = set; then
3615   enableval="$enable_db_install"
3616   cf_with_db_install=$enableval
3617 else
3618   cf_with_db_install=yes
3619 fi;
3620 echo "$as_me:3620: result: $cf_with_db_install" >&5
3621 echo "${ECHO_T}$cf_with_db_install" >&6
3622
3623 echo "$as_me:3623: checking if you want to install manpages" >&5
3624 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3625
3626 # Check whether --with-manpages or --without-manpages was given.
3627 if test "${with_manpages+set}" = set; then
3628   withval="$with_manpages"
3629   cf_with_manpages=$withval
3630 else
3631   cf_with_manpages=yes
3632 fi;
3633 echo "$as_me:3633: result: $cf_with_manpages" >&5
3634 echo "${ECHO_T}$cf_with_manpages" >&6
3635
3636 echo "$as_me:3636: checking if you want to build programs such as tic" >&5
3637 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3638
3639 # Check whether --with-progs or --without-progs was given.
3640 if test "${with_progs+set}" = set; then
3641   withval="$with_progs"
3642   cf_with_progs=$withval
3643 else
3644   cf_with_progs=yes
3645 fi;
3646 echo "$as_me:3646: result: $cf_with_progs" >&5
3647 echo "${ECHO_T}$cf_with_progs" >&6
3648
3649 if test -f "$srcdir/tack/tack.h" ; then
3650         if test "x$cross_compiling" = xyes ; then
3651                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3652
3653 echo "${as_me:-configure}:3653: testing ignoring tack because we are cross-compiling ..." 1>&5
3654
3655                 cf_with_tack=no
3656         else
3657                 echo "$as_me:3657: checking if you want to build the tack program" >&5
3658 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3659
3660 # Check whether --with-tack or --without-tack was given.
3661 if test "${with_tack+set}" = set; then
3662   withval="$with_tack"
3663   cf_with_tack=$withval
3664 else
3665   cf_with_tack=$cf_with_progs
3666 fi;
3667                 echo "$as_me:3667: result: $cf_with_tack" >&5
3668 echo "${ECHO_T}$cf_with_tack" >&6
3669         fi
3670 else
3671         cf_with_tack=no
3672 fi
3673
3674 echo "$as_me:3674: checking if you want to build test-programs" >&5
3675 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3676
3677 # Check whether --with-tests or --without-tests was given.
3678 if test "${with_tests+set}" = set; then
3679   withval="$with_tests"
3680   cf_with_tests=$withval
3681 else
3682   cf_with_tests=yes
3683 fi;
3684 echo "$as_me:3684: result: $cf_with_tests" >&5
3685 echo "${ECHO_T}$cf_with_tests" >&6
3686
3687 echo "$as_me:3687: checking if you wish to install curses.h" >&5
3688 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3689
3690 # Check whether --with-curses-h or --without-curses-h was given.
3691 if test "${with_curses_h+set}" = set; then
3692   withval="$with_curses_h"
3693   with_curses_h=$withval
3694 else
3695   with_curses_h=yes
3696 fi;
3697 echo "$as_me:3697: result: $with_curses_h" >&5
3698 echo "${ECHO_T}$with_curses_h" >&6
3699
3700 modules_to_build="ncurses"
3701 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3702 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3703 modules_to_build="$modules_to_build panel menu form"
3704
3705 test "$program_prefix" != NONE &&
3706   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3707 # Use a double $ so make ignores it.
3708 test "$program_suffix" != NONE &&
3709   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3710 # Double any \ or $.  echo might interpret backslashes.
3711 # By default was `s,x,x', remove it if useless.
3712 cat <<\_ACEOF >conftest.sed
3713 s/[\\$]/&&/g;s/;s,x,x,$//
3714 _ACEOF
3715 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3716 rm conftest.sed
3717
3718 for ac_prog in mawk gawk nawk awk
3719 do
3720   # Extract the first word of "$ac_prog", so it can be a program name with args.
3721 set dummy $ac_prog; ac_word=$2
3722 echo "$as_me:3722: checking for $ac_word" >&5
3723 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3724 if test "${ac_cv_prog_AWK+set}" = set; then
3725   echo $ECHO_N "(cached) $ECHO_C" >&6
3726 else
3727   if test -n "$AWK"; then
3728   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3729 else
3730   ac_save_IFS=$IFS; IFS=$ac_path_separator
3731 ac_dummy="$PATH"
3732 for ac_dir in $ac_dummy; do
3733   IFS=$ac_save_IFS
3734   test -z "$ac_dir" && ac_dir=.
3735   $as_executable_p "$ac_dir/$ac_word" || continue
3736 ac_cv_prog_AWK="$ac_prog"
3737 echo "$as_me:3737: found $ac_dir/$ac_word" >&5
3738 break
3739 done
3740
3741 fi
3742 fi
3743 AWK=$ac_cv_prog_AWK
3744 if test -n "$AWK"; then
3745   echo "$as_me:3745: result: $AWK" >&5
3746 echo "${ECHO_T}$AWK" >&6
3747 else
3748   echo "$as_me:3748: result: no" >&5
3749 echo "${ECHO_T}no" >&6
3750 fi
3751
3752   test -n "$AWK" && break
3753 done
3754
3755 test -z "$AWK" && { { echo "$as_me:3755: error: No awk program found" >&5
3756 echo "$as_me: error: No awk program found" >&2;}
3757    { (exit 1); exit 1; }; }
3758
3759 # Find a good install program.  We prefer a C program (faster),
3760 # so one script is as good as another.  But avoid the broken or
3761 # incompatible versions:
3762 # SysV /etc/install, /usr/sbin/install
3763 # SunOS /usr/etc/install
3764 # IRIX /sbin/install
3765 # AIX /bin/install
3766 # AmigaOS /C/install, which installs bootblocks on floppy discs
3767 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3768 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3769 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3770 # ./install, which can be erroneously created by make from ./install.sh.
3771 echo "$as_me:3771: checking for a BSD compatible install" >&5
3772 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3773 if test -z "$INSTALL"; then
3774 if test "${ac_cv_path_install+set}" = set; then
3775   echo $ECHO_N "(cached) $ECHO_C" >&6
3776 else
3777     ac_save_IFS=$IFS; IFS=$ac_path_separator
3778   for ac_dir in $PATH; do
3779     IFS=$ac_save_IFS
3780     # Account for people who put trailing slashes in PATH elements.
3781     case $ac_dir/ in
3782     / | ./ | .// | /cC/* \
3783     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3784     | /usr/ucb/* ) ;;
3785     *)
3786       # OSF1 and SCO ODT 3.0 have their own names for install.
3787       # Don't use installbsd from OSF since it installs stuff as root
3788       # by default.
3789       for ac_prog in ginstall scoinst install; do
3790         if $as_executable_p "$ac_dir/$ac_prog"; then
3791           if test $ac_prog = install &&
3792             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3793             # AIX install.  It has an incompatible calling convention.
3794             :
3795           elif test $ac_prog = install &&
3796             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3797             # program-specific install script used by HP pwplus--don't use.
3798             :
3799           else
3800             ac_cv_path_install="$ac_dir/$ac_prog -c"
3801             break 2
3802           fi
3803         fi
3804       done
3805       ;;
3806     esac
3807   done
3808
3809 fi
3810   if test "${ac_cv_path_install+set}" = set; then
3811     INSTALL=$ac_cv_path_install
3812   else
3813     # As a last resort, use the slow shell script.  We don't cache a
3814     # path for INSTALL within a source directory, because that will
3815     # break other packages using the cache if that directory is
3816     # removed, or if the path is relative.
3817     INSTALL=$ac_install_sh
3818   fi
3819 fi
3820 echo "$as_me:3820: result: $INSTALL" >&5
3821 echo "${ECHO_T}$INSTALL" >&6
3822
3823 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3824 # It thinks the first close brace ends the variable substitution.
3825 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3826
3827 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3828
3829 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3830
3831 case $INSTALL in
3832 (/*)
3833         ;;
3834 (*)
3835         cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
3836         test -z "$cf_dir" && cf_dir=.
3837         INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
3838         ;;
3839 esac
3840
3841 for ac_prog in lint cppcheck splint
3842 do
3843   # Extract the first word of "$ac_prog", so it can be a program name with args.
3844 set dummy $ac_prog; ac_word=$2
3845 echo "$as_me:3845: checking for $ac_word" >&5
3846 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3847 if test "${ac_cv_prog_LINT+set}" = set; then
3848   echo $ECHO_N "(cached) $ECHO_C" >&6
3849 else
3850   if test -n "$LINT"; then
3851   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3852 else
3853   ac_save_IFS=$IFS; IFS=$ac_path_separator
3854 ac_dummy="$PATH"
3855 for ac_dir in $ac_dummy; do
3856   IFS=$ac_save_IFS
3857   test -z "$ac_dir" && ac_dir=.
3858   $as_executable_p "$ac_dir/$ac_word" || continue
3859 ac_cv_prog_LINT="$ac_prog"
3860 echo "$as_me:3860: found $ac_dir/$ac_word" >&5
3861 break
3862 done
3863
3864 fi
3865 fi
3866 LINT=$ac_cv_prog_LINT
3867 if test -n "$LINT"; then
3868   echo "$as_me:3868: result: $LINT" >&5
3869 echo "${ECHO_T}$LINT" >&6
3870 else
3871   echo "$as_me:3871: result: no" >&5
3872 echo "${ECHO_T}no" >&6
3873 fi
3874
3875   test -n "$LINT" && break
3876 done
3877
3878 case "x$LINT" in
3879 (xcppcheck|x*/cppcheck)
3880         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3881         ;;
3882 esac
3883
3884 echo "$as_me:3884: checking whether ln -s works" >&5
3885 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3886 LN_S=$as_ln_s
3887 if test "$LN_S" = "ln -s"; then
3888   echo "$as_me:3888: result: yes" >&5
3889 echo "${ECHO_T}yes" >&6
3890 else
3891   echo "$as_me:3891: result: no, using $LN_S" >&5
3892 echo "${ECHO_T}no, using $LN_S" >&6
3893 fi
3894
3895 echo "$as_me:3895: checking if $LN_S -f options work" >&5
3896 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3897
3898 rm -f conf$$.src conf$$dst
3899 echo >conf$$.dst
3900 echo first >conf$$.src
3901 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3902         cf_prog_ln_sf=yes
3903 else
3904         cf_prog_ln_sf=no
3905 fi
3906 rm -f conf$$.dst conf$$src
3907 echo "$as_me:3907: result: $cf_prog_ln_sf" >&5
3908 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3909
3910 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3911
3912 echo "$as_me:3912: checking for long file names" >&5
3913 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3914 if test "${ac_cv_sys_long_file_names+set}" = set; then
3915   echo $ECHO_N "(cached) $ECHO_C" >&6
3916 else
3917   ac_cv_sys_long_file_names=yes
3918 # Test for long file names in all the places we know might matter:
3919 #      .                the current directory, where building will happen
3920 #      $prefix/lib      where we will be installing things
3921 #      $exec_prefix/lib likewise
3922 # eval it to expand exec_prefix.
3923 #      $TMPDIR          if set, where it might want to write temporary files
3924 # if $TMPDIR is not set:
3925 #      /tmp             where it might want to write temporary files
3926 #      /var/tmp         likewise
3927 #      /usr/tmp         likewise
3928 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3929   ac_tmpdirs=$TMPDIR
3930 else
3931   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3932 fi
3933 for ac_dir in  . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3934   test -d "$ac_dir" || continue
3935   test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3936   ac_xdir=$ac_dir/cf$$
3937   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3938   ac_tf1=$ac_xdir/conftest9012345
3939   ac_tf2=$ac_xdir/conftest9012346
3940   (echo 1 >"$ac_tf1") 2>/dev/null
3941   (echo 2 >"$ac_tf2") 2>/dev/null
3942   ac_val=`cat "$ac_tf1" 2>/dev/null`
3943   if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3944     ac_cv_sys_long_file_names=no
3945     rm -rf "$ac_xdir" 2>/dev/null
3946     break
3947   fi
3948   rm -rf "$ac_xdir" 2>/dev/null
3949 done
3950 fi
3951 echo "$as_me:3951: result: $ac_cv_sys_long_file_names" >&5
3952 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3953 if test "$ac_cv_sys_long_file_names" = yes; then
3954
3955 cat >>confdefs.h <<\EOF
3956 #define HAVE_LONG_FILE_NAMES 1
3957 EOF
3958
3959 fi
3960
3961 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3962 # of package conflict.
3963 cf_config_suffix=
3964
3965 # Check whether --with-config-suffix or --without-config-suffix was given.
3966 if test "${with_config_suffix+set}" = set; then
3967   withval="$with_config_suffix"
3968   case "x$withval" in
3969         (xyes|xno)
3970                 { echo "$as_me:3970: WARNING: expected a value for config-suffix option" >&5
3971 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3972                 ;;
3973         (*)     cf_config_suffix="$withval"
3974                 ;;
3975         esac
3976 fi;
3977
3978 # If we find pkg-config, check if we should install the ".pc" files.
3979
3980 echo "$as_me:3980: checking if you want to use pkg-config" >&5
3981 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3982
3983 # Check whether --with-pkg-config or --without-pkg-config was given.
3984 if test "${with_pkg_config+set}" = set; then
3985   withval="$with_pkg_config"
3986   cf_pkg_config=$withval
3987 else
3988   cf_pkg_config=yes
3989 fi;
3990 echo "$as_me:3990: result: $cf_pkg_config" >&5
3991 echo "${ECHO_T}$cf_pkg_config" >&6
3992
3993 case "$cf_pkg_config" in
3994 (no)
3995         PKG_CONFIG=none
3996         ;;
3997 (yes)
3998
3999 if test -n "$ac_tool_prefix"; then
4000   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4001 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4002 echo "$as_me:4002: checking for $ac_word" >&5
4003 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4004 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4005   echo $ECHO_N "(cached) $ECHO_C" >&6
4006 else
4007   case $PKG_CONFIG in
4008   [\\/]* | ?:[\\/]*)
4009   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4010   ;;
4011   *)
4012   ac_save_IFS=$IFS; IFS=$ac_path_separator
4013 ac_dummy="$PATH"
4014 for ac_dir in $ac_dummy; do
4015   IFS=$ac_save_IFS
4016   test -z "$ac_dir" && ac_dir=.
4017   if $as_executable_p "$ac_dir/$ac_word"; then
4018    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4019    echo "$as_me:4019: found $ac_dir/$ac_word" >&5
4020    break
4021 fi
4022 done
4023
4024   ;;
4025 esac
4026 fi
4027 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4028
4029 if test -n "$PKG_CONFIG"; then
4030   echo "$as_me:4030: result: $PKG_CONFIG" >&5
4031 echo "${ECHO_T}$PKG_CONFIG" >&6
4032 else
4033   echo "$as_me:4033: result: no" >&5
4034 echo "${ECHO_T}no" >&6
4035 fi
4036
4037 fi
4038 if test -z "$ac_cv_path_PKG_CONFIG"; then
4039   ac_pt_PKG_CONFIG=$PKG_CONFIG
4040   # Extract the first word of "pkg-config", so it can be a program name with args.
4041 set dummy pkg-config; ac_word=$2
4042 echo "$as_me:4042: checking for $ac_word" >&5
4043 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4044 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4045   echo $ECHO_N "(cached) $ECHO_C" >&6
4046 else
4047   case $ac_pt_PKG_CONFIG in
4048   [\\/]* | ?:[\\/]*)
4049   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4050   ;;
4051   *)
4052   ac_save_IFS=$IFS; IFS=$ac_path_separator
4053 ac_dummy="$PATH"
4054 for ac_dir in $ac_dummy; do
4055   IFS=$ac_save_IFS
4056   test -z "$ac_dir" && ac_dir=.
4057   if $as_executable_p "$ac_dir/$ac_word"; then
4058    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4059    echo "$as_me:4059: found $ac_dir/$ac_word" >&5
4060    break
4061 fi
4062 done
4063
4064   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4065   ;;
4066 esac
4067 fi
4068 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4069
4070 if test -n "$ac_pt_PKG_CONFIG"; then
4071   echo "$as_me:4071: result: $ac_pt_PKG_CONFIG" >&5
4072 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4073 else
4074   echo "$as_me:4074: result: no" >&5
4075 echo "${ECHO_T}no" >&6
4076 fi
4077
4078   PKG_CONFIG=$ac_pt_PKG_CONFIG
4079 else
4080   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4081 fi
4082
4083         ;;
4084 (*)
4085         PKG_CONFIG=$withval
4086         ;;
4087 esac
4088
4089 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4090 if test "$PKG_CONFIG" != none ; then
4091
4092 if test "x$prefix" != xNONE; then
4093         cf_path_syntax="$prefix"
4094 else
4095         cf_path_syntax="$ac_default_prefix"
4096 fi
4097
4098 case ".$PKG_CONFIG" in
4099 (.\$\(*\)*|.\'*\'*)
4100         ;;
4101 (..|./*|.\\*)
4102         ;;
4103 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4104         ;;
4105 (.\$\{*prefix\}*|.\$\{*dir\}*)
4106         eval PKG_CONFIG="$PKG_CONFIG"
4107         case ".$PKG_CONFIG" in
4108         (.NONE/*)
4109                 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4110                 ;;
4111         esac
4112         ;;
4113 (.no|.NONE/*)
4114         PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4115         ;;
4116 (*)
4117         { { echo "$as_me:4117: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4118 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4119    { (exit 1); exit 1; }; }
4120         ;;
4121 esac
4122
4123 elif test "x$cf_pkg_config" != xno ; then
4124         { echo "$as_me:4124: WARNING: pkg-config is not installed" >&5
4125 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4126 fi
4127
4128 case "$PKG_CONFIG" in
4129 (no|none|yes)
4130         echo "$as_me:4130: checking for pkg-config library directory" >&5
4131 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4132         ;;
4133 (*)
4134         echo "$as_me:4134: checking for $PKG_CONFIG library directory" >&5
4135 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
4136         ;;
4137 esac
4138
4139 PKG_CONFIG_LIBDIR=no
4140
4141 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4142 if test "${with_pkg_config_libdir+set}" = set; then
4143   withval="$with_pkg_config_libdir"
4144   PKG_CONFIG_LIBDIR=$withval
4145 else
4146   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
4147 fi;
4148
4149 case x$PKG_CONFIG_LIBDIR in
4150 (x/*)
4151         ;;
4152 (xyes)
4153         # Look for the library directory using the same prefix as the executable
4154         if test "x$PKG_CONFIG" = xnone
4155         then
4156                 cf_path=$prefix
4157         else
4158                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
4159         fi
4160
4161         # If you don't like using the default architecture, you have to specify the
4162         # intended library directory and corresponding compiler/linker options.
4163         #
4164         # This case allows for Debian's 2014-flavor of multiarch, along with the
4165         # most common variations before that point.  Some other variants spell the
4166         # directory differently, e.g., "pkg-config", and put it in unusual places.
4167         # pkg-config has always been poorly standardized, which is ironic...
4168         case x`(arch) 2>/dev/null` in
4169         (*64)
4170                 cf_search_path="\
4171                         $cf_path/lib/*64-linux-gnu \
4172                         $cf_path/share \
4173                         $cf_path/lib64 \
4174                         $cf_path/lib32 \
4175                         $cf_path/lib"
4176                 ;;
4177         (*)
4178                 cf_search_path="\
4179                         $cf_path/lib/*-linux-gnu \
4180                         $cf_path/share \
4181                         $cf_path/lib32 \
4182                         $cf_path/lib \
4183                         $cf_path/libdata"
4184                 ;;
4185         esac
4186
4187         test -n "$verbose" && echo "    list..." 1>&6
4188
4189 echo "${as_me:-configure}:4189: testing list... ..." 1>&5
4190
4191         for cf_config in $cf_search_path
4192         do
4193                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
4194
4195 echo "${as_me:-configure}:4195: testing checking $cf_config/pkgconfig ..." 1>&5
4196
4197                 if test -d "$cf_config/pkgconfig"
4198                 then
4199                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
4200                         echo "$as_me:4200: checking done" >&5
4201 echo $ECHO_N "checking done... $ECHO_C" >&6
4202                         break
4203                 fi
4204         done
4205         ;;
4206 (*)
4207         ;;
4208 esac
4209
4210 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
4211         echo "$as_me:4211: result: $PKG_CONFIG_LIBDIR" >&5
4212 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4213 fi
4214
4215 if test "x$PKG_CONFIG" != xnone
4216 then
4217         echo "$as_me:4217: checking if we should install .pc files for $PKG_CONFIG" >&5
4218 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4219 else
4220         echo "$as_me:4220: checking if we should install .pc files" >&5
4221 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4222 fi
4223
4224 # Check whether --enable-pc-files or --disable-pc-files was given.
4225 if test "${enable_pc_files+set}" = set; then
4226   enableval="$enable_pc_files"
4227   enable_pc_files=$enableval
4228 else
4229   enable_pc_files=no
4230 fi;
4231 echo "$as_me:4231: result: $enable_pc_files" >&5
4232 echo "${ECHO_T}$enable_pc_files" >&6
4233
4234 if test "x$enable_pc_files" != xno
4235 then
4236         MAKE_PC_FILES=
4237         case "x$PKG_CONFIG_LIBDIR" in
4238         (xno|xyes)
4239                 { echo "$as_me:4239: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4240 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4241                 ;;
4242         (*)
4243
4244 if test "x$prefix" != xNONE; then
4245         cf_path_syntax="$prefix"
4246 else
4247         cf_path_syntax="$ac_default_prefix"
4248 fi
4249
4250 case ".$PKG_CONFIG_LIBDIR" in
4251 (.\$\(*\)*|.\'*\'*)
4252         ;;
4253 (..|./*|.\\*)
4254         ;;
4255 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4256         ;;
4257 (.\$\{*prefix\}*|.\$\{*dir\}*)
4258         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
4259         case ".$PKG_CONFIG_LIBDIR" in
4260         (.NONE/*)
4261                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e s%NONE%$cf_path_syntax%`
4262                 ;;
4263         esac
4264         ;;
4265 (.no|.NONE/*)
4266         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e s%NONE%$cf_path_syntax%`
4267         ;;
4268 (*)
4269         { { echo "$as_me:4269: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
4270 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
4271    { (exit 1); exit 1; }; }
4272         ;;
4273 esac
4274
4275                 ;;
4276         esac
4277 else
4278         MAKE_PC_FILES="#"
4279 fi
4280
4281 if test -z "$MAKE_PC_FILES"
4282 then
4283         echo "$as_me:4283: checking for suffix to add to pc-files" >&5
4284 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4285
4286 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4287 if test "${with_pc_suffix+set}" = set; then
4288   withval="$with_pc_suffix"
4289   case "x$withval" in
4290         (xyes|xno)
4291                 PC_MODULE_SUFFIX=
4292                 ;;
4293         (*)     PC_MODULE_SUFFIX="$withval"
4294                 ;;
4295         esac
4296 fi;
4297         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4298         echo "$as_me:4298: result: $PC_MODULE_SUFFIX" >&5
4299 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4300         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4301
4302 fi
4303
4304 echo "$as_me:4304: checking if we should assume mixed-case filenames" >&5
4305 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4306
4307 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4308 if test "${enable_mixed_case+set}" = set; then
4309   enableval="$enable_mixed_case"
4310   enable_mixedcase=$enableval
4311 else
4312   enable_mixedcase=auto
4313 fi;
4314 echo "$as_me:4314: result: $enable_mixedcase" >&5
4315 echo "${ECHO_T}$enable_mixedcase" >&6
4316 if test "$enable_mixedcase" = "auto" ; then
4317
4318 echo "$as_me:4318: checking if filesystem supports mixed-case filenames" >&5
4319 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4320 if test "${cf_cv_mixedcase+set}" = set; then
4321   echo $ECHO_N "(cached) $ECHO_C" >&6
4322 else
4323
4324 if test "$cross_compiling" = yes ; then
4325         case "$target_alias" in
4326         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4327                 cf_cv_mixedcase=no
4328                 ;;
4329         (*)
4330                 cf_cv_mixedcase=yes
4331                 ;;
4332         esac
4333 else
4334         rm -f conftest CONFTEST
4335         echo test >conftest
4336         if test -f CONFTEST ; then
4337                 cf_cv_mixedcase=no
4338         else
4339                 cf_cv_mixedcase=yes
4340         fi
4341         rm -f conftest CONFTEST
4342 fi
4343
4344 fi
4345 echo "$as_me:4345: result: $cf_cv_mixedcase" >&5
4346 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4347 test "$cf_cv_mixedcase" = yes &&
4348 cat >>confdefs.h <<\EOF
4349 #define MIXEDCASE_FILENAMES 1
4350 EOF
4351
4352 else
4353         cf_cv_mixedcase=$enable_mixedcase
4354         if test "x$enable_mixedcase" = "xyes" ; then
4355
4356 cat >>confdefs.h <<\EOF
4357 #define MIXEDCASE_FILENAMES 1
4358 EOF
4359
4360         fi
4361 fi
4362
4363 # do this after mixed-case option (tags/TAGS is not as important as tic).
4364 echo "$as_me:4364: checking whether ${MAKE-make} sets \${MAKE}" >&5
4365 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4366 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4367 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4368   echo $ECHO_N "(cached) $ECHO_C" >&6
4369 else
4370   cat >conftest.make <<\EOF
4371 all:
4372         @echo 'ac_maketemp="${MAKE}"'
4373 EOF
4374 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4375 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4376 if test -n "$ac_maketemp"; then
4377   eval ac_cv_prog_make_${ac_make}_set=yes
4378 else
4379   eval ac_cv_prog_make_${ac_make}_set=no
4380 fi
4381 rm -f conftest.make
4382 fi
4383 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4384   echo "$as_me:4384: result: yes" >&5
4385 echo "${ECHO_T}yes" >&6
4386   SET_MAKE=
4387 else
4388   echo "$as_me:4388: result: no" >&5
4389 echo "${ECHO_T}no" >&6
4390   SET_MAKE="MAKE=${MAKE-make}"
4391 fi
4392
4393 for ac_prog in exctags ctags
4394 do
4395   # Extract the first word of "$ac_prog", so it can be a program name with args.
4396 set dummy $ac_prog; ac_word=$2
4397 echo "$as_me:4397: checking for $ac_word" >&5
4398 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4399 if test "${ac_cv_prog_CTAGS+set}" = set; then
4400   echo $ECHO_N "(cached) $ECHO_C" >&6
4401 else
4402   if test -n "$CTAGS"; then
4403   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4404 else
4405   ac_save_IFS=$IFS; IFS=$ac_path_separator
4406 ac_dummy="$PATH"
4407 for ac_dir in $ac_dummy; do
4408   IFS=$ac_save_IFS
4409   test -z "$ac_dir" && ac_dir=.
4410   $as_executable_p "$ac_dir/$ac_word" || continue
4411 ac_cv_prog_CTAGS="$ac_prog"
4412 echo "$as_me:4412: found $ac_dir/$ac_word" >&5
4413 break
4414 done
4415
4416 fi
4417 fi
4418 CTAGS=$ac_cv_prog_CTAGS
4419 if test -n "$CTAGS"; then
4420   echo "$as_me:4420: result: $CTAGS" >&5
4421 echo "${ECHO_T}$CTAGS" >&6
4422 else
4423   echo "$as_me:4423: result: no" >&5
4424 echo "${ECHO_T}no" >&6
4425 fi
4426
4427   test -n "$CTAGS" && break
4428 done
4429
4430 for ac_prog in exetags etags
4431 do
4432   # Extract the first word of "$ac_prog", so it can be a program name with args.
4433 set dummy $ac_prog; ac_word=$2
4434 echo "$as_me:4434: checking for $ac_word" >&5
4435 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4436 if test "${ac_cv_prog_ETAGS+set}" = set; then
4437   echo $ECHO_N "(cached) $ECHO_C" >&6
4438 else
4439   if test -n "$ETAGS"; then
4440   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4441 else
4442   ac_save_IFS=$IFS; IFS=$ac_path_separator
4443 ac_dummy="$PATH"
4444 for ac_dir in $ac_dummy; do
4445   IFS=$ac_save_IFS
4446   test -z "$ac_dir" && ac_dir=.
4447   $as_executable_p "$ac_dir/$ac_word" || continue
4448 ac_cv_prog_ETAGS="$ac_prog"
4449 echo "$as_me:4449: found $ac_dir/$ac_word" >&5
4450 break
4451 done
4452
4453 fi
4454 fi
4455 ETAGS=$ac_cv_prog_ETAGS
4456 if test -n "$ETAGS"; then
4457   echo "$as_me:4457: result: $ETAGS" >&5
4458 echo "${ECHO_T}$ETAGS" >&6
4459 else
4460   echo "$as_me:4460: result: no" >&5
4461 echo "${ECHO_T}no" >&6
4462 fi
4463
4464   test -n "$ETAGS" && break
4465 done
4466
4467 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4468 set dummy ${CTAGS:-ctags}; ac_word=$2
4469 echo "$as_me:4469: checking for $ac_word" >&5
4470 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4471 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4472   echo $ECHO_N "(cached) $ECHO_C" >&6
4473 else
4474   if test -n "$MAKE_LOWER_TAGS"; then
4475   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4476 else
4477   ac_save_IFS=$IFS; IFS=$ac_path_separator
4478 ac_dummy="$PATH"
4479 for ac_dir in $ac_dummy; do
4480   IFS=$ac_save_IFS
4481   test -z "$ac_dir" && ac_dir=.
4482   $as_executable_p "$ac_dir/$ac_word" || continue
4483 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4484 echo "$as_me:4484: found $ac_dir/$ac_word" >&5
4485 break
4486 done
4487
4488   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4489 fi
4490 fi
4491 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4492 if test -n "$MAKE_LOWER_TAGS"; then
4493   echo "$as_me:4493: result: $MAKE_LOWER_TAGS" >&5
4494 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4495 else
4496   echo "$as_me:4496: result: no" >&5
4497 echo "${ECHO_T}no" >&6
4498 fi
4499
4500 if test "$cf_cv_mixedcase" = yes ; then
4501         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4502 set dummy ${ETAGS:-etags}; ac_word=$2
4503 echo "$as_me:4503: checking for $ac_word" >&5
4504 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4505 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4506   echo $ECHO_N "(cached) $ECHO_C" >&6
4507 else
4508   if test -n "$MAKE_UPPER_TAGS"; then
4509   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4510 else
4511   ac_save_IFS=$IFS; IFS=$ac_path_separator
4512 ac_dummy="$PATH"
4513 for ac_dir in $ac_dummy; do
4514   IFS=$ac_save_IFS
4515   test -z "$ac_dir" && ac_dir=.
4516   $as_executable_p "$ac_dir/$ac_word" || continue
4517 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4518 echo "$as_me:4518: found $ac_dir/$ac_word" >&5
4519 break
4520 done
4521
4522   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4523 fi
4524 fi
4525 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4526 if test -n "$MAKE_UPPER_TAGS"; then
4527   echo "$as_me:4527: result: $MAKE_UPPER_TAGS" >&5
4528 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4529 else
4530   echo "$as_me:4530: result: no" >&5
4531 echo "${ECHO_T}no" >&6
4532 fi
4533
4534 else
4535         MAKE_UPPER_TAGS=no
4536 fi
4537
4538 if test "$MAKE_UPPER_TAGS" = yes ; then
4539         MAKE_UPPER_TAGS=
4540 else
4541         MAKE_UPPER_TAGS="#"
4542 fi
4543
4544 if test "$MAKE_LOWER_TAGS" = yes ; then
4545         MAKE_LOWER_TAGS=
4546 else
4547         MAKE_LOWER_TAGS="#"
4548 fi
4549
4550 echo "$as_me:4550: checking for makeflags variable" >&5
4551 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4552 if test "${cf_cv_makeflags+set}" = set; then
4553   echo $ECHO_N "(cached) $ECHO_C" >&6
4554 else
4555
4556         cf_cv_makeflags=''
4557         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4558         do
4559                 cat >cf_makeflags.tmp <<CF_EOF
4560 SHELL = $SHELL
4561 all :
4562         @ echo '.$cf_option'
4563 CF_EOF
4564                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4565                 case "$cf_result" in
4566                 (.*k|.*kw)
4567                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4568                         case "$cf_result" in
4569                         (.*CC=*)        cf_cv_makeflags=
4570                                 ;;
4571                         (*)     cf_cv_makeflags=$cf_option
4572                                 ;;
4573                         esac
4574                         break
4575                         ;;
4576                 (.-)
4577                         ;;
4578                 (*)
4579
4580 echo "${as_me:-configure}:4580: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4581
4582                         ;;
4583                 esac
4584         done
4585         rm -f cf_makeflags.tmp
4586
4587 fi
4588 echo "$as_me:4588: result: $cf_cv_makeflags" >&5
4589 echo "${ECHO_T}$cf_cv_makeflags" >&6
4590
4591 if test -n "$ac_tool_prefix"; then
4592   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4593 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4594 echo "$as_me:4594: checking for $ac_word" >&5
4595 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4596 if test "${ac_cv_prog_RANLIB+set}" = set; then
4597   echo $ECHO_N "(cached) $ECHO_C" >&6
4598 else
4599   if test -n "$RANLIB"; then
4600   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4601 else
4602   ac_save_IFS=$IFS; IFS=$ac_path_separator
4603 ac_dummy="$PATH"
4604 for ac_dir in $ac_dummy; do
4605   IFS=$ac_save_IFS
4606   test -z "$ac_dir" && ac_dir=.
4607   $as_executable_p "$ac_dir/$ac_word" || continue
4608 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4609 echo "$as_me:4609: found $ac_dir/$ac_word" >&5
4610 break
4611 done
4612
4613 fi
4614 fi
4615 RANLIB=$ac_cv_prog_RANLIB
4616 if test -n "$RANLIB"; then
4617   echo "$as_me:4617: result: $RANLIB" >&5
4618 echo "${ECHO_T}$RANLIB" >&6
4619 else
4620   echo "$as_me:4620: result: no" >&5
4621 echo "${ECHO_T}no" >&6
4622 fi
4623
4624 fi
4625 if test -z "$ac_cv_prog_RANLIB"; then
4626   ac_ct_RANLIB=$RANLIB
4627   # Extract the first word of "ranlib", so it can be a program name with args.
4628 set dummy ranlib; ac_word=$2
4629 echo "$as_me:4629: checking for $ac_word" >&5
4630 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4631 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4632   echo $ECHO_N "(cached) $ECHO_C" >&6
4633 else
4634   if test -n "$ac_ct_RANLIB"; then
4635   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4636 else
4637   ac_save_IFS=$IFS; IFS=$ac_path_separator
4638 ac_dummy="$PATH"
4639 for ac_dir in $ac_dummy; do
4640   IFS=$ac_save_IFS
4641   test -z "$ac_dir" && ac_dir=.
4642   $as_executable_p "$ac_dir/$ac_word" || continue
4643 ac_cv_prog_ac_ct_RANLIB="ranlib"
4644 echo "$as_me:4644: found $ac_dir/$ac_word" >&5
4645 break
4646 done
4647
4648   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4649 fi
4650 fi
4651 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4652 if test -n "$ac_ct_RANLIB"; then
4653   echo "$as_me:4653: result: $ac_ct_RANLIB" >&5
4654 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4655 else
4656   echo "$as_me:4656: result: no" >&5
4657 echo "${ECHO_T}no" >&6
4658 fi
4659
4660   RANLIB=$ac_ct_RANLIB
4661 else
4662   RANLIB="$ac_cv_prog_RANLIB"
4663 fi
4664
4665 if test -n "$ac_tool_prefix"; then
4666   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4667 set dummy ${ac_tool_prefix}ld; ac_word=$2
4668 echo "$as_me:4668: checking for $ac_word" >&5
4669 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4670 if test "${ac_cv_prog_LD+set}" = set; then
4671   echo $ECHO_N "(cached) $ECHO_C" >&6
4672 else
4673   if test -n "$LD"; then
4674   ac_cv_prog_LD="$LD" # Let the user override the test.
4675 else
4676   ac_save_IFS=$IFS; IFS=$ac_path_separator
4677 ac_dummy="$PATH"
4678 for ac_dir in $ac_dummy; do
4679   IFS=$ac_save_IFS
4680   test -z "$ac_dir" && ac_dir=.
4681   $as_executable_p "$ac_dir/$ac_word" || continue
4682 ac_cv_prog_LD="${ac_tool_prefix}ld"
4683 echo "$as_me:4683: found $ac_dir/$ac_word" >&5
4684 break
4685 done
4686
4687 fi
4688 fi
4689 LD=$ac_cv_prog_LD
4690 if test -n "$LD"; then
4691   echo "$as_me:4691: result: $LD" >&5
4692 echo "${ECHO_T}$LD" >&6
4693 else
4694   echo "$as_me:4694: result: no" >&5
4695 echo "${ECHO_T}no" >&6
4696 fi
4697
4698 fi
4699 if test -z "$ac_cv_prog_LD"; then
4700   ac_ct_LD=$LD
4701   # Extract the first word of "ld", so it can be a program name with args.
4702 set dummy ld; ac_word=$2
4703 echo "$as_me:4703: checking for $ac_word" >&5
4704 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4705 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4706   echo $ECHO_N "(cached) $ECHO_C" >&6
4707 else
4708   if test -n "$ac_ct_LD"; then
4709   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4710 else
4711   ac_save_IFS=$IFS; IFS=$ac_path_separator
4712 ac_dummy="$PATH"
4713 for ac_dir in $ac_dummy; do
4714   IFS=$ac_save_IFS
4715   test -z "$ac_dir" && ac_dir=.
4716   $as_executable_p "$ac_dir/$ac_word" || continue
4717 ac_cv_prog_ac_ct_LD="ld"
4718 echo "$as_me:4718: found $ac_dir/$ac_word" >&5
4719 break
4720 done
4721
4722   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4723 fi
4724 fi
4725 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4726 if test -n "$ac_ct_LD"; then
4727   echo "$as_me:4727: result: $ac_ct_LD" >&5
4728 echo "${ECHO_T}$ac_ct_LD" >&6
4729 else
4730   echo "$as_me:4730: result: no" >&5
4731 echo "${ECHO_T}no" >&6
4732 fi
4733
4734   LD=$ac_ct_LD
4735 else
4736   LD="$ac_cv_prog_LD"
4737 fi
4738
4739 if test -n "$ac_tool_prefix"; then
4740   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4741 set dummy ${ac_tool_prefix}ar; ac_word=$2
4742 echo "$as_me:4742: checking for $ac_word" >&5
4743 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4744 if test "${ac_cv_prog_AR+set}" = set; then
4745   echo $ECHO_N "(cached) $ECHO_C" >&6
4746 else
4747   if test -n "$AR"; then
4748   ac_cv_prog_AR="$AR" # Let the user override the test.
4749 else
4750   ac_save_IFS=$IFS; IFS=$ac_path_separator
4751 ac_dummy="$PATH"
4752 for ac_dir in $ac_dummy; do
4753   IFS=$ac_save_IFS
4754   test -z "$ac_dir" && ac_dir=.
4755   $as_executable_p "$ac_dir/$ac_word" || continue
4756 ac_cv_prog_AR="${ac_tool_prefix}ar"
4757 echo "$as_me:4757: found $ac_dir/$ac_word" >&5
4758 break
4759 done
4760
4761 fi
4762 fi
4763 AR=$ac_cv_prog_AR
4764 if test -n "$AR"; then
4765   echo "$as_me:4765: result: $AR" >&5
4766 echo "${ECHO_T}$AR" >&6
4767 else
4768   echo "$as_me:4768: result: no" >&5
4769 echo "${ECHO_T}no" >&6
4770 fi
4771
4772 fi
4773 if test -z "$ac_cv_prog_AR"; then
4774   ac_ct_AR=$AR
4775   # Extract the first word of "ar", so it can be a program name with args.
4776 set dummy ar; ac_word=$2
4777 echo "$as_me:4777: checking for $ac_word" >&5
4778 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4779 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4780   echo $ECHO_N "(cached) $ECHO_C" >&6
4781 else
4782   if test -n "$ac_ct_AR"; then
4783   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4784 else
4785   ac_save_IFS=$IFS; IFS=$ac_path_separator
4786 ac_dummy="$PATH"
4787 for ac_dir in $ac_dummy; do
4788   IFS=$ac_save_IFS
4789   test -z "$ac_dir" && ac_dir=.
4790   $as_executable_p "$ac_dir/$ac_word" || continue
4791 ac_cv_prog_ac_ct_AR="ar"
4792 echo "$as_me:4792: found $ac_dir/$ac_word" >&5
4793 break
4794 done
4795
4796   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4797 fi
4798 fi
4799 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4800 if test -n "$ac_ct_AR"; then
4801   echo "$as_me:4801: result: $ac_ct_AR" >&5
4802 echo "${ECHO_T}$ac_ct_AR" >&6
4803 else
4804   echo "$as_me:4804: result: no" >&5
4805 echo "${ECHO_T}no" >&6
4806 fi
4807
4808   AR=$ac_ct_AR
4809 else
4810   AR="$ac_cv_prog_AR"
4811 fi
4812
4813 if test -n "$ac_tool_prefix"; then
4814   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4815 set dummy ${ac_tool_prefix}nm; ac_word=$2
4816 echo "$as_me:4816: checking for $ac_word" >&5
4817 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4818 if test "${ac_cv_prog_NM+set}" = set; then
4819   echo $ECHO_N "(cached) $ECHO_C" >&6
4820 else
4821   if test -n "$NM"; then
4822   ac_cv_prog_NM="$NM" # Let the user override the test.
4823 else
4824   ac_save_IFS=$IFS; IFS=$ac_path_separator
4825 ac_dummy="$PATH"
4826 for ac_dir in $ac_dummy; do
4827   IFS=$ac_save_IFS
4828   test -z "$ac_dir" && ac_dir=.
4829   $as_executable_p "$ac_dir/$ac_word" || continue
4830 ac_cv_prog_NM="${ac_tool_prefix}nm"
4831 echo "$as_me:4831: found $ac_dir/$ac_word" >&5
4832 break
4833 done
4834
4835 fi
4836 fi
4837 NM=$ac_cv_prog_NM
4838 if test -n "$NM"; then
4839   echo "$as_me:4839: result: $NM" >&5
4840 echo "${ECHO_T}$NM" >&6
4841 else
4842   echo "$as_me:4842: result: no" >&5
4843 echo "${ECHO_T}no" >&6
4844 fi
4845
4846 fi
4847 if test -z "$ac_cv_prog_NM"; then
4848   ac_ct_NM=$NM
4849   # Extract the first word of "nm", so it can be a program name with args.
4850 set dummy nm; ac_word=$2
4851 echo "$as_me:4851: checking for $ac_word" >&5
4852 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4853 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4854   echo $ECHO_N "(cached) $ECHO_C" >&6
4855 else
4856   if test -n "$ac_ct_NM"; then
4857   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4858 else
4859   ac_save_IFS=$IFS; IFS=$ac_path_separator
4860 ac_dummy="$PATH"
4861 for ac_dir in $ac_dummy; do
4862   IFS=$ac_save_IFS
4863   test -z "$ac_dir" && ac_dir=.
4864   $as_executable_p "$ac_dir/$ac_word" || continue
4865 ac_cv_prog_ac_ct_NM="nm"
4866 echo "$as_me:4866: found $ac_dir/$ac_word" >&5
4867 break
4868 done
4869
4870   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4871 fi
4872 fi
4873 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4874 if test -n "$ac_ct_NM"; then
4875   echo "$as_me:4875: result: $ac_ct_NM" >&5
4876 echo "${ECHO_T}$ac_ct_NM" >&6
4877 else
4878   echo "$as_me:4878: result: no" >&5
4879 echo "${ECHO_T}no" >&6
4880 fi
4881
4882   NM=$ac_ct_NM
4883 else
4884   NM="$ac_cv_prog_NM"
4885 fi
4886
4887 if test -n "$ac_tool_prefix"; then
4888   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4889 set dummy ${ac_tool_prefix}ar; ac_word=$2
4890 echo "$as_me:4890: checking for $ac_word" >&5
4891 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4892 if test "${ac_cv_prog_AR+set}" = set; then
4893   echo $ECHO_N "(cached) $ECHO_C" >&6
4894 else
4895   if test -n "$AR"; then
4896   ac_cv_prog_AR="$AR" # Let the user override the test.
4897 else
4898   ac_save_IFS=$IFS; IFS=$ac_path_separator
4899 ac_dummy="$PATH"
4900 for ac_dir in $ac_dummy; do
4901   IFS=$ac_save_IFS
4902   test -z "$ac_dir" && ac_dir=.
4903   $as_executable_p "$ac_dir/$ac_word" || continue
4904 ac_cv_prog_AR="${ac_tool_prefix}ar"
4905 echo "$as_me:4905: found $ac_dir/$ac_word" >&5
4906 break
4907 done
4908
4909 fi
4910 fi
4911 AR=$ac_cv_prog_AR
4912 if test -n "$AR"; then
4913   echo "$as_me:4913: result: $AR" >&5
4914 echo "${ECHO_T}$AR" >&6
4915 else
4916   echo "$as_me:4916: result: no" >&5
4917 echo "${ECHO_T}no" >&6
4918 fi
4919
4920 fi
4921 if test -z "$ac_cv_prog_AR"; then
4922   ac_ct_AR=$AR
4923   # Extract the first word of "ar", so it can be a program name with args.
4924 set dummy ar; ac_word=$2
4925 echo "$as_me:4925: checking for $ac_word" >&5
4926 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4927 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4928   echo $ECHO_N "(cached) $ECHO_C" >&6
4929 else
4930   if test -n "$ac_ct_AR"; then
4931   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4932 else
4933   ac_save_IFS=$IFS; IFS=$ac_path_separator
4934 ac_dummy="$PATH"
4935 for ac_dir in $ac_dummy; do
4936   IFS=$ac_save_IFS
4937   test -z "$ac_dir" && ac_dir=.
4938   $as_executable_p "$ac_dir/$ac_word" || continue
4939 ac_cv_prog_ac_ct_AR="ar"
4940 echo "$as_me:4940: found $ac_dir/$ac_word" >&5
4941 break
4942 done
4943
4944   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4945 fi
4946 fi
4947 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4948 if test -n "$ac_ct_AR"; then
4949   echo "$as_me:4949: result: $ac_ct_AR" >&5
4950 echo "${ECHO_T}$ac_ct_AR" >&6
4951 else
4952   echo "$as_me:4952: result: no" >&5
4953 echo "${ECHO_T}no" >&6
4954 fi
4955
4956   AR=$ac_ct_AR
4957 else
4958   AR="$ac_cv_prog_AR"
4959 fi
4960
4961 echo "$as_me:4961: checking for options to update archives" >&5
4962 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4963 if test "${cf_cv_ar_flags+set}" = set; then
4964   echo $ECHO_N "(cached) $ECHO_C" >&6
4965 else
4966
4967         case "$cf_cv_system_name" in
4968         (*-msvc*)
4969                 cf_cv_ar_flags=''
4970                 cat >mk_static_lib.sh <<-EOF
4971                 #!$SHELL
4972                 MSVC_BIN="$AR"
4973                 out="\$1"
4974                 shift
4975                 exec \$MSVC_BIN -out:"\$out" \$@
4976                 EOF
4977                 chmod +x mk_static_lib.sh
4978                 AR=`pwd`/mk_static_lib.sh
4979                 ;;
4980         (*)
4981                 cf_cv_ar_flags=unknown
4982                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4983                 do
4984
4985                         # check if $ARFLAGS already contains this choice
4986                         if test "x$ARFLAGS" != "x" ; then
4987                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4988                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4989                                         cf_cv_ar_flags=
4990                                         break
4991                                 fi
4992                         fi
4993
4994                         rm -f "conftest.$ac_cv_objext"
4995                         rm -f conftest.a
4996
4997                         cat >"conftest.$ac_ext" <<EOF
4998 #line 4998 "configure"
4999 int     testdata[3] = { 123, 456, 789 };
5000 EOF
5001                         if { (eval echo "$as_me:5001: \"$ac_compile\"") >&5
5002   (eval $ac_compile) 2>&5
5003   ac_status=$?
5004   echo "$as_me:5004: \$? = $ac_status" >&5
5005   (exit "$ac_status"); } ; then
5006                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5007                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5008                                 if test -f conftest.a ; then
5009                                         cf_cv_ar_flags="$cf_ar_flags"
5010                                         break
5011                                 fi
5012                         else
5013                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5014
5015 echo "${as_me:-configure}:5015: testing cannot compile test-program ..." 1>&5
5016
5017                                 break
5018                         fi
5019                 done
5020                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5021                 ;;
5022         esac
5023
5024 fi
5025 echo "$as_me:5025: result: $cf_cv_ar_flags" >&5
5026 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5027
5028 if test -n "$ARFLAGS" ; then
5029         if test -n "$cf_cv_ar_flags" ; then
5030                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5031         fi
5032 else
5033         ARFLAGS=$cf_cv_ar_flags
5034 fi
5035
5036 echo "$as_me:5036: checking if you have specified an install-prefix" >&5
5037 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
5038
5039 # Check whether --with-install-prefix or --without-install-prefix was given.
5040 if test "${with_install_prefix+set}" = set; then
5041   withval="$with_install_prefix"
5042   case "x$withval" in
5043         (xyes|xno)
5044                 ;;
5045         (*)     DESTDIR="$withval"
5046                 ;;
5047         esac
5048 fi;
5049 echo "$as_me:5049: result: $DESTDIR" >&5
5050 echo "${ECHO_T}$DESTDIR" >&6
5051
5052 ###############################################################################
5053
5054 # If we're cross-compiling, allow the user to override the tools and their
5055 # options.  The configure script is oriented toward identifying the host
5056 # compiler, etc., but we need a build compiler to generate parts of the source.
5057
5058 case "$cf_cv_system_name" in
5059 (*-msvc*)
5060         LDFLAGS="$LDFLAGS user32.lib"
5061         export LDFLAGS
5062         ;;
5063 esac
5064
5065 if test "$cross_compiling" = yes ; then
5066
5067         # defaults that we might want to override
5068         : ${BUILD_CFLAGS:=''}
5069         : ${BUILD_CPPFLAGS:=''}
5070         : ${BUILD_LDFLAGS:=''}
5071         : ${BUILD_LIBS:=''}
5072         : ${BUILD_EXEEXT:='$x'}
5073         : ${BUILD_OBJEXT:='o'}
5074
5075 # Check whether --with-build-cc or --without-build-cc was given.
5076 if test "${with_build_cc+set}" = set; then
5077   withval="$with_build_cc"
5078   BUILD_CC="$withval"
5079 else
5080   for ac_prog in gcc clang c99 c89 cc cl
5081 do
5082   # Extract the first word of "$ac_prog", so it can be a program name with args.
5083 set dummy $ac_prog; ac_word=$2
5084 echo "$as_me:5084: checking for $ac_word" >&5
5085 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5086 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5087   echo $ECHO_N "(cached) $ECHO_C" >&6
5088 else
5089   if test -n "$BUILD_CC"; then
5090   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5091 else
5092   ac_save_IFS=$IFS; IFS=$ac_path_separator
5093 ac_dummy="$PATH"
5094 for ac_dir in $ac_dummy; do
5095   IFS=$ac_save_IFS
5096   test -z "$ac_dir" && ac_dir=.
5097   $as_executable_p "$ac_dir/$ac_word" || continue
5098 ac_cv_prog_BUILD_CC="$ac_prog"
5099 echo "$as_me:5099: found $ac_dir/$ac_word" >&5
5100 break
5101 done
5102
5103 fi
5104 fi
5105 BUILD_CC=$ac_cv_prog_BUILD_CC
5106 if test -n "$BUILD_CC"; then
5107   echo "$as_me:5107: result: $BUILD_CC" >&5
5108 echo "${ECHO_T}$BUILD_CC" >&6
5109 else
5110   echo "$as_me:5110: result: no" >&5
5111 echo "${ECHO_T}no" >&6
5112 fi
5113
5114   test -n "$BUILD_CC" && break
5115 done
5116 test -n "$BUILD_CC" || BUILD_CC="none"
5117
5118 fi;
5119         echo "$as_me:5119: checking for native build C compiler" >&5
5120 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5121         echo "$as_me:5121: result: $BUILD_CC" >&5
5122 echo "${ECHO_T}$BUILD_CC" >&6
5123
5124         echo "$as_me:5124: checking for native build C preprocessor" >&5
5125 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5126
5127 # Check whether --with-build-cpp or --without-build-cpp was given.
5128 if test "${with_build_cpp+set}" = set; then
5129   withval="$with_build_cpp"
5130   BUILD_CPP="$withval"
5131 else
5132   BUILD_CPP='${BUILD_CC} -E'
5133 fi;
5134         echo "$as_me:5134: result: $BUILD_CPP" >&5
5135 echo "${ECHO_T}$BUILD_CPP" >&6
5136
5137         echo "$as_me:5137: checking for native build C flags" >&5
5138 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5139
5140 # Check whether --with-build-cflags or --without-build-cflags was given.
5141 if test "${with_build_cflags+set}" = set; then
5142   withval="$with_build_cflags"
5143   BUILD_CFLAGS="$withval"
5144 fi;
5145         echo "$as_me:5145: result: $BUILD_CFLAGS" >&5
5146 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5147
5148         echo "$as_me:5148: checking for native build C preprocessor-flags" >&5
5149 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5150
5151 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5152 if test "${with_build_cppflags+set}" = set; then
5153   withval="$with_build_cppflags"
5154   BUILD_CPPFLAGS="$withval"
5155 fi;
5156         echo "$as_me:5156: result: $BUILD_CPPFLAGS" >&5
5157 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5158
5159         echo "$as_me:5159: checking for native build linker-flags" >&5
5160 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5161
5162 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5163 if test "${with_build_ldflags+set}" = set; then
5164   withval="$with_build_ldflags"
5165   BUILD_LDFLAGS="$withval"
5166 fi;
5167         echo "$as_me:5167: result: $BUILD_LDFLAGS" >&5
5168 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5169
5170         echo "$as_me:5170: checking for native build linker-libraries" >&5
5171 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5172
5173 # Check whether --with-build-libs or --without-build-libs was given.
5174 if test "${with_build_libs+set}" = set; then
5175   withval="$with_build_libs"
5176   BUILD_LIBS="$withval"
5177 fi;
5178         echo "$as_me:5178: result: $BUILD_LIBS" >&5
5179 echo "${ECHO_T}$BUILD_LIBS" >&6
5180
5181         # this assumes we're on Unix.
5182         BUILD_EXEEXT=
5183         BUILD_OBJEXT=o
5184
5185         : ${BUILD_CC:='${CC}'}
5186
5187         if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
5188                 { { echo "$as_me:5188: error: Cross-build requires two compilers.
5189 Use --with-build-cc to specify the native compiler." >&5
5190 echo "$as_me: error: Cross-build requires two compilers.
5191 Use --with-build-cc to specify the native compiler." >&2;}
5192    { (exit 1); exit 1; }; }
5193         fi
5194
5195 else
5196         : ${BUILD_CC:='${CC}'}
5197         : ${BUILD_CPP:='${CPP}'}
5198         : ${BUILD_CFLAGS:='${CFLAGS}'}
5199         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5200         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5201         : ${BUILD_LIBS:='${LIBS}'}
5202         : ${BUILD_EXEEXT:='$x'}
5203         : ${BUILD_OBJEXT:='o'}
5204 fi
5205
5206 ###############################################################################
5207
5208 ### Options to allow the user to specify the set of libraries which are used.
5209 ### Use "--without-normal --with-shared" to allow the default model to be
5210 ### shared, for example.
5211 cf_list_models=""
5212
5213 echo "$as_me:5213: checking if libtool -version-number should be used" >&5
5214 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5215
5216 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5217 if test "${enable_libtool_version+set}" = set; then
5218   enableval="$enable_libtool_version"
5219   test "$enableval" != no && enableval=yes
5220         if test "$enableval" != "yes" ; then
5221     cf_libtool_version=no
5222         else
5223                 cf_libtool_version=yes
5224         fi
5225 else
5226   enableval=yes
5227         cf_libtool_version=yes
5228
5229 fi;
5230 echo "$as_me:5230: result: $cf_libtool_version" >&5
5231 echo "${ECHO_T}$cf_libtool_version" >&6
5232
5233 if test "$cf_libtool_version" = yes ; then
5234         LIBTOOL_VERSION="-version-number"
5235 else
5236         LIBTOOL_VERSION="-version-info"
5237         case "x$VERSION" in
5238         (x)
5239                 { echo "$as_me:5239: WARNING: VERSION was not set" >&5
5240 echo "$as_me: WARNING: VERSION was not set" >&2;}
5241                 ;;
5242         (x*.*.*)
5243                 ABI_VERSION="$VERSION"
5244                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5245
5246 echo "${as_me:-configure}:5246: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5247
5248                 ;;
5249         (x*:*:*)
5250                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5251                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5252
5253 echo "${as_me:-configure}:5253: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5254
5255                 ;;
5256         (*)
5257                 { echo "$as_me:5257: WARNING: unexpected VERSION value: $VERSION" >&5
5258 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5259                 ;;
5260         esac
5261 fi
5262
5263 LIBTOOL=
5264
5265 # common library maintenance symbols that are convenient for libtool scripts:
5266 LIB_CREATE='${AR} -cr'
5267 LIB_OBJECT='${OBJECTS}'
5268 LIB_SUFFIX=.a
5269 LIB_PREP="$RANLIB"
5270
5271 # symbols used to prop libtool up to enable it to determine what it should be
5272 # doing:
5273 LIB_CLEAN=
5274 LIB_COMPILE=
5275 LIB_LINK='${CC}'
5276 LIB_INSTALL=
5277 LIB_UNINSTALL=
5278
5279 echo "$as_me:5279: checking if you want to build libraries with libtool" >&5
5280 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5281
5282 # Check whether --with-libtool or --without-libtool was given.
5283 if test "${with_libtool+set}" = set; then
5284   withval="$with_libtool"
5285   with_libtool=$withval
5286 else
5287   with_libtool=no
5288 fi;
5289 echo "$as_me:5289: result: $with_libtool" >&5
5290 echo "${ECHO_T}$with_libtool" >&6
5291 if test "$with_libtool" != "no"; then
5292
5293         if test "$with_libtool" != "yes" ; then
5294
5295 if test "x$prefix" != xNONE; then
5296         cf_path_syntax="$prefix"
5297 else
5298         cf_path_syntax="$ac_default_prefix"
5299 fi
5300
5301 case ".$with_libtool" in
5302 (.\$\(*\)*|.\'*\'*)
5303         ;;
5304 (..|./*|.\\*)
5305         ;;
5306 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5307         ;;
5308 (.\$\{*prefix\}*|.\$\{*dir\}*)
5309         eval with_libtool="$with_libtool"
5310         case ".$with_libtool" in
5311         (.NONE/*)
5312                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5313                 ;;
5314         esac
5315         ;;
5316 (.no|.NONE/*)
5317         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5318         ;;
5319 (*)
5320         { { echo "$as_me:5320: error: expected a pathname, not \"$with_libtool\"" >&5
5321 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5322    { (exit 1); exit 1; }; }
5323         ;;
5324 esac
5325
5326                 LIBTOOL=$with_libtool
5327         else
5328                 if test -n "$ac_tool_prefix"; then
5329   for ac_prog in libtool glibtool
5330   do
5331     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5332 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5333 echo "$as_me:5333: checking for $ac_word" >&5
5334 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5335 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5336   echo $ECHO_N "(cached) $ECHO_C" >&6
5337 else
5338   if test -n "$LIBTOOL"; then
5339   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5340 else
5341   ac_save_IFS=$IFS; IFS=$ac_path_separator
5342 ac_dummy="$PATH"
5343 for ac_dir in $ac_dummy; do
5344   IFS=$ac_save_IFS
5345   test -z "$ac_dir" && ac_dir=.
5346   $as_executable_p "$ac_dir/$ac_word" || continue
5347 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5348 echo "$as_me:5348: found $ac_dir/$ac_word" >&5
5349 break
5350 done
5351
5352 fi
5353 fi
5354 LIBTOOL=$ac_cv_prog_LIBTOOL
5355 if test -n "$LIBTOOL"; then
5356   echo "$as_me:5356: result: $LIBTOOL" >&5
5357 echo "${ECHO_T}$LIBTOOL" >&6
5358 else
5359   echo "$as_me:5359: result: no" >&5
5360 echo "${ECHO_T}no" >&6
5361 fi
5362
5363     test -n "$LIBTOOL" && break
5364   done
5365 fi
5366 if test -z "$LIBTOOL"; then
5367   ac_ct_LIBTOOL=$LIBTOOL
5368   for ac_prog in libtool glibtool
5369 do
5370   # Extract the first word of "$ac_prog", so it can be a program name with args.
5371 set dummy $ac_prog; ac_word=$2
5372 echo "$as_me:5372: checking for $ac_word" >&5
5373 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5374 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5375   echo $ECHO_N "(cached) $ECHO_C" >&6
5376 else
5377   if test -n "$ac_ct_LIBTOOL"; then
5378   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5379 else
5380   ac_save_IFS=$IFS; IFS=$ac_path_separator
5381 ac_dummy="$PATH"
5382 for ac_dir in $ac_dummy; do
5383   IFS=$ac_save_IFS
5384   test -z "$ac_dir" && ac_dir=.
5385   $as_executable_p "$ac_dir/$ac_word" || continue
5386 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5387 echo "$as_me:5387: found $ac_dir/$ac_word" >&5
5388 break
5389 done
5390
5391 fi
5392 fi
5393 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5394 if test -n "$ac_ct_LIBTOOL"; then
5395   echo "$as_me:5395: result: $ac_ct_LIBTOOL" >&5
5396 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5397 else
5398   echo "$as_me:5398: result: no" >&5
5399 echo "${ECHO_T}no" >&6
5400 fi
5401
5402   test -n "$ac_ct_LIBTOOL" && break
5403 done
5404 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5405
5406   LIBTOOL=$ac_ct_LIBTOOL
5407 fi
5408
5409 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5410 then
5411         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.].*//'`
5412 else
5413         cf_cv_libtool_version=
5414 fi
5415 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5416
5417                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5418                 then
5419
5420 unset ac_cv_prog_ac_ct_LIBTOOL
5421 unset ac_ct_LIBTOOL
5422 unset LIBTOOL
5423
5424                         if test -n "$ac_tool_prefix"; then
5425   for ac_prog in glibtool
5426   do
5427     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5428 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5429 echo "$as_me:5429: checking for $ac_word" >&5
5430 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5431 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5432   echo $ECHO_N "(cached) $ECHO_C" >&6
5433 else
5434   if test -n "$LIBTOOL"; then
5435   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5436 else
5437   ac_save_IFS=$IFS; IFS=$ac_path_separator
5438 ac_dummy="$PATH"
5439 for ac_dir in $ac_dummy; do
5440   IFS=$ac_save_IFS
5441   test -z "$ac_dir" && ac_dir=.
5442   $as_executable_p "$ac_dir/$ac_word" || continue
5443 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5444 echo "$as_me:5444: found $ac_dir/$ac_word" >&5
5445 break
5446 done
5447
5448 fi
5449 fi
5450 LIBTOOL=$ac_cv_prog_LIBTOOL
5451 if test -n "$LIBTOOL"; then
5452   echo "$as_me:5452: result: $LIBTOOL" >&5
5453 echo "${ECHO_T}$LIBTOOL" >&6
5454 else
5455   echo "$as_me:5455: result: no" >&5
5456 echo "${ECHO_T}no" >&6
5457 fi
5458
5459     test -n "$LIBTOOL" && break
5460   done
5461 fi
5462 if test -z "$LIBTOOL"; then
5463   ac_ct_LIBTOOL=$LIBTOOL
5464   for ac_prog in glibtool
5465 do
5466   # Extract the first word of "$ac_prog", so it can be a program name with args.
5467 set dummy $ac_prog; ac_word=$2
5468 echo "$as_me:5468: checking for $ac_word" >&5
5469 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5470 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5471   echo $ECHO_N "(cached) $ECHO_C" >&6
5472 else
5473   if test -n "$ac_ct_LIBTOOL"; then
5474   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5475 else
5476   ac_save_IFS=$IFS; IFS=$ac_path_separator
5477 ac_dummy="$PATH"
5478 for ac_dir in $ac_dummy; do
5479   IFS=$ac_save_IFS
5480   test -z "$ac_dir" && ac_dir=.
5481   $as_executable_p "$ac_dir/$ac_word" || continue
5482 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5483 echo "$as_me:5483: found $ac_dir/$ac_word" >&5
5484 break
5485 done
5486
5487 fi
5488 fi
5489 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5490 if test -n "$ac_ct_LIBTOOL"; then
5491   echo "$as_me:5491: result: $ac_ct_LIBTOOL" >&5
5492 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5493 else
5494   echo "$as_me:5494: result: no" >&5
5495 echo "${ECHO_T}no" >&6
5496 fi
5497
5498   test -n "$ac_ct_LIBTOOL" && break
5499 done
5500 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5501
5502   LIBTOOL=$ac_ct_LIBTOOL
5503 fi
5504
5505 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5506 then
5507         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.].*//'`
5508 else
5509         cf_cv_libtool_version=
5510 fi
5511 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5512
5513                 fi
5514         fi
5515         if test -z "$LIBTOOL" ; then
5516                 { { echo "$as_me:5516: error: Cannot find libtool" >&5
5517 echo "$as_me: error: Cannot find libtool" >&2;}
5518    { (exit 1); exit 1; }; }
5519         fi
5520         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5521         LIB_OBJECT='${OBJECTS:.o=.lo}'
5522         LIB_SUFFIX=.la
5523         LIB_CLEAN='${LIBTOOL} --mode=clean'
5524         LIB_COMPILE='${LIBTOOL} --mode=compile'
5525         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5526         LIB_INSTALL='${LIBTOOL} --mode=install'
5527         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5528         LIB_PREP=:
5529
5530 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5531 then
5532         echo "$as_me:5532: checking version of $LIBTOOL" >&5
5533 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5534
5535 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5536 then
5537         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.].*//'`
5538 else
5539         cf_cv_libtool_version=
5540 fi
5541 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5542
5543         echo "$as_me:5543: result: $cf_cv_libtool_version" >&5
5544 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5545         if test -z "$cf_cv_libtool_version" ; then
5546                 { { echo "$as_me:5546: error: This is not GNU libtool" >&5
5547 echo "$as_me: error: This is not GNU libtool" >&2;}
5548    { (exit 1); exit 1; }; }
5549         fi
5550 else
5551         { { echo "$as_me:5551: error: GNU libtool has not been found" >&5
5552 echo "$as_me: error: GNU libtool has not been found" >&2;}
5553    { (exit 1); exit 1; }; }
5554 fi
5555
5556         # special hack to add -no-undefined (which libtool should do for itself)
5557         LT_UNDEF=
5558         case "$cf_cv_system_name" in
5559         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5560                 LT_UNDEF=-no-undefined
5561                 ;;
5562         esac
5563
5564         # special hack to add --tag option for C++ compiler
5565         case "$cf_cv_libtool_version" in
5566         (1.[5-9]*|[2-9].[0-9.a-z]*)
5567                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5568                 LIBTOOL="$LIBTOOL --tag=CC"
5569                 ;;
5570         (*)
5571                 LIBTOOL_CXX="$LIBTOOL"
5572                 ;;
5573         esac
5574 else
5575         LIBTOOL=""
5576         LIBTOOL_CXX=""
5577 fi
5578
5579 test -z "$LIBTOOL" && ECHO_LT=
5580
5581 if test "$with_libtool" != "no" ; then
5582
5583 cf_list_models="$cf_list_models libtool"
5584
5585 else
5586
5587 echo "$as_me:5587: checking if you want to build shared libraries" >&5
5588 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5589
5590 # Check whether --with-shared or --without-shared was given.
5591 if test "${with_shared+set}" = set; then
5592   withval="$with_shared"
5593   with_shared=$withval
5594 else
5595   with_shared=no
5596 fi;
5597 echo "$as_me:5597: result: $with_shared" >&5
5598 echo "${ECHO_T}$with_shared" >&6
5599 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5600
5601 echo "$as_me:5601: checking if you want to build static libraries" >&5
5602 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5603
5604 # Check whether --with-normal or --without-normal was given.
5605 if test "${with_normal+set}" = set; then
5606   withval="$with_normal"
5607   with_normal=$withval
5608 else
5609   with_normal=yes
5610 fi;
5611 echo "$as_me:5611: result: $with_normal" >&5
5612 echo "${ECHO_T}$with_normal" >&6
5613 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5614
5615 echo "$as_me:5615: checking if you want to build debug libraries" >&5
5616 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5617
5618 # Check whether --with-debug or --without-debug was given.
5619 if test "${with_debug+set}" = set; then
5620   withval="$with_debug"
5621   with_debug=$withval
5622 else
5623   with_debug=yes
5624 fi;
5625 echo "$as_me:5625: result: $with_debug" >&5
5626 echo "${ECHO_T}$with_debug" >&6
5627 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5628
5629 echo "$as_me:5629: checking if you want to build profiling libraries" >&5
5630 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5631
5632 # Check whether --with-profile or --without-profile was given.
5633 if test "${with_profile+set}" = set; then
5634   withval="$with_profile"
5635   with_profile=$withval
5636 else
5637   with_profile=no
5638 fi;
5639 echo "$as_me:5639: result: $with_profile" >&5
5640 echo "${ECHO_T}$with_profile" >&6
5641 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5642
5643 fi
5644
5645 if test "X$cf_with_cxx_binding" != Xno; then
5646 if test "x$with_shared" = "xyes"; then
5647 echo "$as_me:5647: checking if you want to build C++ shared libraries" >&5
5648 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5649
5650 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5651 if test "${with_cxx_shared+set}" = set; then
5652   withval="$with_cxx_shared"
5653   with_shared_cxx=$withval
5654 else
5655   with_shared_cxx=no
5656 fi;
5657 echo "$as_me:5657: result: $with_shared_cxx" >&5
5658 echo "${ECHO_T}$with_shared_cxx" >&6
5659 fi
5660 fi
5661
5662 ###############################################################################
5663
5664 echo "$as_me:5664: checking for specified models" >&5
5665 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5666 test -z "$cf_list_models" && cf_list_models=normal
5667 test "$with_libtool" != "no" && cf_list_models=libtool
5668 echo "$as_me:5668: result: $cf_list_models" >&5
5669 echo "${ECHO_T}$cf_list_models" >&6
5670
5671 ### Use the first model as the default, and save its suffix for use in building
5672 ### up test-applications.
5673 echo "$as_me:5673: checking for default model" >&5
5674 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5675 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5676 echo "$as_me:5676: result: $DFT_LWR_MODEL" >&5
5677 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5678
5679 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5680
5681 TICS_NAME=tic
5682
5683 TINFO_NAME=tinfo
5684
5685 LIB_NAME=ncurses
5686
5687 LIB_DIR=../lib
5688 LIB_2ND=../../lib
5689
5690 echo "$as_me:5690: checking if you want to have a library-prefix" >&5
5691 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5692
5693 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5694 if test "${with_lib_prefix+set}" = set; then
5695   withval="$with_lib_prefix"
5696   with_lib_prefix=$withval
5697 else
5698   with_lib_prefix=auto
5699 fi;
5700 echo "$as_me:5700: result: $with_lib_prefix" >&5
5701 echo "${ECHO_T}$with_lib_prefix" >&6
5702
5703 if test "$with_lib_prefix" = auto
5704 then
5705
5706         case "$cf_cv_system_name" in
5707         (OS/2*|os2*)
5708                 if test "$DFT_LWR_MODEL" = libtool; then
5709                         LIB_PREFIX='lib'
5710                 else
5711                         LIB_PREFIX=''
5712                 fi
5713                 ;;
5714         (*-msvc*)
5715                 LIB_PREFIX=''
5716                 ;;
5717         (*)     LIB_PREFIX='lib'
5718                 ;;
5719         esac
5720 cf_prefix=$LIB_PREFIX
5721
5722 elif test "$with_lib_prefix" = no
5723 then
5724         LIB_PREFIX=
5725 else
5726         LIB_PREFIX=$with_lib_prefix
5727 fi
5728
5729 LIB_SUFFIX=
5730
5731         echo "$as_me:5731: checking for PATH separator" >&5
5732 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5733         case "$cf_cv_system_name" in
5734         (os2*)  PATH_SEPARATOR=';'  ;;
5735         (*)     ${PATH_SEPARATOR:=':'}  ;;
5736         esac
5737
5738         echo "$as_me:5738: result: $PATH_SEPARATOR" >&5
5739 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5740
5741 ###############################################################################
5742
5743 echo "$as_me:5743: checking if you want to build a separate terminfo library" >&5
5744 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5745
5746 # Check whether --with-termlib or --without-termlib was given.
5747 if test "${with_termlib+set}" = set; then
5748   withval="$with_termlib"
5749   with_termlib=$withval
5750 else
5751   with_termlib=no
5752 fi;
5753 echo "$as_me:5753: result: $with_termlib" >&5
5754 echo "${ECHO_T}$with_termlib" >&6
5755
5756 echo "$as_me:5756: checking if you want to build a separate tic library" >&5
5757 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5758
5759 # Check whether --with-ticlib or --without-ticlib was given.
5760 if test "${with_ticlib+set}" = set; then
5761   withval="$with_ticlib"
5762   with_ticlib=$withval
5763 else
5764   with_ticlib=no
5765 fi;
5766 echo "$as_me:5766: result: $with_ticlib" >&5
5767 echo "${ECHO_T}$with_ticlib" >&6
5768
5769 if test X"$CC_G_OPT" = X"" ; then
5770         CC_G_OPT='-g'
5771         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5772 fi
5773
5774 if test X"$CXX_G_OPT" = X"" ; then
5775         CXX_G_OPT='-g'
5776         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5777 fi
5778
5779 echo "$as_me:5779: checking for default loader flags" >&5
5780 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5781 case "$DFT_LWR_MODEL" in
5782 (libtool) LD_MODEL=''   ;;
5783 (normal)  LD_MODEL=''   ;;
5784 (debug)   LD_MODEL=$CC_G_OPT ;;
5785 (profile) LD_MODEL='-pg';;
5786 (shared)  LD_MODEL=''   ;;
5787 esac
5788 echo "$as_me:5788: result: $LD_MODEL" >&5
5789 echo "${ECHO_T}$LD_MODEL" >&6
5790
5791 case "$DFT_LWR_MODEL" in
5792 (shared)
5793
5794 echo "$as_me:5794: checking if rpath option should be used" >&5
5795 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5796
5797 # Check whether --enable-rpath or --disable-rpath was given.
5798 if test "${enable_rpath+set}" = set; then
5799   enableval="$enable_rpath"
5800   cf_cv_enable_rpath=$enableval
5801 else
5802   cf_cv_enable_rpath=no
5803 fi;
5804 echo "$as_me:5804: result: $cf_cv_enable_rpath" >&5
5805 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5806
5807 echo "$as_me:5807: checking if shared libraries should be relinked during install" >&5
5808 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5809
5810 # Check whether --enable-relink or --disable-relink was given.
5811 if test "${enable_relink+set}" = set; then
5812   enableval="$enable_relink"
5813   cf_cv_do_relink=$enableval
5814 else
5815   cf_cv_do_relink=yes
5816 fi;
5817 echo "$as_me:5817: result: $cf_cv_do_relink" >&5
5818 echo "${ECHO_T}$cf_cv_do_relink" >&6
5819         ;;
5820 esac
5821
5822 # we will build libraries one-level down.
5823 rel_builddir=..
5824
5825 LD_RPATH_OPT=
5826 if test "x$cf_cv_enable_rpath" != xno
5827 then
5828         echo "$as_me:5828: checking for an rpath option" >&5
5829 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5830         case "$cf_cv_system_name" in
5831         (irix*)
5832                 if test "$GCC" = yes; then
5833                         LD_RPATH_OPT="-Wl,-rpath,"
5834                 else
5835                         LD_RPATH_OPT="-rpath "
5836                 fi
5837                 ;;
5838         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5839                 LD_RPATH_OPT="-Wl,-rpath,"
5840                 ;;
5841         (openbsd[2-9].*|mirbsd*)
5842                 LD_RPATH_OPT="-Wl,-rpath,"
5843                 ;;
5844         (dragonfly*)
5845                 LD_RPATH_OPT="-rpath "
5846                 ;;
5847         (netbsd*)
5848                 LD_RPATH_OPT="-Wl,-rpath,"
5849                 ;;
5850         (osf*|mls+*)
5851                 LD_RPATH_OPT="-rpath "
5852                 ;;
5853         (solaris2*)
5854                 LD_RPATH_OPT="-R"
5855                 ;;
5856         (*)
5857                 ;;
5858         esac
5859         echo "$as_me:5859: result: $LD_RPATH_OPT" >&5
5860 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5861
5862         case "x$LD_RPATH_OPT" in
5863         (x-R*)
5864                 echo "$as_me:5864: checking if we need a space after rpath option" >&5
5865 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5866                 cf_save_LIBS="$LIBS"
5867
5868 cf_add_libs="$LIBS"
5869 # reverse order
5870 cf_add_0lib=
5871 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5872 # filter duplicates
5873 for cf_add_1lib in $cf_add_0lib; do
5874         for cf_add_2lib in $cf_add_libs; do
5875                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5876                         cf_add_1lib=
5877                         break
5878                 fi
5879         done
5880         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5881 done
5882 LIBS="$cf_add_libs"
5883
5884                 cat >"conftest.$ac_ext" <<_ACEOF
5885 #line 5885 "configure"
5886 #include "confdefs.h"
5887
5888 int
5889 main (void)
5890 {
5891
5892   ;
5893   return 0;
5894 }
5895 _ACEOF
5896 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5897 if { (eval echo "$as_me:5897: \"$ac_link\"") >&5
5898   (eval $ac_link) 2>&5
5899   ac_status=$?
5900   echo "$as_me:5900: \$? = $ac_status" >&5
5901   (exit "$ac_status"); } &&
5902          { ac_try='test -s "conftest$ac_exeext"'
5903   { (eval echo "$as_me:5903: \"$ac_try\"") >&5
5904   (eval $ac_try) 2>&5
5905   ac_status=$?
5906   echo "$as_me:5906: \$? = $ac_status" >&5
5907   (exit "$ac_status"); }; }; then
5908   cf_rpath_space=no
5909 else
5910   echo "$as_me: failed program was:" >&5
5911 cat "conftest.$ac_ext" >&5
5912 cf_rpath_space=yes
5913 fi
5914 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5915                 LIBS="$cf_save_LIBS"
5916                 echo "$as_me:5916: result: $cf_rpath_space" >&5
5917 echo "${ECHO_T}$cf_rpath_space" >&6
5918                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5919                 ;;
5920         esac
5921 fi
5922
5923         RM_SHARED_OPTS=
5924         LOCAL_LDFLAGS=
5925         LOCAL_LDFLAGS2=
5926         LD_SHARED_OPTS=
5927         INSTALL_LIB="-m 644"
5928         : ${rel_builddir:=.}
5929
5930         shlibdir=$libdir
5931
5932         MAKE_DLLS="#"
5933
5934         cf_cv_do_symlinks=no
5935         cf_ld_rpath_opt=
5936         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5937
5938         echo "$as_me:5938: checking if release/abi version should be used for shared libs" >&5
5939 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5940
5941 # Check whether --with-shlib-version or --without-shlib-version was given.
5942 if test "${with_shlib_version+set}" = set; then
5943   withval="$with_shlib_version"
5944   test -z "$withval" && withval=auto
5945         case "$withval" in
5946         (yes)
5947                 cf_cv_shlib_version=auto
5948                 ;;
5949         (rel|abi|auto)
5950                 cf_cv_shlib_version=$withval
5951                 ;;
5952         (*)
5953                 echo "$as_me:5953: result: $withval" >&5
5954 echo "${ECHO_T}$withval" >&6
5955                 { { echo "$as_me:5955: error: option value must be one of: rel, abi, or auto" >&5
5956 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5957    { (exit 1); exit 1; }; }
5958                 ;;
5959         esac
5960
5961 else
5962   cf_cv_shlib_version=auto
5963 fi;
5964         echo "$as_me:5964: result: $cf_cv_shlib_version" >&5
5965 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5966
5967         cf_cv_rm_so_locs=no
5968         cf_try_cflags=
5969
5970         # Some less-capable ports of gcc support only -fpic
5971         CC_SHARED_OPTS=
5972
5973         cf_try_fPIC=no
5974         if test "$GCC" = yes
5975         then
5976                 cf_try_fPIC=yes
5977         else
5978                 case "$cf_cv_system_name" in
5979                 (*linux*)       # e.g., PGI compiler
5980                         cf_try_fPIC=yes
5981                         ;;
5982                 esac
5983         fi
5984
5985         if test "$cf_try_fPIC" = yes
5986         then
5987                 echo "$as_me:5987: checking which $CC option to use" >&5
5988 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5989                 cf_save_CFLAGS="$CFLAGS"
5990                 for CC_SHARED_OPTS in -fPIC -fpic ''
5991                 do
5992                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5993                         cat >"conftest.$ac_ext" <<_ACEOF
5994 #line 5994 "configure"
5995 #include "confdefs.h"
5996 #include <stdio.h>
5997 int
5998 main (void)
5999 {
6000 int x = 1
6001   ;
6002   return 0;
6003 }
6004 _ACEOF
6005 rm -f "conftest.$ac_objext"
6006 if { (eval echo "$as_me:6006: \"$ac_compile\"") >&5
6007   (eval $ac_compile) 2>&5
6008   ac_status=$?
6009   echo "$as_me:6009: \$? = $ac_status" >&5
6010   (exit "$ac_status"); } &&
6011          { ac_try='test -s "conftest.$ac_objext"'
6012   { (eval echo "$as_me:6012: \"$ac_try\"") >&5
6013   (eval $ac_try) 2>&5
6014   ac_status=$?
6015   echo "$as_me:6015: \$? = $ac_status" >&5
6016   (exit "$ac_status"); }; }; then
6017   break
6018 else
6019   echo "$as_me: failed program was:" >&5
6020 cat "conftest.$ac_ext" >&5
6021 fi
6022 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6023                 done
6024                 echo "$as_me:6024: result: $CC_SHARED_OPTS" >&5
6025 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6026                 CFLAGS="$cf_save_CFLAGS"
6027         fi
6028
6029         cf_cv_shlib_version_infix=no
6030
6031         case "$cf_cv_system_name" in
6032         (aix4.3-9*|aix[5-7]*)
6033                 if test "$GCC" = yes; then
6034                         CC_SHARED_OPTS='-Wl,-brtl'
6035                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6036                 else
6037                         CC_SHARED_OPTS='-brtl'
6038                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6039                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6040                 fi
6041                 ;;
6042         (beos*)
6043                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6044                 ;;
6045         (cygwin*)
6046                 CC_SHARED_OPTS=
6047                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6048                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6049                 cf_cv_shlib_version=cygdll
6050                 cf_cv_shlib_version_infix=cygdll
6051                 shlibdir=$bindir
6052                 MAKE_DLLS=
6053                 cat >mk_shared_lib.sh <<-CF_EOF
6054                 #!$SHELL
6055                 SHARED_LIB=\$1
6056                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6057                 shift
6058                 cat <<-EOF
6059                 Linking shared library
6060                 ** SHARED_LIB \$SHARED_LIB
6061                 ** IMPORT_LIB \$IMPORT_LIB
6062 EOF
6063                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6064 CF_EOF
6065                 chmod +x mk_shared_lib.sh
6066                 ;;
6067         (msys*)
6068                 CC_SHARED_OPTS=
6069                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6070                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6071                 cf_cv_shlib_version=msysdll
6072                 cf_cv_shlib_version_infix=msysdll
6073                 shlibdir=$bindir
6074                 MAKE_DLLS=
6075                 cat >mk_shared_lib.sh <<-CF_EOF
6076                 #!$SHELL
6077                 SHARED_LIB=\$1
6078                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6079                 shift
6080                 cat <<-EOF
6081                 Linking shared library
6082                 ** SHARED_LIB \$SHARED_LIB
6083                 ** IMPORT_LIB \$IMPORT_LIB
6084 EOF
6085                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6086 CF_EOF
6087                 chmod +x mk_shared_lib.sh
6088                 ;;
6089         (darwin*)
6090                 cf_try_cflags="no-cpp-precomp"
6091                 CC_SHARED_OPTS="-dynamic"
6092                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6093                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6094                 cf_cv_shlib_version_infix=yes
6095                 echo "$as_me:6095: checking if ld -search_paths_first works" >&5
6096 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6097 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6098   echo $ECHO_N "(cached) $ECHO_C" >&6
6099 else
6100
6101                         cf_save_LDFLAGS=$LDFLAGS
6102                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6103                         cat >"conftest.$ac_ext" <<_ACEOF
6104 #line 6104 "configure"
6105 #include "confdefs.h"
6106
6107 int
6108 main (void)
6109 {
6110 int i;
6111   ;
6112   return 0;
6113 }
6114 _ACEOF
6115 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6116 if { (eval echo "$as_me:6116: \"$ac_link\"") >&5
6117   (eval $ac_link) 2>&5
6118   ac_status=$?
6119   echo "$as_me:6119: \$? = $ac_status" >&5
6120   (exit "$ac_status"); } &&
6121          { ac_try='test -s "conftest$ac_exeext"'
6122   { (eval echo "$as_me:6122: \"$ac_try\"") >&5
6123   (eval $ac_try) 2>&5
6124   ac_status=$?
6125   echo "$as_me:6125: \$? = $ac_status" >&5
6126   (exit "$ac_status"); }; }; then
6127   cf_cv_ldflags_search_paths_first=yes
6128 else
6129   echo "$as_me: failed program was:" >&5
6130 cat "conftest.$ac_ext" >&5
6131 cf_cv_ldflags_search_paths_first=no
6132 fi
6133 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6134                                 LDFLAGS=$cf_save_LDFLAGS
6135 fi
6136 echo "$as_me:6136: result: $cf_cv_ldflags_search_paths_first" >&5
6137 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6138                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6139                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6140                 fi
6141                 ;;
6142         (hpux[7-8]*)
6143                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6144                 if test "$GCC" != yes; then
6145                         CC_SHARED_OPTS='+Z'
6146                 fi
6147                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6148                 INSTALL_LIB="-m 555"
6149                 ;;
6150         (hpux*)
6151                 # (tested with gcc 2.7.2 -- I don't have c89)
6152                 if test "$GCC" = yes; then
6153                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6154                 else
6155                         CC_SHARED_OPTS='+Z'
6156                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6157                 fi
6158                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6159                 # HP-UX shared libraries must be executable, and should be
6160                 # readonly to exploit a quirk in the memory manager.
6161                 INSTALL_LIB="-m 555"
6162                 ;;
6163         (interix*)
6164                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6165                 if test "$cf_cv_shlib_version" = rel; then
6166                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6167                 else
6168                         cf_shared_soname='`basename $@`'
6169                 fi
6170                 CC_SHARED_OPTS=
6171                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6172                 ;;
6173         (irix*)
6174                 if test "$cf_cv_enable_rpath" = yes ; then
6175                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6176                 fi
6177                 # tested with IRIX 5.2 and 'cc'.
6178                 if test "$GCC" != yes; then
6179                         CC_SHARED_OPTS='-KPIC'
6180                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6181                 else
6182                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6183                 fi
6184                 cf_cv_rm_so_locs=yes
6185                 ;;
6186         (linux*|gnu*|k*bsd*-gnu)
6187                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6188                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6189                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6190                 fi
6191                 if test "$cf_cv_enable_rpath" = yes ; then
6192                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6193                 fi
6194
6195         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6196         if test "$cf_cv_shlib_version" = rel; then
6197                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6198         else
6199                 cf_cv_shared_soname='`basename $@`'
6200         fi
6201
6202                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6203                 ;;
6204         (mingw*msvc*)
6205                 cf_cv_shlib_version=msvcdll
6206                 cf_cv_shlib_version_infix=msvcdll
6207                 shlibdir=$bindir
6208                 MAKE_DLLS=
6209                 if test "$DFT_LWR_MODEL" = "shared" ; then
6210                         LOCAL_LDFLAGS="-link -dll"
6211                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6212                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6213                 fi
6214                 CC_SHARED_OPTS=
6215                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6216                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6217                 cat >mk_shared_lib.sh <<-CF_EOF
6218                 #!$SHELL
6219                 SHARED_LIB=\$1
6220                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6221                 shift
6222                 my_ld=\$1
6223                 shift
6224                 cat <<-EOF
6225                 Linking shared library
6226                 ** SHARED LIB \$SHARED_LIB
6227                 ** IMPORT_LIB \$IMPORT_LIB
6228 EOF
6229                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6230                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6231                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6232 CF_EOF
6233                 chmod +x mk_shared_lib.sh
6234                 cat >mk_prog.sh <<-CF_EOF
6235                 #!$SHELL
6236                 shift
6237                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6238                 LD="$LD"
6239                 clopts=()
6240                 ldopts=("/subsystem:console")
6241                 libs=()
6242                 isdll=0
6243                 while test \$# -gt 0; do
6244                         case "\$1" in
6245                                 -link)
6246                                         # ignore -link argument
6247                                         ;;
6248                                 -M[TD] | -M[TD]d)
6249                                         # ignore runtime-library option
6250                                         ;;
6251                                 -dll)
6252                                         isdll=1
6253                                         ;;
6254                                 -W* | -w*)
6255                                         # ignore warnings
6256                                         ;;
6257                                 -D*)
6258                                         clopts+=("\$1")
6259                                         ;;
6260                                 -I*)
6261                                         clopts+=("\$1")
6262                                         ;;
6263                                 -l*)
6264                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6265                                         ;;
6266                                 -L*)
6267                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6268                                         ;;
6269                                 *.obj | *.o)
6270                                         ldopts+=("\$1")
6271                                         ;;
6272                                 -Wl,*)
6273                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6274                                                 ldopts+=("\${linkarg}")
6275                                         done
6276                                         ;;
6277                                 *.lib)
6278                                         ldopts+=("\$1")
6279                                         ;;
6280                                 -o)
6281                                         shift
6282                                         ldopts+=("-out:\$1")
6283                                         ;;
6284                                 *)
6285                                         clopts+=("\$1")
6286                                         ldopts+=("\$1")
6287                                         ;;
6288                         esac
6289                         shift
6290                 done
6291                 if [ "\$isdll" -ne 0 ]; then
6292                         for lib in \${libs[*]}; do
6293                                 ldopts+=("\$lib.dll.lib")
6294                         done
6295                 else
6296                         for lib in \${libs[*]}; do
6297                                 ldopts+=("\$lib.lib")
6298                         done
6299                 fi
6300                 cat <<-EOF
6301                 Creating program
6302                 ** ld options:   "\${ldopts[@]}"
6303 EOF
6304                 exec \$LD \${ldopts[@]}
6305 CF_EOF
6306                 chmod +x mk_prog.sh
6307                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6308                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6309                 ;;
6310         (mingw*)
6311                 cf_cv_shlib_version=mingw
6312                 cf_cv_shlib_version_infix=mingw
6313                 shlibdir=$bindir
6314                 MAKE_DLLS=
6315                 if test "$DFT_LWR_MODEL" = "shared" ; then
6316                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6317                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6318                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6319                 fi
6320                 CC_SHARED_OPTS=
6321                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6322                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6323                 cat >mk_shared_lib.sh <<-CF_EOF
6324                 #!$SHELL
6325                 SHARED_LIB=\$1
6326                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6327                 shift
6328                 cat <<-EOF
6329                 Linking shared library
6330                 ** SHARED_LIB \$SHARED_LIB
6331                 ** IMPORT_LIB \$IMPORT_LIB
6332 EOF
6333                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6334 CF_EOF
6335                 chmod +x mk_shared_lib.sh
6336                 ;;
6337         (openbsd[2-9].*|mirbsd*)
6338                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6339                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6340                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6341                 fi
6342                 if test "$cf_cv_enable_rpath" = yes ; then
6343                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6344                 fi
6345                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6346
6347         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6348         if test "$cf_cv_shlib_version" = rel; then
6349                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6350         else
6351                 cf_cv_shared_soname='`basename $@`'
6352         fi
6353
6354                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6355                 ;;
6356         (nskJ*)
6357                 CC_SHARED_OPTS=
6358                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6359                 ;;
6360         (nskL*)
6361                 CC_SHARED_OPTS=
6362                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6363                 ;;
6364         (nto-qnx*|openbsd*|freebsd[12].*)
6365                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6366                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6367                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6368                 ;;
6369         (dragonfly*|freebsd*)
6370                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6371                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6372                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6373                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6374                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6375                 fi
6376
6377         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6378         if test "$cf_cv_shlib_version" = rel; then
6379                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6380         else
6381                 cf_cv_shared_soname='`basename $@`'
6382         fi
6383
6384                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6385                 ;;
6386         (netbsd*)
6387                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6388                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6389                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6390                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6391                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6392                         if test "$cf_cv_shlib_version" = auto; then
6393                         if test -f /usr/libexec/ld.elf_so; then
6394                                 cf_cv_shlib_version=abi
6395                         else
6396                                 cf_cv_shlib_version=rel
6397                         fi
6398                         fi
6399
6400         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6401         if test "$cf_cv_shlib_version" = rel; then
6402                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6403         else
6404                 cf_cv_shared_soname='`basename $@`'
6405         fi
6406
6407                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6408                 else
6409                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
6410                 fi
6411                 ;;
6412         (osf*|mls+*)
6413                 # tested with OSF/1 V3.2 and 'cc'
6414                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6415                 # link with shared libs).
6416                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6417                 case "$host_os" in
6418                 (osf4*)
6419                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6420                         ;;
6421                 esac
6422                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6423                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6424                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6425                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6426                 fi
6427                 cf_cv_rm_so_locs=yes
6428                 ;;
6429         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6430                 # tested with osr5.0.5
6431                 if test "$GCC" != yes; then
6432                         CC_SHARED_OPTS='-belf -KPIC'
6433                 fi
6434                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6435                 if test "$cf_cv_enable_rpath" = yes ; then
6436                         # only way is to set LD_RUN_PATH but no switch for it
6437                         RUN_PATH=$libdir
6438                 fi
6439                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6440                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6441                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6442                 ;;
6443         (sunos4*)
6444                 # tested with SunOS 4.1.1 and gcc 2.7.0
6445                 if test "$GCC" != yes; then
6446                         CC_SHARED_OPTS='-KPIC'
6447                 fi
6448                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6449                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6450                 ;;
6451         (solaris2*)
6452                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6453                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6454                 if test "$DFT_LWR_MODEL" = "shared" ; then
6455                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6456                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6457                 fi
6458                 if test "$cf_cv_enable_rpath" = yes ; then
6459                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6460                 fi
6461
6462         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6463         if test "$cf_cv_shlib_version" = rel; then
6464                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6465         else
6466                 cf_cv_shared_soname='`basename $@`'
6467         fi
6468
6469                 if test "$GCC" != yes; then
6470                         cf_save_CFLAGS="$CFLAGS"
6471                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6472                         do
6473                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6474                                 cat >"conftest.$ac_ext" <<_ACEOF
6475 #line 6475 "configure"
6476 #include "confdefs.h"
6477 #include <stdio.h>
6478 int
6479 main (void)
6480 {
6481 printf("Hello\\n");
6482   ;
6483   return 0;
6484 }
6485 _ACEOF
6486 rm -f "conftest.$ac_objext"
6487 if { (eval echo "$as_me:6487: \"$ac_compile\"") >&5
6488   (eval $ac_compile) 2>&5
6489   ac_status=$?
6490   echo "$as_me:6490: \$? = $ac_status" >&5
6491   (exit "$ac_status"); } &&
6492          { ac_try='test -s "conftest.$ac_objext"'
6493   { (eval echo "$as_me:6493: \"$ac_try\"") >&5
6494   (eval $ac_try) 2>&5
6495   ac_status=$?
6496   echo "$as_me:6496: \$? = $ac_status" >&5
6497   (exit "$ac_status"); }; }; then
6498   break
6499 else
6500   echo "$as_me: failed program was:" >&5
6501 cat "conftest.$ac_ext" >&5
6502 fi
6503 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6504                         done
6505                         CFLAGS="$cf_save_CFLAGS"
6506                         CC_SHARED_OPTS=$cf_shared_opts
6507                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6508                 else
6509                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6510                 fi
6511                 ;;
6512         (sysv5uw7*|unix_sv*)
6513                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6514                 if test "$GCC" != yes; then
6515                         CC_SHARED_OPTS='-KPIC'
6516                 fi
6517                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6518                 ;;
6519         (*)
6520                 CC_SHARED_OPTS='unknown'
6521                 MK_SHARED_LIB='echo unknown'
6522                 ;;
6523         esac
6524
6525         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6526         case "$cf_cv_shlib_version" in
6527         (rel|abi)
6528                 case "$MK_SHARED_LIB" in
6529                 (*'-o $@')
6530                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6531                         ;;
6532                 (*)
6533                         { echo "$as_me:6533: WARNING: ignored --with-shlib-version" >&5
6534 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6535                         ;;
6536                 esac
6537                 ;;
6538         esac
6539
6540         if test -n "$cf_try_cflags"
6541         then
6542 cat > conftest.$ac_ext <<EOF
6543 #line 6543 "${as_me:-configure}"
6544 #include <stdio.h>
6545 int main(int argc, char *argv[])
6546 {
6547         printf("hello\\n");
6548         return (argv[argc-1] == 0) ;
6549 }
6550 EOF
6551                 cf_save_CFLAGS="$CFLAGS"
6552                 for cf_opt in $cf_try_cflags
6553                 do
6554                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6555                         echo "$as_me:6555: checking if CFLAGS option -$cf_opt works" >&5
6556 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6557                         if { (eval echo "$as_me:6557: \"$ac_compile\"") >&5
6558   (eval $ac_compile) 2>&5
6559   ac_status=$?
6560   echo "$as_me:6560: \$? = $ac_status" >&5
6561   (exit "$ac_status"); }; then
6562                                 echo "$as_me:6562: result: yes" >&5
6563 echo "${ECHO_T}yes" >&6
6564                                 cf_save_CFLAGS="$CFLAGS"
6565                         else
6566                                 echo "$as_me:6566: result: no" >&5
6567 echo "${ECHO_T}no" >&6
6568                         fi
6569                 done
6570                 CFLAGS="$cf_save_CFLAGS"
6571         fi
6572
6573         # RPATH_LIST is a colon-separated list of directories
6574         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6575         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6576
6577         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6578
6579         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6580
6581 echo "${as_me:-configure}:6581: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6582
6583         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6584
6585 echo "${as_me:-configure}:6585: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6586
6587 for model in $cf_list_models ; do
6588         case "$model" in
6589         (libtool)
6590
6591 echo "$as_me:6591: checking for additional libtool options" >&5
6592 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6593
6594 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6595 if test "${with_libtool_opts+set}" = set; then
6596   withval="$with_libtool_opts"
6597   with_libtool_opts=$withval
6598 else
6599   with_libtool_opts=no
6600 fi;
6601 echo "$as_me:6601: result: $with_libtool_opts" >&5
6602 echo "${ECHO_T}$with_libtool_opts" >&6
6603
6604 case .$with_libtool_opts in
6605 (.yes|.no|.)
6606         ;;
6607 (*)
6608         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6609         ;;
6610 esac
6611
6612 echo "$as_me:6612: checking if exported-symbols file should be used" >&5
6613 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6614
6615 # Check whether --with-export-syms or --without-export-syms was given.
6616 if test "${with_export_syms+set}" = set; then
6617   withval="$with_export_syms"
6618   with_export_syms=$withval
6619 else
6620   with_export_syms=no
6621 fi;
6622 if test "x$with_export_syms" = xyes
6623 then
6624         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6625
6626 fi
6627 echo "$as_me:6627: result: $with_export_syms" >&5
6628 echo "${ECHO_T}$with_export_syms" >&6
6629 if test "x$with_export_syms" != xno
6630 then
6631         EXPORT_SYMS="-export-symbols $with_export_syms"
6632
6633 fi
6634
6635                 ;;
6636         (shared)
6637                 if test "$CC_SHARED_OPTS" = "unknown"; then
6638                         { { echo "$as_me:6638: error: Shared libraries are not supported in this version" >&5
6639 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6640    { (exit 1); exit 1; }; }
6641                 fi
6642                 # workaround for inept transition to PIE vs PIC...
6643                 echo "$as_me:6643: checking if current CFLAGS link properly" >&5
6644 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6645                 cat >"conftest.$ac_ext" <<_ACEOF
6646 #line 6646 "configure"
6647 #include "confdefs.h"
6648 #include <stdio.h>
6649 int
6650 main (void)
6651 {
6652 printf("Hello work\\n");
6653   ;
6654   return 0;
6655 }
6656 _ACEOF
6657 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6658 if { (eval echo "$as_me:6658: \"$ac_link\"") >&5
6659   (eval $ac_link) 2>&5
6660   ac_status=$?
6661   echo "$as_me:6661: \$? = $ac_status" >&5
6662   (exit "$ac_status"); } &&
6663          { ac_try='test -s "conftest$ac_exeext"'
6664   { (eval echo "$as_me:6664: \"$ac_try\"") >&5
6665   (eval $ac_try) 2>&5
6666   ac_status=$?
6667   echo "$as_me:6667: \$? = $ac_status" >&5
6668   (exit "$ac_status"); }; }; then
6669   cf_cflags_work=yes
6670 else
6671   echo "$as_me: failed program was:" >&5
6672 cat "conftest.$ac_ext" >&5
6673 cf_cflags_work=no
6674 fi
6675 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6676                 echo "$as_me:6676: result: $cf_cflags_work" >&5
6677 echo "${ECHO_T}$cf_cflags_work" >&6
6678                 if test "$cf_cflags_work" = no
6679                 then
6680                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6681
6682 echo "${as_me:-configure}:6682: testing try to work around by appending shared-options ..." 1>&5
6683
6684                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6685                 fi
6686
6687 echo "$as_me:6687: checking if versioned-symbols file should be used" >&5
6688 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6689
6690 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6691 if test "${with_versioned_syms+set}" = set; then
6692   withval="$with_versioned_syms"
6693   with_versioned_syms=$withval
6694 else
6695   with_versioned_syms=no
6696 fi;
6697 case "x$with_versioned_syms" in
6698 (xyes)
6699         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6700
6701         ;;
6702 (xno)
6703         ;;
6704 (x/*)
6705         test -f "$with_versioned_syms" || { { echo "$as_me:6705: error: expected a filename: $with_versioned_syms" >&5
6706 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6707    { (exit 1); exit 1; }; }
6708         ;;
6709 (*)
6710         test -f "$with_versioned_syms" || { { echo "$as_me:6710: error: expected a filename: $with_versioned_syms" >&5
6711 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6712    { (exit 1); exit 1; }; }
6713         with_versioned_syms=`pwd`/"$with_versioned_syms"
6714         ;;
6715 esac
6716 echo "$as_me:6716: result: $with_versioned_syms" >&5
6717 echo "${ECHO_T}$with_versioned_syms" >&6
6718
6719 RESULTING_SYMS=
6720 VERSIONED_SYMS=
6721 WILDCARD_SYMS=
6722
6723 if test "x$with_versioned_syms" != xno
6724 then
6725         RESULTING_SYMS=$with_versioned_syms
6726         case "x$MK_SHARED_LIB" in
6727         (*-Wl,*)
6728                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6729                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6730                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6731
6732 echo "${as_me:-configure}:6732: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6733
6734                 ;;
6735         (*-dy\ *)
6736                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6737                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6738                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6739
6740 echo "${as_me:-configure}:6740: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6741
6742                 ;;
6743         (*)
6744                 { echo "$as_me:6744: WARNING: this system does not support versioned-symbols" >&5
6745 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6746                 ;;
6747         esac
6748
6749         # Linux ld can selectively override scope, e.g., of symbols beginning with
6750         # "_" by first declaring some as global, and then using a wildcard to
6751         # declare the others as local.  Some other loaders cannot do this.  Check
6752         # by constructing a (very) simple shared library and inspecting its
6753         # symbols.
6754         if test "x$VERSIONED_SYMS" != "x"
6755         then
6756                 echo "$as_me:6756: checking if wildcards can be used to selectively omit symbols" >&5
6757 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6758                 WILDCARD_SYMS=no
6759
6760                 # make sources
6761                 rm -f conftest.*
6762
6763                 cat >conftest.ver <<EOF
6764 module_1.0 {
6765 global:
6766         globalf1;
6767 local:
6768         localf1;
6769 };
6770 module_2.0 {
6771 global:
6772         globalf2;
6773 local:
6774         localf2;
6775         _*;
6776 } module_1.0;
6777 submodule_1.0 {
6778 global:
6779         subglobalf1;
6780         _ismissing;
6781 local:
6782         sublocalf1;
6783 };
6784 submodule_2.0 {
6785 global:
6786         subglobalf2;
6787 local:
6788         sublocalf2;
6789         _*;
6790 } submodule_1.0;
6791 EOF
6792                 cat >conftest.$ac_ext <<EOF
6793 #line 6793 "configure"
6794 int     _ismissing(void) { return 1; }
6795 int     _localf1(void) { return 1; }
6796 int     _localf2(void) { return 2; }
6797 int     globalf1(void) { return 1; }
6798 int     globalf2(void) { return 2; }
6799 int     _sublocalf1(void) { return 1; }
6800 int     _sublocalf2(void) { return 2; }
6801 int     subglobalf1(void) { return 1; }
6802 int     subglobalf2(void) { return 2; }
6803 EOF
6804                 cat >conftest.mk <<EOF
6805 CC=${CC}
6806 CFLAGS=${CFLAGS}
6807 CPPFLAGS=${CPPFLAGS}
6808 LDFLAGS=${LDFLAGS}
6809 LIBS=${LIBS}
6810 VERSIONED_SYMS=${VERSIONED_SYMS}
6811 RESULTING_SYMS=conftest.ver
6812 MK_SHARED_LIB=${MK_SHARED_LIB}
6813 conftest.so: conftest.$ac_cv_objext
6814                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6815 EOF
6816
6817                 # compile source, make library
6818                 if make -f conftest.mk 2>&5 >/dev/null
6819                 then
6820                         # test for missing symbol in either Data or Text section
6821                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
6822                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6823                 fi
6824                 echo "$as_me:6824: result: $WILDCARD_SYMS" >&5
6825 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6826                 rm -f conftest.*
6827         fi
6828 fi
6829
6830                 ;;
6831         esac
6832 done
6833
6834 ### Checks for special libraries, must be done up-front.
6835 SHLIB_LIST=""
6836
6837 echo "$as_me:6837: checking if you want to link with the GPM mouse library" >&5
6838 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6839
6840 # Check whether --with-gpm or --without-gpm was given.
6841 if test "${with_gpm+set}" = set; then
6842   withval="$with_gpm"
6843   with_gpm=$withval
6844 else
6845   with_gpm=maybe
6846 fi;
6847 echo "$as_me:6847: result: $with_gpm" >&5
6848 echo "${ECHO_T}$with_gpm" >&6
6849
6850 if test "$with_gpm" != no ; then
6851         echo "$as_me:6851: checking for gpm.h" >&5
6852 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6853 if test "${ac_cv_header_gpm_h+set}" = set; then
6854   echo $ECHO_N "(cached) $ECHO_C" >&6
6855 else
6856   cat >"conftest.$ac_ext" <<_ACEOF
6857 #line 6857 "configure"
6858 #include "confdefs.h"
6859 #include <gpm.h>
6860 _ACEOF
6861 if { (eval echo "$as_me:6861: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6862   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6863   ac_status=$?
6864   $EGREP -v '^ *\+' conftest.er1 >conftest.err
6865   rm -f conftest.er1
6866   cat conftest.err >&5
6867   echo "$as_me:6867: \$? = $ac_status" >&5
6868   (exit "$ac_status"); } >/dev/null; then
6869   if test -s conftest.err; then
6870     ac_cpp_err=$ac_c_preproc_warn_flag
6871   else
6872     ac_cpp_err=
6873   fi
6874 else
6875   ac_cpp_err=yes
6876 fi
6877 if test -z "$ac_cpp_err"; then
6878   ac_cv_header_gpm_h=yes
6879 else
6880   echo "$as_me: failed program was:" >&5
6881   cat "conftest.$ac_ext" >&5
6882   ac_cv_header_gpm_h=no
6883 fi
6884 rm -f conftest.err "conftest.$ac_ext"
6885 fi
6886 echo "$as_me:6886: result: $ac_cv_header_gpm_h" >&5
6887 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6888 if test "$ac_cv_header_gpm_h" = yes; then
6889
6890 cat >>confdefs.h <<\EOF
6891 #define HAVE_GPM_H 1
6892 EOF
6893
6894                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6895                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6896
6897 echo "${as_me:-configure}:6897: testing assuming we really have GPM library ..." 1>&5
6898
6899 cat >>confdefs.h <<\EOF
6900 #define HAVE_LIBGPM 1
6901 EOF
6902
6903                         with_gpm=yes
6904                 else
6905                         echo "$as_me:6905: checking for Gpm_Open in -lgpm" >&5
6906 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6907 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6908   echo $ECHO_N "(cached) $ECHO_C" >&6
6909 else
6910   ac_check_lib_save_LIBS=$LIBS
6911 LIBS="-lgpm  $LIBS"
6912 cat >"conftest.$ac_ext" <<_ACEOF
6913 #line 6913 "configure"
6914 #include "confdefs.h"
6915
6916 /* Override any gcc2 internal prototype to avoid an error.  */
6917 #ifdef __cplusplus
6918 extern "C"
6919 #endif
6920 /* We use char because int might match the return type of a gcc2
6921    builtin and then its argument prototype would still apply.  */
6922 char Gpm_Open ();
6923 int
6924 main (void)
6925 {
6926 Gpm_Open ();
6927   ;
6928   return 0;
6929 }
6930 _ACEOF
6931 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6932 if { (eval echo "$as_me:6932: \"$ac_link\"") >&5
6933   (eval $ac_link) 2>&5
6934   ac_status=$?
6935   echo "$as_me:6935: \$? = $ac_status" >&5
6936   (exit "$ac_status"); } &&
6937          { ac_try='test -s "conftest$ac_exeext"'
6938   { (eval echo "$as_me:6938: \"$ac_try\"") >&5
6939   (eval $ac_try) 2>&5
6940   ac_status=$?
6941   echo "$as_me:6941: \$? = $ac_status" >&5
6942   (exit "$ac_status"); }; }; then
6943   ac_cv_lib_gpm_Gpm_Open=yes
6944 else
6945   echo "$as_me: failed program was:" >&5
6946 cat "conftest.$ac_ext" >&5
6947 ac_cv_lib_gpm_Gpm_Open=no
6948 fi
6949 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6950 LIBS=$ac_check_lib_save_LIBS
6951 fi
6952 echo "$as_me:6952: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6953 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6954 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
6955   with_gpm=yes
6956 else
6957
6958                                 if test "$with_gpm" = maybe; then
6959                                         { echo "$as_me:6959: WARNING: Cannot link with GPM library" >&5
6960 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6961                                         with_gpm=no
6962                                 else
6963                                         { { echo "$as_me:6963: error: Cannot link with GPM library" >&5
6964 echo "$as_me: error: Cannot link with GPM library" >&2;}
6965    { (exit 1); exit 1; }; }
6966                                 fi
6967
6968 fi
6969
6970                 fi
6971
6972 else
6973
6974                 test "$with_gpm" != maybe && { echo "$as_me:6974: WARNING: Cannot find GPM header" >&5
6975 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6976                 with_gpm=no
6977
6978 fi
6979
6980 fi
6981
6982 if test "$with_gpm" != no ; then
6983         echo "$as_me:6983: checking if you want to load GPM dynamically" >&5
6984 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6985
6986 # Check whether --with-dlsym or --without-dlsym was given.
6987 if test "${with_dlsym+set}" = set; then
6988   withval="$with_dlsym"
6989   with_dlsym=$withval
6990 else
6991   with_dlsym=yes
6992 fi;
6993         echo "$as_me:6993: result: $with_dlsym" >&5
6994 echo "${ECHO_T}$with_dlsym" >&6
6995         if test "x$with_dlsym" = xyes ; then
6996
6997 cf_have_dlsym=no
6998 echo "$as_me:6998: checking for dlsym" >&5
6999 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7000 if test "${ac_cv_func_dlsym+set}" = set; then
7001   echo $ECHO_N "(cached) $ECHO_C" >&6
7002 else
7003   cat >"conftest.$ac_ext" <<_ACEOF
7004 #line 7004 "configure"
7005 #include "confdefs.h"
7006 #define dlsym autoconf_temporary
7007 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7008 #undef dlsym
7009
7010 #ifdef __cplusplus
7011 extern "C"
7012 #endif
7013
7014 /* We use char because int might match the return type of a gcc2
7015    builtin and then its argument prototype would still apply.  */
7016 char dlsym (void);
7017
7018 int
7019 main (void)
7020 {
7021
7022 /* The GNU C library defines stubs for functions which it implements
7023     to always fail with ENOSYS.  Some functions are actually named
7024     something starting with __ and the normal name is an alias.  */
7025 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7026 #error found stub for dlsym
7027 #endif
7028
7029         return dlsym ();
7030   ;
7031   return 0;
7032 }
7033 _ACEOF
7034 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7035 if { (eval echo "$as_me:7035: \"$ac_link\"") >&5
7036   (eval $ac_link) 2>&5
7037   ac_status=$?
7038   echo "$as_me:7038: \$? = $ac_status" >&5
7039   (exit "$ac_status"); } &&
7040          { ac_try='test -s "conftest$ac_exeext"'
7041   { (eval echo "$as_me:7041: \"$ac_try\"") >&5
7042   (eval $ac_try) 2>&5
7043   ac_status=$?
7044   echo "$as_me:7044: \$? = $ac_status" >&5
7045   (exit "$ac_status"); }; }; then
7046   ac_cv_func_dlsym=yes
7047 else
7048   echo "$as_me: failed program was:" >&5
7049 cat "conftest.$ac_ext" >&5
7050 ac_cv_func_dlsym=no
7051 fi
7052 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7053 fi
7054 echo "$as_me:7054: result: $ac_cv_func_dlsym" >&5
7055 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7056 if test "$ac_cv_func_dlsym" = yes; then
7057   cf_have_dlsym=yes
7058 else
7059
7060 cf_have_libdl=no
7061 echo "$as_me:7061: checking for dlsym in -ldl" >&5
7062 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7063 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7064   echo $ECHO_N "(cached) $ECHO_C" >&6
7065 else
7066   ac_check_lib_save_LIBS=$LIBS
7067 LIBS="-ldl  $LIBS"
7068 cat >"conftest.$ac_ext" <<_ACEOF
7069 #line 7069 "configure"
7070 #include "confdefs.h"
7071
7072 /* Override any gcc2 internal prototype to avoid an error.  */
7073 #ifdef __cplusplus
7074 extern "C"
7075 #endif
7076 /* We use char because int might match the return type of a gcc2
7077    builtin and then its argument prototype would still apply.  */
7078 char dlsym ();
7079 int
7080 main (void)
7081 {
7082 dlsym ();
7083   ;
7084   return 0;
7085 }
7086 _ACEOF
7087 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7088 if { (eval echo "$as_me:7088: \"$ac_link\"") >&5
7089   (eval $ac_link) 2>&5
7090   ac_status=$?
7091   echo "$as_me:7091: \$? = $ac_status" >&5
7092   (exit "$ac_status"); } &&
7093          { ac_try='test -s "conftest$ac_exeext"'
7094   { (eval echo "$as_me:7094: \"$ac_try\"") >&5
7095   (eval $ac_try) 2>&5
7096   ac_status=$?
7097   echo "$as_me:7097: \$? = $ac_status" >&5
7098   (exit "$ac_status"); }; }; then
7099   ac_cv_lib_dl_dlsym=yes
7100 else
7101   echo "$as_me: failed program was:" >&5
7102 cat "conftest.$ac_ext" >&5
7103 ac_cv_lib_dl_dlsym=no
7104 fi
7105 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7106 LIBS=$ac_check_lib_save_LIBS
7107 fi
7108 echo "$as_me:7108: result: $ac_cv_lib_dl_dlsym" >&5
7109 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7110 if test "$ac_cv_lib_dl_dlsym" = yes; then
7111
7112         cf_have_dlsym=yes
7113         cf_have_libdl=yes
7114 fi
7115
7116 fi
7117
7118 if test "$cf_have_dlsym" = yes ; then
7119         test "$cf_have_libdl" = yes && {
7120 cf_add_libs="$LIBS"
7121 # reverse order
7122 cf_add_0lib=
7123 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7124 # filter duplicates
7125 for cf_add_1lib in $cf_add_0lib; do
7126         for cf_add_2lib in $cf_add_libs; do
7127                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7128                         cf_add_1lib=
7129                         break
7130                 fi
7131         done
7132         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7133 done
7134 LIBS="$cf_add_libs"
7135  }
7136
7137         echo "$as_me:7137: checking whether able to link to dl*() functions" >&5
7138 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7139         cat >"conftest.$ac_ext" <<_ACEOF
7140 #line 7140 "configure"
7141 #include "confdefs.h"
7142 #include <dlfcn.h>
7143 int
7144 main (void)
7145 {
7146
7147                 void *obj;
7148                 if ((obj = dlopen("filename", 0)) != 0) {
7149                         if (dlsym(obj, "symbolname") == 0) {
7150                         dlclose(obj);
7151                         }
7152                 }
7153   ;
7154   return 0;
7155 }
7156 _ACEOF
7157 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7158 if { (eval echo "$as_me:7158: \"$ac_link\"") >&5
7159   (eval $ac_link) 2>&5
7160   ac_status=$?
7161   echo "$as_me:7161: \$? = $ac_status" >&5
7162   (exit "$ac_status"); } &&
7163          { ac_try='test -s "conftest$ac_exeext"'
7164   { (eval echo "$as_me:7164: \"$ac_try\"") >&5
7165   (eval $ac_try) 2>&5
7166   ac_status=$?
7167   echo "$as_me:7167: \$? = $ac_status" >&5
7168   (exit "$ac_status"); }; }; then
7169
7170 cat >>confdefs.h <<\EOF
7171 #define HAVE_LIBDL 1
7172 EOF
7173
7174 else
7175   echo "$as_me: failed program was:" >&5
7176 cat "conftest.$ac_ext" >&5
7177
7178                 { { echo "$as_me:7178: error: Cannot link test program for libdl" >&5
7179 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7180    { (exit 1); exit 1; }; }
7181 fi
7182 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7183         echo "$as_me:7183: result: ok" >&5
7184 echo "${ECHO_T}ok" >&6
7185 else
7186         { { echo "$as_me:7186: error: Cannot find dlsym function" >&5
7187 echo "$as_me: error: Cannot find dlsym function" >&2;}
7188    { (exit 1); exit 1; }; }
7189 fi
7190
7191                 if test "x$with_gpm" != xyes ; then
7192                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7193
7194 echo "${as_me:-configure}:7194: testing assuming soname for gpm is $with_gpm ..." 1>&5
7195
7196                         cf_cv_gpm_soname="$with_gpm"
7197                 else
7198
7199 echo "$as_me:7199: checking for soname of gpm library" >&5
7200 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7201 if test "${cf_cv_gpm_soname+set}" = set; then
7202   echo $ECHO_N "(cached) $ECHO_C" >&6
7203 else
7204
7205 cf_cv_gpm_soname=unknown
7206 if test "$cross_compiling" != yes ; then
7207 cat >conftest.$ac_ext <<CF_EOF
7208 #include <gpm.h>
7209 int main(void)
7210 {
7211 if (Gpm_Open(0,0)) Gpm_Close();
7212         ${cf_cv_main_return:-return}(0);
7213 }
7214 CF_EOF
7215 cf_save_LIBS="$LIBS"
7216
7217 cf_add_libs="$LIBS"
7218 # reverse order
7219 cf_add_0lib=
7220 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7221 # filter duplicates
7222 for cf_add_1lib in $cf_add_0lib; do
7223         for cf_add_2lib in $cf_add_libs; do
7224                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7225                         cf_add_1lib=
7226                         break
7227                 fi
7228         done
7229         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7230 done
7231 LIBS="$cf_add_libs"
7232
7233         if { (eval echo "$as_me:7233: \"$ac_compile\"") >&5
7234   (eval $ac_compile) 2>&5
7235   ac_status=$?
7236   echo "$as_me:7236: \$? = $ac_status" >&5
7237   (exit "$ac_status"); } ; then
7238                 if { (eval echo "$as_me:7238: \"$ac_link\"") >&5
7239   (eval $ac_link) 2>&5
7240   ac_status=$?
7241   echo "$as_me:7241: \$? = $ac_status" >&5
7242   (exit "$ac_status"); } ; then
7243                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7244                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7245                 fi
7246         fi
7247 rm -rf ./conftest*
7248 LIBS="$cf_save_LIBS"
7249 fi
7250
7251 fi
7252 echo "$as_me:7252: result: $cf_cv_gpm_soname" >&5
7253 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7254
7255                 fi
7256                 test "$cf_cv_gpm_soname" != "unknown" &&
7257 cat >>confdefs.h <<EOF
7258 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7259 EOF
7260
7261                 SHLIB_LIST="-ldl $SHLIB_LIST"
7262
7263 cf_add_libs="$PRIVATE_LIBS"
7264 # reverse order
7265 cf_add_0lib=
7266 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7267 # filter duplicates
7268 for cf_add_1lib in $cf_add_0lib; do
7269         for cf_add_2lib in $cf_add_libs; do
7270                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7271                         cf_add_1lib=
7272                         break
7273                 fi
7274         done
7275         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7276 done
7277 PRIVATE_LIBS="$cf_add_libs"
7278
7279         else
7280                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7281
7282 cf_add_libs="$TEST_LIBS"
7283 # reverse order
7284 cf_add_0lib=
7285 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7286 # filter duplicates
7287 for cf_add_1lib in $cf_add_0lib; do
7288         for cf_add_2lib in $cf_add_libs; do
7289                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7290                         cf_add_1lib=
7291                         break
7292                 fi
7293         done
7294         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7295 done
7296 TEST_LIBS="$cf_add_libs"
7297
7298 cf_add_libs="$PRIVATE_LIBS"
7299 # reverse order
7300 cf_add_0lib=
7301 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7302 # filter duplicates
7303 for cf_add_1lib in $cf_add_0lib; do
7304         for cf_add_2lib in $cf_add_libs; do
7305                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7306                         cf_add_1lib=
7307                         break
7308                 fi
7309         done
7310         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7311 done
7312 PRIVATE_LIBS="$cf_add_libs"
7313
7314         fi
7315
7316 cat >>confdefs.h <<\EOF
7317 #define HAVE_LIBGPM 1
7318 EOF
7319
7320 echo "$as_me:7320: checking for Gpm_Wgetch in -lgpm" >&5
7321 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7322 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7323   echo $ECHO_N "(cached) $ECHO_C" >&6
7324 else
7325   ac_check_lib_save_LIBS=$LIBS
7326 LIBS="-lgpm  $LIBS"
7327 cat >"conftest.$ac_ext" <<_ACEOF
7328 #line 7328 "configure"
7329 #include "confdefs.h"
7330
7331 /* Override any gcc2 internal prototype to avoid an error.  */
7332 #ifdef __cplusplus
7333 extern "C"
7334 #endif
7335 /* We use char because int might match the return type of a gcc2
7336    builtin and then its argument prototype would still apply.  */
7337 char Gpm_Wgetch ();
7338 int
7339 main (void)
7340 {
7341 Gpm_Wgetch ();
7342   ;
7343   return 0;
7344 }
7345 _ACEOF
7346 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7347 if { (eval echo "$as_me:7347: \"$ac_link\"") >&5
7348   (eval $ac_link) 2>&5
7349   ac_status=$?
7350   echo "$as_me:7350: \$? = $ac_status" >&5
7351   (exit "$ac_status"); } &&
7352          { ac_try='test -s "conftest$ac_exeext"'
7353   { (eval echo "$as_me:7353: \"$ac_try\"") >&5
7354   (eval $ac_try) 2>&5
7355   ac_status=$?
7356   echo "$as_me:7356: \$? = $ac_status" >&5
7357   (exit "$ac_status"); }; }; then
7358   ac_cv_lib_gpm_Gpm_Wgetch=yes
7359 else
7360   echo "$as_me: failed program was:" >&5
7361 cat "conftest.$ac_ext" >&5
7362 ac_cv_lib_gpm_Gpm_Wgetch=no
7363 fi
7364 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7365 LIBS=$ac_check_lib_save_LIBS
7366 fi
7367 echo "$as_me:7367: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7368 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7369 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
7370
7371 echo "$as_me:7371: checking if GPM is weakly bound to curses library" >&5
7372 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7373 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7374   echo $ECHO_N "(cached) $ECHO_C" >&6
7375 else
7376
7377 cf_cv_check_gpm_wgetch=unknown
7378 if test "$cross_compiling" != yes ; then
7379
7380 cat >conftest.$ac_ext <<CF_EOF
7381 #include <gpm.h>
7382 int main(void)
7383 {
7384         Gpm_Wgetch();
7385         ${cf_cv_main_return:-return}(0);
7386 }
7387 CF_EOF
7388
7389         cf_save_LIBS="$LIBS"
7390         # This only works if we can look at the symbol table.  If a shared
7391         # library is stripped for install, we cannot use that.  So we're forced
7392         # to rely on the static library, noting that some packagers may not
7393         # include it.
7394         LIBS="-static -lgpm -dynamic $LIBS"
7395         if { (eval echo "$as_me:7395: \"$ac_compile\"") >&5
7396   (eval $ac_compile) 2>&5
7397   ac_status=$?
7398   echo "$as_me:7398: \$? = $ac_status" >&5
7399   (exit "$ac_status"); } ; then
7400                 if { (eval echo "$as_me:7400: \"$ac_link\"") >&5
7401   (eval $ac_link) 2>&5
7402   ac_status=$?
7403   echo "$as_me:7403: \$? = $ac_status" >&5
7404   (exit "$ac_status"); } ; then
7405                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
7406                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7407                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7408                 fi
7409         fi
7410         rm -rf ./conftest*
7411         LIBS="$cf_save_LIBS"
7412 fi
7413
7414 fi
7415 echo "$as_me:7415: result: $cf_cv_check_gpm_wgetch" >&5
7416 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7417
7418 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7419         { echo "$as_me:7419: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7420 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7421 fi
7422
7423 fi
7424
7425 fi
7426
7427 echo "$as_me:7427: checking if you want to use PCRE2 for regular-expressions" >&5
7428 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7429
7430 # Check whether --with-pcre2 or --without-pcre2 was given.
7431 if test "${with_pcre2+set}" = set; then
7432   withval="$with_pcre2"
7433
7434 fi;
7435 test -z "$with_pcre2" && with_pcre2=no
7436 echo "$as_me:7436: result: $with_pcre2" >&5
7437 echo "${ECHO_T}$with_pcre2" >&6
7438
7439 if test "x$with_pcre2" != xno ; then
7440         cf_with_pcre2_ok=no
7441         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
7442         do
7443
7444 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
7445         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
7446
7447 echo "${as_me:-configure}:7447: testing found package $cf_with_pcre2 ..." 1>&5
7448
7449         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
7450         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
7451         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7452
7453 echo "${as_me:-configure}:7453: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7454
7455         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7456
7457 echo "${as_me:-configure}:7457: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7458
7459 cf_fix_cppflags=no
7460 cf_new_cflags=
7461 cf_new_cppflags=
7462 cf_new_extra_cppflags=
7463
7464 for cf_add_cflags in $cf_pkgconfig_incs
7465 do
7466 case "$cf_fix_cppflags" in
7467 (no)
7468         case "$cf_add_cflags" in
7469         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7470                 case "$cf_add_cflags" in
7471                 (-D*)
7472                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7473
7474                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7475                                 && test -z "${cf_tst_cflags}" \
7476                                 && cf_fix_cppflags=yes
7477
7478                         if test "$cf_fix_cppflags" = yes ; then
7479
7480         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7481         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7482
7483                                 continue
7484                         elif test "${cf_tst_cflags}" = "\"'" ; then
7485
7486         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7487         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7488
7489                                 continue
7490                         fi
7491                         ;;
7492                 esac
7493                 case "$CPPFLAGS" in
7494                 (*$cf_add_cflags)
7495                         ;;
7496                 (*)
7497                         case "$cf_add_cflags" in
7498                         (-D*)
7499                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7500
7501 CPPFLAGS=`echo "$CPPFLAGS" | \
7502         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7503                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7504
7505                                 ;;
7506                         esac
7507
7508         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7509         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7510
7511                         ;;
7512                 esac
7513                 ;;
7514         (*)
7515
7516         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7517         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7518
7519                 ;;
7520         esac
7521         ;;
7522 (yes)
7523
7524         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7525         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7526
7527         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7528
7529         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7530                 && test -z "${cf_tst_cflags}" \
7531                 && cf_fix_cppflags=no
7532         ;;
7533 esac
7534 done
7535
7536 if test -n "$cf_new_cflags" ; then
7537
7538         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7539         CFLAGS="${CFLAGS}$cf_new_cflags"
7540
7541 fi
7542
7543 if test -n "$cf_new_cppflags" ; then
7544
7545         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7546         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7547
7548 fi
7549
7550 if test -n "$cf_new_extra_cppflags" ; then
7551
7552         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7553         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7554
7555 fi
7556
7557 cf_add_libs="$LIBS"
7558 # reverse order
7559 cf_add_0lib=
7560 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7561 # filter duplicates
7562 for cf_add_1lib in $cf_add_0lib; do
7563         for cf_add_2lib in $cf_add_libs; do
7564                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7565                         cf_add_1lib=
7566                         break
7567                 fi
7568         done
7569         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7570 done
7571 LIBS="$cf_add_libs"
7572
7573         cf_with_pcre2_ok=yes; break
7574 else
7575         cf_pkgconfig_incs=
7576         cf_pkgconfig_libs=
7577         :
7578 fi
7579
7580         done
7581         cf_with_pcre2_ok=yes || { { echo "$as_me:7581: error: Cannot find PCRE2 library" >&5
7582 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7583    { (exit 1); exit 1; }; }
7584
7585 cat >>confdefs.h <<\EOF
7586 #define HAVE_LIB_PCRE2 1
7587 EOF
7588
7589         # if pkgconfig gave no results, look for the libraries directly
7590         case "$LIBS" in
7591         (*pcre2-posix*|*pcreposix*)
7592                 ;;
7593         (*)
7594                 echo "$as_me:7594: checking for regcomp in -lpcre2-posix" >&5
7595 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7596 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7597   echo $ECHO_N "(cached) $ECHO_C" >&6
7598 else
7599   ac_check_lib_save_LIBS=$LIBS
7600 LIBS="-lpcre2-posix  $LIBS"
7601 cat >"conftest.$ac_ext" <<_ACEOF
7602 #line 7602 "configure"
7603 #include "confdefs.h"
7604
7605 /* Override any gcc2 internal prototype to avoid an error.  */
7606 #ifdef __cplusplus
7607 extern "C"
7608 #endif
7609 /* We use char because int might match the return type of a gcc2
7610    builtin and then its argument prototype would still apply.  */
7611 char regcomp ();
7612 int
7613 main (void)
7614 {
7615 regcomp ();
7616   ;
7617   return 0;
7618 }
7619 _ACEOF
7620 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7621 if { (eval echo "$as_me:7621: \"$ac_link\"") >&5
7622   (eval $ac_link) 2>&5
7623   ac_status=$?
7624   echo "$as_me:7624: \$? = $ac_status" >&5
7625   (exit "$ac_status"); } &&
7626          { ac_try='test -s "conftest$ac_exeext"'
7627   { (eval echo "$as_me:7627: \"$ac_try\"") >&5
7628   (eval $ac_try) 2>&5
7629   ac_status=$?
7630   echo "$as_me:7630: \$? = $ac_status" >&5
7631   (exit "$ac_status"); }; }; then
7632   ac_cv_lib_pcre2_posix_regcomp=yes
7633 else
7634   echo "$as_me: failed program was:" >&5
7635 cat "conftest.$ac_ext" >&5
7636 ac_cv_lib_pcre2_posix_regcomp=no
7637 fi
7638 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7639 LIBS=$ac_check_lib_save_LIBS
7640 fi
7641 echo "$as_me:7641: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7642 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7643 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
7644
7645 cf_add_libs="$LIBS"
7646 # reverse order
7647 cf_add_0lib=
7648 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7649 # filter duplicates
7650 for cf_add_1lib in $cf_add_0lib; do
7651         for cf_add_2lib in $cf_add_libs; do
7652                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7653                         cf_add_1lib=
7654                         break
7655                 fi
7656         done
7657         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7658 done
7659 LIBS="$cf_add_libs"
7660
7661 else
7662   echo "$as_me:7662: checking for regcomp in -lpcreposix" >&5
7663 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7664 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7665   echo $ECHO_N "(cached) $ECHO_C" >&6
7666 else
7667   ac_check_lib_save_LIBS=$LIBS
7668 LIBS="-lpcreposix  $LIBS"
7669 cat >"conftest.$ac_ext" <<_ACEOF
7670 #line 7670 "configure"
7671 #include "confdefs.h"
7672
7673 /* Override any gcc2 internal prototype to avoid an error.  */
7674 #ifdef __cplusplus
7675 extern "C"
7676 #endif
7677 /* We use char because int might match the return type of a gcc2
7678    builtin and then its argument prototype would still apply.  */
7679 char regcomp ();
7680 int
7681 main (void)
7682 {
7683 regcomp ();
7684   ;
7685   return 0;
7686 }
7687 _ACEOF
7688 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7689 if { (eval echo "$as_me:7689: \"$ac_link\"") >&5
7690   (eval $ac_link) 2>&5
7691   ac_status=$?
7692   echo "$as_me:7692: \$? = $ac_status" >&5
7693   (exit "$ac_status"); } &&
7694          { ac_try='test -s "conftest$ac_exeext"'
7695   { (eval echo "$as_me:7695: \"$ac_try\"") >&5
7696   (eval $ac_try) 2>&5
7697   ac_status=$?
7698   echo "$as_me:7698: \$? = $ac_status" >&5
7699   (exit "$ac_status"); }; }; then
7700   ac_cv_lib_pcreposix_regcomp=yes
7701 else
7702   echo "$as_me: failed program was:" >&5
7703 cat "conftest.$ac_ext" >&5
7704 ac_cv_lib_pcreposix_regcomp=no
7705 fi
7706 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7707 LIBS=$ac_check_lib_save_LIBS
7708 fi
7709 echo "$as_me:7709: result: $ac_cv_lib_pcreposix_regcomp" >&5
7710 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7711 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
7712
7713 cf_add_libs="$LIBS"
7714 # reverse order
7715 cf_add_0lib=
7716 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7717 # filter duplicates
7718 for cf_add_1lib in $cf_add_0lib; do
7719         for cf_add_2lib in $cf_add_libs; do
7720                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7721                         cf_add_1lib=
7722                         break
7723                 fi
7724         done
7725         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7726 done
7727 LIBS="$cf_add_libs"
7728
7729 else
7730   { { echo "$as_me:7730: error: Cannot find PCRE2 POSIX library" >&5
7731 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7732    { (exit 1); exit 1; }; }
7733 fi
7734
7735 fi
7736
7737                 ;;
7738         esac
7739
7740         # either way, check for the library header files
7741
7742 for ac_header in pcre2posix.h pcreposix.h
7743 do
7744 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7745 echo "$as_me:7745: checking for $ac_header" >&5
7746 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7747 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7748   echo $ECHO_N "(cached) $ECHO_C" >&6
7749 else
7750   cat >"conftest.$ac_ext" <<_ACEOF
7751 #line 7751 "configure"
7752 #include "confdefs.h"
7753 #include <$ac_header>
7754 _ACEOF
7755 if { (eval echo "$as_me:7755: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7756   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7757   ac_status=$?
7758   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7759   rm -f conftest.er1
7760   cat conftest.err >&5
7761   echo "$as_me:7761: \$? = $ac_status" >&5
7762   (exit "$ac_status"); } >/dev/null; then
7763   if test -s conftest.err; then
7764     ac_cpp_err=$ac_c_preproc_warn_flag
7765   else
7766     ac_cpp_err=
7767   fi
7768 else
7769   ac_cpp_err=yes
7770 fi
7771 if test -z "$ac_cpp_err"; then
7772   eval "$as_ac_Header=yes"
7773 else
7774   echo "$as_me: failed program was:" >&5
7775   cat "conftest.$ac_ext" >&5
7776   eval "$as_ac_Header=no"
7777 fi
7778 rm -f conftest.err "conftest.$ac_ext"
7779 fi
7780 echo "$as_me:7780: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7781 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7782 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7783   cat >>confdefs.h <<EOF
7784 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7785 EOF
7786
7787 fi
7788 done
7789
7790 fi
7791
7792 # not everyone has "test -c"
7793 if test -c /dev/sysmouse 2>/dev/null ; then
7794 echo "$as_me:7794: checking if you want to use sysmouse" >&5
7795 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7796
7797 # Check whether --with-sysmouse or --without-sysmouse was given.
7798 if test "${with_sysmouse+set}" = set; then
7799   withval="$with_sysmouse"
7800   cf_with_sysmouse=$withval
7801 else
7802   cf_with_sysmouse=maybe
7803 fi;
7804         if test "$cf_with_sysmouse" != no ; then
7805         cat >"conftest.$ac_ext" <<_ACEOF
7806 #line 7806 "configure"
7807 #include "confdefs.h"
7808
7809 #include <osreldate.h>
7810 #if (__FreeBSD_version >= 400017)
7811 #include <sys/consio.h>
7812 #include <sys/fbio.h>
7813 #else
7814 #include <machine/console.h>
7815 #endif
7816
7817 int
7818 main (void)
7819 {
7820
7821         struct mouse_info the_mouse;
7822         ioctl(0, CONS_MOUSECTL, &the_mouse);
7823
7824   ;
7825   return 0;
7826 }
7827 _ACEOF
7828 rm -f "conftest.$ac_objext"
7829 if { (eval echo "$as_me:7829: \"$ac_compile\"") >&5
7830   (eval $ac_compile) 2>&5
7831   ac_status=$?
7832   echo "$as_me:7832: \$? = $ac_status" >&5
7833   (exit "$ac_status"); } &&
7834          { ac_try='test -s "conftest.$ac_objext"'
7835   { (eval echo "$as_me:7835: \"$ac_try\"") >&5
7836   (eval $ac_try) 2>&5
7837   ac_status=$?
7838   echo "$as_me:7838: \$? = $ac_status" >&5
7839   (exit "$ac_status"); }; }; then
7840   cf_with_sysmouse=yes
7841 else
7842   echo "$as_me: failed program was:" >&5
7843 cat "conftest.$ac_ext" >&5
7844 cf_with_sysmouse=no
7845 fi
7846 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7847         fi
7848 echo "$as_me:7848: result: $cf_with_sysmouse" >&5
7849 echo "${ECHO_T}$cf_with_sysmouse" >&6
7850 test "$cf_with_sysmouse" = yes &&
7851 cat >>confdefs.h <<\EOF
7852 #define USE_SYSMOUSE 1
7853 EOF
7854
7855 fi
7856
7857 # pretend that ncurses==ncursesw==ncursest
7858 echo "$as_me:7858: checking if you want to disable library suffixes" >&5
7859 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7860
7861 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7862 if test "${enable_lib_suffixes+set}" = set; then
7863   enableval="$enable_lib_suffixes"
7864   test "$enableval" != no && enableval=yes
7865         if test "$enableval" != "yes" ; then
7866     disable_lib_suffixes=yes
7867         else
7868                 disable_lib_suffixes=no
7869         fi
7870 else
7871   enableval=yes
7872         disable_lib_suffixes=no
7873
7874 fi;
7875 echo "$as_me:7875: result: $disable_lib_suffixes" >&5
7876 echo "${ECHO_T}$disable_lib_suffixes" >&6
7877
7878 ### If we're building with rpath, try to link non-standard libs that way too.
7879 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7880
7881 echo "$as_me:7881: checking if rpath-hack should be disabled" >&5
7882 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7883
7884 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7885 if test "${enable_rpath_hack+set}" = set; then
7886   enableval="$enable_rpath_hack"
7887   test "$enableval" != no && enableval=yes
7888         if test "$enableval" != "yes" ; then
7889     enable_rpath_hack=no
7890         else
7891                 enable_rpath_hack=yes
7892         fi
7893 else
7894   enableval=yes
7895         enable_rpath_hack=yes
7896
7897 fi;
7898 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
7899 echo "$as_me:7899: result: $cf_disable_rpath_hack" >&5
7900 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7901
7902 if test "$enable_rpath_hack" = yes ; then
7903
7904 echo "$as_me:7904: checking for updated LDFLAGS" >&5
7905 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7906 if test -n "$LD_RPATH_OPT" ; then
7907         echo "$as_me:7907: result: maybe" >&5
7908 echo "${ECHO_T}maybe" >&6
7909
7910         for ac_prog in ldd
7911 do
7912   # Extract the first word of "$ac_prog", so it can be a program name with args.
7913 set dummy $ac_prog; ac_word=$2
7914 echo "$as_me:7914: checking for $ac_word" >&5
7915 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7916 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7917   echo $ECHO_N "(cached) $ECHO_C" >&6
7918 else
7919   if test -n "$cf_ldd_prog"; then
7920   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7921 else
7922   ac_save_IFS=$IFS; IFS=$ac_path_separator
7923 ac_dummy="$PATH"
7924 for ac_dir in $ac_dummy; do
7925   IFS=$ac_save_IFS
7926   test -z "$ac_dir" && ac_dir=.
7927   $as_executable_p "$ac_dir/$ac_word" || continue
7928 ac_cv_prog_cf_ldd_prog="$ac_prog"
7929 echo "$as_me:7929: found $ac_dir/$ac_word" >&5
7930 break
7931 done
7932
7933 fi
7934 fi
7935 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7936 if test -n "$cf_ldd_prog"; then
7937   echo "$as_me:7937: result: $cf_ldd_prog" >&5
7938 echo "${ECHO_T}$cf_ldd_prog" >&6
7939 else
7940   echo "$as_me:7940: result: no" >&5
7941 echo "${ECHO_T}no" >&6
7942 fi
7943
7944   test -n "$cf_ldd_prog" && break
7945 done
7946 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7947
7948         cf_rpath_list="/usr/lib /lib"
7949         if test "$cf_ldd_prog" != no
7950         then
7951                 cf_rpath_oops=
7952
7953 cat >"conftest.$ac_ext" <<_ACEOF
7954 #line 7954 "configure"
7955 #include "confdefs.h"
7956 #include <stdio.h>
7957 int
7958 main (void)
7959 {
7960 printf("Hello");
7961   ;
7962   return 0;
7963 }
7964 _ACEOF
7965 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7966 if { (eval echo "$as_me:7966: \"$ac_link\"") >&5
7967   (eval $ac_link) 2>&5
7968   ac_status=$?
7969   echo "$as_me:7969: \$? = $ac_status" >&5
7970   (exit "$ac_status"); } &&
7971          { ac_try='test -s "conftest$ac_exeext"'
7972   { (eval echo "$as_me:7972: \"$ac_try\"") >&5
7973   (eval $ac_try) 2>&5
7974   ac_status=$?
7975   echo "$as_me:7975: \$? = $ac_status" >&5
7976   (exit "$ac_status"); }; }; then
7977   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7978                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7979 else
7980   echo "$as_me: failed program was:" >&5
7981 cat "conftest.$ac_ext" >&5
7982 fi
7983 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7984
7985                 # If we passed the link-test, but get a "not found" on a given library,
7986                 # this could be due to inept reconfiguration of gcc to make it only
7987                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7988                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
7989                 # /usr/local libraries.
7990                 if test -n "$cf_rpath_oops"
7991                 then
7992                         for cf_rpath_src in $cf_rpath_oops
7993                         do
7994                                 for cf_rpath_dir in \
7995                                         /usr/local \
7996                                         /usr/pkg \
7997                                         /opt/sfw
7998                                 do
7999                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8000                                         then
8001                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8002
8003 echo "${as_me:-configure}:8003: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8004
8005                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8006                                                 break
8007                                         fi
8008                                 done
8009                         done
8010                 fi
8011         fi
8012
8013         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8014
8015 echo "${as_me:-configure}:8015: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8016
8017 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8018
8019 echo "${as_me:-configure}:8019: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8020
8021 cf_rpath_dst=
8022 for cf_rpath_src in $LDFLAGS
8023 do
8024         case "$cf_rpath_src" in
8025         (-L*)
8026
8027                 # check if this refers to a directory which we will ignore
8028                 cf_rpath_skip=no
8029                 if test -n "$cf_rpath_list"
8030                 then
8031                         for cf_rpath_item in $cf_rpath_list
8032                         do
8033                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8034                                 then
8035                                         cf_rpath_skip=yes
8036                                         break
8037                                 fi
8038                         done
8039                 fi
8040
8041                 if test "$cf_rpath_skip" = no
8042                 then
8043                         # transform the option
8044                         if test "$LD_RPATH_OPT" = "-R " ; then
8045                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8046                         else
8047                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8048                         fi
8049
8050                         # if we have not already added this, add it now
8051                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8052                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8053                         then
8054                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8055
8056 echo "${as_me:-configure}:8056: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8057
8058                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8059                         fi
8060                 fi
8061                 ;;
8062         esac
8063         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8064 done
8065 LDFLAGS=$cf_rpath_dst
8066
8067 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8068
8069 echo "${as_me:-configure}:8069: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8070
8071 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8072
8073 echo "${as_me:-configure}:8073: testing ...checking LIBS $LIBS ..." 1>&5
8074
8075 cf_rpath_dst=
8076 for cf_rpath_src in $LIBS
8077 do
8078         case "$cf_rpath_src" in
8079         (-L*)
8080
8081                 # check if this refers to a directory which we will ignore
8082                 cf_rpath_skip=no
8083                 if test -n "$cf_rpath_list"
8084                 then
8085                         for cf_rpath_item in $cf_rpath_list
8086                         do
8087                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8088                                 then
8089                                         cf_rpath_skip=yes
8090                                         break
8091                                 fi
8092                         done
8093                 fi
8094
8095                 if test "$cf_rpath_skip" = no
8096                 then
8097                         # transform the option
8098                         if test "$LD_RPATH_OPT" = "-R " ; then
8099                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8100                         else
8101                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8102                         fi
8103
8104                         # if we have not already added this, add it now
8105                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8106                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8107                         then
8108                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8109
8110 echo "${as_me:-configure}:8110: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8111
8112                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8113                         fi
8114                 fi
8115                 ;;
8116         esac
8117         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8118 done
8119 LIBS=$cf_rpath_dst
8120
8121 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8122
8123 echo "${as_me:-configure}:8123: testing ...checked LIBS $LIBS ..." 1>&5
8124
8125         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8126
8127 echo "${as_me:-configure}:8127: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8128
8129 else
8130         echo "$as_me:8130: result: no" >&5
8131 echo "${ECHO_T}no" >&6
8132 fi
8133
8134 fi
8135
8136 fi
8137
8138 ### Depending on the system, someone may use rpath to build ncurses but not
8139 # want users of the package to rely upon that feature.  Give those people an
8140 # option to suppress that detail from EXTRA_LDFLAGS.
8141 EXTRA_PKG_LDFLAGS="$EXTRA_LDFLAGS"
8142 if test -n "$EXTRA_PKG_LDFLAGS"
8143 then
8144         echo "$as_me:8144: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8145 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8146
8147 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8148 if test "${enable_pkg_ldflags+set}" = set; then
8149   enableval="$enable_pkg_ldflags"
8150   test "$enableval" != no && enableval=yes
8151         if test "$enableval" != "yes" ; then
8152     disable_pkg_ldflags=yes
8153         else
8154                 disable_pkg_ldflags=no
8155         fi
8156 else
8157   enableval=yes
8158         disable_pkg_ldflags=no
8159
8160 fi;
8161         echo "$as_me:8161: result: $disable_pkg_ldflags" >&5
8162 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8163         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8164 fi
8165
8166 ###############################################################################
8167
8168 ###     use option --with-extra-suffix to append suffix to headers and libraries
8169 echo "$as_me:8169: checking if you wish to append extra suffix to header/library paths" >&5
8170 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8171 EXTRA_SUFFIX=
8172
8173 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8174 if test "${with_extra_suffix+set}" = set; then
8175   withval="$with_extra_suffix"
8176   case x$withval in
8177         (xno)
8178                 ;;
8179         (xyes|x)
8180                 EXTRA_SUFFIX=$cf_cv_abi_version
8181                 ;;
8182         (*)
8183                 EXTRA_SUFFIX=$withval
8184                 ;;
8185         esac
8186
8187 fi;
8188 echo "$as_me:8188: result: $EXTRA_SUFFIX" >&5
8189 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8190
8191 ###     use option --disable-overwrite to leave out the link to -lcurses
8192 echo "$as_me:8192: checking if you wish to install ncurses overwriting curses" >&5
8193 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8194
8195 # Check whether --enable-overwrite or --disable-overwrite was given.
8196 if test "${enable_overwrite+set}" = set; then
8197   enableval="$enable_overwrite"
8198   with_overwrite=$enableval
8199 else
8200   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8201 fi;
8202 echo "$as_me:8202: result: $with_overwrite" >&5
8203 echo "${ECHO_T}$with_overwrite" >&6
8204
8205 echo "$as_me:8205: checking if external terminfo-database is used" >&5
8206 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8207
8208 # Check whether --enable-database or --disable-database was given.
8209 if test "${enable_database+set}" = set; then
8210   enableval="$enable_database"
8211   use_database=$enableval
8212 else
8213   use_database=yes
8214 fi;
8215 echo "$as_me:8215: result: $use_database" >&5
8216 echo "${ECHO_T}$use_database" >&6
8217
8218 case "$host_os" in
8219 (os2*)
8220         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8221         ;;
8222 (*)
8223         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8224         ;;
8225 esac
8226
8227 NCURSES_USE_DATABASE=0
8228 if test "$use_database" != no ; then
8229         NCURSES_USE_DATABASE=1
8230
8231         echo "$as_me:8231: checking which terminfo source-file will be installed" >&5
8232 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8233
8234 # Check whether --with-database or --without-database was given.
8235 if test "${with_database+set}" = set; then
8236   withval="$with_database"
8237   TERMINFO_SRC=$withval
8238 fi;
8239         echo "$as_me:8239: result: $TERMINFO_SRC" >&5
8240 echo "${ECHO_T}$TERMINFO_SRC" >&6
8241
8242         echo "$as_me:8242: checking whether to use hashed database instead of directory/tree" >&5
8243 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8244
8245 # Check whether --with-hashed-db or --without-hashed-db was given.
8246 if test "${with_hashed_db+set}" = set; then
8247   withval="$with_hashed_db"
8248
8249 else
8250   with_hashed_db=no
8251 fi;
8252         echo "$as_me:8252: result: $with_hashed_db" >&5
8253 echo "${ECHO_T}$with_hashed_db" >&6
8254 else
8255         with_hashed_db=no
8256 fi
8257
8258 echo "$as_me:8258: checking for list of fallback descriptions" >&5
8259 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8260
8261 # Check whether --with-fallbacks or --without-fallbacks was given.
8262 if test "${with_fallbacks+set}" = set; then
8263   withval="$with_fallbacks"
8264   with_fallback=$withval
8265 else
8266   with_fallback=
8267 fi;
8268 echo "$as_me:8268: result: $with_fallback" >&5
8269 echo "${ECHO_T}$with_fallback" >&6
8270
8271 case ".$with_fallback" in
8272 (.|.no)
8273         FALLBACK_LIST=
8274         ;;
8275 (.yes)
8276         { echo "$as_me:8276: WARNING: expected a list of terminal descriptions" >&5
8277 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8278         ;;
8279 (*)
8280         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8281         ;;
8282 esac
8283
8284 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8285 # tree for generating the terminal descriptions that will be compiled into the
8286 # library.  If your toolchain is old, it may not handle current terminal
8287 # databases.  Use configure-options to point to the tools which will be used,
8288 # rather than the first ones found on the $PATH.
8289 if test -n "$ac_tool_prefix"; then
8290   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8291 set dummy ${ac_tool_prefix}tic; ac_word=$2
8292 echo "$as_me:8292: checking for $ac_word" >&5
8293 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8294 if test "${ac_cv_prog_TIC+set}" = set; then
8295   echo $ECHO_N "(cached) $ECHO_C" >&6
8296 else
8297   if test -n "$TIC"; then
8298   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8299 else
8300   ac_save_IFS=$IFS; IFS=$ac_path_separator
8301 ac_dummy="$PATH"
8302 for ac_dir in $ac_dummy; do
8303   IFS=$ac_save_IFS
8304   test -z "$ac_dir" && ac_dir=.
8305   $as_executable_p "$ac_dir/$ac_word" || continue
8306 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8307 echo "$as_me:8307: found $ac_dir/$ac_word" >&5
8308 break
8309 done
8310
8311 fi
8312 fi
8313 TIC=$ac_cv_prog_TIC
8314 if test -n "$TIC"; then
8315   echo "$as_me:8315: result: $TIC" >&5
8316 echo "${ECHO_T}$TIC" >&6
8317 else
8318   echo "$as_me:8318: result: no" >&5
8319 echo "${ECHO_T}no" >&6
8320 fi
8321
8322 fi
8323 if test -z "$ac_cv_prog_TIC"; then
8324   ac_ct_TIC=$TIC
8325   # Extract the first word of "tic", so it can be a program name with args.
8326 set dummy tic; ac_word=$2
8327 echo "$as_me:8327: checking for $ac_word" >&5
8328 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8329 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
8330   echo $ECHO_N "(cached) $ECHO_C" >&6
8331 else
8332   if test -n "$ac_ct_TIC"; then
8333   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
8334 else
8335   ac_save_IFS=$IFS; IFS=$ac_path_separator
8336 ac_dummy="$PATH"
8337 for ac_dir in $ac_dummy; do
8338   IFS=$ac_save_IFS
8339   test -z "$ac_dir" && ac_dir=.
8340   $as_executable_p "$ac_dir/$ac_word" || continue
8341 ac_cv_prog_ac_ct_TIC="tic"
8342 echo "$as_me:8342: found $ac_dir/$ac_word" >&5
8343 break
8344 done
8345
8346 fi
8347 fi
8348 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
8349 if test -n "$ac_ct_TIC"; then
8350   echo "$as_me:8350: result: $ac_ct_TIC" >&5
8351 echo "${ECHO_T}$ac_ct_TIC" >&6
8352 else
8353   echo "$as_me:8353: result: no" >&5
8354 echo "${ECHO_T}no" >&6
8355 fi
8356
8357   TIC=$ac_ct_TIC
8358 else
8359   TIC="$ac_cv_prog_TIC"
8360 fi
8361
8362 if test -n "$ac_tool_prefix"; then
8363   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
8364 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
8365 echo "$as_me:8365: checking for $ac_word" >&5
8366 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8367 if test "${ac_cv_prog_INFOCMP+set}" = set; then
8368   echo $ECHO_N "(cached) $ECHO_C" >&6
8369 else
8370   if test -n "$INFOCMP"; then
8371   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
8372 else
8373   ac_save_IFS=$IFS; IFS=$ac_path_separator
8374 ac_dummy="$PATH"
8375 for ac_dir in $ac_dummy; do
8376   IFS=$ac_save_IFS
8377   test -z "$ac_dir" && ac_dir=.
8378   $as_executable_p "$ac_dir/$ac_word" || continue
8379 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
8380 echo "$as_me:8380: found $ac_dir/$ac_word" >&5
8381 break
8382 done
8383
8384 fi
8385 fi
8386 INFOCMP=$ac_cv_prog_INFOCMP
8387 if test -n "$INFOCMP"; then
8388   echo "$as_me:8388: result: $INFOCMP" >&5
8389 echo "${ECHO_T}$INFOCMP" >&6
8390 else
8391   echo "$as_me:8391: result: no" >&5
8392 echo "${ECHO_T}no" >&6
8393 fi
8394
8395 fi
8396 if test -z "$ac_cv_prog_INFOCMP"; then
8397   ac_ct_INFOCMP=$INFOCMP
8398   # Extract the first word of "infocmp", so it can be a program name with args.
8399 set dummy infocmp; ac_word=$2
8400 echo "$as_me:8400: checking for $ac_word" >&5
8401 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8402 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
8403   echo $ECHO_N "(cached) $ECHO_C" >&6
8404 else
8405   if test -n "$ac_ct_INFOCMP"; then
8406   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
8407 else
8408   ac_save_IFS=$IFS; IFS=$ac_path_separator
8409 ac_dummy="$PATH"
8410 for ac_dir in $ac_dummy; do
8411   IFS=$ac_save_IFS
8412   test -z "$ac_dir" && ac_dir=.
8413   $as_executable_p "$ac_dir/$ac_word" || continue
8414 ac_cv_prog_ac_ct_INFOCMP="infocmp"
8415 echo "$as_me:8415: found $ac_dir/$ac_word" >&5
8416 break
8417 done
8418
8419 fi
8420 fi
8421 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
8422 if test -n "$ac_ct_INFOCMP"; then
8423   echo "$as_me:8423: result: $ac_ct_INFOCMP" >&5
8424 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
8425 else
8426   echo "$as_me:8426: result: no" >&5
8427 echo "${ECHO_T}no" >&6
8428 fi
8429
8430   INFOCMP=$ac_ct_INFOCMP
8431 else
8432   INFOCMP="$ac_cv_prog_INFOCMP"
8433 fi
8434
8435 if test -n "$FALLBACK_LIST"
8436 then
8437
8438 # Check whether --with-tic-path or --without-tic-path was given.
8439 if test "${with_tic_path+set}" = set; then
8440   withval="$with_tic_path"
8441   echo "$as_me:8441: checking for tic program for fallbacks" >&5
8442 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8443                 TIC=$withval
8444                 echo "$as_me:8444: result: $TIC" >&5
8445 echo "${ECHO_T}$TIC" >&6
8446
8447 if test "x$prefix" != xNONE; then
8448         cf_path_syntax="$prefix"
8449 else
8450         cf_path_syntax="$ac_default_prefix"
8451 fi
8452
8453 case ".$TIC" in
8454 (.\$\(*\)*|.\'*\'*)
8455         ;;
8456 (..|./*|.\\*)
8457         ;;
8458 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8459         ;;
8460 (.\$\{*prefix\}*|.\$\{*dir\}*)
8461         eval TIC="$TIC"
8462         case ".$TIC" in
8463         (.NONE/*)
8464                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8465                 ;;
8466         esac
8467         ;;
8468 (.no|.NONE/*)
8469         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8470         ;;
8471 (*)
8472         { { echo "$as_me:8472: error: expected a pathname, not \"$TIC\"" >&5
8473 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8474    { (exit 1); exit 1; }; }
8475         ;;
8476 esac
8477
8478 else
8479
8480 test -z "$TIC" && TIC="tic"
8481 for ac_prog in $TIC tic
8482 do
8483   # Extract the first word of "$ac_prog", so it can be a program name with args.
8484 set dummy $ac_prog; ac_word=$2
8485 echo "$as_me:8485: checking for $ac_word" >&5
8486 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8487 if test "${ac_cv_path_TIC+set}" = set; then
8488   echo $ECHO_N "(cached) $ECHO_C" >&6
8489 else
8490   case $TIC in
8491   [\\/]* | ?:[\\/]*)
8492   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8493   ;;
8494   *)
8495   ac_save_IFS=$IFS; IFS=$ac_path_separator
8496 ac_dummy="$PATH:/usr/local/ncurses/bin"
8497 for ac_dir in $ac_dummy; do
8498   IFS=$ac_save_IFS
8499   test -z "$ac_dir" && ac_dir=.
8500   if $as_executable_p "$ac_dir/$ac_word"; then
8501    ac_cv_path_TIC="$ac_dir/$ac_word"
8502    echo "$as_me:8502: found $ac_dir/$ac_word" >&5
8503    break
8504 fi
8505 done
8506
8507   ;;
8508 esac
8509 fi
8510 TIC=$ac_cv_path_TIC
8511
8512 if test -n "$TIC"; then
8513   echo "$as_me:8513: result: $TIC" >&5
8514 echo "${ECHO_T}$TIC" >&6
8515 else
8516   echo "$as_me:8516: result: no" >&5
8517 echo "${ECHO_T}no" >&6
8518 fi
8519
8520   test -n "$TIC" && break
8521 done
8522 test -n "$TIC" || TIC="$TIC"
8523
8524 cf_path_prog=""
8525 cf_path_args=""
8526 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8527 for cf_temp in $ac_cv_path_TIC
8528 do
8529         if test -z "$cf_path_prog" ; then
8530                 if test "$with_full_paths" = yes ; then
8531
8532 if test "x$prefix" != xNONE; then
8533         cf_path_syntax="$prefix"
8534 else
8535         cf_path_syntax="$ac_default_prefix"
8536 fi
8537
8538 case ".$cf_temp" in
8539 (.\$\(*\)*|.\'*\'*)
8540         ;;
8541 (..|./*|.\\*)
8542         ;;
8543 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8544         ;;
8545 (.\$\{*prefix\}*|.\$\{*dir\}*)
8546         eval cf_temp="$cf_temp"
8547         case ".$cf_temp" in
8548         (.NONE/*)
8549                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8550                 ;;
8551         esac
8552         ;;
8553 (.no|.NONE/*)
8554         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8555         ;;
8556 (*)
8557         break
8558         ;;
8559 esac
8560
8561                         cf_path_prog="$cf_temp"
8562                 else
8563                         cf_path_prog="`basename "$cf_temp"`"
8564                 fi
8565         elif test -z "$cf_path_args" ; then
8566                 cf_path_args="$cf_temp"
8567         else
8568                 cf_path_args="$cf_path_args $cf_temp"
8569         fi
8570 done
8571 IFS="$cf_save_ifs"
8572
8573 if test -n "$cf_path_prog" ; then
8574
8575 echo "${as_me:-configure}:8575: testing defining path for ${cf_path_prog} ..." 1>&5
8576
8577 cat >>confdefs.h <<EOF
8578 #define TIC_PATH "$cf_path_prog"
8579 EOF
8580
8581         test -n "$cf_path_args" &&
8582 cat >>confdefs.h <<EOF
8583 #define TIC_ARGS "$cf_path_args"
8584 EOF
8585
8586 fi
8587
8588                 if test -z "$TIC"
8589                 then
8590                         { echo "$as_me:8590: WARNING: no tic program found for fallbacks" >&5
8591 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8592                 fi
8593
8594 fi;
8595
8596 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8597 if test "${with_infocmp_path+set}" = set; then
8598   withval="$with_infocmp_path"
8599   echo "$as_me:8599: checking for infocmp program for fallbacks" >&5
8600 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8601                 INFOCMP=$withval
8602                 echo "$as_me:8602: result: $INFOCMP" >&5
8603 echo "${ECHO_T}$INFOCMP" >&6
8604
8605 if test "x$prefix" != xNONE; then
8606         cf_path_syntax="$prefix"
8607 else
8608         cf_path_syntax="$ac_default_prefix"
8609 fi
8610
8611 case ".$INFOCMP" in
8612 (.\$\(*\)*|.\'*\'*)
8613         ;;
8614 (..|./*|.\\*)
8615         ;;
8616 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8617         ;;
8618 (.\$\{*prefix\}*|.\$\{*dir\}*)
8619         eval INFOCMP="$INFOCMP"
8620         case ".$INFOCMP" in
8621         (.NONE/*)
8622                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8623                 ;;
8624         esac
8625         ;;
8626 (.no|.NONE/*)
8627         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8628         ;;
8629 (*)
8630         { { echo "$as_me:8630: error: expected a pathname, not \"$INFOCMP\"" >&5
8631 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8632    { (exit 1); exit 1; }; }
8633         ;;
8634 esac
8635
8636 else
8637
8638 test -z "$INFOCMP" && INFOCMP="infocmp"
8639 for ac_prog in $INFOCMP infocmp
8640 do
8641   # Extract the first word of "$ac_prog", so it can be a program name with args.
8642 set dummy $ac_prog; ac_word=$2
8643 echo "$as_me:8643: checking for $ac_word" >&5
8644 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8645 if test "${ac_cv_path_INFOCMP+set}" = set; then
8646   echo $ECHO_N "(cached) $ECHO_C" >&6
8647 else
8648   case $INFOCMP in
8649   [\\/]* | ?:[\\/]*)
8650   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8651   ;;
8652   *)
8653   ac_save_IFS=$IFS; IFS=$ac_path_separator
8654 ac_dummy="$PATH:/usr/local/ncurses/bin"
8655 for ac_dir in $ac_dummy; do
8656   IFS=$ac_save_IFS
8657   test -z "$ac_dir" && ac_dir=.
8658   if $as_executable_p "$ac_dir/$ac_word"; then
8659    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8660    echo "$as_me:8660: found $ac_dir/$ac_word" >&5
8661    break
8662 fi
8663 done
8664
8665   ;;
8666 esac
8667 fi
8668 INFOCMP=$ac_cv_path_INFOCMP
8669
8670 if test -n "$INFOCMP"; then
8671   echo "$as_me:8671: result: $INFOCMP" >&5
8672 echo "${ECHO_T}$INFOCMP" >&6
8673 else
8674   echo "$as_me:8674: result: no" >&5
8675 echo "${ECHO_T}no" >&6
8676 fi
8677
8678   test -n "$INFOCMP" && break
8679 done
8680 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8681
8682 cf_path_prog=""
8683 cf_path_args=""
8684 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8685 for cf_temp in $ac_cv_path_INFOCMP
8686 do
8687         if test -z "$cf_path_prog" ; then
8688                 if test "$with_full_paths" = yes ; then
8689
8690 if test "x$prefix" != xNONE; then
8691         cf_path_syntax="$prefix"
8692 else
8693         cf_path_syntax="$ac_default_prefix"
8694 fi
8695
8696 case ".$cf_temp" in
8697 (.\$\(*\)*|.\'*\'*)
8698         ;;
8699 (..|./*|.\\*)
8700         ;;
8701 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8702         ;;
8703 (.\$\{*prefix\}*|.\$\{*dir\}*)
8704         eval cf_temp="$cf_temp"
8705         case ".$cf_temp" in
8706         (.NONE/*)
8707                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8708                 ;;
8709         esac
8710         ;;
8711 (.no|.NONE/*)
8712         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8713         ;;
8714 (*)
8715         break
8716         ;;
8717 esac
8718
8719                         cf_path_prog="$cf_temp"
8720                 else
8721                         cf_path_prog="`basename "$cf_temp"`"
8722                 fi
8723         elif test -z "$cf_path_args" ; then
8724                 cf_path_args="$cf_temp"
8725         else
8726                 cf_path_args="$cf_path_args $cf_temp"
8727         fi
8728 done
8729 IFS="$cf_save_ifs"
8730
8731 if test -n "$cf_path_prog" ; then
8732
8733 echo "${as_me:-configure}:8733: testing defining path for ${cf_path_prog} ..." 1>&5
8734
8735 cat >>confdefs.h <<EOF
8736 #define INFOCMP_PATH "$cf_path_prog"
8737 EOF
8738
8739         test -n "$cf_path_args" &&
8740 cat >>confdefs.h <<EOF
8741 #define INFOCMP_ARGS "$cf_path_args"
8742 EOF
8743
8744 fi
8745
8746                 if test -z "$INFOCMP"
8747                 then
8748                         { echo "$as_me:8748: WARNING: no infocmp program found for fallbacks" >&5
8749 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8750                 fi
8751
8752 fi;
8753
8754         test -z "$TIC" && FALLBACK_LIST=
8755         test -z "$INFOCMP" && FALLBACK_LIST=
8756         if test -z "$FALLBACK_LIST"
8757         then
8758                 { echo "$as_me:8758: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
8759 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
8760         fi
8761 fi
8762
8763 USE_FALLBACKS=
8764 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8765
8766 echo "$as_me:8766: checking if you want modern xterm or antique" >&5
8767 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8768
8769 # Check whether --with-xterm-new or --without-xterm-new was given.
8770 if test "${with_xterm_new+set}" = set; then
8771   withval="$with_xterm_new"
8772   with_xterm_new=$withval
8773 else
8774   with_xterm_new=yes
8775 fi;
8776 case "$with_xterm_new" in
8777 (no) with_xterm_new=xterm-old;;
8778 (*)      with_xterm_new=xterm-new;;
8779 esac
8780 echo "$as_me:8780: result: $with_xterm_new" >&5
8781 echo "${ECHO_T}$with_xterm_new" >&6
8782 WHICH_XTERM=$with_xterm_new
8783
8784 echo "$as_me:8784: checking if xterm backspace sends BS or DEL" >&5
8785 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8786
8787 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8788 if test "${with_xterm_kbs+set}" = set; then
8789   withval="$with_xterm_kbs"
8790   with_xterm_kbs=$withval
8791 else
8792   with_xterm_kbs=BS
8793 fi;
8794 case x$with_xterm_kbs in
8795 (xyes|xno|xBS|xbs|x8)
8796         with_xterm_kbs=BS
8797         ;;
8798 (xDEL|xdel|x127)
8799         with_xterm_kbs=DEL
8800         ;;
8801 (*)
8802         with_xterm_kbs=$withval
8803         ;;
8804 esac
8805 echo "$as_me:8805: result: $with_xterm_kbs" >&5
8806 echo "${ECHO_T}$with_xterm_kbs" >&6
8807 XTERM_KBS=$with_xterm_kbs
8808
8809 MAKE_TERMINFO=
8810 if test "$use_database" = no ; then
8811         TERMINFO="${datadir}/terminfo"
8812         MAKE_TERMINFO="#"
8813 else
8814
8815 echo "$as_me:8815: checking for list of terminfo directories" >&5
8816 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
8817
8818 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
8819 if test "${with_terminfo_dirs+set}" = set; then
8820   withval="$with_terminfo_dirs"
8821
8822 else
8823   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
8824 fi;
8825 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8826 cf_dst_path=
8827 for cf_src_path in $withval
8828 do
8829
8830 if test "x$prefix" != xNONE; then
8831         cf_path_syntax="$prefix"
8832 else
8833         cf_path_syntax="$ac_default_prefix"
8834 fi
8835
8836 case ".$cf_src_path" in
8837 (.\$\(*\)*|.\'*\'*)
8838         ;;
8839 (..|./*|.\\*)
8840         ;;
8841 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8842         ;;
8843 (.\$\{*prefix\}*|.\$\{*dir\}*)
8844         eval cf_src_path="$cf_src_path"
8845         case ".$cf_src_path" in
8846         (.NONE/*)
8847                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
8848                 ;;
8849         esac
8850         ;;
8851 (.no|.NONE/*)
8852         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
8853         ;;
8854 (*)
8855         { { echo "$as_me:8855: error: expected a pathname, not \"$cf_src_path\"" >&5
8856 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8857    { (exit 1); exit 1; }; }
8858         ;;
8859 esac
8860
8861   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8862   cf_dst_path="${cf_dst_path}${cf_src_path}"
8863 done
8864 IFS="$ac_save_ifs"
8865
8866 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8867 # so we have to check/work around.  We do prefer the result of "eval"...
8868 eval cf_dst_eval="$cf_dst_path"
8869 case "x$cf_dst_eval" in
8870 (xNONE*)
8871         TERMINFO_DIRS=$cf_dst_path
8872         ;;
8873 (*)
8874         TERMINFO_DIRS="$cf_dst_eval"
8875         ;;
8876 esac
8877
8878 echo "$as_me:8878: result: $TERMINFO_DIRS" >&5
8879 echo "${ECHO_T}$TERMINFO_DIRS" >&6
8880 test -n "$TERMINFO_DIRS" &&
8881 cat >>confdefs.h <<EOF
8882 #define TERMINFO_DIRS "$TERMINFO_DIRS"
8883 EOF
8884
8885 case "x$TERMINFO" in
8886 x???:*)
8887         { echo "$as_me:8887: WARNING: ignoring non-directory/file TERMINFO value" >&5
8888 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
8889         unset TERMINFO
8890         ;;
8891 esac
8892
8893 echo "$as_me:8893: checking for default terminfo directory" >&5
8894 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8895
8896 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8897 if test "${with_default_terminfo_dir+set}" = set; then
8898   withval="$with_default_terminfo_dir"
8899
8900 else
8901   withval="${TERMINFO:-${datadir}/terminfo}"
8902 fi; if test -n "${datadir}/terminfo" ; then
8903
8904 if test "x$prefix" != xNONE; then
8905         cf_path_syntax="$prefix"
8906 else
8907         cf_path_syntax="$ac_default_prefix"
8908 fi
8909
8910 case ".$withval" in
8911 (.\$\(*\)*|.\'*\'*)
8912         ;;
8913 (..|./*|.\\*)
8914         ;;
8915 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8916         ;;
8917 (.\$\{*prefix\}*|.\$\{*dir\}*)
8918         eval withval="$withval"
8919         case ".$withval" in
8920         (.NONE/*)
8921                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
8922                 ;;
8923         esac
8924         ;;
8925 (.no|.NONE/*)
8926         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
8927         ;;
8928 (*)
8929         { { echo "$as_me:8929: error: expected a pathname, not \"$withval\"" >&5
8930 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8931    { (exit 1); exit 1; }; }
8932         ;;
8933 esac
8934
8935 fi
8936 eval TERMINFO="$withval"
8937
8938 echo "$as_me:8938: result: $TERMINFO" >&5
8939 echo "${ECHO_T}$TERMINFO" >&6
8940
8941 cat >>confdefs.h <<EOF
8942 #define TERMINFO "$TERMINFO"
8943 EOF
8944
8945 fi
8946
8947 ###     use option --disable-big-core to make tic run on small machines
8948 ###     We need 4Mb, check if we can allocate 50% more than that.
8949 echo "$as_me:8949: checking if big-core option selected" >&5
8950 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
8951
8952 # Check whether --enable-big-core or --disable-big-core was given.
8953 if test "${enable_big_core+set}" = set; then
8954   enableval="$enable_big_core"
8955   with_big_core=$enableval
8956 else
8957   if test "$cross_compiling" = yes; then
8958   with_big_core=no
8959 else
8960   cat >"conftest.$ac_ext" <<_ACEOF
8961 #line 8961 "configure"
8962 #include "confdefs.h"
8963
8964 #include <stdlib.h>
8965 #include <string.h>
8966 int main() {
8967         unsigned long n = 6000000L;
8968         char *s = malloc(n);
8969         if (s != 0)
8970                 s[0] = s[n-1] = 0;
8971         ${cf_cv_main_return:-return}(s == 0);
8972 }
8973 _ACEOF
8974 rm -f "conftest$ac_exeext"
8975 if { (eval echo "$as_me:8975: \"$ac_link\"") >&5
8976   (eval $ac_link) 2>&5
8977   ac_status=$?
8978   echo "$as_me:8978: \$? = $ac_status" >&5
8979   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8980   { (eval echo "$as_me:8980: \"$ac_try\"") >&5
8981   (eval $ac_try) 2>&5
8982   ac_status=$?
8983   echo "$as_me:8983: \$? = $ac_status" >&5
8984   (exit "$ac_status"); }; }; then
8985   with_big_core=yes
8986 else
8987   echo "$as_me: program exited with status $ac_status" >&5
8988 echo "$as_me: failed program was:" >&5
8989 cat "conftest.$ac_ext" >&5
8990 with_big_core=no
8991 fi
8992 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8993 fi
8994 fi;
8995 echo "$as_me:8995: result: $with_big_core" >&5
8996 echo "${ECHO_T}$with_big_core" >&6
8997 test "x$with_big_core" = "xyes" &&
8998 cat >>confdefs.h <<\EOF
8999 #define HAVE_BIG_CORE 1
9000 EOF
9001
9002 ### ISO C only guarantees 512-char strings, we have tables which load faster
9003 ### when constructed using "big" strings.  More than the C compiler, the awk
9004 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9005 echo "$as_me:9005: checking if big-strings option selected" >&5
9006 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9007
9008 # Check whether --enable-big-strings or --disable-big-strings was given.
9009 if test "${enable_big_strings+set}" = set; then
9010   enableval="$enable_big_strings"
9011   with_big_strings=$enableval
9012 else
9013
9014         case x$AWK in
9015         (x)
9016                 eval with_big_strings=no
9017                 ;;
9018         (*)
9019                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9020                         | $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
9021                         eval with_big_strings=yes
9022                 else
9023                         eval with_big_strings=no
9024                 fi
9025                 ;;
9026         esac
9027
9028 fi;
9029 echo "$as_me:9029: result: $with_big_strings" >&5
9030 echo "${ECHO_T}$with_big_strings" >&6
9031
9032 USE_BIG_STRINGS=0
9033 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9034
9035 ###     use option --enable-termcap to compile in the termcap fallback support
9036 echo "$as_me:9036: checking if you want termcap-fallback support" >&5
9037 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9038
9039 # Check whether --enable-termcap or --disable-termcap was given.
9040 if test "${enable_termcap+set}" = set; then
9041   enableval="$enable_termcap"
9042   with_termcap=$enableval
9043 else
9044   with_termcap=no
9045 fi;
9046 echo "$as_me:9046: result: $with_termcap" >&5
9047 echo "${ECHO_T}$with_termcap" >&6
9048
9049 NCURSES_USE_TERMCAP=0
9050 if test "x$with_termcap" != "xyes" ; then
9051         if test "$use_database" = no ; then
9052                 if test -z "$with_fallback" ; then
9053                         { { echo "$as_me:9053: error: You have disabled the database w/o specifying fallbacks" >&5
9054 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9055    { (exit 1); exit 1; }; }
9056                 fi
9057         fi
9058
9059 cat >>confdefs.h <<\EOF
9060 #define PURE_TERMINFO 1
9061 EOF
9062
9063 else
9064
9065         if test "$with_ticlib" != no ; then
9066                 { { echo "$as_me:9066: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9067 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9068    { (exit 1); exit 1; }; }
9069         fi
9070
9071         NCURSES_USE_TERMCAP=1
9072         echo "$as_me:9072: checking for list of termcap files" >&5
9073 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9074
9075 # Check whether --with-termpath or --without-termpath was given.
9076 if test "${with_termpath+set}" = set; then
9077   withval="$with_termpath"
9078
9079 else
9080   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9081 fi;
9082 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9083 cf_dst_path=
9084 for cf_src_path in $withval
9085 do
9086
9087 if test "x$prefix" != xNONE; then
9088         cf_path_syntax="$prefix"
9089 else
9090         cf_path_syntax="$ac_default_prefix"
9091 fi
9092
9093 case ".$cf_src_path" in
9094 (.\$\(*\)*|.\'*\'*)
9095         ;;
9096 (..|./*|.\\*)
9097         ;;
9098 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9099         ;;
9100 (.\$\{*prefix\}*|.\$\{*dir\}*)
9101         eval cf_src_path="$cf_src_path"
9102         case ".$cf_src_path" in
9103         (.NONE/*)
9104                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9105                 ;;
9106         esac
9107         ;;
9108 (.no|.NONE/*)
9109         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9110         ;;
9111 (*)
9112         { { echo "$as_me:9112: error: expected a pathname, not \"$cf_src_path\"" >&5
9113 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9114    { (exit 1); exit 1; }; }
9115         ;;
9116 esac
9117
9118   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9119   cf_dst_path="${cf_dst_path}${cf_src_path}"
9120 done
9121 IFS="$ac_save_ifs"
9122
9123 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9124 # so we have to check/work around.  We do prefer the result of "eval"...
9125 eval cf_dst_eval="$cf_dst_path"
9126 case "x$cf_dst_eval" in
9127 (xNONE*)
9128         TERMPATH=$cf_dst_path
9129         ;;
9130 (*)
9131         TERMPATH="$cf_dst_eval"
9132         ;;
9133 esac
9134
9135         echo "$as_me:9135: result: $TERMPATH" >&5
9136 echo "${ECHO_T}$TERMPATH" >&6
9137         test -n "$TERMPATH" &&
9138 cat >>confdefs.h <<EOF
9139 #define TERMPATH "$TERMPATH"
9140 EOF
9141
9142         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9143         echo "$as_me:9143: checking if fast termcap-loader is needed" >&5
9144 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9145
9146 # Check whether --enable-getcap or --disable-getcap was given.
9147 if test "${enable_getcap+set}" = set; then
9148   enableval="$enable_getcap"
9149   with_getcap=$enableval
9150 else
9151   with_getcap=no
9152 fi;
9153         echo "$as_me:9153: result: $with_getcap" >&5
9154 echo "${ECHO_T}$with_getcap" >&6
9155         test "x$with_getcap" = "xyes" &&
9156 cat >>confdefs.h <<\EOF
9157 #define USE_GETCAP 1
9158 EOF
9159
9160         echo "$as_me:9160: checking if translated termcaps will be cached in ~/.terminfo" >&5
9161 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9162
9163 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9164 if test "${enable_getcap_cache+set}" = set; then
9165   enableval="$enable_getcap_cache"
9166   with_getcap_cache=$enableval
9167 else
9168   with_getcap_cache=no
9169 fi;
9170         echo "$as_me:9170: result: $with_getcap_cache" >&5
9171 echo "${ECHO_T}$with_getcap_cache" >&6
9172         test "x$with_getcap_cache" = "xyes" &&
9173 cat >>confdefs.h <<\EOF
9174 #define USE_GETCAP_CACHE 1
9175 EOF
9176
9177 fi
9178
9179 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9180 echo "$as_me:9180: checking if ~/.terminfo is wanted" >&5
9181 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9182
9183 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9184 if test "${enable_home_terminfo+set}" = set; then
9185   enableval="$enable_home_terminfo"
9186   with_home_terminfo=$enableval
9187 else
9188   with_home_terminfo=yes
9189 fi;
9190 echo "$as_me:9190: result: $with_home_terminfo" >&5
9191 echo "${ECHO_T}$with_home_terminfo" >&6
9192 test "x$with_home_terminfo" = "xyes" &&
9193 cat >>confdefs.h <<\EOF
9194 #define USE_HOME_TERMINFO 1
9195 EOF
9196
9197 echo "$as_me:9197: checking if you want to use restricted environment when running as root" >&5
9198 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
9199
9200 # Check whether --enable-root-environ or --disable-root-environ was given.
9201 if test "${enable_root_environ+set}" = set; then
9202   enableval="$enable_root_environ"
9203   with_root_environ=$enableval
9204 else
9205   with_root_environ=yes
9206 fi;
9207 echo "$as_me:9207: result: $with_root_environ" >&5
9208 echo "${ECHO_T}$with_root_environ" >&6
9209 test "x$with_root_environ" = xyes &&
9210 cat >>confdefs.h <<\EOF
9211 #define USE_ROOT_ENVIRON 1
9212 EOF
9213
9214 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9215 ###   to reduce storage requirements for the terminfo database.
9216
9217 for ac_header in \
9218 unistd.h \
9219
9220 do
9221 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9222 echo "$as_me:9222: checking for $ac_header" >&5
9223 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9224 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9225   echo $ECHO_N "(cached) $ECHO_C" >&6
9226 else
9227   cat >"conftest.$ac_ext" <<_ACEOF
9228 #line 9228 "configure"
9229 #include "confdefs.h"
9230 #include <$ac_header>
9231 _ACEOF
9232 if { (eval echo "$as_me:9232: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9233   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9234   ac_status=$?
9235   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9236   rm -f conftest.er1
9237   cat conftest.err >&5
9238   echo "$as_me:9238: \$? = $ac_status" >&5
9239   (exit "$ac_status"); } >/dev/null; then
9240   if test -s conftest.err; then
9241     ac_cpp_err=$ac_c_preproc_warn_flag
9242   else
9243     ac_cpp_err=
9244   fi
9245 else
9246   ac_cpp_err=yes
9247 fi
9248 if test -z "$ac_cpp_err"; then
9249   eval "$as_ac_Header=yes"
9250 else
9251   echo "$as_me: failed program was:" >&5
9252   cat "conftest.$ac_ext" >&5
9253   eval "$as_ac_Header=no"
9254 fi
9255 rm -f conftest.err "conftest.$ac_ext"
9256 fi
9257 echo "$as_me:9257: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9258 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9259 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9260   cat >>confdefs.h <<EOF
9261 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9262 EOF
9263
9264 fi
9265 done
9266
9267 for ac_func in \
9268         remove \
9269         unlink
9270 do
9271 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9272 echo "$as_me:9272: checking for $ac_func" >&5
9273 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9274 if eval "test \"\${$as_ac_var+set}\" = set"; then
9275   echo $ECHO_N "(cached) $ECHO_C" >&6
9276 else
9277   cat >"conftest.$ac_ext" <<_ACEOF
9278 #line 9278 "configure"
9279 #include "confdefs.h"
9280 #define $ac_func autoconf_temporary
9281 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9282 #undef $ac_func
9283
9284 #ifdef __cplusplus
9285 extern "C"
9286 #endif
9287
9288 /* We use char because int might match the return type of a gcc2
9289    builtin and then its argument prototype would still apply.  */
9290 char $ac_func (void);
9291
9292 int
9293 main (void)
9294 {
9295
9296 /* The GNU C library defines stubs for functions which it implements
9297     to always fail with ENOSYS.  Some functions are actually named
9298     something starting with __ and the normal name is an alias.  */
9299 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9300 #error found stub for $ac_func
9301 #endif
9302
9303         return $ac_func ();
9304   ;
9305   return 0;
9306 }
9307 _ACEOF
9308 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9309 if { (eval echo "$as_me:9309: \"$ac_link\"") >&5
9310   (eval $ac_link) 2>&5
9311   ac_status=$?
9312   echo "$as_me:9312: \$? = $ac_status" >&5
9313   (exit "$ac_status"); } &&
9314          { ac_try='test -s "conftest$ac_exeext"'
9315   { (eval echo "$as_me:9315: \"$ac_try\"") >&5
9316   (eval $ac_try) 2>&5
9317   ac_status=$?
9318   echo "$as_me:9318: \$? = $ac_status" >&5
9319   (exit "$ac_status"); }; }; then
9320   eval "$as_ac_var=yes"
9321 else
9322   echo "$as_me: failed program was:" >&5
9323 cat "conftest.$ac_ext" >&5
9324 eval "$as_ac_var=no"
9325 fi
9326 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9327 fi
9328 echo "$as_me:9328: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9329 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9330 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9331   cat >>confdefs.h <<EOF
9332 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9333 EOF
9334
9335 fi
9336 done
9337
9338 if test "$cross_compiling" = yes ; then
9339
9340 for ac_func in \
9341                 link \
9342                 symlink
9343 do
9344 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9345 echo "$as_me:9345: checking for $ac_func" >&5
9346 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9347 if eval "test \"\${$as_ac_var+set}\" = set"; then
9348   echo $ECHO_N "(cached) $ECHO_C" >&6
9349 else
9350   cat >"conftest.$ac_ext" <<_ACEOF
9351 #line 9351 "configure"
9352 #include "confdefs.h"
9353 #define $ac_func autoconf_temporary
9354 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9355 #undef $ac_func
9356
9357 #ifdef __cplusplus
9358 extern "C"
9359 #endif
9360
9361 /* We use char because int might match the return type of a gcc2
9362    builtin and then its argument prototype would still apply.  */
9363 char $ac_func (void);
9364
9365 int
9366 main (void)
9367 {
9368
9369 /* The GNU C library defines stubs for functions which it implements
9370     to always fail with ENOSYS.  Some functions are actually named
9371     something starting with __ and the normal name is an alias.  */
9372 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9373 #error found stub for $ac_func
9374 #endif
9375
9376         return $ac_func ();
9377   ;
9378   return 0;
9379 }
9380 _ACEOF
9381 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9382 if { (eval echo "$as_me:9382: \"$ac_link\"") >&5
9383   (eval $ac_link) 2>&5
9384   ac_status=$?
9385   echo "$as_me:9385: \$? = $ac_status" >&5
9386   (exit "$ac_status"); } &&
9387          { ac_try='test -s "conftest$ac_exeext"'
9388   { (eval echo "$as_me:9388: \"$ac_try\"") >&5
9389   (eval $ac_try) 2>&5
9390   ac_status=$?
9391   echo "$as_me:9391: \$? = $ac_status" >&5
9392   (exit "$ac_status"); }; }; then
9393   eval "$as_ac_var=yes"
9394 else
9395   echo "$as_me: failed program was:" >&5
9396 cat "conftest.$ac_ext" >&5
9397 eval "$as_ac_var=no"
9398 fi
9399 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9400 fi
9401 echo "$as_me:9401: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9402 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9403 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9404   cat >>confdefs.h <<EOF
9405 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9406 EOF
9407
9408 fi
9409 done
9410
9411 else
9412         echo "$as_me:9412: checking if link/symlink functions work" >&5
9413 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9414 if test "${cf_cv_link_funcs+set}" = set; then
9415   echo $ECHO_N "(cached) $ECHO_C" >&6
9416 else
9417
9418                 cf_cv_link_funcs=
9419                 for cf_func in link symlink ; do
9420                         if test "$cross_compiling" = yes; then
9421
9422                         eval 'ac_cv_func_'$cf_func'=error'
9423 else
9424   cat >"conftest.$ac_ext" <<_ACEOF
9425 #line 9425 "configure"
9426 #include "confdefs.h"
9427
9428 #include <sys/types.h>
9429 #include <sys/stat.h>
9430 #ifdef HAVE_UNISTD_H
9431 #include <unistd.h>
9432 #endif
9433 int main(void)
9434 {
9435         int fail = 0;
9436         char *src = "config.log";
9437         char *dst = "conftest.chk";
9438         struct stat src_sb;
9439         struct stat dst_sb;
9440
9441         stat(src, &src_sb);
9442         fail = ($cf_func("config.log", "conftest.chk") < 0)
9443             || (stat(dst, &dst_sb) < 0)
9444             || (dst_sb.st_mtime != src_sb.st_mtime);
9445 #ifdef HAVE_UNLINK
9446         unlink(dst);
9447 #else
9448         remove(dst);
9449 #endif
9450         ${cf_cv_main_return:-return} (fail);
9451 }
9452
9453 _ACEOF
9454 rm -f "conftest$ac_exeext"
9455 if { (eval echo "$as_me:9455: \"$ac_link\"") >&5
9456   (eval $ac_link) 2>&5
9457   ac_status=$?
9458   echo "$as_me:9458: \$? = $ac_status" >&5
9459   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9460   { (eval echo "$as_me:9460: \"$ac_try\"") >&5
9461   (eval $ac_try) 2>&5
9462   ac_status=$?
9463   echo "$as_me:9463: \$? = $ac_status" >&5
9464   (exit "$ac_status"); }; }; then
9465
9466                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9467                         eval 'ac_cv_func_'$cf_func'=yes'
9468 else
9469   echo "$as_me: program exited with status $ac_status" >&5
9470 echo "$as_me: failed program was:" >&5
9471 cat "conftest.$ac_ext" >&5
9472
9473                         eval 'ac_cv_func_'$cf_func'=no'
9474 fi
9475 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9476 fi
9477                 done
9478                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9479
9480 fi
9481 echo "$as_me:9481: result: $cf_cv_link_funcs" >&5
9482 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9483         test "$ac_cv_func_link"    = yes &&
9484 cat >>confdefs.h <<\EOF
9485 #define HAVE_LINK 1
9486 EOF
9487
9488         test "$ac_cv_func_symlink" = yes &&
9489 cat >>confdefs.h <<\EOF
9490 #define HAVE_SYMLINK 1
9491 EOF
9492
9493 fi
9494
9495 with_links=no
9496 with_symlinks=no
9497
9498 # soft links (symbolic links) are useful for some systems where hard links do
9499 # not work, or to make it simpler to copy terminfo trees around.
9500 if test "x$ac_cv_func_symlink" = xyes ; then
9501         echo "$as_me:9501: checking if tic should use symbolic links" >&5
9502 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9503
9504 # Check whether --enable-symlinks or --disable-symlinks was given.
9505 if test "${enable_symlinks+set}" = set; then
9506   enableval="$enable_symlinks"
9507   with_symlinks=$enableval
9508 else
9509   with_symlinks=no
9510 fi;
9511         echo "$as_me:9511: result: $with_symlinks" >&5
9512 echo "${ECHO_T}$with_symlinks" >&6
9513 fi
9514
9515 # If we have hard links and did not choose to use soft links instead, there is
9516 # no reason to make this choice optional - use the hard links.
9517 if test "$with_symlinks" = no ; then
9518         echo "$as_me:9518: checking if tic should use hard links" >&5
9519 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9520         if test "x$ac_cv_func_link" = xyes ; then
9521                 with_links=yes
9522         else
9523                 with_links=no
9524         fi
9525         echo "$as_me:9525: result: $with_links" >&5
9526 echo "${ECHO_T}$with_links" >&6
9527 fi
9528
9529 test "x$with_links" = xyes &&
9530 cat >>confdefs.h <<\EOF
9531 #define USE_LINKS 1
9532 EOF
9533
9534 test "x$with_symlinks" = xyes &&
9535 cat >>confdefs.h <<\EOF
9536 #define USE_SYMLINKS 1
9537 EOF
9538
9539 ###   use option --enable-broken-linker to force on use of broken-linker support
9540
9541 echo "$as_me:9541: checking if you want broken-linker support code" >&5
9542 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9543
9544 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9545 if test "${enable_broken_linker+set}" = set; then
9546   enableval="$enable_broken_linker"
9547   with_broken_linker=$enableval
9548 else
9549   with_broken_linker=no
9550 fi;
9551 echo "$as_me:9551: result: $with_broken_linker" >&5
9552 echo "${ECHO_T}$with_broken_linker" >&6
9553
9554 : "${BROKEN_LINKER:=0}"
9555 if test "x$with_broken_linker" = xyes ; then
9556
9557 cat >>confdefs.h <<\EOF
9558 #define BROKEN_LINKER 1
9559 EOF
9560
9561         BROKEN_LINKER=1
9562 fi
9563
9564 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9565 echo "$as_me:9565: checking if tputs should process BSD-style prefix padding" >&5
9566 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9567
9568 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9569 if test "${enable_bsdpad+set}" = set; then
9570   enableval="$enable_bsdpad"
9571   with_bsdpad=$enableval
9572 else
9573   with_bsdpad=no
9574 fi;
9575 echo "$as_me:9575: result: $with_bsdpad" >&5
9576 echo "${ECHO_T}$with_bsdpad" >&6
9577 test "x$with_bsdpad" = xyes &&
9578 cat >>confdefs.h <<\EOF
9579 #define BSD_TPUTS 1
9580 EOF
9581
9582 ###   use option --enable-widec to turn on use of wide-character support
9583 NCURSES_CH_T=chtype
9584 NCURSES_LIBUTF8=0
9585
9586 NEED_WCHAR_H=0
9587 NCURSES_MBSTATE_T=0
9588 NCURSES_WCHAR_T=0
9589 NCURSES_WINT_T=0
9590
9591 # Check to define _XOPEN_SOURCE "automatically"
9592 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9593
9594 echo "$as_me:9594: checking if the POSIX test-macros are already defined" >&5
9595 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9596 if test "${cf_cv_posix_visible+set}" = set; then
9597   echo $ECHO_N "(cached) $ECHO_C" >&6
9598 else
9599
9600 cat >"conftest.$ac_ext" <<_ACEOF
9601 #line 9601 "configure"
9602 #include "confdefs.h"
9603 #include <stdio.h>
9604 int
9605 main (void)
9606 {
9607
9608 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9609         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9610         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9611         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9612 #error conflicting symbols found
9613 #endif
9614
9615   ;
9616   return 0;
9617 }
9618 _ACEOF
9619 rm -f "conftest.$ac_objext"
9620 if { (eval echo "$as_me:9620: \"$ac_compile\"") >&5
9621   (eval $ac_compile) 2>&5
9622   ac_status=$?
9623   echo "$as_me:9623: \$? = $ac_status" >&5
9624   (exit "$ac_status"); } &&
9625          { ac_try='test -s "conftest.$ac_objext"'
9626   { (eval echo "$as_me:9626: \"$ac_try\"") >&5
9627   (eval $ac_try) 2>&5
9628   ac_status=$?
9629   echo "$as_me:9629: \$? = $ac_status" >&5
9630   (exit "$ac_status"); }; }; then
9631   cf_cv_posix_visible=no
9632 else
9633   echo "$as_me: failed program was:" >&5
9634 cat "conftest.$ac_ext" >&5
9635 cf_cv_posix_visible=yes
9636 fi
9637 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9638
9639 fi
9640 echo "$as_me:9640: result: $cf_cv_posix_visible" >&5
9641 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9642
9643 if test "$cf_cv_posix_visible" = no; then
9644
9645 cf_XOPEN_SOURCE=600
9646 cf_POSIX_C_SOURCE=199506L
9647 cf_xopen_source=
9648
9649 case "$host_os" in
9650 (aix[4-7]*)
9651         cf_xopen_source="-D_ALL_SOURCE"
9652         ;;
9653 (msys)
9654         cf_XOPEN_SOURCE=600
9655         ;;
9656 (darwin[0-8].*)
9657         cf_xopen_source="-D_APPLE_C_SOURCE"
9658         ;;
9659 (darwin*)
9660         cf_xopen_source="-D_DARWIN_C_SOURCE"
9661         cf_XOPEN_SOURCE=
9662         ;;
9663 (freebsd*|dragonfly*|midnightbsd*)
9664         # 5.x headers associate
9665         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9666         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9667         cf_POSIX_C_SOURCE=200112L
9668         cf_XOPEN_SOURCE=600
9669         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9670         ;;
9671 (hpux11*)
9672         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9673         ;;
9674 (hpux*)
9675         cf_xopen_source="-D_HPUX_SOURCE"
9676         ;;
9677 (irix[56].*)
9678         cf_xopen_source="-D_SGI_SOURCE"
9679         cf_XOPEN_SOURCE=
9680         ;;
9681 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9682
9683 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9684
9685 echo "$as_me:9685: checking if this is the GNU C library" >&5
9686 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9687 if test "${cf_cv_gnu_library+set}" = set; then
9688   echo $ECHO_N "(cached) $ECHO_C" >&6
9689 else
9690
9691 cat >"conftest.$ac_ext" <<_ACEOF
9692 #line 9692 "configure"
9693 #include "confdefs.h"
9694 #include <sys/types.h>
9695 int
9696 main (void)
9697 {
9698
9699         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9700                 return 0;
9701         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9702                 return 0;
9703         #else
9704         #       error not GNU C library
9705         #endif
9706   ;
9707   return 0;
9708 }
9709 _ACEOF
9710 rm -f "conftest.$ac_objext"
9711 if { (eval echo "$as_me:9711: \"$ac_compile\"") >&5
9712   (eval $ac_compile) 2>&5
9713   ac_status=$?
9714   echo "$as_me:9714: \$? = $ac_status" >&5
9715   (exit "$ac_status"); } &&
9716          { ac_try='test -s "conftest.$ac_objext"'
9717   { (eval echo "$as_me:9717: \"$ac_try\"") >&5
9718   (eval $ac_try) 2>&5
9719   ac_status=$?
9720   echo "$as_me:9720: \$? = $ac_status" >&5
9721   (exit "$ac_status"); }; }; then
9722   cf_cv_gnu_library=yes
9723 else
9724   echo "$as_me: failed program was:" >&5
9725 cat "conftest.$ac_ext" >&5
9726 cf_cv_gnu_library=no
9727 fi
9728 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9729
9730 fi
9731 echo "$as_me:9731: result: $cf_cv_gnu_library" >&5
9732 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9733
9734 if test x$cf_cv_gnu_library = xyes; then
9735
9736         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9737         # was changed to help a little.  newlib incorporated the change about 4
9738         # years later.
9739         echo "$as_me:9739: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9740 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9741 if test "${cf_cv_gnu_library_219+set}" = set; then
9742   echo $ECHO_N "(cached) $ECHO_C" >&6
9743 else
9744
9745                 cf_save="$CPPFLAGS"
9746
9747         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9748         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9749
9750                 cat >"conftest.$ac_ext" <<_ACEOF
9751 #line 9751 "configure"
9752 #include "confdefs.h"
9753 #include <sys/types.h>
9754 int
9755 main (void)
9756 {
9757
9758                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9759                                 return 0;
9760                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9761                                 return 0;
9762                         #else
9763                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9764                         #endif
9765   ;
9766   return 0;
9767 }
9768 _ACEOF
9769 rm -f "conftest.$ac_objext"
9770 if { (eval echo "$as_me:9770: \"$ac_compile\"") >&5
9771   (eval $ac_compile) 2>&5
9772   ac_status=$?
9773   echo "$as_me:9773: \$? = $ac_status" >&5
9774   (exit "$ac_status"); } &&
9775          { ac_try='test -s "conftest.$ac_objext"'
9776   { (eval echo "$as_me:9776: \"$ac_try\"") >&5
9777   (eval $ac_try) 2>&5
9778   ac_status=$?
9779   echo "$as_me:9779: \$? = $ac_status" >&5
9780   (exit "$ac_status"); }; }; then
9781   cf_cv_gnu_library_219=yes
9782 else
9783   echo "$as_me: failed program was:" >&5
9784 cat "conftest.$ac_ext" >&5
9785 cf_cv_gnu_library_219=no
9786 fi
9787 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9788                 CPPFLAGS="$cf_save"
9789
9790 fi
9791 echo "$as_me:9791: result: $cf_cv_gnu_library_219" >&5
9792 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
9793
9794         if test "x$cf_cv_gnu_library_219" = xyes; then
9795                 cf_save="$CPPFLAGS"
9796                 echo "$as_me:9796: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
9797 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
9798 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
9799   echo $ECHO_N "(cached) $ECHO_C" >&6
9800 else
9801
9802 cf_fix_cppflags=no
9803 cf_new_cflags=
9804 cf_new_cppflags=
9805 cf_new_extra_cppflags=
9806
9807 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
9808 do
9809 case "$cf_fix_cppflags" in
9810 (no)
9811         case "$cf_add_cflags" in
9812         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9813                 case "$cf_add_cflags" in
9814                 (-D*)
9815                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9816
9817                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9818                                 && test -z "${cf_tst_cflags}" \
9819                                 && cf_fix_cppflags=yes
9820
9821                         if test "$cf_fix_cppflags" = yes ; then
9822
9823         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9824         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9825
9826                                 continue
9827                         elif test "${cf_tst_cflags}" = "\"'" ; then
9828
9829         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9830         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9831
9832                                 continue
9833                         fi
9834                         ;;
9835                 esac
9836                 case "$CPPFLAGS" in
9837                 (*$cf_add_cflags)
9838                         ;;
9839                 (*)
9840                         case "$cf_add_cflags" in
9841                         (-D*)
9842                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9843
9844 CPPFLAGS=`echo "$CPPFLAGS" | \
9845         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9846                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9847
9848                                 ;;
9849                         esac
9850
9851         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9852         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9853
9854                         ;;
9855                 esac
9856                 ;;
9857         (*)
9858
9859         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9860         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9861
9862                 ;;
9863         esac
9864         ;;
9865 (yes)
9866
9867         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9868         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9869
9870         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9871
9872         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9873                 && test -z "${cf_tst_cflags}" \
9874                 && cf_fix_cppflags=no
9875         ;;
9876 esac
9877 done
9878
9879 if test -n "$cf_new_cflags" ; then
9880
9881         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9882         CFLAGS="${CFLAGS}$cf_new_cflags"
9883
9884 fi
9885
9886 if test -n "$cf_new_cppflags" ; then
9887
9888         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9889         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9890
9891 fi
9892
9893 if test -n "$cf_new_extra_cppflags" ; then
9894
9895         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9896         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9897
9898 fi
9899
9900                         cat >"conftest.$ac_ext" <<_ACEOF
9901 #line 9901 "configure"
9902 #include "confdefs.h"
9903
9904                                 #include <limits.h>
9905                                 #include <sys/types.h>
9906
9907 int
9908 main (void)
9909 {
9910
9911                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
9912                                         return 0;
9913                                 #else
9914                                 #       error GNU C library is too old
9915                                 #endif
9916   ;
9917   return 0;
9918 }
9919 _ACEOF
9920 rm -f "conftest.$ac_objext"
9921 if { (eval echo "$as_me:9921: \"$ac_compile\"") >&5
9922   (eval $ac_compile) 2>&5
9923   ac_status=$?
9924   echo "$as_me:9924: \$? = $ac_status" >&5
9925   (exit "$ac_status"); } &&
9926          { ac_try='test -s "conftest.$ac_objext"'
9927   { (eval echo "$as_me:9927: \"$ac_try\"") >&5
9928   (eval $ac_try) 2>&5
9929   ac_status=$?
9930   echo "$as_me:9930: \$? = $ac_status" >&5
9931   (exit "$ac_status"); }; }; then
9932   cf_cv_gnu_dftsrc_219=yes
9933 else
9934   echo "$as_me: failed program was:" >&5
9935 cat "conftest.$ac_ext" >&5
9936 cf_cv_gnu_dftsrc_219=no
9937 fi
9938 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9939
9940 fi
9941 echo "$as_me:9941: result: $cf_cv_gnu_dftsrc_219" >&5
9942 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
9943                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9944         else
9945                 cf_cv_gnu_dftsrc_219=maybe
9946         fi
9947
9948         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9949
9950                 echo "$as_me:9950: checking if we must define _GNU_SOURCE" >&5
9951 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9952 if test "${cf_cv_gnu_source+set}" = set; then
9953   echo $ECHO_N "(cached) $ECHO_C" >&6
9954 else
9955
9956                 cat >"conftest.$ac_ext" <<_ACEOF
9957 #line 9957 "configure"
9958 #include "confdefs.h"
9959 #include <sys/types.h>
9960 int
9961 main (void)
9962 {
9963
9964                         #ifndef _XOPEN_SOURCE
9965                         #error  expected _XOPEN_SOURCE to be defined
9966                         #endif
9967   ;
9968   return 0;
9969 }
9970 _ACEOF
9971 rm -f "conftest.$ac_objext"
9972 if { (eval echo "$as_me:9972: \"$ac_compile\"") >&5
9973   (eval $ac_compile) 2>&5
9974   ac_status=$?
9975   echo "$as_me:9975: \$? = $ac_status" >&5
9976   (exit "$ac_status"); } &&
9977          { ac_try='test -s "conftest.$ac_objext"'
9978   { (eval echo "$as_me:9978: \"$ac_try\"") >&5
9979   (eval $ac_try) 2>&5
9980   ac_status=$?
9981   echo "$as_me:9981: \$? = $ac_status" >&5
9982   (exit "$ac_status"); }; }; then
9983   cf_cv_gnu_source=no
9984 else
9985   echo "$as_me: failed program was:" >&5
9986 cat "conftest.$ac_ext" >&5
9987 cf_save="$CPPFLAGS"
9988
9989 cf_fix_cppflags=no
9990 cf_new_cflags=
9991 cf_new_cppflags=
9992 cf_new_extra_cppflags=
9993
9994 for cf_add_cflags in -D_GNU_SOURCE
9995 do
9996 case "$cf_fix_cppflags" in
9997 (no)
9998         case "$cf_add_cflags" in
9999         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10000                 case "$cf_add_cflags" in
10001                 (-D*)
10002                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10003
10004                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10005                                 && test -z "${cf_tst_cflags}" \
10006                                 && cf_fix_cppflags=yes
10007
10008                         if test "$cf_fix_cppflags" = yes ; then
10009
10010         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10011         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10012
10013                                 continue
10014                         elif test "${cf_tst_cflags}" = "\"'" ; then
10015
10016         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10017         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10018
10019                                 continue
10020                         fi
10021                         ;;
10022                 esac
10023                 case "$CPPFLAGS" in
10024                 (*$cf_add_cflags)
10025                         ;;
10026                 (*)
10027                         case "$cf_add_cflags" in
10028                         (-D*)
10029                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10030
10031 CPPFLAGS=`echo "$CPPFLAGS" | \
10032         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10033                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10034
10035                                 ;;
10036                         esac
10037
10038         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10039         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10040
10041                         ;;
10042                 esac
10043                 ;;
10044         (*)
10045
10046         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10047         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10048
10049                 ;;
10050         esac
10051         ;;
10052 (yes)
10053
10054         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10055         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10056
10057         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10058
10059         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10060                 && test -z "${cf_tst_cflags}" \
10061                 && cf_fix_cppflags=no
10062         ;;
10063 esac
10064 done
10065
10066 if test -n "$cf_new_cflags" ; then
10067
10068         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10069         CFLAGS="${CFLAGS}$cf_new_cflags"
10070
10071 fi
10072
10073 if test -n "$cf_new_cppflags" ; then
10074
10075         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10076         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10077
10078 fi
10079
10080 if test -n "$cf_new_extra_cppflags" ; then
10081
10082         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10083         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10084
10085 fi
10086
10087                          cat >"conftest.$ac_ext" <<_ACEOF
10088 #line 10088 "configure"
10089 #include "confdefs.h"
10090 #include <sys/types.h>
10091 int
10092 main (void)
10093 {
10094
10095                                 #ifdef _XOPEN_SOURCE
10096                                 #error  expected _XOPEN_SOURCE to be undefined
10097                                 #endif
10098   ;
10099   return 0;
10100 }
10101 _ACEOF
10102 rm -f "conftest.$ac_objext"
10103 if { (eval echo "$as_me:10103: \"$ac_compile\"") >&5
10104   (eval $ac_compile) 2>&5
10105   ac_status=$?
10106   echo "$as_me:10106: \$? = $ac_status" >&5
10107   (exit "$ac_status"); } &&
10108          { ac_try='test -s "conftest.$ac_objext"'
10109   { (eval echo "$as_me:10109: \"$ac_try\"") >&5
10110   (eval $ac_try) 2>&5
10111   ac_status=$?
10112   echo "$as_me:10112: \$? = $ac_status" >&5
10113   (exit "$ac_status"); }; }; then
10114   cf_cv_gnu_source=no
10115 else
10116   echo "$as_me: failed program was:" >&5
10117 cat "conftest.$ac_ext" >&5
10118 cf_cv_gnu_source=yes
10119 fi
10120 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10121                         CPPFLAGS="$cf_save"
10122
10123 fi
10124 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10125
10126 fi
10127 echo "$as_me:10127: result: $cf_cv_gnu_source" >&5
10128 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10129
10130                 if test "$cf_cv_gnu_source" = yes
10131                 then
10132                 echo "$as_me:10132: checking if we should also define _DEFAULT_SOURCE" >&5
10133 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10134 if test "${cf_cv_default_source+set}" = set; then
10135   echo $ECHO_N "(cached) $ECHO_C" >&6
10136 else
10137
10138         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10139         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10140
10141                         cat >"conftest.$ac_ext" <<_ACEOF
10142 #line 10142 "configure"
10143 #include "confdefs.h"
10144 #include <sys/types.h>
10145 int
10146 main (void)
10147 {
10148
10149                                 #ifdef _DEFAULT_SOURCE
10150                                 #error  expected _DEFAULT_SOURCE to be undefined
10151                                 #endif
10152   ;
10153   return 0;
10154 }
10155 _ACEOF
10156 rm -f "conftest.$ac_objext"
10157 if { (eval echo "$as_me:10157: \"$ac_compile\"") >&5
10158   (eval $ac_compile) 2>&5
10159   ac_status=$?
10160   echo "$as_me:10160: \$? = $ac_status" >&5
10161   (exit "$ac_status"); } &&
10162          { ac_try='test -s "conftest.$ac_objext"'
10163   { (eval echo "$as_me:10163: \"$ac_try\"") >&5
10164   (eval $ac_try) 2>&5
10165   ac_status=$?
10166   echo "$as_me:10166: \$? = $ac_status" >&5
10167   (exit "$ac_status"); }; }; then
10168   cf_cv_default_source=no
10169 else
10170   echo "$as_me: failed program was:" >&5
10171 cat "conftest.$ac_ext" >&5
10172 cf_cv_default_source=yes
10173 fi
10174 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10175
10176 fi
10177 echo "$as_me:10177: result: $cf_cv_default_source" >&5
10178 echo "${ECHO_T}$cf_cv_default_source" >&6
10179                         if test "$cf_cv_default_source" = yes
10180                         then
10181
10182         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10183         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10184
10185                         fi
10186                 fi
10187         fi
10188
10189 fi
10190
10191         ;;
10192 (minix*)
10193         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10194         ;;
10195 (mirbsd*)
10196         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10197         cf_XOPEN_SOURCE=
10198
10199 if test "$cf_cv_posix_visible" = no; then
10200
10201 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10202
10203 cf_save_CFLAGS="$CFLAGS"
10204 cf_save_CPPFLAGS="$CPPFLAGS"
10205
10206 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10207         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10208                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10209
10210 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10211         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10212                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10213
10214 echo "$as_me:10214: checking if we should define _POSIX_C_SOURCE" >&5
10215 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10216 if test "${cf_cv_posix_c_source+set}" = set; then
10217   echo $ECHO_N "(cached) $ECHO_C" >&6
10218 else
10219
10220 echo "${as_me:-configure}:10220: testing if the symbol is already defined go no further ..." 1>&5
10221
10222         cat >"conftest.$ac_ext" <<_ACEOF
10223 #line 10223 "configure"
10224 #include "confdefs.h"
10225 #include <sys/types.h>
10226 int
10227 main (void)
10228 {
10229
10230 #ifndef _POSIX_C_SOURCE
10231 make an error
10232 #endif
10233   ;
10234   return 0;
10235 }
10236 _ACEOF
10237 rm -f "conftest.$ac_objext"
10238 if { (eval echo "$as_me:10238: \"$ac_compile\"") >&5
10239   (eval $ac_compile) 2>&5
10240   ac_status=$?
10241   echo "$as_me:10241: \$? = $ac_status" >&5
10242   (exit "$ac_status"); } &&
10243          { ac_try='test -s "conftest.$ac_objext"'
10244   { (eval echo "$as_me:10244: \"$ac_try\"") >&5
10245   (eval $ac_try) 2>&5
10246   ac_status=$?
10247   echo "$as_me:10247: \$? = $ac_status" >&5
10248   (exit "$ac_status"); }; }; then
10249   cf_cv_posix_c_source=no
10250 else
10251   echo "$as_me: failed program was:" >&5
10252 cat "conftest.$ac_ext" >&5
10253 cf_want_posix_source=no
10254          case .$cf_POSIX_C_SOURCE in
10255          (.[12]??*)
10256                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10257                 ;;
10258          (.2)
10259                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10260                 cf_want_posix_source=yes
10261                 ;;
10262          (.*)
10263                 cf_want_posix_source=yes
10264                 ;;
10265          esac
10266          if test "$cf_want_posix_source" = yes ; then
10267                 cat >"conftest.$ac_ext" <<_ACEOF
10268 #line 10268 "configure"
10269 #include "confdefs.h"
10270 #include <sys/types.h>
10271 int
10272 main (void)
10273 {
10274
10275 #ifdef _POSIX_SOURCE
10276 make an error
10277 #endif
10278   ;
10279   return 0;
10280 }
10281 _ACEOF
10282 rm -f "conftest.$ac_objext"
10283 if { (eval echo "$as_me:10283: \"$ac_compile\"") >&5
10284   (eval $ac_compile) 2>&5
10285   ac_status=$?
10286   echo "$as_me:10286: \$? = $ac_status" >&5
10287   (exit "$ac_status"); } &&
10288          { ac_try='test -s "conftest.$ac_objext"'
10289   { (eval echo "$as_me:10289: \"$ac_try\"") >&5
10290   (eval $ac_try) 2>&5
10291   ac_status=$?
10292   echo "$as_me:10292: \$? = $ac_status" >&5
10293   (exit "$ac_status"); }; }; then
10294   :
10295 else
10296   echo "$as_me: failed program was:" >&5
10297 cat "conftest.$ac_ext" >&5
10298 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10299 fi
10300 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10301          fi
10302
10303 echo "${as_me:-configure}:10303: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10304
10305          CFLAGS="$cf_trim_CFLAGS"
10306          CPPFLAGS="$cf_trim_CPPFLAGS"
10307
10308         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10309         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10310
10311 echo "${as_me:-configure}:10311: testing if the second compile does not leave our definition intact error ..." 1>&5
10312
10313          cat >"conftest.$ac_ext" <<_ACEOF
10314 #line 10314 "configure"
10315 #include "confdefs.h"
10316 #include <sys/types.h>
10317 int
10318 main (void)
10319 {
10320
10321 #ifndef _POSIX_C_SOURCE
10322 make an error
10323 #endif
10324   ;
10325   return 0;
10326 }
10327 _ACEOF
10328 rm -f "conftest.$ac_objext"
10329 if { (eval echo "$as_me:10329: \"$ac_compile\"") >&5
10330   (eval $ac_compile) 2>&5
10331   ac_status=$?
10332   echo "$as_me:10332: \$? = $ac_status" >&5
10333   (exit "$ac_status"); } &&
10334          { ac_try='test -s "conftest.$ac_objext"'
10335   { (eval echo "$as_me:10335: \"$ac_try\"") >&5
10336   (eval $ac_try) 2>&5
10337   ac_status=$?
10338   echo "$as_me:10338: \$? = $ac_status" >&5
10339   (exit "$ac_status"); }; }; then
10340   :
10341 else
10342   echo "$as_me: failed program was:" >&5
10343 cat "conftest.$ac_ext" >&5
10344 cf_cv_posix_c_source=no
10345 fi
10346 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10347          CFLAGS="$cf_save_CFLAGS"
10348          CPPFLAGS="$cf_save_CPPFLAGS"
10349
10350 fi
10351 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10352
10353 fi
10354 echo "$as_me:10354: result: $cf_cv_posix_c_source" >&5
10355 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10356
10357 if test "$cf_cv_posix_c_source" != no ; then
10358         CFLAGS="$cf_trim_CFLAGS"
10359         CPPFLAGS="$cf_trim_CPPFLAGS"
10360
10361 cf_fix_cppflags=no
10362 cf_new_cflags=
10363 cf_new_cppflags=
10364 cf_new_extra_cppflags=
10365
10366 for cf_add_cflags in $cf_cv_posix_c_source
10367 do
10368 case "$cf_fix_cppflags" in
10369 (no)
10370         case "$cf_add_cflags" in
10371         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10372                 case "$cf_add_cflags" in
10373                 (-D*)
10374                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10375
10376                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10377                                 && test -z "${cf_tst_cflags}" \
10378                                 && cf_fix_cppflags=yes
10379
10380                         if test "$cf_fix_cppflags" = yes ; then
10381
10382         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10383         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10384
10385                                 continue
10386                         elif test "${cf_tst_cflags}" = "\"'" ; then
10387
10388         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10389         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10390
10391                                 continue
10392                         fi
10393                         ;;
10394                 esac
10395                 case "$CPPFLAGS" in
10396                 (*$cf_add_cflags)
10397                         ;;
10398                 (*)
10399                         case "$cf_add_cflags" in
10400                         (-D*)
10401                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10402
10403 CPPFLAGS=`echo "$CPPFLAGS" | \
10404         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10405                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10406
10407                                 ;;
10408                         esac
10409
10410         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10411         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10412
10413                         ;;
10414                 esac
10415                 ;;
10416         (*)
10417
10418         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10419         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10420
10421                 ;;
10422         esac
10423         ;;
10424 (yes)
10425
10426         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10427         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10428
10429         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10430
10431         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10432                 && test -z "${cf_tst_cflags}" \
10433                 && cf_fix_cppflags=no
10434         ;;
10435 esac
10436 done
10437
10438 if test -n "$cf_new_cflags" ; then
10439
10440         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10441         CFLAGS="${CFLAGS}$cf_new_cflags"
10442
10443 fi
10444
10445 if test -n "$cf_new_cppflags" ; then
10446
10447         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10448         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10449
10450 fi
10451
10452 if test -n "$cf_new_extra_cppflags" ; then
10453
10454         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10455         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10456
10457 fi
10458
10459 fi
10460
10461 fi # cf_cv_posix_visible
10462
10463         ;;
10464 (netbsd*)
10465         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10466         ;;
10467 (openbsd[4-9]*)
10468         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10469         cf_xopen_source="-D_BSD_SOURCE"
10470         cf_XOPEN_SOURCE=600
10471         ;;
10472 (openbsd*)
10473         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10474         ;;
10475 (osf[45]*)
10476         cf_xopen_source="-D_OSF_SOURCE"
10477         ;;
10478 (nto-qnx*)
10479         cf_xopen_source="-D_QNX_SOURCE"
10480         ;;
10481 (sco*)
10482         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10483         ;;
10484 (solaris2.*)
10485         cf_xopen_source="-D__EXTENSIONS__"
10486         cf_cv_xopen_source=broken
10487         ;;
10488 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10489         cf_XOPEN_SOURCE=
10490         cf_POSIX_C_SOURCE=
10491         ;;
10492 (*)
10493
10494 echo "$as_me:10494: checking if we should define _XOPEN_SOURCE" >&5
10495 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10496 if test "${cf_cv_xopen_source+set}" = set; then
10497   echo $ECHO_N "(cached) $ECHO_C" >&6
10498 else
10499
10500         cat >"conftest.$ac_ext" <<_ACEOF
10501 #line 10501 "configure"
10502 #include "confdefs.h"
10503
10504 #include <stdlib.h>
10505 #include <string.h>
10506 #include <sys/types.h>
10507
10508 int
10509 main (void)
10510 {
10511
10512 #ifndef _XOPEN_SOURCE
10513 make an error
10514 #endif
10515   ;
10516   return 0;
10517 }
10518 _ACEOF
10519 rm -f "conftest.$ac_objext"
10520 if { (eval echo "$as_me:10520: \"$ac_compile\"") >&5
10521   (eval $ac_compile) 2>&5
10522   ac_status=$?
10523   echo "$as_me:10523: \$? = $ac_status" >&5
10524   (exit "$ac_status"); } &&
10525          { ac_try='test -s "conftest.$ac_objext"'
10526   { (eval echo "$as_me:10526: \"$ac_try\"") >&5
10527   (eval $ac_try) 2>&5
10528   ac_status=$?
10529   echo "$as_me:10529: \$? = $ac_status" >&5
10530   (exit "$ac_status"); }; }; then
10531   cf_cv_xopen_source=no
10532 else
10533   echo "$as_me: failed program was:" >&5
10534 cat "conftest.$ac_ext" >&5
10535 cf_save="$CPPFLAGS"
10536
10537         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10538         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10539
10540          cat >"conftest.$ac_ext" <<_ACEOF
10541 #line 10541 "configure"
10542 #include "confdefs.h"
10543
10544 #include <stdlib.h>
10545 #include <string.h>
10546 #include <sys/types.h>
10547
10548 int
10549 main (void)
10550 {
10551
10552 #ifdef _XOPEN_SOURCE
10553 make an error
10554 #endif
10555   ;
10556   return 0;
10557 }
10558 _ACEOF
10559 rm -f "conftest.$ac_objext"
10560 if { (eval echo "$as_me:10560: \"$ac_compile\"") >&5
10561   (eval $ac_compile) 2>&5
10562   ac_status=$?
10563   echo "$as_me:10563: \$? = $ac_status" >&5
10564   (exit "$ac_status"); } &&
10565          { ac_try='test -s "conftest.$ac_objext"'
10566   { (eval echo "$as_me:10566: \"$ac_try\"") >&5
10567   (eval $ac_try) 2>&5
10568   ac_status=$?
10569   echo "$as_me:10569: \$? = $ac_status" >&5
10570   (exit "$ac_status"); }; }; then
10571   cf_cv_xopen_source=no
10572 else
10573   echo "$as_me: failed program was:" >&5
10574 cat "conftest.$ac_ext" >&5
10575 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10576 fi
10577 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10578         CPPFLAGS="$cf_save"
10579
10580 fi
10581 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10582
10583 fi
10584 echo "$as_me:10584: result: $cf_cv_xopen_source" >&5
10585 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10586
10587 if test "$cf_cv_xopen_source" != no ; then
10588
10589 CFLAGS=`echo "$CFLAGS" | \
10590         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10591                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10592
10593 CPPFLAGS=`echo "$CPPFLAGS" | \
10594         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10595                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10596
10597         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10598
10599 cf_fix_cppflags=no
10600 cf_new_cflags=
10601 cf_new_cppflags=
10602 cf_new_extra_cppflags=
10603
10604 for cf_add_cflags in $cf_temp_xopen_source
10605 do
10606 case "$cf_fix_cppflags" in
10607 (no)
10608         case "$cf_add_cflags" in
10609         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10610                 case "$cf_add_cflags" in
10611                 (-D*)
10612                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10613
10614                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10615                                 && test -z "${cf_tst_cflags}" \
10616                                 && cf_fix_cppflags=yes
10617
10618                         if test "$cf_fix_cppflags" = yes ; then
10619
10620         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10621         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10622
10623                                 continue
10624                         elif test "${cf_tst_cflags}" = "\"'" ; then
10625
10626         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10627         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10628
10629                                 continue
10630                         fi
10631                         ;;
10632                 esac
10633                 case "$CPPFLAGS" in
10634                 (*$cf_add_cflags)
10635                         ;;
10636                 (*)
10637                         case "$cf_add_cflags" in
10638                         (-D*)
10639                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10640
10641 CPPFLAGS=`echo "$CPPFLAGS" | \
10642         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10643                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10644
10645                                 ;;
10646                         esac
10647
10648         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10649         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10650
10651                         ;;
10652                 esac
10653                 ;;
10654         (*)
10655
10656         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10657         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10658
10659                 ;;
10660         esac
10661         ;;
10662 (yes)
10663
10664         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10665         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10666
10667         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10668
10669         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10670                 && test -z "${cf_tst_cflags}" \
10671                 && cf_fix_cppflags=no
10672         ;;
10673 esac
10674 done
10675
10676 if test -n "$cf_new_cflags" ; then
10677
10678         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10679         CFLAGS="${CFLAGS}$cf_new_cflags"
10680
10681 fi
10682
10683 if test -n "$cf_new_cppflags" ; then
10684
10685         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10686         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10687
10688 fi
10689
10690 if test -n "$cf_new_extra_cppflags" ; then
10691
10692         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10693         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10694
10695 fi
10696
10697 fi
10698
10699 if test "$cf_cv_posix_visible" = no; then
10700
10701 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10702
10703 cf_save_CFLAGS="$CFLAGS"
10704 cf_save_CPPFLAGS="$CPPFLAGS"
10705
10706 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10707         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10708                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10709
10710 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10711         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10712                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10713
10714 echo "$as_me:10714: checking if we should define _POSIX_C_SOURCE" >&5
10715 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10716 if test "${cf_cv_posix_c_source+set}" = set; then
10717   echo $ECHO_N "(cached) $ECHO_C" >&6
10718 else
10719
10720 echo "${as_me:-configure}:10720: testing if the symbol is already defined go no further ..." 1>&5
10721
10722         cat >"conftest.$ac_ext" <<_ACEOF
10723 #line 10723 "configure"
10724 #include "confdefs.h"
10725 #include <sys/types.h>
10726 int
10727 main (void)
10728 {
10729
10730 #ifndef _POSIX_C_SOURCE
10731 make an error
10732 #endif
10733   ;
10734   return 0;
10735 }
10736 _ACEOF
10737 rm -f "conftest.$ac_objext"
10738 if { (eval echo "$as_me:10738: \"$ac_compile\"") >&5
10739   (eval $ac_compile) 2>&5
10740   ac_status=$?
10741   echo "$as_me:10741: \$? = $ac_status" >&5
10742   (exit "$ac_status"); } &&
10743          { ac_try='test -s "conftest.$ac_objext"'
10744   { (eval echo "$as_me:10744: \"$ac_try\"") >&5
10745   (eval $ac_try) 2>&5
10746   ac_status=$?
10747   echo "$as_me:10747: \$? = $ac_status" >&5
10748   (exit "$ac_status"); }; }; then
10749   cf_cv_posix_c_source=no
10750 else
10751   echo "$as_me: failed program was:" >&5
10752 cat "conftest.$ac_ext" >&5
10753 cf_want_posix_source=no
10754          case .$cf_POSIX_C_SOURCE in
10755          (.[12]??*)
10756                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10757                 ;;
10758          (.2)
10759                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10760                 cf_want_posix_source=yes
10761                 ;;
10762          (.*)
10763                 cf_want_posix_source=yes
10764                 ;;
10765          esac
10766          if test "$cf_want_posix_source" = yes ; then
10767                 cat >"conftest.$ac_ext" <<_ACEOF
10768 #line 10768 "configure"
10769 #include "confdefs.h"
10770 #include <sys/types.h>
10771 int
10772 main (void)
10773 {
10774
10775 #ifdef _POSIX_SOURCE
10776 make an error
10777 #endif
10778   ;
10779   return 0;
10780 }
10781 _ACEOF
10782 rm -f "conftest.$ac_objext"
10783 if { (eval echo "$as_me:10783: \"$ac_compile\"") >&5
10784   (eval $ac_compile) 2>&5
10785   ac_status=$?
10786   echo "$as_me:10786: \$? = $ac_status" >&5
10787   (exit "$ac_status"); } &&
10788          { ac_try='test -s "conftest.$ac_objext"'
10789   { (eval echo "$as_me:10789: \"$ac_try\"") >&5
10790   (eval $ac_try) 2>&5
10791   ac_status=$?
10792   echo "$as_me:10792: \$? = $ac_status" >&5
10793   (exit "$ac_status"); }; }; then
10794   :
10795 else
10796   echo "$as_me: failed program was:" >&5
10797 cat "conftest.$ac_ext" >&5
10798 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10799 fi
10800 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10801          fi
10802
10803 echo "${as_me:-configure}:10803: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10804
10805          CFLAGS="$cf_trim_CFLAGS"
10806          CPPFLAGS="$cf_trim_CPPFLAGS"
10807
10808         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10809         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10810
10811 echo "${as_me:-configure}:10811: testing if the second compile does not leave our definition intact error ..." 1>&5
10812
10813          cat >"conftest.$ac_ext" <<_ACEOF
10814 #line 10814 "configure"
10815 #include "confdefs.h"
10816 #include <sys/types.h>
10817 int
10818 main (void)
10819 {
10820
10821 #ifndef _POSIX_C_SOURCE
10822 make an error
10823 #endif
10824   ;
10825   return 0;
10826 }
10827 _ACEOF
10828 rm -f "conftest.$ac_objext"
10829 if { (eval echo "$as_me:10829: \"$ac_compile\"") >&5
10830   (eval $ac_compile) 2>&5
10831   ac_status=$?
10832   echo "$as_me:10832: \$? = $ac_status" >&5
10833   (exit "$ac_status"); } &&
10834          { ac_try='test -s "conftest.$ac_objext"'
10835   { (eval echo "$as_me:10835: \"$ac_try\"") >&5
10836   (eval $ac_try) 2>&5
10837   ac_status=$?
10838   echo "$as_me:10838: \$? = $ac_status" >&5
10839   (exit "$ac_status"); }; }; then
10840   :
10841 else
10842   echo "$as_me: failed program was:" >&5
10843 cat "conftest.$ac_ext" >&5
10844 cf_cv_posix_c_source=no
10845 fi
10846 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10847          CFLAGS="$cf_save_CFLAGS"
10848          CPPFLAGS="$cf_save_CPPFLAGS"
10849
10850 fi
10851 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10852
10853 fi
10854 echo "$as_me:10854: result: $cf_cv_posix_c_source" >&5
10855 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10856
10857 if test "$cf_cv_posix_c_source" != no ; then
10858         CFLAGS="$cf_trim_CFLAGS"
10859         CPPFLAGS="$cf_trim_CPPFLAGS"
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_cv_posix_c_source
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 fi
10960
10961 fi # cf_cv_posix_visible
10962
10963         ;;
10964 esac
10965
10966 if test -n "$cf_xopen_source" ; then
10967
10968 cf_fix_cppflags=no
10969 cf_new_cflags=
10970 cf_new_cppflags=
10971 cf_new_extra_cppflags=
10972
10973 for cf_add_cflags in $cf_xopen_source
10974 do
10975 case "$cf_fix_cppflags" in
10976 (no)
10977         case "$cf_add_cflags" in
10978         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10979                 case "$cf_add_cflags" in
10980                 (-D*)
10981                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10982
10983                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10984                                 && test -z "${cf_tst_cflags}" \
10985                                 && cf_fix_cppflags=yes
10986
10987                         if test "$cf_fix_cppflags" = yes ; then
10988
10989         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10990         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10991
10992                                 continue
10993                         elif test "${cf_tst_cflags}" = "\"'" ; then
10994
10995         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10996         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10997
10998                                 continue
10999                         fi
11000                         ;;
11001                 esac
11002                 case "$CPPFLAGS" in
11003                 (*$cf_add_cflags)
11004                         ;;
11005                 (*)
11006                         case "$cf_add_cflags" in
11007                         (-D*)
11008                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11009
11010 CPPFLAGS=`echo "$CPPFLAGS" | \
11011         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11012                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11013
11014                                 ;;
11015                         esac
11016
11017         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11018         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11019
11020                         ;;
11021                 esac
11022                 ;;
11023         (*)
11024
11025         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11026         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11027
11028                 ;;
11029         esac
11030         ;;
11031 (yes)
11032
11033         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11034         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11035
11036         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11037
11038         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11039                 && test -z "${cf_tst_cflags}" \
11040                 && cf_fix_cppflags=no
11041         ;;
11042 esac
11043 done
11044
11045 if test -n "$cf_new_cflags" ; then
11046         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11047
11048 echo "${as_me:-configure}:11048: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11049
11050         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11051         CFLAGS="${CFLAGS}$cf_new_cflags"
11052
11053 fi
11054
11055 if test -n "$cf_new_cppflags" ; then
11056         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11057
11058 echo "${as_me:-configure}:11058: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11059
11060         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11061         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11062
11063 fi
11064
11065 if test -n "$cf_new_extra_cppflags" ; then
11066         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11067
11068 echo "${as_me:-configure}:11068: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11069
11070         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11071         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11072
11073 fi
11074
11075 fi
11076
11077 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11078         echo "$as_me:11078: checking if _XOPEN_SOURCE really is set" >&5
11079 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11080         cat >"conftest.$ac_ext" <<_ACEOF
11081 #line 11081 "configure"
11082 #include "confdefs.h"
11083 #include <stdlib.h>
11084 int
11085 main (void)
11086 {
11087
11088 #ifndef _XOPEN_SOURCE
11089 make an error
11090 #endif
11091   ;
11092   return 0;
11093 }
11094 _ACEOF
11095 rm -f "conftest.$ac_objext"
11096 if { (eval echo "$as_me:11096: \"$ac_compile\"") >&5
11097   (eval $ac_compile) 2>&5
11098   ac_status=$?
11099   echo "$as_me:11099: \$? = $ac_status" >&5
11100   (exit "$ac_status"); } &&
11101          { ac_try='test -s "conftest.$ac_objext"'
11102   { (eval echo "$as_me:11102: \"$ac_try\"") >&5
11103   (eval $ac_try) 2>&5
11104   ac_status=$?
11105   echo "$as_me:11105: \$? = $ac_status" >&5
11106   (exit "$ac_status"); }; }; then
11107   cf_XOPEN_SOURCE_set=yes
11108 else
11109   echo "$as_me: failed program was:" >&5
11110 cat "conftest.$ac_ext" >&5
11111 cf_XOPEN_SOURCE_set=no
11112 fi
11113 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11114         echo "$as_me:11114: result: $cf_XOPEN_SOURCE_set" >&5
11115 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11116         if test "$cf_XOPEN_SOURCE_set" = yes
11117         then
11118                 cat >"conftest.$ac_ext" <<_ACEOF
11119 #line 11119 "configure"
11120 #include "confdefs.h"
11121 #include <stdlib.h>
11122 int
11123 main (void)
11124 {
11125
11126 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11127 make an error
11128 #endif
11129   ;
11130   return 0;
11131 }
11132 _ACEOF
11133 rm -f "conftest.$ac_objext"
11134 if { (eval echo "$as_me:11134: \"$ac_compile\"") >&5
11135   (eval $ac_compile) 2>&5
11136   ac_status=$?
11137   echo "$as_me:11137: \$? = $ac_status" >&5
11138   (exit "$ac_status"); } &&
11139          { ac_try='test -s "conftest.$ac_objext"'
11140   { (eval echo "$as_me:11140: \"$ac_try\"") >&5
11141   (eval $ac_try) 2>&5
11142   ac_status=$?
11143   echo "$as_me:11143: \$? = $ac_status" >&5
11144   (exit "$ac_status"); }; }; then
11145   cf_XOPEN_SOURCE_set_ok=yes
11146 else
11147   echo "$as_me: failed program was:" >&5
11148 cat "conftest.$ac_ext" >&5
11149 cf_XOPEN_SOURCE_set_ok=no
11150 fi
11151 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11152                 if test "$cf_XOPEN_SOURCE_set_ok" = no
11153                 then
11154                         { echo "$as_me:11154: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11155 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11156                 fi
11157         else
11158
11159 echo "$as_me:11159: checking if we should define _XOPEN_SOURCE" >&5
11160 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11161 if test "${cf_cv_xopen_source+set}" = set; then
11162   echo $ECHO_N "(cached) $ECHO_C" >&6
11163 else
11164
11165         cat >"conftest.$ac_ext" <<_ACEOF
11166 #line 11166 "configure"
11167 #include "confdefs.h"
11168
11169 #include <stdlib.h>
11170 #include <string.h>
11171 #include <sys/types.h>
11172
11173 int
11174 main (void)
11175 {
11176
11177 #ifndef _XOPEN_SOURCE
11178 make an error
11179 #endif
11180   ;
11181   return 0;
11182 }
11183 _ACEOF
11184 rm -f "conftest.$ac_objext"
11185 if { (eval echo "$as_me:11185: \"$ac_compile\"") >&5
11186   (eval $ac_compile) 2>&5
11187   ac_status=$?
11188   echo "$as_me:11188: \$? = $ac_status" >&5
11189   (exit "$ac_status"); } &&
11190          { ac_try='test -s "conftest.$ac_objext"'
11191   { (eval echo "$as_me:11191: \"$ac_try\"") >&5
11192   (eval $ac_try) 2>&5
11193   ac_status=$?
11194   echo "$as_me:11194: \$? = $ac_status" >&5
11195   (exit "$ac_status"); }; }; then
11196   cf_cv_xopen_source=no
11197 else
11198   echo "$as_me: failed program was:" >&5
11199 cat "conftest.$ac_ext" >&5
11200 cf_save="$CPPFLAGS"
11201
11202         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11203         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11204
11205          cat >"conftest.$ac_ext" <<_ACEOF
11206 #line 11206 "configure"
11207 #include "confdefs.h"
11208
11209 #include <stdlib.h>
11210 #include <string.h>
11211 #include <sys/types.h>
11212
11213 int
11214 main (void)
11215 {
11216
11217 #ifdef _XOPEN_SOURCE
11218 make an error
11219 #endif
11220   ;
11221   return 0;
11222 }
11223 _ACEOF
11224 rm -f "conftest.$ac_objext"
11225 if { (eval echo "$as_me:11225: \"$ac_compile\"") >&5
11226   (eval $ac_compile) 2>&5
11227   ac_status=$?
11228   echo "$as_me:11228: \$? = $ac_status" >&5
11229   (exit "$ac_status"); } &&
11230          { ac_try='test -s "conftest.$ac_objext"'
11231   { (eval echo "$as_me:11231: \"$ac_try\"") >&5
11232   (eval $ac_try) 2>&5
11233   ac_status=$?
11234   echo "$as_me:11234: \$? = $ac_status" >&5
11235   (exit "$ac_status"); }; }; then
11236   cf_cv_xopen_source=no
11237 else
11238   echo "$as_me: failed program was:" >&5
11239 cat "conftest.$ac_ext" >&5
11240 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11241 fi
11242 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11243         CPPFLAGS="$cf_save"
11244
11245 fi
11246 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11247
11248 fi
11249 echo "$as_me:11249: result: $cf_cv_xopen_source" >&5
11250 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11251
11252 if test "$cf_cv_xopen_source" != no ; then
11253
11254 CFLAGS=`echo "$CFLAGS" | \
11255         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11256                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11257
11258 CPPFLAGS=`echo "$CPPFLAGS" | \
11259         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11260                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11261
11262         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
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_temp_xopen_source
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
11343         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11344         CFLAGS="${CFLAGS}$cf_new_cflags"
11345
11346 fi
11347
11348 if test -n "$cf_new_cppflags" ; then
11349
11350         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11351         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11352
11353 fi
11354
11355 if test -n "$cf_new_extra_cppflags" ; then
11356
11357         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11358         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11359
11360 fi
11361
11362 fi
11363
11364         fi
11365 fi
11366 fi # cf_cv_posix_visible
11367
11368 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11369
11370 # Work around breakage on OS X
11371
11372 echo "$as_me:11372: checking if SIGWINCH is defined" >&5
11373 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11374 if test "${cf_cv_define_sigwinch+set}" = set; then
11375   echo $ECHO_N "(cached) $ECHO_C" >&6
11376 else
11377
11378         cat >"conftest.$ac_ext" <<_ACEOF
11379 #line 11379 "configure"
11380 #include "confdefs.h"
11381
11382 #include <sys/types.h>
11383 #include <sys/signal.h>
11384
11385 int
11386 main (void)
11387 {
11388 int x = SIGWINCH; (void)x
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_cv_define_sigwinch=yes
11406 else
11407   echo "$as_me: failed program was:" >&5
11408 cat "conftest.$ac_ext" >&5
11409 cat >"conftest.$ac_ext" <<_ACEOF
11410 #line 11410 "configure"
11411 #include "confdefs.h"
11412
11413 #undef _XOPEN_SOURCE
11414 #undef _POSIX_SOURCE
11415 #undef _POSIX_C_SOURCE
11416 #include <sys/types.h>
11417 #include <sys/signal.h>
11418
11419 int
11420 main (void)
11421 {
11422 int x = SIGWINCH; (void)x
11423   ;
11424   return 0;
11425 }
11426 _ACEOF
11427 rm -f "conftest.$ac_objext"
11428 if { (eval echo "$as_me:11428: \"$ac_compile\"") >&5
11429   (eval $ac_compile) 2>&5
11430   ac_status=$?
11431   echo "$as_me:11431: \$? = $ac_status" >&5
11432   (exit "$ac_status"); } &&
11433          { ac_try='test -s "conftest.$ac_objext"'
11434   { (eval echo "$as_me:11434: \"$ac_try\"") >&5
11435   (eval $ac_try) 2>&5
11436   ac_status=$?
11437   echo "$as_me:11437: \$? = $ac_status" >&5
11438   (exit "$ac_status"); }; }; then
11439   cf_cv_define_sigwinch=maybe
11440 else
11441   echo "$as_me: failed program was:" >&5
11442 cat "conftest.$ac_ext" >&5
11443 cf_cv_define_sigwinch=no
11444 fi
11445 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11446
11447 fi
11448 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11449
11450 fi
11451 echo "$as_me:11451: result: $cf_cv_define_sigwinch" >&5
11452 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11453
11454 if test "$cf_cv_define_sigwinch" = maybe ; then
11455 echo "$as_me:11455: checking for actual SIGWINCH definition" >&5
11456 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11457 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11458   echo $ECHO_N "(cached) $ECHO_C" >&6
11459 else
11460
11461 cf_cv_fixup_sigwinch=unknown
11462 cf_sigwinch=32
11463 while test "$cf_sigwinch" != 1
11464 do
11465         cat >"conftest.$ac_ext" <<_ACEOF
11466 #line 11466 "configure"
11467 #include "confdefs.h"
11468
11469 #undef _XOPEN_SOURCE
11470 #undef _POSIX_SOURCE
11471 #undef _POSIX_C_SOURCE
11472 #include <sys/types.h>
11473 #include <sys/signal.h>
11474
11475 int
11476 main (void)
11477 {
11478
11479 #if SIGWINCH != $cf_sigwinch
11480 make an error
11481 #endif
11482 int x = SIGWINCH; (void)x
11483   ;
11484   return 0;
11485 }
11486 _ACEOF
11487 rm -f "conftest.$ac_objext"
11488 if { (eval echo "$as_me:11488: \"$ac_compile\"") >&5
11489   (eval $ac_compile) 2>&5
11490   ac_status=$?
11491   echo "$as_me:11491: \$? = $ac_status" >&5
11492   (exit "$ac_status"); } &&
11493          { ac_try='test -s "conftest.$ac_objext"'
11494   { (eval echo "$as_me:11494: \"$ac_try\"") >&5
11495   (eval $ac_try) 2>&5
11496   ac_status=$?
11497   echo "$as_me:11497: \$? = $ac_status" >&5
11498   (exit "$ac_status"); }; }; then
11499   cf_cv_fixup_sigwinch=$cf_sigwinch
11500          break
11501 else
11502   echo "$as_me: failed program was:" >&5
11503 cat "conftest.$ac_ext" >&5
11504 fi
11505 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11506
11507 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
11508 done
11509
11510 fi
11511 echo "$as_me:11511: result: $cf_cv_fixup_sigwinch" >&5
11512 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11513
11514         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11515                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11516         fi
11517 fi
11518
11519 # Checks for CODESET support.
11520
11521 echo "$as_me:11521: checking for nl_langinfo and CODESET" >&5
11522 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11523 if test "${am_cv_langinfo_codeset+set}" = set; then
11524   echo $ECHO_N "(cached) $ECHO_C" >&6
11525 else
11526   cat >"conftest.$ac_ext" <<_ACEOF
11527 #line 11527 "configure"
11528 #include "confdefs.h"
11529 #include <langinfo.h>
11530 int
11531 main (void)
11532 {
11533 char* cs = nl_langinfo(CODESET); (void)cs
11534   ;
11535   return 0;
11536 }
11537 _ACEOF
11538 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11539 if { (eval echo "$as_me:11539: \"$ac_link\"") >&5
11540   (eval $ac_link) 2>&5
11541   ac_status=$?
11542   echo "$as_me:11542: \$? = $ac_status" >&5
11543   (exit "$ac_status"); } &&
11544          { ac_try='test -s "conftest$ac_exeext"'
11545   { (eval echo "$as_me:11545: \"$ac_try\"") >&5
11546   (eval $ac_try) 2>&5
11547   ac_status=$?
11548   echo "$as_me:11548: \$? = $ac_status" >&5
11549   (exit "$ac_status"); }; }; then
11550   am_cv_langinfo_codeset=yes
11551 else
11552   echo "$as_me: failed program was:" >&5
11553 cat "conftest.$ac_ext" >&5
11554 am_cv_langinfo_codeset=no
11555 fi
11556 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11557
11558 fi
11559 echo "$as_me:11559: result: $am_cv_langinfo_codeset" >&5
11560 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11561         if test "$am_cv_langinfo_codeset" = yes; then
11562
11563 cat >>confdefs.h <<\EOF
11564 #define HAVE_LANGINFO_CODESET 1
11565 EOF
11566
11567         fi
11568
11569 # use these variables to work around a defect in gcc's fixincludes.
11570 NCURSES_OK_WCHAR_T=
11571 NCURSES_OK_WINT_T=
11572
11573 echo "$as_me:11573: checking if you want wide-character code" >&5
11574 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11575
11576 # Check whether --enable-widec or --disable-widec was given.
11577 if test "${enable_widec+set}" = set; then
11578   enableval="$enable_widec"
11579   with_widec=$enableval
11580 else
11581   with_widec=no
11582 fi;
11583 echo "$as_me:11583: result: $with_widec" >&5
11584 echo "${ECHO_T}$with_widec" >&6
11585
11586 NCURSES_WCWIDTH_GRAPHICS=1
11587
11588 if test "x$with_widec" = xyes ; then
11589         if test "x$disable_lib_suffixes" = xno ; then
11590                 LIB_SUFFIX="w${LIB_SUFFIX}"
11591         fi
11592
11593 cat >>confdefs.h <<\EOF
11594 #define USE_WIDEC_SUPPORT 1
11595 EOF
11596
11597 cat >>confdefs.h <<\EOF
11598 #define NCURSES_WIDECHAR 1
11599 EOF
11600
11601 for ac_header in \
11602 wchar.h \
11603 wctype.h \
11604
11605 do
11606 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11607 echo "$as_me:11607: checking for $ac_header" >&5
11608 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11609 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11610   echo $ECHO_N "(cached) $ECHO_C" >&6
11611 else
11612   cat >"conftest.$ac_ext" <<_ACEOF
11613 #line 11613 "configure"
11614 #include "confdefs.h"
11615 #include <$ac_header>
11616 _ACEOF
11617 if { (eval echo "$as_me:11617: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11618   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11619   ac_status=$?
11620   $EGREP -v '^ *\+' conftest.er1 >conftest.err
11621   rm -f conftest.er1
11622   cat conftest.err >&5
11623   echo "$as_me:11623: \$? = $ac_status" >&5
11624   (exit "$ac_status"); } >/dev/null; then
11625   if test -s conftest.err; then
11626     ac_cpp_err=$ac_c_preproc_warn_flag
11627   else
11628     ac_cpp_err=
11629   fi
11630 else
11631   ac_cpp_err=yes
11632 fi
11633 if test -z "$ac_cpp_err"; then
11634   eval "$as_ac_Header=yes"
11635 else
11636   echo "$as_me: failed program was:" >&5
11637   cat "conftest.$ac_ext" >&5
11638   eval "$as_ac_Header=no"
11639 fi
11640 rm -f conftest.err "conftest.$ac_ext"
11641 fi
11642 echo "$as_me:11642: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
11643 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
11644 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
11645   cat >>confdefs.h <<EOF
11646 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11647 EOF
11648
11649 fi
11650 done
11651
11652 echo "$as_me:11652: checking if wchar.h can be used as is" >&5
11653 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11654 if test "${cf_cv_wchar_h_okay+set}" = set; then
11655   echo $ECHO_N "(cached) $ECHO_C" >&6
11656 else
11657
11658 cat >"conftest.$ac_ext" <<_ACEOF
11659 #line 11659 "configure"
11660 #include "confdefs.h"
11661
11662 #include <stdlib.h>
11663 #ifdef HAVE_WCHAR_H
11664 #include <wchar.h>
11665 #endif
11666 #ifdef HAVE_WCTYPE_H
11667 #include <wctype.h>
11668 #endif
11669
11670 int
11671 main (void)
11672 {
11673
11674         wint_t foo = 0;
11675         int bar = iswpunct(foo)
11676   ;
11677   return 0;
11678 }
11679 _ACEOF
11680 rm -f "conftest.$ac_objext"
11681 if { (eval echo "$as_me:11681: \"$ac_compile\"") >&5
11682   (eval $ac_compile) 2>&5
11683   ac_status=$?
11684   echo "$as_me:11684: \$? = $ac_status" >&5
11685   (exit "$ac_status"); } &&
11686          { ac_try='test -s "conftest.$ac_objext"'
11687   { (eval echo "$as_me:11687: \"$ac_try\"") >&5
11688   (eval $ac_try) 2>&5
11689   ac_status=$?
11690   echo "$as_me:11690: \$? = $ac_status" >&5
11691   (exit "$ac_status"); }; }; then
11692   cf_cv_wchar_h_okay=yes
11693 else
11694   echo "$as_me: failed program was:" >&5
11695 cat "conftest.$ac_ext" >&5
11696 cf_cv_wchar_h_okay=no
11697 fi
11698 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11699 fi
11700 echo "$as_me:11700: result: $cf_cv_wchar_h_okay" >&5
11701 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
11702
11703 if test "$cf_cv_wchar_h_okay" = no
11704 then
11705
11706 echo "$as_me:11706: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
11707 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
11708 cat >"conftest.$ac_ext" <<_ACEOF
11709 #line 11709 "configure"
11710 #include "confdefs.h"
11711 #include <sys/types.h>
11712
11713 int
11714 main (void)
11715 {
11716
11717 #ifndef _XOPEN_SOURCE_EXTENDED
11718 make an error
11719 #endif
11720   ;
11721   return 0;
11722 }
11723 _ACEOF
11724 rm -f "conftest.$ac_objext"
11725 if { (eval echo "$as_me:11725: \"$ac_compile\"") >&5
11726   (eval $ac_compile) 2>&5
11727   ac_status=$?
11728   echo "$as_me:11728: \$? = $ac_status" >&5
11729   (exit "$ac_status"); } &&
11730          { ac_try='test -s "conftest.$ac_objext"'
11731   { (eval echo "$as_me:11731: \"$ac_try\"") >&5
11732   (eval $ac_try) 2>&5
11733   ac_status=$?
11734   echo "$as_me:11734: \$? = $ac_status" >&5
11735   (exit "$ac_status"); }; }; then
11736   cf_result=no
11737 else
11738   echo "$as_me: failed program was:" >&5
11739 cat "conftest.$ac_ext" >&5
11740 cf_result=yes
11741 fi
11742 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11743 echo "$as_me:11743: result: $cf_result" >&5
11744 echo "${ECHO_T}$cf_result" >&6
11745
11746 if test "$cf_result" = yes ; then
11747         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
11748 elif test "x" != "x" ; then
11749         echo "$as_me:11749: checking checking for compatible value versus " >&5
11750 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
11751         cat >"conftest.$ac_ext" <<_ACEOF
11752 #line 11752 "configure"
11753 #include "confdefs.h"
11754 #include <sys/types.h>
11755
11756 int
11757 main (void)
11758 {
11759
11760 #if _XOPEN_SOURCE_EXTENDED- < 0
11761 make an error
11762 #endif
11763   ;
11764   return 0;
11765 }
11766 _ACEOF
11767 rm -f "conftest.$ac_objext"
11768 if { (eval echo "$as_me:11768: \"$ac_compile\"") >&5
11769   (eval $ac_compile) 2>&5
11770   ac_status=$?
11771   echo "$as_me:11771: \$? = $ac_status" >&5
11772   (exit "$ac_status"); } &&
11773          { ac_try='test -s "conftest.$ac_objext"'
11774   { (eval echo "$as_me:11774: \"$ac_try\"") >&5
11775   (eval $ac_try) 2>&5
11776   ac_status=$?
11777   echo "$as_me:11777: \$? = $ac_status" >&5
11778   (exit "$ac_status"); }; }; then
11779   cf_result=yes
11780 else
11781   echo "$as_me: failed program was:" >&5
11782 cat "conftest.$ac_ext" >&5
11783 cf_result=no
11784 fi
11785 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11786         echo "$as_me:11786: result: $cf_result" >&5
11787 echo "${ECHO_T}$cf_result" >&6
11788         if test "$cf_result" = no ; then
11789                 # perhaps we can override it - try...
11790                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
11791         fi
11792 fi
11793
11794 fi
11795
11796 echo "$as_me:11796: checking if wcwidth agrees graphics are single-width" >&5
11797 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
11798 if test "${cf_cv_wcwidth_graphics+set}" = set; then
11799   echo $ECHO_N "(cached) $ECHO_C" >&6
11800 else
11801
11802 cat >conftest.in <<CF_EOF
11803 -       VT100 symbols
11804 0x250c  upper left corner
11805 0x2514  lower left corner
11806 0x2510  upper right corner
11807 0x2518  lower right corner
11808 0x251c  tee pointing left
11809 0x2524  tee pointing right
11810 0x2534  tee pointing up
11811 0x252c  tee pointing down
11812 0x2500  horizontal line
11813 0x2502  vertical line
11814 0x253c  large plus or crossover
11815 0x23ba  scan line 1
11816 0x23bd  scan line 9
11817 0x25c6  diamond
11818 0x2592  checker board (stipple)
11819 0x00b0  degree symbol
11820 0x00b1  plus/minus
11821 0x00b7  bullet
11822 -       Teletype 5410v1 symbols
11823 0x2190  arrow pointing left
11824 0x2192  arrow pointing right
11825 0x2193  arrow pointing down
11826 0x2191  arrow pointing up
11827 0x2592  board of squares
11828 0x2603  lantern symbol
11829 0x25ae  solid square block
11830 -       these defaults were invented for ncurses
11831 0x23bb  scan line 3
11832 0x23bc  scan line 7
11833 0x2264  less-than-or-equal-to
11834 0x2265  greater-than-or-equal-to
11835 0x03c0  greek pi
11836 0x2260  not-equal
11837 0x00a3  pound-sterling symbol
11838 -       thick-line-drawing
11839 0x250f  upper left corner
11840 0x2517  lower left corner
11841 0x2513  upper right corner
11842 0x251b  lower right corner
11843 0x2523  tee pointing left
11844 0x252b  tee pointing right
11845 0x253b  tee pointing up
11846 0x2533  tee pointing down
11847 0x2501  horizontal line
11848 0x2503  vertical line
11849 0x254b  large plus or crossover
11850 -       double-line-drawing
11851 0x2554  upper left corner
11852 0x255a  lower left corner
11853 0x2557  upper right corner
11854 0x255d  lower right corner
11855 0x2563  tee pointing left
11856 0x2560  tee pointing right
11857 0x2569  tee pointing up
11858 0x2566  tee pointing down
11859 0x2550  horizontal line
11860 0x2551  vertical line
11861 0x256c  large plus or crossover
11862 CF_EOF
11863 if test "$cross_compiling" = yes; then
11864   cf_cv_wcwidth_graphics=unknown
11865 else
11866   cat >"conftest.$ac_ext" <<_ACEOF
11867 #line 11867 "configure"
11868 #include "confdefs.h"
11869
11870 #include <locale.h>
11871 #include <stdio.h>
11872 #include <wchar.h>
11873
11874 #define MY_LEN 80
11875
11876 int
11877 main(void)
11878 {
11879         FILE *fp;
11880         int value;
11881         char buffer[MY_LEN + 1];
11882         char notes[MY_LEN + 1];
11883         int totals = 0;
11884         int passed = 0;
11885
11886         if (setlocale(LC_ALL, "en_US.UTF8") ||
11887                 setlocale(LC_ALL, "en_US.UTF-8") ||
11888                 setlocale(LC_ALL, "en_US.utf8") ||
11889                 setlocale(LC_ALL, "en_US.utf-8")) {
11890                 if ((fp = fopen("conftest.in", "r")) != 0) {
11891                         while (fgets(buffer, MY_LEN, fp) != 0) {
11892                                 if (*buffer == '-') {
11893                                         fprintf(stderr, "\\t%s", buffer);
11894                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
11895                                         ++totals;
11896                                         if (wcwidth(value) == 1)
11897                                                 ++passed;
11898                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
11899                                 } else {
11900                                         fprintf(stderr, "?\\t%s", buffer);
11901                                 }
11902                         }
11903                 }
11904         }
11905         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
11906         return (totals == passed) ? 0 : 1;
11907 }
11908
11909 _ACEOF
11910 rm -f "conftest$ac_exeext"
11911 if { (eval echo "$as_me:11911: \"$ac_link\"") >&5
11912   (eval $ac_link) 2>&5
11913   ac_status=$?
11914   echo "$as_me:11914: \$? = $ac_status" >&5
11915   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
11916   { (eval echo "$as_me:11916: \"$ac_try\"") >&5
11917   (eval $ac_try) 2>&5
11918   ac_status=$?
11919   echo "$as_me:11919: \$? = $ac_status" >&5
11920   (exit "$ac_status"); }; }; then
11921   cf_cv_wcwidth_graphics=yes
11922 else
11923   echo "$as_me: program exited with status $ac_status" >&5
11924 echo "$as_me: failed program was:" >&5
11925 cat "conftest.$ac_ext" >&5
11926 cf_cv_wcwidth_graphics=no
11927 fi
11928 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
11929 fi
11930
11931 fi
11932 echo "$as_me:11932: result: $cf_cv_wcwidth_graphics" >&5
11933 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
11934
11935         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
11936
11937         # with_overwrite=no
11938         NCURSES_CH_T=cchar_t
11939
11940 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
11941 do
11942 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11943 echo "$as_me:11943: checking for $ac_func" >&5
11944 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11945 if eval "test \"\${$as_ac_var+set}\" = set"; then
11946   echo $ECHO_N "(cached) $ECHO_C" >&6
11947 else
11948   cat >"conftest.$ac_ext" <<_ACEOF
11949 #line 11949 "configure"
11950 #include "confdefs.h"
11951 #define $ac_func autoconf_temporary
11952 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
11953 #undef $ac_func
11954
11955 #ifdef __cplusplus
11956 extern "C"
11957 #endif
11958
11959 /* We use char because int might match the return type of a gcc2
11960    builtin and then its argument prototype would still apply.  */
11961 char $ac_func (void);
11962
11963 int
11964 main (void)
11965 {
11966
11967 /* The GNU C library defines stubs for functions which it implements
11968     to always fail with ENOSYS.  Some functions are actually named
11969     something starting with __ and the normal name is an alias.  */
11970 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11971 #error found stub for $ac_func
11972 #endif
11973
11974         return $ac_func ();
11975   ;
11976   return 0;
11977 }
11978 _ACEOF
11979 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11980 if { (eval echo "$as_me:11980: \"$ac_link\"") >&5
11981   (eval $ac_link) 2>&5
11982   ac_status=$?
11983   echo "$as_me:11983: \$? = $ac_status" >&5
11984   (exit "$ac_status"); } &&
11985          { ac_try='test -s "conftest$ac_exeext"'
11986   { (eval echo "$as_me:11986: \"$ac_try\"") >&5
11987   (eval $ac_try) 2>&5
11988   ac_status=$?
11989   echo "$as_me:11989: \$? = $ac_status" >&5
11990   (exit "$ac_status"); }; }; then
11991   eval "$as_ac_var=yes"
11992 else
11993   echo "$as_me: failed program was:" >&5
11994 cat "conftest.$ac_ext" >&5
11995 eval "$as_ac_var=no"
11996 fi
11997 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11998 fi
11999 echo "$as_me:11999: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12000 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12001 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12002   cat >>confdefs.h <<EOF
12003 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12004 EOF
12005
12006 fi
12007 done
12008
12009         if test "x$ac_cv_func_putwc" != xyes ; then
12010
12011 echo "$as_me:12011: checking for multibyte character support" >&5
12012 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12013 if test "${cf_cv_utf8_lib+set}" = set; then
12014   echo $ECHO_N "(cached) $ECHO_C" >&6
12015 else
12016
12017         cf_save_LIBS="$LIBS"
12018         cat >"conftest.$ac_ext" <<_ACEOF
12019 #line 12019 "configure"
12020 #include "confdefs.h"
12021
12022 #include <stdlib.h>
12023 int
12024 main (void)
12025 {
12026 putwc(0,0);
12027   ;
12028   return 0;
12029 }
12030 _ACEOF
12031 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12032 if { (eval echo "$as_me:12032: \"$ac_link\"") >&5
12033   (eval $ac_link) 2>&5
12034   ac_status=$?
12035   echo "$as_me:12035: \$? = $ac_status" >&5
12036   (exit "$ac_status"); } &&
12037          { ac_try='test -s "conftest$ac_exeext"'
12038   { (eval echo "$as_me:12038: \"$ac_try\"") >&5
12039   (eval $ac_try) 2>&5
12040   ac_status=$?
12041   echo "$as_me:12041: \$? = $ac_status" >&5
12042   (exit "$ac_status"); }; }; then
12043   cf_cv_utf8_lib=yes
12044 else
12045   echo "$as_me: failed program was:" >&5
12046 cat "conftest.$ac_ext" >&5
12047
12048 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12049 # will be set on completion of the AC_TRY_LINK below.
12050 cf_cv_header_path_utf8=
12051 cf_cv_library_path_utf8=
12052
12053 echo "${as_me:-configure}:12053: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
12054
12055 cf_save_LIBS="$LIBS"
12056
12057 cat >"conftest.$ac_ext" <<_ACEOF
12058 #line 12058 "configure"
12059 #include "confdefs.h"
12060
12061 #include <libutf8.h>
12062 int
12063 main (void)
12064 {
12065 putwc(0,0);
12066   ;
12067   return 0;
12068 }
12069 _ACEOF
12070 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12071 if { (eval echo "$as_me:12071: \"$ac_link\"") >&5
12072   (eval $ac_link) 2>&5
12073   ac_status=$?
12074   echo "$as_me:12074: \$? = $ac_status" >&5
12075   (exit "$ac_status"); } &&
12076          { ac_try='test -s "conftest$ac_exeext"'
12077   { (eval echo "$as_me:12077: \"$ac_try\"") >&5
12078   (eval $ac_try) 2>&5
12079   ac_status=$?
12080   echo "$as_me:12080: \$? = $ac_status" >&5
12081   (exit "$ac_status"); }; }; then
12082
12083         cf_cv_find_linkage_utf8=yes
12084         cf_cv_header_path_utf8=/usr/include
12085         cf_cv_library_path_utf8=/usr/lib
12086
12087 else
12088   echo "$as_me: failed program was:" >&5
12089 cat "conftest.$ac_ext" >&5
12090
12091 LIBS="-lutf8  $cf_save_LIBS"
12092
12093 cat >"conftest.$ac_ext" <<_ACEOF
12094 #line 12094 "configure"
12095 #include "confdefs.h"
12096
12097 #include <libutf8.h>
12098 int
12099 main (void)
12100 {
12101 putwc(0,0);
12102   ;
12103   return 0;
12104 }
12105 _ACEOF
12106 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12107 if { (eval echo "$as_me:12107: \"$ac_link\"") >&5
12108   (eval $ac_link) 2>&5
12109   ac_status=$?
12110   echo "$as_me:12110: \$? = $ac_status" >&5
12111   (exit "$ac_status"); } &&
12112          { ac_try='test -s "conftest$ac_exeext"'
12113   { (eval echo "$as_me:12113: \"$ac_try\"") >&5
12114   (eval $ac_try) 2>&5
12115   ac_status=$?
12116   echo "$as_me:12116: \$? = $ac_status" >&5
12117   (exit "$ac_status"); }; }; then
12118
12119         cf_cv_find_linkage_utf8=yes
12120         cf_cv_header_path_utf8=/usr/include
12121         cf_cv_library_path_utf8=/usr/lib
12122         cf_cv_library_file_utf8="-lutf8"
12123
12124 else
12125   echo "$as_me: failed program was:" >&5
12126 cat "conftest.$ac_ext" >&5
12127
12128         cf_cv_find_linkage_utf8=no
12129         LIBS="$cf_save_LIBS"
12130
12131         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
12132
12133 echo "${as_me:-configure}:12133: testing find linkage for utf8 library ..." 1>&5
12134
12135 echo "${as_me:-configure}:12135: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
12136
12137         cf_save_CPPFLAGS="$CPPFLAGS"
12138         cf_test_CPPFLAGS="$CPPFLAGS"
12139
12140 cf_search=
12141
12142 # collect the current set of include-directories from compiler flags
12143 cf_header_path_list=""
12144 if test -n "${CFLAGS}${CPPFLAGS}" ; then
12145         for cf_header_path in $CPPFLAGS $CFLAGS
12146         do
12147                 case "$cf_header_path" in
12148                 (-I*)
12149                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
12150
12151 test "x$cf_header_path" != "xNONE" && \
12152 test -d "$cf_header_path" && \
12153  {
12154         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
12155         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
12156         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
12157         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
12158         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
12159         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
12160 }
12161
12162                         cf_header_path_list="$cf_header_path_list $cf_search"
12163                         ;;
12164                 esac
12165         done
12166 fi
12167
12168 # add the variations for the package we are looking for
12169
12170 cf_search=
12171
12172 test "x$prefix" != "xNONE" && \
12173 test -d "$prefix" && \
12174  {
12175         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
12176         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
12177         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
12178         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
12179         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
12180         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
12181 }
12182
12183 for cf_subdir_prefix in \
12184         /usr \
12185         /usr/local \
12186         /usr/pkg \
12187         /opt \
12188         /opt/local \
12189         $HOME
12190 do
12191
12192 test "x$cf_subdir_prefix" != "x$prefix" && \
12193 test -d "$cf_subdir_prefix" && \
12194 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12195         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
12196         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
12197         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
12198         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
12199         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
12200         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
12201 }
12202
12203 done
12204
12205 test "$includedir" != NONE && \
12206 test "$includedir" != "/usr/include" && \
12207 test -d "$includedir" && {
12208         test -d "$includedir" &&    cf_search="$cf_search $includedir"
12209         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
12210 }
12211
12212 test "$oldincludedir" != NONE && \
12213 test "$oldincludedir" != "/usr/include" && \
12214 test -d "$oldincludedir" && {
12215         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
12216         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
12217 }
12218
12219 cf_search="$cf_search $cf_header_path_list"
12220
12221         for cf_cv_header_path_utf8 in $cf_search
12222         do
12223                 if test -d "$cf_cv_header_path_utf8" ; then
12224                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
12225
12226 echo "${as_me:-configure}:12226: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
12227
12228                         CPPFLAGS="$cf_save_CPPFLAGS"
12229
12230         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12231         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
12232
12233                         cat >"conftest.$ac_ext" <<_ACEOF
12234 #line 12234 "configure"
12235 #include "confdefs.h"
12236
12237 #include <libutf8.h>
12238 int
12239 main (void)
12240 {
12241 putwc(0,0);
12242   ;
12243   return 0;
12244 }
12245 _ACEOF
12246 rm -f "conftest.$ac_objext"
12247 if { (eval echo "$as_me:12247: \"$ac_compile\"") >&5
12248   (eval $ac_compile) 2>&5
12249   ac_status=$?
12250   echo "$as_me:12250: \$? = $ac_status" >&5
12251   (exit "$ac_status"); } &&
12252          { ac_try='test -s "conftest.$ac_objext"'
12253   { (eval echo "$as_me:12253: \"$ac_try\"") >&5
12254   (eval $ac_try) 2>&5
12255   ac_status=$?
12256   echo "$as_me:12256: \$? = $ac_status" >&5
12257   (exit "$ac_status"); }; }; then
12258
12259                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12260
12261 echo "${as_me:-configure}:12261: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12262
12263                                 cf_cv_find_linkage_utf8=maybe
12264                                 cf_test_CPPFLAGS="$CPPFLAGS"
12265                                 break
12266 else
12267   echo "$as_me: failed program was:" >&5
12268 cat "conftest.$ac_ext" >&5
12269
12270                                 CPPFLAGS="$cf_save_CPPFLAGS"
12271
12272 fi
12273 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12274                 fi
12275         done
12276
12277         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12278
12279 echo "${as_me:-configure}:12279: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12280
12281                 cf_save_LIBS="$LIBS"
12282                 cf_save_LDFLAGS="$LDFLAGS"
12283
12284                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12285
12286 cf_search=
12287 cf_library_path_list=""
12288 if test -n "${LDFLAGS}${LIBS}" ; then
12289         for cf_library_path in $LDFLAGS $LIBS
12290         do
12291                 case "$cf_library_path" in
12292                 (-L*)
12293                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12294
12295 test "x$cf_library_path" != "xNONE" && \
12296 test -d "$cf_library_path" && \
12297  {
12298         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12299         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
12300         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12301         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12302         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12303         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12304 }
12305
12306                         cf_library_path_list="$cf_library_path_list $cf_search"
12307                         ;;
12308                 esac
12309         done
12310 fi
12311
12312 cf_search=
12313
12314 test "x$prefix" != "xNONE" && \
12315 test -d "$prefix" && \
12316  {
12317         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12318         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
12319         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
12320         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12321         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
12322         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12323 }
12324
12325 for cf_subdir_prefix in \
12326         /usr \
12327         /usr/local \
12328         /usr/pkg \
12329         /opt \
12330         /opt/local \
12331         $HOME
12332 do
12333
12334 test "x$cf_subdir_prefix" != "x$prefix" && \
12335 test -d "$cf_subdir_prefix" && \
12336 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12337         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12338         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12339         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12340         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12341         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12342         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12343 }
12344
12345 done
12346
12347 cf_search="$cf_library_path_list $cf_search"
12348
12349                         for cf_cv_library_path_utf8 in $cf_search
12350                         do
12351                                 if test -d "$cf_cv_library_path_utf8" ; then
12352                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12353
12354 echo "${as_me:-configure}:12354: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12355
12356                                         CPPFLAGS="$cf_test_CPPFLAGS"
12357                                         LIBS="-lutf8  $cf_save_LIBS"
12358                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12359                                         cat >"conftest.$ac_ext" <<_ACEOF
12360 #line 12360 "configure"
12361 #include "confdefs.h"
12362
12363 #include <libutf8.h>
12364 int
12365 main (void)
12366 {
12367 putwc(0,0);
12368   ;
12369   return 0;
12370 }
12371 _ACEOF
12372 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12373 if { (eval echo "$as_me:12373: \"$ac_link\"") >&5
12374   (eval $ac_link) 2>&5
12375   ac_status=$?
12376   echo "$as_me:12376: \$? = $ac_status" >&5
12377   (exit "$ac_status"); } &&
12378          { ac_try='test -s "conftest$ac_exeext"'
12379   { (eval echo "$as_me:12379: \"$ac_try\"") >&5
12380   (eval $ac_try) 2>&5
12381   ac_status=$?
12382   echo "$as_me:12382: \$? = $ac_status" >&5
12383   (exit "$ac_status"); }; }; then
12384
12385                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12386
12387 echo "${as_me:-configure}:12387: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12388
12389                                         cf_cv_find_linkage_utf8=yes
12390                                         cf_cv_library_file_utf8="-lutf8"
12391                                         break
12392 else
12393   echo "$as_me: failed program was:" >&5
12394 cat "conftest.$ac_ext" >&5
12395
12396                                         CPPFLAGS="$cf_save_CPPFLAGS"
12397                                         LIBS="$cf_save_LIBS"
12398                                         LDFLAGS="$cf_save_LDFLAGS"
12399
12400 fi
12401 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12402                                 fi
12403                         done
12404                         CPPFLAGS="$cf_save_CPPFLAGS"
12405                         LDFLAGS="$cf_save_LDFLAGS"
12406                 fi
12407
12408         else
12409                 cf_cv_find_linkage_utf8=no
12410         fi
12411
12412 fi
12413 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12414
12415 fi
12416 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12417
12418 LIBS="$cf_save_LIBS"
12419
12420 if test "$cf_cv_find_linkage_utf8" = yes ; then
12421 cf_cv_utf8_lib=add-on
12422 else
12423 cf_cv_utf8_lib=no
12424 fi
12425
12426 fi
12427 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12428 fi
12429 echo "$as_me:12429: result: $cf_cv_utf8_lib" >&5
12430 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12431
12432 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12433 # ncurses/ncursesw:
12434 if test "$cf_cv_utf8_lib" = "add-on" ; then
12435
12436 cat >>confdefs.h <<\EOF
12437 #define HAVE_LIBUTF8_H 1
12438 EOF
12439
12440 if test -n "$cf_cv_header_path_utf8" ; then
12441   for cf_add_incdir in $cf_cv_header_path_utf8
12442   do
12443         while test "$cf_add_incdir" != /usr/include
12444         do
12445           if test -d "$cf_add_incdir"
12446           then
12447                 cf_have_incdir=no
12448                 if test -n "$CFLAGS$CPPFLAGS" ; then
12449                   # a loop is needed to ensure we can add subdirs of existing dirs
12450                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12451                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12452                           cf_have_incdir=yes; break
12453                         fi
12454                   done
12455                 fi
12456
12457                 if test "$cf_have_incdir" = no ; then
12458                   if test "$cf_add_incdir" = /usr/local/include ; then
12459                         if test "$GCC" = yes
12460                         then
12461                           cf_save_CPPFLAGS=$CPPFLAGS
12462
12463         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12464         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12465
12466                           cat >"conftest.$ac_ext" <<_ACEOF
12467 #line 12467 "configure"
12468 #include "confdefs.h"
12469 #include <stdio.h>
12470 int
12471 main (void)
12472 {
12473 printf("Hello")
12474   ;
12475   return 0;
12476 }
12477 _ACEOF
12478 rm -f "conftest.$ac_objext"
12479 if { (eval echo "$as_me:12479: \"$ac_compile\"") >&5
12480   (eval $ac_compile) 2>&5
12481   ac_status=$?
12482   echo "$as_me:12482: \$? = $ac_status" >&5
12483   (exit "$ac_status"); } &&
12484          { ac_try='test -s "conftest.$ac_objext"'
12485   { (eval echo "$as_me:12485: \"$ac_try\"") >&5
12486   (eval $ac_try) 2>&5
12487   ac_status=$?
12488   echo "$as_me:12488: \$? = $ac_status" >&5
12489   (exit "$ac_status"); }; }; then
12490   :
12491 else
12492   echo "$as_me: failed program was:" >&5
12493 cat "conftest.$ac_ext" >&5
12494 cf_have_incdir=yes
12495 fi
12496 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12497                           CPPFLAGS=$cf_save_CPPFLAGS
12498                         fi
12499                   fi
12500                 fi
12501
12502                 if test "$cf_have_incdir" = no ; then
12503                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12504
12505 echo "${as_me:-configure}:12505: testing adding $cf_add_incdir to include-path ..." 1>&5
12506
12507                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12508
12509                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
12510                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12511                   cf_add_incdir="$cf_top_incdir"
12512                 else
12513                   break
12514                 fi
12515           else
12516                 break
12517           fi
12518         done
12519   done
12520 fi
12521
12522 if test -n "$cf_cv_library_path_utf8" ; then
12523         for cf_add_libdir in $cf_cv_library_path_utf8
12524         do
12525                 if test "$cf_add_libdir" = /usr/lib ; then
12526                         :
12527                 elif test -d "$cf_add_libdir"
12528                 then
12529                         cf_have_libdir=no
12530                         if test -n "$LDFLAGS$LIBS" ; then
12531                                 # a loop is needed to ensure we can add subdirs of existing dirs
12532                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12533                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12534                                                 cf_have_libdir=yes; break
12535                                         fi
12536                                 done
12537                         fi
12538                         if test "$cf_have_libdir" = no ; then
12539                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12540
12541 echo "${as_me:-configure}:12541: testing adding $cf_add_libdir to library-path ..." 1>&5
12542
12543                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12544                         fi
12545                 fi
12546         done
12547 fi
12548
12549 cf_add_libs="$LIBS"
12550 # reverse order
12551 cf_add_0lib=
12552 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12553 # filter duplicates
12554 for cf_add_1lib in $cf_add_0lib; do
12555         for cf_add_2lib in $cf_add_libs; do
12556                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12557                         cf_add_1lib=
12558                         break
12559                 fi
12560         done
12561         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12562 done
12563 LIBS="$cf_add_libs"
12564
12565 fi
12566
12567                 if test "$cf_cv_utf8_lib" != no ; then
12568                         NCURSES_LIBUTF8=1
12569                 fi
12570         fi
12571
12572 # This is needed on Tru64 5.0 to declare mbstate_t
12573 echo "$as_me:12573: checking if we must include wchar.h to declare mbstate_t" >&5
12574 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12575 if test "${cf_cv_mbstate_t+set}" = set; then
12576   echo $ECHO_N "(cached) $ECHO_C" >&6
12577 else
12578
12579 cat >"conftest.$ac_ext" <<_ACEOF
12580 #line 12580 "configure"
12581 #include "confdefs.h"
12582
12583 #include <stdlib.h>
12584 #include <stdarg.h>
12585 #include <stdio.h>
12586 #ifdef HAVE_LIBUTF8_H
12587 #include <libutf8.h>
12588 #endif
12589 int
12590 main (void)
12591 {
12592 mbstate_t state
12593   ;
12594   return 0;
12595 }
12596 _ACEOF
12597 rm -f "conftest.$ac_objext"
12598 if { (eval echo "$as_me:12598: \"$ac_compile\"") >&5
12599   (eval $ac_compile) 2>&5
12600   ac_status=$?
12601   echo "$as_me:12601: \$? = $ac_status" >&5
12602   (exit "$ac_status"); } &&
12603          { ac_try='test -s "conftest.$ac_objext"'
12604   { (eval echo "$as_me:12604: \"$ac_try\"") >&5
12605   (eval $ac_try) 2>&5
12606   ac_status=$?
12607   echo "$as_me:12607: \$? = $ac_status" >&5
12608   (exit "$ac_status"); }; }; then
12609   cf_cv_mbstate_t=no
12610 else
12611   echo "$as_me: failed program was:" >&5
12612 cat "conftest.$ac_ext" >&5
12613 cat >"conftest.$ac_ext" <<_ACEOF
12614 #line 12614 "configure"
12615 #include "confdefs.h"
12616
12617 #include <stdlib.h>
12618 #include <stdarg.h>
12619 #include <stdio.h>
12620 #include <wchar.h>
12621 #ifdef HAVE_LIBUTF8_H
12622 #include <libutf8.h>
12623 #endif
12624 int
12625 main (void)
12626 {
12627 mbstate_t value
12628   ;
12629   return 0;
12630 }
12631 _ACEOF
12632 rm -f "conftest.$ac_objext"
12633 if { (eval echo "$as_me:12633: \"$ac_compile\"") >&5
12634   (eval $ac_compile) 2>&5
12635   ac_status=$?
12636   echo "$as_me:12636: \$? = $ac_status" >&5
12637   (exit "$ac_status"); } &&
12638          { ac_try='test -s "conftest.$ac_objext"'
12639   { (eval echo "$as_me:12639: \"$ac_try\"") >&5
12640   (eval $ac_try) 2>&5
12641   ac_status=$?
12642   echo "$as_me:12642: \$? = $ac_status" >&5
12643   (exit "$ac_status"); }; }; then
12644   cf_cv_mbstate_t=yes
12645 else
12646   echo "$as_me: failed program was:" >&5
12647 cat "conftest.$ac_ext" >&5
12648 cf_cv_mbstate_t=unknown
12649 fi
12650 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12651 fi
12652 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12653 fi
12654 echo "$as_me:12654: result: $cf_cv_mbstate_t" >&5
12655 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
12656
12657 if test "$cf_cv_mbstate_t" = yes ; then
12658
12659 cat >>confdefs.h <<\EOF
12660 #define NEED_WCHAR_H 1
12661 EOF
12662
12663         NEED_WCHAR_H=1
12664 fi
12665
12666 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
12667 if test "$cf_cv_mbstate_t" = unknown ; then
12668         NCURSES_MBSTATE_T=1
12669 fi
12670
12671 # This is needed on Tru64 5.0 to declare wchar_t
12672 echo "$as_me:12672: checking if we must include wchar.h to declare wchar_t" >&5
12673 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
12674 if test "${cf_cv_wchar_t+set}" = set; then
12675   echo $ECHO_N "(cached) $ECHO_C" >&6
12676 else
12677
12678 cat >"conftest.$ac_ext" <<_ACEOF
12679 #line 12679 "configure"
12680 #include "confdefs.h"
12681
12682 #include <stdlib.h>
12683 #include <stdarg.h>
12684 #include <stdio.h>
12685 #ifdef HAVE_LIBUTF8_H
12686 #include <libutf8.h>
12687 #endif
12688 int
12689 main (void)
12690 {
12691 wchar_t state
12692   ;
12693   return 0;
12694 }
12695 _ACEOF
12696 rm -f "conftest.$ac_objext"
12697 if { (eval echo "$as_me:12697: \"$ac_compile\"") >&5
12698   (eval $ac_compile) 2>&5
12699   ac_status=$?
12700   echo "$as_me:12700: \$? = $ac_status" >&5
12701   (exit "$ac_status"); } &&
12702          { ac_try='test -s "conftest.$ac_objext"'
12703   { (eval echo "$as_me:12703: \"$ac_try\"") >&5
12704   (eval $ac_try) 2>&5
12705   ac_status=$?
12706   echo "$as_me:12706: \$? = $ac_status" >&5
12707   (exit "$ac_status"); }; }; then
12708   cf_cv_wchar_t=no
12709 else
12710   echo "$as_me: failed program was:" >&5
12711 cat "conftest.$ac_ext" >&5
12712 cat >"conftest.$ac_ext" <<_ACEOF
12713 #line 12713 "configure"
12714 #include "confdefs.h"
12715
12716 #include <stdlib.h>
12717 #include <stdarg.h>
12718 #include <stdio.h>
12719 #include <wchar.h>
12720 #ifdef HAVE_LIBUTF8_H
12721 #include <libutf8.h>
12722 #endif
12723 int
12724 main (void)
12725 {
12726 wchar_t value
12727   ;
12728   return 0;
12729 }
12730 _ACEOF
12731 rm -f "conftest.$ac_objext"
12732 if { (eval echo "$as_me:12732: \"$ac_compile\"") >&5
12733   (eval $ac_compile) 2>&5
12734   ac_status=$?
12735   echo "$as_me:12735: \$? = $ac_status" >&5
12736   (exit "$ac_status"); } &&
12737          { ac_try='test -s "conftest.$ac_objext"'
12738   { (eval echo "$as_me:12738: \"$ac_try\"") >&5
12739   (eval $ac_try) 2>&5
12740   ac_status=$?
12741   echo "$as_me:12741: \$? = $ac_status" >&5
12742   (exit "$ac_status"); }; }; then
12743   cf_cv_wchar_t=yes
12744 else
12745   echo "$as_me: failed program was:" >&5
12746 cat "conftest.$ac_ext" >&5
12747 cf_cv_wchar_t=unknown
12748 fi
12749 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12750 fi
12751 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12752 fi
12753 echo "$as_me:12753: result: $cf_cv_wchar_t" >&5
12754 echo "${ECHO_T}$cf_cv_wchar_t" >&6
12755
12756 if test "$cf_cv_wchar_t" = yes ; then
12757
12758 cat >>confdefs.h <<\EOF
12759 #define NEED_WCHAR_H 1
12760 EOF
12761
12762         NEED_WCHAR_H=1
12763 fi
12764
12765 # if we do not find wchar_t in either place, use substitution to provide a fallback.
12766 if test "$cf_cv_wchar_t" = unknown ; then
12767         NCURSES_WCHAR_T=1
12768 fi
12769
12770 # if we find wchar_t in either place, use substitution to provide a fallback.
12771 if test "$cf_cv_wchar_t" != unknown ; then
12772         NCURSES_OK_WCHAR_T=1
12773 fi
12774
12775 # This is needed on Tru64 5.0 to declare wint_t
12776 echo "$as_me:12776: checking if we must include wchar.h to declare wint_t" >&5
12777 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
12778 if test "${cf_cv_wint_t+set}" = set; then
12779   echo $ECHO_N "(cached) $ECHO_C" >&6
12780 else
12781
12782 cat >"conftest.$ac_ext" <<_ACEOF
12783 #line 12783 "configure"
12784 #include "confdefs.h"
12785
12786 #include <stdlib.h>
12787 #include <stdarg.h>
12788 #include <stdio.h>
12789 #ifdef HAVE_LIBUTF8_H
12790 #include <libutf8.h>
12791 #endif
12792 int
12793 main (void)
12794 {
12795 wint_t state
12796   ;
12797   return 0;
12798 }
12799 _ACEOF
12800 rm -f "conftest.$ac_objext"
12801 if { (eval echo "$as_me:12801: \"$ac_compile\"") >&5
12802   (eval $ac_compile) 2>&5
12803   ac_status=$?
12804   echo "$as_me:12804: \$? = $ac_status" >&5
12805   (exit "$ac_status"); } &&
12806          { ac_try='test -s "conftest.$ac_objext"'
12807   { (eval echo "$as_me:12807: \"$ac_try\"") >&5
12808   (eval $ac_try) 2>&5
12809   ac_status=$?
12810   echo "$as_me:12810: \$? = $ac_status" >&5
12811   (exit "$ac_status"); }; }; then
12812   cf_cv_wint_t=no
12813 else
12814   echo "$as_me: failed program was:" >&5
12815 cat "conftest.$ac_ext" >&5
12816 cat >"conftest.$ac_ext" <<_ACEOF
12817 #line 12817 "configure"
12818 #include "confdefs.h"
12819
12820 #include <stdlib.h>
12821 #include <stdarg.h>
12822 #include <stdio.h>
12823 #include <wchar.h>
12824 #ifdef HAVE_LIBUTF8_H
12825 #include <libutf8.h>
12826 #endif
12827 int
12828 main (void)
12829 {
12830 wint_t value
12831   ;
12832   return 0;
12833 }
12834 _ACEOF
12835 rm -f "conftest.$ac_objext"
12836 if { (eval echo "$as_me:12836: \"$ac_compile\"") >&5
12837   (eval $ac_compile) 2>&5
12838   ac_status=$?
12839   echo "$as_me:12839: \$? = $ac_status" >&5
12840   (exit "$ac_status"); } &&
12841          { ac_try='test -s "conftest.$ac_objext"'
12842   { (eval echo "$as_me:12842: \"$ac_try\"") >&5
12843   (eval $ac_try) 2>&5
12844   ac_status=$?
12845   echo "$as_me:12845: \$? = $ac_status" >&5
12846   (exit "$ac_status"); }; }; then
12847   cf_cv_wint_t=yes
12848 else
12849   echo "$as_me: failed program was:" >&5
12850 cat "conftest.$ac_ext" >&5
12851 cf_cv_wint_t=unknown
12852 fi
12853 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12854 fi
12855 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12856 fi
12857 echo "$as_me:12857: result: $cf_cv_wint_t" >&5
12858 echo "${ECHO_T}$cf_cv_wint_t" >&6
12859
12860 if test "$cf_cv_wint_t" = yes ; then
12861
12862 cat >>confdefs.h <<\EOF
12863 #define NEED_WCHAR_H 1
12864 EOF
12865
12866         NEED_WCHAR_H=1
12867 fi
12868
12869 # if we do not find wint_t in either place, use substitution to provide a fallback.
12870 if test "$cf_cv_wint_t" = unknown ; then
12871         NCURSES_WINT_T=1
12872 fi
12873
12874 # if we find wint_t in either place, use substitution to provide a fallback.
12875 if test "$cf_cv_wint_t" != unknown ; then
12876         NCURSES_OK_WINT_T=1
12877 fi
12878
12879         if test "$NCURSES_MBSTATE_T" != 0; then
12880
12881 cat >>confdefs.h <<\EOF
12882 #define NEED_MBSTATE_T_DEF 1
12883 EOF
12884
12885         fi
12886 fi
12887
12888 ###   use option --disable-lp64 to allow long chtype
12889 echo "$as_me:12889: checking whether to enable _LP64 definition in curses.h" >&5
12890 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
12891
12892 # Check whether --enable-lp64 or --disable-lp64 was given.
12893 if test "${enable_lp64+set}" = set; then
12894   enableval="$enable_lp64"
12895   with_lp64=$enableval
12896 else
12897   with_lp64=$cf_dft_with_lp64
12898 fi;
12899 echo "$as_me:12899: result: $with_lp64" >&5
12900 echo "${ECHO_T}$with_lp64" >&6
12901
12902 if test "x$with_lp64" = xyes ; then
12903         cf_cv_enable_lp64=1
12904 else
12905         cf_cv_enable_lp64=0
12906 fi
12907
12908 # Check whether --enable-largefile or --disable-largefile was given.
12909 if test "${enable_largefile+set}" = set; then
12910   enableval="$enable_largefile"
12911
12912 fi;
12913 if test "$enable_largefile" != no; then
12914
12915   echo "$as_me:12915: checking for special C compiler options needed for large files" >&5
12916 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12917 if test "${ac_cv_sys_largefile_CC+set}" = set; then
12918   echo $ECHO_N "(cached) $ECHO_C" >&6
12919 else
12920   ac_cv_sys_largefile_CC=no
12921      if test "$GCC" != yes; then
12922        ac_save_CC=$CC
12923        while :; do
12924          # IRIX 6.2 and later do not support large files by default,
12925          # so use the C compiler's -n32 option if that helps.
12926          cat >"conftest.$ac_ext" <<_ACEOF
12927 #line 12927 "configure"
12928 #include "confdefs.h"
12929 #include <sys/types.h>
12930  /* Check that off_t can represent 2**63 - 1 correctly.
12931     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12932     since some C++ compilers masquerading as C compilers
12933     incorrectly reject 9223372036854775807.  */
12934 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12935   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12936                        && LARGE_OFF_T % 2147483647 == 1)
12937                       ? 1 : -1];
12938 int
12939 main (void)
12940 {
12941
12942   ;
12943   return 0;
12944 }
12945 _ACEOF
12946          rm -f "conftest.$ac_objext"
12947 if { (eval echo "$as_me:12947: \"$ac_compile\"") >&5
12948   (eval $ac_compile) 2>&5
12949   ac_status=$?
12950   echo "$as_me:12950: \$? = $ac_status" >&5
12951   (exit "$ac_status"); } &&
12952          { ac_try='test -s "conftest.$ac_objext"'
12953   { (eval echo "$as_me:12953: \"$ac_try\"") >&5
12954   (eval $ac_try) 2>&5
12955   ac_status=$?
12956   echo "$as_me:12956: \$? = $ac_status" >&5
12957   (exit "$ac_status"); }; }; then
12958   break
12959 else
12960   echo "$as_me: failed program was:" >&5
12961 cat "conftest.$ac_ext" >&5
12962 fi
12963 rm -f "conftest.$ac_objext"
12964          CC="$CC -n32"
12965          rm -f "conftest.$ac_objext"
12966 if { (eval echo "$as_me:12966: \"$ac_compile\"") >&5
12967   (eval $ac_compile) 2>&5
12968   ac_status=$?
12969   echo "$as_me:12969: \$? = $ac_status" >&5
12970   (exit "$ac_status"); } &&
12971          { ac_try='test -s "conftest.$ac_objext"'
12972   { (eval echo "$as_me:12972: \"$ac_try\"") >&5
12973   (eval $ac_try) 2>&5
12974   ac_status=$?
12975   echo "$as_me:12975: \$? = $ac_status" >&5
12976   (exit "$ac_status"); }; }; then
12977   ac_cv_sys_largefile_CC=' -n32'; break
12978 else
12979   echo "$as_me: failed program was:" >&5
12980 cat "conftest.$ac_ext" >&5
12981 fi
12982 rm -f "conftest.$ac_objext"
12983          break
12984        done
12985        CC=$ac_save_CC
12986        rm -f "conftest.$ac_ext"
12987     fi
12988 fi
12989 echo "$as_me:12989: result: $ac_cv_sys_largefile_CC" >&5
12990 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12991   if test "$ac_cv_sys_largefile_CC" != no; then
12992     CC=$CC$ac_cv_sys_largefile_CC
12993   fi
12994
12995   echo "$as_me:12995: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12996 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12997 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12998   echo $ECHO_N "(cached) $ECHO_C" >&6
12999 else
13000   while :; do
13001   ac_cv_sys_file_offset_bits=no
13002   cat >"conftest.$ac_ext" <<_ACEOF
13003 #line 13003 "configure"
13004 #include "confdefs.h"
13005 #include <sys/types.h>
13006  /* Check that off_t can represent 2**63 - 1 correctly.
13007     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13008     since some C++ compilers masquerading as C compilers
13009     incorrectly reject 9223372036854775807.  */
13010 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13011   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13012                        && LARGE_OFF_T % 2147483647 == 1)
13013                       ? 1 : -1];
13014 int
13015 main (void)
13016 {
13017
13018   ;
13019   return 0;
13020 }
13021 _ACEOF
13022 rm -f "conftest.$ac_objext"
13023 if { (eval echo "$as_me:13023: \"$ac_compile\"") >&5
13024   (eval $ac_compile) 2>&5
13025   ac_status=$?
13026   echo "$as_me:13026: \$? = $ac_status" >&5
13027   (exit "$ac_status"); } &&
13028          { ac_try='test -s "conftest.$ac_objext"'
13029   { (eval echo "$as_me:13029: \"$ac_try\"") >&5
13030   (eval $ac_try) 2>&5
13031   ac_status=$?
13032   echo "$as_me:13032: \$? = $ac_status" >&5
13033   (exit "$ac_status"); }; }; then
13034   break
13035 else
13036   echo "$as_me: failed program was:" >&5
13037 cat "conftest.$ac_ext" >&5
13038 fi
13039 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13040   cat >"conftest.$ac_ext" <<_ACEOF
13041 #line 13041 "configure"
13042 #include "confdefs.h"
13043 #define _FILE_OFFSET_BITS 64
13044 #include <sys/types.h>
13045  /* Check that off_t can represent 2**63 - 1 correctly.
13046     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13047     since some C++ compilers masquerading as C compilers
13048     incorrectly reject 9223372036854775807.  */
13049 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13050   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13051                        && LARGE_OFF_T % 2147483647 == 1)
13052                       ? 1 : -1];
13053 int
13054 main (void)
13055 {
13056
13057   ;
13058   return 0;
13059 }
13060 _ACEOF
13061 rm -f "conftest.$ac_objext"
13062 if { (eval echo "$as_me:13062: \"$ac_compile\"") >&5
13063   (eval $ac_compile) 2>&5
13064   ac_status=$?
13065   echo "$as_me:13065: \$? = $ac_status" >&5
13066   (exit "$ac_status"); } &&
13067          { ac_try='test -s "conftest.$ac_objext"'
13068   { (eval echo "$as_me:13068: \"$ac_try\"") >&5
13069   (eval $ac_try) 2>&5
13070   ac_status=$?
13071   echo "$as_me:13071: \$? = $ac_status" >&5
13072   (exit "$ac_status"); }; }; then
13073   ac_cv_sys_file_offset_bits=64; break
13074 else
13075   echo "$as_me: failed program was:" >&5
13076 cat "conftest.$ac_ext" >&5
13077 fi
13078 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13079   break
13080 done
13081 fi
13082 echo "$as_me:13082: result: $ac_cv_sys_file_offset_bits" >&5
13083 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13084 if test "$ac_cv_sys_file_offset_bits" != no; then
13085
13086 cat >>confdefs.h <<EOF
13087 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13088 EOF
13089
13090 fi
13091 rm -rf conftest*
13092   echo "$as_me:13092: checking for _LARGE_FILES value needed for large files" >&5
13093 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13094 if test "${ac_cv_sys_large_files+set}" = set; then
13095   echo $ECHO_N "(cached) $ECHO_C" >&6
13096 else
13097   while :; do
13098   ac_cv_sys_large_files=no
13099   cat >"conftest.$ac_ext" <<_ACEOF
13100 #line 13100 "configure"
13101 #include "confdefs.h"
13102 #include <sys/types.h>
13103  /* Check that off_t can represent 2**63 - 1 correctly.
13104     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13105     since some C++ compilers masquerading as C compilers
13106     incorrectly reject 9223372036854775807.  */
13107 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13108   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13109                        && LARGE_OFF_T % 2147483647 == 1)
13110                       ? 1 : -1];
13111 int
13112 main (void)
13113 {
13114
13115   ;
13116   return 0;
13117 }
13118 _ACEOF
13119 rm -f "conftest.$ac_objext"
13120 if { (eval echo "$as_me:13120: \"$ac_compile\"") >&5
13121   (eval $ac_compile) 2>&5
13122   ac_status=$?
13123   echo "$as_me:13123: \$? = $ac_status" >&5
13124   (exit "$ac_status"); } &&
13125          { ac_try='test -s "conftest.$ac_objext"'
13126   { (eval echo "$as_me:13126: \"$ac_try\"") >&5
13127   (eval $ac_try) 2>&5
13128   ac_status=$?
13129   echo "$as_me:13129: \$? = $ac_status" >&5
13130   (exit "$ac_status"); }; }; then
13131   break
13132 else
13133   echo "$as_me: failed program was:" >&5
13134 cat "conftest.$ac_ext" >&5
13135 fi
13136 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13137   cat >"conftest.$ac_ext" <<_ACEOF
13138 #line 13138 "configure"
13139 #include "confdefs.h"
13140 #define _LARGE_FILES 1
13141 #include <sys/types.h>
13142  /* Check that off_t can represent 2**63 - 1 correctly.
13143     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13144     since some C++ compilers masquerading as C compilers
13145     incorrectly reject 9223372036854775807.  */
13146 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13147   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13148                        && LARGE_OFF_T % 2147483647 == 1)
13149                       ? 1 : -1];
13150 int
13151 main (void)
13152 {
13153
13154   ;
13155   return 0;
13156 }
13157 _ACEOF
13158 rm -f "conftest.$ac_objext"
13159 if { (eval echo "$as_me:13159: \"$ac_compile\"") >&5
13160   (eval $ac_compile) 2>&5
13161   ac_status=$?
13162   echo "$as_me:13162: \$? = $ac_status" >&5
13163   (exit "$ac_status"); } &&
13164          { ac_try='test -s "conftest.$ac_objext"'
13165   { (eval echo "$as_me:13165: \"$ac_try\"") >&5
13166   (eval $ac_try) 2>&5
13167   ac_status=$?
13168   echo "$as_me:13168: \$? = $ac_status" >&5
13169   (exit "$ac_status"); }; }; then
13170   ac_cv_sys_large_files=1; break
13171 else
13172   echo "$as_me: failed program was:" >&5
13173 cat "conftest.$ac_ext" >&5
13174 fi
13175 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13176   break
13177 done
13178 fi
13179 echo "$as_me:13179: result: $ac_cv_sys_large_files" >&5
13180 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13181 if test "$ac_cv_sys_large_files" != no; then
13182
13183 cat >>confdefs.h <<EOF
13184 #define _LARGE_FILES $ac_cv_sys_large_files
13185 EOF
13186
13187 fi
13188 rm -rf conftest*
13189 fi
13190
13191         if test "$enable_largefile" != no ; then
13192         echo "$as_me:13192: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13193 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13194 if test "${ac_cv_sys_largefile_source+set}" = set; then
13195   echo $ECHO_N "(cached) $ECHO_C" >&6
13196 else
13197   while :; do
13198   ac_cv_sys_largefile_source=no
13199   cat >"conftest.$ac_ext" <<_ACEOF
13200 #line 13200 "configure"
13201 #include "confdefs.h"
13202 #include <stdio.h>
13203 int
13204 main (void)
13205 {
13206 return !fseeko;
13207   ;
13208   return 0;
13209 }
13210 _ACEOF
13211 rm -f "conftest.$ac_objext"
13212 if { (eval echo "$as_me:13212: \"$ac_compile\"") >&5
13213   (eval $ac_compile) 2>&5
13214   ac_status=$?
13215   echo "$as_me:13215: \$? = $ac_status" >&5
13216   (exit "$ac_status"); } &&
13217          { ac_try='test -s "conftest.$ac_objext"'
13218   { (eval echo "$as_me:13218: \"$ac_try\"") >&5
13219   (eval $ac_try) 2>&5
13220   ac_status=$?
13221   echo "$as_me:13221: \$? = $ac_status" >&5
13222   (exit "$ac_status"); }; }; then
13223   break
13224 else
13225   echo "$as_me: failed program was:" >&5
13226 cat "conftest.$ac_ext" >&5
13227 fi
13228 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13229   cat >"conftest.$ac_ext" <<_ACEOF
13230 #line 13230 "configure"
13231 #include "confdefs.h"
13232 #define _LARGEFILE_SOURCE 1
13233 #include <stdio.h>
13234 int
13235 main (void)
13236 {
13237 return !fseeko;
13238   ;
13239   return 0;
13240 }
13241 _ACEOF
13242 rm -f "conftest.$ac_objext"
13243 if { (eval echo "$as_me:13243: \"$ac_compile\"") >&5
13244   (eval $ac_compile) 2>&5
13245   ac_status=$?
13246   echo "$as_me:13246: \$? = $ac_status" >&5
13247   (exit "$ac_status"); } &&
13248          { ac_try='test -s "conftest.$ac_objext"'
13249   { (eval echo "$as_me:13249: \"$ac_try\"") >&5
13250   (eval $ac_try) 2>&5
13251   ac_status=$?
13252   echo "$as_me:13252: \$? = $ac_status" >&5
13253   (exit "$ac_status"); }; }; then
13254   ac_cv_sys_largefile_source=1; break
13255 else
13256   echo "$as_me: failed program was:" >&5
13257 cat "conftest.$ac_ext" >&5
13258 fi
13259 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13260   break
13261 done
13262 fi
13263 echo "$as_me:13263: result: $ac_cv_sys_largefile_source" >&5
13264 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13265 if test "$ac_cv_sys_largefile_source" != no; then
13266
13267 cat >>confdefs.h <<EOF
13268 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13269 EOF
13270
13271 fi
13272 rm -rf conftest*
13273
13274 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13275 # in glibc 2.1.3, but that breaks too many other things.
13276 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13277 echo "$as_me:13277: checking for fseeko" >&5
13278 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13279 if test "${ac_cv_func_fseeko+set}" = set; then
13280   echo $ECHO_N "(cached) $ECHO_C" >&6
13281 else
13282   cat >"conftest.$ac_ext" <<_ACEOF
13283 #line 13283 "configure"
13284 #include "confdefs.h"
13285 #include <stdio.h>
13286 int
13287 main (void)
13288 {
13289 return fseeko && fseeko (stdin, 0, 0);
13290   ;
13291   return 0;
13292 }
13293 _ACEOF
13294 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13295 if { (eval echo "$as_me:13295: \"$ac_link\"") >&5
13296   (eval $ac_link) 2>&5
13297   ac_status=$?
13298   echo "$as_me:13298: \$? = $ac_status" >&5
13299   (exit "$ac_status"); } &&
13300          { ac_try='test -s "conftest$ac_exeext"'
13301   { (eval echo "$as_me:13301: \"$ac_try\"") >&5
13302   (eval $ac_try) 2>&5
13303   ac_status=$?
13304   echo "$as_me:13304: \$? = $ac_status" >&5
13305   (exit "$ac_status"); }; }; then
13306   ac_cv_func_fseeko=yes
13307 else
13308   echo "$as_me: failed program was:" >&5
13309 cat "conftest.$ac_ext" >&5
13310 ac_cv_func_fseeko=no
13311 fi
13312 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13313 fi
13314 echo "$as_me:13314: result: $ac_cv_func_fseeko" >&5
13315 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13316 if test $ac_cv_func_fseeko = yes; then
13317
13318 cat >>confdefs.h <<\EOF
13319 #define HAVE_FSEEKO 1
13320 EOF
13321
13322 fi
13323
13324         # Normally we would collect these definitions in the config.h,
13325         # but (like _XOPEN_SOURCE), some environments rely on having these
13326         # defined before any of the system headers are included.  Another
13327         # case comes up with C++, e.g., on AIX the compiler compiles the
13328         # header files by themselves before looking at the body files it is
13329         # told to compile.  For ncurses, those header files do not include
13330         # the config.h
13331         if test "$ac_cv_sys_large_files" != no
13332         then
13333
13334         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13335         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13336
13337         fi
13338         if test "$ac_cv_sys_largefile_source" != no
13339         then
13340
13341         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13342         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13343
13344         fi
13345         if test "$ac_cv_sys_file_offset_bits" != no
13346         then
13347
13348         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13349         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13350
13351         fi
13352
13353         echo "$as_me:13353: checking whether to use struct dirent64" >&5
13354 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13355 if test "${cf_cv_struct_dirent64+set}" = set; then
13356   echo $ECHO_N "(cached) $ECHO_C" >&6
13357 else
13358
13359                 cat >"conftest.$ac_ext" <<_ACEOF
13360 #line 13360 "configure"
13361 #include "confdefs.h"
13362
13363 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13364 #include <sys/types.h>
13365 #include <dirent.h>
13366
13367 int
13368 main (void)
13369 {
13370
13371                 /* if transitional largefile support is setup, this is true */
13372                 extern struct dirent64 * readdir(DIR *);
13373                 struct dirent64 *x = readdir((DIR *)0);
13374                 struct dirent *y = readdir((DIR *)0);
13375                 int z = x - y;
13376                 (void)z;
13377
13378   ;
13379   return 0;
13380 }
13381 _ACEOF
13382 rm -f "conftest.$ac_objext"
13383 if { (eval echo "$as_me:13383: \"$ac_compile\"") >&5
13384   (eval $ac_compile) 2>&5
13385   ac_status=$?
13386   echo "$as_me:13386: \$? = $ac_status" >&5
13387   (exit "$ac_status"); } &&
13388          { ac_try='test -s "conftest.$ac_objext"'
13389   { (eval echo "$as_me:13389: \"$ac_try\"") >&5
13390   (eval $ac_try) 2>&5
13391   ac_status=$?
13392   echo "$as_me:13392: \$? = $ac_status" >&5
13393   (exit "$ac_status"); }; }; then
13394   cf_cv_struct_dirent64=yes
13395 else
13396   echo "$as_me: failed program was:" >&5
13397 cat "conftest.$ac_ext" >&5
13398 cf_cv_struct_dirent64=no
13399 fi
13400 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13401
13402 fi
13403 echo "$as_me:13403: result: $cf_cv_struct_dirent64" >&5
13404 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13405         test "$cf_cv_struct_dirent64" = yes &&
13406 cat >>confdefs.h <<\EOF
13407 #define HAVE_STRUCT_DIRENT64 1
13408 EOF
13409
13410         fi
13411
13412 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13413 echo "$as_me:13413: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13414 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13415
13416 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13417 if test "${enable_tparm_varargs+set}" = set; then
13418   enableval="$enable_tparm_varargs"
13419   with_tparm_varargs=$enableval
13420 else
13421   with_tparm_varargs=yes
13422 fi;
13423 echo "$as_me:13423: result: $with_tparm_varargs" >&5
13424 echo "${ECHO_T}$with_tparm_varargs" >&6
13425 NCURSES_TPARM_VARARGS=0
13426 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13427
13428 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13429 if test "$with_ticlib" != no ; then
13430 echo "$as_me:13430: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13431 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13432
13433 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13434 if test "${enable_tic_depends+set}" = set; then
13435   enableval="$enable_tic_depends"
13436   with_tic_depends=$enableval
13437 else
13438   with_tic_depends=yes
13439 fi;
13440 echo "$as_me:13440: result: $with_tic_depends" >&5
13441 echo "${ECHO_T}$with_tic_depends" >&6
13442 else
13443         with_tic_depends=no
13444 fi
13445
13446 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
13447 echo "$as_me:13447: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
13448 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
13449
13450 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13451 if test "${enable_wattr_macros+set}" = set; then
13452   enableval="$enable_wattr_macros"
13453   with_wattr_macros=$enableval
13454 else
13455   with_wattr_macros=yes
13456 fi;
13457 if [ "x$with_wattr_macros" != xyes ]; then
13458         NCURSES_WATTR_MACROS=0
13459         echo "$as_me:13459: result: yes" >&5
13460 echo "${ECHO_T}yes" >&6
13461 else
13462         NCURSES_WATTR_MACROS=1
13463         echo "$as_me:13463: result: no" >&5
13464 echo "${ECHO_T}no" >&6
13465 fi
13466
13467 echo "$as_me:13467: checking for X11 rgb file" >&5
13468 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13469
13470 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13471 if test "${with_x11_rgb+set}" = set; then
13472   withval="$with_x11_rgb"
13473   RGB_PATH=$withval
13474 else
13475   RGB_PATH=auto
13476 fi;
13477
13478 if test "x$RGB_PATH" = xauto
13479 then
13480         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13481         for cf_path in \
13482                 /opt/local/share/X11/rgb.txt \
13483                 /opt/X11/share/X11/rgb.txt \
13484                 /usr/share/X11/rgb.txt \
13485                 /usr/X11/share/X11/rgb.txt \
13486                 /usr/X11/lib/X11/rgb.txt \
13487                 /usr/lib/X11/rgb.txt \
13488                 /etc/X11/rgb.txt \
13489                 /usr/pkg/lib/X11/rgb.txt \
13490                 /usr/X11R7/lib/X11/rgb.txt \
13491                 /usr/X11R6/lib/X11/rgb.txt \
13492                 /usr/X11R5/lib/X11/rgb.txt \
13493                 /usr/X11R4/lib/X11/rgb.txt \
13494                 /usr/local/lib/X11/rgb.txt \
13495                 /usr/local/share/X11/rgb.txt \
13496                 /usr/lib64/X11/rgb.txt
13497         do
13498                 if test -f "$cf_path" ; then
13499                         RGB_PATH="$cf_path"
13500                         break
13501                 fi
13502         done
13503 else
13504         cf_path=$RGB_PATH
13505
13506 if test "x$prefix" != xNONE; then
13507         cf_path_syntax="$prefix"
13508 else
13509         cf_path_syntax="$ac_default_prefix"
13510 fi
13511
13512 case ".$cf_path" in
13513 (.\$\(*\)*|.\'*\'*)
13514         ;;
13515 (..|./*|.\\*)
13516         ;;
13517 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13518         ;;
13519 (.\$\{*prefix\}*|.\$\{*dir\}*)
13520         eval cf_path="$cf_path"
13521         case ".$cf_path" in
13522         (.NONE/*)
13523                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13524                 ;;
13525         esac
13526         ;;
13527 (.no|.NONE/*)
13528         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13529         ;;
13530 (*)
13531         { { echo "$as_me:13531: error: expected a pathname, not \"$cf_path\"" >&5
13532 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13533    { (exit 1); exit 1; }; }
13534         ;;
13535 esac
13536
13537 fi
13538
13539 echo "$as_me:13539: result: $RGB_PATH" >&5
13540 echo "${ECHO_T}$RGB_PATH" >&6
13541
13542 cat >>confdefs.h <<EOF
13543 #define RGB_PATH "$cf_path"
13544 EOF
13545
13546 no_x11_rgb=
13547 if test "$RGB_PATH" = no
13548 then
13549         no_x11_rgb="#"
13550 fi
13551
13552 ###   use option --with-bool to override bool's type
13553 echo "$as_me:13553: checking for type of bool" >&5
13554 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13555
13556 # Check whether --with-bool or --without-bool was given.
13557 if test "${with_bool+set}" = set; then
13558   withval="$with_bool"
13559   NCURSES_BOOL="$withval"
13560 else
13561   NCURSES_BOOL=auto
13562 fi;
13563 echo "$as_me:13563: result: $NCURSES_BOOL" >&5
13564 echo "${ECHO_T}$NCURSES_BOOL" >&6
13565
13566 echo "$as_me:13566: checking for alternate terminal capabilities file" >&5
13567 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13568
13569 # Check whether --with-caps or --without-caps was given.
13570 if test "${with_caps+set}" = set; then
13571   withval="$with_caps"
13572   TERMINFO_CAPS=Caps.$withval
13573 else
13574   TERMINFO_CAPS=Caps
13575 fi;
13576 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13577 echo "$as_me:13577: result: $TERMINFO_CAPS" >&5
13578 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13579
13580 ###   use option --with-chtype to override chtype's type
13581 echo "$as_me:13581: checking for type of chtype" >&5
13582 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13583
13584 # Check whether --with-chtype or --without-chtype was given.
13585 if test "${with_chtype+set}" = set; then
13586   withval="$with_chtype"
13587   NCURSES_CHTYPE="$withval"
13588 else
13589   NCURSES_CHTYPE=$cf_dft_chtype
13590 fi;
13591 echo "$as_me:13591: result: $NCURSES_CHTYPE" >&5
13592 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13593
13594 ###   use option --with-ospeed to override ospeed's type
13595 echo "$as_me:13595: checking for type of ospeed" >&5
13596 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13597
13598 # Check whether --with-ospeed or --without-ospeed was given.
13599 if test "${with_ospeed+set}" = set; then
13600   withval="$with_ospeed"
13601   NCURSES_OSPEED="$withval"
13602 else
13603   NCURSES_OSPEED=short
13604 fi;
13605 echo "$as_me:13605: result: $NCURSES_OSPEED" >&5
13606 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13607
13608 ###   use option --with-mmask-t to override mmask_t's type
13609 echo "$as_me:13609: checking for type of mmask_t" >&5
13610 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13611
13612 # Check whether --with-mmask-t or --without-mmask-t was given.
13613 if test "${with_mmask_t+set}" = set; then
13614   withval="$with_mmask_t"
13615   NCURSES_MMASK_T="$withval"
13616 else
13617   NCURSES_MMASK_T=$cf_dft_mmask_t
13618 fi;
13619 echo "$as_me:13619: result: $NCURSES_MMASK_T" >&5
13620 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13621
13622 ###   use option --with-ccharw-max to override CCHARW_MAX size
13623 echo "$as_me:13623: checking for size CCHARW_MAX" >&5
13624 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13625
13626 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13627 if test "${with_ccharw_max+set}" = set; then
13628   withval="$with_ccharw_max"
13629   NCURSES_CCHARW_MAX="$withval"
13630 else
13631   NCURSES_CCHARW_MAX=5
13632 fi;
13633 echo "$as_me:13633: result: $NCURSES_CCHARW_MAX" >&5
13634 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13635
13636 echo "$as_me:13636: checking for ANSI C header files" >&5
13637 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13638 if test "${ac_cv_header_stdc+set}" = set; then
13639   echo $ECHO_N "(cached) $ECHO_C" >&6
13640 else
13641   cat >"conftest.$ac_ext" <<_ACEOF
13642 #line 13642 "configure"
13643 #include "confdefs.h"
13644 #include <stdlib.h>
13645 #include <stdarg.h>
13646 #include <string.h>
13647 #include <float.h>
13648
13649 _ACEOF
13650 if { (eval echo "$as_me:13650: \"$ac_cpp "conftest.$ac_ext"\"") >&5
13651   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
13652   ac_status=$?
13653   $EGREP -v '^ *\+' conftest.er1 >conftest.err
13654   rm -f conftest.er1
13655   cat conftest.err >&5
13656   echo "$as_me:13656: \$? = $ac_status" >&5
13657   (exit "$ac_status"); } >/dev/null; then
13658   if test -s conftest.err; then
13659     ac_cpp_err=$ac_c_preproc_warn_flag
13660   else
13661     ac_cpp_err=
13662   fi
13663 else
13664   ac_cpp_err=yes
13665 fi
13666 if test -z "$ac_cpp_err"; then
13667   ac_cv_header_stdc=yes
13668 else
13669   echo "$as_me: failed program was:" >&5
13670   cat "conftest.$ac_ext" >&5
13671   ac_cv_header_stdc=no
13672 fi
13673 rm -f conftest.err "conftest.$ac_ext"
13674
13675 if test $ac_cv_header_stdc = yes; then
13676   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13677   cat >"conftest.$ac_ext" <<_ACEOF
13678 #line 13678 "configure"
13679 #include "confdefs.h"
13680 #include <string.h>
13681
13682 _ACEOF
13683 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13684   $EGREP "memchr" >/dev/null 2>&1; then
13685   :
13686 else
13687   ac_cv_header_stdc=no
13688 fi
13689 rm -rf conftest*
13690
13691 fi
13692
13693 if test $ac_cv_header_stdc = yes; then
13694   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13695   cat >"conftest.$ac_ext" <<_ACEOF
13696 #line 13696 "configure"
13697 #include "confdefs.h"
13698 #include <stdlib.h>
13699
13700 _ACEOF
13701 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13702   $EGREP "free" >/dev/null 2>&1; then
13703   :
13704 else
13705   ac_cv_header_stdc=no
13706 fi
13707 rm -rf conftest*
13708
13709 fi
13710
13711 if test $ac_cv_header_stdc = yes; then
13712   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13713   if test "$cross_compiling" = yes; then
13714   :
13715 else
13716   cat >"conftest.$ac_ext" <<_ACEOF
13717 #line 13717 "configure"
13718 #include "confdefs.h"
13719 #include <ctype.h>
13720 #if ((' ' & 0x0FF) == 0x020)
13721 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13722 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13723 #else
13724 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13725                      || ('j' <= (c) && (c) <= 'r') \
13726                      || ('s' <= (c) && (c) <= 'z'))
13727 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13728 #endif
13729
13730 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13731 int
13732 main (void)
13733 {
13734   int i;
13735   for (i = 0; i < 256; i++)
13736     if (XOR (islower (i), ISLOWER (i))
13737         || toupper (i) != TOUPPER (i))
13738       $ac_main_return(2);
13739   $ac_main_return (0);
13740 }
13741 _ACEOF
13742 rm -f "conftest$ac_exeext"
13743 if { (eval echo "$as_me:13743: \"$ac_link\"") >&5
13744   (eval $ac_link) 2>&5
13745   ac_status=$?
13746   echo "$as_me:13746: \$? = $ac_status" >&5
13747   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
13748   { (eval echo "$as_me:13748: \"$ac_try\"") >&5
13749   (eval $ac_try) 2>&5
13750   ac_status=$?
13751   echo "$as_me:13751: \$? = $ac_status" >&5
13752   (exit "$ac_status"); }; }; then
13753   :
13754 else
13755   echo "$as_me: program exited with status $ac_status" >&5
13756 echo "$as_me: failed program was:" >&5
13757 cat "conftest.$ac_ext" >&5
13758 ac_cv_header_stdc=no
13759 fi
13760 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
13761 fi
13762 fi
13763 fi
13764 echo "$as_me:13764: result: $ac_cv_header_stdc" >&5
13765 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13766 if test $ac_cv_header_stdc = yes; then
13767
13768 cat >>confdefs.h <<\EOF
13769 #define STDC_HEADERS 1
13770 EOF
13771
13772 fi
13773
13774 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
13775
13776 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
13777                   inttypes.h stdint.h unistd.h
13778 do
13779 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13780 echo "$as_me:13780: checking for $ac_header" >&5
13781 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13782 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13783   echo $ECHO_N "(cached) $ECHO_C" >&6
13784 else
13785   cat >"conftest.$ac_ext" <<_ACEOF
13786 #line 13786 "configure"
13787 #include "confdefs.h"
13788 $ac_includes_default
13789 #include <$ac_header>
13790 _ACEOF
13791 rm -f "conftest.$ac_objext"
13792 if { (eval echo "$as_me:13792: \"$ac_compile\"") >&5
13793   (eval $ac_compile) 2>&5
13794   ac_status=$?
13795   echo "$as_me:13795: \$? = $ac_status" >&5
13796   (exit "$ac_status"); } &&
13797          { ac_try='test -s "conftest.$ac_objext"'
13798   { (eval echo "$as_me:13798: \"$ac_try\"") >&5
13799   (eval $ac_try) 2>&5
13800   ac_status=$?
13801   echo "$as_me:13801: \$? = $ac_status" >&5
13802   (exit "$ac_status"); }; }; then
13803   eval "$as_ac_Header=yes"
13804 else
13805   echo "$as_me: failed program was:" >&5
13806 cat "conftest.$ac_ext" >&5
13807 eval "$as_ac_Header=no"
13808 fi
13809 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13810 fi
13811 echo "$as_me:13811: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
13812 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
13813 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
13814   cat >>confdefs.h <<EOF
13815 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13816 EOF
13817
13818 fi
13819 done
13820
13821 echo "$as_me:13821: checking for signed char" >&5
13822 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
13823 if test "${ac_cv_type_signed_char+set}" = set; then
13824   echo $ECHO_N "(cached) $ECHO_C" >&6
13825 else
13826   cat >"conftest.$ac_ext" <<_ACEOF
13827 #line 13827 "configure"
13828 #include "confdefs.h"
13829 $ac_includes_default
13830 int
13831 main (void)
13832 {
13833 if ((signed char *) 0)
13834   return 0;
13835 if (sizeof (signed char))
13836   return 0;
13837   ;
13838   return 0;
13839 }
13840 _ACEOF
13841 rm -f "conftest.$ac_objext"
13842 if { (eval echo "$as_me:13842: \"$ac_compile\"") >&5
13843   (eval $ac_compile) 2>&5
13844   ac_status=$?
13845   echo "$as_me:13845: \$? = $ac_status" >&5
13846   (exit "$ac_status"); } &&
13847          { ac_try='test -s "conftest.$ac_objext"'
13848   { (eval echo "$as_me:13848: \"$ac_try\"") >&5
13849   (eval $ac_try) 2>&5
13850   ac_status=$?
13851   echo "$as_me:13851: \$? = $ac_status" >&5
13852   (exit "$ac_status"); }; }; then
13853   ac_cv_type_signed_char=yes
13854 else
13855   echo "$as_me: failed program was:" >&5
13856 cat "conftest.$ac_ext" >&5
13857 ac_cv_type_signed_char=no
13858 fi
13859 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13860 fi
13861 echo "$as_me:13861: result: $ac_cv_type_signed_char" >&5
13862 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
13863
13864 echo "$as_me:13864: checking size of signed char" >&5
13865 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
13866 if test "${ac_cv_sizeof_signed_char+set}" = set; then
13867   echo $ECHO_N "(cached) $ECHO_C" >&6
13868 else
13869   if test "$ac_cv_type_signed_char" = yes; then
13870   if test "$cross_compiling" = yes; then
13871   # Depending upon the size, compute the lo and hi bounds.
13872 cat >"conftest.$ac_ext" <<_ACEOF
13873 #line 13873 "configure"
13874 #include "confdefs.h"
13875 $ac_includes_default
13876 int
13877 main (void)
13878 {
13879 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
13880   ;
13881   return 0;
13882 }
13883 _ACEOF
13884 rm -f "conftest.$ac_objext"
13885 if { (eval echo "$as_me:13885: \"$ac_compile\"") >&5
13886   (eval $ac_compile) 2>&5
13887   ac_status=$?
13888   echo "$as_me:13888: \$? = $ac_status" >&5
13889   (exit "$ac_status"); } &&
13890          { ac_try='test -s "conftest.$ac_objext"'
13891   { (eval echo "$as_me:13891: \"$ac_try\"") >&5
13892   (eval $ac_try) 2>&5
13893   ac_status=$?
13894   echo "$as_me:13894: \$? = $ac_status" >&5
13895   (exit "$ac_status"); }; }; then
13896   ac_lo=0 ac_mid=0
13897   while :; do
13898     cat >"conftest.$ac_ext" <<_ACEOF
13899 #line 13899 "configure"
13900 #include "confdefs.h"
13901 $ac_includes_default
13902 int
13903 main (void)
13904 {
13905 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13906   ;
13907   return 0;
13908 }
13909 _ACEOF
13910 rm -f "conftest.$ac_objext"
13911 if { (eval echo "$as_me:13911: \"$ac_compile\"") >&5
13912   (eval $ac_compile) 2>&5
13913   ac_status=$?
13914   echo "$as_me:13914: \$? = $ac_status" >&5
13915   (exit "$ac_status"); } &&
13916          { ac_try='test -s "conftest.$ac_objext"'
13917   { (eval echo "$as_me:13917: \"$ac_try\"") >&5
13918   (eval $ac_try) 2>&5
13919   ac_status=$?
13920   echo "$as_me:13920: \$? = $ac_status" >&5
13921   (exit "$ac_status"); }; }; then
13922   ac_hi=$ac_mid; break
13923 else
13924   echo "$as_me: failed program was:" >&5
13925 cat "conftest.$ac_ext" >&5
13926 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
13927 fi
13928 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13929   done
13930 else
13931   echo "$as_me: failed program was:" >&5
13932 cat "conftest.$ac_ext" >&5
13933 ac_hi=-1 ac_mid=-1
13934   while :; do
13935     cat >"conftest.$ac_ext" <<_ACEOF
13936 #line 13936 "configure"
13937 #include "confdefs.h"
13938 $ac_includes_default
13939 int
13940 main (void)
13941 {
13942 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13943   ;
13944   return 0;
13945 }
13946 _ACEOF
13947 rm -f "conftest.$ac_objext"
13948 if { (eval echo "$as_me:13948: \"$ac_compile\"") >&5
13949   (eval $ac_compile) 2>&5
13950   ac_status=$?
13951   echo "$as_me:13951: \$? = $ac_status" >&5
13952   (exit "$ac_status"); } &&
13953          { ac_try='test -s "conftest.$ac_objext"'
13954   { (eval echo "$as_me:13954: \"$ac_try\"") >&5
13955   (eval $ac_try) 2>&5
13956   ac_status=$?
13957   echo "$as_me:13957: \$? = $ac_status" >&5
13958   (exit "$ac_status"); }; }; then
13959   ac_lo=$ac_mid; break
13960 else
13961   echo "$as_me: failed program was:" >&5
13962 cat "conftest.$ac_ext" >&5
13963 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
13964 fi
13965 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13966   done
13967 fi
13968 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13969 # Binary search between lo and hi bounds.
13970 while test "x$ac_lo" != "x$ac_hi"; do
13971   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
13972   cat >"conftest.$ac_ext" <<_ACEOF
13973 #line 13973 "configure"
13974 #include "confdefs.h"
13975 $ac_includes_default
13976 int
13977 main (void)
13978 {
13979 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13980   ;
13981   return 0;
13982 }
13983 _ACEOF
13984 rm -f "conftest.$ac_objext"
13985 if { (eval echo "$as_me:13985: \"$ac_compile\"") >&5
13986   (eval $ac_compile) 2>&5
13987   ac_status=$?
13988   echo "$as_me:13988: \$? = $ac_status" >&5
13989   (exit "$ac_status"); } &&
13990          { ac_try='test -s "conftest.$ac_objext"'
13991   { (eval echo "$as_me:13991: \"$ac_try\"") >&5
13992   (eval $ac_try) 2>&5
13993   ac_status=$?
13994   echo "$as_me:13994: \$? = $ac_status" >&5
13995   (exit "$ac_status"); }; }; then
13996   ac_hi=$ac_mid
13997 else
13998   echo "$as_me: failed program was:" >&5
13999 cat "conftest.$ac_ext" >&5
14000 ac_lo=`expr "$ac_mid" + 1`
14001 fi
14002 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14003 done
14004 ac_cv_sizeof_signed_char=$ac_lo
14005 else
14006   if test "$cross_compiling" = yes; then
14007   { { echo "$as_me:14007: error: cannot run test program while cross compiling" >&5
14008 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14009    { (exit 1); exit 1; }; }
14010 else
14011   cat >"conftest.$ac_ext" <<_ACEOF
14012 #line 14012 "configure"
14013 #include "confdefs.h"
14014 $ac_includes_default
14015 int
14016 main (void)
14017 {
14018 FILE *f = fopen ("conftest.val", "w");
14019 if (!f)
14020   $ac_main_return (1);
14021 fprintf (f, "%d", (sizeof (signed char)));
14022 fclose (f);
14023   ;
14024   return 0;
14025 }
14026 _ACEOF
14027 rm -f "conftest$ac_exeext"
14028 if { (eval echo "$as_me:14028: \"$ac_link\"") >&5
14029   (eval $ac_link) 2>&5
14030   ac_status=$?
14031   echo "$as_me:14031: \$? = $ac_status" >&5
14032   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14033   { (eval echo "$as_me:14033: \"$ac_try\"") >&5
14034   (eval $ac_try) 2>&5
14035   ac_status=$?
14036   echo "$as_me:14036: \$? = $ac_status" >&5
14037   (exit "$ac_status"); }; }; then
14038   ac_cv_sizeof_signed_char=`cat conftest.val`
14039 else
14040   echo "$as_me: program exited with status $ac_status" >&5
14041 echo "$as_me: failed program was:" >&5
14042 cat "conftest.$ac_ext" >&5
14043 fi
14044 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14045 fi
14046 fi
14047 rm -f conftest.val
14048 else
14049   ac_cv_sizeof_signed_char=0
14050 fi
14051 fi
14052 echo "$as_me:14052: result: $ac_cv_sizeof_signed_char" >&5
14053 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14054 cat >>confdefs.h <<EOF
14055 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14056 EOF
14057
14058 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14059         NCURSES_SBOOL="signed char"
14060 else
14061         NCURSES_SBOOL="char"
14062 fi
14063 echo "$as_me:14063: checking if you want to use signed Boolean array in term.h" >&5
14064 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14065
14066 # Check whether --enable-signed-char or --disable-signed-char was given.
14067 if test "${enable_signed_char+set}" = set; then
14068   enableval="$enable_signed_char"
14069   with_signed_char=$enableval
14070 else
14071   with_signed_char=no
14072 fi;
14073 echo "$as_me:14073: result: $with_signed_char" >&5
14074 echo "${ECHO_T}$with_signed_char" >&6
14075 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14076
14077 ###   use option --with-tparm-arg to override tparm's argument type
14078 echo "$as_me:14078: checking for type of tparm args" >&5
14079 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14080
14081 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14082 if test "${with_tparm_arg+set}" = set; then
14083   withval="$with_tparm_arg"
14084   NCURSES_TPARM_ARG="$withval"
14085 else
14086   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14087 fi;
14088 echo "$as_me:14088: result: $NCURSES_TPARM_ARG" >&5
14089 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14090
14091 ### Enable compiling-in rcs id's
14092 echo "$as_me:14092: checking if RCS identifiers should be compiled-in" >&5
14093 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14094
14095 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14096 if test "${with_rcs_ids+set}" = set; then
14097   withval="$with_rcs_ids"
14098   with_rcs_ids=$withval
14099 else
14100   with_rcs_ids=no
14101 fi;
14102 echo "$as_me:14102: result: $with_rcs_ids" >&5
14103 echo "${ECHO_T}$with_rcs_ids" >&6
14104 test "x$with_rcs_ids" = xyes &&
14105 cat >>confdefs.h <<\EOF
14106 #define USE_RCS_IDS 1
14107 EOF
14108
14109 ###############################################################################
14110
14111 echo "$as_me:14111: checking format of man-pages" >&5
14112 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14113
14114 # Check whether --with-manpage-format or --without-manpage-format was given.
14115 if test "${with_manpage_format+set}" = set; then
14116   withval="$with_manpage_format"
14117   MANPAGE_FORMAT=$withval
14118 else
14119   MANPAGE_FORMAT=unknown
14120 fi;
14121
14122 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14123 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14124
14125 cf_unknown=
14126
14127 case "$MANPAGE_FORMAT" in
14128 (unknown)
14129         if test -z "$MANPATH" ; then
14130                 MANPATH="/usr/man:/usr/share/man"
14131         fi
14132
14133         # look for the 'date' man-page (it's most likely to be installed!)
14134         MANPAGE_FORMAT=
14135         cf_preform="no"
14136         cf_catonly="yes"
14137         cf_example="date"
14138
14139         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14140         for cf_dir in $MANPATH; do
14141                 test -z "$cf_dir" && cf_dir=/usr/man
14142                 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
14143                 do
14144                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14145                         if test "x$cf_test" = "x$cf_name" ; then
14146
14147                                 case "$cf_name" in
14148                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14149                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14150                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14151                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14152                                 esac
14153
14154                                 case "$cf_name" in
14155                                 ($cf_dir/man*)
14156                                         cf_catonly=no
14157                                         ;;
14158                                 ($cf_dir/cat*)
14159                                         cf_preform=yes
14160                                         ;;
14161                                 esac
14162                                 break
14163                         fi
14164
14165                         # if we found a match in either man* or cat*, stop looking
14166                         if test -n "$MANPAGE_FORMAT" ; then
14167                                 cf_found=no
14168                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14169                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14170                                 case "$cf_name" in
14171                                 ($cf_dir/cat*)
14172                                         cf_found=yes
14173                                         ;;
14174                                 esac
14175                                 test "$cf_found" = yes && break
14176                         fi
14177                 done
14178                 # only check the first directory in $MANPATH where we find manpages
14179                 if test -n "$MANPAGE_FORMAT" ; then
14180                         break
14181                 fi
14182         done
14183         # if we did not find the example, just assume it is normal
14184         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14185         IFS="$ac_save_ifs"
14186         ;;
14187 (*)
14188         for cf_option in $MANPAGE_FORMAT; do
14189         case "$cf_option" in
14190         (gzip|compress|BSDI|normal|formatted|catonly)
14191                 ;;
14192         (*)
14193                 cf_unknown="$cf_unknown $cf_option"
14194                 ;;
14195         esac
14196         done
14197         ;;
14198 esac
14199
14200 echo "$as_me:14200: result: $MANPAGE_FORMAT" >&5
14201 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14202 if test -n "$cf_unknown" ; then
14203         { echo "$as_me:14203: WARNING: Unexpected manpage-format $cf_unknown" >&5
14204 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14205 fi
14206
14207 echo "$as_me:14207: checking for manpage renaming" >&5
14208 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
14209
14210 # Check whether --with-manpage-renames or --without-manpage-renames was given.
14211 if test "${with_manpage_renames+set}" = set; then
14212   withval="$with_manpage_renames"
14213   MANPAGE_RENAMES=$withval
14214 else
14215   MANPAGE_RENAMES=yes
14216 fi;
14217
14218 case ".$MANPAGE_RENAMES" in
14219 (.no)
14220         ;;
14221 (.|.yes)
14222         # Debian 'man' program?
14223         if test -f /etc/debian_version ; then
14224                 MANPAGE_RENAMES=`cd "$srcdir" && pwd`/man/man_db.renames
14225         else
14226                 MANPAGE_RENAMES=no
14227         fi
14228         ;;
14229 esac
14230
14231 if test "$MANPAGE_RENAMES" != no ; then
14232         if test -f "$srcdir/man/$MANPAGE_RENAMES" ; then
14233                 MANPAGE_RENAMES=`cd "$srcdir/man" && pwd`/$MANPAGE_RENAMES
14234         elif test ! -f "$MANPAGE_RENAMES" ; then
14235                 { { echo "$as_me:14235: error: not a filename: $MANPAGE_RENAMES" >&5
14236 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
14237    { (exit 1); exit 1; }; }
14238         fi
14239
14240         test ! -d man && mkdir man
14241
14242         # Construct a sed-script to perform renaming within man-pages
14243         if test -n "$MANPAGE_RENAMES" ; then
14244                 test ! -d man && mkdir man
14245                 $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
14246         fi
14247 fi
14248
14249 echo "$as_me:14249: result: $MANPAGE_RENAMES" >&5
14250 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14251
14252 echo "$as_me:14252: checking if manpage aliases will be installed" >&5
14253 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14254
14255 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14256 if test "${with_manpage_aliases+set}" = set; then
14257   withval="$with_manpage_aliases"
14258   MANPAGE_ALIASES=$withval
14259 else
14260   MANPAGE_ALIASES=yes
14261 fi;
14262
14263 echo "$as_me:14263: result: $MANPAGE_ALIASES" >&5
14264 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14265
14266 case "x$LN_S" in
14267 (xln*)
14268         cf_use_symlinks=yes
14269         ;;
14270 (*)
14271         cf_use_symlinks=no
14272         ;;
14273 esac
14274
14275 MANPAGE_SYMLINKS=no
14276 if test "$MANPAGE_ALIASES" = yes ; then
14277 echo "$as_me:14277: checking if manpage symlinks should be used" >&5
14278 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14279
14280 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14281 if test "${with_manpage_symlinks+set}" = set; then
14282   withval="$with_manpage_symlinks"
14283   MANPAGE_SYMLINKS=$withval
14284 else
14285   MANPAGE_SYMLINKS=$cf_use_symlinks
14286 fi;
14287
14288 if test "$$cf_use_symlinks" = no; then
14289 if test "$MANPAGE_SYMLINKS" = yes ; then
14290         { echo "$as_me:14290: WARNING: cannot make symlinks" >&5
14291 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14292         MANPAGE_SYMLINKS=no
14293 fi
14294 fi
14295
14296 echo "$as_me:14296: result: $MANPAGE_SYMLINKS" >&5
14297 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14298 fi
14299
14300 echo "$as_me:14300: checking for manpage tbl" >&5
14301 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14302
14303 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14304 if test "${with_manpage_tbl+set}" = set; then
14305   withval="$with_manpage_tbl"
14306   MANPAGE_TBL=$withval
14307 else
14308   MANPAGE_TBL=no
14309 fi;
14310
14311 echo "$as_me:14311: result: $MANPAGE_TBL" >&5
14312 echo "${ECHO_T}$MANPAGE_TBL" >&6
14313
14314 if test "$prefix" = "NONE" ; then
14315         cf_prefix="$ac_default_prefix"
14316 else
14317         cf_prefix="$prefix"
14318 fi
14319
14320 case "$MANPAGE_FORMAT" in
14321 (*catonly*)
14322         cf_format=yes
14323         cf_inboth=no
14324         ;;
14325 (*formatted*)
14326         cf_format=yes
14327         cf_inboth=yes
14328         ;;
14329 (*)
14330         cf_format=no
14331         cf_inboth=no
14332         ;;
14333 esac
14334
14335 test ! -d man && mkdir man
14336
14337 cf_so_strip=
14338 cf_compress=
14339 case "$MANPAGE_FORMAT" in
14340 (*compress*)
14341         cf_so_strip="Z"
14342         cf_compress=compress
14343         ;;
14344 (*gzip*)
14345         cf_so_strip="gz"
14346         cf_compress=gzip
14347         ;;
14348 esac
14349
14350 cf_edit_man=./edit_man.sh
14351 cf_man_alias=`pwd`/man_alias.sed
14352
14353 cat >$cf_edit_man <<CF_EOF
14354 #! $SHELL
14355 # this script is generated by the configure-script CF_MAN_PAGES macro.
14356
14357 prefix="$cf_prefix"
14358 datarootdir="$datarootdir"
14359 datadir="$datadir"
14360
14361 NCURSES_MAJOR="$NCURSES_MAJOR"
14362 NCURSES_MINOR="$NCURSES_MINOR"
14363 NCURSES_PATCH="$NCURSES_PATCH"
14364
14365 NCURSES_OSPEED="$NCURSES_OSPEED"
14366 TERMINFO="$TERMINFO"
14367
14368 INSTALL="$INSTALL"
14369 INSTALL_DATA="$INSTALL_DATA"
14370
14371 transform="$program_transform_name"
14372
14373 TMP=\${TMPDIR:=/tmp}/man\$\$
14374 trap "rm -f \$TMP" 0 1 2 3 15
14375
14376 form=\$1
14377 shift || exit 1
14378
14379 verb=\$1
14380 shift || exit 1
14381
14382 mandir=\$1
14383 shift || exit 1
14384
14385 srcdir=\$1
14386 top_srcdir=\$srcdir/..
14387 shift || exit 1
14388
14389 if test "\$form" = normal ; then
14390         if test "$cf_format" = yes ; then
14391         if test "$cf_inboth" = no ; then
14392                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14393                 exit $?
14394         fi
14395         fi
14396         cf_subdir=\$mandir/man
14397         cf_tables=$MANPAGE_TBL
14398 else
14399         cf_subdir=\$mandir/cat
14400         cf_tables=yes
14401 fi
14402
14403 # process the list of source-files
14404 for i in "\$@" ; do
14405 case \$i in
14406 (*.orig|*.rej) ;;
14407 (*.[0-9]*)
14408         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14409         if test "\$verb" = installing ; then
14410         if test ! -d "\$cf_subdir\${section}" ; then
14411                 mkdir -p "\$cf_subdir\$section"
14412         fi
14413         fi
14414
14415         # replace variables in man page
14416         if test ! -f "$cf_man_alias" ; then
14417 cat >>$cf_man_alias <<-CF_EOF2
14418                 s,@DATADIR@,\$datadir,g
14419                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14420                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14421                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14422                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14423                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14424                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14425 CF_EOF
14426
14427         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14428         do
14429                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14430                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
14431 cat >>$cf_edit_man <<-CF_EOF
14432                 s,@$cf_NAME@,$cf_name,g
14433 CF_EOF
14434         done
14435
14436 cat >>$cf_edit_man <<CF_EOF
14437 CF_EOF2
14438                 echo "...made $cf_man_alias"
14439         fi
14440
14441         aliases=
14442         cf_source=\`basename "\$i"\`
14443         inalias=\$cf_source
14444         test ! -f "\$inalias" && inalias="\$srcdir/\$inalias"
14445         if test ! -f "\$inalias" ; then
14446                 echo ".. skipped \$cf_source"
14447                 continue
14448         fi
14449 CF_EOF
14450
14451 if test "$MANPAGE_ALIASES" != no ; then
14452 cat >>$cf_edit_man <<CF_EOF
14453         nCurses=ignore.3x
14454         test "$with_curses_h" = yes && nCurses=ncurses.3x
14455         aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$inalias" |sed -f "$cf_man_alias" | sort -u; test "\$inalias" = "\$nCurses" && echo curses\`
14456 CF_EOF
14457 fi
14458
14459 if test "$MANPAGE_RENAMES" = no ; then
14460 cat >>$cf_edit_man <<CF_EOF
14461         # perform program transformations for section 1 man pages
14462         if test \$section = 1 ; then
14463                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14464         else
14465                 cf_target=\$cf_subdir\${section}/\$cf_source
14466         fi
14467 CF_EOF
14468 else
14469 cat >>$cf_edit_man <<CF_EOF
14470         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14471         if test -z "\$cf_target" ; then
14472                 echo "? missing rename for \$cf_source"
14473                 cf_target="\$cf_source"
14474         fi
14475         cf_target="\$cf_subdir\${section}/\${cf_target}"
14476
14477 CF_EOF
14478 fi
14479
14480 cat >>$cf_edit_man <<CF_EOF
14481         sed     -f "$cf_man_alias" \\
14482 CF_EOF
14483
14484 if test -f "$MANPAGE_RENAMES" ; then
14485 cat >>$cf_edit_man <<CF_EOF
14486                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
14487 CF_EOF
14488 else
14489 cat >>$cf_edit_man <<CF_EOF
14490                 < "\$i" >\$TMP
14491 CF_EOF
14492 fi
14493
14494 cat >>$cf_edit_man <<CF_EOF
14495 if test \$cf_tables = yes ; then
14496         tbl \$TMP >\$TMP.out
14497         mv \$TMP.out \$TMP
14498 fi
14499 CF_EOF
14500
14501 if test "$with_overwrite" != yes ; then
14502 cat >>$cf_edit_man <<CF_EOF
14503         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14504         mv \$TMP.out \$TMP
14505 CF_EOF
14506 fi
14507
14508 if test "$with_curses_h" != yes ; then
14509 cat >>$cf_edit_man <<CF_EOF
14510         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14511         mv \$TMP.out \$TMP
14512 CF_EOF
14513 fi
14514
14515 cat >>$cf_edit_man <<CF_EOF
14516         if test "\$form" = format ; then
14517                 nroff -man \$TMP >\$TMP.out
14518                 mv \$TMP.out \$TMP
14519         fi
14520 CF_EOF
14521
14522 if test -n "$cf_compress" ; then
14523 cat >>$cf_edit_man <<CF_EOF
14524         if test "\$verb" = installing ; then
14525         if ( "$cf_compress" -f \$TMP )
14526         then
14527                 mv \$TMP.$cf_so_strip \$TMP
14528         fi
14529         fi
14530         cf_target="\$cf_target.$cf_so_strip"
14531 CF_EOF
14532 fi
14533
14534 case "$MANPAGE_FORMAT" in
14535 (*BSDI*)
14536 cat >>$cf_edit_man <<CF_EOF
14537         if test "\$form" = format ; then
14538                 # BSDI installs only .0 suffixes in the cat directories
14539                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
14540         fi
14541 CF_EOF
14542   ;;
14543 esac
14544
14545 cat >>$cf_edit_man <<CF_EOF
14546         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
14547         if test "\$verb" = installing ; then
14548                 echo "\$verb \$cf_target"
14549                 \$INSTALL_DATA \$TMP "\$cf_target"
14550                 test -d "\$cf_subdir\${section}" &&
14551                 test -n "\$aliases" && (
14552                         cd "\$cf_subdir\${section}" && (
14553                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
14554                                 test -n "$cf_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_so_strip\$%%'\`
14555                                 cf_target=\`basename "\$cf_target"\`
14556                                 for cf_alias in \$aliases
14557                                 do
14558                                         if test "\$section" = 1 ; then
14559                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14560                                         fi
14561
14562                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14563                                                 if test -f "\$cf_alias\${suffix}" ; then
14564                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
14565                                                         then
14566                                                                 continue
14567                                                         fi
14568                                                 fi
14569                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14570 CF_EOF
14571 case "x$LN_S" in
14572 (*-f)
14573 cat >>$cf_edit_man <<CF_EOF
14574                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14575 CF_EOF
14576         ;;
14577 (*)
14578 cat >>$cf_edit_man <<CF_EOF
14579                                                 rm -f "\$cf_alias\${suffix}"
14580                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14581 CF_EOF
14582         ;;
14583 esac
14584 cat >>$cf_edit_man <<CF_EOF
14585                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14586                                                 echo ".so \$cf_source" >\$TMP
14587 CF_EOF
14588 if test -n "$cf_compress" ; then
14589 cat >>$cf_edit_man <<CF_EOF
14590                                                 if test -n "$cf_so_strip" ; then
14591                                                         "$cf_compress" -f \$TMP
14592                                                         mv \$TMP.$cf_so_strip \$TMP
14593                                                 fi
14594 CF_EOF
14595 fi
14596 cat >>$cf_edit_man <<CF_EOF
14597                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14598                                                 rm -f "\$cf_alias\${suffix}"
14599                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
14600                                         fi
14601                                 done
14602                         )
14603                 )
14604         elif test "\$verb" = removing ; then
14605                 test -f "\$cf_target" && (
14606                         echo "\$verb \$cf_target"
14607                         rm -f "\$cf_target"
14608                 )
14609                 test -d "\$cf_subdir\${section}" &&
14610                 test -n "\$aliases" && (
14611                         cd "\$cf_subdir\${section}" && (
14612                                 for cf_alias in \$aliases
14613                                 do
14614                                         if test "\$section" = 1 ; then
14615                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14616                                         fi
14617
14618                                         echo ".. \$verb alias \$cf_alias\${suffix}"
14619                                         rm -f "\$cf_alias\${suffix}"
14620                                 done
14621                         )
14622                 )
14623         else
14624 #               echo ".hy 0"
14625                 cat \$TMP
14626         fi
14627         ;;
14628 esac
14629 done
14630
14631 if test "$cf_inboth" = yes ; then
14632 if test "\$form" != format ; then
14633         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14634 fi
14635 fi
14636
14637 exit 0
14638 CF_EOF
14639 chmod 755 "$cf_edit_man"
14640
14641 ###############################################################################
14642
14643 ### Note that some functions (such as const) are normally disabled anyway.
14644 echo "$as_me:14644: checking if you want to build with function extensions" >&5
14645 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14646
14647 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14648 if test "${enable_ext_funcs+set}" = set; then
14649   enableval="$enable_ext_funcs"
14650   with_ext_funcs=$enableval
14651 else
14652   with_ext_funcs=yes
14653 fi;
14654 echo "$as_me:14654: result: $with_ext_funcs" >&5
14655 echo "${ECHO_T}$with_ext_funcs" >&6
14656 if test "x$with_ext_funcs" = xyes ; then
14657         NCURSES_EXT_FUNCS=1
14658
14659 cat >>confdefs.h <<\EOF
14660 #define NCURSES_EXT_FUNCS 1
14661 EOF
14662
14663 cat >>confdefs.h <<\EOF
14664 #define HAVE_ASSUME_DEFAULT_COLORS 1
14665 EOF
14666
14667 cat >>confdefs.h <<\EOF
14668 #define HAVE_CURSES_VERSION 1
14669 EOF
14670
14671 cat >>confdefs.h <<\EOF
14672 #define HAVE_HAS_KEY 1
14673 EOF
14674
14675 cat >>confdefs.h <<\EOF
14676 #define HAVE_RESIZETERM 1
14677 EOF
14678
14679 cat >>confdefs.h <<\EOF
14680 #define HAVE_RESIZE_TERM 1
14681 EOF
14682
14683 cat >>confdefs.h <<\EOF
14684 #define HAVE_TERM_ENTRY_H 1
14685 EOF
14686
14687 cat >>confdefs.h <<\EOF
14688 #define HAVE_USE_DEFAULT_COLORS 1
14689 EOF
14690
14691 cat >>confdefs.h <<\EOF
14692 #define HAVE_USE_EXTENDED_NAMES 1
14693 EOF
14694
14695 cat >>confdefs.h <<\EOF
14696 #define HAVE_USE_SCREEN 1
14697 EOF
14698
14699 cat >>confdefs.h <<\EOF
14700 #define HAVE_USE_WINDOW 1
14701 EOF
14702
14703 cat >>confdefs.h <<\EOF
14704 #define HAVE_WRESIZE 1
14705 EOF
14706
14707         GENERATED_EXT_FUNCS=generated
14708         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
14709 else
14710         NCURSES_EXT_FUNCS=0
14711         GENERATED_EXT_FUNCS=
14712 fi
14713
14714 echo "$as_me:14714: checking if you want to build with SCREEN extensions" >&5
14715 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
14716
14717 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
14718 if test "${enable_sp_funcs+set}" = set; then
14719   enableval="$enable_sp_funcs"
14720   with_sp_funcs=$enableval
14721 else
14722   with_sp_funcs=$cf_dft_ext_spfuncs
14723 fi;
14724 echo "$as_me:14724: result: $with_sp_funcs" >&5
14725 echo "${ECHO_T}$with_sp_funcs" >&6
14726 if test "x$with_sp_funcs" = xyes ; then
14727         NCURSES_SP_FUNCS=1
14728
14729 cat >>confdefs.h <<\EOF
14730 #define NCURSES_SP_FUNCS 1
14731 EOF
14732
14733 cat >>confdefs.h <<\EOF
14734 #define HAVE_TPUTS_SP 1
14735 EOF
14736
14737         GENERATED_SP_FUNCS=generated
14738 else
14739         NCURSES_SP_FUNCS=0
14740         GENERATED_SP_FUNCS=
14741 fi
14742
14743 echo "$as_me:14743: checking if you want to build with terminal-driver" >&5
14744 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
14745
14746 # Check whether --enable-term-driver or --disable-term-driver was given.
14747 if test "${enable_term_driver+set}" = set; then
14748   enableval="$enable_term_driver"
14749   with_term_driver=$enableval
14750 else
14751   with_term_driver=no
14752 fi;
14753 echo "$as_me:14753: result: $with_term_driver" >&5
14754 echo "${ECHO_T}$with_term_driver" >&6
14755 if test "x$with_term_driver" = xyes ; then
14756
14757 cat >>confdefs.h <<\EOF
14758 #define USE_TERM_DRIVER 1
14759 EOF
14760
14761         if test "x$with_termlib" != xno ; then
14762                 { { echo "$as_me:14762: error: The term-driver option conflicts with the termlib option" >&5
14763 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
14764    { (exit 1); exit 1; }; }
14765         fi
14766         if test "x$with_sp_funcs" != xyes ; then
14767                 { { echo "$as_me:14767: error: The term-driver option relies upon sp-funcs" >&5
14768 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
14769    { (exit 1); exit 1; }; }
14770         fi
14771 fi
14772
14773 ###   use option --enable-const to turn on use of const beyond that in XSI.
14774 echo "$as_me:14774: checking for extended use of const keyword" >&5
14775 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14776
14777 # Check whether --enable-const or --disable-const was given.
14778 if test "${enable_const+set}" = set; then
14779   enableval="$enable_const"
14780   with_ext_const=$enableval
14781 else
14782   with_ext_const=$cf_dft_ext_const
14783 fi;
14784 echo "$as_me:14784: result: $with_ext_const" >&5
14785 echo "${ECHO_T}$with_ext_const" >&6
14786 NCURSES_CONST='/*nothing*/'
14787 if test "x$with_ext_const" = xyes ; then
14788         NCURSES_CONST=const
14789 fi
14790
14791 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
14792 echo "$as_me:14792: checking if you want to use extended colors" >&5
14793 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
14794
14795 # Check whether --enable-ext-colors or --disable-ext-colors was given.
14796 if test "${enable_ext_colors+set}" = set; then
14797   enableval="$enable_ext_colors"
14798   with_ext_colors=$enableval
14799 else
14800   with_ext_colors=$cf_dft_ext_colors
14801 fi;
14802 echo "$as_me:14802: result: $with_ext_colors" >&5
14803 echo "${ECHO_T}$with_ext_colors" >&6
14804 NCURSES_EXT_COLORS=0
14805 if test "x$with_ext_colors" = xyes ; then
14806         if test "x$with_widec" != xyes ; then
14807                 { echo "$as_me:14807: WARNING: This option applies only to wide-character library" >&5
14808 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
14809         else
14810                 # cannot be ABI 5 since it changes sizeof(cchar_t)
14811
14812 if test "${with_abi_version+set}" != set; then
14813         case "$cf_cv_rel_version" in
14814         (5.*)
14815                 cf_cv_rel_version=6.0
14816                 cf_cv_abi_version=6
14817                 { echo "$as_me:14817: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14818 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14819                 ;;
14820         esac
14821 fi
14822
14823                 NCURSES_EXT_COLORS=1
14824
14825 cat >>confdefs.h <<\EOF
14826 #define NCURSES_EXT_COLORS 1
14827 EOF
14828
14829 cat >>confdefs.h <<\EOF
14830 #define HAVE_ALLOC_PAIR 1
14831 EOF
14832
14833 cat >>confdefs.h <<\EOF
14834 #define HAVE_INIT_EXTENDED_COLOR 1
14835 EOF
14836
14837 cat >>confdefs.h <<\EOF
14838 #define HAVE_RESET_COLOR_PAIRS 1
14839 EOF
14840
14841         fi
14842 fi
14843
14844 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
14845 echo "$as_me:14845: checking if you want to use extended mouse encoding" >&5
14846 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
14847
14848 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
14849 if test "${enable_ext_mouse+set}" = set; then
14850   enableval="$enable_ext_mouse"
14851   with_ext_mouse=$enableval
14852 else
14853   with_ext_mouse=$cf_dft_ext_mouse
14854 fi;
14855 echo "$as_me:14855: result: $with_ext_mouse" >&5
14856 echo "${ECHO_T}$with_ext_mouse" >&6
14857 NCURSES_MOUSE_VERSION=1
14858 if test "x$with_ext_mouse" = xyes ; then
14859         NCURSES_MOUSE_VERSION=2
14860
14861 if test "${with_abi_version+set}" != set; then
14862         case "$cf_cv_rel_version" in
14863         (5.*)
14864                 cf_cv_rel_version=6.0
14865                 cf_cv_abi_version=6
14866                 { echo "$as_me:14866: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14867 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14868                 ;;
14869         esac
14870 fi
14871
14872 fi
14873
14874 ###   use option --enable-ext-putwin to turn on extended screendumps
14875 echo "$as_me:14875: checking if you want to use extended putwin/screendump" >&5
14876 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
14877
14878 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
14879 if test "${enable_ext_putwin+set}" = set; then
14880   enableval="$enable_ext_putwin"
14881   with_ext_putwin=$enableval
14882 else
14883   with_ext_putwin=$cf_dft_ext_putwin
14884 fi;
14885 echo "$as_me:14885: result: $with_ext_putwin" >&5
14886 echo "${ECHO_T}$with_ext_putwin" >&6
14887 if test "x$with_ext_putwin" = xyes ; then
14888
14889 cat >>confdefs.h <<\EOF
14890 #define NCURSES_EXT_PUTWIN 1
14891 EOF
14892
14893 fi
14894
14895 echo "$as_me:14895: checking if you want \$NCURSES_NO_PADDING code" >&5
14896 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
14897
14898 # Check whether --enable-no-padding or --disable-no-padding was given.
14899 if test "${enable_no_padding+set}" = set; then
14900   enableval="$enable_no_padding"
14901   with_no_padding=$enableval
14902 else
14903   with_no_padding=$with_ext_funcs
14904 fi;
14905 echo "$as_me:14905: result: $with_no_padding" >&5
14906 echo "${ECHO_T}$with_no_padding" >&6
14907 test "x$with_no_padding" = xyes &&
14908 cat >>confdefs.h <<\EOF
14909 #define NCURSES_NO_PADDING 1
14910 EOF
14911
14912 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
14913 echo "$as_me:14913: checking if you want SIGWINCH handler" >&5
14914 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
14915
14916 # Check whether --enable-sigwinch or --disable-sigwinch was given.
14917 if test "${enable_sigwinch+set}" = set; then
14918   enableval="$enable_sigwinch"
14919   with_sigwinch=$enableval
14920 else
14921   with_sigwinch=$with_ext_funcs
14922 fi;
14923 echo "$as_me:14923: result: $with_sigwinch" >&5
14924 echo "${ECHO_T}$with_sigwinch" >&6
14925 test "x$with_sigwinch" = xyes &&
14926 cat >>confdefs.h <<\EOF
14927 #define USE_SIGWINCH 1
14928 EOF
14929
14930 ###   use option --enable-tcap-names to allow user to define new capabilities
14931 echo "$as_me:14931: checking if you want user-definable terminal capabilities like termcap" >&5
14932 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
14933
14934 # Check whether --enable-tcap-names or --disable-tcap-names was given.
14935 if test "${enable_tcap_names+set}" = set; then
14936   enableval="$enable_tcap_names"
14937   with_tcap_names=$enableval
14938 else
14939   with_tcap_names=$with_ext_funcs
14940 fi;
14941 echo "$as_me:14941: result: $with_tcap_names" >&5
14942 echo "${ECHO_T}$with_tcap_names" >&6
14943 NCURSES_XNAMES=0
14944 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
14945
14946 ##############################################################################
14947
14948 echo "$as_me:14948: checking if you want to link with the pthread library" >&5
14949 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14950
14951 # Check whether --with-pthread or --without-pthread was given.
14952 if test "${with_pthread+set}" = set; then
14953   withval="$with_pthread"
14954   with_pthread=$withval
14955 else
14956   with_pthread=no
14957 fi;
14958 echo "$as_me:14958: result: $with_pthread" >&5
14959 echo "${ECHO_T}$with_pthread" >&6
14960
14961 if test "$with_pthread" != no ; then
14962         echo "$as_me:14962: checking for pthread.h" >&5
14963 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14964 if test "${ac_cv_header_pthread_h+set}" = set; then
14965   echo $ECHO_N "(cached) $ECHO_C" >&6
14966 else
14967   cat >"conftest.$ac_ext" <<_ACEOF
14968 #line 14968 "configure"
14969 #include "confdefs.h"
14970 #include <pthread.h>
14971 _ACEOF
14972 if { (eval echo "$as_me:14972: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14973   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14974   ac_status=$?
14975   $EGREP -v '^ *\+' conftest.er1 >conftest.err
14976   rm -f conftest.er1
14977   cat conftest.err >&5
14978   echo "$as_me:14978: \$? = $ac_status" >&5
14979   (exit "$ac_status"); } >/dev/null; then
14980   if test -s conftest.err; then
14981     ac_cpp_err=$ac_c_preproc_warn_flag
14982   else
14983     ac_cpp_err=
14984   fi
14985 else
14986   ac_cpp_err=yes
14987 fi
14988 if test -z "$ac_cpp_err"; then
14989   ac_cv_header_pthread_h=yes
14990 else
14991   echo "$as_me: failed program was:" >&5
14992   cat "conftest.$ac_ext" >&5
14993   ac_cv_header_pthread_h=no
14994 fi
14995 rm -f conftest.err "conftest.$ac_ext"
14996 fi
14997 echo "$as_me:14997: result: $ac_cv_header_pthread_h" >&5
14998 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14999 if test "$ac_cv_header_pthread_h" = yes; then
15000
15001 cat >>confdefs.h <<\EOF
15002 #define HAVE_PTHREADS_H 1
15003 EOF
15004
15005         for cf_lib_pthread in pthread c_r
15006         do
15007             echo "$as_me:15007: checking if we can link with the $cf_lib_pthread library" >&5
15008 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15009             cf_save_LIBS="$LIBS"
15010
15011 cf_add_libs="$LIBS"
15012 # reverse order
15013 cf_add_0lib=
15014 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15015 # filter duplicates
15016 for cf_add_1lib in $cf_add_0lib; do
15017         for cf_add_2lib in $cf_add_libs; do
15018                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15019                         cf_add_1lib=
15020                         break
15021                 fi
15022         done
15023         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15024 done
15025 LIBS="$cf_add_libs"
15026
15027             cat >"conftest.$ac_ext" <<_ACEOF
15028 #line 15028 "configure"
15029 #include "confdefs.h"
15030
15031 #include <pthread.h>
15032
15033 int
15034 main (void)
15035 {
15036
15037                 int rc = pthread_create(0,0,0,0);
15038                 int r2 = pthread_mutexattr_settype(0, 0);
15039
15040   ;
15041   return 0;
15042 }
15043 _ACEOF
15044 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15045 if { (eval echo "$as_me:15045: \"$ac_link\"") >&5
15046   (eval $ac_link) 2>&5
15047   ac_status=$?
15048   echo "$as_me:15048: \$? = $ac_status" >&5
15049   (exit "$ac_status"); } &&
15050          { ac_try='test -s "conftest$ac_exeext"'
15051   { (eval echo "$as_me:15051: \"$ac_try\"") >&5
15052   (eval $ac_try) 2>&5
15053   ac_status=$?
15054   echo "$as_me:15054: \$? = $ac_status" >&5
15055   (exit "$ac_status"); }; }; then
15056   with_pthread=yes
15057 else
15058   echo "$as_me: failed program was:" >&5
15059 cat "conftest.$ac_ext" >&5
15060 with_pthread=no
15061 fi
15062 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15063             LIBS="$cf_save_LIBS"
15064             echo "$as_me:15064: result: $with_pthread" >&5
15065 echo "${ECHO_T}$with_pthread" >&6
15066             test "$with_pthread" = yes && break
15067         done
15068
15069         if test "$with_pthread" = yes ; then
15070
15071 cf_add_libs="$LIBS"
15072 # reverse order
15073 cf_add_0lib=
15074 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15075 # filter duplicates
15076 for cf_add_1lib in $cf_add_0lib; do
15077         for cf_add_2lib in $cf_add_libs; do
15078                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15079                         cf_add_1lib=
15080                         break
15081                 fi
15082         done
15083         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15084 done
15085 LIBS="$cf_add_libs"
15086
15087 cat >>confdefs.h <<\EOF
15088 #define HAVE_LIBPTHREADS 1
15089 EOF
15090
15091         else
15092             { { echo "$as_me:15092: error: Cannot link with pthread library" >&5
15093 echo "$as_me: error: Cannot link with pthread library" >&2;}
15094    { (exit 1); exit 1; }; }
15095         fi
15096
15097 fi
15098
15099 fi
15100
15101 if test "x$with_pthread" != xno; then
15102         echo "$as_me:15102: checking for pthread_kill" >&5
15103 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15104 if test "${ac_cv_func_pthread_kill+set}" = set; then
15105   echo $ECHO_N "(cached) $ECHO_C" >&6
15106 else
15107   cat >"conftest.$ac_ext" <<_ACEOF
15108 #line 15108 "configure"
15109 #include "confdefs.h"
15110 #define pthread_kill autoconf_temporary
15111 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15112 #undef pthread_kill
15113
15114 #ifdef __cplusplus
15115 extern "C"
15116 #endif
15117
15118 /* We use char because int might match the return type of a gcc2
15119    builtin and then its argument prototype would still apply.  */
15120 char pthread_kill (void);
15121
15122 int
15123 main (void)
15124 {
15125
15126 /* The GNU C library defines stubs for functions which it implements
15127     to always fail with ENOSYS.  Some functions are actually named
15128     something starting with __ and the normal name is an alias.  */
15129 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15130 #error found stub for pthread_kill
15131 #endif
15132
15133         return pthread_kill ();
15134   ;
15135   return 0;
15136 }
15137 _ACEOF
15138 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15139 if { (eval echo "$as_me:15139: \"$ac_link\"") >&5
15140   (eval $ac_link) 2>&5
15141   ac_status=$?
15142   echo "$as_me:15142: \$? = $ac_status" >&5
15143   (exit "$ac_status"); } &&
15144          { ac_try='test -s "conftest$ac_exeext"'
15145   { (eval echo "$as_me:15145: \"$ac_try\"") >&5
15146   (eval $ac_try) 2>&5
15147   ac_status=$?
15148   echo "$as_me:15148: \$? = $ac_status" >&5
15149   (exit "$ac_status"); }; }; then
15150   ac_cv_func_pthread_kill=yes
15151 else
15152   echo "$as_me: failed program was:" >&5
15153 cat "conftest.$ac_ext" >&5
15154 ac_cv_func_pthread_kill=no
15155 fi
15156 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15157 fi
15158 echo "$as_me:15158: result: $ac_cv_func_pthread_kill" >&5
15159 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15160 if test "$ac_cv_func_pthread_kill" = yes; then
15161
15162                 echo "$as_me:15162: checking if you want to allow EINTR in wgetch with pthreads" >&5
15163 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15164
15165 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15166 if test "${enable_pthreads_eintr+set}" = set; then
15167   enableval="$enable_pthreads_eintr"
15168   use_pthreads_eintr=$enableval
15169 else
15170   use_pthreads_eintr=no
15171 fi;
15172                 echo "$as_me:15172: result: $use_pthreads_eintr" >&5
15173 echo "${ECHO_T}$use_pthreads_eintr" >&6
15174                 if test "x$use_pthreads_eintr" = xyes ; then
15175
15176 cat >>confdefs.h <<\EOF
15177 #define USE_PTHREADS_EINTR 1
15178 EOF
15179
15180                 fi
15181 fi
15182
15183         echo "$as_me:15183: checking if you want to use weak-symbols for pthreads" >&5
15184 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15185
15186 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15187 if test "${enable_weak_symbols+set}" = set; then
15188   enableval="$enable_weak_symbols"
15189   use_weak_symbols=$enableval
15190 else
15191   use_weak_symbols=no
15192 fi;
15193         echo "$as_me:15193: result: $use_weak_symbols" >&5
15194 echo "${ECHO_T}$use_weak_symbols" >&6
15195         if test "x$use_weak_symbols" = xyes ; then
15196
15197 echo "$as_me:15197: checking if $CC supports weak symbols" >&5
15198 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15199 if test "${cf_cv_weak_symbols+set}" = set; then
15200   echo $ECHO_N "(cached) $ECHO_C" >&6
15201 else
15202
15203 cat >"conftest.$ac_ext" <<_ACEOF
15204 #line 15204 "configure"
15205 #include "confdefs.h"
15206
15207 #include <stdio.h>
15208 int
15209 main (void)
15210 {
15211
15212 #if defined(__GNUC__)
15213 #  if defined __USE_ISOC99
15214 #    define _cat_pragma(exp)    _Pragma(#exp)
15215 #    define _weak_pragma(exp)   _cat_pragma(weak name)
15216 #  else
15217 #    define _weak_pragma(exp)
15218 #  endif
15219 #  define _declare(name)        __extension__ extern __typeof__(name) name
15220 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
15221 #endif
15222
15223 weak_symbol(fopen);
15224
15225   ;
15226   return 0;
15227 }
15228 _ACEOF
15229 rm -f "conftest.$ac_objext"
15230 if { (eval echo "$as_me:15230: \"$ac_compile\"") >&5
15231   (eval $ac_compile) 2>&5
15232   ac_status=$?
15233   echo "$as_me:15233: \$? = $ac_status" >&5
15234   (exit "$ac_status"); } &&
15235          { ac_try='test -s "conftest.$ac_objext"'
15236   { (eval echo "$as_me:15236: \"$ac_try\"") >&5
15237   (eval $ac_try) 2>&5
15238   ac_status=$?
15239   echo "$as_me:15239: \$? = $ac_status" >&5
15240   (exit "$ac_status"); }; }; then
15241   cf_cv_weak_symbols=yes
15242 else
15243   echo "$as_me: failed program was:" >&5
15244 cat "conftest.$ac_ext" >&5
15245 cf_cv_weak_symbols=no
15246 fi
15247 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15248
15249 fi
15250 echo "$as_me:15250: result: $cf_cv_weak_symbols" >&5
15251 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15252
15253         else
15254                 cf_cv_weak_symbols=no
15255         fi
15256
15257         if test "x$cf_cv_weak_symbols" = xyes ; then
15258
15259 cat >>confdefs.h <<\EOF
15260 #define USE_WEAK_SYMBOLS 1
15261 EOF
15262
15263         fi
15264 fi
15265
15266 PTHREAD=
15267 if test "x$with_pthread" = "xyes" ; then
15268
15269 cat >>confdefs.h <<\EOF
15270 #define USE_PTHREADS 1
15271 EOF
15272
15273         enable_reentrant=yes
15274         if test "x$cf_cv_weak_symbols" = xyes ; then
15275                 PTHREAD=-lpthread
15276
15277 cf_add_libs="$PRIVATE_LIBS"
15278 # reverse order
15279 cf_add_0lib=
15280 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15281 # filter duplicates
15282 for cf_add_1lib in $cf_add_0lib; do
15283         for cf_add_2lib in $cf_add_libs; do
15284                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15285                         cf_add_1lib=
15286                         break
15287                 fi
15288         done
15289         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15290 done
15291 PRIVATE_LIBS="$cf_add_libs"
15292
15293         fi
15294 fi
15295
15296 # Reentrant code has to be opaque; there's little advantage to making ncurses
15297 # opaque outside of that, so there is no --enable-opaque option.  We can use
15298 # this option without --with-pthreads, but this will be always set for
15299 # pthreads.
15300 echo "$as_me:15300: checking if you want reentrant code" >&5
15301 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15302
15303 # Check whether --enable-reentrant or --disable-reentrant was given.
15304 if test "${enable_reentrant+set}" = set; then
15305   enableval="$enable_reentrant"
15306   with_reentrant=$enableval
15307 else
15308   with_reentrant=no
15309 fi;
15310 echo "$as_me:15310: result: $with_reentrant" >&5
15311 echo "${ECHO_T}$with_reentrant" >&6
15312 if test "x$with_reentrant" = xyes ; then
15313         cf_cv_enable_reentrant=1
15314         cf_cv_enable_opaque="NCURSES_INTERNALS"
15315         NCURSES_SIZE_T=int
15316         if test "x$cf_cv_weak_symbols" = xyes ; then
15317
15318 # remove pthread library from $LIBS
15319 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15320
15321 cf_add_libs="$TEST_LIBS"
15322 # reverse order
15323 cf_add_0lib=
15324 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15325 # filter duplicates
15326 for cf_add_1lib in $cf_add_0lib; do
15327         for cf_add_2lib in $cf_add_libs; do
15328                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15329                         cf_add_1lib=
15330                         break
15331                 fi
15332         done
15333         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15334 done
15335 TEST_LIBS="$cf_add_libs"
15336
15337 cf_add_libs="$TEST_LIBS2"
15338 # reverse order
15339 cf_add_0lib=
15340 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15341 # filter duplicates
15342 for cf_add_1lib in $cf_add_0lib; do
15343         for cf_add_2lib in $cf_add_libs; do
15344                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15345                         cf_add_1lib=
15346                         break
15347                 fi
15348         done
15349         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15350 done
15351 TEST_LIBS2="$cf_add_libs"
15352
15353 cf_add_libs="$PRIVATE_LIBS"
15354 # reverse order
15355 cf_add_0lib=
15356 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15357 # filter duplicates
15358 for cf_add_1lib in $cf_add_0lib; do
15359         for cf_add_2lib in $cf_add_libs; do
15360                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15361                         cf_add_1lib=
15362                         break
15363                 fi
15364         done
15365         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15366 done
15367 PRIVATE_LIBS="$cf_add_libs"
15368
15369         else
15370                 # when not using weak symbols but with_reentrant,
15371                 # add 't' to the library suffix on all platforms
15372                 # except cygwin, where we only do that if ALSO
15373                 # compiling with full thread support.
15374                 case "$host" in
15375                 (*cygwin* | *msys*)
15376                         if test "$with_pthread" = "yes" ; then
15377                                 if test "x$disable_lib_suffixes" = "xno" ; then
15378                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15379                                 fi
15380                         fi ;;
15381                 (*)
15382                         if test "x$disable_lib_suffixes" = "xno" ; then
15383                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15384                         fi
15385                         ;;
15386                 esac
15387         fi
15388
15389 cat >>confdefs.h <<\EOF
15390 #define USE_REENTRANT 1
15391 EOF
15392
15393 if test "${with_abi_version+set}" != set; then
15394         case "$cf_cv_rel_version" in
15395         (5.*)
15396                 cf_cv_rel_version=6.0
15397                 cf_cv_abi_version=6
15398                 { echo "$as_me:15398: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15399 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15400                 ;;
15401         esac
15402 fi
15403
15404 else
15405         cf_cv_enable_reentrant=0
15406         cf_cv_enable_opaque="NCURSES_OPAQUE"
15407         NCURSES_SIZE_T=short
15408 fi
15409
15410 echo "$as_me:15410: checking if you want opaque curses-library structures" >&5
15411 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15412
15413 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15414 if test "${enable_opaque_curses+set}" = set; then
15415   enableval="$enable_opaque_curses"
15416   test "$enableval" != yes && enableval=no
15417         if test "$enableval" != "no" ; then
15418     enable_opaque_curses=yes
15419         else
15420
15421          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15422          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15423
15424         fi
15425 else
15426   enableval=no
15427
15428          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15429          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15430
15431 fi;
15432 echo "$as_me:15432: result: $enable_opaque_curses" >&5
15433 echo "${ECHO_T}$enable_opaque_curses" >&6
15434
15435 test "$cf_cv_enable_reentrant" = 1 && \
15436 test "$enable_opaque_curses" = no && \
15437 { { echo "$as_me:15437: error: reentrant configuration requires opaque library" >&5
15438 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15439    { (exit 1); exit 1; }; }
15440
15441 echo "$as_me:15441: checking if you want opaque form-library structures" >&5
15442 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15443
15444 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15445 if test "${enable_opaque_form+set}" = set; then
15446   enableval="$enable_opaque_form"
15447   enable_opaque_form=yes
15448 else
15449   enable_opaque_form=no
15450 fi;
15451 echo "$as_me:15451: result: $enable_opaque_form" >&5
15452 echo "${ECHO_T}$enable_opaque_form" >&6
15453
15454 echo "$as_me:15454: checking if you want opaque menu-library structures" >&5
15455 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15456
15457 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15458 if test "${enable_opaque_menu+set}" = set; then
15459   enableval="$enable_opaque_menu"
15460   enable_opaque_menu=yes
15461 else
15462   enable_opaque_menu=no
15463 fi;
15464 echo "$as_me:15464: result: $enable_opaque_menu" >&5
15465 echo "${ECHO_T}$enable_opaque_menu" >&6
15466
15467 echo "$as_me:15467: checking if you want opaque panel-library structures" >&5
15468 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15469
15470 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15471 if test "${enable_opaque_panel+set}" = set; then
15472   enableval="$enable_opaque_panel"
15473   enable_opaque_panel=yes
15474 else
15475   enable_opaque_panel=no
15476 fi;
15477 echo "$as_me:15477: result: $enable_opaque_panel" >&5
15478 echo "${ECHO_T}$enable_opaque_panel" >&6
15479
15480 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15481 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15482 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15483 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15484
15485 ### Allow using a different wrap-prefix
15486 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15487         echo "$as_me:15487: checking for prefix used to wrap public variables" >&5
15488 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15489
15490 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15491 if test "${with_wrap_prefix+set}" = set; then
15492   withval="$with_wrap_prefix"
15493   NCURSES_WRAP_PREFIX=$withval
15494 else
15495   NCURSES_WRAP_PREFIX=_nc_
15496 fi;
15497         echo "$as_me:15497: result: $NCURSES_WRAP_PREFIX" >&5
15498 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15499 else
15500         NCURSES_WRAP_PREFIX=_nc_
15501 fi
15502
15503 cat >>confdefs.h <<EOF
15504 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15505 EOF
15506
15507 ###############################################################################
15508 # These options are relatively safe to experiment with.
15509
15510 echo "$as_me:15510: checking if you want all development code" >&5
15511 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15512
15513 # Check whether --with-develop or --without-develop was given.
15514 if test "${with_develop+set}" = set; then
15515   withval="$with_develop"
15516   with_develop=$withval
15517 else
15518   with_develop=no
15519 fi;
15520 echo "$as_me:15520: result: $with_develop" >&5
15521 echo "${ECHO_T}$with_develop" >&6
15522
15523 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15524 echo "$as_me:15524: checking if you want hard-tabs code" >&5
15525 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15526
15527 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15528 if test "${enable_hard_tabs+set}" = set; then
15529   enableval="$enable_hard_tabs"
15530
15531 else
15532   enable_hard_tabs=$with_develop
15533 fi;
15534 echo "$as_me:15534: result: $enable_hard_tabs" >&5
15535 echo "${ECHO_T}$enable_hard_tabs" >&6
15536 test "x$enable_hard_tabs" = xyes &&
15537 cat >>confdefs.h <<\EOF
15538 #define USE_HARD_TABS 1
15539 EOF
15540
15541 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15542 echo "$as_me:15542: checking if you want limited support for xmc" >&5
15543 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15544
15545 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15546 if test "${enable_xmc_glitch+set}" = set; then
15547   enableval="$enable_xmc_glitch"
15548
15549 else
15550   enable_xmc_glitch=$with_develop
15551 fi;
15552 echo "$as_me:15552: result: $enable_xmc_glitch" >&5
15553 echo "${ECHO_T}$enable_xmc_glitch" >&6
15554 test "x$enable_xmc_glitch" = xyes &&
15555 cat >>confdefs.h <<\EOF
15556 #define USE_XMC_SUPPORT 1
15557 EOF
15558
15559 ###############################################################################
15560 # These are just experimental, probably should not be in a package:
15561
15562 echo "$as_me:15562: checking if you do not want to assume colors are white-on-black" >&5
15563 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15564
15565 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15566 if test "${enable_assumed_color+set}" = set; then
15567   enableval="$enable_assumed_color"
15568   with_assumed_color=$enableval
15569 else
15570   with_assumed_color=yes
15571 fi;
15572 echo "$as_me:15572: result: $with_assumed_color" >&5
15573 echo "${ECHO_T}$with_assumed_color" >&6
15574 test "x$with_assumed_color" = xyes &&
15575 cat >>confdefs.h <<\EOF
15576 #define USE_ASSUMED_COLOR 1
15577 EOF
15578
15579 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15580 echo "$as_me:15580: checking if you want hashmap scrolling-optimization code" >&5
15581 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15582
15583 # Check whether --enable-hashmap or --disable-hashmap was given.
15584 if test "${enable_hashmap+set}" = set; then
15585   enableval="$enable_hashmap"
15586   with_hashmap=$enableval
15587 else
15588   with_hashmap=yes
15589 fi;
15590 echo "$as_me:15590: result: $with_hashmap" >&5
15591 echo "${ECHO_T}$with_hashmap" >&6
15592 test "x$with_hashmap" = xyes &&
15593 cat >>confdefs.h <<\EOF
15594 #define USE_HASHMAP 1
15595 EOF
15596
15597 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15598 echo "$as_me:15598: checking if you want colorfgbg code" >&5
15599 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15600
15601 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15602 if test "${enable_colorfgbg+set}" = set; then
15603   enableval="$enable_colorfgbg"
15604   with_colorfgbg=$enableval
15605 else
15606   with_colorfgbg=no
15607 fi;
15608 echo "$as_me:15608: result: $with_colorfgbg" >&5
15609 echo "${ECHO_T}$with_colorfgbg" >&6
15610 test "x$with_colorfgbg" = xyes &&
15611 cat >>confdefs.h <<\EOF
15612 #define USE_COLORFGBG 1
15613 EOF
15614
15615 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
15616 echo "$as_me:15616: checking if you want to use gcc -fvisibility option" >&5
15617 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
15618
15619 # Check whether --enable-fvisibility or --disable-fvisibility was given.
15620 if test "${enable_fvisibility+set}" = set; then
15621   enableval="$enable_fvisibility"
15622   cf_with_fvisibility=$enableval
15623 else
15624   cf_with_fvisibility=no
15625 fi;
15626 echo "$as_me:15626: result: $cf_with_fvisibility" >&5
15627 echo "${ECHO_T}$cf_with_fvisibility" >&6
15628
15629 NCURSES_IMPEXP=
15630 NCURSES_CXX_IMPEXP=
15631 if test "x$cf_with_fvisibility" = xyes; then
15632
15633 echo "$as_me:15633: checking if $CC -fvisibility=hidden option works" >&5
15634 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
15635 if test "${cf_cv_fvisibility_hidden+set}" = set; then
15636   echo $ECHO_N "(cached) $ECHO_C" >&6
15637 else
15638
15639     cf_save_cflags="$CFLAGS"
15640     CFLAGS="$CFLAGS -fvisibility=hidden"
15641     cat >"conftest.$ac_ext" <<_ACEOF
15642 #line 15642 "configure"
15643 #include "confdefs.h"
15644
15645 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15646
15647 int
15648 main (void)
15649 {
15650
15651         if (somefunc()) return 1;
15652
15653   ;
15654   return 0;
15655 }
15656 _ACEOF
15657 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15658 if { (eval echo "$as_me:15658: \"$ac_link\"") >&5
15659   (eval $ac_link) 2>&5
15660   ac_status=$?
15661   echo "$as_me:15661: \$? = $ac_status" >&5
15662   (exit "$ac_status"); } &&
15663          { ac_try='test -s "conftest$ac_exeext"'
15664   { (eval echo "$as_me:15664: \"$ac_try\"") >&5
15665   (eval $ac_try) 2>&5
15666   ac_status=$?
15667   echo "$as_me:15667: \$? = $ac_status" >&5
15668   (exit "$ac_status"); }; }; then
15669   cf_cv_fvisibility_hidden=yes
15670 else
15671   echo "$as_me: failed program was:" >&5
15672 cat "conftest.$ac_ext" >&5
15673 cf_cv_fvisibility_hidden=no
15674 fi
15675 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15676     CFLAGS=$cf_save_cflags
15677
15678 fi
15679 echo "$as_me:15679: result: $cf_cv_fvisibility_hidden" >&5
15680 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
15681
15682         if test "x$cf_cv_fvisibility_hidden" = xyes
15683         then
15684
15685 cf_fix_cppflags=no
15686 cf_new_cflags=
15687 cf_new_cppflags=
15688 cf_new_extra_cppflags=
15689
15690 for cf_add_cflags in -fvisibility=hidden
15691 do
15692 case "$cf_fix_cppflags" in
15693 (no)
15694         case "$cf_add_cflags" in
15695         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15696                 case "$cf_add_cflags" in
15697                 (-D*)
15698                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15699
15700                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15701                                 && test -z "${cf_tst_cflags}" \
15702                                 && cf_fix_cppflags=yes
15703
15704                         if test "$cf_fix_cppflags" = yes ; then
15705
15706         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15707         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15708
15709                                 continue
15710                         elif test "${cf_tst_cflags}" = "\"'" ; then
15711
15712         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15713         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15714
15715                                 continue
15716                         fi
15717                         ;;
15718                 esac
15719                 case "$CPPFLAGS" in
15720                 (*$cf_add_cflags)
15721                         ;;
15722                 (*)
15723                         case "$cf_add_cflags" in
15724                         (-D*)
15725                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15726
15727 CPPFLAGS=`echo "$CPPFLAGS" | \
15728         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15729                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15730
15731                                 ;;
15732                         esac
15733
15734         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15735         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15736
15737                         ;;
15738                 esac
15739                 ;;
15740         (*)
15741
15742         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15743         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15744
15745                 ;;
15746         esac
15747         ;;
15748 (yes)
15749
15750         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15751         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15752
15753         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15754
15755         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15756                 && test -z "${cf_tst_cflags}" \
15757                 && cf_fix_cppflags=no
15758         ;;
15759 esac
15760 done
15761
15762 if test -n "$cf_new_cflags" ; then
15763
15764         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15765         CFLAGS="${CFLAGS}$cf_new_cflags"
15766
15767 fi
15768
15769 if test -n "$cf_new_cppflags" ; then
15770
15771         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15772         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15773
15774 fi
15775
15776 if test -n "$cf_new_extra_cppflags" ; then
15777
15778         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15779         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15780
15781 fi
15782
15783                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
15784         fi
15785         if test -n "$CXX"
15786         then
15787                 ac_ext=cc
15788 ac_cpp='$CXXCPP $CPPFLAGS'
15789 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
15790 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
15791 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15792 ac_main_return="return"
15793
15794 echo "$as_me:15794: checking if $CXX -fvisibility=hidden option works" >&5
15795 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
15796 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
15797   echo $ECHO_N "(cached) $ECHO_C" >&6
15798 else
15799
15800     cf_save_cflags="$CXXFLAGS"
15801     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
15802     cat >"conftest.$ac_ext" <<_ACEOF
15803 #line 15803 "configure"
15804 #include "confdefs.h"
15805
15806 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15807
15808 int
15809 main (void)
15810 {
15811
15812         if (somefunc()) return 1;
15813
15814   ;
15815   return 0;
15816 }
15817 _ACEOF
15818 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15819 if { (eval echo "$as_me:15819: \"$ac_link\"") >&5
15820   (eval $ac_link) 2>&5
15821   ac_status=$?
15822   echo "$as_me:15822: \$? = $ac_status" >&5
15823   (exit "$ac_status"); } &&
15824          { ac_try='test -s "conftest$ac_exeext"'
15825   { (eval echo "$as_me:15825: \"$ac_try\"") >&5
15826   (eval $ac_try) 2>&5
15827   ac_status=$?
15828   echo "$as_me:15828: \$? = $ac_status" >&5
15829   (exit "$ac_status"); }; }; then
15830   cf_cv_fvisibility_hidden2=yes
15831 else
15832   echo "$as_me: failed program was:" >&5
15833 cat "conftest.$ac_ext" >&5
15834 cf_cv_fvisibility_hidden2=no
15835 fi
15836 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15837     CXXFLAGS=$cf_save_cflags
15838
15839 fi
15840 echo "$as_me:15840: result: $cf_cv_fvisibility_hidden2" >&5
15841 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
15842
15843                 if test "x$cf_cv_fvisibility_hidden2" = xyes
15844                 then
15845
15846 cf_save_CXXFLAGS="$CFLAGS"
15847 CFLAGS="$CXXFLAGS"
15848
15849 cf_fix_cppflags=no
15850 cf_new_cflags=
15851 cf_new_cppflags=
15852 cf_new_extra_cppflags=
15853
15854 for cf_add_cflags in -fvisibility=hidden
15855 do
15856 case "$cf_fix_cppflags" in
15857 (no)
15858         case "$cf_add_cflags" in
15859         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15860                 case "$cf_add_cflags" in
15861                 (-D*)
15862                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15863
15864                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15865                                 && test -z "${cf_tst_cflags}" \
15866                                 && cf_fix_cppflags=yes
15867
15868                         if test "$cf_fix_cppflags" = yes ; then
15869
15870         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15871         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15872
15873                                 continue
15874                         elif test "${cf_tst_cflags}" = "\"'" ; then
15875
15876         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15877         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15878
15879                                 continue
15880                         fi
15881                         ;;
15882                 esac
15883                 case "$CPPFLAGS" in
15884                 (*$cf_add_cflags)
15885                         ;;
15886                 (*)
15887                         case "$cf_add_cflags" in
15888                         (-D*)
15889                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15890
15891 CPPFLAGS=`echo "$CPPFLAGS" | \
15892         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15893                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15894
15895                                 ;;
15896                         esac
15897
15898         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15899         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15900
15901                         ;;
15902                 esac
15903                 ;;
15904         (*)
15905
15906         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15907         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15908
15909                 ;;
15910         esac
15911         ;;
15912 (yes)
15913
15914         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15915         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15916
15917         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15918
15919         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15920                 && test -z "${cf_tst_cflags}" \
15921                 && cf_fix_cppflags=no
15922         ;;
15923 esac
15924 done
15925
15926 if test -n "$cf_new_cflags" ; then
15927
15928         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15929         CFLAGS="${CFLAGS}$cf_new_cflags"
15930
15931 fi
15932
15933 if test -n "$cf_new_cppflags" ; then
15934
15935         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15936         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15937
15938 fi
15939
15940 if test -n "$cf_new_extra_cppflags" ; then
15941
15942         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15943         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15944
15945 fi
15946
15947 CXXFLAGS="$CFLAGS"
15948 CFLAGS="$cf_save_CXXFLAGS"
15949
15950                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
15951                 fi
15952                 ac_ext=c
15953 ac_cpp='$CPP $CPPFLAGS'
15954 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
15955 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
15956 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15957 ac_main_return="return"
15958
15959         fi
15960 fi
15961
15962 ###   use option --enable-interop to turn on use of bindings used for interop
15963 echo "$as_me:15963: checking if you want interop bindings" >&5
15964 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
15965
15966 # Check whether --enable-interop or --disable-interop was given.
15967 if test "${enable_interop+set}" = set; then
15968   enableval="$enable_interop"
15969   with_exp_interop=$enableval
15970 else
15971   with_exp_interop=$cf_dft_interop
15972 fi;
15973 echo "$as_me:15973: result: $with_exp_interop" >&5
15974 echo "${ECHO_T}$with_exp_interop" >&6
15975
15976 NCURSES_INTEROP_FUNCS=0
15977 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
15978
15979 echo "$as_me:15979: checking if you want experimental safe-sprintf code" >&5
15980 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
15981
15982 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
15983 if test "${enable_safe_sprintf+set}" = set; then
15984   enableval="$enable_safe_sprintf"
15985   with_safe_sprintf=$enableval
15986 else
15987   with_safe_sprintf=no
15988 fi;
15989 echo "$as_me:15989: result: $with_safe_sprintf" >&5
15990 echo "${ECHO_T}$with_safe_sprintf" >&6
15991
15992 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
15993 # when hashmap is used scroll hints are useless
15994 if test "$with_hashmap" = no ; then
15995 echo "$as_me:15995: checking if you want to experiment without scrolling-hints code" >&5
15996 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
15997
15998 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
15999 if test "${enable_scroll_hints+set}" = set; then
16000   enableval="$enable_scroll_hints"
16001   with_scroll_hints=$enableval
16002 else
16003   with_scroll_hints=yes
16004 fi;
16005 echo "$as_me:16005: result: $with_scroll_hints" >&5
16006 echo "${ECHO_T}$with_scroll_hints" >&6
16007 test "x$with_scroll_hints" = xyes &&
16008 cat >>confdefs.h <<\EOF
16009 #define USE_SCROLL_HINTS 1
16010 EOF
16011
16012 fi
16013
16014 echo "$as_me:16014: checking if you want wgetch-events code" >&5
16015 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16016
16017 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16018 if test "${enable_wgetch_events+set}" = set; then
16019   enableval="$enable_wgetch_events"
16020   with_wgetch_events=$enableval
16021 else
16022   with_wgetch_events=no
16023 fi;
16024 echo "$as_me:16024: result: $with_wgetch_events" >&5
16025 echo "${ECHO_T}$with_wgetch_events" >&6
16026 if test "x$with_wgetch_events" = xyes ; then
16027
16028 cat >>confdefs.h <<\EOF
16029 #define NCURSES_WGETCH_EVENTS 1
16030 EOF
16031
16032         NCURSES_WGETCH_EVENTS=1
16033 else
16034         NCURSES_WGETCH_EVENTS=0
16035 fi
16036
16037 case "$cf_cv_system_name" in
16038 (*mingw32*|*mingw64*|*-msvc*)
16039         echo "$as_me:16039: checking if you want experimental-Windows driver" >&5
16040 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16041
16042 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16043 if test "${enable_exp_win32+set}" = set; then
16044   enableval="$enable_exp_win32"
16045   with_exp_win32=$enableval
16046 else
16047   with_exp_win32=no
16048 fi;
16049         echo "$as_me:16049: result: $with_exp_win32" >&5
16050 echo "${ECHO_T}$with_exp_win32" >&6
16051         if test "x$with_exp_win32" = xyes
16052         then
16053
16054 cat >>confdefs.h <<\EOF
16055 #define EXP_WIN32_DRIVER 1
16056 EOF
16057
16058                 EXP_WIN32_DRIVER=1
16059                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16060         else
16061                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16062                 EXP_WIN32_DRIVER=0
16063         fi
16064         ;;
16065 (*)
16066         EXP_WIN32_DRIVER=0
16067         INTERNALS_HDR=
16068         ;;
16069 esac
16070
16071 ###############################################################################
16072
16073 ###     use option --disable-echo to suppress full display compiling commands
16074
16075 echo "$as_me:16075: checking if you want to see long compiling messages" >&5
16076 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16077
16078 # Check whether --enable-echo or --disable-echo was given.
16079 if test "${enable_echo+set}" = set; then
16080   enableval="$enable_echo"
16081   test "$enableval" != no && enableval=yes
16082         if test "$enableval" != "yes" ; then
16083
16084         ECHO_LT='--silent'
16085         ECHO_LD='@echo linking $@;'
16086         RULE_CC='@echo compiling $<'
16087         SHOW_CC='@echo compiling $@'
16088         ECHO_CC='@'
16089
16090         else
16091
16092         ECHO_LT=''
16093         ECHO_LD=''
16094         RULE_CC=''
16095         SHOW_CC=''
16096         ECHO_CC=''
16097
16098         fi
16099 else
16100   enableval=yes
16101
16102         ECHO_LT=''
16103         ECHO_LD=''
16104         RULE_CC=''
16105         SHOW_CC=''
16106         ECHO_CC=''
16107
16108 fi;
16109 echo "$as_me:16109: result: $enableval" >&5
16110 echo "${ECHO_T}$enableval" >&6
16111
16112 if test "x$enable_echo" = xyes; then
16113         ECHO_LINK=
16114 else
16115         ECHO_LINK='@ echo linking $@ ... ;'
16116         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16117         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16118 fi
16119
16120 # --disable-stripping is used for debugging
16121
16122 echo "$as_me:16122: checking if you want to install stripped executables" >&5
16123 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16124
16125 # Check whether --enable-stripping or --disable-stripping was given.
16126 if test "${enable_stripping+set}" = set; then
16127   enableval="$enable_stripping"
16128   test "$enableval" != no && enableval=yes
16129         if test "$enableval" != "yes" ; then
16130     enable_stripping=no
16131         else
16132                 enable_stripping=yes
16133         fi
16134 else
16135   enableval=yes
16136         enable_stripping=yes
16137
16138 fi;
16139 echo "$as_me:16139: result: $enable_stripping" >&5
16140 echo "${ECHO_T}$enable_stripping" >&6
16141
16142 if test "$enable_stripping" = yes
16143 then
16144         INSTALL_OPT_S="-s"
16145 else
16146         INSTALL_OPT_S=
16147 fi
16148
16149 : "${INSTALL:=install}"
16150 echo "$as_me:16150: checking if install accepts -p option" >&5
16151 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16152 if test "${cf_cv_install_p+set}" = set; then
16153   echo $ECHO_N "(cached) $ECHO_C" >&6
16154 else
16155
16156         rm -rf ./conftest*
16157         date >conftest.in
16158         mkdir conftest.out
16159         sleep 3
16160         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16161         then
16162                 if test -f conftest.out/conftest.in
16163                 then
16164                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16165                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16166                         if test -s conftest.err
16167                         then
16168                                 cf_cv_install_p=no
16169                         else
16170                                 cf_cv_install_p=yes
16171                         fi
16172                 else
16173                         cf_cv_install_p=no
16174                 fi
16175         else
16176                 cf_cv_install_p=no
16177         fi
16178         rm -rf ./conftest*
16179
16180 fi
16181 echo "$as_me:16181: result: $cf_cv_install_p" >&5
16182 echo "${ECHO_T}$cf_cv_install_p" >&6
16183
16184 echo "$as_me:16184: checking if install needs to be told about ownership" >&5
16185 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16186 case `$ac_config_guess` in
16187 (*minix)
16188         with_install_o=yes
16189         ;;
16190 (*)
16191         with_install_o=no
16192         ;;
16193 esac
16194
16195 echo "$as_me:16195: result: $with_install_o" >&5
16196 echo "${ECHO_T}$with_install_o" >&6
16197 if test "x$with_install_o" = xyes
16198 then
16199         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'`"
16200 else
16201         INSTALL_OPT_O=
16202 fi
16203
16204 # If we're avoiding relinking of shared libraries during install, that is to
16205 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16206 # the install program has "-p" (for preserving timestamps).
16207 cf_cv_do_reranlib=yes
16208 if test "x$cf_cv_install_p" = xyes
16209 then
16210         if test "x$cf_cv_do_relink" != xyes
16211         then
16212                 cf_cv_do_reranlib=no
16213                 INSTALL_OPT_P="-p"
16214                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
16215         fi
16216 fi
16217
16218 ###     use option --enable-warnings to turn on all gcc warnings
16219
16220 echo "$as_me:16220: checking for C11 _Noreturn feature" >&5
16221 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
16222 if test "${cf_cv_c11_noreturn+set}" = set; then
16223   echo $ECHO_N "(cached) $ECHO_C" >&6
16224 else
16225   cat >"conftest.$ac_ext" <<_ACEOF
16226 #line 16226 "configure"
16227 #include "confdefs.h"
16228
16229 #include <stdio.h>
16230 #include <stdlib.h>
16231 #include <stdnoreturn.h>
16232 static void giveup(void) { exit(0); }
16233
16234 int
16235 main (void)
16236 {
16237 if (feof(stdin)) giveup()
16238   ;
16239   return 0;
16240 }
16241 _ACEOF
16242 rm -f "conftest.$ac_objext"
16243 if { (eval echo "$as_me:16243: \"$ac_compile\"") >&5
16244   (eval $ac_compile) 2>&5
16245   ac_status=$?
16246   echo "$as_me:16246: \$? = $ac_status" >&5
16247   (exit "$ac_status"); } &&
16248          { ac_try='test -s "conftest.$ac_objext"'
16249   { (eval echo "$as_me:16249: \"$ac_try\"") >&5
16250   (eval $ac_try) 2>&5
16251   ac_status=$?
16252   echo "$as_me:16252: \$? = $ac_status" >&5
16253   (exit "$ac_status"); }; }; then
16254   cf_cv_c11_noreturn=yes
16255 else
16256   echo "$as_me: failed program was:" >&5
16257 cat "conftest.$ac_ext" >&5
16258 cf_cv_c11_noreturn=no
16259 fi
16260 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16261
16262 fi
16263 echo "$as_me:16263: result: $cf_cv_c11_noreturn" >&5
16264 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
16265
16266 if test "$cf_cv_c11_noreturn" = yes; then
16267         cat >>confdefs.h <<\EOF
16268 #define HAVE_STDNORETURN_H 1
16269 EOF
16270
16271 cat >>confdefs.h <<EOF
16272 #define STDC_NORETURN _Noreturn
16273 EOF
16274
16275         HAVE_STDNORETURN_H=1
16276 else
16277         HAVE_STDNORETURN_H=0
16278 fi
16279
16280 if test "$GCC" = yes || test "$GXX" = yes
16281 then
16282
16283 if test "$GCC" = yes || test "$GXX" = yes
16284 then
16285         case $CFLAGS in
16286         (*-Werror=*)
16287                 test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
16288
16289 echo "${as_me:-configure}:16289: testing repairing CFLAGS: $CFLAGS ..." 1>&5
16290
16291                 cf_temp_flags=
16292                 for cf_temp_scan in $CFLAGS
16293                 do
16294                         case "x$cf_temp_scan" in
16295                         (x-Werror=*)
16296
16297         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16298         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16299
16300                                 ;;
16301                         (*)
16302
16303         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16304         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16305
16306                                 ;;
16307                         esac
16308                 done
16309                 CFLAGS="$cf_temp_flags"
16310                 test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
16311
16312 echo "${as_me:-configure}:16312: testing ... fixed $CFLAGS ..." 1>&5
16313
16314                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16315
16316 echo "${as_me:-configure}:16316: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16317
16318                 ;;
16319         esac
16320 fi
16321
16322 if test "$GCC" = yes || test "$GXX" = yes
16323 then
16324         case $CPPFLAGS in
16325         (*-Werror=*)
16326                 test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
16327
16328 echo "${as_me:-configure}:16328: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
16329
16330                 cf_temp_flags=
16331                 for cf_temp_scan in $CPPFLAGS
16332                 do
16333                         case "x$cf_temp_scan" in
16334                         (x-Werror=*)
16335
16336         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16337         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16338
16339                                 ;;
16340                         (*)
16341
16342         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16343         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16344
16345                                 ;;
16346                         esac
16347                 done
16348                 CPPFLAGS="$cf_temp_flags"
16349                 test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
16350
16351 echo "${as_me:-configure}:16351: testing ... fixed $CPPFLAGS ..." 1>&5
16352
16353                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16354
16355 echo "${as_me:-configure}:16355: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16356
16357                 ;;
16358         esac
16359 fi
16360
16361 if test "$GCC" = yes || test "$GXX" = yes
16362 then
16363         case $LDFLAGS in
16364         (*-Werror=*)
16365                 test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
16366
16367 echo "${as_me:-configure}:16367: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
16368
16369                 cf_temp_flags=
16370                 for cf_temp_scan in $LDFLAGS
16371                 do
16372                         case "x$cf_temp_scan" in
16373                         (x-Werror=*)
16374
16375         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16376         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16377
16378                                 ;;
16379                         (*)
16380
16381         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16382         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16383
16384                                 ;;
16385                         esac
16386                 done
16387                 LDFLAGS="$cf_temp_flags"
16388                 test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
16389
16390 echo "${as_me:-configure}:16390: testing ... fixed $LDFLAGS ..." 1>&5
16391
16392                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16393
16394 echo "${as_me:-configure}:16394: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16395
16396                 ;;
16397         esac
16398 fi
16399
16400 echo "$as_me:16400: checking if you want to turn on gcc warnings" >&5
16401 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16402
16403 # Check whether --enable-warnings or --disable-warnings was given.
16404 if test "${enable_warnings+set}" = set; then
16405   enableval="$enable_warnings"
16406   test "$enableval" != yes && enableval=no
16407         if test "$enableval" != "no" ; then
16408     enable_warnings=yes
16409         else
16410                 enable_warnings=no
16411         fi
16412 else
16413   enableval=no
16414         enable_warnings=no
16415
16416 fi;
16417 echo "$as_me:16417: result: $enable_warnings" >&5
16418 echo "${ECHO_T}$enable_warnings" >&6
16419 if test "$enable_warnings" = "yes"
16420 then
16421
16422 if test "x$have_x" = xyes; then
16423
16424 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
16425 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
16426 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
16427 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16428 for cf_X_CFLAGS in $X_CFLAGS
16429 do
16430         case "x$cf_X_CFLAGS" in
16431         x-[IUD]*)
16432                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16433                 ;;
16434         *)
16435                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16436                 ;;
16437         esac
16438 done
16439
16440 cat >"conftest.$ac_ext" <<_ACEOF
16441 #line 16441 "configure"
16442 #include "confdefs.h"
16443
16444 #include <stdlib.h>
16445 #include <X11/Intrinsic.h>
16446
16447 int
16448 main (void)
16449 {
16450 String foo = malloc(1); (void)foo
16451   ;
16452   return 0;
16453 }
16454 _ACEOF
16455 rm -f "conftest.$ac_objext"
16456 if { (eval echo "$as_me:16456: \"$ac_compile\"") >&5
16457   (eval $ac_compile) 2>&5
16458   ac_status=$?
16459   echo "$as_me:16459: \$? = $ac_status" >&5
16460   (exit "$ac_status"); } &&
16461          { ac_try='test -s "conftest.$ac_objext"'
16462   { (eval echo "$as_me:16462: \"$ac_try\"") >&5
16463   (eval $ac_try) 2>&5
16464   ac_status=$?
16465   echo "$as_me:16465: \$? = $ac_status" >&5
16466   (exit "$ac_status"); }; }; then
16467
16468 echo "$as_me:16468: checking for X11/Xt const-feature" >&5
16469 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
16470 if test "${cf_cv_const_x_string+set}" = set; then
16471   echo $ECHO_N "(cached) $ECHO_C" >&6
16472 else
16473
16474         cat >"conftest.$ac_ext" <<_ACEOF
16475 #line 16475 "configure"
16476 #include "confdefs.h"
16477
16478 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16479 #undef  XTSTRINGDEFINES /* X11R5 and later */
16480 #include <stdlib.h>
16481 #include <X11/Intrinsic.h>
16482
16483 int
16484 main (void)
16485 {
16486 String foo = malloc(1); *foo = 0
16487   ;
16488   return 0;
16489 }
16490 _ACEOF
16491 rm -f "conftest.$ac_objext"
16492 if { (eval echo "$as_me:16492: \"$ac_compile\"") >&5
16493   (eval $ac_compile) 2>&5
16494   ac_status=$?
16495   echo "$as_me:16495: \$? = $ac_status" >&5
16496   (exit "$ac_status"); } &&
16497          { ac_try='test -s "conftest.$ac_objext"'
16498   { (eval echo "$as_me:16498: \"$ac_try\"") >&5
16499   (eval $ac_try) 2>&5
16500   ac_status=$?
16501   echo "$as_me:16501: \$? = $ac_status" >&5
16502   (exit "$ac_status"); }; }; then
16503
16504                         cf_cv_const_x_string=no
16505
16506 else
16507   echo "$as_me: failed program was:" >&5
16508 cat "conftest.$ac_ext" >&5
16509
16510                         cf_cv_const_x_string=yes
16511
16512 fi
16513 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16514
16515 fi
16516 echo "$as_me:16516: result: $cf_cv_const_x_string" >&5
16517 echo "${ECHO_T}$cf_cv_const_x_string" >&6
16518
16519 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
16520 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
16521 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
16522
16523 case "$cf_cv_const_x_string" in
16524 (no)
16525
16526         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16527         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
16528
16529         ;;
16530 (*)
16531
16532         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16533         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
16534
16535         ;;
16536 esac
16537
16538 else
16539   echo "$as_me: failed program was:" >&5
16540 cat "conftest.$ac_ext" >&5
16541 fi
16542 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16543  fi
16544 cat > "conftest.$ac_ext" <<EOF
16545 #line 16545 "${as_me:-configure}"
16546 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16547 EOF
16548 if test "$INTEL_COMPILER" = yes
16549 then
16550 # The "-wdXXX" options suppress warnings:
16551 # remark #1419: external declaration in primary source file
16552 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16553 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16554 # remark #193: zero used for undefined preprocessing identifier
16555 # remark #593: variable "curs_sb_left_arrow" was set but never used
16556 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16557 # remark #869: parameter "tw" was never referenced
16558 # remark #981: operands are evaluated in unspecified order
16559 # warning #279: controlling expression is constant
16560
16561         { echo "$as_me:16561: checking for $CC warning options..." >&5
16562 echo "$as_me: checking for $CC warning options..." >&6;}
16563         cf_save_CFLAGS="$CFLAGS"
16564         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
16565         for cf_opt in \
16566                 wd1419 \
16567                 wd1683 \
16568                 wd1684 \
16569                 wd193 \
16570                 wd593 \
16571                 wd279 \
16572                 wd810 \
16573                 wd869 \
16574                 wd981
16575         do
16576                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16577                 if { (eval echo "$as_me:16577: \"$ac_compile\"") >&5
16578   (eval $ac_compile) 2>&5
16579   ac_status=$?
16580   echo "$as_me:16580: \$? = $ac_status" >&5
16581   (exit "$ac_status"); }; then
16582                         test -n "$verbose" && echo "$as_me:16582: result: ... -$cf_opt" >&5
16583 echo "${ECHO_T}... -$cf_opt" >&6
16584                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16585                 fi
16586         done
16587         CFLAGS="$cf_save_CFLAGS"
16588 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
16589 then
16590         { echo "$as_me:16590: checking for $CC warning options..." >&5
16591 echo "$as_me: checking for $CC warning options..." >&6;}
16592         cf_save_CFLAGS="$CFLAGS"
16593         cf_warn_CONST=""
16594         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16595         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16596         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16597         for cf_opt in W Wall \
16598                 Wbad-function-cast \
16599                 Wcast-align \
16600                 Wcast-qual \
16601                 Wdeclaration-after-statement \
16602                 Wextra \
16603                 Winline \
16604                 Wmissing-declarations \
16605                 Wmissing-prototypes \
16606                 Wnested-externs \
16607                 Wpointer-arith \
16608                 Wshadow \
16609                 Wstrict-prototypes \
16610                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
16611         do
16612                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16613                 if { (eval echo "$as_me:16613: \"$ac_compile\"") >&5
16614   (eval $ac_compile) 2>&5
16615   ac_status=$?
16616   echo "$as_me:16616: \$? = $ac_status" >&5
16617   (exit "$ac_status"); }; then
16618                         test -n "$verbose" && echo "$as_me:16618: result: ... -$cf_opt" >&5
16619 echo "${ECHO_T}... -$cf_opt" >&6
16620                         case "$cf_opt" in
16621                         (Winline)
16622                                 case "$GCC_VERSION" in
16623                                 ([34].*)
16624                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16625
16626 echo "${as_me:-configure}:16626: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16627
16628                                         continue;;
16629                                 esac
16630                                 ;;
16631                         (Wpointer-arith)
16632                                 case "$GCC_VERSION" in
16633                                 ([12].*)
16634                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16635
16636 echo "${as_me:-configure}:16636: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16637
16638                                         continue;;
16639                                 esac
16640                                 ;;
16641                         esac
16642                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16643                 fi
16644         done
16645         CFLAGS="$cf_save_CFLAGS"
16646 fi
16647 rm -rf ./conftest*
16648
16649 fi
16650
16651 if test "$GCC" = yes || test "$GXX" = yes
16652 then
16653 cat > conftest.i <<EOF
16654 #ifndef GCC_PRINTF
16655 #define GCC_PRINTF 0
16656 #endif
16657 #ifndef GCC_SCANF
16658 #define GCC_SCANF 0
16659 #endif
16660 #ifndef GCC_NORETURN
16661 #define GCC_NORETURN /* nothing */
16662 #endif
16663 #ifndef GCC_UNUSED
16664 #define GCC_UNUSED /* nothing */
16665 #endif
16666 EOF
16667 if test "$GCC" = yes
16668 then
16669         { echo "$as_me:16669: checking for $CC __attribute__ directives..." >&5
16670 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
16671 cat > "conftest.$ac_ext" <<EOF
16672 #line 16672 "${as_me:-configure}"
16673 #include "confdefs.h"
16674 #include "conftest.h"
16675 #include "conftest.i"
16676 #if     GCC_PRINTF
16677 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
16678 #else
16679 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
16680 #endif
16681 #if     GCC_SCANF
16682 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
16683 #else
16684 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
16685 #endif
16686 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
16687 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
16688 extern GCC_NORETURN void foo(void);
16689 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
16690 EOF
16691         cf_printf_attribute=no
16692         cf_scanf_attribute=no
16693         for cf_attribute in scanf printf unused noreturn
16694         do
16695
16696 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16697
16698                 cf_directive="__attribute__(($cf_attribute))"
16699                 echo "checking for $CC $cf_directive" 1>&5
16700
16701                 case "$cf_attribute" in
16702                 (printf)
16703                         cf_printf_attribute=yes
16704                         cat >conftest.h <<EOF
16705 #define GCC_$cf_ATTRIBUTE 1
16706 EOF
16707                         ;;
16708                 (scanf)
16709                         cf_scanf_attribute=yes
16710                         cat >conftest.h <<EOF
16711 #define GCC_$cf_ATTRIBUTE 1
16712 EOF
16713                         ;;
16714                 (*)
16715                         cat >conftest.h <<EOF
16716 #define GCC_$cf_ATTRIBUTE $cf_directive
16717 EOF
16718                         ;;
16719                 esac
16720
16721                 if { (eval echo "$as_me:16721: \"$ac_compile\"") >&5
16722   (eval $ac_compile) 2>&5
16723   ac_status=$?
16724   echo "$as_me:16724: \$? = $ac_status" >&5
16725   (exit "$ac_status"); }; then
16726                         test -n "$verbose" && echo "$as_me:16726: result: ... $cf_attribute" >&5
16727 echo "${ECHO_T}... $cf_attribute" >&6
16728                         cat conftest.h >>confdefs.h
16729                         case "$cf_attribute" in
16730                         (noreturn)
16731
16732 cat >>confdefs.h <<EOF
16733 #define GCC_NORETURN $cf_directive
16734 EOF
16735
16736                                 ;;
16737                         (printf)
16738                                 cf_value='/* nothing */'
16739                                 if test "$cf_printf_attribute" != no ; then
16740                                         cf_value='__attribute__((format(printf,fmt,var)))'
16741
16742 cat >>confdefs.h <<\EOF
16743 #define GCC_PRINTF 1
16744 EOF
16745
16746                                 fi
16747
16748 cat >>confdefs.h <<EOF
16749 #define GCC_PRINTFLIKE(fmt,var) $cf_value
16750 EOF
16751
16752                                 ;;
16753                         (scanf)
16754                                 cf_value='/* nothing */'
16755                                 if test "$cf_scanf_attribute" != no ; then
16756                                         cf_value='__attribute__((format(scanf,fmt,var)))'
16757
16758 cat >>confdefs.h <<\EOF
16759 #define GCC_SCANF 1
16760 EOF
16761
16762                                 fi
16763
16764 cat >>confdefs.h <<EOF
16765 #define GCC_SCANFLIKE(fmt,var) $cf_value
16766 EOF
16767
16768                                 ;;
16769                         (unused)
16770
16771 cat >>confdefs.h <<EOF
16772 #define GCC_UNUSED $cf_directive
16773 EOF
16774
16775                                 ;;
16776                         esac
16777                 fi
16778         done
16779 else
16780         ${FGREP-fgrep} define conftest.i >>confdefs.h
16781 fi
16782 rm -rf ./conftest*
16783 fi
16784
16785 fi
16786
16787 if test "x$enable_warnings" = "xyes"; then
16788
16789         ADAFLAGS="$ADAFLAGS -gnatg"
16790
16791         if test "x$cf_with_cxx" = xyes ; then
16792
16793 INTEL_CPLUSPLUS=no
16794
16795 if test "$GCC" = yes ; then
16796         case "$host_os" in
16797         (linux*|gnu*)
16798                 echo "$as_me:16798: checking if this is really Intel C++ compiler" >&5
16799 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
16800                 cf_save_CFLAGS="$CXXFLAGS"
16801                 CXXFLAGS="$CXXFLAGS -no-gcc"
16802                 cat >"conftest.$ac_ext" <<_ACEOF
16803 #line 16803 "configure"
16804 #include "confdefs.h"
16805
16806 int
16807 main (void)
16808 {
16809
16810 #ifdef __INTEL_COMPILER
16811 #else
16812 make an error
16813 #endif
16814
16815   ;
16816   return 0;
16817 }
16818 _ACEOF
16819 rm -f "conftest.$ac_objext"
16820 if { (eval echo "$as_me:16820: \"$ac_compile\"") >&5
16821   (eval $ac_compile) 2>&5
16822   ac_status=$?
16823   echo "$as_me:16823: \$? = $ac_status" >&5
16824   (exit "$ac_status"); } &&
16825          { ac_try='test -s "conftest.$ac_objext"'
16826   { (eval echo "$as_me:16826: \"$ac_try\"") >&5
16827   (eval $ac_try) 2>&5
16828   ac_status=$?
16829   echo "$as_me:16829: \$? = $ac_status" >&5
16830   (exit "$ac_status"); }; }; then
16831   INTEL_CPLUSPLUS=yes
16832 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
16833
16834 else
16835   echo "$as_me: failed program was:" >&5
16836 cat "conftest.$ac_ext" >&5
16837 fi
16838 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16839                 CXXFLAGS="$cf_save_CFLAGS"
16840                 echo "$as_me:16840: result: $INTEL_CPLUSPLUS" >&5
16841 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
16842                 ;;
16843         esac
16844 fi
16845
16846 CLANG_CPLUSPLUS=no
16847
16848 if test "$GCC" = yes ; then
16849         echo "$as_me:16849: checking if this is really Clang C++ compiler" >&5
16850 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
16851         cf_save_CFLAGS="$CXXFLAGS"
16852         cat >"conftest.$ac_ext" <<_ACEOF
16853 #line 16853 "configure"
16854 #include "confdefs.h"
16855
16856 int
16857 main (void)
16858 {
16859
16860 #ifdef __clang__
16861 #else
16862 make an error
16863 #endif
16864
16865   ;
16866   return 0;
16867 }
16868 _ACEOF
16869 rm -f "conftest.$ac_objext"
16870 if { (eval echo "$as_me:16870: \"$ac_compile\"") >&5
16871   (eval $ac_compile) 2>&5
16872   ac_status=$?
16873   echo "$as_me:16873: \$? = $ac_status" >&5
16874   (exit "$ac_status"); } &&
16875          { ac_try='test -s "conftest.$ac_objext"'
16876   { (eval echo "$as_me:16876: \"$ac_try\"") >&5
16877   (eval $ac_try) 2>&5
16878   ac_status=$?
16879   echo "$as_me:16879: \$? = $ac_status" >&5
16880   (exit "$ac_status"); }; }; then
16881   CLANG_CPLUSPLUS=yes
16882
16883 else
16884   echo "$as_me: failed program was:" >&5
16885 cat "conftest.$ac_ext" >&5
16886 fi
16887 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16888         CXXFLAGS="$cf_save_CFLAGS"
16889         echo "$as_me:16889: result: $CLANG_CPLUSPLUS" >&5
16890 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
16891 fi
16892
16893 CLANG_VERSION=none
16894
16895 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
16896         case "$CC" in
16897         (c[1-9][0-9]|*/c[1-9][0-9])
16898                 { echo "$as_me:16898: WARNING: replacing broken compiler alias $CC" >&5
16899 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
16900                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
16901                 CC=clang
16902                 ;;
16903         esac
16904
16905         echo "$as_me:16905: checking version of $CC" >&5
16906 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
16907         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.].*//'`"
16908         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
16909         echo "$as_me:16909: result: $CLANG_VERSION" >&5
16910 echo "${ECHO_T}$CLANG_VERSION" >&6
16911
16912         for cf_clang_opt in \
16913                 -Qunused-arguments \
16914                 -Wno-error=implicit-function-declaration
16915         do
16916                 echo "$as_me:16916: checking if option $cf_clang_opt works" >&5
16917 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
16918                 cf_save_CFLAGS="$CFLAGS"
16919                 CFLAGS="$CFLAGS $cf_clang_opt"
16920                 cat >"conftest.$ac_ext" <<_ACEOF
16921 #line 16921 "configure"
16922 #include "confdefs.h"
16923
16924                         #include <stdio.h>
16925 int
16926 main (void)
16927 {
16928
16929                         printf("hello!\\n");
16930   ;
16931   return 0;
16932 }
16933 _ACEOF
16934 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16935 if { (eval echo "$as_me:16935: \"$ac_link\"") >&5
16936   (eval $ac_link) 2>&5
16937   ac_status=$?
16938   echo "$as_me:16938: \$? = $ac_status" >&5
16939   (exit "$ac_status"); } &&
16940          { ac_try='test -s "conftest$ac_exeext"'
16941   { (eval echo "$as_me:16941: \"$ac_try\"") >&5
16942   (eval $ac_try) 2>&5
16943   ac_status=$?
16944   echo "$as_me:16944: \$? = $ac_status" >&5
16945   (exit "$ac_status"); }; }; then
16946
16947                         cf_clang_optok=yes
16948 else
16949   echo "$as_me: failed program was:" >&5
16950 cat "conftest.$ac_ext" >&5
16951
16952                         cf_clang_optok=no
16953 fi
16954 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16955                 echo "$as_me:16955: result: $cf_clang_optok" >&5
16956 echo "${ECHO_T}$cf_clang_optok" >&6
16957                 CFLAGS="$cf_save_CFLAGS"
16958                 if test "$cf_clang_optok" = yes; then
16959                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
16960
16961 echo "${as_me:-configure}:16961: testing adding option $cf_clang_opt ..." 1>&5
16962
16963         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16964         CFLAGS="${CFLAGS}$cf_clang_opt"
16965
16966                 fi
16967         done
16968 fi
16969
16970 ac_ext=cc
16971 ac_cpp='$CXXCPP $CPPFLAGS'
16972 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16973 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16974 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16975 ac_main_return="return"
16976
16977 cat > conftest.$ac_ext <<EOF
16978 #line 16978 "configure"
16979 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16980 EOF
16981
16982 if test "$INTEL_CPLUSPLUS" = yes
16983 then
16984 # The "-wdXXX" options suppress warnings:
16985 # remark #1419: external declaration in primary source file
16986 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16987 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16988 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16989 # remark #193: zero used for undefined preprocessing identifier
16990 # remark #593: variable "curs_sb_left_arrow" was set but never used
16991 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16992 # remark #869: parameter "tw" was never referenced
16993 # remark #981: operands are evaluated in unspecified order
16994 # warning #269: invalid format string conversion
16995
16996         { echo "$as_me:16996: checking for $CC warning options..." >&5
16997 echo "$as_me: checking for $CC warning options..." >&6;}
16998         cf_save_CXXFLAGS="$CXXFLAGS"
16999         EXTRA_CXXFLAGS="-Wall"
17000         for cf_opt in \
17001                 wd1419 \
17002                 wd1682 \
17003                 wd1683 \
17004                 wd1684 \
17005                 wd193 \
17006                 wd279 \
17007                 wd593 \
17008                 wd810 \
17009                 wd869 \
17010                 wd981
17011         do
17012                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17013                 if { (eval echo "$as_me:17013: \"$ac_compile\"") >&5
17014   (eval $ac_compile) 2>&5
17015   ac_status=$?
17016   echo "$as_me:17016: \$? = $ac_status" >&5
17017   (exit "$ac_status"); }; then
17018                         test -n "$verbose" && echo "$as_me:17018: result: ... -$cf_opt" >&5
17019 echo "${ECHO_T}... -$cf_opt" >&6
17020                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17021                 fi
17022         done
17023         CXXFLAGS="$cf_save_CXXFLAGS"
17024
17025 elif test "$GXX" = yes
17026 then
17027         { echo "$as_me:17027: checking for $CXX warning options..." >&5
17028 echo "$as_me: checking for $CXX warning options..." >&6;}
17029         cf_save_CXXFLAGS="$CXXFLAGS"
17030         EXTRA_CXXFLAGS="-W -Wall"
17031         cf_gxx_extra_warnings=""
17032         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17033         case "$GXX_VERSION" in
17034         ([1-2].*)
17035                 ;;
17036         (*)
17037                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17038                 ;;
17039         esac
17040         for cf_opt in \
17041                 Wabi \
17042                 fabi-version=0 \
17043                 Wextra \
17044                 Wignored-qualifiers \
17045                 Wlogical-op \
17046                 Woverloaded-virtual \
17047                 Wsign-promo \
17048                 Wsynth \
17049                 Wold-style-cast \
17050                 Wcast-align \
17051                 Wcast-qual \
17052                 Wpointer-arith \
17053                 Wshadow \
17054                 Wundef $cf_gxx_extra_warnings Wno-unused
17055         do
17056                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17057                 if { (eval echo "$as_me:17057: \"$ac_compile\"") >&5
17058   (eval $ac_compile) 2>&5
17059   ac_status=$?
17060   echo "$as_me:17060: \$? = $ac_status" >&5
17061   (exit "$ac_status"); }; then
17062                         test -n "$verbose" && echo "$as_me:17062: result: ... -$cf_opt" >&5
17063 echo "${ECHO_T}... -$cf_opt" >&6
17064                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17065                 else
17066                         test -n "$verbose" && echo "$as_me:17066: result: ... no -$cf_opt" >&5
17067 echo "${ECHO_T}... no -$cf_opt" >&6
17068                 fi
17069         done
17070         CXXFLAGS="$cf_save_CXXFLAGS"
17071 fi
17072
17073 rm -rf ./conftest*
17074 ac_ext=c
17075 ac_cpp='$CPP $CPPFLAGS'
17076 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17077 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17078 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17079 ac_main_return="return"
17080
17081         fi
17082 fi
17083
17084 echo "$as_me:17084: checking if you want to work around bogus compiler/loader warnings" >&5
17085 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17086
17087 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17088 if test "${enable_string_hacks+set}" = set; then
17089   enableval="$enable_string_hacks"
17090   enable_string_hacks=$enableval
17091 else
17092   enable_string_hacks=no
17093 fi;
17094 echo "$as_me:17094: result: $enable_string_hacks" >&5
17095 echo "${ECHO_T}$enable_string_hacks" >&6
17096
17097 if test "x$enable_string_hacks" = "xyes"; then
17098
17099 cat >>confdefs.h <<\EOF
17100 #define USE_STRING_HACKS 1
17101 EOF
17102
17103         { echo "$as_me:17103: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
17104 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17105         echo "$as_me:17105: checking for strlcat" >&5
17106 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17107 if test "${ac_cv_func_strlcat+set}" = set; then
17108   echo $ECHO_N "(cached) $ECHO_C" >&6
17109 else
17110   cat >"conftest.$ac_ext" <<_ACEOF
17111 #line 17111 "configure"
17112 #include "confdefs.h"
17113 #define strlcat autoconf_temporary
17114 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17115 #undef strlcat
17116
17117 #ifdef __cplusplus
17118 extern "C"
17119 #endif
17120
17121 /* We use char because int might match the return type of a gcc2
17122    builtin and then its argument prototype would still apply.  */
17123 char strlcat (void);
17124
17125 int
17126 main (void)
17127 {
17128
17129 /* The GNU C library defines stubs for functions which it implements
17130     to always fail with ENOSYS.  Some functions are actually named
17131     something starting with __ and the normal name is an alias.  */
17132 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17133 #error found stub for strlcat
17134 #endif
17135
17136         return strlcat ();
17137   ;
17138   return 0;
17139 }
17140 _ACEOF
17141 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17142 if { (eval echo "$as_me:17142: \"$ac_link\"") >&5
17143   (eval $ac_link) 2>&5
17144   ac_status=$?
17145   echo "$as_me:17145: \$? = $ac_status" >&5
17146   (exit "$ac_status"); } &&
17147          { ac_try='test -s "conftest$ac_exeext"'
17148   { (eval echo "$as_me:17148: \"$ac_try\"") >&5
17149   (eval $ac_try) 2>&5
17150   ac_status=$?
17151   echo "$as_me:17151: \$? = $ac_status" >&5
17152   (exit "$ac_status"); }; }; then
17153   ac_cv_func_strlcat=yes
17154 else
17155   echo "$as_me: failed program was:" >&5
17156 cat "conftest.$ac_ext" >&5
17157 ac_cv_func_strlcat=no
17158 fi
17159 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17160 fi
17161 echo "$as_me:17161: result: $ac_cv_func_strlcat" >&5
17162 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
17163 if test "$ac_cv_func_strlcat" = yes; then
17164
17165 cat >>confdefs.h <<\EOF
17166 #define HAVE_STRLCAT 1
17167 EOF
17168
17169 else
17170
17171                 echo "$as_me:17171: checking for strlcat in -lbsd" >&5
17172 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
17173 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
17174   echo $ECHO_N "(cached) $ECHO_C" >&6
17175 else
17176   ac_check_lib_save_LIBS=$LIBS
17177 LIBS="-lbsd  $LIBS"
17178 cat >"conftest.$ac_ext" <<_ACEOF
17179 #line 17179 "configure"
17180 #include "confdefs.h"
17181
17182 /* Override any gcc2 internal prototype to avoid an error.  */
17183 #ifdef __cplusplus
17184 extern "C"
17185 #endif
17186 /* We use char because int might match the return type of a gcc2
17187    builtin and then its argument prototype would still apply.  */
17188 char strlcat ();
17189 int
17190 main (void)
17191 {
17192 strlcat ();
17193   ;
17194   return 0;
17195 }
17196 _ACEOF
17197 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17198 if { (eval echo "$as_me:17198: \"$ac_link\"") >&5
17199   (eval $ac_link) 2>&5
17200   ac_status=$?
17201   echo "$as_me:17201: \$? = $ac_status" >&5
17202   (exit "$ac_status"); } &&
17203          { ac_try='test -s "conftest$ac_exeext"'
17204   { (eval echo "$as_me:17204: \"$ac_try\"") >&5
17205   (eval $ac_try) 2>&5
17206   ac_status=$?
17207   echo "$as_me:17207: \$? = $ac_status" >&5
17208   (exit "$ac_status"); }; }; then
17209   ac_cv_lib_bsd_strlcat=yes
17210 else
17211   echo "$as_me: failed program was:" >&5
17212 cat "conftest.$ac_ext" >&5
17213 ac_cv_lib_bsd_strlcat=no
17214 fi
17215 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17216 LIBS=$ac_check_lib_save_LIBS
17217 fi
17218 echo "$as_me:17218: result: $ac_cv_lib_bsd_strlcat" >&5
17219 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
17220 if test "$ac_cv_lib_bsd_strlcat" = yes; then
17221
17222 cf_add_libs="$LIBS"
17223 # reverse order
17224 cf_add_0lib=
17225 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17226 # filter duplicates
17227 for cf_add_1lib in $cf_add_0lib; do
17228         for cf_add_2lib in $cf_add_libs; do
17229                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17230                         cf_add_1lib=
17231                         break
17232                 fi
17233         done
17234         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17235 done
17236 LIBS="$cf_add_libs"
17237
17238 for ac_header in bsd/string.h
17239 do
17240 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17241 echo "$as_me:17241: checking for $ac_header" >&5
17242 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17243 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17244   echo $ECHO_N "(cached) $ECHO_C" >&6
17245 else
17246   cat >"conftest.$ac_ext" <<_ACEOF
17247 #line 17247 "configure"
17248 #include "confdefs.h"
17249 #include <$ac_header>
17250 _ACEOF
17251 if { (eval echo "$as_me:17251: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17252   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17253   ac_status=$?
17254   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17255   rm -f conftest.er1
17256   cat conftest.err >&5
17257   echo "$as_me:17257: \$? = $ac_status" >&5
17258   (exit "$ac_status"); } >/dev/null; then
17259   if test -s conftest.err; then
17260     ac_cpp_err=$ac_c_preproc_warn_flag
17261   else
17262     ac_cpp_err=
17263   fi
17264 else
17265   ac_cpp_err=yes
17266 fi
17267 if test -z "$ac_cpp_err"; then
17268   eval "$as_ac_Header=yes"
17269 else
17270   echo "$as_me: failed program was:" >&5
17271   cat "conftest.$ac_ext" >&5
17272   eval "$as_ac_Header=no"
17273 fi
17274 rm -f conftest.err "conftest.$ac_ext"
17275 fi
17276 echo "$as_me:17276: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17277 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17278 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17279   cat >>confdefs.h <<EOF
17280 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17281 EOF
17282
17283 fi
17284 done
17285
17286 cat >>confdefs.h <<\EOF
17287 #define HAVE_STRLCAT 1
17288 EOF
17289
17290 fi
17291
17292 fi
17293
17294 for ac_func in strlcpy snprintf
17295 do
17296 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17297 echo "$as_me:17297: checking for $ac_func" >&5
17298 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17299 if eval "test \"\${$as_ac_var+set}\" = set"; then
17300   echo $ECHO_N "(cached) $ECHO_C" >&6
17301 else
17302   cat >"conftest.$ac_ext" <<_ACEOF
17303 #line 17303 "configure"
17304 #include "confdefs.h"
17305 #define $ac_func autoconf_temporary
17306 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17307 #undef $ac_func
17308
17309 #ifdef __cplusplus
17310 extern "C"
17311 #endif
17312
17313 /* We use char because int might match the return type of a gcc2
17314    builtin and then its argument prototype would still apply.  */
17315 char $ac_func (void);
17316
17317 int
17318 main (void)
17319 {
17320
17321 /* The GNU C library defines stubs for functions which it implements
17322     to always fail with ENOSYS.  Some functions are actually named
17323     something starting with __ and the normal name is an alias.  */
17324 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17325 #error found stub for $ac_func
17326 #endif
17327
17328         return $ac_func ();
17329   ;
17330   return 0;
17331 }
17332 _ACEOF
17333 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17334 if { (eval echo "$as_me:17334: \"$ac_link\"") >&5
17335   (eval $ac_link) 2>&5
17336   ac_status=$?
17337   echo "$as_me:17337: \$? = $ac_status" >&5
17338   (exit "$ac_status"); } &&
17339          { ac_try='test -s "conftest$ac_exeext"'
17340   { (eval echo "$as_me:17340: \"$ac_try\"") >&5
17341   (eval $ac_try) 2>&5
17342   ac_status=$?
17343   echo "$as_me:17343: \$? = $ac_status" >&5
17344   (exit "$ac_status"); }; }; then
17345   eval "$as_ac_var=yes"
17346 else
17347   echo "$as_me: failed program was:" >&5
17348 cat "conftest.$ac_ext" >&5
17349 eval "$as_ac_var=no"
17350 fi
17351 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17352 fi
17353 echo "$as_me:17353: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17354 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17355 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17356   cat >>confdefs.h <<EOF
17357 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17358 EOF
17359
17360 fi
17361 done
17362
17363 fi
17364
17365 ###     use option --enable-assertions to turn on generation of assertion code
17366 echo "$as_me:17366: checking if you want to enable runtime assertions" >&5
17367 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
17368
17369 # Check whether --enable-assertions or --disable-assertions was given.
17370 if test "${enable_assertions+set}" = set; then
17371   enableval="$enable_assertions"
17372   with_assertions=$enableval
17373 else
17374   with_assertions=no
17375 fi;
17376 echo "$as_me:17376: result: $with_assertions" >&5
17377 echo "${ECHO_T}$with_assertions" >&6
17378 if test -n "$GCC"
17379 then
17380         if test "$with_assertions" = no
17381         then
17382                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
17383         else
17384
17385         ADAFLAGS="$ADAFLAGS -gnata"
17386
17387         fi
17388 fi
17389
17390 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
17391
17392 echo "$as_me:17392: checking if you want to use dmalloc for testing" >&5
17393 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17394
17395 # Check whether --with-dmalloc or --without-dmalloc was given.
17396 if test "${with_dmalloc+set}" = set; then
17397   withval="$with_dmalloc"
17398
17399 cat >>confdefs.h <<EOF
17400 #define USE_DMALLOC 1
17401 EOF
17402
17403         : "${with_cflags:=-g}"
17404         : "${enable_leaks:=no}"
17405          with_dmalloc=yes
17406 else
17407   with_dmalloc=
17408 fi;
17409 echo "$as_me:17409: result: ${with_dmalloc:-no}" >&5
17410 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17411
17412 case ".$with_cflags" in
17413 (.*-g*)
17414         case .$CFLAGS in
17415         (.*-g*)
17416                 ;;
17417         (*)
17418
17419 cf_fix_cppflags=no
17420 cf_new_cflags=
17421 cf_new_cppflags=
17422 cf_new_extra_cppflags=
17423
17424 for cf_add_cflags in -g
17425 do
17426 case "$cf_fix_cppflags" in
17427 (no)
17428         case "$cf_add_cflags" in
17429         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17430                 case "$cf_add_cflags" in
17431                 (-D*)
17432                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17433
17434                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17435                                 && test -z "${cf_tst_cflags}" \
17436                                 && cf_fix_cppflags=yes
17437
17438                         if test "$cf_fix_cppflags" = yes ; then
17439
17440         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17441         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17442
17443                                 continue
17444                         elif test "${cf_tst_cflags}" = "\"'" ; then
17445
17446         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17447         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17448
17449                                 continue
17450                         fi
17451                         ;;
17452                 esac
17453                 case "$CPPFLAGS" in
17454                 (*$cf_add_cflags)
17455                         ;;
17456                 (*)
17457                         case "$cf_add_cflags" in
17458                         (-D*)
17459                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17460
17461 CPPFLAGS=`echo "$CPPFLAGS" | \
17462         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17463                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17464
17465                                 ;;
17466                         esac
17467
17468         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17469         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17470
17471                         ;;
17472                 esac
17473                 ;;
17474         (*)
17475
17476         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17477         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17478
17479                 ;;
17480         esac
17481         ;;
17482 (yes)
17483
17484         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17485         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17486
17487         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17488
17489         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17490                 && test -z "${cf_tst_cflags}" \
17491                 && cf_fix_cppflags=no
17492         ;;
17493 esac
17494 done
17495
17496 if test -n "$cf_new_cflags" ; then
17497
17498         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17499         CFLAGS="${CFLAGS}$cf_new_cflags"
17500
17501 fi
17502
17503 if test -n "$cf_new_cppflags" ; then
17504
17505         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17506         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17507
17508 fi
17509
17510 if test -n "$cf_new_extra_cppflags" ; then
17511
17512         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17513         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17514
17515 fi
17516
17517                 ;;
17518         esac
17519         ;;
17520 esac
17521
17522 if test "$with_dmalloc" = yes ; then
17523         echo "$as_me:17523: checking for dmalloc.h" >&5
17524 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17525 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17526   echo $ECHO_N "(cached) $ECHO_C" >&6
17527 else
17528   cat >"conftest.$ac_ext" <<_ACEOF
17529 #line 17529 "configure"
17530 #include "confdefs.h"
17531 #include <dmalloc.h>
17532 _ACEOF
17533 if { (eval echo "$as_me:17533: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17534   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17535   ac_status=$?
17536   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17537   rm -f conftest.er1
17538   cat conftest.err >&5
17539   echo "$as_me:17539: \$? = $ac_status" >&5
17540   (exit "$ac_status"); } >/dev/null; then
17541   if test -s conftest.err; then
17542     ac_cpp_err=$ac_c_preproc_warn_flag
17543   else
17544     ac_cpp_err=
17545   fi
17546 else
17547   ac_cpp_err=yes
17548 fi
17549 if test -z "$ac_cpp_err"; then
17550   ac_cv_header_dmalloc_h=yes
17551 else
17552   echo "$as_me: failed program was:" >&5
17553   cat "conftest.$ac_ext" >&5
17554   ac_cv_header_dmalloc_h=no
17555 fi
17556 rm -f conftest.err "conftest.$ac_ext"
17557 fi
17558 echo "$as_me:17558: result: $ac_cv_header_dmalloc_h" >&5
17559 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17560 if test "$ac_cv_header_dmalloc_h" = yes; then
17561
17562 echo "$as_me:17562: checking for dmalloc_debug in -ldmalloc" >&5
17563 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17564 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17565   echo $ECHO_N "(cached) $ECHO_C" >&6
17566 else
17567   ac_check_lib_save_LIBS=$LIBS
17568 LIBS="-ldmalloc  $LIBS"
17569 cat >"conftest.$ac_ext" <<_ACEOF
17570 #line 17570 "configure"
17571 #include "confdefs.h"
17572
17573 /* Override any gcc2 internal prototype to avoid an error.  */
17574 #ifdef __cplusplus
17575 extern "C"
17576 #endif
17577 /* We use char because int might match the return type of a gcc2
17578    builtin and then its argument prototype would still apply.  */
17579 char dmalloc_debug ();
17580 int
17581 main (void)
17582 {
17583 dmalloc_debug ();
17584   ;
17585   return 0;
17586 }
17587 _ACEOF
17588 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17589 if { (eval echo "$as_me:17589: \"$ac_link\"") >&5
17590   (eval $ac_link) 2>&5
17591   ac_status=$?
17592   echo "$as_me:17592: \$? = $ac_status" >&5
17593   (exit "$ac_status"); } &&
17594          { ac_try='test -s "conftest$ac_exeext"'
17595   { (eval echo "$as_me:17595: \"$ac_try\"") >&5
17596   (eval $ac_try) 2>&5
17597   ac_status=$?
17598   echo "$as_me:17598: \$? = $ac_status" >&5
17599   (exit "$ac_status"); }; }; then
17600   ac_cv_lib_dmalloc_dmalloc_debug=yes
17601 else
17602   echo "$as_me: failed program was:" >&5
17603 cat "conftest.$ac_ext" >&5
17604 ac_cv_lib_dmalloc_dmalloc_debug=no
17605 fi
17606 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17607 LIBS=$ac_check_lib_save_LIBS
17608 fi
17609 echo "$as_me:17609: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
17610 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
17611 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
17612   cat >>confdefs.h <<EOF
17613 #define HAVE_LIBDMALLOC 1
17614 EOF
17615
17616   LIBS="-ldmalloc $LIBS"
17617
17618 fi
17619
17620 fi
17621
17622 fi
17623
17624 echo "$as_me:17624: checking if you want to use dbmalloc for testing" >&5
17625 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
17626
17627 # Check whether --with-dbmalloc or --without-dbmalloc was given.
17628 if test "${with_dbmalloc+set}" = set; then
17629   withval="$with_dbmalloc"
17630
17631 cat >>confdefs.h <<EOF
17632 #define USE_DBMALLOC 1
17633 EOF
17634
17635         : "${with_cflags:=-g}"
17636         : "${enable_leaks:=no}"
17637          with_dbmalloc=yes
17638 else
17639   with_dbmalloc=
17640 fi;
17641 echo "$as_me:17641: result: ${with_dbmalloc:-no}" >&5
17642 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
17643
17644 case ".$with_cflags" in
17645 (.*-g*)
17646         case .$CFLAGS in
17647         (.*-g*)
17648                 ;;
17649         (*)
17650
17651 cf_fix_cppflags=no
17652 cf_new_cflags=
17653 cf_new_cppflags=
17654 cf_new_extra_cppflags=
17655
17656 for cf_add_cflags in -g
17657 do
17658 case "$cf_fix_cppflags" in
17659 (no)
17660         case "$cf_add_cflags" in
17661         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17662                 case "$cf_add_cflags" in
17663                 (-D*)
17664                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17665
17666                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17667                                 && test -z "${cf_tst_cflags}" \
17668                                 && cf_fix_cppflags=yes
17669
17670                         if test "$cf_fix_cppflags" = yes ; then
17671
17672         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17673         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17674
17675                                 continue
17676                         elif test "${cf_tst_cflags}" = "\"'" ; then
17677
17678         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17679         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17680
17681                                 continue
17682                         fi
17683                         ;;
17684                 esac
17685                 case "$CPPFLAGS" in
17686                 (*$cf_add_cflags)
17687                         ;;
17688                 (*)
17689                         case "$cf_add_cflags" in
17690                         (-D*)
17691                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17692
17693 CPPFLAGS=`echo "$CPPFLAGS" | \
17694         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17695                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17696
17697                                 ;;
17698                         esac
17699
17700         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17701         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17702
17703                         ;;
17704                 esac
17705                 ;;
17706         (*)
17707
17708         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17709         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17710
17711                 ;;
17712         esac
17713         ;;
17714 (yes)
17715
17716         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17717         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17718
17719         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17720
17721         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17722                 && test -z "${cf_tst_cflags}" \
17723                 && cf_fix_cppflags=no
17724         ;;
17725 esac
17726 done
17727
17728 if test -n "$cf_new_cflags" ; then
17729
17730         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17731         CFLAGS="${CFLAGS}$cf_new_cflags"
17732
17733 fi
17734
17735 if test -n "$cf_new_cppflags" ; then
17736
17737         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17738         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17739
17740 fi
17741
17742 if test -n "$cf_new_extra_cppflags" ; then
17743
17744         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17745         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17746
17747 fi
17748
17749                 ;;
17750         esac
17751         ;;
17752 esac
17753
17754 if test "$with_dbmalloc" = yes ; then
17755         echo "$as_me:17755: checking for dbmalloc.h" >&5
17756 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
17757 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
17758   echo $ECHO_N "(cached) $ECHO_C" >&6
17759 else
17760   cat >"conftest.$ac_ext" <<_ACEOF
17761 #line 17761 "configure"
17762 #include "confdefs.h"
17763 #include <dbmalloc.h>
17764 _ACEOF
17765 if { (eval echo "$as_me:17765: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17766   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17767   ac_status=$?
17768   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17769   rm -f conftest.er1
17770   cat conftest.err >&5
17771   echo "$as_me:17771: \$? = $ac_status" >&5
17772   (exit "$ac_status"); } >/dev/null; then
17773   if test -s conftest.err; then
17774     ac_cpp_err=$ac_c_preproc_warn_flag
17775   else
17776     ac_cpp_err=
17777   fi
17778 else
17779   ac_cpp_err=yes
17780 fi
17781 if test -z "$ac_cpp_err"; then
17782   ac_cv_header_dbmalloc_h=yes
17783 else
17784   echo "$as_me: failed program was:" >&5
17785   cat "conftest.$ac_ext" >&5
17786   ac_cv_header_dbmalloc_h=no
17787 fi
17788 rm -f conftest.err "conftest.$ac_ext"
17789 fi
17790 echo "$as_me:17790: result: $ac_cv_header_dbmalloc_h" >&5
17791 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
17792 if test "$ac_cv_header_dbmalloc_h" = yes; then
17793
17794 echo "$as_me:17794: checking for debug_malloc in -ldbmalloc" >&5
17795 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
17796 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
17797   echo $ECHO_N "(cached) $ECHO_C" >&6
17798 else
17799   ac_check_lib_save_LIBS=$LIBS
17800 LIBS="-ldbmalloc  $LIBS"
17801 cat >"conftest.$ac_ext" <<_ACEOF
17802 #line 17802 "configure"
17803 #include "confdefs.h"
17804
17805 /* Override any gcc2 internal prototype to avoid an error.  */
17806 #ifdef __cplusplus
17807 extern "C"
17808 #endif
17809 /* We use char because int might match the return type of a gcc2
17810    builtin and then its argument prototype would still apply.  */
17811 char debug_malloc ();
17812 int
17813 main (void)
17814 {
17815 debug_malloc ();
17816   ;
17817   return 0;
17818 }
17819 _ACEOF
17820 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17821 if { (eval echo "$as_me:17821: \"$ac_link\"") >&5
17822   (eval $ac_link) 2>&5
17823   ac_status=$?
17824   echo "$as_me:17824: \$? = $ac_status" >&5
17825   (exit "$ac_status"); } &&
17826          { ac_try='test -s "conftest$ac_exeext"'
17827   { (eval echo "$as_me:17827: \"$ac_try\"") >&5
17828   (eval $ac_try) 2>&5
17829   ac_status=$?
17830   echo "$as_me:17830: \$? = $ac_status" >&5
17831   (exit "$ac_status"); }; }; then
17832   ac_cv_lib_dbmalloc_debug_malloc=yes
17833 else
17834   echo "$as_me: failed program was:" >&5
17835 cat "conftest.$ac_ext" >&5
17836 ac_cv_lib_dbmalloc_debug_malloc=no
17837 fi
17838 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17839 LIBS=$ac_check_lib_save_LIBS
17840 fi
17841 echo "$as_me:17841: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
17842 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
17843 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
17844   cat >>confdefs.h <<EOF
17845 #define HAVE_LIBDBMALLOC 1
17846 EOF
17847
17848   LIBS="-ldbmalloc $LIBS"
17849
17850 fi
17851
17852 fi
17853
17854 fi
17855
17856 echo "$as_me:17856: checking if you want to use valgrind for testing" >&5
17857 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
17858
17859 # Check whether --with-valgrind or --without-valgrind was given.
17860 if test "${with_valgrind+set}" = set; then
17861   withval="$with_valgrind"
17862
17863 cat >>confdefs.h <<EOF
17864 #define USE_VALGRIND 1
17865 EOF
17866
17867         : "${with_cflags:=-g}"
17868         : "${enable_leaks:=no}"
17869          with_valgrind=yes
17870 else
17871   with_valgrind=
17872 fi;
17873 echo "$as_me:17873: result: ${with_valgrind:-no}" >&5
17874 echo "${ECHO_T}${with_valgrind:-no}" >&6
17875
17876 case ".$with_cflags" in
17877 (.*-g*)
17878         case .$CFLAGS in
17879         (.*-g*)
17880                 ;;
17881         (*)
17882
17883 cf_fix_cppflags=no
17884 cf_new_cflags=
17885 cf_new_cppflags=
17886 cf_new_extra_cppflags=
17887
17888 for cf_add_cflags in -g
17889 do
17890 case "$cf_fix_cppflags" in
17891 (no)
17892         case "$cf_add_cflags" in
17893         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17894                 case "$cf_add_cflags" in
17895                 (-D*)
17896                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17897
17898                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17899                                 && test -z "${cf_tst_cflags}" \
17900                                 && cf_fix_cppflags=yes
17901
17902                         if test "$cf_fix_cppflags" = yes ; then
17903
17904         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17905         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17906
17907                                 continue
17908                         elif test "${cf_tst_cflags}" = "\"'" ; then
17909
17910         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17911         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17912
17913                                 continue
17914                         fi
17915                         ;;
17916                 esac
17917                 case "$CPPFLAGS" in
17918                 (*$cf_add_cflags)
17919                         ;;
17920                 (*)
17921                         case "$cf_add_cflags" in
17922                         (-D*)
17923                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17924
17925 CPPFLAGS=`echo "$CPPFLAGS" | \
17926         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17927                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17928
17929                                 ;;
17930                         esac
17931
17932         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17933         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17934
17935                         ;;
17936                 esac
17937                 ;;
17938         (*)
17939
17940         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17941         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17942
17943                 ;;
17944         esac
17945         ;;
17946 (yes)
17947
17948         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17949         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17950
17951         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17952
17953         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17954                 && test -z "${cf_tst_cflags}" \
17955                 && cf_fix_cppflags=no
17956         ;;
17957 esac
17958 done
17959
17960 if test -n "$cf_new_cflags" ; then
17961
17962         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17963         CFLAGS="${CFLAGS}$cf_new_cflags"
17964
17965 fi
17966
17967 if test -n "$cf_new_cppflags" ; then
17968
17969         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17970         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17971
17972 fi
17973
17974 if test -n "$cf_new_extra_cppflags" ; then
17975
17976         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17977         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17978
17979 fi
17980
17981                 ;;
17982         esac
17983         ;;
17984 esac
17985
17986 echo "$as_me:17986: checking if you want to perform memory-leak testing" >&5
17987 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
17988
17989 # Check whether --enable-leaks or --disable-leaks was given.
17990 if test "${enable_leaks+set}" = set; then
17991   enableval="$enable_leaks"
17992   enable_leaks=no
17993 else
17994   enable_leaks=yes
17995 fi;
17996 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
17997 echo "$as_me:17997: result: $with_no_leaks" >&5
17998 echo "${ECHO_T}$with_no_leaks" >&6
17999
18000 if test "$enable_leaks" = no ; then
18001
18002 cat >>confdefs.h <<\EOF
18003 #define NO_LEAKS 1
18004 EOF
18005
18006 cat >>confdefs.h <<\EOF
18007 #define YY_NO_LEAKS 1
18008 EOF
18009
18010 fi
18011
18012 cat >>confdefs.h <<\EOF
18013 #define HAVE_NC_ALLOC_H 1
18014 EOF
18015
18016 ###     use option --enable-expanded to generate certain macros as functions
18017
18018 # Check whether --enable-expanded or --disable-expanded was given.
18019 if test "${enable_expanded+set}" = set; then
18020   enableval="$enable_expanded"
18021   test "x$enableval" = xyes &&
18022 cat >>confdefs.h <<\EOF
18023 #define NCURSES_EXPANDED 1
18024 EOF
18025
18026 fi;
18027
18028 ###     use option --disable-macros to suppress macros in favor of functions
18029
18030 # Check whether --enable-macros or --disable-macros was given.
18031 if test "${enable_macros+set}" = set; then
18032   enableval="$enable_macros"
18033   test "$enableval" = no &&
18034 cat >>confdefs.h <<\EOF
18035 #define NCURSES_NOMACROS 1
18036 EOF
18037
18038 fi;
18039
18040 # Normally we only add trace() to the debug-library.  Allow this to be
18041 # extended to all models of the ncurses library:
18042 cf_all_traces=no
18043 case "$CFLAGS $CPPFLAGS" in
18044 (*-DTRACE*)
18045         cf_all_traces=yes
18046         ;;
18047 esac
18048
18049 echo "$as_me:18049: checking whether to add trace feature to all models" >&5
18050 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18051
18052 # Check whether --with-trace or --without-trace was given.
18053 if test "${with_trace+set}" = set; then
18054   withval="$with_trace"
18055   cf_with_trace=$withval
18056 else
18057   cf_with_trace=$cf_all_traces
18058 fi;
18059 echo "$as_me:18059: result: $cf_with_trace" >&5
18060 echo "${ECHO_T}$cf_with_trace" >&6
18061
18062 if test "x$cf_with_trace" = xyes ; then
18063         LIB_TRACING=all
18064         ADA_TRACE=TRUE
18065
18066 cf_fix_cppflags=no
18067 cf_new_cflags=
18068 cf_new_cppflags=
18069 cf_new_extra_cppflags=
18070
18071 for cf_add_cflags in -DTRACE
18072 do
18073 case "$cf_fix_cppflags" in
18074 (no)
18075         case "$cf_add_cflags" in
18076         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18077                 case "$cf_add_cflags" in
18078                 (-D*)
18079                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18080
18081                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18082                                 && test -z "${cf_tst_cflags}" \
18083                                 && cf_fix_cppflags=yes
18084
18085                         if test "$cf_fix_cppflags" = yes ; then
18086
18087         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18088         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18089
18090                                 continue
18091                         elif test "${cf_tst_cflags}" = "\"'" ; then
18092
18093         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18094         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18095
18096                                 continue
18097                         fi
18098                         ;;
18099                 esac
18100                 case "$CPPFLAGS" in
18101                 (*$cf_add_cflags)
18102                         ;;
18103                 (*)
18104                         case "$cf_add_cflags" in
18105                         (-D*)
18106                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18107
18108 CPPFLAGS=`echo "$CPPFLAGS" | \
18109         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18110                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18111
18112                                 ;;
18113                         esac
18114
18115         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18116         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18117
18118                         ;;
18119                 esac
18120                 ;;
18121         (*)
18122
18123         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18124         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18125
18126                 ;;
18127         esac
18128         ;;
18129 (yes)
18130
18131         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18132         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18133
18134         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18135
18136         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18137                 && test -z "${cf_tst_cflags}" \
18138                 && cf_fix_cppflags=no
18139         ;;
18140 esac
18141 done
18142
18143 if test -n "$cf_new_cflags" ; then
18144
18145         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18146         CFLAGS="${CFLAGS}$cf_new_cflags"
18147
18148 fi
18149
18150 if test -n "$cf_new_cppflags" ; then
18151
18152         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18153         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18154
18155 fi
18156
18157 if test -n "$cf_new_extra_cppflags" ; then
18158
18159         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18160         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18161
18162 fi
18163
18164 cat >>confdefs.h <<\EOF
18165 #define HAVE__TRACEF 1
18166 EOF
18167
18168 else
18169         LIB_TRACING=DEBUG
18170         ADA_TRACE=FALSE
18171 fi
18172
18173 echo "$as_me:18173: checking if we want to use GNAT projects" >&5
18174 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
18175
18176 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
18177 if test "${enable_gnat_projects+set}" = set; then
18178   enableval="$enable_gnat_projects"
18179   test "$enableval" != no && enableval=yes
18180         if test "$enableval" != "yes" ; then
18181     enable_gnat_projects=no
18182         else
18183                 enable_gnat_projects=yes
18184         fi
18185 else
18186   enableval=yes
18187         enable_gnat_projects=yes
18188
18189 fi;
18190 echo "$as_me:18190: result: $enable_gnat_projects" >&5
18191 echo "${ECHO_T}$enable_gnat_projects" >&6
18192
18193 ###     Checks for libraries.
18194 case "$cf_cv_system_name" in
18195 (*mingw32*|*mingw64*)
18196         if test "x$with_exp_win32" = xyes ; then
18197         CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
18198         else
18199         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
18200         fi
18201         # Note: WINVER may be a problem with Windows 10
18202         ;;
18203 (*)
18204 echo "$as_me:18204: checking for gettimeofday" >&5
18205 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
18206 if test "${ac_cv_func_gettimeofday+set}" = set; then
18207   echo $ECHO_N "(cached) $ECHO_C" >&6
18208 else
18209   cat >"conftest.$ac_ext" <<_ACEOF
18210 #line 18210 "configure"
18211 #include "confdefs.h"
18212 #define gettimeofday autoconf_temporary
18213 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18214 #undef gettimeofday
18215
18216 #ifdef __cplusplus
18217 extern "C"
18218 #endif
18219
18220 /* We use char because int might match the return type of a gcc2
18221    builtin and then its argument prototype would still apply.  */
18222 char gettimeofday (void);
18223
18224 int
18225 main (void)
18226 {
18227
18228 /* The GNU C library defines stubs for functions which it implements
18229     to always fail with ENOSYS.  Some functions are actually named
18230     something starting with __ and the normal name is an alias.  */
18231 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
18232 #error found stub for gettimeofday
18233 #endif
18234
18235         return gettimeofday ();
18236   ;
18237   return 0;
18238 }
18239 _ACEOF
18240 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18241 if { (eval echo "$as_me:18241: \"$ac_link\"") >&5
18242   (eval $ac_link) 2>&5
18243   ac_status=$?
18244   echo "$as_me:18244: \$? = $ac_status" >&5
18245   (exit "$ac_status"); } &&
18246          { ac_try='test -s "conftest$ac_exeext"'
18247   { (eval echo "$as_me:18247: \"$ac_try\"") >&5
18248   (eval $ac_try) 2>&5
18249   ac_status=$?
18250   echo "$as_me:18250: \$? = $ac_status" >&5
18251   (exit "$ac_status"); }; }; then
18252   ac_cv_func_gettimeofday=yes
18253 else
18254   echo "$as_me: failed program was:" >&5
18255 cat "conftest.$ac_ext" >&5
18256 ac_cv_func_gettimeofday=no
18257 fi
18258 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18259 fi
18260 echo "$as_me:18260: result: $ac_cv_func_gettimeofday" >&5
18261 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
18262 if test "$ac_cv_func_gettimeofday" = yes; then
18263
18264 cat >>confdefs.h <<\EOF
18265 #define HAVE_GETTIMEOFDAY 1
18266 EOF
18267
18268 else
18269
18270 echo "$as_me:18270: checking for gettimeofday in -lbsd" >&5
18271 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
18272 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
18273   echo $ECHO_N "(cached) $ECHO_C" >&6
18274 else
18275   ac_check_lib_save_LIBS=$LIBS
18276 LIBS="-lbsd  $LIBS"
18277 cat >"conftest.$ac_ext" <<_ACEOF
18278 #line 18278 "configure"
18279 #include "confdefs.h"
18280
18281 /* Override any gcc2 internal prototype to avoid an error.  */
18282 #ifdef __cplusplus
18283 extern "C"
18284 #endif
18285 /* We use char because int might match the return type of a gcc2
18286    builtin and then its argument prototype would still apply.  */
18287 char gettimeofday ();
18288 int
18289 main (void)
18290 {
18291 gettimeofday ();
18292   ;
18293   return 0;
18294 }
18295 _ACEOF
18296 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18297 if { (eval echo "$as_me:18297: \"$ac_link\"") >&5
18298   (eval $ac_link) 2>&5
18299   ac_status=$?
18300   echo "$as_me:18300: \$? = $ac_status" >&5
18301   (exit "$ac_status"); } &&
18302          { ac_try='test -s "conftest$ac_exeext"'
18303   { (eval echo "$as_me:18303: \"$ac_try\"") >&5
18304   (eval $ac_try) 2>&5
18305   ac_status=$?
18306   echo "$as_me:18306: \$? = $ac_status" >&5
18307   (exit "$ac_status"); }; }; then
18308   ac_cv_lib_bsd_gettimeofday=yes
18309 else
18310   echo "$as_me: failed program was:" >&5
18311 cat "conftest.$ac_ext" >&5
18312 ac_cv_lib_bsd_gettimeofday=no
18313 fi
18314 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18315 LIBS=$ac_check_lib_save_LIBS
18316 fi
18317 echo "$as_me:18317: result: $ac_cv_lib_bsd_gettimeofday" >&5
18318 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
18319 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
18320
18321 cat >>confdefs.h <<\EOF
18322 #define HAVE_GETTIMEOFDAY 1
18323 EOF
18324
18325 cf_add_libs="$LIBS"
18326 # reverse order
18327 cf_add_0lib=
18328 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18329 # filter duplicates
18330 for cf_add_1lib in $cf_add_0lib; do
18331         for cf_add_2lib in $cf_add_libs; do
18332                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18333                         cf_add_1lib=
18334                         break
18335                 fi
18336         done
18337         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18338 done
18339 LIBS="$cf_add_libs"
18340
18341 fi
18342
18343 fi
18344         ;;
18345 esac
18346
18347 echo "$as_me:18347: checking if -lm needed for math functions" >&5
18348 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
18349 if test "${cf_cv_need_libm+set}" = set; then
18350   echo $ECHO_N "(cached) $ECHO_C" >&6
18351 else
18352
18353         cat >"conftest.$ac_ext" <<_ACEOF
18354 #line 18354 "configure"
18355 #include "confdefs.h"
18356
18357         #include <stdio.h>
18358         #include <stdlib.h>
18359         #include <math.h>
18360
18361 int
18362 main (void)
18363 {
18364 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
18365   ;
18366   return 0;
18367 }
18368 _ACEOF
18369 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18370 if { (eval echo "$as_me:18370: \"$ac_link\"") >&5
18371   (eval $ac_link) 2>&5
18372   ac_status=$?
18373   echo "$as_me:18373: \$? = $ac_status" >&5
18374   (exit "$ac_status"); } &&
18375          { ac_try='test -s "conftest$ac_exeext"'
18376   { (eval echo "$as_me:18376: \"$ac_try\"") >&5
18377   (eval $ac_try) 2>&5
18378   ac_status=$?
18379   echo "$as_me:18379: \$? = $ac_status" >&5
18380   (exit "$ac_status"); }; }; then
18381   cf_cv_need_libm=no
18382 else
18383   echo "$as_me: failed program was:" >&5
18384 cat "conftest.$ac_ext" >&5
18385 cf_cv_need_libm=yes
18386 fi
18387 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18388 fi
18389 echo "$as_me:18389: result: $cf_cv_need_libm" >&5
18390 echo "${ECHO_T}$cf_cv_need_libm" >&6
18391 if test "$cf_cv_need_libm" = yes
18392 then
18393 MATH_LIB=-lm
18394 fi
18395
18396 ###     Checks for header files.
18397 echo "$as_me:18397: checking for ANSI C header files" >&5
18398 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
18399 if test "${ac_cv_header_stdc+set}" = set; then
18400   echo $ECHO_N "(cached) $ECHO_C" >&6
18401 else
18402   cat >"conftest.$ac_ext" <<_ACEOF
18403 #line 18403 "configure"
18404 #include "confdefs.h"
18405 #include <stdlib.h>
18406 #include <stdarg.h>
18407 #include <string.h>
18408 #include <float.h>
18409
18410 _ACEOF
18411 if { (eval echo "$as_me:18411: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18412   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18413   ac_status=$?
18414   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18415   rm -f conftest.er1
18416   cat conftest.err >&5
18417   echo "$as_me:18417: \$? = $ac_status" >&5
18418   (exit "$ac_status"); } >/dev/null; then
18419   if test -s conftest.err; then
18420     ac_cpp_err=$ac_c_preproc_warn_flag
18421   else
18422     ac_cpp_err=
18423   fi
18424 else
18425   ac_cpp_err=yes
18426 fi
18427 if test -z "$ac_cpp_err"; then
18428   ac_cv_header_stdc=yes
18429 else
18430   echo "$as_me: failed program was:" >&5
18431   cat "conftest.$ac_ext" >&5
18432   ac_cv_header_stdc=no
18433 fi
18434 rm -f conftest.err "conftest.$ac_ext"
18435
18436 if test $ac_cv_header_stdc = yes; then
18437   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
18438   cat >"conftest.$ac_ext" <<_ACEOF
18439 #line 18439 "configure"
18440 #include "confdefs.h"
18441 #include <string.h>
18442
18443 _ACEOF
18444 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18445   $EGREP "memchr" >/dev/null 2>&1; then
18446   :
18447 else
18448   ac_cv_header_stdc=no
18449 fi
18450 rm -rf conftest*
18451
18452 fi
18453
18454 if test $ac_cv_header_stdc = yes; then
18455   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
18456   cat >"conftest.$ac_ext" <<_ACEOF
18457 #line 18457 "configure"
18458 #include "confdefs.h"
18459 #include <stdlib.h>
18460
18461 _ACEOF
18462 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18463   $EGREP "free" >/dev/null 2>&1; then
18464   :
18465 else
18466   ac_cv_header_stdc=no
18467 fi
18468 rm -rf conftest*
18469
18470 fi
18471
18472 if test $ac_cv_header_stdc = yes; then
18473   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
18474   if test "$cross_compiling" = yes; then
18475   :
18476 else
18477   cat >"conftest.$ac_ext" <<_ACEOF
18478 #line 18478 "configure"
18479 #include "confdefs.h"
18480 #include <ctype.h>
18481 #if ((' ' & 0x0FF) == 0x020)
18482 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
18483 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
18484 #else
18485 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
18486                      || ('j' <= (c) && (c) <= 'r') \
18487                      || ('s' <= (c) && (c) <= 'z'))
18488 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
18489 #endif
18490
18491 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
18492 int
18493 main (void)
18494 {
18495   int i;
18496   for (i = 0; i < 256; i++)
18497     if (XOR (islower (i), ISLOWER (i))
18498         || toupper (i) != TOUPPER (i))
18499       $ac_main_return(2);
18500   $ac_main_return (0);
18501 }
18502 _ACEOF
18503 rm -f "conftest$ac_exeext"
18504 if { (eval echo "$as_me:18504: \"$ac_link\"") >&5
18505   (eval $ac_link) 2>&5
18506   ac_status=$?
18507   echo "$as_me:18507: \$? = $ac_status" >&5
18508   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
18509   { (eval echo "$as_me:18509: \"$ac_try\"") >&5
18510   (eval $ac_try) 2>&5
18511   ac_status=$?
18512   echo "$as_me:18512: \$? = $ac_status" >&5
18513   (exit "$ac_status"); }; }; then
18514   :
18515 else
18516   echo "$as_me: program exited with status $ac_status" >&5
18517 echo "$as_me: failed program was:" >&5
18518 cat "conftest.$ac_ext" >&5
18519 ac_cv_header_stdc=no
18520 fi
18521 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
18522 fi
18523 fi
18524 fi
18525 echo "$as_me:18525: result: $ac_cv_header_stdc" >&5
18526 echo "${ECHO_T}$ac_cv_header_stdc" >&6
18527 if test $ac_cv_header_stdc = yes; then
18528
18529 cat >>confdefs.h <<\EOF
18530 #define STDC_HEADERS 1
18531 EOF
18532
18533 fi
18534
18535 ac_header_dirent=no
18536 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
18537   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
18538 echo "$as_me:18538: checking for $ac_hdr that defines DIR" >&5
18539 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
18540 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18541   echo $ECHO_N "(cached) $ECHO_C" >&6
18542 else
18543   cat >"conftest.$ac_ext" <<_ACEOF
18544 #line 18544 "configure"
18545 #include "confdefs.h"
18546 #include <sys/types.h>
18547 #include <$ac_hdr>
18548
18549 int
18550 main (void)
18551 {
18552 if ((DIR *) 0)
18553 return 0;
18554   ;
18555   return 0;
18556 }
18557 _ACEOF
18558 rm -f "conftest.$ac_objext"
18559 if { (eval echo "$as_me:18559: \"$ac_compile\"") >&5
18560   (eval $ac_compile) 2>&5
18561   ac_status=$?
18562   echo "$as_me:18562: \$? = $ac_status" >&5
18563   (exit "$ac_status"); } &&
18564          { ac_try='test -s "conftest.$ac_objext"'
18565   { (eval echo "$as_me:18565: \"$ac_try\"") >&5
18566   (eval $ac_try) 2>&5
18567   ac_status=$?
18568   echo "$as_me:18568: \$? = $ac_status" >&5
18569   (exit "$ac_status"); }; }; then
18570   eval "$as_ac_Header=yes"
18571 else
18572   echo "$as_me: failed program was:" >&5
18573 cat "conftest.$ac_ext" >&5
18574 eval "$as_ac_Header=no"
18575 fi
18576 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18577 fi
18578 echo "$as_me:18578: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18579 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18580 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18581   cat >>confdefs.h <<EOF
18582 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
18583 EOF
18584
18585 ac_header_dirent=$ac_hdr; break
18586 fi
18587
18588 done
18589 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
18590 if test $ac_header_dirent = dirent.h; then
18591   echo "$as_me:18591: checking for opendir in -ldir" >&5
18592 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
18593 if test "${ac_cv_lib_dir_opendir+set}" = set; then
18594   echo $ECHO_N "(cached) $ECHO_C" >&6
18595 else
18596   ac_check_lib_save_LIBS=$LIBS
18597 LIBS="-ldir  $LIBS"
18598 cat >"conftest.$ac_ext" <<_ACEOF
18599 #line 18599 "configure"
18600 #include "confdefs.h"
18601
18602 /* Override any gcc2 internal prototype to avoid an error.  */
18603 #ifdef __cplusplus
18604 extern "C"
18605 #endif
18606 /* We use char because int might match the return type of a gcc2
18607    builtin and then its argument prototype would still apply.  */
18608 char opendir ();
18609 int
18610 main (void)
18611 {
18612 opendir ();
18613   ;
18614   return 0;
18615 }
18616 _ACEOF
18617 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18618 if { (eval echo "$as_me:18618: \"$ac_link\"") >&5
18619   (eval $ac_link) 2>&5
18620   ac_status=$?
18621   echo "$as_me:18621: \$? = $ac_status" >&5
18622   (exit "$ac_status"); } &&
18623          { ac_try='test -s "conftest$ac_exeext"'
18624   { (eval echo "$as_me:18624: \"$ac_try\"") >&5
18625   (eval $ac_try) 2>&5
18626   ac_status=$?
18627   echo "$as_me:18627: \$? = $ac_status" >&5
18628   (exit "$ac_status"); }; }; then
18629   ac_cv_lib_dir_opendir=yes
18630 else
18631   echo "$as_me: failed program was:" >&5
18632 cat "conftest.$ac_ext" >&5
18633 ac_cv_lib_dir_opendir=no
18634 fi
18635 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18636 LIBS=$ac_check_lib_save_LIBS
18637 fi
18638 echo "$as_me:18638: result: $ac_cv_lib_dir_opendir" >&5
18639 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
18640 if test "$ac_cv_lib_dir_opendir" = yes; then
18641   LIBS="$LIBS -ldir"
18642 fi
18643
18644 else
18645   echo "$as_me:18645: checking for opendir in -lx" >&5
18646 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
18647 if test "${ac_cv_lib_x_opendir+set}" = set; then
18648   echo $ECHO_N "(cached) $ECHO_C" >&6
18649 else
18650   ac_check_lib_save_LIBS=$LIBS
18651 LIBS="-lx  $LIBS"
18652 cat >"conftest.$ac_ext" <<_ACEOF
18653 #line 18653 "configure"
18654 #include "confdefs.h"
18655
18656 /* Override any gcc2 internal prototype to avoid an error.  */
18657 #ifdef __cplusplus
18658 extern "C"
18659 #endif
18660 /* We use char because int might match the return type of a gcc2
18661    builtin and then its argument prototype would still apply.  */
18662 char opendir ();
18663 int
18664 main (void)
18665 {
18666 opendir ();
18667   ;
18668   return 0;
18669 }
18670 _ACEOF
18671 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18672 if { (eval echo "$as_me:18672: \"$ac_link\"") >&5
18673   (eval $ac_link) 2>&5
18674   ac_status=$?
18675   echo "$as_me:18675: \$? = $ac_status" >&5
18676   (exit "$ac_status"); } &&
18677          { ac_try='test -s "conftest$ac_exeext"'
18678   { (eval echo "$as_me:18678: \"$ac_try\"") >&5
18679   (eval $ac_try) 2>&5
18680   ac_status=$?
18681   echo "$as_me:18681: \$? = $ac_status" >&5
18682   (exit "$ac_status"); }; }; then
18683   ac_cv_lib_x_opendir=yes
18684 else
18685   echo "$as_me: failed program was:" >&5
18686 cat "conftest.$ac_ext" >&5
18687 ac_cv_lib_x_opendir=no
18688 fi
18689 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18690 LIBS=$ac_check_lib_save_LIBS
18691 fi
18692 echo "$as_me:18692: result: $ac_cv_lib_x_opendir" >&5
18693 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
18694 if test "$ac_cv_lib_x_opendir" = yes; then
18695   LIBS="$LIBS -lx"
18696 fi
18697
18698 fi
18699
18700 echo "$as_me:18700: checking whether time.h and sys/time.h may both be included" >&5
18701 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
18702 if test "${ac_cv_header_time+set}" = set; then
18703   echo $ECHO_N "(cached) $ECHO_C" >&6
18704 else
18705   cat >"conftest.$ac_ext" <<_ACEOF
18706 #line 18706 "configure"
18707 #include "confdefs.h"
18708 #include <sys/types.h>
18709 #include <sys/time.h>
18710 #include <time.h>
18711
18712 int
18713 main (void)
18714 {
18715 if ((struct tm *) 0)
18716 return 0;
18717   ;
18718   return 0;
18719 }
18720 _ACEOF
18721 rm -f "conftest.$ac_objext"
18722 if { (eval echo "$as_me:18722: \"$ac_compile\"") >&5
18723   (eval $ac_compile) 2>&5
18724   ac_status=$?
18725   echo "$as_me:18725: \$? = $ac_status" >&5
18726   (exit "$ac_status"); } &&
18727          { ac_try='test -s "conftest.$ac_objext"'
18728   { (eval echo "$as_me:18728: \"$ac_try\"") >&5
18729   (eval $ac_try) 2>&5
18730   ac_status=$?
18731   echo "$as_me:18731: \$? = $ac_status" >&5
18732   (exit "$ac_status"); }; }; then
18733   ac_cv_header_time=yes
18734 else
18735   echo "$as_me: failed program was:" >&5
18736 cat "conftest.$ac_ext" >&5
18737 ac_cv_header_time=no
18738 fi
18739 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18740 fi
18741 echo "$as_me:18741: result: $ac_cv_header_time" >&5
18742 echo "${ECHO_T}$ac_cv_header_time" >&6
18743 if test $ac_cv_header_time = yes; then
18744
18745 cat >>confdefs.h <<\EOF
18746 #define TIME_WITH_SYS_TIME 1
18747 EOF
18748
18749 fi
18750
18751 cf_regex_func=no
18752 cf_regex_libs=
18753 case "$host_os" in
18754 (mingw*)
18755         # -lsystre -ltre -lintl -liconv
18756         echo "$as_me:18756: checking for regcomp in -lsystre" >&5
18757 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
18758 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
18759   echo $ECHO_N "(cached) $ECHO_C" >&6
18760 else
18761   ac_check_lib_save_LIBS=$LIBS
18762 LIBS="-lsystre  $LIBS"
18763 cat >"conftest.$ac_ext" <<_ACEOF
18764 #line 18764 "configure"
18765 #include "confdefs.h"
18766
18767 /* Override any gcc2 internal prototype to avoid an error.  */
18768 #ifdef __cplusplus
18769 extern "C"
18770 #endif
18771 /* We use char because int might match the return type of a gcc2
18772    builtin and then its argument prototype would still apply.  */
18773 char regcomp ();
18774 int
18775 main (void)
18776 {
18777 regcomp ();
18778   ;
18779   return 0;
18780 }
18781 _ACEOF
18782 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18783 if { (eval echo "$as_me:18783: \"$ac_link\"") >&5
18784   (eval $ac_link) 2>&5
18785   ac_status=$?
18786   echo "$as_me:18786: \$? = $ac_status" >&5
18787   (exit "$ac_status"); } &&
18788          { ac_try='test -s "conftest$ac_exeext"'
18789   { (eval echo "$as_me:18789: \"$ac_try\"") >&5
18790   (eval $ac_try) 2>&5
18791   ac_status=$?
18792   echo "$as_me:18792: \$? = $ac_status" >&5
18793   (exit "$ac_status"); }; }; then
18794   ac_cv_lib_systre_regcomp=yes
18795 else
18796   echo "$as_me: failed program was:" >&5
18797 cat "conftest.$ac_ext" >&5
18798 ac_cv_lib_systre_regcomp=no
18799 fi
18800 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18801 LIBS=$ac_check_lib_save_LIBS
18802 fi
18803 echo "$as_me:18803: result: $ac_cv_lib_systre_regcomp" >&5
18804 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
18805 if test "$ac_cv_lib_systre_regcomp" = yes; then
18806
18807                 echo "$as_me:18807: checking for libiconv_open in -liconv" >&5
18808 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
18809 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
18810   echo $ECHO_N "(cached) $ECHO_C" >&6
18811 else
18812   ac_check_lib_save_LIBS=$LIBS
18813 LIBS="-liconv  $LIBS"
18814 cat >"conftest.$ac_ext" <<_ACEOF
18815 #line 18815 "configure"
18816 #include "confdefs.h"
18817
18818 /* Override any gcc2 internal prototype to avoid an error.  */
18819 #ifdef __cplusplus
18820 extern "C"
18821 #endif
18822 /* We use char because int might match the return type of a gcc2
18823    builtin and then its argument prototype would still apply.  */
18824 char libiconv_open ();
18825 int
18826 main (void)
18827 {
18828 libiconv_open ();
18829   ;
18830   return 0;
18831 }
18832 _ACEOF
18833 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18834 if { (eval echo "$as_me:18834: \"$ac_link\"") >&5
18835   (eval $ac_link) 2>&5
18836   ac_status=$?
18837   echo "$as_me:18837: \$? = $ac_status" >&5
18838   (exit "$ac_status"); } &&
18839          { ac_try='test -s "conftest$ac_exeext"'
18840   { (eval echo "$as_me:18840: \"$ac_try\"") >&5
18841   (eval $ac_try) 2>&5
18842   ac_status=$?
18843   echo "$as_me:18843: \$? = $ac_status" >&5
18844   (exit "$ac_status"); }; }; then
18845   ac_cv_lib_iconv_libiconv_open=yes
18846 else
18847   echo "$as_me: failed program was:" >&5
18848 cat "conftest.$ac_ext" >&5
18849 ac_cv_lib_iconv_libiconv_open=no
18850 fi
18851 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18852 LIBS=$ac_check_lib_save_LIBS
18853 fi
18854 echo "$as_me:18854: result: $ac_cv_lib_iconv_libiconv_open" >&5
18855 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
18856 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
18857
18858 cf_add_libs="$LIBS"
18859 # reverse order
18860 cf_add_0lib=
18861 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18862 # filter duplicates
18863 for cf_add_1lib in $cf_add_0lib; do
18864         for cf_add_2lib in $cf_add_libs; do
18865                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18866                         cf_add_1lib=
18867                         break
18868                 fi
18869         done
18870         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18871 done
18872 LIBS="$cf_add_libs"
18873
18874 fi
18875
18876                 echo "$as_me:18876: checking for libintl_gettext in -lintl" >&5
18877 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
18878 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
18879   echo $ECHO_N "(cached) $ECHO_C" >&6
18880 else
18881   ac_check_lib_save_LIBS=$LIBS
18882 LIBS="-lintl  $LIBS"
18883 cat >"conftest.$ac_ext" <<_ACEOF
18884 #line 18884 "configure"
18885 #include "confdefs.h"
18886
18887 /* Override any gcc2 internal prototype to avoid an error.  */
18888 #ifdef __cplusplus
18889 extern "C"
18890 #endif
18891 /* We use char because int might match the return type of a gcc2
18892    builtin and then its argument prototype would still apply.  */
18893 char libintl_gettext ();
18894 int
18895 main (void)
18896 {
18897 libintl_gettext ();
18898   ;
18899   return 0;
18900 }
18901 _ACEOF
18902 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18903 if { (eval echo "$as_me:18903: \"$ac_link\"") >&5
18904   (eval $ac_link) 2>&5
18905   ac_status=$?
18906   echo "$as_me:18906: \$? = $ac_status" >&5
18907   (exit "$ac_status"); } &&
18908          { ac_try='test -s "conftest$ac_exeext"'
18909   { (eval echo "$as_me:18909: \"$ac_try\"") >&5
18910   (eval $ac_try) 2>&5
18911   ac_status=$?
18912   echo "$as_me:18912: \$? = $ac_status" >&5
18913   (exit "$ac_status"); }; }; then
18914   ac_cv_lib_intl_libintl_gettext=yes
18915 else
18916   echo "$as_me: failed program was:" >&5
18917 cat "conftest.$ac_ext" >&5
18918 ac_cv_lib_intl_libintl_gettext=no
18919 fi
18920 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18921 LIBS=$ac_check_lib_save_LIBS
18922 fi
18923 echo "$as_me:18923: result: $ac_cv_lib_intl_libintl_gettext" >&5
18924 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
18925 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
18926
18927 cf_add_libs="$LIBS"
18928 # reverse order
18929 cf_add_0lib=
18930 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18931 # filter duplicates
18932 for cf_add_1lib in $cf_add_0lib; do
18933         for cf_add_2lib in $cf_add_libs; do
18934                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18935                         cf_add_1lib=
18936                         break
18937                 fi
18938         done
18939         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18940 done
18941 LIBS="$cf_add_libs"
18942
18943 fi
18944
18945                 echo "$as_me:18945: checking for tre_regcomp in -ltre" >&5
18946 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
18947 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
18948   echo $ECHO_N "(cached) $ECHO_C" >&6
18949 else
18950   ac_check_lib_save_LIBS=$LIBS
18951 LIBS="-ltre  $LIBS"
18952 cat >"conftest.$ac_ext" <<_ACEOF
18953 #line 18953 "configure"
18954 #include "confdefs.h"
18955
18956 /* Override any gcc2 internal prototype to avoid an error.  */
18957 #ifdef __cplusplus
18958 extern "C"
18959 #endif
18960 /* We use char because int might match the return type of a gcc2
18961    builtin and then its argument prototype would still apply.  */
18962 char tre_regcomp ();
18963 int
18964 main (void)
18965 {
18966 tre_regcomp ();
18967   ;
18968   return 0;
18969 }
18970 _ACEOF
18971 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18972 if { (eval echo "$as_me:18972: \"$ac_link\"") >&5
18973   (eval $ac_link) 2>&5
18974   ac_status=$?
18975   echo "$as_me:18975: \$? = $ac_status" >&5
18976   (exit "$ac_status"); } &&
18977          { ac_try='test -s "conftest$ac_exeext"'
18978   { (eval echo "$as_me:18978: \"$ac_try\"") >&5
18979   (eval $ac_try) 2>&5
18980   ac_status=$?
18981   echo "$as_me:18981: \$? = $ac_status" >&5
18982   (exit "$ac_status"); }; }; then
18983   ac_cv_lib_tre_tre_regcomp=yes
18984 else
18985   echo "$as_me: failed program was:" >&5
18986 cat "conftest.$ac_ext" >&5
18987 ac_cv_lib_tre_tre_regcomp=no
18988 fi
18989 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18990 LIBS=$ac_check_lib_save_LIBS
18991 fi
18992 echo "$as_me:18992: result: $ac_cv_lib_tre_tre_regcomp" >&5
18993 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
18994 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
18995
18996 cf_add_libs="$LIBS"
18997 # reverse order
18998 cf_add_0lib=
18999 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19000 # filter duplicates
19001 for cf_add_1lib in $cf_add_0lib; do
19002         for cf_add_2lib in $cf_add_libs; do
19003                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19004                         cf_add_1lib=
19005                         break
19006                 fi
19007         done
19008         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19009 done
19010 LIBS="$cf_add_libs"
19011
19012 fi
19013
19014 cf_add_libs="$LIBS"
19015 # reverse order
19016 cf_add_0lib=
19017 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19018 # filter duplicates
19019 for cf_add_1lib in $cf_add_0lib; do
19020         for cf_add_2lib in $cf_add_libs; do
19021                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19022                         cf_add_1lib=
19023                         break
19024                 fi
19025         done
19026         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19027 done
19028 LIBS="$cf_add_libs"
19029
19030                 cf_regex_func=regcomp
19031
19032 else
19033
19034                 echo "$as_me:19034: checking for regcomp in -lgnurx" >&5
19035 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19036 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19037   echo $ECHO_N "(cached) $ECHO_C" >&6
19038 else
19039   ac_check_lib_save_LIBS=$LIBS
19040 LIBS="-lgnurx  $LIBS"
19041 cat >"conftest.$ac_ext" <<_ACEOF
19042 #line 19042 "configure"
19043 #include "confdefs.h"
19044
19045 /* Override any gcc2 internal prototype to avoid an error.  */
19046 #ifdef __cplusplus
19047 extern "C"
19048 #endif
19049 /* We use char because int might match the return type of a gcc2
19050    builtin and then its argument prototype would still apply.  */
19051 char regcomp ();
19052 int
19053 main (void)
19054 {
19055 regcomp ();
19056   ;
19057   return 0;
19058 }
19059 _ACEOF
19060 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19061 if { (eval echo "$as_me:19061: \"$ac_link\"") >&5
19062   (eval $ac_link) 2>&5
19063   ac_status=$?
19064   echo "$as_me:19064: \$? = $ac_status" >&5
19065   (exit "$ac_status"); } &&
19066          { ac_try='test -s "conftest$ac_exeext"'
19067   { (eval echo "$as_me:19067: \"$ac_try\"") >&5
19068   (eval $ac_try) 2>&5
19069   ac_status=$?
19070   echo "$as_me:19070: \$? = $ac_status" >&5
19071   (exit "$ac_status"); }; }; then
19072   ac_cv_lib_gnurx_regcomp=yes
19073 else
19074   echo "$as_me: failed program was:" >&5
19075 cat "conftest.$ac_ext" >&5
19076 ac_cv_lib_gnurx_regcomp=no
19077 fi
19078 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19079 LIBS=$ac_check_lib_save_LIBS
19080 fi
19081 echo "$as_me:19081: result: $ac_cv_lib_gnurx_regcomp" >&5
19082 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19083 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19084
19085 cf_add_libs="$LIBS"
19086 # reverse order
19087 cf_add_0lib=
19088 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19089 # filter duplicates
19090 for cf_add_1lib in $cf_add_0lib; do
19091         for cf_add_2lib in $cf_add_libs; do
19092                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19093                         cf_add_1lib=
19094                         break
19095                 fi
19096         done
19097         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19098 done
19099 LIBS="$cf_add_libs"
19100
19101                         cf_regex_func=regcomp
19102 fi
19103
19104 fi
19105
19106         ;;
19107 (*)
19108         cf_regex_libs="regex re"
19109         echo "$as_me:19109: checking for regcomp" >&5
19110 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19111 if test "${ac_cv_func_regcomp+set}" = set; then
19112   echo $ECHO_N "(cached) $ECHO_C" >&6
19113 else
19114   cat >"conftest.$ac_ext" <<_ACEOF
19115 #line 19115 "configure"
19116 #include "confdefs.h"
19117 #define regcomp autoconf_temporary
19118 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19119 #undef regcomp
19120
19121 #ifdef __cplusplus
19122 extern "C"
19123 #endif
19124
19125 /* We use char because int might match the return type of a gcc2
19126    builtin and then its argument prototype would still apply.  */
19127 char regcomp (void);
19128
19129 int
19130 main (void)
19131 {
19132
19133 /* The GNU C library defines stubs for functions which it implements
19134     to always fail with ENOSYS.  Some functions are actually named
19135     something starting with __ and the normal name is an alias.  */
19136 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19137 #error found stub for regcomp
19138 #endif
19139
19140         return regcomp ();
19141   ;
19142   return 0;
19143 }
19144 _ACEOF
19145 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19146 if { (eval echo "$as_me:19146: \"$ac_link\"") >&5
19147   (eval $ac_link) 2>&5
19148   ac_status=$?
19149   echo "$as_me:19149: \$? = $ac_status" >&5
19150   (exit "$ac_status"); } &&
19151          { ac_try='test -s "conftest$ac_exeext"'
19152   { (eval echo "$as_me:19152: \"$ac_try\"") >&5
19153   (eval $ac_try) 2>&5
19154   ac_status=$?
19155   echo "$as_me:19155: \$? = $ac_status" >&5
19156   (exit "$ac_status"); }; }; then
19157   ac_cv_func_regcomp=yes
19158 else
19159   echo "$as_me: failed program was:" >&5
19160 cat "conftest.$ac_ext" >&5
19161 ac_cv_func_regcomp=no
19162 fi
19163 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19164 fi
19165 echo "$as_me:19165: result: $ac_cv_func_regcomp" >&5
19166 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19167 if test "$ac_cv_func_regcomp" = yes; then
19168   cf_regex_func=regcomp
19169 else
19170
19171                 for cf_regex_lib in $cf_regex_libs
19172                 do
19173                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19174 echo "$as_me:19174: checking for regcomp in -l$cf_regex_lib" >&5
19175 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19176 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19177   echo $ECHO_N "(cached) $ECHO_C" >&6
19178 else
19179   ac_check_lib_save_LIBS=$LIBS
19180 LIBS="-l$cf_regex_lib  $LIBS"
19181 cat >"conftest.$ac_ext" <<_ACEOF
19182 #line 19182 "configure"
19183 #include "confdefs.h"
19184
19185 /* Override any gcc2 internal prototype to avoid an error.  */
19186 #ifdef __cplusplus
19187 extern "C"
19188 #endif
19189 /* We use char because int might match the return type of a gcc2
19190    builtin and then its argument prototype would still apply.  */
19191 char regcomp ();
19192 int
19193 main (void)
19194 {
19195 regcomp ();
19196   ;
19197   return 0;
19198 }
19199 _ACEOF
19200 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19201 if { (eval echo "$as_me:19201: \"$ac_link\"") >&5
19202   (eval $ac_link) 2>&5
19203   ac_status=$?
19204   echo "$as_me:19204: \$? = $ac_status" >&5
19205   (exit "$ac_status"); } &&
19206          { ac_try='test -s "conftest$ac_exeext"'
19207   { (eval echo "$as_me:19207: \"$ac_try\"") >&5
19208   (eval $ac_try) 2>&5
19209   ac_status=$?
19210   echo "$as_me:19210: \$? = $ac_status" >&5
19211   (exit "$ac_status"); }; }; then
19212   eval "$as_ac_Lib=yes"
19213 else
19214   echo "$as_me: failed program was:" >&5
19215 cat "conftest.$ac_ext" >&5
19216 eval "$as_ac_Lib=no"
19217 fi
19218 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19219 LIBS=$ac_check_lib_save_LIBS
19220 fi
19221 echo "$as_me:19221: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19222 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19223 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19224
19225 cf_add_libs="$LIBS"
19226 # reverse order
19227 cf_add_0lib=
19228 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19229 # filter duplicates
19230 for cf_add_1lib in $cf_add_0lib; do
19231         for cf_add_2lib in $cf_add_libs; do
19232                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19233                         cf_add_1lib=
19234                         break
19235                 fi
19236         done
19237         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19238 done
19239 LIBS="$cf_add_libs"
19240
19241                                         cf_regex_func=regcomp
19242                                         break
19243 fi
19244
19245                 done
19246
19247 fi
19248
19249         ;;
19250 esac
19251
19252 if test "$cf_regex_func" = no ; then
19253         echo "$as_me:19253: checking for compile" >&5
19254 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19255 if test "${ac_cv_func_compile+set}" = set; then
19256   echo $ECHO_N "(cached) $ECHO_C" >&6
19257 else
19258   cat >"conftest.$ac_ext" <<_ACEOF
19259 #line 19259 "configure"
19260 #include "confdefs.h"
19261 #define compile autoconf_temporary
19262 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19263 #undef compile
19264
19265 #ifdef __cplusplus
19266 extern "C"
19267 #endif
19268
19269 /* We use char because int might match the return type of a gcc2
19270    builtin and then its argument prototype would still apply.  */
19271 char compile (void);
19272
19273 int
19274 main (void)
19275 {
19276
19277 /* The GNU C library defines stubs for functions which it implements
19278     to always fail with ENOSYS.  Some functions are actually named
19279     something starting with __ and the normal name is an alias.  */
19280 #if defined (__stub_compile) || defined (__stub___compile)
19281 #error found stub for compile
19282 #endif
19283
19284         return compile ();
19285   ;
19286   return 0;
19287 }
19288 _ACEOF
19289 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19290 if { (eval echo "$as_me:19290: \"$ac_link\"") >&5
19291   (eval $ac_link) 2>&5
19292   ac_status=$?
19293   echo "$as_me:19293: \$? = $ac_status" >&5
19294   (exit "$ac_status"); } &&
19295          { ac_try='test -s "conftest$ac_exeext"'
19296   { (eval echo "$as_me:19296: \"$ac_try\"") >&5
19297   (eval $ac_try) 2>&5
19298   ac_status=$?
19299   echo "$as_me:19299: \$? = $ac_status" >&5
19300   (exit "$ac_status"); }; }; then
19301   ac_cv_func_compile=yes
19302 else
19303   echo "$as_me: failed program was:" >&5
19304 cat "conftest.$ac_ext" >&5
19305 ac_cv_func_compile=no
19306 fi
19307 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19308 fi
19309 echo "$as_me:19309: result: $ac_cv_func_compile" >&5
19310 echo "${ECHO_T}$ac_cv_func_compile" >&6
19311 if test "$ac_cv_func_compile" = yes; then
19312   cf_regex_func=compile
19313 else
19314
19315                 echo "$as_me:19315: checking for compile in -lgen" >&5
19316 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19317 if test "${ac_cv_lib_gen_compile+set}" = set; then
19318   echo $ECHO_N "(cached) $ECHO_C" >&6
19319 else
19320   ac_check_lib_save_LIBS=$LIBS
19321 LIBS="-lgen  $LIBS"
19322 cat >"conftest.$ac_ext" <<_ACEOF
19323 #line 19323 "configure"
19324 #include "confdefs.h"
19325
19326 /* Override any gcc2 internal prototype to avoid an error.  */
19327 #ifdef __cplusplus
19328 extern "C"
19329 #endif
19330 /* We use char because int might match the return type of a gcc2
19331    builtin and then its argument prototype would still apply.  */
19332 char compile ();
19333 int
19334 main (void)
19335 {
19336 compile ();
19337   ;
19338   return 0;
19339 }
19340 _ACEOF
19341 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19342 if { (eval echo "$as_me:19342: \"$ac_link\"") >&5
19343   (eval $ac_link) 2>&5
19344   ac_status=$?
19345   echo "$as_me:19345: \$? = $ac_status" >&5
19346   (exit "$ac_status"); } &&
19347          { ac_try='test -s "conftest$ac_exeext"'
19348   { (eval echo "$as_me:19348: \"$ac_try\"") >&5
19349   (eval $ac_try) 2>&5
19350   ac_status=$?
19351   echo "$as_me:19351: \$? = $ac_status" >&5
19352   (exit "$ac_status"); }; }; then
19353   ac_cv_lib_gen_compile=yes
19354 else
19355   echo "$as_me: failed program was:" >&5
19356 cat "conftest.$ac_ext" >&5
19357 ac_cv_lib_gen_compile=no
19358 fi
19359 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19360 LIBS=$ac_check_lib_save_LIBS
19361 fi
19362 echo "$as_me:19362: result: $ac_cv_lib_gen_compile" >&5
19363 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
19364 if test "$ac_cv_lib_gen_compile" = yes; then
19365
19366 cf_add_libs="$LIBS"
19367 # reverse order
19368 cf_add_0lib=
19369 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19370 # filter duplicates
19371 for cf_add_1lib in $cf_add_0lib; do
19372         for cf_add_2lib in $cf_add_libs; do
19373                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19374                         cf_add_1lib=
19375                         break
19376                 fi
19377         done
19378         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19379 done
19380 LIBS="$cf_add_libs"
19381
19382                                 cf_regex_func=compile
19383 fi
19384
19385 fi
19386
19387 fi
19388
19389 if test "$cf_regex_func" = no ; then
19390         { echo "$as_me:19390: WARNING: cannot find regular expression library" >&5
19391 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
19392 fi
19393
19394 echo "$as_me:19394: checking for regular-expression headers" >&5
19395 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
19396 if test "${cf_cv_regex_hdrs+set}" = set; then
19397   echo $ECHO_N "(cached) $ECHO_C" >&6
19398 else
19399
19400 cf_cv_regex_hdrs=no
19401 case "$cf_regex_func" in
19402 (compile)
19403         for cf_regex_hdr in regexp.h regexpr.h
19404         do
19405                 cat >"conftest.$ac_ext" <<_ACEOF
19406 #line 19406 "configure"
19407 #include "confdefs.h"
19408 #include <$cf_regex_hdr>
19409 int
19410 main (void)
19411 {
19412
19413                         char *p = compile("", "", "", 0);
19414                         int x = step("", "");
19415                         (void)p;
19416                         (void)x;
19417
19418   ;
19419   return 0;
19420 }
19421 _ACEOF
19422 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19423 if { (eval echo "$as_me:19423: \"$ac_link\"") >&5
19424   (eval $ac_link) 2>&5
19425   ac_status=$?
19426   echo "$as_me:19426: \$? = $ac_status" >&5
19427   (exit "$ac_status"); } &&
19428          { ac_try='test -s "conftest$ac_exeext"'
19429   { (eval echo "$as_me:19429: \"$ac_try\"") >&5
19430   (eval $ac_try) 2>&5
19431   ac_status=$?
19432   echo "$as_me:19432: \$? = $ac_status" >&5
19433   (exit "$ac_status"); }; }; then
19434
19435                         cf_cv_regex_hdrs=$cf_regex_hdr
19436                         break
19437
19438 else
19439   echo "$as_me: failed program was:" >&5
19440 cat "conftest.$ac_ext" >&5
19441 fi
19442 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19443         done
19444         ;;
19445 (*)
19446         for cf_regex_hdr in regex.h
19447         do
19448                 cat >"conftest.$ac_ext" <<_ACEOF
19449 #line 19449 "configure"
19450 #include "confdefs.h"
19451 #include <sys/types.h>
19452 #include <$cf_regex_hdr>
19453 int
19454 main (void)
19455 {
19456
19457                         regex_t *p = 0;
19458                         int x = regcomp(p, "", 0);
19459                         int y = regexec(p, "", 0, 0, 0);
19460                         (void)x;
19461                         (void)y;
19462                         regfree(p);
19463
19464   ;
19465   return 0;
19466 }
19467 _ACEOF
19468 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19469 if { (eval echo "$as_me:19469: \"$ac_link\"") >&5
19470   (eval $ac_link) 2>&5
19471   ac_status=$?
19472   echo "$as_me:19472: \$? = $ac_status" >&5
19473   (exit "$ac_status"); } &&
19474          { ac_try='test -s "conftest$ac_exeext"'
19475   { (eval echo "$as_me:19475: \"$ac_try\"") >&5
19476   (eval $ac_try) 2>&5
19477   ac_status=$?
19478   echo "$as_me:19478: \$? = $ac_status" >&5
19479   (exit "$ac_status"); }; }; then
19480
19481                         cf_cv_regex_hdrs=$cf_regex_hdr
19482                         break
19483
19484 else
19485   echo "$as_me: failed program was:" >&5
19486 cat "conftest.$ac_ext" >&5
19487 fi
19488 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19489         done
19490         ;;
19491 esac
19492
19493 fi
19494 echo "$as_me:19494: result: $cf_cv_regex_hdrs" >&5
19495 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
19496
19497 case "$cf_cv_regex_hdrs" in
19498         (no)            { echo "$as_me:19498: WARNING: no regular expression header found" >&5
19499 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
19500         (regex.h)
19501 cat >>confdefs.h <<\EOF
19502 #define HAVE_REGEX_H_FUNCS 1
19503 EOF
19504  ;;
19505         (regexp.h)
19506 cat >>confdefs.h <<\EOF
19507 #define HAVE_REGEXP_H_FUNCS 1
19508 EOF
19509  ;;
19510         (regexpr.h)
19511 cat >>confdefs.h <<\EOF
19512 #define HAVE_REGEXPR_H_FUNCS 1
19513 EOF
19514  ;;
19515 esac
19516
19517 for ac_header in \
19518 fcntl.h \
19519 getopt.h \
19520 limits.h \
19521 locale.h \
19522 math.h \
19523 poll.h \
19524 sys/ioctl.h \
19525 sys/param.h \
19526 sys/poll.h \
19527 sys/select.h \
19528 sys/time.h \
19529 sys/times.h \
19530 ttyent.h \
19531 unistd.h \
19532 wctype.h \
19533
19534 do
19535 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19536 echo "$as_me:19536: checking for $ac_header" >&5
19537 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19538 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19539   echo $ECHO_N "(cached) $ECHO_C" >&6
19540 else
19541   cat >"conftest.$ac_ext" <<_ACEOF
19542 #line 19542 "configure"
19543 #include "confdefs.h"
19544 #include <$ac_header>
19545 _ACEOF
19546 if { (eval echo "$as_me:19546: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19547   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19548   ac_status=$?
19549   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19550   rm -f conftest.er1
19551   cat conftest.err >&5
19552   echo "$as_me:19552: \$? = $ac_status" >&5
19553   (exit "$ac_status"); } >/dev/null; then
19554   if test -s conftest.err; then
19555     ac_cpp_err=$ac_c_preproc_warn_flag
19556   else
19557     ac_cpp_err=
19558   fi
19559 else
19560   ac_cpp_err=yes
19561 fi
19562 if test -z "$ac_cpp_err"; then
19563   eval "$as_ac_Header=yes"
19564 else
19565   echo "$as_me: failed program was:" >&5
19566   cat "conftest.$ac_ext" >&5
19567   eval "$as_ac_Header=no"
19568 fi
19569 rm -f conftest.err "conftest.$ac_ext"
19570 fi
19571 echo "$as_me:19571: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19572 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19573 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19574   cat >>confdefs.h <<EOF
19575 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19576 EOF
19577
19578 fi
19579 done
19580
19581 for ac_header in unistd.h getopt.h
19582 do
19583 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19584 echo "$as_me:19584: checking for $ac_header" >&5
19585 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19586 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19587   echo $ECHO_N "(cached) $ECHO_C" >&6
19588 else
19589   cat >"conftest.$ac_ext" <<_ACEOF
19590 #line 19590 "configure"
19591 #include "confdefs.h"
19592 #include <$ac_header>
19593 _ACEOF
19594 if { (eval echo "$as_me:19594: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19595   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19596   ac_status=$?
19597   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19598   rm -f conftest.er1
19599   cat conftest.err >&5
19600   echo "$as_me:19600: \$? = $ac_status" >&5
19601   (exit "$ac_status"); } >/dev/null; then
19602   if test -s conftest.err; then
19603     ac_cpp_err=$ac_c_preproc_warn_flag
19604   else
19605     ac_cpp_err=
19606   fi
19607 else
19608   ac_cpp_err=yes
19609 fi
19610 if test -z "$ac_cpp_err"; then
19611   eval "$as_ac_Header=yes"
19612 else
19613   echo "$as_me: failed program was:" >&5
19614   cat "conftest.$ac_ext" >&5
19615   eval "$as_ac_Header=no"
19616 fi
19617 rm -f conftest.err "conftest.$ac_ext"
19618 fi
19619 echo "$as_me:19619: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19620 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19621 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19622   cat >>confdefs.h <<EOF
19623 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19624 EOF
19625
19626 fi
19627 done
19628
19629 echo "$as_me:19629: checking for header declaring getopt variables" >&5
19630 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
19631 if test "${cf_cv_getopt_header+set}" = set; then
19632   echo $ECHO_N "(cached) $ECHO_C" >&6
19633 else
19634
19635 cf_cv_getopt_header=none
19636 for cf_header in stdio.h stdlib.h unistd.h getopt.h
19637 do
19638 cat >"conftest.$ac_ext" <<_ACEOF
19639 #line 19639 "configure"
19640 #include "confdefs.h"
19641
19642 #include <$cf_header>
19643 int
19644 main (void)
19645 {
19646 int x = optind; char *y = optarg
19647   ;
19648   return 0;
19649 }
19650 _ACEOF
19651 rm -f "conftest.$ac_objext"
19652 if { (eval echo "$as_me:19652: \"$ac_compile\"") >&5
19653   (eval $ac_compile) 2>&5
19654   ac_status=$?
19655   echo "$as_me:19655: \$? = $ac_status" >&5
19656   (exit "$ac_status"); } &&
19657          { ac_try='test -s "conftest.$ac_objext"'
19658   { (eval echo "$as_me:19658: \"$ac_try\"") >&5
19659   (eval $ac_try) 2>&5
19660   ac_status=$?
19661   echo "$as_me:19661: \$? = $ac_status" >&5
19662   (exit "$ac_status"); }; }; then
19663   cf_cv_getopt_header=$cf_header
19664  break
19665 else
19666   echo "$as_me: failed program was:" >&5
19667 cat "conftest.$ac_ext" >&5
19668 fi
19669 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19670 done
19671
19672 fi
19673 echo "$as_me:19673: result: $cf_cv_getopt_header" >&5
19674 echo "${ECHO_T}$cf_cv_getopt_header" >&6
19675 if test "$cf_cv_getopt_header" != none ; then
19676
19677 cat >>confdefs.h <<\EOF
19678 #define HAVE_GETOPT_HEADER 1
19679 EOF
19680
19681 fi
19682 if test "$cf_cv_getopt_header" = getopt.h ; then
19683
19684 cat >>confdefs.h <<\EOF
19685 #define NEED_GETOPT_H 1
19686 EOF
19687
19688 fi
19689
19690 echo "$as_me:19690: checking if external environ is declared" >&5
19691 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
19692 if test "${cf_cv_dcl_environ+set}" = set; then
19693   echo $ECHO_N "(cached) $ECHO_C" >&6
19694 else
19695
19696     cat >"conftest.$ac_ext" <<_ACEOF
19697 #line 19697 "configure"
19698 #include "confdefs.h"
19699
19700 #ifdef HAVE_STDLIB_H
19701 #include <stdlib.h>
19702 #endif
19703 #include <unistd.h>
19704 int
19705 main (void)
19706 {
19707 int x = (int) environ
19708   ;
19709   return 0;
19710 }
19711 _ACEOF
19712 rm -f "conftest.$ac_objext"
19713 if { (eval echo "$as_me:19713: \"$ac_compile\"") >&5
19714   (eval $ac_compile) 2>&5
19715   ac_status=$?
19716   echo "$as_me:19716: \$? = $ac_status" >&5
19717   (exit "$ac_status"); } &&
19718          { ac_try='test -s "conftest.$ac_objext"'
19719   { (eval echo "$as_me:19719: \"$ac_try\"") >&5
19720   (eval $ac_try) 2>&5
19721   ac_status=$?
19722   echo "$as_me:19722: \$? = $ac_status" >&5
19723   (exit "$ac_status"); }; }; then
19724   cf_cv_dcl_environ=yes
19725 else
19726   echo "$as_me: failed program was:" >&5
19727 cat "conftest.$ac_ext" >&5
19728 cf_cv_dcl_environ=no
19729 fi
19730 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19731
19732 fi
19733 echo "$as_me:19733: result: $cf_cv_dcl_environ" >&5
19734 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
19735
19736 if test "$cf_cv_dcl_environ" = no ; then
19737
19738 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19739
19740     cat >>confdefs.h <<EOF
19741 #define $cf_result 1
19742 EOF
19743
19744 fi
19745
19746 # It's possible (for near-UNIX clones) that the data doesn't exist
19747
19748 echo "$as_me:19748: checking if external environ exists" >&5
19749 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
19750 if test "${cf_cv_have_environ+set}" = set; then
19751   echo $ECHO_N "(cached) $ECHO_C" >&6
19752 else
19753
19754         cat >"conftest.$ac_ext" <<_ACEOF
19755 #line 19755 "configure"
19756 #include "confdefs.h"
19757
19758 #undef environ
19759 extern int environ;
19760
19761 int
19762 main (void)
19763 {
19764 environ = 2
19765   ;
19766   return 0;
19767 }
19768 _ACEOF
19769 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19770 if { (eval echo "$as_me:19770: \"$ac_link\"") >&5
19771   (eval $ac_link) 2>&5
19772   ac_status=$?
19773   echo "$as_me:19773: \$? = $ac_status" >&5
19774   (exit "$ac_status"); } &&
19775          { ac_try='test -s "conftest$ac_exeext"'
19776   { (eval echo "$as_me:19776: \"$ac_try\"") >&5
19777   (eval $ac_try) 2>&5
19778   ac_status=$?
19779   echo "$as_me:19779: \$? = $ac_status" >&5
19780   (exit "$ac_status"); }; }; then
19781   cf_cv_have_environ=yes
19782 else
19783   echo "$as_me: failed program was:" >&5
19784 cat "conftest.$ac_ext" >&5
19785 cf_cv_have_environ=no
19786 fi
19787 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19788
19789 fi
19790 echo "$as_me:19790: result: $cf_cv_have_environ" >&5
19791 echo "${ECHO_T}$cf_cv_have_environ" >&6
19792
19793 if test "$cf_cv_have_environ" = yes ; then
19794
19795 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19796
19797         cat >>confdefs.h <<EOF
19798 #define $cf_result 1
19799 EOF
19800
19801 fi
19802
19803 echo "$as_me:19803: checking for getenv" >&5
19804 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
19805 if test "${ac_cv_func_getenv+set}" = set; then
19806   echo $ECHO_N "(cached) $ECHO_C" >&6
19807 else
19808   cat >"conftest.$ac_ext" <<_ACEOF
19809 #line 19809 "configure"
19810 #include "confdefs.h"
19811 #define getenv autoconf_temporary
19812 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19813 #undef getenv
19814
19815 #ifdef __cplusplus
19816 extern "C"
19817 #endif
19818
19819 /* We use char because int might match the return type of a gcc2
19820    builtin and then its argument prototype would still apply.  */
19821 char getenv (void);
19822
19823 int
19824 main (void)
19825 {
19826
19827 /* The GNU C library defines stubs for functions which it implements
19828     to always fail with ENOSYS.  Some functions are actually named
19829     something starting with __ and the normal name is an alias.  */
19830 #if defined (__stub_getenv) || defined (__stub___getenv)
19831 #error found stub for getenv
19832 #endif
19833
19834         return getenv ();
19835   ;
19836   return 0;
19837 }
19838 _ACEOF
19839 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19840 if { (eval echo "$as_me:19840: \"$ac_link\"") >&5
19841   (eval $ac_link) 2>&5
19842   ac_status=$?
19843   echo "$as_me:19843: \$? = $ac_status" >&5
19844   (exit "$ac_status"); } &&
19845          { ac_try='test -s "conftest$ac_exeext"'
19846   { (eval echo "$as_me:19846: \"$ac_try\"") >&5
19847   (eval $ac_try) 2>&5
19848   ac_status=$?
19849   echo "$as_me:19849: \$? = $ac_status" >&5
19850   (exit "$ac_status"); }; }; then
19851   ac_cv_func_getenv=yes
19852 else
19853   echo "$as_me: failed program was:" >&5
19854 cat "conftest.$ac_ext" >&5
19855 ac_cv_func_getenv=no
19856 fi
19857 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19858 fi
19859 echo "$as_me:19859: result: $ac_cv_func_getenv" >&5
19860 echo "${ECHO_T}$ac_cv_func_getenv" >&6
19861
19862 for ac_func in putenv setenv strdup
19863 do
19864 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19865 echo "$as_me:19865: checking for $ac_func" >&5
19866 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19867 if eval "test \"\${$as_ac_var+set}\" = set"; then
19868   echo $ECHO_N "(cached) $ECHO_C" >&6
19869 else
19870   cat >"conftest.$ac_ext" <<_ACEOF
19871 #line 19871 "configure"
19872 #include "confdefs.h"
19873 #define $ac_func autoconf_temporary
19874 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19875 #undef $ac_func
19876
19877 #ifdef __cplusplus
19878 extern "C"
19879 #endif
19880
19881 /* We use char because int might match the return type of a gcc2
19882    builtin and then its argument prototype would still apply.  */
19883 char $ac_func (void);
19884
19885 int
19886 main (void)
19887 {
19888
19889 /* The GNU C library defines stubs for functions which it implements
19890     to always fail with ENOSYS.  Some functions are actually named
19891     something starting with __ and the normal name is an alias.  */
19892 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19893 #error found stub for $ac_func
19894 #endif
19895
19896         return $ac_func ();
19897   ;
19898   return 0;
19899 }
19900 _ACEOF
19901 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19902 if { (eval echo "$as_me:19902: \"$ac_link\"") >&5
19903   (eval $ac_link) 2>&5
19904   ac_status=$?
19905   echo "$as_me:19905: \$? = $ac_status" >&5
19906   (exit "$ac_status"); } &&
19907          { ac_try='test -s "conftest$ac_exeext"'
19908   { (eval echo "$as_me:19908: \"$ac_try\"") >&5
19909   (eval $ac_try) 2>&5
19910   ac_status=$?
19911   echo "$as_me:19911: \$? = $ac_status" >&5
19912   (exit "$ac_status"); }; }; then
19913   eval "$as_ac_var=yes"
19914 else
19915   echo "$as_me: failed program was:" >&5
19916 cat "conftest.$ac_ext" >&5
19917 eval "$as_ac_var=no"
19918 fi
19919 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19920 fi
19921 echo "$as_me:19921: result: `eval echo '${'"$as_ac_var"'}'`" >&5
19922 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
19923 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
19924   cat >>confdefs.h <<EOF
19925 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19926 EOF
19927
19928 fi
19929 done
19930
19931 echo "$as_me:19931: checking if getenv returns consistent values" >&5
19932 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
19933 if test "${cf_cv_consistent_getenv+set}" = set; then
19934   echo $ECHO_N "(cached) $ECHO_C" >&6
19935 else
19936
19937 if test "$cross_compiling" = yes; then
19938   cf_cv_consistent_getenv=unknown
19939 else
19940   cat >"conftest.$ac_ext" <<_ACEOF
19941 #line 19941 "configure"
19942 #include "confdefs.h"
19943
19944 #include <stdlib.h>
19945 #include <unistd.h>
19946 #include <stdio.h>
19947 #include <string.h>
19948 #include <sys/types.h>
19949
19950 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
19951 extern char **environ;  /* POSIX, but some systems are not... */
19952 #endif
19953
19954 #if defined(HAVE_STRDUP)
19955 #define str_alloc(s) strdup(s)
19956 #else
19957 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
19958 #endif
19959
19960 static void set_value(const char *name, const char *value)
19961 {
19962 #if defined(HAVE_SETENV)
19963         setenv(name, value, 1);
19964 #elif defined(HAVE_PUTENV)
19965         char buffer[1024];
19966         sprintf(buffer, "%s=%s", name, value);
19967         putenv(str_alloc(buffer));
19968 #else
19969 #error neither putenv/setenv found
19970 #endif
19971 }
19972 int main(void)
19973 {
19974         int pass;
19975         size_t numenv, limit, j;
19976         char **mynames;
19977         char **myvalues;
19978         char **mypointer;
19979         char *equals;
19980         for (numenv = 0; environ[numenv]; ++numenv) ;
19981         limit = numenv + 10;
19982         mynames = (char **) calloc(limit + 1, sizeof(char *));
19983         myvalues = (char **) calloc(limit + 1, sizeof(char *));
19984         mypointer = (char **) calloc(limit + 1, sizeof(char *));
19985 #if defined(HAVE_ENVIRON)
19986         for (j = 0; environ[j]; ++j) {
19987                 mynames[j] = str_alloc(environ[j]);
19988                 equals = strchr(mynames[j], '=');
19989                 if (equals != 0) {
19990                         *equals++ = '\\0';
19991                         myvalues[j] = str_alloc(equals);
19992                 } else {
19993                         myvalues[j] = str_alloc("");
19994                 }
19995         }
19996 #endif
19997         for (j = numenv; j < limit; ++j) {
19998                 char name[80];
19999                 char value[80];
20000                 size_t found;
20001                 size_t k = 0;
20002                 do {
20003                         size_t jk;
20004                         found = 0;
20005                         sprintf(name, "TERM%lu", (unsigned long) k);
20006                         for (jk = 0; jk < j; ++jk) {
20007                                 if (!strcmp(name, mynames[jk])) {
20008                                         found = 1;
20009                                         ++k;
20010                                         break;
20011                                 }
20012                         }
20013                 } while (found);
20014                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20015                 set_value(name, value);
20016                 mynames[j] = str_alloc(name);
20017                 myvalues[j] = str_alloc(value);
20018         }
20019         for (pass = 0; pass < 3; ++pass) {
20020                 for (j = 0; j < limit; ++j) {
20021                         char *value = getenv(mynames[j]);
20022                         if (pass) {
20023                                 if (value == 0) {
20024                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20025                                         ${cf_cv_main_return:-return}(1);
20026                                 } else if (value != mypointer[j]) {
20027                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20028                                         ${cf_cv_main_return:-return}(1);
20029                                 } else if (strcmp(value, myvalues[j])) {
20030                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20031                                         ${cf_cv_main_return:-return}(1);
20032                                 }
20033                         } else {
20034                                 size_t k;
20035                                 mypointer[j] = value;
20036                                 for (k = 0; k < j; ++k) {
20037                                         if (mypointer[j] == mypointer[k]) {
20038                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20039                                                 ${cf_cv_main_return:-return}(1);
20040                                         }
20041                                 }
20042                         }
20043                 }
20044         }
20045         ${cf_cv_main_return:-return}(0);
20046 }
20047
20048 _ACEOF
20049 rm -f "conftest$ac_exeext"
20050 if { (eval echo "$as_me:20050: \"$ac_link\"") >&5
20051   (eval $ac_link) 2>&5
20052   ac_status=$?
20053   echo "$as_me:20053: \$? = $ac_status" >&5
20054   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20055   { (eval echo "$as_me:20055: \"$ac_try\"") >&5
20056   (eval $ac_try) 2>&5
20057   ac_status=$?
20058   echo "$as_me:20058: \$? = $ac_status" >&5
20059   (exit "$ac_status"); }; }; then
20060   cf_cv_consistent_getenv=yes
20061 else
20062   echo "$as_me: program exited with status $ac_status" >&5
20063 echo "$as_me: failed program was:" >&5
20064 cat "conftest.$ac_ext" >&5
20065 cf_cv_consistent_getenv=no
20066 fi
20067 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20068 fi
20069
20070 fi
20071 echo "$as_me:20071: result: $cf_cv_consistent_getenv" >&5
20072 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20073
20074 if test "x$cf_cv_consistent_getenv" = xno
20075 then
20076
20077 cat >>confdefs.h <<\EOF
20078 #define HAVE_CONSISTENT_GETENV 1
20079 EOF
20080
20081 fi
20082
20083 if test "x$cf_cv_consistent_getenv" = xno && \
20084         test "x$cf_with_trace" = xyes
20085 then
20086         { echo "$as_me:20086: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20087 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20088 fi
20089
20090 echo "$as_me:20090: checking if sys/time.h works with sys/select.h" >&5
20091 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20092 if test "${cf_cv_sys_time_select+set}" = set; then
20093   echo $ECHO_N "(cached) $ECHO_C" >&6
20094 else
20095
20096 cat >"conftest.$ac_ext" <<_ACEOF
20097 #line 20097 "configure"
20098 #include "confdefs.h"
20099
20100 #include <sys/types.h>
20101 #ifdef HAVE_SYS_TIME_H
20102 #include <sys/time.h>
20103 #endif
20104 #ifdef HAVE_SYS_SELECT_H
20105 #include <sys/select.h>
20106 #endif
20107
20108 int
20109 main (void)
20110 {
20111
20112   ;
20113   return 0;
20114 }
20115 _ACEOF
20116 rm -f "conftest.$ac_objext"
20117 if { (eval echo "$as_me:20117: \"$ac_compile\"") >&5
20118   (eval $ac_compile) 2>&5
20119   ac_status=$?
20120   echo "$as_me:20120: \$? = $ac_status" >&5
20121   (exit "$ac_status"); } &&
20122          { ac_try='test -s "conftest.$ac_objext"'
20123   { (eval echo "$as_me:20123: \"$ac_try\"") >&5
20124   (eval $ac_try) 2>&5
20125   ac_status=$?
20126   echo "$as_me:20126: \$? = $ac_status" >&5
20127   (exit "$ac_status"); }; }; then
20128   cf_cv_sys_time_select=yes
20129 else
20130   echo "$as_me: failed program was:" >&5
20131 cat "conftest.$ac_ext" >&5
20132 cf_cv_sys_time_select=no
20133 fi
20134 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20135
20136 fi
20137
20138 echo "$as_me:20138: result: $cf_cv_sys_time_select" >&5
20139 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20140 test "$cf_cv_sys_time_select" = yes &&
20141 cat >>confdefs.h <<\EOF
20142 #define HAVE_SYS_TIME_SELECT 1
20143 EOF
20144
20145 ###     checks for compiler characteristics
20146 ac_ext=c
20147 ac_cpp='$CPP $CPPFLAGS'
20148 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20149 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20150 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20151 ac_main_return="return"
20152
20153 echo "$as_me:20153: checking for an ANSI C-conforming const" >&5
20154 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20155 if test "${ac_cv_c_const+set}" = set; then
20156   echo $ECHO_N "(cached) $ECHO_C" >&6
20157 else
20158   cat >"conftest.$ac_ext" <<_ACEOF
20159 #line 20159 "configure"
20160 #include "confdefs.h"
20161
20162 int
20163 main (void)
20164 {
20165 /* FIXME: Include the comments suggested by Paul. */
20166 #ifndef __cplusplus
20167   /* Ultrix mips cc rejects this.  */
20168   typedef int charset[2];
20169   const charset x;
20170   /* SunOS 4.1.1 cc rejects this.  */
20171   char const *const *ccp;
20172   char **p;
20173   /* NEC SVR4.0.2 mips cc rejects this.  */
20174   struct point {int x, y;};
20175   static struct point const zero = {0,0};
20176   /* AIX XL C 1.02.0.0 rejects this.
20177      It does not let you subtract one const X* pointer from another in
20178      an arm of an if-expression whose if-part is not a constant
20179      expression */
20180   const char *g = "string";
20181   ccp = &g + (g ? g-g : 0);
20182   /* HPUX 7.0 cc rejects these. */
20183   ++ccp;
20184   p = (char**) ccp;
20185   ccp = (char const *const *) p;
20186   { /* SCO 3.2v4 cc rejects this.  */
20187     char *t;
20188     char const *s = 0 ? (char *) 0 : (char const *) 0;
20189
20190     *t++ = 0;
20191   }
20192   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20193     int x[] = {25, 17};
20194     const int *foo = &x[0];
20195     ++foo;
20196   }
20197   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20198     typedef const int *iptr;
20199     iptr p = 0;
20200     ++p;
20201   }
20202   { /* AIX XL C 1.02.0.0 rejects this saying
20203        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20204     struct s { int j; const int *ap[3]; };
20205     struct s *b; b->j = 5;
20206   }
20207   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20208     const int foo = 10;
20209   }
20210 #endif
20211
20212   ;
20213   return 0;
20214 }
20215 _ACEOF
20216 rm -f "conftest.$ac_objext"
20217 if { (eval echo "$as_me:20217: \"$ac_compile\"") >&5
20218   (eval $ac_compile) 2>&5
20219   ac_status=$?
20220   echo "$as_me:20220: \$? = $ac_status" >&5
20221   (exit "$ac_status"); } &&
20222          { ac_try='test -s "conftest.$ac_objext"'
20223   { (eval echo "$as_me:20223: \"$ac_try\"") >&5
20224   (eval $ac_try) 2>&5
20225   ac_status=$?
20226   echo "$as_me:20226: \$? = $ac_status" >&5
20227   (exit "$ac_status"); }; }; then
20228   ac_cv_c_const=yes
20229 else
20230   echo "$as_me: failed program was:" >&5
20231 cat "conftest.$ac_ext" >&5
20232 ac_cv_c_const=no
20233 fi
20234 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20235 fi
20236 echo "$as_me:20236: result: $ac_cv_c_const" >&5
20237 echo "${ECHO_T}$ac_cv_c_const" >&6
20238 if test $ac_cv_c_const = no; then
20239
20240 cat >>confdefs.h <<\EOF
20241 #define const
20242 EOF
20243
20244 fi
20245
20246 echo "$as_me:20246: checking for inline" >&5
20247 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20248 if test "${ac_cv_c_inline+set}" = set; then
20249   echo $ECHO_N "(cached) $ECHO_C" >&6
20250 else
20251   ac_cv_c_inline=no
20252 for ac_kw in inline __inline__ __inline; do
20253   cat >"conftest.$ac_ext" <<_ACEOF
20254 #line 20254 "configure"
20255 #include "confdefs.h"
20256 #ifndef __cplusplus
20257 static $ac_kw int static_foo () {return 0; }
20258 $ac_kw int foo () {return 0; }
20259 #endif
20260
20261 _ACEOF
20262 rm -f "conftest.$ac_objext"
20263 if { (eval echo "$as_me:20263: \"$ac_compile\"") >&5
20264   (eval $ac_compile) 2>&5
20265   ac_status=$?
20266   echo "$as_me:20266: \$? = $ac_status" >&5
20267   (exit "$ac_status"); } &&
20268          { ac_try='test -s "conftest.$ac_objext"'
20269   { (eval echo "$as_me:20269: \"$ac_try\"") >&5
20270   (eval $ac_try) 2>&5
20271   ac_status=$?
20272   echo "$as_me:20272: \$? = $ac_status" >&5
20273   (exit "$ac_status"); }; }; then
20274   ac_cv_c_inline=$ac_kw; break
20275 else
20276   echo "$as_me: failed program was:" >&5
20277 cat "conftest.$ac_ext" >&5
20278 fi
20279 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20280 done
20281
20282 fi
20283 echo "$as_me:20283: result: $ac_cv_c_inline" >&5
20284 echo "${ECHO_T}$ac_cv_c_inline" >&6
20285 case $ac_cv_c_inline in
20286   inline | yes) ;;
20287   no)
20288 cat >>confdefs.h <<\EOF
20289 #define inline
20290 EOF
20291  ;;
20292   *)  cat >>confdefs.h <<EOF
20293 #define inline $ac_cv_c_inline
20294 EOF
20295  ;;
20296 esac
20297
20298 NCURSES_INLINE=
20299 if test "$ac_cv_c_inline" != no ; then
20300         NCURSES_INLINE=inline
20301         if test "$INTEL_COMPILER" = yes
20302         then
20303                 :
20304         elif test "$CLANG_COMPILER" = yes
20305         then
20306                 :
20307         elif test "$GCC" = yes
20308         then
20309                 echo "$as_me:20309: checking if $CC supports options to tune inlining" >&5
20310 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20311 if test "${cf_cv_gcc_inline+set}" = set; then
20312   echo $ECHO_N "(cached) $ECHO_C" >&6
20313 else
20314
20315                 cf_save_CFLAGS=$CFLAGS
20316                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20317                 cat >"conftest.$ac_ext" <<_ACEOF
20318 #line 20318 "configure"
20319 #include "confdefs.h"
20320 inline int foo(void) { return 1; }
20321 int
20322 main (void)
20323 {
20324 ${cf_cv_main_return:-return} foo()
20325   ;
20326   return 0;
20327 }
20328 _ACEOF
20329 rm -f "conftest.$ac_objext"
20330 if { (eval echo "$as_me:20330: \"$ac_compile\"") >&5
20331   (eval $ac_compile) 2>&5
20332   ac_status=$?
20333   echo "$as_me:20333: \$? = $ac_status" >&5
20334   (exit "$ac_status"); } &&
20335          { ac_try='test -s "conftest.$ac_objext"'
20336   { (eval echo "$as_me:20336: \"$ac_try\"") >&5
20337   (eval $ac_try) 2>&5
20338   ac_status=$?
20339   echo "$as_me:20339: \$? = $ac_status" >&5
20340   (exit "$ac_status"); }; }; then
20341   cf_cv_gcc_inline=yes
20342 else
20343   echo "$as_me: failed program was:" >&5
20344 cat "conftest.$ac_ext" >&5
20345 cf_cv_gcc_inline=no
20346 fi
20347 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20348                 CFLAGS=$cf_save_CFLAGS
20349
20350 fi
20351 echo "$as_me:20351: result: $cf_cv_gcc_inline" >&5
20352 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
20353                 if test "$cf_cv_gcc_inline" = yes ; then
20354
20355 cf_fix_cppflags=no
20356 cf_new_cflags=
20357 cf_new_cppflags=
20358 cf_new_extra_cppflags=
20359
20360 for cf_add_cflags in --param max-inline-insns-single=1200
20361 do
20362 case "$cf_fix_cppflags" in
20363 (no)
20364         case "$cf_add_cflags" in
20365         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20366                 case "$cf_add_cflags" in
20367                 (-D*)
20368                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20369
20370                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20371                                 && test -z "${cf_tst_cflags}" \
20372                                 && cf_fix_cppflags=yes
20373
20374                         if test "$cf_fix_cppflags" = yes ; then
20375
20376         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20377         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20378
20379                                 continue
20380                         elif test "${cf_tst_cflags}" = "\"'" ; then
20381
20382         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20383         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20384
20385                                 continue
20386                         fi
20387                         ;;
20388                 esac
20389                 case "$CPPFLAGS" in
20390                 (*$cf_add_cflags)
20391                         ;;
20392                 (*)
20393                         case "$cf_add_cflags" in
20394                         (-D*)
20395                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20396
20397 CPPFLAGS=`echo "$CPPFLAGS" | \
20398         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20399                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20400
20401                                 ;;
20402                         esac
20403
20404         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20405         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20406
20407                         ;;
20408                 esac
20409                 ;;
20410         (*)
20411
20412         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20413         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20414
20415                 ;;
20416         esac
20417         ;;
20418 (yes)
20419
20420         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20421         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20422
20423         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20424
20425         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20426                 && test -z "${cf_tst_cflags}" \
20427                 && cf_fix_cppflags=no
20428         ;;
20429 esac
20430 done
20431
20432 if test -n "$cf_new_cflags" ; then
20433
20434         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20435         CFLAGS="${CFLAGS}$cf_new_cflags"
20436
20437 fi
20438
20439 if test -n "$cf_new_cppflags" ; then
20440
20441         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20442         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20443
20444 fi
20445
20446 if test -n "$cf_new_extra_cppflags" ; then
20447
20448         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20449         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20450
20451 fi
20452
20453                 fi
20454         fi
20455 fi
20456
20457 echo "$as_me:20457: checking for signal global datatype" >&5
20458 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
20459 if test "${cf_cv_sig_atomic_t+set}" = set; then
20460   echo $ECHO_N "(cached) $ECHO_C" >&6
20461 else
20462
20463         for cf_type in \
20464                 "volatile sig_atomic_t" \
20465                 "sig_atomic_t" \
20466                 "int"
20467         do
20468         cat >"conftest.$ac_ext" <<_ACEOF
20469 #line 20469 "configure"
20470 #include "confdefs.h"
20471
20472 #include <sys/types.h>
20473 #include <signal.h>
20474 #include <stdio.h>
20475
20476 extern $cf_type x;
20477 $cf_type x;
20478 static void handler(int sig)
20479 {
20480         (void)sig;
20481         x = 5;
20482 }
20483 int
20484 main (void)
20485 {
20486 signal(SIGINT, handler);
20487                  x = 1
20488   ;
20489   return 0;
20490 }
20491 _ACEOF
20492 rm -f "conftest.$ac_objext"
20493 if { (eval echo "$as_me:20493: \"$ac_compile\"") >&5
20494   (eval $ac_compile) 2>&5
20495   ac_status=$?
20496   echo "$as_me:20496: \$? = $ac_status" >&5
20497   (exit "$ac_status"); } &&
20498          { ac_try='test -s "conftest.$ac_objext"'
20499   { (eval echo "$as_me:20499: \"$ac_try\"") >&5
20500   (eval $ac_try) 2>&5
20501   ac_status=$?
20502   echo "$as_me:20502: \$? = $ac_status" >&5
20503   (exit "$ac_status"); }; }; then
20504   cf_cv_sig_atomic_t=$cf_type
20505 else
20506   echo "$as_me: failed program was:" >&5
20507 cat "conftest.$ac_ext" >&5
20508 cf_cv_sig_atomic_t=no
20509 fi
20510 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20511                 test "$cf_cv_sig_atomic_t" != no && break
20512         done
20513
20514 fi
20515
20516 echo "$as_me:20516: result: $cf_cv_sig_atomic_t" >&5
20517 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
20518 test "$cf_cv_sig_atomic_t" != no &&
20519 cat >>confdefs.h <<EOF
20520 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
20521 EOF
20522
20523 if test "$NCURSES_CHTYPE" = auto ; then
20524
20525 echo "$as_me:20525: checking for type of chtype" >&5
20526 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
20527 if test "${cf_cv_typeof_chtype+set}" = set; then
20528   echo $ECHO_N "(cached) $ECHO_C" >&6
20529 else
20530
20531                 if test "$cross_compiling" = yes; then
20532   cf_cv_typeof_chtype=long
20533 else
20534   cat >"conftest.$ac_ext" <<_ACEOF
20535 #line 20535 "configure"
20536 #include "confdefs.h"
20537
20538 #define WANT_BITS 31
20539 #include <stdio.h>
20540 int main(void)
20541 {
20542         FILE *fp = fopen("cf_test.out", "w");
20543         if (fp != 0) {
20544                 char *result = "long";
20545                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
20546                         int n;
20547                         unsigned int x, y;
20548                         for (n = 0; n < WANT_BITS; n++) {
20549                                 x = (1 << n);
20550                                 y = (x >> n);
20551                                 if (y != 1 || x == 0) {
20552                                         x = 0;
20553                                         break;
20554                                 }
20555                         }
20556                         /*
20557                          * If x is nonzero, an int is big enough for the bits
20558                          * that we want.
20559                          */
20560                         result = (x != 0) ? "int" : "long";
20561                 }
20562                 fputs(result, fp);
20563                 fclose(fp);
20564         }
20565         ${cf_cv_main_return:-return}(0);
20566 }
20567
20568 _ACEOF
20569 rm -f "conftest$ac_exeext"
20570 if { (eval echo "$as_me:20570: \"$ac_link\"") >&5
20571   (eval $ac_link) 2>&5
20572   ac_status=$?
20573   echo "$as_me:20573: \$? = $ac_status" >&5
20574   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20575   { (eval echo "$as_me:20575: \"$ac_try\"") >&5
20576   (eval $ac_try) 2>&5
20577   ac_status=$?
20578   echo "$as_me:20578: \$? = $ac_status" >&5
20579   (exit "$ac_status"); }; }; then
20580   cf_cv_typeof_chtype=`cat cf_test.out`
20581 else
20582   echo "$as_me: program exited with status $ac_status" >&5
20583 echo "$as_me: failed program was:" >&5
20584 cat "conftest.$ac_ext" >&5
20585 cf_cv_typeof_chtype=long
20586 fi
20587 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20588 fi
20589                 rm -f cf_test.out
20590
20591 fi
20592
20593 echo "$as_me:20593: result: $cf_cv_typeof_chtype" >&5
20594 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
20595
20596 cat >>confdefs.h <<EOF
20597 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
20598 EOF
20599
20600 else
20601         cf_cv_typeof_chtype=$NCURSES_CHTYPE
20602 fi
20603 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
20604
20605 echo "$as_me:20605: checking if unsigned literals are legal" >&5
20606 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
20607 if test "${cf_cv_unsigned_literals+set}" = set; then
20608   echo $ECHO_N "(cached) $ECHO_C" >&6
20609 else
20610
20611         cat >"conftest.$ac_ext" <<_ACEOF
20612 #line 20612 "configure"
20613 #include "confdefs.h"
20614
20615 int
20616 main (void)
20617 {
20618 long x = 1L + 1UL + 1U + 1
20619   ;
20620   return 0;
20621 }
20622 _ACEOF
20623 rm -f "conftest.$ac_objext"
20624 if { (eval echo "$as_me:20624: \"$ac_compile\"") >&5
20625   (eval $ac_compile) 2>&5
20626   ac_status=$?
20627   echo "$as_me:20627: \$? = $ac_status" >&5
20628   (exit "$ac_status"); } &&
20629          { ac_try='test -s "conftest.$ac_objext"'
20630   { (eval echo "$as_me:20630: \"$ac_try\"") >&5
20631   (eval $ac_try) 2>&5
20632   ac_status=$?
20633   echo "$as_me:20633: \$? = $ac_status" >&5
20634   (exit "$ac_status"); }; }; then
20635   cf_cv_unsigned_literals=yes
20636 else
20637   echo "$as_me: failed program was:" >&5
20638 cat "conftest.$ac_ext" >&5
20639 cf_cv_unsigned_literals=no
20640 fi
20641 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20642
20643 fi
20644
20645 echo "$as_me:20645: result: $cf_cv_unsigned_literals" >&5
20646 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
20647
20648 cf_cv_1UL="1"
20649 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
20650 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
20651
20652 if test "$NCURSES_MMASK_T" = auto ; then
20653         cf_cv_typeof_mmask_t=long
20654 else
20655         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
20656 fi
20657 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
20658
20659 ###     Checks for external-data
20660
20661 echo "$as_me:20661: checking if external errno is declared" >&5
20662 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
20663 if test "${cf_cv_dcl_errno+set}" = set; then
20664   echo $ECHO_N "(cached) $ECHO_C" >&6
20665 else
20666
20667         cat >"conftest.$ac_ext" <<_ACEOF
20668 #line 20668 "configure"
20669 #include "confdefs.h"
20670
20671 #ifdef HAVE_STDLIB_H
20672 #include <stdlib.h>
20673 #endif
20674 #include <stdio.h>
20675 #include <sys/types.h>
20676 #include <errno.h>
20677 int
20678 main (void)
20679 {
20680 int x = (int) errno; (void)x
20681   ;
20682   return 0;
20683 }
20684 _ACEOF
20685 rm -f "conftest.$ac_objext"
20686 if { (eval echo "$as_me:20686: \"$ac_compile\"") >&5
20687   (eval $ac_compile) 2>&5
20688   ac_status=$?
20689   echo "$as_me:20689: \$? = $ac_status" >&5
20690   (exit "$ac_status"); } &&
20691          { ac_try='test -s "conftest.$ac_objext"'
20692   { (eval echo "$as_me:20692: \"$ac_try\"") >&5
20693   (eval $ac_try) 2>&5
20694   ac_status=$?
20695   echo "$as_me:20695: \$? = $ac_status" >&5
20696   (exit "$ac_status"); }; }; then
20697   cf_cv_dcl_errno=yes
20698 else
20699   echo "$as_me: failed program was:" >&5
20700 cat "conftest.$ac_ext" >&5
20701 cf_cv_dcl_errno=no
20702 fi
20703 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20704
20705 fi
20706 echo "$as_me:20706: result: $cf_cv_dcl_errno" >&5
20707 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
20708
20709 if test "$cf_cv_dcl_errno" = no ; then
20710
20711 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20712
20713         cat >>confdefs.h <<EOF
20714 #define $cf_result 1
20715 EOF
20716
20717 fi
20718
20719 # It's possible (for near-UNIX clones) that the data doesn't exist
20720
20721 echo "$as_me:20721: checking if external errno exists" >&5
20722 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
20723 if test "${cf_cv_have_errno+set}" = set; then
20724   echo $ECHO_N "(cached) $ECHO_C" >&6
20725 else
20726
20727         cat >"conftest.$ac_ext" <<_ACEOF
20728 #line 20728 "configure"
20729 #include "confdefs.h"
20730
20731 #undef errno
20732 extern int errno;
20733
20734 int
20735 main (void)
20736 {
20737 errno = 2
20738   ;
20739   return 0;
20740 }
20741 _ACEOF
20742 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20743 if { (eval echo "$as_me:20743: \"$ac_link\"") >&5
20744   (eval $ac_link) 2>&5
20745   ac_status=$?
20746   echo "$as_me:20746: \$? = $ac_status" >&5
20747   (exit "$ac_status"); } &&
20748          { ac_try='test -s "conftest$ac_exeext"'
20749   { (eval echo "$as_me:20749: \"$ac_try\"") >&5
20750   (eval $ac_try) 2>&5
20751   ac_status=$?
20752   echo "$as_me:20752: \$? = $ac_status" >&5
20753   (exit "$ac_status"); }; }; then
20754   cf_cv_have_errno=yes
20755 else
20756   echo "$as_me: failed program was:" >&5
20757 cat "conftest.$ac_ext" >&5
20758 cf_cv_have_errno=no
20759 fi
20760 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20761
20762 fi
20763 echo "$as_me:20763: result: $cf_cv_have_errno" >&5
20764 echo "${ECHO_T}$cf_cv_have_errno" >&6
20765
20766 if test "$cf_cv_have_errno" = yes ; then
20767
20768 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20769
20770         cat >>confdefs.h <<EOF
20771 #define $cf_result 1
20772 EOF
20773
20774 fi
20775
20776 echo "$as_me:20776: checking if data-only library module links" >&5
20777 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
20778 if test "${cf_cv_link_dataonly+set}" = set; then
20779   echo $ECHO_N "(cached) $ECHO_C" >&6
20780 else
20781
20782         rm -f conftest.a
20783         cat >conftest.$ac_ext <<EOF
20784 #line 20784 "configure"
20785 int     testdata[3] = { 123, 456, 789 };
20786 EOF
20787         if { (eval echo "$as_me:20787: \"$ac_compile\"") >&5
20788   (eval $ac_compile) 2>&5
20789   ac_status=$?
20790   echo "$as_me:20790: \$? = $ac_status" >&5
20791   (exit "$ac_status"); } ; then
20792                 mv conftest.o data.o && \
20793                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
20794         fi
20795         rm -f conftest.$ac_ext data.o
20796         cat >conftest.$ac_ext <<EOF
20797 #line 20797 "configure"
20798 int     testfunc(void)
20799 {
20800 #if defined(NeXT)
20801         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
20802 #else
20803         extern int testdata[3];
20804         return testdata[0] == 123
20805            &&  testdata[1] == 456
20806            &&  testdata[2] == 789;
20807 #endif
20808 }
20809 EOF
20810         if { (eval echo "$as_me:20810: \"$ac_compile\"") >&5
20811   (eval $ac_compile) 2>&5
20812   ac_status=$?
20813   echo "$as_me:20813: \$? = $ac_status" >&5
20814   (exit "$ac_status"); }; then
20815                 mv conftest.o func.o && \
20816                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
20817         fi
20818         rm -f conftest.$ac_ext func.o
20819         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
20820         cf_saveLIBS="$LIBS"
20821         LIBS="conftest.a $LIBS"
20822         if test "$cross_compiling" = yes; then
20823   cf_cv_link_dataonly=unknown
20824 else
20825   cat >"conftest.$ac_ext" <<_ACEOF
20826 #line 20826 "configure"
20827 #include "confdefs.h"
20828
20829         int main(void)
20830         {
20831                 extern int testfunc();
20832                 ${cf_cv_main_return:-return} (!testfunc());
20833         }
20834
20835 _ACEOF
20836 rm -f "conftest$ac_exeext"
20837 if { (eval echo "$as_me:20837: \"$ac_link\"") >&5
20838   (eval $ac_link) 2>&5
20839   ac_status=$?
20840   echo "$as_me:20840: \$? = $ac_status" >&5
20841   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20842   { (eval echo "$as_me:20842: \"$ac_try\"") >&5
20843   (eval $ac_try) 2>&5
20844   ac_status=$?
20845   echo "$as_me:20845: \$? = $ac_status" >&5
20846   (exit "$ac_status"); }; }; then
20847   cf_cv_link_dataonly=yes
20848 else
20849   echo "$as_me: program exited with status $ac_status" >&5
20850 echo "$as_me: failed program was:" >&5
20851 cat "conftest.$ac_ext" >&5
20852 cf_cv_link_dataonly=no
20853 fi
20854 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20855 fi
20856         LIBS="$cf_saveLIBS"
20857
20858 fi
20859
20860 echo "$as_me:20860: result: $cf_cv_link_dataonly" >&5
20861 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
20862
20863 if test "$cf_cv_link_dataonly" = no ; then
20864
20865 cat >>confdefs.h <<\EOF
20866 #define BROKEN_LINKER 1
20867 EOF
20868
20869         BROKEN_LINKER=1
20870 fi
20871
20872 ###     Checks for library functions.
20873
20874 for ac_func in \
20875 getcwd \
20876 getegid \
20877 geteuid \
20878 getopt \
20879 getttynam \
20880 issetugid \
20881 localeconv \
20882 poll \
20883 putenv \
20884 remove \
20885 select \
20886 setbuf \
20887 setbuffer \
20888 setenv \
20889 setvbuf \
20890 sigaction \
20891 sigvec \
20892 snprintf \
20893 strdup \
20894 strstr \
20895 sysconf \
20896 tcgetpgrp \
20897 times \
20898 tsearch \
20899 vsnprintf \
20900
20901 do
20902 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20903 echo "$as_me:20903: checking for $ac_func" >&5
20904 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20905 if eval "test \"\${$as_ac_var+set}\" = set"; then
20906   echo $ECHO_N "(cached) $ECHO_C" >&6
20907 else
20908   cat >"conftest.$ac_ext" <<_ACEOF
20909 #line 20909 "configure"
20910 #include "confdefs.h"
20911 #define $ac_func autoconf_temporary
20912 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20913 #undef $ac_func
20914
20915 #ifdef __cplusplus
20916 extern "C"
20917 #endif
20918
20919 /* We use char because int might match the return type of a gcc2
20920    builtin and then its argument prototype would still apply.  */
20921 char $ac_func (void);
20922
20923 int
20924 main (void)
20925 {
20926
20927 /* The GNU C library defines stubs for functions which it implements
20928     to always fail with ENOSYS.  Some functions are actually named
20929     something starting with __ and the normal name is an alias.  */
20930 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20931 #error found stub for $ac_func
20932 #endif
20933
20934         return $ac_func ();
20935   ;
20936   return 0;
20937 }
20938 _ACEOF
20939 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20940 if { (eval echo "$as_me:20940: \"$ac_link\"") >&5
20941   (eval $ac_link) 2>&5
20942   ac_status=$?
20943   echo "$as_me:20943: \$? = $ac_status" >&5
20944   (exit "$ac_status"); } &&
20945          { ac_try='test -s "conftest$ac_exeext"'
20946   { (eval echo "$as_me:20946: \"$ac_try\"") >&5
20947   (eval $ac_try) 2>&5
20948   ac_status=$?
20949   echo "$as_me:20949: \$? = $ac_status" >&5
20950   (exit "$ac_status"); }; }; then
20951   eval "$as_ac_var=yes"
20952 else
20953   echo "$as_me: failed program was:" >&5
20954 cat "conftest.$ac_ext" >&5
20955 eval "$as_ac_var=no"
20956 fi
20957 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20958 fi
20959 echo "$as_me:20959: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20960 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20961 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20962   cat >>confdefs.h <<EOF
20963 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20964 EOF
20965
20966 fi
20967 done
20968
20969 if test "x$ac_cv_func_getopt" = xno && \
20970    test "x$cf_with_progs$cf_with_tests" != xnono; then
20971         { { echo "$as_me:20971: error: getopt is required for building programs" >&5
20972 echo "$as_me: error: getopt is required for building programs" >&2;}
20973    { (exit 1); exit 1; }; }
20974 fi
20975
20976 if test "x$with_safe_sprintf" = xyes
20977 then
20978         if test "x$ac_cv_func_vsnprintf" = xyes
20979         then
20980                 { echo "$as_me:20980: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
20981 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
20982         else
20983
20984 cat >>confdefs.h <<\EOF
20985 #define USE_SAFE_SPRINTF 1
20986 EOF
20987
20988         fi
20989 fi
20990
20991 if test "x$with_getcap" = "xyes" ; then
20992
20993 echo "$as_me:20993: checking for terminal-capability database functions" >&5
20994 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
20995 if test "${cf_cv_cgetent+set}" = set; then
20996   echo $ECHO_N "(cached) $ECHO_C" >&6
20997 else
20998
20999 cat >"conftest.$ac_ext" <<_ACEOF
21000 #line 21000 "configure"
21001 #include "confdefs.h"
21002
21003 #include <stdlib.h>
21004 int
21005 main (void)
21006 {
21007
21008         char temp[128];
21009         char *buf = temp;
21010         char *db_array = temp;
21011         cgetent(&buf, &db_array, "vt100");
21012         cgetcap(buf, "tc", '=');
21013         cgetmatch(buf, "tc");
21014
21015   ;
21016   return 0;
21017 }
21018 _ACEOF
21019 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21020 if { (eval echo "$as_me:21020: \"$ac_link\"") >&5
21021   (eval $ac_link) 2>&5
21022   ac_status=$?
21023   echo "$as_me:21023: \$? = $ac_status" >&5
21024   (exit "$ac_status"); } &&
21025          { ac_try='test -s "conftest$ac_exeext"'
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_cgetent=yes
21032 else
21033   echo "$as_me: failed program was:" >&5
21034 cat "conftest.$ac_ext" >&5
21035 cf_cv_cgetent=no
21036 fi
21037 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21038
21039 fi
21040 echo "$as_me:21040: result: $cf_cv_cgetent" >&5
21041 echo "${ECHO_T}$cf_cv_cgetent" >&6
21042
21043 if test "$cf_cv_cgetent" = yes
21044 then
21045
21046 cat >>confdefs.h <<\EOF
21047 #define HAVE_BSD_CGETENT 1
21048 EOF
21049
21050 echo "$as_me:21050: checking if cgetent uses const parameter" >&5
21051 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
21052 if test "${cf_cv_cgetent_const+set}" = set; then
21053   echo $ECHO_N "(cached) $ECHO_C" >&6
21054 else
21055
21056 cat >"conftest.$ac_ext" <<_ACEOF
21057 #line 21057 "configure"
21058 #include "confdefs.h"
21059
21060 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
21061 #include <stdlib.h>
21062 int
21063 main (void)
21064 {
21065
21066         char temp[128];
21067         char *buf = temp;
21068 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
21069         const char *db_array = temp;
21070         cgetent(&buf, &db_array, "vt100");
21071 #endif
21072         cgetcap(buf, "tc", '=');
21073         cgetmatch(buf, "tc");
21074
21075   ;
21076   return 0;
21077 }
21078 _ACEOF
21079 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21080 if { (eval echo "$as_me:21080: \"$ac_link\"") >&5
21081   (eval $ac_link) 2>&5
21082   ac_status=$?
21083   echo "$as_me:21083: \$? = $ac_status" >&5
21084   (exit "$ac_status"); } &&
21085          { ac_try='test -s "conftest$ac_exeext"'
21086   { (eval echo "$as_me:21086: \"$ac_try\"") >&5
21087   (eval $ac_try) 2>&5
21088   ac_status=$?
21089   echo "$as_me:21089: \$? = $ac_status" >&5
21090   (exit "$ac_status"); }; }; then
21091   cf_cv_cgetent_const=yes
21092 else
21093   echo "$as_me: failed program was:" >&5
21094 cat "conftest.$ac_ext" >&5
21095 cf_cv_cgetent_const=no
21096 fi
21097 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21098
21099 fi
21100 echo "$as_me:21100: result: $cf_cv_cgetent_const" >&5
21101 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
21102         if test "$cf_cv_cgetent_const" = yes
21103         then
21104
21105 cat >>confdefs.h <<EOF
21106 #define CGETENT_CONST const
21107 EOF
21108
21109         fi
21110 fi
21111
21112 fi
21113
21114 echo "$as_me:21114: checking for isascii" >&5
21115 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
21116 if test "${cf_cv_have_isascii+set}" = set; then
21117   echo $ECHO_N "(cached) $ECHO_C" >&6
21118 else
21119
21120         cat >"conftest.$ac_ext" <<_ACEOF
21121 #line 21121 "configure"
21122 #include "confdefs.h"
21123 #include <ctype.h>
21124 int
21125 main (void)
21126 {
21127 int x = isascii(' ')
21128   ;
21129   return 0;
21130 }
21131 _ACEOF
21132 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21133 if { (eval echo "$as_me:21133: \"$ac_link\"") >&5
21134   (eval $ac_link) 2>&5
21135   ac_status=$?
21136   echo "$as_me:21136: \$? = $ac_status" >&5
21137   (exit "$ac_status"); } &&
21138          { ac_try='test -s "conftest$ac_exeext"'
21139   { (eval echo "$as_me:21139: \"$ac_try\"") >&5
21140   (eval $ac_try) 2>&5
21141   ac_status=$?
21142   echo "$as_me:21142: \$? = $ac_status" >&5
21143   (exit "$ac_status"); }; }; then
21144   cf_cv_have_isascii=yes
21145 else
21146   echo "$as_me: failed program was:" >&5
21147 cat "conftest.$ac_ext" >&5
21148 cf_cv_have_isascii=no
21149 fi
21150 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21151
21152 fi
21153 echo "$as_me:21153: result: $cf_cv_have_isascii" >&5
21154 echo "${ECHO_T}$cf_cv_have_isascii" >&6
21155 test "$cf_cv_have_isascii" = yes &&
21156 cat >>confdefs.h <<\EOF
21157 #define HAVE_ISASCII 1
21158 EOF
21159
21160 if test "$ac_cv_func_sigaction" = yes; then
21161 echo "$as_me:21161: checking whether sigaction needs _POSIX_SOURCE" >&5
21162 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
21163 cat >"conftest.$ac_ext" <<_ACEOF
21164 #line 21164 "configure"
21165 #include "confdefs.h"
21166
21167 #include <sys/types.h>
21168 #include <signal.h>
21169 int
21170 main (void)
21171 {
21172 struct sigaction act
21173   ;
21174   return 0;
21175 }
21176 _ACEOF
21177 rm -f "conftest.$ac_objext"
21178 if { (eval echo "$as_me:21178: \"$ac_compile\"") >&5
21179   (eval $ac_compile) 2>&5
21180   ac_status=$?
21181   echo "$as_me:21181: \$? = $ac_status" >&5
21182   (exit "$ac_status"); } &&
21183          { ac_try='test -s "conftest.$ac_objext"'
21184   { (eval echo "$as_me:21184: \"$ac_try\"") >&5
21185   (eval $ac_try) 2>&5
21186   ac_status=$?
21187   echo "$as_me:21187: \$? = $ac_status" >&5
21188   (exit "$ac_status"); }; }; then
21189   sigact_bad=no
21190 else
21191   echo "$as_me: failed program was:" >&5
21192 cat "conftest.$ac_ext" >&5
21193
21194 cat >"conftest.$ac_ext" <<_ACEOF
21195 #line 21195 "configure"
21196 #include "confdefs.h"
21197
21198 #define _POSIX_SOURCE
21199 #include <sys/types.h>
21200 #include <signal.h>
21201 int
21202 main (void)
21203 {
21204 struct sigaction act
21205   ;
21206   return 0;
21207 }
21208 _ACEOF
21209 rm -f "conftest.$ac_objext"
21210 if { (eval echo "$as_me:21210: \"$ac_compile\"") >&5
21211   (eval $ac_compile) 2>&5
21212   ac_status=$?
21213   echo "$as_me:21213: \$? = $ac_status" >&5
21214   (exit "$ac_status"); } &&
21215          { ac_try='test -s "conftest.$ac_objext"'
21216   { (eval echo "$as_me:21216: \"$ac_try\"") >&5
21217   (eval $ac_try) 2>&5
21218   ac_status=$?
21219   echo "$as_me:21219: \$? = $ac_status" >&5
21220   (exit "$ac_status"); }; }; then
21221   sigact_bad=yes
21222
21223 cat >>confdefs.h <<\EOF
21224 #define _POSIX_SOURCE 1
21225 EOF
21226
21227 else
21228   echo "$as_me: failed program was:" >&5
21229 cat "conftest.$ac_ext" >&5
21230 sigact_bad=unknown
21231 fi
21232 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21233 fi
21234 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21235 echo "$as_me:21235: result: $sigact_bad" >&5
21236 echo "${ECHO_T}$sigact_bad" >&6
21237 fi
21238
21239 echo "$as_me:21239: checking if nanosleep really works" >&5
21240 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
21241 if test "${cf_cv_func_nanosleep+set}" = set; then
21242   echo $ECHO_N "(cached) $ECHO_C" >&6
21243 else
21244
21245 if test "$cross_compiling" = yes; then
21246   cf_cv_func_nanosleep=unknown
21247 else
21248   cat >"conftest.$ac_ext" <<_ACEOF
21249 #line 21249 "configure"
21250 #include "confdefs.h"
21251
21252 #include <stdio.h>
21253 #include <errno.h>
21254 #include <time.h>
21255
21256 #ifdef HAVE_SYS_TIME_H
21257 #include <sys/time.h>
21258 #endif
21259
21260 int main(void) {
21261         struct timespec ts1, ts2;
21262         int code;
21263         ts1.tv_sec  = 0;
21264         ts1.tv_nsec = 750000000;
21265         ts2.tv_sec  = 0;
21266         ts2.tv_nsec = 0;
21267         errno = 0;
21268         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
21269         ${cf_cv_main_return:-return}(code != 0);
21270 }
21271
21272 _ACEOF
21273 rm -f "conftest$ac_exeext"
21274 if { (eval echo "$as_me:21274: \"$ac_link\"") >&5
21275   (eval $ac_link) 2>&5
21276   ac_status=$?
21277   echo "$as_me:21277: \$? = $ac_status" >&5
21278   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21279   { (eval echo "$as_me:21279: \"$ac_try\"") >&5
21280   (eval $ac_try) 2>&5
21281   ac_status=$?
21282   echo "$as_me:21282: \$? = $ac_status" >&5
21283   (exit "$ac_status"); }; }; then
21284   cf_cv_func_nanosleep=yes
21285 else
21286   echo "$as_me: program exited with status $ac_status" >&5
21287 echo "$as_me: failed program was:" >&5
21288 cat "conftest.$ac_ext" >&5
21289 cf_cv_func_nanosleep=no
21290 fi
21291 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21292 fi
21293 fi
21294 echo "$as_me:21294: result: $cf_cv_func_nanosleep" >&5
21295 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
21296
21297 test "$cf_cv_func_nanosleep" = "yes" &&
21298 cat >>confdefs.h <<\EOF
21299 #define HAVE_NANOSLEEP 1
21300 EOF
21301
21302 for ac_header in \
21303 termio.h \
21304 termios.h \
21305 unistd.h \
21306 sys/ioctl.h \
21307 sys/termio.h \
21308
21309 do
21310 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21311 echo "$as_me:21311: checking for $ac_header" >&5
21312 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21313 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21314   echo $ECHO_N "(cached) $ECHO_C" >&6
21315 else
21316   cat >"conftest.$ac_ext" <<_ACEOF
21317 #line 21317 "configure"
21318 #include "confdefs.h"
21319 #include <$ac_header>
21320 _ACEOF
21321 if { (eval echo "$as_me:21321: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21322   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21323   ac_status=$?
21324   $EGREP -v '^ *\+' conftest.er1 >conftest.err
21325   rm -f conftest.er1
21326   cat conftest.err >&5
21327   echo "$as_me:21327: \$? = $ac_status" >&5
21328   (exit "$ac_status"); } >/dev/null; then
21329   if test -s conftest.err; then
21330     ac_cpp_err=$ac_c_preproc_warn_flag
21331   else
21332     ac_cpp_err=
21333   fi
21334 else
21335   ac_cpp_err=yes
21336 fi
21337 if test -z "$ac_cpp_err"; then
21338   eval "$as_ac_Header=yes"
21339 else
21340   echo "$as_me: failed program was:" >&5
21341   cat "conftest.$ac_ext" >&5
21342   eval "$as_ac_Header=no"
21343 fi
21344 rm -f conftest.err "conftest.$ac_ext"
21345 fi
21346 echo "$as_me:21346: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
21347 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
21348 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
21349   cat >>confdefs.h <<EOF
21350 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21351 EOF
21352
21353 fi
21354 done
21355
21356 if test "$ac_cv_header_termios_h" = yes ; then
21357         case "$CFLAGS $CPPFLAGS" in
21358         (*-D_POSIX_SOURCE*)
21359                 termios_bad=dunno ;;
21360         (*)     termios_bad=maybe ;;
21361         esac
21362         if test "$termios_bad" = maybe ; then
21363         echo "$as_me:21363: checking whether termios.h needs _POSIX_SOURCE" >&5
21364 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
21365         cat >"conftest.$ac_ext" <<_ACEOF
21366 #line 21366 "configure"
21367 #include "confdefs.h"
21368 #include <termios.h>
21369 int
21370 main (void)
21371 {
21372 struct termios foo; int x = foo.c_iflag = 1; (void)x
21373   ;
21374   return 0;
21375 }
21376 _ACEOF
21377 rm -f "conftest.$ac_objext"
21378 if { (eval echo "$as_me:21378: \"$ac_compile\"") >&5
21379   (eval $ac_compile) 2>&5
21380   ac_status=$?
21381   echo "$as_me:21381: \$? = $ac_status" >&5
21382   (exit "$ac_status"); } &&
21383          { ac_try='test -s "conftest.$ac_objext"'
21384   { (eval echo "$as_me:21384: \"$ac_try\"") >&5
21385   (eval $ac_try) 2>&5
21386   ac_status=$?
21387   echo "$as_me:21387: \$? = $ac_status" >&5
21388   (exit "$ac_status"); }; }; then
21389   termios_bad=no
21390 else
21391   echo "$as_me: failed program was:" >&5
21392 cat "conftest.$ac_ext" >&5
21393
21394                 cat >"conftest.$ac_ext" <<_ACEOF
21395 #line 21395 "configure"
21396 #include "confdefs.h"
21397
21398 #define _POSIX_SOURCE
21399 #include <termios.h>
21400 int
21401 main (void)
21402 {
21403 struct termios foo; int x = foo.c_iflag = 2; (void)x
21404   ;
21405   return 0;
21406 }
21407 _ACEOF
21408 rm -f "conftest.$ac_objext"
21409 if { (eval echo "$as_me:21409: \"$ac_compile\"") >&5
21410   (eval $ac_compile) 2>&5
21411   ac_status=$?
21412   echo "$as_me:21412: \$? = $ac_status" >&5
21413   (exit "$ac_status"); } &&
21414          { ac_try='test -s "conftest.$ac_objext"'
21415   { (eval echo "$as_me:21415: \"$ac_try\"") >&5
21416   (eval $ac_try) 2>&5
21417   ac_status=$?
21418   echo "$as_me:21418: \$? = $ac_status" >&5
21419   (exit "$ac_status"); }; }; then
21420   termios_bad=unknown
21421 else
21422   echo "$as_me: failed program was:" >&5
21423 cat "conftest.$ac_ext" >&5
21424 termios_bad=yes
21425 cat >>confdefs.h <<\EOF
21426 #define _POSIX_SOURCE 1
21427 EOF
21428
21429 fi
21430 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21431
21432 fi
21433 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21434         echo "$as_me:21434: result: $termios_bad" >&5
21435 echo "${ECHO_T}$termios_bad" >&6
21436         fi
21437 fi
21438
21439 echo "$as_me:21439: checking for tcgetattr" >&5
21440 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
21441 if test "${cf_cv_have_tcgetattr+set}" = set; then
21442   echo $ECHO_N "(cached) $ECHO_C" >&6
21443 else
21444
21445 cat >"conftest.$ac_ext" <<_ACEOF
21446 #line 21446 "configure"
21447 #include "confdefs.h"
21448
21449 #include <sys/types.h>
21450 #ifdef HAVE_UNISTD_H
21451 #include <unistd.h>
21452 #endif
21453 #ifdef HAVE_TERMIOS_H
21454 #include <termios.h>
21455 #define TTY struct termios
21456 #else
21457 #ifdef HAVE_TERMIO_H
21458 #include <termio.h>
21459 #define TTY struct termio
21460 #endif
21461 #endif
21462
21463 int
21464 main (void)
21465 {
21466
21467 TTY foo;
21468 tcgetattr(1, &foo);
21469   ;
21470   return 0;
21471 }
21472 _ACEOF
21473 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21474 if { (eval echo "$as_me:21474: \"$ac_link\"") >&5
21475   (eval $ac_link) 2>&5
21476   ac_status=$?
21477   echo "$as_me:21477: \$? = $ac_status" >&5
21478   (exit "$ac_status"); } &&
21479          { ac_try='test -s "conftest$ac_exeext"'
21480   { (eval echo "$as_me:21480: \"$ac_try\"") >&5
21481   (eval $ac_try) 2>&5
21482   ac_status=$?
21483   echo "$as_me:21483: \$? = $ac_status" >&5
21484   (exit "$ac_status"); }; }; then
21485   cf_cv_have_tcgetattr=yes
21486 else
21487   echo "$as_me: failed program was:" >&5
21488 cat "conftest.$ac_ext" >&5
21489 cf_cv_have_tcgetattr=no
21490 fi
21491 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21492 fi
21493 echo "$as_me:21493: result: $cf_cv_have_tcgetattr" >&5
21494 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
21495 test "$cf_cv_have_tcgetattr" = yes &&
21496 cat >>confdefs.h <<\EOF
21497 #define HAVE_TCGETATTR 1
21498 EOF
21499
21500 echo "$as_me:21500: checking for vsscanf function or workaround" >&5
21501 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
21502 if test "${cf_cv_func_vsscanf+set}" = set; then
21503   echo $ECHO_N "(cached) $ECHO_C" >&6
21504 else
21505
21506 cat >"conftest.$ac_ext" <<_ACEOF
21507 #line 21507 "configure"
21508 #include "confdefs.h"
21509
21510 #include <stdarg.h>
21511 #include <stdio.h>
21512 int
21513 main (void)
21514 {
21515
21516         va_list ap;
21517         vsscanf("from", "%d", ap)
21518   ;
21519   return 0;
21520 }
21521 _ACEOF
21522 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21523 if { (eval echo "$as_me:21523: \"$ac_link\"") >&5
21524   (eval $ac_link) 2>&5
21525   ac_status=$?
21526   echo "$as_me:21526: \$? = $ac_status" >&5
21527   (exit "$ac_status"); } &&
21528          { ac_try='test -s "conftest$ac_exeext"'
21529   { (eval echo "$as_me:21529: \"$ac_try\"") >&5
21530   (eval $ac_try) 2>&5
21531   ac_status=$?
21532   echo "$as_me:21532: \$? = $ac_status" >&5
21533   (exit "$ac_status"); }; }; then
21534   cf_cv_func_vsscanf=vsscanf
21535 else
21536   echo "$as_me: failed program was:" >&5
21537 cat "conftest.$ac_ext" >&5
21538
21539 cat >"conftest.$ac_ext" <<_ACEOF
21540 #line 21540 "configure"
21541 #include "confdefs.h"
21542
21543 #include <stdarg.h>
21544 #include <stdio.h>
21545 int
21546 main (void)
21547 {
21548
21549         FILE strbuf;
21550         char *str = "from";
21551
21552         strbuf._flag = _IOREAD;
21553         strbuf._ptr = strbuf._base = (unsigned char *) str;
21554         strbuf._cnt = strlen(str);
21555         strbuf._file = _NFILE;
21556         return (vfscanf(&strbuf, "%d", ap))
21557   ;
21558   return 0;
21559 }
21560 _ACEOF
21561 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21562 if { (eval echo "$as_me:21562: \"$ac_link\"") >&5
21563   (eval $ac_link) 2>&5
21564   ac_status=$?
21565   echo "$as_me:21565: \$? = $ac_status" >&5
21566   (exit "$ac_status"); } &&
21567          { ac_try='test -s "conftest$ac_exeext"'
21568   { (eval echo "$as_me:21568: \"$ac_try\"") >&5
21569   (eval $ac_try) 2>&5
21570   ac_status=$?
21571   echo "$as_me:21571: \$? = $ac_status" >&5
21572   (exit "$ac_status"); }; }; then
21573   cf_cv_func_vsscanf=vfscanf
21574 else
21575   echo "$as_me: failed program was:" >&5
21576 cat "conftest.$ac_ext" >&5
21577
21578 cat >"conftest.$ac_ext" <<_ACEOF
21579 #line 21579 "configure"
21580 #include "confdefs.h"
21581
21582 #include <stdarg.h>
21583 #include <stdio.h>
21584 int
21585 main (void)
21586 {
21587
21588         FILE strbuf;
21589         char *str = "from";
21590
21591         strbuf._flag = _IOREAD;
21592         strbuf._ptr = strbuf._base = (unsigned char *) str;
21593         strbuf._cnt = strlen(str);
21594         strbuf._file = _NFILE;
21595         return (_doscan(&strbuf, "%d", ap))
21596   ;
21597   return 0;
21598 }
21599 _ACEOF
21600 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21601 if { (eval echo "$as_me:21601: \"$ac_link\"") >&5
21602   (eval $ac_link) 2>&5
21603   ac_status=$?
21604   echo "$as_me:21604: \$? = $ac_status" >&5
21605   (exit "$ac_status"); } &&
21606          { ac_try='test -s "conftest$ac_exeext"'
21607   { (eval echo "$as_me:21607: \"$ac_try\"") >&5
21608   (eval $ac_try) 2>&5
21609   ac_status=$?
21610   echo "$as_me:21610: \$? = $ac_status" >&5
21611   (exit "$ac_status"); }; }; then
21612   cf_cv_func_vsscanf=_doscan
21613 else
21614   echo "$as_me: failed program was:" >&5
21615 cat "conftest.$ac_ext" >&5
21616
21617 cf_cv_func_vsscanf=no
21618 fi
21619 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21620 fi
21621 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21622 fi
21623 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21624 fi
21625 echo "$as_me:21625: result: $cf_cv_func_vsscanf" >&5
21626 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
21627
21628 case "$cf_cv_func_vsscanf" in
21629 (vsscanf)
21630 cat >>confdefs.h <<\EOF
21631 #define HAVE_VSSCANF 1
21632 EOF
21633 ;;
21634 (vfscanf)
21635 cat >>confdefs.h <<\EOF
21636 #define HAVE_VFSCANF 1
21637 EOF
21638 ;;
21639 (_doscan)
21640 cat >>confdefs.h <<\EOF
21641 #define HAVE__DOSCAN 1
21642 EOF
21643 ;;
21644 esac
21645
21646 for ac_header in \
21647 unistd.h \
21648
21649 do
21650 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21651 echo "$as_me:21651: checking for $ac_header" >&5
21652 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21653 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21654   echo $ECHO_N "(cached) $ECHO_C" >&6
21655 else
21656   cat >"conftest.$ac_ext" <<_ACEOF
21657 #line 21657 "configure"
21658 #include "confdefs.h"
21659 #include <$ac_header>
21660 _ACEOF
21661 if { (eval echo "$as_me:21661: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21662   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21663   ac_status=$?
21664   $EGREP -v '^ *\+' conftest.er1 >conftest.err
21665   rm -f conftest.er1
21666   cat conftest.err >&5
21667   echo "$as_me:21667: \$? = $ac_status" >&5
21668   (exit "$ac_status"); } >/dev/null; then
21669   if test -s conftest.err; then
21670     ac_cpp_err=$ac_c_preproc_warn_flag
21671   else
21672     ac_cpp_err=
21673   fi
21674 else
21675   ac_cpp_err=yes
21676 fi
21677 if test -z "$ac_cpp_err"; then
21678   eval "$as_ac_Header=yes"
21679 else
21680   echo "$as_me: failed program was:" >&5
21681   cat "conftest.$ac_ext" >&5
21682   eval "$as_ac_Header=no"
21683 fi
21684 rm -f conftest.err "conftest.$ac_ext"
21685 fi
21686 echo "$as_me:21686: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
21687 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
21688 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
21689   cat >>confdefs.h <<EOF
21690 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21691 EOF
21692
21693 fi
21694 done
21695
21696 echo "$as_me:21696: checking for working mkstemp" >&5
21697 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
21698 if test "${cf_cv_func_mkstemp+set}" = set; then
21699   echo $ECHO_N "(cached) $ECHO_C" >&6
21700 else
21701
21702 rm -rf ./conftest*
21703 if test "$cross_compiling" = yes; then
21704   cf_cv_func_mkstemp=maybe
21705 else
21706   cat >"conftest.$ac_ext" <<_ACEOF
21707 #line 21707 "configure"
21708 #include "confdefs.h"
21709
21710 #include <sys/types.h>
21711 #ifdef HAVE_UNISTD_H
21712 #include <unistd.h>
21713 #endif
21714 #include <stdlib.h>
21715 #include <stdio.h>
21716 #include <string.h>
21717 #include <sys/stat.h>
21718 int main(void)
21719 {
21720         char *tmpl = "conftestXXXXXX";
21721         char name[2][80];
21722         int n;
21723         int result = 0;
21724         int fd;
21725         struct stat sb;
21726
21727         umask(077);
21728         for (n = 0; n < 2; ++n) {
21729                 strcpy(name[n], tmpl);
21730                 if ((fd = mkstemp(name[n])) >= 0) {
21731                         if (!strcmp(name[n], tmpl)
21732                          || stat(name[n], &sb) != 0
21733                          || (sb.st_mode & S_IFMT) != S_IFREG
21734                          || (sb.st_mode & 077) != 0) {
21735                                 result = 1;
21736                         }
21737                         close(fd);
21738                 }
21739         }
21740         if (result == 0
21741          && !strcmp(name[0], name[1]))
21742                 result = 1;
21743         ${cf_cv_main_return:-return}(result);
21744 }
21745
21746 _ACEOF
21747 rm -f "conftest$ac_exeext"
21748 if { (eval echo "$as_me:21748: \"$ac_link\"") >&5
21749   (eval $ac_link) 2>&5
21750   ac_status=$?
21751   echo "$as_me:21751: \$? = $ac_status" >&5
21752   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21753   { (eval echo "$as_me:21753: \"$ac_try\"") >&5
21754   (eval $ac_try) 2>&5
21755   ac_status=$?
21756   echo "$as_me:21756: \$? = $ac_status" >&5
21757   (exit "$ac_status"); }; }; then
21758   cf_cv_func_mkstemp=yes
21759
21760 else
21761   echo "$as_me: program exited with status $ac_status" >&5
21762 echo "$as_me: failed program was:" >&5
21763 cat "conftest.$ac_ext" >&5
21764 cf_cv_func_mkstemp=no
21765
21766 fi
21767 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21768 fi
21769
21770 fi
21771 echo "$as_me:21771: result: $cf_cv_func_mkstemp" >&5
21772 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
21773 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
21774         echo "$as_me:21774: checking for mkstemp" >&5
21775 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
21776 if test "${ac_cv_func_mkstemp+set}" = set; then
21777   echo $ECHO_N "(cached) $ECHO_C" >&6
21778 else
21779   cat >"conftest.$ac_ext" <<_ACEOF
21780 #line 21780 "configure"
21781 #include "confdefs.h"
21782 #define mkstemp autoconf_temporary
21783 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21784 #undef mkstemp
21785
21786 #ifdef __cplusplus
21787 extern "C"
21788 #endif
21789
21790 /* We use char because int might match the return type of a gcc2
21791    builtin and then its argument prototype would still apply.  */
21792 char mkstemp (void);
21793
21794 int
21795 main (void)
21796 {
21797
21798 /* The GNU C library defines stubs for functions which it implements
21799     to always fail with ENOSYS.  Some functions are actually named
21800     something starting with __ and the normal name is an alias.  */
21801 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
21802 #error found stub for mkstemp
21803 #endif
21804
21805         return mkstemp ();
21806   ;
21807   return 0;
21808 }
21809 _ACEOF
21810 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21811 if { (eval echo "$as_me:21811: \"$ac_link\"") >&5
21812   (eval $ac_link) 2>&5
21813   ac_status=$?
21814   echo "$as_me:21814: \$? = $ac_status" >&5
21815   (exit "$ac_status"); } &&
21816          { ac_try='test -s "conftest$ac_exeext"'
21817   { (eval echo "$as_me:21817: \"$ac_try\"") >&5
21818   (eval $ac_try) 2>&5
21819   ac_status=$?
21820   echo "$as_me:21820: \$? = $ac_status" >&5
21821   (exit "$ac_status"); }; }; then
21822   ac_cv_func_mkstemp=yes
21823 else
21824   echo "$as_me: failed program was:" >&5
21825 cat "conftest.$ac_ext" >&5
21826 ac_cv_func_mkstemp=no
21827 fi
21828 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21829 fi
21830 echo "$as_me:21830: result: $ac_cv_func_mkstemp" >&5
21831 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
21832
21833 fi
21834 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
21835
21836 cat >>confdefs.h <<\EOF
21837 #define HAVE_MKSTEMP 1
21838 EOF
21839
21840 fi
21841
21842 # setup for prototype of fallback for vsscanf()
21843
21844 if test "$cf_cv_func_vsscanf" = vsscanf ; then
21845         HAVE_VSSCANF=1
21846 else
21847         HAVE_VSSCANF=0
21848 fi
21849
21850 if test "x$cross_compiling" = xyes ; then
21851         { echo "$as_me:21851: WARNING: cross compiling: assume setvbuf params not reversed" >&5
21852 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
21853 else
21854         echo "$as_me:21854: checking whether setvbuf arguments are reversed" >&5
21855 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
21856 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
21857   echo $ECHO_N "(cached) $ECHO_C" >&6
21858 else
21859   if test "$cross_compiling" = yes; then
21860   { { echo "$as_me:21860: error: cannot run test program while cross compiling" >&5
21861 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21862    { (exit 1); exit 1; }; }
21863 else
21864   cat >"conftest.$ac_ext" <<_ACEOF
21865 #line 21865 "configure"
21866 #include "confdefs.h"
21867 #include <stdio.h>
21868 /* If setvbuf has the reversed format, exit 0. */
21869 int
21870 main (void)
21871 {
21872   /* This call has the arguments reversed.
21873      A reversed system may check and see that the address of main
21874      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
21875   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
21876     $ac_main_return(1);
21877   putc('\r', stdout);
21878   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
21879 }
21880 _ACEOF
21881 rm -f "conftest$ac_exeext"
21882 if { (eval echo "$as_me:21882: \"$ac_link\"") >&5
21883   (eval $ac_link) 2>&5
21884   ac_status=$?
21885   echo "$as_me:21885: \$? = $ac_status" >&5
21886   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21887   { (eval echo "$as_me:21887: \"$ac_try\"") >&5
21888   (eval $ac_try) 2>&5
21889   ac_status=$?
21890   echo "$as_me:21890: \$? = $ac_status" >&5
21891   (exit "$ac_status"); }; }; then
21892   ac_cv_func_setvbuf_reversed=yes
21893 else
21894   echo "$as_me: program exited with status $ac_status" >&5
21895 echo "$as_me: failed program was:" >&5
21896 cat "conftest.$ac_ext" >&5
21897 ac_cv_func_setvbuf_reversed=no
21898 fi
21899 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21900 fi
21901 rm -f core ./core.* ./*.core
21902 fi
21903 echo "$as_me:21903: result: $ac_cv_func_setvbuf_reversed" >&5
21904 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
21905 if test $ac_cv_func_setvbuf_reversed = yes; then
21906
21907 cat >>confdefs.h <<\EOF
21908 #define SETVBUF_REVERSED 1
21909 EOF
21910
21911 fi
21912
21913 fi
21914 echo "$as_me:21914: checking for intptr_t" >&5
21915 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
21916 if test "${ac_cv_type_intptr_t+set}" = set; then
21917   echo $ECHO_N "(cached) $ECHO_C" >&6
21918 else
21919   cat >"conftest.$ac_ext" <<_ACEOF
21920 #line 21920 "configure"
21921 #include "confdefs.h"
21922 $ac_includes_default
21923 int
21924 main (void)
21925 {
21926 if ((intptr_t *) 0)
21927   return 0;
21928 if (sizeof (intptr_t))
21929   return 0;
21930   ;
21931   return 0;
21932 }
21933 _ACEOF
21934 rm -f "conftest.$ac_objext"
21935 if { (eval echo "$as_me:21935: \"$ac_compile\"") >&5
21936   (eval $ac_compile) 2>&5
21937   ac_status=$?
21938   echo "$as_me:21938: \$? = $ac_status" >&5
21939   (exit "$ac_status"); } &&
21940          { ac_try='test -s "conftest.$ac_objext"'
21941   { (eval echo "$as_me:21941: \"$ac_try\"") >&5
21942   (eval $ac_try) 2>&5
21943   ac_status=$?
21944   echo "$as_me:21944: \$? = $ac_status" >&5
21945   (exit "$ac_status"); }; }; then
21946   ac_cv_type_intptr_t=yes
21947 else
21948   echo "$as_me: failed program was:" >&5
21949 cat "conftest.$ac_ext" >&5
21950 ac_cv_type_intptr_t=no
21951 fi
21952 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21953 fi
21954 echo "$as_me:21954: result: $ac_cv_type_intptr_t" >&5
21955 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
21956 if test "$ac_cv_type_intptr_t" = yes; then
21957   :
21958 else
21959
21960 cat >>confdefs.h <<EOF
21961 #define intptr_t long
21962 EOF
21963
21964 fi
21965
21966 echo "$as_me:21966: checking for ssize_t" >&5
21967 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
21968 if test "${ac_cv_type_ssize_t+set}" = set; then
21969   echo $ECHO_N "(cached) $ECHO_C" >&6
21970 else
21971   cat >"conftest.$ac_ext" <<_ACEOF
21972 #line 21972 "configure"
21973 #include "confdefs.h"
21974 $ac_includes_default
21975 int
21976 main (void)
21977 {
21978 if ((ssize_t *) 0)
21979   return 0;
21980 if (sizeof (ssize_t))
21981   return 0;
21982   ;
21983   return 0;
21984 }
21985 _ACEOF
21986 rm -f "conftest.$ac_objext"
21987 if { (eval echo "$as_me:21987: \"$ac_compile\"") >&5
21988   (eval $ac_compile) 2>&5
21989   ac_status=$?
21990   echo "$as_me:21990: \$? = $ac_status" >&5
21991   (exit "$ac_status"); } &&
21992          { ac_try='test -s "conftest.$ac_objext"'
21993   { (eval echo "$as_me:21993: \"$ac_try\"") >&5
21994   (eval $ac_try) 2>&5
21995   ac_status=$?
21996   echo "$as_me:21996: \$? = $ac_status" >&5
21997   (exit "$ac_status"); }; }; then
21998   ac_cv_type_ssize_t=yes
21999 else
22000   echo "$as_me: failed program was:" >&5
22001 cat "conftest.$ac_ext" >&5
22002 ac_cv_type_ssize_t=no
22003 fi
22004 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22005 fi
22006 echo "$as_me:22006: result: $ac_cv_type_ssize_t" >&5
22007 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
22008 if test "$ac_cv_type_ssize_t" = yes; then
22009   :
22010 else
22011
22012 cat >>confdefs.h <<EOF
22013 #define ssize_t int
22014 EOF
22015
22016 fi
22017
22018 echo "$as_me:22018: checking for type sigaction_t" >&5
22019 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
22020 if test "${cf_cv_type_sigaction+set}" = set; then
22021   echo $ECHO_N "(cached) $ECHO_C" >&6
22022 else
22023
22024         cat >"conftest.$ac_ext" <<_ACEOF
22025 #line 22025 "configure"
22026 #include "confdefs.h"
22027
22028 #include <signal.h>
22029 int
22030 main (void)
22031 {
22032 sigaction_t x
22033   ;
22034   return 0;
22035 }
22036 _ACEOF
22037 rm -f "conftest.$ac_objext"
22038 if { (eval echo "$as_me:22038: \"$ac_compile\"") >&5
22039   (eval $ac_compile) 2>&5
22040   ac_status=$?
22041   echo "$as_me:22041: \$? = $ac_status" >&5
22042   (exit "$ac_status"); } &&
22043          { ac_try='test -s "conftest.$ac_objext"'
22044   { (eval echo "$as_me:22044: \"$ac_try\"") >&5
22045   (eval $ac_try) 2>&5
22046   ac_status=$?
22047   echo "$as_me:22047: \$? = $ac_status" >&5
22048   (exit "$ac_status"); }; }; then
22049   cf_cv_type_sigaction=yes
22050 else
22051   echo "$as_me: failed program was:" >&5
22052 cat "conftest.$ac_ext" >&5
22053 cf_cv_type_sigaction=no
22054 fi
22055 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22056 fi
22057
22058 echo "$as_me:22058: result: $cf_cv_type_sigaction" >&5
22059 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
22060 test "$cf_cv_type_sigaction" = yes &&
22061 cat >>confdefs.h <<\EOF
22062 #define HAVE_TYPE_SIGACTION 1
22063 EOF
22064
22065 echo "$as_me:22065: checking declaration of size-change" >&5
22066 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
22067 if test "${cf_cv_sizechange+set}" = set; then
22068   echo $ECHO_N "(cached) $ECHO_C" >&6
22069 else
22070
22071         cf_cv_sizechange=unknown
22072         cf_save_CPPFLAGS="$CPPFLAGS"
22073
22074 for cf_opts in "" "NEED_PTEM_H"
22075 do
22076
22077         CPPFLAGS="$cf_save_CPPFLAGS"
22078         if test -n "$cf_opts"
22079         then
22080
22081         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22082         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
22083
22084         fi
22085         cat >"conftest.$ac_ext" <<_ACEOF
22086 #line 22086 "configure"
22087 #include "confdefs.h"
22088 #include <sys/types.h>
22089 #ifdef HAVE_TERMIOS_H
22090 #include <termios.h>
22091 #else
22092 #ifdef HAVE_TERMIO_H
22093 #include <termio.h>
22094 #endif
22095 #endif
22096
22097 #ifdef NEED_PTEM_H
22098 /* This is a workaround for SCO:  they neglected to define struct winsize in
22099  * termios.h -- it's only in termio.h and ptem.h
22100  */
22101 #include <sys/stream.h>
22102 #include <sys/ptem.h>
22103 #endif
22104
22105 #ifdef HAVE_SYS_IOCTL_H
22106 #include <sys/ioctl.h>
22107 #endif
22108
22109 int
22110 main (void)
22111 {
22112
22113 #ifdef TIOCGSIZE
22114         struct ttysize win;     /* SunOS 3.0... */
22115         int y = win.ts_lines = 2;
22116         int x = win.ts_cols = 1;
22117         (void)y;
22118         (void)x;
22119 #else
22120 #ifdef TIOCGWINSZ
22121         struct winsize win;     /* everything else */
22122         int y = win.ws_row = 2;
22123         int x = win.ws_col = 1;
22124         (void)y;
22125         (void)x;
22126 #else
22127         no TIOCGSIZE or TIOCGWINSZ
22128 #endif /* TIOCGWINSZ */
22129 #endif /* TIOCGSIZE */
22130
22131   ;
22132   return 0;
22133 }
22134 _ACEOF
22135 rm -f "conftest.$ac_objext"
22136 if { (eval echo "$as_me:22136: \"$ac_compile\"") >&5
22137   (eval $ac_compile) 2>&5
22138   ac_status=$?
22139   echo "$as_me:22139: \$? = $ac_status" >&5
22140   (exit "$ac_status"); } &&
22141          { ac_try='test -s "conftest.$ac_objext"'
22142   { (eval echo "$as_me:22142: \"$ac_try\"") >&5
22143   (eval $ac_try) 2>&5
22144   ac_status=$?
22145   echo "$as_me:22145: \$? = $ac_status" >&5
22146   (exit "$ac_status"); }; }; then
22147   cf_cv_sizechange=yes
22148 else
22149   echo "$as_me: failed program was:" >&5
22150 cat "conftest.$ac_ext" >&5
22151 cf_cv_sizechange=no
22152 fi
22153 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22154
22155         CPPFLAGS="$cf_save_CPPFLAGS"
22156         if test "$cf_cv_sizechange" = yes ; then
22157                 echo "size-change succeeded ($cf_opts)" >&5
22158                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
22159                 break
22160         fi
22161 done
22162
22163 fi
22164 echo "$as_me:22164: result: $cf_cv_sizechange" >&5
22165 echo "${ECHO_T}$cf_cv_sizechange" >&6
22166 if test "$cf_cv_sizechange" != no ; then
22167
22168 cat >>confdefs.h <<\EOF
22169 #define HAVE_SIZECHANGE 1
22170 EOF
22171
22172         case "$cf_cv_sizechange" in
22173         (NEED*)
22174                 cat >>confdefs.h <<EOF
22175 #define $cf_cv_sizechange  1
22176 EOF
22177
22178                 ;;
22179         esac
22180 fi
22181
22182 echo "$as_me:22182: checking for memmove" >&5
22183 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
22184 if test "${ac_cv_func_memmove+set}" = set; then
22185   echo $ECHO_N "(cached) $ECHO_C" >&6
22186 else
22187   cat >"conftest.$ac_ext" <<_ACEOF
22188 #line 22188 "configure"
22189 #include "confdefs.h"
22190 #define memmove autoconf_temporary
22191 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22192 #undef memmove
22193
22194 #ifdef __cplusplus
22195 extern "C"
22196 #endif
22197
22198 /* We use char because int might match the return type of a gcc2
22199    builtin and then its argument prototype would still apply.  */
22200 char memmove (void);
22201
22202 int
22203 main (void)
22204 {
22205
22206 /* The GNU C library defines stubs for functions which it implements
22207     to always fail with ENOSYS.  Some functions are actually named
22208     something starting with __ and the normal name is an alias.  */
22209 #if defined (__stub_memmove) || defined (__stub___memmove)
22210 #error found stub for memmove
22211 #endif
22212
22213         return memmove ();
22214   ;
22215   return 0;
22216 }
22217 _ACEOF
22218 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22219 if { (eval echo "$as_me:22219: \"$ac_link\"") >&5
22220   (eval $ac_link) 2>&5
22221   ac_status=$?
22222   echo "$as_me:22222: \$? = $ac_status" >&5
22223   (exit "$ac_status"); } &&
22224          { ac_try='test -s "conftest$ac_exeext"'
22225   { (eval echo "$as_me:22225: \"$ac_try\"") >&5
22226   (eval $ac_try) 2>&5
22227   ac_status=$?
22228   echo "$as_me:22228: \$? = $ac_status" >&5
22229   (exit "$ac_status"); }; }; then
22230   ac_cv_func_memmove=yes
22231 else
22232   echo "$as_me: failed program was:" >&5
22233 cat "conftest.$ac_ext" >&5
22234 ac_cv_func_memmove=no
22235 fi
22236 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22237 fi
22238 echo "$as_me:22238: result: $ac_cv_func_memmove" >&5
22239 echo "${ECHO_T}$ac_cv_func_memmove" >&6
22240 if test "$ac_cv_func_memmove" = yes; then
22241   :
22242 else
22243
22244 echo "$as_me:22244: checking for bcopy" >&5
22245 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
22246 if test "${ac_cv_func_bcopy+set}" = set; then
22247   echo $ECHO_N "(cached) $ECHO_C" >&6
22248 else
22249   cat >"conftest.$ac_ext" <<_ACEOF
22250 #line 22250 "configure"
22251 #include "confdefs.h"
22252 #define bcopy autoconf_temporary
22253 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22254 #undef bcopy
22255
22256 #ifdef __cplusplus
22257 extern "C"
22258 #endif
22259
22260 /* We use char because int might match the return type of a gcc2
22261    builtin and then its argument prototype would still apply.  */
22262 char bcopy (void);
22263
22264 int
22265 main (void)
22266 {
22267
22268 /* The GNU C library defines stubs for functions which it implements
22269     to always fail with ENOSYS.  Some functions are actually named
22270     something starting with __ and the normal name is an alias.  */
22271 #if defined (__stub_bcopy) || defined (__stub___bcopy)
22272 #error found stub for bcopy
22273 #endif
22274
22275         return bcopy ();
22276   ;
22277   return 0;
22278 }
22279 _ACEOF
22280 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22281 if { (eval echo "$as_me:22281: \"$ac_link\"") >&5
22282   (eval $ac_link) 2>&5
22283   ac_status=$?
22284   echo "$as_me:22284: \$? = $ac_status" >&5
22285   (exit "$ac_status"); } &&
22286          { ac_try='test -s "conftest$ac_exeext"'
22287   { (eval echo "$as_me:22287: \"$ac_try\"") >&5
22288   (eval $ac_try) 2>&5
22289   ac_status=$?
22290   echo "$as_me:22290: \$? = $ac_status" >&5
22291   (exit "$ac_status"); }; }; then
22292   ac_cv_func_bcopy=yes
22293 else
22294   echo "$as_me: failed program was:" >&5
22295 cat "conftest.$ac_ext" >&5
22296 ac_cv_func_bcopy=no
22297 fi
22298 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22299 fi
22300 echo "$as_me:22300: result: $ac_cv_func_bcopy" >&5
22301 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
22302 if test "$ac_cv_func_bcopy" = yes; then
22303
22304         echo "$as_me:22304: checking if bcopy does overlapping moves" >&5
22305 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
22306 if test "${cf_cv_good_bcopy+set}" = set; then
22307   echo $ECHO_N "(cached) $ECHO_C" >&6
22308 else
22309
22310                 if test "$cross_compiling" = yes; then
22311   cf_cv_good_bcopy=unknown
22312 else
22313   cat >"conftest.$ac_ext" <<_ACEOF
22314 #line 22314 "configure"
22315 #include "confdefs.h"
22316
22317 int main(void) {
22318         static char data[] = "abcdefghijklmnopqrstuwwxyz";
22319         char temp[40];
22320         bcopy(data, temp, sizeof(data));
22321         bcopy(temp+10, temp, 15);
22322         bcopy(temp+5, temp+15, 10);
22323         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
22324 }
22325
22326 _ACEOF
22327 rm -f "conftest$ac_exeext"
22328 if { (eval echo "$as_me:22328: \"$ac_link\"") >&5
22329   (eval $ac_link) 2>&5
22330   ac_status=$?
22331   echo "$as_me:22331: \$? = $ac_status" >&5
22332   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22333   { (eval echo "$as_me:22333: \"$ac_try\"") >&5
22334   (eval $ac_try) 2>&5
22335   ac_status=$?
22336   echo "$as_me:22336: \$? = $ac_status" >&5
22337   (exit "$ac_status"); }; }; then
22338   cf_cv_good_bcopy=yes
22339 else
22340   echo "$as_me: program exited with status $ac_status" >&5
22341 echo "$as_me: failed program was:" >&5
22342 cat "conftest.$ac_ext" >&5
22343 cf_cv_good_bcopy=no
22344 fi
22345 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22346 fi
22347
22348 fi
22349 echo "$as_me:22349: result: $cf_cv_good_bcopy" >&5
22350 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
22351
22352 else
22353   cf_cv_good_bcopy=no
22354 fi
22355
22356         if test "$cf_cv_good_bcopy" = yes ; then
22357
22358 cat >>confdefs.h <<\EOF
22359 #define USE_OK_BCOPY 1
22360 EOF
22361
22362         else
22363
22364 cat >>confdefs.h <<\EOF
22365 #define USE_MY_MEMMOVE 1
22366 EOF
22367
22368         fi
22369
22370 fi
22371
22372 tty >/dev/null 2>&1 || {
22373 for ac_func in posix_openpt
22374 do
22375 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22376 echo "$as_me:22376: checking for $ac_func" >&5
22377 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22378 if eval "test \"\${$as_ac_var+set}\" = set"; then
22379   echo $ECHO_N "(cached) $ECHO_C" >&6
22380 else
22381   cat >"conftest.$ac_ext" <<_ACEOF
22382 #line 22382 "configure"
22383 #include "confdefs.h"
22384 #define $ac_func autoconf_temporary
22385 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22386 #undef $ac_func
22387
22388 #ifdef __cplusplus
22389 extern "C"
22390 #endif
22391
22392 /* We use char because int might match the return type of a gcc2
22393    builtin and then its argument prototype would still apply.  */
22394 char $ac_func (void);
22395
22396 int
22397 main (void)
22398 {
22399
22400 /* The GNU C library defines stubs for functions which it implements
22401     to always fail with ENOSYS.  Some functions are actually named
22402     something starting with __ and the normal name is an alias.  */
22403 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22404 #error found stub for $ac_func
22405 #endif
22406
22407         return $ac_func ();
22408   ;
22409   return 0;
22410 }
22411 _ACEOF
22412 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22413 if { (eval echo "$as_me:22413: \"$ac_link\"") >&5
22414   (eval $ac_link) 2>&5
22415   ac_status=$?
22416   echo "$as_me:22416: \$? = $ac_status" >&5
22417   (exit "$ac_status"); } &&
22418          { ac_try='test -s "conftest$ac_exeext"'
22419   { (eval echo "$as_me:22419: \"$ac_try\"") >&5
22420   (eval $ac_try) 2>&5
22421   ac_status=$?
22422   echo "$as_me:22422: \$? = $ac_status" >&5
22423   (exit "$ac_status"); }; }; then
22424   eval "$as_ac_var=yes"
22425 else
22426   echo "$as_me: failed program was:" >&5
22427 cat "conftest.$ac_ext" >&5
22428 eval "$as_ac_var=no"
22429 fi
22430 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22431 fi
22432 echo "$as_me:22432: result: `eval echo '${'"$as_ac_var"'}'`" >&5
22433 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
22434 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
22435   cat >>confdefs.h <<EOF
22436 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22437 EOF
22438
22439 fi
22440 done
22441  }
22442 echo "$as_me:22442: checking if poll really works" >&5
22443 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
22444 if test "${cf_cv_working_poll+set}" = set; then
22445   echo $ECHO_N "(cached) $ECHO_C" >&6
22446 else
22447
22448 if test "$cross_compiling" = yes; then
22449   cf_cv_working_poll=unknown
22450 else
22451   cat >"conftest.$ac_ext" <<_ACEOF
22452 #line 22452 "configure"
22453 #include "confdefs.h"
22454
22455 #include <stdlib.h>
22456 #include <stdio.h>
22457 #include <unistd.h>
22458 #include <fcntl.h>
22459 #ifdef HAVE_POLL_H
22460 #include <poll.h>
22461 #else
22462 #include <sys/poll.h>
22463 #endif
22464 int main(void) {
22465         struct pollfd myfds;
22466         int ret;
22467
22468         /* check for Darwin bug with respect to "devices" */
22469         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
22470         if (myfds.fd < 0)
22471                 myfds.fd = 0;
22472         myfds.events = POLLIN;
22473         myfds.revents = 0;
22474
22475         ret = poll(&myfds, 1, 100);
22476
22477         if (ret < 0 || (myfds.revents & POLLNVAL)) {
22478                 ret = -1;
22479         } else {
22480                 int fd = 0;
22481                 if (!isatty(fd)) {
22482                         fd = open("/dev/tty", 2);       /* O_RDWR */
22483                 }
22484 #ifdef HAVE_POSIX_OPENPT
22485                 if (fd < 0) {
22486                         fd = posix_openpt(O_RDWR);
22487                 }
22488 #endif
22489
22490                 if (fd >= 0) {
22491                         /* also check with standard input */
22492                         myfds.fd = fd;
22493                         myfds.events = POLLIN;
22494                         myfds.revents = 0;
22495                         ret = poll(&myfds, 1, 100);
22496                 } else {
22497                         ret = -1;
22498                 }
22499         }
22500         ${cf_cv_main_return:-return}(ret < 0);
22501 }
22502 _ACEOF
22503 rm -f "conftest$ac_exeext"
22504 if { (eval echo "$as_me:22504: \"$ac_link\"") >&5
22505   (eval $ac_link) 2>&5
22506   ac_status=$?
22507   echo "$as_me:22507: \$? = $ac_status" >&5
22508   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22509   { (eval echo "$as_me:22509: \"$ac_try\"") >&5
22510   (eval $ac_try) 2>&5
22511   ac_status=$?
22512   echo "$as_me:22512: \$? = $ac_status" >&5
22513   (exit "$ac_status"); }; }; then
22514   cf_cv_working_poll=yes
22515 else
22516   echo "$as_me: program exited with status $ac_status" >&5
22517 echo "$as_me: failed program was:" >&5
22518 cat "conftest.$ac_ext" >&5
22519 cf_cv_working_poll=no
22520 fi
22521 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22522 fi
22523 fi
22524 echo "$as_me:22524: result: $cf_cv_working_poll" >&5
22525 echo "${ECHO_T}$cf_cv_working_poll" >&6
22526 test "$cf_cv_working_poll" = "yes" &&
22527 cat >>confdefs.h <<\EOF
22528 #define HAVE_WORKING_POLL 1
22529 EOF
22530
22531 echo "$as_me:22531: checking for va_copy" >&5
22532 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
22533 if test "${cf_cv_have_va_copy+set}" = set; then
22534   echo $ECHO_N "(cached) $ECHO_C" >&6
22535 else
22536
22537 cat >"conftest.$ac_ext" <<_ACEOF
22538 #line 22538 "configure"
22539 #include "confdefs.h"
22540
22541 #include <stdarg.h>
22542
22543 int
22544 main (void)
22545 {
22546
22547         static va_list dst;
22548         static va_list src;
22549         va_copy(dst, src)
22550   ;
22551   return 0;
22552 }
22553 _ACEOF
22554 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22555 if { (eval echo "$as_me:22555: \"$ac_link\"") >&5
22556   (eval $ac_link) 2>&5
22557   ac_status=$?
22558   echo "$as_me:22558: \$? = $ac_status" >&5
22559   (exit "$ac_status"); } &&
22560          { ac_try='test -s "conftest$ac_exeext"'
22561   { (eval echo "$as_me:22561: \"$ac_try\"") >&5
22562   (eval $ac_try) 2>&5
22563   ac_status=$?
22564   echo "$as_me:22564: \$? = $ac_status" >&5
22565   (exit "$ac_status"); }; }; then
22566   cf_cv_have_va_copy=yes
22567 else
22568   echo "$as_me: failed program was:" >&5
22569 cat "conftest.$ac_ext" >&5
22570 cf_cv_have_va_copy=no
22571 fi
22572 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22573 fi
22574 echo "$as_me:22574: result: $cf_cv_have_va_copy" >&5
22575 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
22576
22577 if test "$cf_cv_have_va_copy" = yes;
22578 then
22579
22580 cat >>confdefs.h <<\EOF
22581 #define HAVE_VA_COPY 1
22582 EOF
22583
22584 else # !cf_cv_have_va_copy
22585
22586 echo "$as_me:22586: checking for __va_copy" >&5
22587 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
22588 if test "${cf_cv_have___va_copy+set}" = set; then
22589   echo $ECHO_N "(cached) $ECHO_C" >&6
22590 else
22591
22592 cat >"conftest.$ac_ext" <<_ACEOF
22593 #line 22593 "configure"
22594 #include "confdefs.h"
22595
22596 #include <stdarg.h>
22597
22598 int
22599 main (void)
22600 {
22601
22602         static va_list dst;
22603         static va_list src;
22604         __va_copy(dst, src)
22605   ;
22606   return 0;
22607 }
22608 _ACEOF
22609 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22610 if { (eval echo "$as_me:22610: \"$ac_link\"") >&5
22611   (eval $ac_link) 2>&5
22612   ac_status=$?
22613   echo "$as_me:22613: \$? = $ac_status" >&5
22614   (exit "$ac_status"); } &&
22615          { ac_try='test -s "conftest$ac_exeext"'
22616   { (eval echo "$as_me:22616: \"$ac_try\"") >&5
22617   (eval $ac_try) 2>&5
22618   ac_status=$?
22619   echo "$as_me:22619: \$? = $ac_status" >&5
22620   (exit "$ac_status"); }; }; then
22621   cf_cv_have___va_copy=yes
22622 else
22623   echo "$as_me: failed program was:" >&5
22624 cat "conftest.$ac_ext" >&5
22625 cf_cv_have___va_copy=no
22626 fi
22627 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22628 fi
22629 echo "$as_me:22629: result: $cf_cv_have___va_copy" >&5
22630 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
22631
22632 if test "$cf_cv_have___va_copy" = yes
22633 then
22634
22635 cat >>confdefs.h <<\EOF
22636 #define HAVE___VA_COPY 1
22637 EOF
22638
22639 else # !cf_cv_have___va_copy
22640
22641 echo "$as_me:22641: checking for __builtin_va_copy" >&5
22642 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
22643 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
22644   echo $ECHO_N "(cached) $ECHO_C" >&6
22645 else
22646
22647 cat >"conftest.$ac_ext" <<_ACEOF
22648 #line 22648 "configure"
22649 #include "confdefs.h"
22650
22651 #include <stdarg.h>
22652
22653 int
22654 main (void)
22655 {
22656
22657         static va_list dst;
22658         static va_list src;
22659         __builtin_va_copy(dst, src)
22660   ;
22661   return 0;
22662 }
22663 _ACEOF
22664 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22665 if { (eval echo "$as_me:22665: \"$ac_link\"") >&5
22666   (eval $ac_link) 2>&5
22667   ac_status=$?
22668   echo "$as_me:22668: \$? = $ac_status" >&5
22669   (exit "$ac_status"); } &&
22670          { ac_try='test -s "conftest$ac_exeext"'
22671   { (eval echo "$as_me:22671: \"$ac_try\"") >&5
22672   (eval $ac_try) 2>&5
22673   ac_status=$?
22674   echo "$as_me:22674: \$? = $ac_status" >&5
22675   (exit "$ac_status"); }; }; then
22676   cf_cv_have___builtin_va_copy=yes
22677 else
22678   echo "$as_me: failed program was:" >&5
22679 cat "conftest.$ac_ext" >&5
22680 cf_cv_have___builtin_va_copy=no
22681 fi
22682 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22683 fi
22684 echo "$as_me:22684: result: $cf_cv_have___builtin_va_copy" >&5
22685 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
22686
22687 test "$cf_cv_have___builtin_va_copy" = yes &&
22688
22689 cat >>confdefs.h <<\EOF
22690 #define HAVE___BUILTIN_VA_COPY 1
22691 EOF
22692
22693 fi # cf_cv_have___va_copy
22694
22695 fi # cf_cv_have_va_copy
22696
22697 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
22698 (*yes*)
22699         ;;
22700
22701 (*)
22702         echo "$as_me:22702: checking if we can simply copy va_list" >&5
22703 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
22704 if test "${cf_cv_pointer_va_list+set}" = set; then
22705   echo $ECHO_N "(cached) $ECHO_C" >&6
22706 else
22707
22708 cat >"conftest.$ac_ext" <<_ACEOF
22709 #line 22709 "configure"
22710 #include "confdefs.h"
22711
22712 #include <stdarg.h>
22713
22714 int
22715 main (void)
22716 {
22717
22718         va_list dst;
22719         va_list src;
22720         dst = src
22721   ;
22722   return 0;
22723 }
22724 _ACEOF
22725 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22726 if { (eval echo "$as_me:22726: \"$ac_link\"") >&5
22727   (eval $ac_link) 2>&5
22728   ac_status=$?
22729   echo "$as_me:22729: \$? = $ac_status" >&5
22730   (exit "$ac_status"); } &&
22731          { ac_try='test -s "conftest$ac_exeext"'
22732   { (eval echo "$as_me:22732: \"$ac_try\"") >&5
22733   (eval $ac_try) 2>&5
22734   ac_status=$?
22735   echo "$as_me:22735: \$? = $ac_status" >&5
22736   (exit "$ac_status"); }; }; then
22737   cf_cv_pointer_va_list=yes
22738 else
22739   echo "$as_me: failed program was:" >&5
22740 cat "conftest.$ac_ext" >&5
22741 cf_cv_pointer_va_list=no
22742 fi
22743 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22744 fi
22745 echo "$as_me:22745: result: $cf_cv_pointer_va_list" >&5
22746 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
22747
22748         if test "$cf_cv_pointer_va_list" = no
22749         then
22750                 echo "$as_me:22750: checking if we can copy va_list indirectly" >&5
22751 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
22752 if test "${cf_cv_array_va_list+set}" = set; then
22753   echo $ECHO_N "(cached) $ECHO_C" >&6
22754 else
22755
22756 cat >"conftest.$ac_ext" <<_ACEOF
22757 #line 22757 "configure"
22758 #include "confdefs.h"
22759
22760 #include <stdarg.h>
22761
22762 int
22763 main (void)
22764 {
22765
22766         va_list dst;
22767         va_list src;
22768         *dst = *src
22769   ;
22770   return 0;
22771 }
22772 _ACEOF
22773 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22774 if { (eval echo "$as_me:22774: \"$ac_link\"") >&5
22775   (eval $ac_link) 2>&5
22776   ac_status=$?
22777   echo "$as_me:22777: \$? = $ac_status" >&5
22778   (exit "$ac_status"); } &&
22779          { ac_try='test -s "conftest$ac_exeext"'
22780   { (eval echo "$as_me:22780: \"$ac_try\"") >&5
22781   (eval $ac_try) 2>&5
22782   ac_status=$?
22783   echo "$as_me:22783: \$? = $ac_status" >&5
22784   (exit "$ac_status"); }; }; then
22785   cf_cv_array_va_list=yes
22786 else
22787   echo "$as_me: failed program was:" >&5
22788 cat "conftest.$ac_ext" >&5
22789 cf_cv_array_va_list=no
22790 fi
22791 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22792 fi
22793 echo "$as_me:22793: result: $cf_cv_array_va_list" >&5
22794 echo "${ECHO_T}$cf_cv_array_va_list" >&6
22795                 test "$cf_cv_array_va_list" = yes &&
22796 cat >>confdefs.h <<\EOF
22797 #define ARRAY_VA_LIST 1
22798 EOF
22799
22800         fi
22801         ;;
22802 esac
22803
22804 echo "$as_me:22804: checking for pid_t" >&5
22805 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
22806 if test "${ac_cv_type_pid_t+set}" = set; then
22807   echo $ECHO_N "(cached) $ECHO_C" >&6
22808 else
22809   cat >"conftest.$ac_ext" <<_ACEOF
22810 #line 22810 "configure"
22811 #include "confdefs.h"
22812 $ac_includes_default
22813 int
22814 main (void)
22815 {
22816 if ((pid_t *) 0)
22817   return 0;
22818 if (sizeof (pid_t))
22819   return 0;
22820   ;
22821   return 0;
22822 }
22823 _ACEOF
22824 rm -f "conftest.$ac_objext"
22825 if { (eval echo "$as_me:22825: \"$ac_compile\"") >&5
22826   (eval $ac_compile) 2>&5
22827   ac_status=$?
22828   echo "$as_me:22828: \$? = $ac_status" >&5
22829   (exit "$ac_status"); } &&
22830          { ac_try='test -s "conftest.$ac_objext"'
22831   { (eval echo "$as_me:22831: \"$ac_try\"") >&5
22832   (eval $ac_try) 2>&5
22833   ac_status=$?
22834   echo "$as_me:22834: \$? = $ac_status" >&5
22835   (exit "$ac_status"); }; }; then
22836   ac_cv_type_pid_t=yes
22837 else
22838   echo "$as_me: failed program was:" >&5
22839 cat "conftest.$ac_ext" >&5
22840 ac_cv_type_pid_t=no
22841 fi
22842 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22843 fi
22844 echo "$as_me:22844: result: $ac_cv_type_pid_t" >&5
22845 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
22846 if test "$ac_cv_type_pid_t" = yes; then
22847   :
22848 else
22849
22850 cat >>confdefs.h <<EOF
22851 #define pid_t int
22852 EOF
22853
22854 fi
22855
22856 for ac_header in unistd.h vfork.h
22857 do
22858 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22859 echo "$as_me:22859: checking for $ac_header" >&5
22860 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22861 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22862   echo $ECHO_N "(cached) $ECHO_C" >&6
22863 else
22864   cat >"conftest.$ac_ext" <<_ACEOF
22865 #line 22865 "configure"
22866 #include "confdefs.h"
22867 #include <$ac_header>
22868 _ACEOF
22869 if { (eval echo "$as_me:22869: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22870   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22871   ac_status=$?
22872   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22873   rm -f conftest.er1
22874   cat conftest.err >&5
22875   echo "$as_me:22875: \$? = $ac_status" >&5
22876   (exit "$ac_status"); } >/dev/null; then
22877   if test -s conftest.err; then
22878     ac_cpp_err=$ac_c_preproc_warn_flag
22879   else
22880     ac_cpp_err=
22881   fi
22882 else
22883   ac_cpp_err=yes
22884 fi
22885 if test -z "$ac_cpp_err"; then
22886   eval "$as_ac_Header=yes"
22887 else
22888   echo "$as_me: failed program was:" >&5
22889   cat "conftest.$ac_ext" >&5
22890   eval "$as_ac_Header=no"
22891 fi
22892 rm -f conftest.err "conftest.$ac_ext"
22893 fi
22894 echo "$as_me:22894: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22895 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22896 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22897   cat >>confdefs.h <<EOF
22898 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22899 EOF
22900
22901 fi
22902 done
22903
22904 for ac_func in fork vfork
22905 do
22906 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22907 echo "$as_me:22907: checking for $ac_func" >&5
22908 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22909 if eval "test \"\${$as_ac_var+set}\" = set"; then
22910   echo $ECHO_N "(cached) $ECHO_C" >&6
22911 else
22912   cat >"conftest.$ac_ext" <<_ACEOF
22913 #line 22913 "configure"
22914 #include "confdefs.h"
22915 #define $ac_func autoconf_temporary
22916 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22917 #undef $ac_func
22918
22919 #ifdef __cplusplus
22920 extern "C"
22921 #endif
22922
22923 /* We use char because int might match the return type of a gcc2
22924    builtin and then its argument prototype would still apply.  */
22925 char $ac_func (void);
22926
22927 int
22928 main (void)
22929 {
22930
22931 /* The GNU C library defines stubs for functions which it implements
22932     to always fail with ENOSYS.  Some functions are actually named
22933     something starting with __ and the normal name is an alias.  */
22934 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22935 #error found stub for $ac_func
22936 #endif
22937
22938         return $ac_func ();
22939   ;
22940   return 0;
22941 }
22942 _ACEOF
22943 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22944 if { (eval echo "$as_me:22944: \"$ac_link\"") >&5
22945   (eval $ac_link) 2>&5
22946   ac_status=$?
22947   echo "$as_me:22947: \$? = $ac_status" >&5
22948   (exit "$ac_status"); } &&
22949          { ac_try='test -s "conftest$ac_exeext"'
22950   { (eval echo "$as_me:22950: \"$ac_try\"") >&5
22951   (eval $ac_try) 2>&5
22952   ac_status=$?
22953   echo "$as_me:22953: \$? = $ac_status" >&5
22954   (exit "$ac_status"); }; }; then
22955   eval "$as_ac_var=yes"
22956 else
22957   echo "$as_me: failed program was:" >&5
22958 cat "conftest.$ac_ext" >&5
22959 eval "$as_ac_var=no"
22960 fi
22961 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22962 fi
22963 echo "$as_me:22963: result: `eval echo '${'"$as_ac_var"'}'`" >&5
22964 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
22965 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
22966   cat >>confdefs.h <<EOF
22967 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22968 EOF
22969
22970 fi
22971 done
22972
22973 ac_cv_func_fork_works=$ac_cv_func_fork
22974 if test "x$ac_cv_func_fork" = xyes; then
22975   echo "$as_me:22975: checking for working fork" >&5
22976 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
22977 if test "${ac_cv_func_fork_works+set}" = set; then
22978   echo $ECHO_N "(cached) $ECHO_C" >&6
22979 else
22980   if test "$cross_compiling" = yes; then
22981   ac_cv_func_fork_works=cross
22982 else
22983   cat >"conftest.$ac_ext" <<_ACEOF
22984 /* By Rüdiger Kuhlmann. */
22985       #include <sys/types.h>
22986       #if HAVE_UNISTD_H
22987       # include <unistd.h>
22988       #endif
22989       /* Some systems only have a dummy stub for fork() */
22990       int main (void)
22991       {
22992         if (fork() < 0)
22993           $ac_main_return (1);
22994         $ac_main_return (0);
22995       }
22996 _ACEOF
22997 rm -f "conftest$ac_exeext"
22998 if { (eval echo "$as_me:22998: \"$ac_link\"") >&5
22999   (eval $ac_link) 2>&5
23000   ac_status=$?
23001   echo "$as_me:23001: \$? = $ac_status" >&5
23002   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23003   { (eval echo "$as_me:23003: \"$ac_try\"") >&5
23004   (eval $ac_try) 2>&5
23005   ac_status=$?
23006   echo "$as_me:23006: \$? = $ac_status" >&5
23007   (exit "$ac_status"); }; }; then
23008   ac_cv_func_fork_works=yes
23009 else
23010   echo "$as_me: program exited with status $ac_status" >&5
23011 echo "$as_me: failed program was:" >&5
23012 cat "conftest.$ac_ext" >&5
23013 ac_cv_func_fork_works=no
23014 fi
23015 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23016 fi
23017 fi
23018 echo "$as_me:23018: result: $ac_cv_func_fork_works" >&5
23019 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
23020
23021 fi
23022 if test "x$ac_cv_func_fork_works" = xcross; then
23023   case $host in
23024     *-*-amigaos* | *-*-msdosdjgpp*)
23025       # Override, as these systems have only a dummy fork() stub
23026       ac_cv_func_fork_works=no
23027       ;;
23028     *)
23029       ac_cv_func_fork_works=yes
23030       ;;
23031   esac
23032   { echo "$as_me:23032: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
23033 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
23034 fi
23035 ac_cv_func_vfork_works=$ac_cv_func_vfork
23036 if test "x$ac_cv_func_vfork" = xyes; then
23037   echo "$as_me:23037: checking for working vfork" >&5
23038 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
23039 if test "${ac_cv_func_vfork_works+set}" = set; then
23040   echo $ECHO_N "(cached) $ECHO_C" >&6
23041 else
23042   if test "$cross_compiling" = yes; then
23043   ac_cv_func_vfork_works=cross
23044 else
23045   cat >"conftest.$ac_ext" <<_ACEOF
23046 #line 23046 "configure"
23047 #include "confdefs.h"
23048 /* Thanks to Paul Eggert for this test.  */
23049 #include <stdio.h>
23050 #include <sys/types.h>
23051 #include <sys/stat.h>
23052 #if HAVE_UNISTD_H
23053 # include <unistd.h>
23054 #endif
23055 #if HAVE_VFORK_H
23056 # include <vfork.h>
23057 #endif
23058 /* On some sparc systems, changes by the child to local and incoming
23059    argument registers are propagated back to the parent.  The compiler
23060    is told about this with #include <vfork.h>, but some compilers
23061    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
23062    static variable whose address is put into a register that is
23063    clobbered by the vfork.  */
23064 static
23065 #ifdef __cplusplus
23066 sparc_address_test (int arg)
23067 # else
23068 sparc_address_test (arg) int arg;
23069 #endif
23070 {
23071   static pid_t child;
23072   if (!child) {
23073     child = vfork ();
23074     if (child < 0) {
23075       perror ("vfork");
23076       _exit(2);
23077     }
23078     if (!child) {
23079       arg = getpid();
23080       write(-1, "", 0);
23081       _exit (arg);
23082     }
23083   }
23084 }
23085
23086 int
23087 main (void)
23088 {
23089   pid_t parent = getpid ();
23090   pid_t child;
23091
23092   sparc_address_test ();
23093
23094   child = vfork ();
23095
23096   if (child == 0) {
23097     /* Here is another test for sparc vfork register problems.  This
23098        test uses lots of local variables, at least as many local
23099        variables as main has allocated so far including compiler
23100        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
23101        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
23102        reuse the register of parent for one of the local variables,
23103        since it will think that parent can't possibly be used any more
23104        in this routine.  Assigning to the local variable will thus
23105        munge parent in the parent process.  */
23106     pid_t
23107       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23108       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23109     /* Convince the compiler that p..p7 are live; otherwise, it might
23110        use the same hardware register for all 8 local variables.  */
23111     if (p != p1 || p != p2 || p != p3 || p != p4
23112         || p != p5 || p != p6 || p != p7)
23113       _exit(1);
23114
23115     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23116        from child file descriptors.  If the child closes a descriptor
23117        before it execs or exits, this munges the parent's descriptor
23118        as well.  Test for this by closing stdout in the child.  */
23119     _exit(close(fileno(stdout)) != 0);
23120   } else {
23121     int status;
23122     struct stat st;
23123
23124     while (wait(&status) != child)
23125       ;
23126     $ac_main_return(
23127          /* Was there some problem with vforking?  */
23128          child < 0
23129
23130          /* Did the child fail?  (This shouldn't happen.)  */
23131          || status
23132
23133          /* Did the vfork/compiler bug occur?  */
23134          || parent != getpid()
23135
23136          /* Did the file descriptor bug occur?  */
23137          || fstat(fileno(stdout), &st) != 0
23138          );
23139   }
23140 }
23141 _ACEOF
23142 rm -f "conftest$ac_exeext"
23143 if { (eval echo "$as_me:23143: \"$ac_link\"") >&5
23144   (eval $ac_link) 2>&5
23145   ac_status=$?
23146   echo "$as_me:23146: \$? = $ac_status" >&5
23147   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23148   { (eval echo "$as_me:23148: \"$ac_try\"") >&5
23149   (eval $ac_try) 2>&5
23150   ac_status=$?
23151   echo "$as_me:23151: \$? = $ac_status" >&5
23152   (exit "$ac_status"); }; }; then
23153   ac_cv_func_vfork_works=yes
23154 else
23155   echo "$as_me: program exited with status $ac_status" >&5
23156 echo "$as_me: failed program was:" >&5
23157 cat "conftest.$ac_ext" >&5
23158 ac_cv_func_vfork_works=no
23159 fi
23160 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23161 fi
23162 fi
23163 echo "$as_me:23163: result: $ac_cv_func_vfork_works" >&5
23164 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
23165
23166 fi;
23167 if test "x$ac_cv_func_fork_works" = xcross; then
23168   ac_cv_func_vfork_works=ac_cv_func_vfork
23169   { echo "$as_me:23169: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
23170 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
23171 fi
23172
23173 if test "x$ac_cv_func_vfork_works" = xyes; then
23174
23175 cat >>confdefs.h <<\EOF
23176 #define HAVE_WORKING_VFORK 1
23177 EOF
23178
23179 else
23180
23181 cat >>confdefs.h <<\EOF
23182 #define vfork fork
23183 EOF
23184
23185 fi
23186 if test "x$ac_cv_func_fork_works" = xyes; then
23187
23188 cat >>confdefs.h <<\EOF
23189 #define HAVE_WORKING_FORK 1
23190 EOF
23191
23192 fi
23193
23194 echo "$as_me:23194: checking if fopen accepts explicit binary mode" >&5
23195 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
23196 if test "${cf_cv_fopen_bin_r+set}" = set; then
23197   echo $ECHO_N "(cached) $ECHO_C" >&6
23198 else
23199
23200         if test "$cross_compiling" = yes; then
23201   cf_cv_fopen_bin_r=unknown
23202 else
23203   cat >"conftest.$ac_ext" <<_ACEOF
23204 #line 23204 "configure"
23205 #include "confdefs.h"
23206
23207 #include <stdio.h>
23208 int main(void) {
23209         FILE *fp = fopen("conftest.tmp", "wb");
23210         int rc = 0;
23211         if (fp != 0) {
23212                 int p, q;
23213                 for (p = 0; p < 256; ++p) {
23214                         fputc(p, fp);
23215                 }
23216                 fclose(fp);
23217                 fp = fopen("conftest.tmp", "rb");
23218                 if (fp != 0) {
23219                         for (p = 0; p < 256; ++p) {
23220                                 q = fgetc(fp);
23221                                 if (q != p) {
23222                                         rc = 1;
23223                                         break;
23224                                 }
23225                         }
23226                 } else {
23227                         rc = 1;
23228                 }
23229         } else {
23230                 rc = 1;
23231         }
23232         ${cf_cv_main_return:-return} (rc);
23233 }
23234
23235 _ACEOF
23236 rm -f "conftest$ac_exeext"
23237 if { (eval echo "$as_me:23237: \"$ac_link\"") >&5
23238   (eval $ac_link) 2>&5
23239   ac_status=$?
23240   echo "$as_me:23240: \$? = $ac_status" >&5
23241   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23242   { (eval echo "$as_me:23242: \"$ac_try\"") >&5
23243   (eval $ac_try) 2>&5
23244   ac_status=$?
23245   echo "$as_me:23245: \$? = $ac_status" >&5
23246   (exit "$ac_status"); }; }; then
23247   cf_cv_fopen_bin_r=yes
23248 else
23249   echo "$as_me: program exited with status $ac_status" >&5
23250 echo "$as_me: failed program was:" >&5
23251 cat "conftest.$ac_ext" >&5
23252 cf_cv_fopen_bin_r=no
23253 fi
23254 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23255 fi
23256
23257 fi
23258 echo "$as_me:23258: result: $cf_cv_fopen_bin_r" >&5
23259 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
23260 test "x$cf_cv_fopen_bin_r" != xno &&
23261 cat >>confdefs.h <<\EOF
23262 #define USE_FOPEN_BIN_R 1
23263 EOF
23264
23265 # special check for test/ditto.c
23266
23267 echo "$as_me:23267: checking for openpty in -lutil" >&5
23268 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
23269 if test "${ac_cv_lib_util_openpty+set}" = set; then
23270   echo $ECHO_N "(cached) $ECHO_C" >&6
23271 else
23272   ac_check_lib_save_LIBS=$LIBS
23273 LIBS="-lutil  $LIBS"
23274 cat >"conftest.$ac_ext" <<_ACEOF
23275 #line 23275 "configure"
23276 #include "confdefs.h"
23277
23278 /* Override any gcc2 internal prototype to avoid an error.  */
23279 #ifdef __cplusplus
23280 extern "C"
23281 #endif
23282 /* We use char because int might match the return type of a gcc2
23283    builtin and then its argument prototype would still apply.  */
23284 char openpty ();
23285 int
23286 main (void)
23287 {
23288 openpty ();
23289   ;
23290   return 0;
23291 }
23292 _ACEOF
23293 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23294 if { (eval echo "$as_me:23294: \"$ac_link\"") >&5
23295   (eval $ac_link) 2>&5
23296   ac_status=$?
23297   echo "$as_me:23297: \$? = $ac_status" >&5
23298   (exit "$ac_status"); } &&
23299          { ac_try='test -s "conftest$ac_exeext"'
23300   { (eval echo "$as_me:23300: \"$ac_try\"") >&5
23301   (eval $ac_try) 2>&5
23302   ac_status=$?
23303   echo "$as_me:23303: \$? = $ac_status" >&5
23304   (exit "$ac_status"); }; }; then
23305   ac_cv_lib_util_openpty=yes
23306 else
23307   echo "$as_me: failed program was:" >&5
23308 cat "conftest.$ac_ext" >&5
23309 ac_cv_lib_util_openpty=no
23310 fi
23311 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23312 LIBS=$ac_check_lib_save_LIBS
23313 fi
23314 echo "$as_me:23314: result: $ac_cv_lib_util_openpty" >&5
23315 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
23316 if test "$ac_cv_lib_util_openpty" = yes; then
23317   cf_cv_lib_util=yes
23318 else
23319   cf_cv_lib_util=no
23320 fi
23321
23322 echo "$as_me:23322: checking for openpty header" >&5
23323 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
23324 if test "${cf_cv_func_openpty+set}" = set; then
23325   echo $ECHO_N "(cached) $ECHO_C" >&6
23326 else
23327
23328         cf_save_LIBS="$LIBS"
23329         test "$cf_cv_lib_util" = yes && {
23330 cf_add_libs="$LIBS"
23331 # reverse order
23332 cf_add_0lib=
23333 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23334 # filter duplicates
23335 for cf_add_1lib in $cf_add_0lib; do
23336         for cf_add_2lib in $cf_add_libs; do
23337                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23338                         cf_add_1lib=
23339                         break
23340                 fi
23341         done
23342         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23343 done
23344 LIBS="$cf_add_libs"
23345  }
23346         for cf_header in pty.h libutil.h util.h
23347         do
23348         cat >"conftest.$ac_ext" <<_ACEOF
23349 #line 23349 "configure"
23350 #include "confdefs.h"
23351
23352 #include <$cf_header>
23353
23354 int
23355 main (void)
23356 {
23357
23358         int x = openpty((int *)0, (int *)0, (char *)0,
23359                                    (struct termios *)0, (struct winsize *)0);
23360
23361   ;
23362   return 0;
23363 }
23364 _ACEOF
23365 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23366 if { (eval echo "$as_me:23366: \"$ac_link\"") >&5
23367   (eval $ac_link) 2>&5
23368   ac_status=$?
23369   echo "$as_me:23369: \$? = $ac_status" >&5
23370   (exit "$ac_status"); } &&
23371          { ac_try='test -s "conftest$ac_exeext"'
23372   { (eval echo "$as_me:23372: \"$ac_try\"") >&5
23373   (eval $ac_try) 2>&5
23374   ac_status=$?
23375   echo "$as_me:23375: \$? = $ac_status" >&5
23376   (exit "$ac_status"); }; }; then
23377
23378                 cf_cv_func_openpty=$cf_header
23379                 break
23380
23381 else
23382   echo "$as_me: failed program was:" >&5
23383 cat "conftest.$ac_ext" >&5
23384
23385                 cf_cv_func_openpty=no
23386
23387 fi
23388 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23389         done
23390         LIBS="$cf_save_LIBS"
23391
23392 fi
23393 echo "$as_me:23393: result: $cf_cv_func_openpty" >&5
23394 echo "${ECHO_T}$cf_cv_func_openpty" >&6
23395
23396 if test "$cf_cv_func_openpty" != no ; then
23397
23398 cat >>confdefs.h <<EOF
23399 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
23400 EOF
23401
23402 cat >>confdefs.h <<\EOF
23403 #define USE_XTERM_PTY 1
23404 EOF
23405
23406         if test "x$cf_cv_lib_util" = xyes ; then
23407
23408 cf_add_libs="$TEST_LIBS"
23409 # reverse order
23410 cf_add_0lib=
23411 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23412 # filter duplicates
23413 for cf_add_1lib in $cf_add_0lib; do
23414         for cf_add_2lib in $cf_add_libs; do
23415                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23416                         cf_add_1lib=
23417                         break
23418                 fi
23419         done
23420         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23421 done
23422 TEST_LIBS="$cf_add_libs"
23423
23424         fi
23425 fi
23426
23427 if test "$with_hashed_db" != no ; then
23428
23429 cat >>confdefs.h <<\EOF
23430 #define USE_HASHED_DB 1
23431 EOF
23432
23433 case $with_hashed_db in
23434 (yes|*able*)
23435         ;;
23436 (*)
23437         if test -d "$with_hashed_db" ; then
23438
23439 if test -n "$with_hashed_db/include" ; then
23440   for cf_add_incdir in $with_hashed_db/include
23441   do
23442         while test "$cf_add_incdir" != /usr/include
23443         do
23444           if test -d "$cf_add_incdir"
23445           then
23446                 cf_have_incdir=no
23447                 if test -n "$CFLAGS$CPPFLAGS" ; then
23448                   # a loop is needed to ensure we can add subdirs of existing dirs
23449                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23450                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23451                           cf_have_incdir=yes; break
23452                         fi
23453                   done
23454                 fi
23455
23456                 if test "$cf_have_incdir" = no ; then
23457                   if test "$cf_add_incdir" = /usr/local/include ; then
23458                         if test "$GCC" = yes
23459                         then
23460                           cf_save_CPPFLAGS=$CPPFLAGS
23461
23462         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23463         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23464
23465                           cat >"conftest.$ac_ext" <<_ACEOF
23466 #line 23466 "configure"
23467 #include "confdefs.h"
23468 #include <stdio.h>
23469 int
23470 main (void)
23471 {
23472 printf("Hello")
23473   ;
23474   return 0;
23475 }
23476 _ACEOF
23477 rm -f "conftest.$ac_objext"
23478 if { (eval echo "$as_me:23478: \"$ac_compile\"") >&5
23479   (eval $ac_compile) 2>&5
23480   ac_status=$?
23481   echo "$as_me:23481: \$? = $ac_status" >&5
23482   (exit "$ac_status"); } &&
23483          { ac_try='test -s "conftest.$ac_objext"'
23484   { (eval echo "$as_me:23484: \"$ac_try\"") >&5
23485   (eval $ac_try) 2>&5
23486   ac_status=$?
23487   echo "$as_me:23487: \$? = $ac_status" >&5
23488   (exit "$ac_status"); }; }; then
23489   :
23490 else
23491   echo "$as_me: failed program was:" >&5
23492 cat "conftest.$ac_ext" >&5
23493 cf_have_incdir=yes
23494 fi
23495 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23496                           CPPFLAGS=$cf_save_CPPFLAGS
23497                         fi
23498                   fi
23499                 fi
23500
23501                 if test "$cf_have_incdir" = no ; then
23502                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
23503
23504 echo "${as_me:-configure}:23504: testing adding $cf_add_incdir to include-path ..." 1>&5
23505
23506                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
23507
23508                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
23509                   test "$cf_top_incdir" = "$cf_add_incdir" && break
23510                   cf_add_incdir="$cf_top_incdir"
23511                 else
23512                   break
23513                 fi
23514           else
23515                 break
23516           fi
23517         done
23518   done
23519 fi
23520
23521 if test -n "$with_hashed_db/lib" ; then
23522         for cf_add_libdir in $with_hashed_db/lib
23523         do
23524                 if test "$cf_add_libdir" = /usr/lib ; then
23525                         :
23526                 elif test -d "$cf_add_libdir"
23527                 then
23528                         cf_have_libdir=no
23529                         if test -n "$LDFLAGS$LIBS" ; then
23530                                 # a loop is needed to ensure we can add subdirs of existing dirs
23531                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
23532                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
23533                                                 cf_have_libdir=yes; break
23534                                         fi
23535                                 done
23536                         fi
23537                         if test "$cf_have_libdir" = no ; then
23538                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
23539
23540 echo "${as_me:-configure}:23540: testing adding $cf_add_libdir to library-path ..." 1>&5
23541
23542                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
23543                         fi
23544                 fi
23545         done
23546 fi
23547
23548         else
23549                 case "$with_hashed_db" in
23550                 (./*|../*|/*)
23551                         { echo "$as_me:23551: WARNING: no such directory $with_hashed_db" >&5
23552 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
23553                         ;;
23554                 (*)
23555
23556 cf_search=
23557
23558 test "x$prefix" != "xNONE" && \
23559 test -d "$prefix" && \
23560  {
23561         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
23562         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
23563         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
23564         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
23565         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
23566         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
23567 }
23568
23569 for cf_subdir_prefix in \
23570         /usr \
23571         /usr/local \
23572         /usr/pkg \
23573         /opt \
23574         /opt/local \
23575         $HOME
23576 do
23577
23578 test "x$cf_subdir_prefix" != "x$prefix" && \
23579 test -d "$cf_subdir_prefix" && \
23580 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
23581         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
23582         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
23583         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
23584         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
23585         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
23586         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"
23587 }
23588
23589 done
23590
23591         for cf_item in $cf_search
23592         do
23593                 case "$cf_item" in
23594                 (*/$with_hashed_db)
23595
23596 if test -n "$cf_item" ; then
23597   for cf_add_incdir in $cf_item
23598   do
23599         while test "$cf_add_incdir" != /usr/include
23600         do
23601           if test -d "$cf_add_incdir"
23602           then
23603                 cf_have_incdir=no
23604                 if test -n "$CFLAGS$CPPFLAGS" ; then
23605                   # a loop is needed to ensure we can add subdirs of existing dirs
23606                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23607                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23608                           cf_have_incdir=yes; break
23609                         fi
23610                   done
23611                 fi
23612
23613                 if test "$cf_have_incdir" = no ; then
23614                   if test "$cf_add_incdir" = /usr/local/include ; then
23615                         if test "$GCC" = yes
23616                         then
23617                           cf_save_CPPFLAGS=$CPPFLAGS
23618
23619         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23620         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23621
23622                           cat >"conftest.$ac_ext" <<_ACEOF
23623 #line 23623 "configure"
23624 #include "confdefs.h"
23625 #include <stdio.h>
23626 int
23627 main (void)
23628 {
23629 printf("Hello")
23630   ;
23631   return 0;
23632 }
23633 _ACEOF
23634 rm -f "conftest.$ac_objext"
23635 if { (eval echo "$as_me:23635: \"$ac_compile\"") >&5
23636   (eval $ac_compile) 2>&5
23637   ac_status=$?
23638   echo "$as_me:23638: \$? = $ac_status" >&5
23639   (exit "$ac_status"); } &&
23640          { ac_try='test -s "conftest.$ac_objext"'
23641   { (eval echo "$as_me:23641: \"$ac_try\"") >&5
23642   (eval $ac_try) 2>&5
23643   ac_status=$?
23644   echo "$as_me:23644: \$? = $ac_status" >&5
23645   (exit "$ac_status"); }; }; then
23646   :
23647 else
23648   echo "$as_me: failed program was:" >&5
23649 cat "conftest.$ac_ext" >&5
23650 cf_have_incdir=yes
23651 fi
23652 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23653                           CPPFLAGS=$cf_save_CPPFLAGS
23654                         fi
23655                   fi
23656                 fi
23657
23658                 if test "$cf_have_incdir" = no ; then
23659                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
23660
23661 echo "${as_me:-configure}:23661: testing adding $cf_add_incdir to include-path ..." 1>&5
23662
23663                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
23664
23665                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
23666                   test "$cf_top_incdir" = "$cf_add_incdir" && break
23667                   cf_add_incdir="$cf_top_incdir"
23668                 else
23669                   break
23670                 fi
23671           else
23672                 break
23673           fi
23674         done
23675   done
23676 fi
23677
23678                         ;;
23679                 esac
23680         done
23681
23682 cf_search=
23683
23684 test "x$prefix" != "xNONE" && \
23685 test -d "$prefix" && \
23686  {
23687         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
23688         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
23689         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
23690         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
23691         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
23692         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
23693 }
23694
23695 for cf_subdir_prefix in \
23696         /usr \
23697         /usr/local \
23698         /usr/pkg \
23699         /opt \
23700         /opt/local \
23701         $HOME
23702 do
23703
23704 test "x$cf_subdir_prefix" != "x$prefix" && \
23705 test -d "$cf_subdir_prefix" && \
23706 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
23707         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
23708         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
23709         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
23710         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
23711         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
23712         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"
23713 }
23714
23715 done
23716
23717         for cf_item in $cf_search
23718         do
23719                 case "$cf_item" in
23720                 (*/$with_hashed_db)
23721
23722 if test -n "$cf_item" ; then
23723         for cf_add_libdir in $cf_item
23724         do
23725                 if test "$cf_add_libdir" = /usr/lib ; then
23726                         :
23727                 elif test -d "$cf_add_libdir"
23728                 then
23729                         cf_have_libdir=no
23730                         if test -n "$LDFLAGS$LIBS" ; then
23731                                 # a loop is needed to ensure we can add subdirs of existing dirs
23732                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
23733                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
23734                                                 cf_have_libdir=yes; break
23735                                         fi
23736                                 done
23737                         fi
23738                         if test "$cf_have_libdir" = no ; then
23739                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
23740
23741 echo "${as_me:-configure}:23741: testing adding $cf_add_libdir to library-path ..." 1>&5
23742
23743                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
23744                         fi
23745                 fi
23746         done
23747 fi
23748
23749                         ;;
23750                 esac
23751         done
23752
23753                         ;;
23754                 esac
23755         fi
23756 esac
23757
23758 echo "$as_me:23758: checking for db.h" >&5
23759 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
23760 if test "${ac_cv_header_db_h+set}" = set; then
23761   echo $ECHO_N "(cached) $ECHO_C" >&6
23762 else
23763   cat >"conftest.$ac_ext" <<_ACEOF
23764 #line 23764 "configure"
23765 #include "confdefs.h"
23766 #include <db.h>
23767 _ACEOF
23768 if { (eval echo "$as_me:23768: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23769   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23770   ac_status=$?
23771   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23772   rm -f conftest.er1
23773   cat conftest.err >&5
23774   echo "$as_me:23774: \$? = $ac_status" >&5
23775   (exit "$ac_status"); } >/dev/null; then
23776   if test -s conftest.err; then
23777     ac_cpp_err=$ac_c_preproc_warn_flag
23778   else
23779     ac_cpp_err=
23780   fi
23781 else
23782   ac_cpp_err=yes
23783 fi
23784 if test -z "$ac_cpp_err"; then
23785   ac_cv_header_db_h=yes
23786 else
23787   echo "$as_me: failed program was:" >&5
23788   cat "conftest.$ac_ext" >&5
23789   ac_cv_header_db_h=no
23790 fi
23791 rm -f conftest.err "conftest.$ac_ext"
23792 fi
23793 echo "$as_me:23793: result: $ac_cv_header_db_h" >&5
23794 echo "${ECHO_T}$ac_cv_header_db_h" >&6
23795 if test "$ac_cv_header_db_h" = yes; then
23796
23797 echo "$as_me:23797: checking for version of db" >&5
23798 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
23799 if test "${cf_cv_hashed_db_version+set}" = set; then
23800   echo $ECHO_N "(cached) $ECHO_C" >&6
23801 else
23802
23803 cf_cv_hashed_db_version=unknown
23804
23805 for cf_db_version in 1 2 3 4 5 6
23806 do
23807
23808 echo "${as_me:-configure}:23808: testing checking for db version $cf_db_version ..." 1>&5
23809
23810         cat >"conftest.$ac_ext" <<_ACEOF
23811 #line 23811 "configure"
23812 #include "confdefs.h"
23813
23814 $ac_includes_default
23815 #include <db.h>
23816
23817 #ifdef DB_VERSION_MAJOR
23818         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
23819 #if $cf_db_version == DB_VERSION_MAJOR
23820         /* ok */
23821 #else
23822         make an error
23823 #endif
23824 #else
23825 #if $cf_db_version == 1
23826         /* ok: assuming this is DB 1.8.5 */
23827 #else
23828         make an error
23829 #endif
23830 #endif
23831
23832 int
23833 main (void)
23834 {
23835 DBT *foo = 0
23836   ;
23837   return 0;
23838 }
23839 _ACEOF
23840 rm -f "conftest.$ac_objext"
23841 if { (eval echo "$as_me:23841: \"$ac_compile\"") >&5
23842   (eval $ac_compile) 2>&5
23843   ac_status=$?
23844   echo "$as_me:23844: \$? = $ac_status" >&5
23845   (exit "$ac_status"); } &&
23846          { ac_try='test -s "conftest.$ac_objext"'
23847   { (eval echo "$as_me:23847: \"$ac_try\"") >&5
23848   (eval $ac_try) 2>&5
23849   ac_status=$?
23850   echo "$as_me:23850: \$? = $ac_status" >&5
23851   (exit "$ac_status"); }; }; then
23852
23853         cf_cv_hashed_db_version=$cf_db_version
23854         break
23855
23856 else
23857   echo "$as_me: failed program was:" >&5
23858 cat "conftest.$ac_ext" >&5
23859 fi
23860 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23861 done
23862
23863 fi
23864 echo "$as_me:23864: result: $cf_cv_hashed_db_version" >&5
23865 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
23866
23867 if test "$cf_cv_hashed_db_version" = unknown ; then
23868         { { echo "$as_me:23868: error: Cannot determine version of db" >&5
23869 echo "$as_me: error: Cannot determine version of db" >&2;}
23870    { (exit 1); exit 1; }; }
23871 else
23872
23873 echo "$as_me:23873: checking for db libraries" >&5
23874 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
23875 if test "${cf_cv_hashed_db_libs+set}" = set; then
23876   echo $ECHO_N "(cached) $ECHO_C" >&6
23877 else
23878
23879 cf_cv_hashed_db_libs=unknown
23880 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
23881 do
23882         cf_save_libs="$LIBS"
23883         if test -n "$cf_db_libs"; then
23884
23885 cf_add_libs="$LIBS"
23886 # reverse order
23887 cf_add_0lib=
23888 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23889 # filter duplicates
23890 for cf_add_1lib in $cf_add_0lib; do
23891         for cf_add_2lib in $cf_add_libs; do
23892                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23893                         cf_add_1lib=
23894                         break
23895                 fi
23896         done
23897         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23898 done
23899 LIBS="$cf_add_libs"
23900
23901         fi
23902
23903 echo "${as_me:-configure}:23903: testing checking for library $cf_db_libs ..." 1>&5
23904
23905         cat >"conftest.$ac_ext" <<_ACEOF
23906 #line 23906 "configure"
23907 #include "confdefs.h"
23908
23909 $ac_includes_default
23910 #include <db.h>
23911
23912 int
23913 main (void)
23914 {
23915
23916         char *path = "/tmp/foo";
23917 #ifdef DB_VERSION_MAJOR
23918 #if DB_VERSION_MAJOR >= 4
23919         DB *result = 0;
23920         db_create(&result, NULL, 0);
23921         result->open(result,
23922                 NULL,
23923                 path,
23924                 path,
23925                 DB_HASH,
23926                 DB_CREATE,
23927                 0644);
23928 #elif DB_VERSION_MAJOR >= 3
23929         DB *result = 0;
23930         db_create(&result, NULL, 0);
23931         result->open(result,
23932                 path,
23933                 path,
23934                 DB_HASH,
23935                 DB_CREATE,
23936                 0644);
23937 #elif DB_VERSION_MAJOR >= 2
23938         DB *result = 0;
23939         db_open(path,
23940                 DB_HASH,
23941                 DB_CREATE,
23942                 0644,
23943                 (DB_ENV *) 0,
23944                 (DB_INFO *) 0,
23945                 &result);
23946 #endif /* DB_VERSION_MAJOR */
23947 #else
23948         DB *result = dbopen(path,
23949                      2,
23950                      0644,
23951                      DB_HASH,
23952                      0);
23953 #endif
23954         ${cf_cv_main_return:-return}(result != 0)
23955
23956   ;
23957   return 0;
23958 }
23959 _ACEOF
23960 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23961 if { (eval echo "$as_me:23961: \"$ac_link\"") >&5
23962   (eval $ac_link) 2>&5
23963   ac_status=$?
23964   echo "$as_me:23964: \$? = $ac_status" >&5
23965   (exit "$ac_status"); } &&
23966          { ac_try='test -s "conftest$ac_exeext"'
23967   { (eval echo "$as_me:23967: \"$ac_try\"") >&5
23968   (eval $ac_try) 2>&5
23969   ac_status=$?
23970   echo "$as_me:23970: \$? = $ac_status" >&5
23971   (exit "$ac_status"); }; }; then
23972
23973         if test -n "$cf_db_libs" ; then
23974                 cf_cv_hashed_db_libs=$cf_db_libs
23975         else
23976                 cf_cv_hashed_db_libs=default
23977         fi
23978         LIBS="$cf_save_libs"
23979         break
23980
23981 else
23982   echo "$as_me: failed program was:" >&5
23983 cat "conftest.$ac_ext" >&5
23984 fi
23985 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23986         LIBS="$cf_save_libs"
23987 done
23988
23989 fi
23990 echo "$as_me:23990: result: $cf_cv_hashed_db_libs" >&5
23991 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
23992
23993         if test "$cf_cv_hashed_db_libs" = unknown ; then
23994                 { { echo "$as_me:23994: error: Cannot determine library for db" >&5
23995 echo "$as_me: error: Cannot determine library for db" >&2;}
23996    { (exit 1); exit 1; }; }
23997         elif test "$cf_cv_hashed_db_libs" != default ; then
23998
23999 cf_add_libs="$LIBS"
24000 # reverse order
24001 cf_add_0lib=
24002 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24003 # filter duplicates
24004 for cf_add_1lib in $cf_add_0lib; do
24005         for cf_add_2lib in $cf_add_libs; do
24006                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24007                         cf_add_1lib=
24008                         break
24009                 fi
24010         done
24011         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24012 done
24013 LIBS="$cf_add_libs"
24014
24015         fi
24016 fi
24017
24018 else
24019
24020         { { echo "$as_me:24020: error: Cannot find db.h" >&5
24021 echo "$as_me: error: Cannot find db.h" >&2;}
24022    { (exit 1); exit 1; }; }
24023
24024 fi
24025
24026 fi
24027
24028 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
24029         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24030         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24031 fi
24032
24033 # Just in case, check if the C compiler has a bool type.
24034
24035 echo "$as_me:24035: checking if we should include stdbool.h" >&5
24036 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24037
24038 if test "${cf_cv_header_stdbool_h+set}" = set; then
24039   echo $ECHO_N "(cached) $ECHO_C" >&6
24040 else
24041
24042         cat >"conftest.$ac_ext" <<_ACEOF
24043 #line 24043 "configure"
24044 #include "confdefs.h"
24045
24046 int
24047 main (void)
24048 {
24049 bool foo = false
24050   ;
24051   return 0;
24052 }
24053 _ACEOF
24054 rm -f "conftest.$ac_objext"
24055 if { (eval echo "$as_me:24055: \"$ac_compile\"") >&5
24056   (eval $ac_compile) 2>&5
24057   ac_status=$?
24058   echo "$as_me:24058: \$? = $ac_status" >&5
24059   (exit "$ac_status"); } &&
24060          { ac_try='test -s "conftest.$ac_objext"'
24061   { (eval echo "$as_me:24061: \"$ac_try\"") >&5
24062   (eval $ac_try) 2>&5
24063   ac_status=$?
24064   echo "$as_me:24064: \$? = $ac_status" >&5
24065   (exit "$ac_status"); }; }; then
24066   cf_cv_header_stdbool_h=0
24067 else
24068   echo "$as_me: failed program was:" >&5
24069 cat "conftest.$ac_ext" >&5
24070 cat >"conftest.$ac_ext" <<_ACEOF
24071 #line 24071 "configure"
24072 #include "confdefs.h"
24073
24074 #ifndef __BEOS__
24075 #include <stdbool.h>
24076 #endif
24077
24078 int
24079 main (void)
24080 {
24081 bool foo = false
24082   ;
24083   return 0;
24084 }
24085 _ACEOF
24086 rm -f "conftest.$ac_objext"
24087 if { (eval echo "$as_me:24087: \"$ac_compile\"") >&5
24088   (eval $ac_compile) 2>&5
24089   ac_status=$?
24090   echo "$as_me:24090: \$? = $ac_status" >&5
24091   (exit "$ac_status"); } &&
24092          { ac_try='test -s "conftest.$ac_objext"'
24093   { (eval echo "$as_me:24093: \"$ac_try\"") >&5
24094   (eval $ac_try) 2>&5
24095   ac_status=$?
24096   echo "$as_me:24096: \$? = $ac_status" >&5
24097   (exit "$ac_status"); }; }; then
24098   cf_cv_header_stdbool_h=1
24099 else
24100   echo "$as_me: failed program was:" >&5
24101 cat "conftest.$ac_ext" >&5
24102 cf_cv_header_stdbool_h=0
24103 fi
24104 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24105 fi
24106 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24107 fi
24108
24109 if test "$cf_cv_header_stdbool_h" = 1
24110 then    echo "$as_me:24110: result: yes" >&5
24111 echo "${ECHO_T}yes" >&6
24112 else    echo "$as_me:24112: result: no" >&5
24113 echo "${ECHO_T}no" >&6
24114 fi
24115
24116 echo "$as_me:24116: checking for builtin bool type" >&5
24117 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24118
24119 if test "${cf_cv_cc_bool_type+set}" = set; then
24120   echo $ECHO_N "(cached) $ECHO_C" >&6
24121 else
24122
24123         cat >"conftest.$ac_ext" <<_ACEOF
24124 #line 24124 "configure"
24125 #include "confdefs.h"
24126
24127 #include <stdio.h>
24128 #include <sys/types.h>
24129
24130 int
24131 main (void)
24132 {
24133 bool x = false
24134   ;
24135   return 0;
24136 }
24137 _ACEOF
24138 rm -f "conftest.$ac_objext"
24139 if { (eval echo "$as_me:24139: \"$ac_compile\"") >&5
24140   (eval $ac_compile) 2>&5
24141   ac_status=$?
24142   echo "$as_me:24142: \$? = $ac_status" >&5
24143   (exit "$ac_status"); } &&
24144          { ac_try='test -s "conftest.$ac_objext"'
24145   { (eval echo "$as_me:24145: \"$ac_try\"") >&5
24146   (eval $ac_try) 2>&5
24147   ac_status=$?
24148   echo "$as_me:24148: \$? = $ac_status" >&5
24149   (exit "$ac_status"); }; }; then
24150   cf_cv_cc_bool_type=1
24151 else
24152   echo "$as_me: failed program was:" >&5
24153 cat "conftest.$ac_ext" >&5
24154 cf_cv_cc_bool_type=0
24155 fi
24156 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24157
24158 fi
24159
24160 if test "$cf_cv_cc_bool_type" = 1
24161 then    echo "$as_me:24161: result: yes" >&5
24162 echo "${ECHO_T}yes" >&6
24163 else    echo "$as_me:24163: result: no" >&5
24164 echo "${ECHO_T}no" >&6
24165 fi
24166
24167 # Check for C++ compiler characteristics (and ensure that it's there!)
24168 if test -n "$CXX" ; then
24169         ac_ext=cc
24170 ac_cpp='$CXXCPP $CPPFLAGS'
24171 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24172 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24173 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24174 ac_main_return="return"
24175
24176 if test -n "$GXX" ; then
24177
24178         cf_save="$LIBS"
24179         LIBS="$LIBS $CXXLIBS"
24180         echo "$as_me:24180: checking if we already have C++ library" >&5
24181 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
24182         cat >"conftest.$ac_ext" <<_ACEOF
24183 #line 24183 "configure"
24184 #include "confdefs.h"
24185
24186                         #include <iostream>
24187 int
24188 main (void)
24189 {
24190
24191                         std::cout << "Hello World!" << std::endl;
24192   ;
24193   return 0;
24194 }
24195 _ACEOF
24196 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24197 if { (eval echo "$as_me:24197: \"$ac_link\"") >&5
24198   (eval $ac_link) 2>&5
24199   ac_status=$?
24200   echo "$as_me:24200: \$? = $ac_status" >&5
24201   (exit "$ac_status"); } &&
24202          { ac_try='test -s "conftest$ac_exeext"'
24203   { (eval echo "$as_me:24203: \"$ac_try\"") >&5
24204   (eval $ac_try) 2>&5
24205   ac_status=$?
24206   echo "$as_me:24206: \$? = $ac_status" >&5
24207   (exit "$ac_status"); }; }; then
24208   cf_have_libstdcpp=yes
24209 else
24210   echo "$as_me: failed program was:" >&5
24211 cat "conftest.$ac_ext" >&5
24212 cf_have_libstdcpp=no
24213 fi
24214 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24215         echo "$as_me:24215: result: $cf_have_libstdcpp" >&5
24216 echo "${ECHO_T}$cf_have_libstdcpp" >&6
24217         LIBS="$cf_save"
24218
24219         if test "$cf_have_libstdcpp" != yes
24220         then
24221                 case "$cf_cv_system_name" in
24222                 (os2*)
24223                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
24224                                 cf_stdcpp_libname=stdcpp
24225                         else
24226                                 cf_stdcpp_libname=stdc++
24227                         fi
24228                         ;;
24229                 (*)
24230                         cf_stdcpp_libname=stdc++
24231                         ;;
24232                 esac
24233
24234                 echo "$as_me:24234: checking for library $cf_stdcpp_libname" >&5
24235 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
24236 if test "${cf_cv_libstdcpp+set}" = set; then
24237   echo $ECHO_N "(cached) $ECHO_C" >&6
24238 else
24239
24240                         cf_save="$LIBS"
24241                         LIBS="$LIBS $CXXLIBS"
24242
24243 cf_add_libs="$LIBS"
24244 # reverse order
24245 cf_add_0lib=
24246 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24247 # filter duplicates
24248 for cf_add_1lib in $cf_add_0lib; do
24249         for cf_add_2lib in $cf_add_libs; do
24250                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24251                         cf_add_1lib=
24252                         break
24253                 fi
24254         done
24255         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24256 done
24257 LIBS="$cf_add_libs"
24258
24259                 cat >"conftest.$ac_ext" <<_ACEOF
24260 #line 24260 "configure"
24261 #include "confdefs.h"
24262
24263                                 #include <iostream>
24264 int
24265 main (void)
24266 {
24267
24268                                 std::cout << "Hello World!" << std::endl;
24269   ;
24270   return 0;
24271 }
24272 _ACEOF
24273 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24274 if { (eval echo "$as_me:24274: \"$ac_link\"") >&5
24275   (eval $ac_link) 2>&5
24276   ac_status=$?
24277   echo "$as_me:24277: \$? = $ac_status" >&5
24278   (exit "$ac_status"); } &&
24279          { ac_try='test -s "conftest$ac_exeext"'
24280   { (eval echo "$as_me:24280: \"$ac_try\"") >&5
24281   (eval $ac_try) 2>&5
24282   ac_status=$?
24283   echo "$as_me:24283: \$? = $ac_status" >&5
24284   (exit "$ac_status"); }; }; then
24285   cf_cv_libstdcpp=yes
24286 else
24287   echo "$as_me: failed program was:" >&5
24288 cat "conftest.$ac_ext" >&5
24289 cf_cv_libstdcpp=no
24290 fi
24291 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24292                         LIBS="$cf_save"
24293
24294 fi
24295 echo "$as_me:24295: result: $cf_cv_libstdcpp" >&5
24296 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
24297                 test "$cf_cv_libstdcpp" = yes && {
24298 cf_add_libs="$CXXLIBS"
24299 # reverse order
24300 cf_add_0lib=
24301 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24302 # filter duplicates
24303 for cf_add_1lib in $cf_add_0lib; do
24304         for cf_add_2lib in $cf_add_libs; do
24305                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24306                         cf_add_1lib=
24307                         break
24308                 fi
24309         done
24310         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24311 done
24312 CXXLIBS="$cf_add_libs"
24313  }
24314         fi
24315 fi
24316
24317         echo "$as_me:24317: checking whether $CXX understands -c and -o together" >&5
24318 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
24319 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
24320   echo $ECHO_N "(cached) $ECHO_C" >&6
24321 else
24322
24323 cat > conftest.$ac_ext <<CF_EOF
24324 int main(void)
24325 {
24326         ${cf_cv_main_return:-return}(0);
24327 }
24328 CF_EOF
24329 # We do the test twice because some compilers refuse to overwrite an
24330 # existing .o file with -o, though they will create one.
24331 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
24332 if { (eval echo "$as_me:24332: \"$ac_try\"") >&5
24333   (eval $ac_try) 2>&5
24334   ac_status=$?
24335   echo "$as_me:24335: \$? = $ac_status" >&5
24336   (exit "$ac_status"); } &&
24337   test -f conftest2.$ac_objext && { (eval echo "$as_me:24337: \"$ac_try\"") >&5
24338   (eval $ac_try) 2>&5
24339   ac_status=$?
24340   echo "$as_me:24340: \$? = $ac_status" >&5
24341   (exit "$ac_status"); };
24342 then
24343   eval cf_cv_prog_CXX_c_o=yes
24344 else
24345   eval cf_cv_prog_CXX_c_o=no
24346 fi
24347 rm -rf ./conftest*
24348
24349 fi
24350 if test "$cf_cv_prog_CXX_c_o" = yes; then
24351   echo "$as_me:24351: result: yes" >&5
24352 echo "${ECHO_T}yes" >&6
24353 else
24354   echo "$as_me:24354: result: no" >&5
24355 echo "${ECHO_T}no" >&6
24356 fi
24357
24358         case "$GXX_VERSION" in
24359         (1.*|2.[0-6]*|[1-9][0-9].*)
24360                 cf_cxx_library=yes
24361                 ;;
24362         (*-2.7*|2.7*)
24363
24364 cf_cxx_library=unknown
24365 case "$cf_cv_system_name" in
24366 (os2*)
24367         cf_gpp_libname=gpp
24368         ;;
24369 (*)
24370         cf_gpp_libname=g++
24371         ;;
24372 esac
24373 if test "$GXX" = yes; then
24374         echo "$as_me:24374: checking for lib$cf_gpp_libname" >&5
24375 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
24376         cf_save="$LIBS"
24377
24378 cf_add_libs="$LIBS"
24379 # reverse order
24380 cf_add_0lib=
24381 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24382 # filter duplicates
24383 for cf_add_1lib in $cf_add_0lib; do
24384         for cf_add_2lib in $cf_add_libs; do
24385                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24386                         cf_add_1lib=
24387                         break
24388                 fi
24389         done
24390         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24391 done
24392 LIBS="$cf_add_libs"
24393
24394         cat >"conftest.$ac_ext" <<_ACEOF
24395 #line 24395 "configure"
24396 #include "confdefs.h"
24397
24398 #include <$cf_gpp_libname/builtin.h>
24399
24400 int
24401 main (void)
24402 {
24403 two_arg_error_handler_t foo2 = lib_error_handler
24404   ;
24405   return 0;
24406 }
24407 _ACEOF
24408 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24409 if { (eval echo "$as_me:24409: \"$ac_link\"") >&5
24410   (eval $ac_link) 2>&5
24411   ac_status=$?
24412   echo "$as_me:24412: \$? = $ac_status" >&5
24413   (exit "$ac_status"); } &&
24414          { ac_try='test -s "conftest$ac_exeext"'
24415   { (eval echo "$as_me:24415: \"$ac_try\"") >&5
24416   (eval $ac_try) 2>&5
24417   ac_status=$?
24418   echo "$as_me:24418: \$? = $ac_status" >&5
24419   (exit "$ac_status"); }; }; then
24420   cf_cxx_library=yes
24421
24422 cf_add_libs="$CXXLIBS"
24423 # reverse order
24424 cf_add_0lib=
24425 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24426 # filter duplicates
24427 for cf_add_1lib in $cf_add_0lib; do
24428         for cf_add_2lib in $cf_add_libs; do
24429                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24430                         cf_add_1lib=
24431                         break
24432                 fi
24433         done
24434         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24435 done
24436 CXXLIBS="$cf_add_libs"
24437
24438          if test "$cf_gpp_libname" = cpp ; then
24439
24440 cat >>confdefs.h <<\EOF
24441 #define HAVE_GPP_BUILTIN_H 1
24442 EOF
24443
24444          else
24445
24446 cat >>confdefs.h <<\EOF
24447 #define HAVE_GXX_BUILTIN_H 1
24448 EOF
24449
24450          fi
24451 else
24452   echo "$as_me: failed program was:" >&5
24453 cat "conftest.$ac_ext" >&5
24454 cat >"conftest.$ac_ext" <<_ACEOF
24455 #line 24455 "configure"
24456 #include "confdefs.h"
24457
24458 #include <builtin.h>
24459
24460 int
24461 main (void)
24462 {
24463 two_arg_error_handler_t foo2 = lib_error_handler
24464   ;
24465   return 0;
24466 }
24467 _ACEOF
24468 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24469 if { (eval echo "$as_me:24469: \"$ac_link\"") >&5
24470   (eval $ac_link) 2>&5
24471   ac_status=$?
24472   echo "$as_me:24472: \$? = $ac_status" >&5
24473   (exit "$ac_status"); } &&
24474          { ac_try='test -s "conftest$ac_exeext"'
24475   { (eval echo "$as_me:24475: \"$ac_try\"") >&5
24476   (eval $ac_try) 2>&5
24477   ac_status=$?
24478   echo "$as_me:24478: \$? = $ac_status" >&5
24479   (exit "$ac_status"); }; }; then
24480   cf_cxx_library=yes
24481
24482 cf_add_libs="$CXXLIBS"
24483 # reverse order
24484 cf_add_0lib=
24485 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24486 # filter duplicates
24487 for cf_add_1lib in $cf_add_0lib; do
24488         for cf_add_2lib in $cf_add_libs; do
24489                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24490                         cf_add_1lib=
24491                         break
24492                 fi
24493         done
24494         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24495 done
24496 CXXLIBS="$cf_add_libs"
24497
24498 cat >>confdefs.h <<\EOF
24499 #define HAVE_BUILTIN_H 1
24500 EOF
24501
24502 else
24503   echo "$as_me: failed program was:" >&5
24504 cat "conftest.$ac_ext" >&5
24505 cf_cxx_library=no
24506 fi
24507 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24508 fi
24509 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24510         LIBS="$cf_save"
24511         echo "$as_me:24511: result: $cf_cxx_library" >&5
24512 echo "${ECHO_T}$cf_cxx_library" >&6
24513 fi
24514
24515                 ;;
24516         (*)
24517                 cf_cxx_library=no
24518                 ;;
24519         esac
24520
24521         ac_ext=cc
24522 ac_cpp='$CXXCPP $CPPFLAGS'
24523 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24524 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24525 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24526 ac_main_return="return"
24527 echo "$as_me:24527: checking how to run the C++ preprocessor" >&5
24528 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
24529 if test -z "$CXXCPP"; then
24530   if test "${ac_cv_prog_CXXCPP+set}" = set; then
24531   echo $ECHO_N "(cached) $ECHO_C" >&6
24532 else
24533       # Double quotes because CXXCPP needs to be expanded
24534     for CXXCPP in "$CXX -E" "/lib/cpp"
24535     do
24536       ac_preproc_ok=false
24537 for ac_cxx_preproc_warn_flag in '' yes
24538 do
24539   # Use a header file that comes with gcc, so configuring glibc
24540   # with a fresh cross-compiler works.
24541   # On the NeXT, cc -E runs the code through the compiler's parser,
24542   # not just through cpp. "Syntax error" is here to catch this case.
24543   cat >"conftest.$ac_ext" <<_ACEOF
24544 #line 24544 "configure"
24545 #include "confdefs.h"
24546 #include <assert.h>
24547                      Syntax error
24548 _ACEOF
24549 if { (eval echo "$as_me:24549: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24550   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24551   ac_status=$?
24552   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24553   rm -f conftest.er1
24554   cat conftest.err >&5
24555   echo "$as_me:24555: \$? = $ac_status" >&5
24556   (exit "$ac_status"); } >/dev/null; then
24557   if test -s conftest.err; then
24558     ac_cpp_err=$ac_cxx_preproc_warn_flag
24559   else
24560     ac_cpp_err=
24561   fi
24562 else
24563   ac_cpp_err=yes
24564 fi
24565 if test -z "$ac_cpp_err"; then
24566   :
24567 else
24568   echo "$as_me: failed program was:" >&5
24569   cat "conftest.$ac_ext" >&5
24570   # Broken: fails on valid input.
24571 continue
24572 fi
24573 rm -f conftest.err "conftest.$ac_ext"
24574
24575   # OK, works on sane cases.  Now check whether non-existent headers
24576   # can be detected and how.
24577   cat >"conftest.$ac_ext" <<_ACEOF
24578 #line 24578 "configure"
24579 #include "confdefs.h"
24580 #include <ac_nonexistent.h>
24581 _ACEOF
24582 if { (eval echo "$as_me:24582: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24583   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24584   ac_status=$?
24585   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24586   rm -f conftest.er1
24587   cat conftest.err >&5
24588   echo "$as_me:24588: \$? = $ac_status" >&5
24589   (exit "$ac_status"); } >/dev/null; then
24590   if test -s conftest.err; then
24591     ac_cpp_err=$ac_cxx_preproc_warn_flag
24592   else
24593     ac_cpp_err=
24594   fi
24595 else
24596   ac_cpp_err=yes
24597 fi
24598 if test -z "$ac_cpp_err"; then
24599   # Broken: success on invalid input.
24600 continue
24601 else
24602   echo "$as_me: failed program was:" >&5
24603   cat "conftest.$ac_ext" >&5
24604   # Passes both tests.
24605 ac_preproc_ok=:
24606 break
24607 fi
24608 rm -f conftest.err "conftest.$ac_ext"
24609
24610 done
24611 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24612 rm -f conftest.err "conftest.$ac_ext"
24613 if $ac_preproc_ok; then
24614   break
24615 fi
24616
24617     done
24618     ac_cv_prog_CXXCPP=$CXXCPP
24619
24620 fi
24621   CXXCPP=$ac_cv_prog_CXXCPP
24622 else
24623   ac_cv_prog_CXXCPP=$CXXCPP
24624 fi
24625 echo "$as_me:24625: result: $CXXCPP" >&5
24626 echo "${ECHO_T}$CXXCPP" >&6
24627 ac_preproc_ok=false
24628 for ac_cxx_preproc_warn_flag in '' yes
24629 do
24630   # Use a header file that comes with gcc, so configuring glibc
24631   # with a fresh cross-compiler works.
24632   # On the NeXT, cc -E runs the code through the compiler's parser,
24633   # not just through cpp. "Syntax error" is here to catch this case.
24634   cat >"conftest.$ac_ext" <<_ACEOF
24635 #line 24635 "configure"
24636 #include "confdefs.h"
24637 #include <assert.h>
24638                      Syntax error
24639 _ACEOF
24640 if { (eval echo "$as_me:24640: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24641   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24642   ac_status=$?
24643   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24644   rm -f conftest.er1
24645   cat conftest.err >&5
24646   echo "$as_me:24646: \$? = $ac_status" >&5
24647   (exit "$ac_status"); } >/dev/null; then
24648   if test -s conftest.err; then
24649     ac_cpp_err=$ac_cxx_preproc_warn_flag
24650   else
24651     ac_cpp_err=
24652   fi
24653 else
24654   ac_cpp_err=yes
24655 fi
24656 if test -z "$ac_cpp_err"; then
24657   :
24658 else
24659   echo "$as_me: failed program was:" >&5
24660   cat "conftest.$ac_ext" >&5
24661   # Broken: fails on valid input.
24662 continue
24663 fi
24664 rm -f conftest.err "conftest.$ac_ext"
24665
24666   # OK, works on sane cases.  Now check whether non-existent headers
24667   # can be detected and how.
24668   cat >"conftest.$ac_ext" <<_ACEOF
24669 #line 24669 "configure"
24670 #include "confdefs.h"
24671 #include <ac_nonexistent.h>
24672 _ACEOF
24673 if { (eval echo "$as_me:24673: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24674   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24675   ac_status=$?
24676   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24677   rm -f conftest.er1
24678   cat conftest.err >&5
24679   echo "$as_me:24679: \$? = $ac_status" >&5
24680   (exit "$ac_status"); } >/dev/null; then
24681   if test -s conftest.err; then
24682     ac_cpp_err=$ac_cxx_preproc_warn_flag
24683   else
24684     ac_cpp_err=
24685   fi
24686 else
24687   ac_cpp_err=yes
24688 fi
24689 if test -z "$ac_cpp_err"; then
24690   # Broken: success on invalid input.
24691 continue
24692 else
24693   echo "$as_me: failed program was:" >&5
24694   cat "conftest.$ac_ext" >&5
24695   # Passes both tests.
24696 ac_preproc_ok=:
24697 break
24698 fi
24699 rm -f conftest.err "conftest.$ac_ext"
24700
24701 done
24702 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24703 rm -f conftest.err "conftest.$ac_ext"
24704 if $ac_preproc_ok; then
24705   :
24706 else
24707   { { echo "$as_me:24707: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
24708 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
24709    { (exit 1); exit 1; }; }
24710 fi
24711
24712 ac_ext=cc
24713 ac_cpp='$CXXCPP $CPPFLAGS'
24714 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24715 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24716 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24717 ac_main_return="return"
24718
24719 for ac_header in typeinfo
24720 do
24721 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24722 echo "$as_me:24722: checking for $ac_header" >&5
24723 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24724 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24725   echo $ECHO_N "(cached) $ECHO_C" >&6
24726 else
24727   cat >"conftest.$ac_ext" <<_ACEOF
24728 #line 24728 "configure"
24729 #include "confdefs.h"
24730 #include <$ac_header>
24731 _ACEOF
24732 if { (eval echo "$as_me:24732: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24733   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24734   ac_status=$?
24735   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24736   rm -f conftest.er1
24737   cat conftest.err >&5
24738   echo "$as_me:24738: \$? = $ac_status" >&5
24739   (exit "$ac_status"); } >/dev/null; then
24740   if test -s conftest.err; then
24741     ac_cpp_err=$ac_cxx_preproc_warn_flag
24742   else
24743     ac_cpp_err=
24744   fi
24745 else
24746   ac_cpp_err=yes
24747 fi
24748 if test -z "$ac_cpp_err"; then
24749   eval "$as_ac_Header=yes"
24750 else
24751   echo "$as_me: failed program was:" >&5
24752   cat "conftest.$ac_ext" >&5
24753   eval "$as_ac_Header=no"
24754 fi
24755 rm -f conftest.err "conftest.$ac_ext"
24756 fi
24757 echo "$as_me:24757: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
24758 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
24759 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
24760   cat >>confdefs.h <<EOF
24761 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24762 EOF
24763
24764 fi
24765 done
24766
24767 for ac_header in iostream
24768 do
24769 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24770 echo "$as_me:24770: checking for $ac_header" >&5
24771 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24772 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24773   echo $ECHO_N "(cached) $ECHO_C" >&6
24774 else
24775   cat >"conftest.$ac_ext" <<_ACEOF
24776 #line 24776 "configure"
24777 #include "confdefs.h"
24778 #include <$ac_header>
24779 _ACEOF
24780 if { (eval echo "$as_me:24780: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24781   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24782   ac_status=$?
24783   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24784   rm -f conftest.er1
24785   cat conftest.err >&5
24786   echo "$as_me:24786: \$? = $ac_status" >&5
24787   (exit "$ac_status"); } >/dev/null; then
24788   if test -s conftest.err; then
24789     ac_cpp_err=$ac_cxx_preproc_warn_flag
24790   else
24791     ac_cpp_err=
24792   fi
24793 else
24794   ac_cpp_err=yes
24795 fi
24796 if test -z "$ac_cpp_err"; then
24797   eval "$as_ac_Header=yes"
24798 else
24799   echo "$as_me: failed program was:" >&5
24800   cat "conftest.$ac_ext" >&5
24801   eval "$as_ac_Header=no"
24802 fi
24803 rm -f conftest.err "conftest.$ac_ext"
24804 fi
24805 echo "$as_me:24805: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
24806 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
24807 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
24808   cat >>confdefs.h <<EOF
24809 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24810 EOF
24811
24812 fi
24813 done
24814
24815 if test x"$ac_cv_header_iostream" = xyes ; then
24816         echo "$as_me:24816: checking if iostream uses std-namespace" >&5
24817 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
24818         cat >"conftest.$ac_ext" <<_ACEOF
24819 #line 24819 "configure"
24820 #include "confdefs.h"
24821
24822 #include <iostream>
24823 using std::endl;
24824 using std::cerr;
24825 int
24826 main (void)
24827 {
24828
24829 cerr << "testing" << endl;
24830
24831   ;
24832   return 0;
24833 }
24834 _ACEOF
24835 rm -f "conftest.$ac_objext"
24836 if { (eval echo "$as_me:24836: \"$ac_compile\"") >&5
24837   (eval $ac_compile) 2>&5
24838   ac_status=$?
24839   echo "$as_me:24839: \$? = $ac_status" >&5
24840   (exit "$ac_status"); } &&
24841          { ac_try='test -s "conftest.$ac_objext"'
24842   { (eval echo "$as_me:24842: \"$ac_try\"") >&5
24843   (eval $ac_try) 2>&5
24844   ac_status=$?
24845   echo "$as_me:24845: \$? = $ac_status" >&5
24846   (exit "$ac_status"); }; }; then
24847   cf_iostream_namespace=yes
24848 else
24849   echo "$as_me: failed program was:" >&5
24850 cat "conftest.$ac_ext" >&5
24851 cf_iostream_namespace=no
24852 fi
24853 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24854         echo "$as_me:24854: result: $cf_iostream_namespace" >&5
24855 echo "${ECHO_T}$cf_iostream_namespace" >&6
24856         if test "$cf_iostream_namespace" = yes ; then
24857
24858 cat >>confdefs.h <<\EOF
24859 #define IOSTREAM_NAMESPACE 1
24860 EOF
24861
24862         fi
24863 fi
24864
24865 echo "$as_me:24865: checking if we should include stdbool.h" >&5
24866 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24867
24868 if test "${cf_cv_header_stdbool_h+set}" = set; then
24869   echo $ECHO_N "(cached) $ECHO_C" >&6
24870 else
24871
24872         cat >"conftest.$ac_ext" <<_ACEOF
24873 #line 24873 "configure"
24874 #include "confdefs.h"
24875
24876 int
24877 main (void)
24878 {
24879 bool foo = false
24880   ;
24881   return 0;
24882 }
24883 _ACEOF
24884 rm -f "conftest.$ac_objext"
24885 if { (eval echo "$as_me:24885: \"$ac_compile\"") >&5
24886   (eval $ac_compile) 2>&5
24887   ac_status=$?
24888   echo "$as_me:24888: \$? = $ac_status" >&5
24889   (exit "$ac_status"); } &&
24890          { ac_try='test -s "conftest.$ac_objext"'
24891   { (eval echo "$as_me:24891: \"$ac_try\"") >&5
24892   (eval $ac_try) 2>&5
24893   ac_status=$?
24894   echo "$as_me:24894: \$? = $ac_status" >&5
24895   (exit "$ac_status"); }; }; then
24896   cf_cv_header_stdbool_h=0
24897 else
24898   echo "$as_me: failed program was:" >&5
24899 cat "conftest.$ac_ext" >&5
24900 cat >"conftest.$ac_ext" <<_ACEOF
24901 #line 24901 "configure"
24902 #include "confdefs.h"
24903
24904 #ifndef __BEOS__
24905 #include <stdbool.h>
24906 #endif
24907
24908 int
24909 main (void)
24910 {
24911 bool foo = false
24912   ;
24913   return 0;
24914 }
24915 _ACEOF
24916 rm -f "conftest.$ac_objext"
24917 if { (eval echo "$as_me:24917: \"$ac_compile\"") >&5
24918   (eval $ac_compile) 2>&5
24919   ac_status=$?
24920   echo "$as_me:24920: \$? = $ac_status" >&5
24921   (exit "$ac_status"); } &&
24922          { ac_try='test -s "conftest.$ac_objext"'
24923   { (eval echo "$as_me:24923: \"$ac_try\"") >&5
24924   (eval $ac_try) 2>&5
24925   ac_status=$?
24926   echo "$as_me:24926: \$? = $ac_status" >&5
24927   (exit "$ac_status"); }; }; then
24928   cf_cv_header_stdbool_h=1
24929 else
24930   echo "$as_me: failed program was:" >&5
24931 cat "conftest.$ac_ext" >&5
24932 cf_cv_header_stdbool_h=0
24933 fi
24934 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24935 fi
24936 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24937 fi
24938
24939 if test "$cf_cv_header_stdbool_h" = 1
24940 then    echo "$as_me:24940: result: yes" >&5
24941 echo "${ECHO_T}yes" >&6
24942 else    echo "$as_me:24942: result: no" >&5
24943 echo "${ECHO_T}no" >&6
24944 fi
24945
24946 echo "$as_me:24946: checking for builtin bool type" >&5
24947 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24948
24949 if test "${cf_cv_builtin_bool+set}" = set; then
24950   echo $ECHO_N "(cached) $ECHO_C" >&6
24951 else
24952
24953         cat >"conftest.$ac_ext" <<_ACEOF
24954 #line 24954 "configure"
24955 #include "confdefs.h"
24956
24957 #include <stdio.h>
24958 #include <sys/types.h>
24959
24960 int
24961 main (void)
24962 {
24963 bool x = false
24964   ;
24965   return 0;
24966 }
24967 _ACEOF
24968 rm -f "conftest.$ac_objext"
24969 if { (eval echo "$as_me:24969: \"$ac_compile\"") >&5
24970   (eval $ac_compile) 2>&5
24971   ac_status=$?
24972   echo "$as_me:24972: \$? = $ac_status" >&5
24973   (exit "$ac_status"); } &&
24974          { ac_try='test -s "conftest.$ac_objext"'
24975   { (eval echo "$as_me:24975: \"$ac_try\"") >&5
24976   (eval $ac_try) 2>&5
24977   ac_status=$?
24978   echo "$as_me:24978: \$? = $ac_status" >&5
24979   (exit "$ac_status"); }; }; then
24980   cf_cv_builtin_bool=1
24981 else
24982   echo "$as_me: failed program was:" >&5
24983 cat "conftest.$ac_ext" >&5
24984 cf_cv_builtin_bool=0
24985 fi
24986 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24987
24988 fi
24989
24990 if test "$cf_cv_builtin_bool" = 1
24991 then    echo "$as_me:24991: result: yes" >&5
24992 echo "${ECHO_T}yes" >&6
24993 else    echo "$as_me:24993: result: no" >&5
24994 echo "${ECHO_T}no" >&6
24995 fi
24996
24997 echo "$as_me:24997: checking for bool" >&5
24998 echo $ECHO_N "checking for bool... $ECHO_C" >&6
24999 if test "${ac_cv_type_bool+set}" = set; then
25000   echo $ECHO_N "(cached) $ECHO_C" >&6
25001 else
25002   cat >"conftest.$ac_ext" <<_ACEOF
25003 #line 25003 "configure"
25004 #include "confdefs.h"
25005
25006 #include <stdlib.h>
25007 #include <stdio.h>
25008
25009 #if defined(__cplusplus)
25010
25011 #ifdef HAVE_GXX_BUILTIN_H
25012 #include <g++/builtin.h>
25013 #elif HAVE_GPP_BUILTIN_H
25014 #include <gpp/builtin.h>
25015 #elif HAVE_BUILTIN_H
25016 #include <builtin.h>
25017 #endif
25018
25019 #else
25020
25021 #if $cf_cv_header_stdbool_h
25022 #include <stdbool.h>
25023 #endif
25024
25025 #endif
25026
25027 int
25028 main (void)
25029 {
25030 if ((bool *) 0)
25031   return 0;
25032 if (sizeof (bool))
25033   return 0;
25034   ;
25035   return 0;
25036 }
25037 _ACEOF
25038 rm -f "conftest.$ac_objext"
25039 if { (eval echo "$as_me:25039: \"$ac_compile\"") >&5
25040   (eval $ac_compile) 2>&5
25041   ac_status=$?
25042   echo "$as_me:25042: \$? = $ac_status" >&5
25043   (exit "$ac_status"); } &&
25044          { ac_try='test -s "conftest.$ac_objext"'
25045   { (eval echo "$as_me:25045: \"$ac_try\"") >&5
25046   (eval $ac_try) 2>&5
25047   ac_status=$?
25048   echo "$as_me:25048: \$? = $ac_status" >&5
25049   (exit "$ac_status"); }; }; then
25050   ac_cv_type_bool=yes
25051 else
25052   echo "$as_me: failed program was:" >&5
25053 cat "conftest.$ac_ext" >&5
25054 ac_cv_type_bool=no
25055 fi
25056 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25057 fi
25058 echo "$as_me:25058: result: $ac_cv_type_bool" >&5
25059 echo "${ECHO_T}$ac_cv_type_bool" >&6
25060
25061 echo "$as_me:25061: checking size of bool" >&5
25062 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25063 if test "${ac_cv_sizeof_bool+set}" = set; then
25064   echo $ECHO_N "(cached) $ECHO_C" >&6
25065 else
25066   if test "$ac_cv_type_bool" = yes; then
25067   if test "$cross_compiling" = yes; then
25068   # Depending upon the size, compute the lo and hi bounds.
25069 cat >"conftest.$ac_ext" <<_ACEOF
25070 #line 25070 "configure"
25071 #include "confdefs.h"
25072
25073 #include <stdlib.h>
25074 #include <stdio.h>
25075
25076 #if defined(__cplusplus)
25077
25078 #ifdef HAVE_GXX_BUILTIN_H
25079 #include <g++/builtin.h>
25080 #elif HAVE_GPP_BUILTIN_H
25081 #include <gpp/builtin.h>
25082 #elif HAVE_BUILTIN_H
25083 #include <builtin.h>
25084 #endif
25085
25086 #else
25087
25088 #if $cf_cv_header_stdbool_h
25089 #include <stdbool.h>
25090 #endif
25091
25092 #endif
25093
25094 int
25095 main (void)
25096 {
25097 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25098   ;
25099   return 0;
25100 }
25101 _ACEOF
25102 rm -f "conftest.$ac_objext"
25103 if { (eval echo "$as_me:25103: \"$ac_compile\"") >&5
25104   (eval $ac_compile) 2>&5
25105   ac_status=$?
25106   echo "$as_me:25106: \$? = $ac_status" >&5
25107   (exit "$ac_status"); } &&
25108          { ac_try='test -s "conftest.$ac_objext"'
25109   { (eval echo "$as_me:25109: \"$ac_try\"") >&5
25110   (eval $ac_try) 2>&5
25111   ac_status=$?
25112   echo "$as_me:25112: \$? = $ac_status" >&5
25113   (exit "$ac_status"); }; }; then
25114   ac_lo=0 ac_mid=0
25115   while :; do
25116     cat >"conftest.$ac_ext" <<_ACEOF
25117 #line 25117 "configure"
25118 #include "confdefs.h"
25119
25120 #include <stdlib.h>
25121 #include <stdio.h>
25122
25123 #if defined(__cplusplus)
25124
25125 #ifdef HAVE_GXX_BUILTIN_H
25126 #include <g++/builtin.h>
25127 #elif HAVE_GPP_BUILTIN_H
25128 #include <gpp/builtin.h>
25129 #elif HAVE_BUILTIN_H
25130 #include <builtin.h>
25131 #endif
25132
25133 #else
25134
25135 #if $cf_cv_header_stdbool_h
25136 #include <stdbool.h>
25137 #endif
25138
25139 #endif
25140
25141 int
25142 main (void)
25143 {
25144 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25145   ;
25146   return 0;
25147 }
25148 _ACEOF
25149 rm -f "conftest.$ac_objext"
25150 if { (eval echo "$as_me:25150: \"$ac_compile\"") >&5
25151   (eval $ac_compile) 2>&5
25152   ac_status=$?
25153   echo "$as_me:25153: \$? = $ac_status" >&5
25154   (exit "$ac_status"); } &&
25155          { ac_try='test -s "conftest.$ac_objext"'
25156   { (eval echo "$as_me:25156: \"$ac_try\"") >&5
25157   (eval $ac_try) 2>&5
25158   ac_status=$?
25159   echo "$as_me:25159: \$? = $ac_status" >&5
25160   (exit "$ac_status"); }; }; then
25161   ac_hi=$ac_mid; break
25162 else
25163   echo "$as_me: failed program was:" >&5
25164 cat "conftest.$ac_ext" >&5
25165 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
25166 fi
25167 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25168   done
25169 else
25170   echo "$as_me: failed program was:" >&5
25171 cat "conftest.$ac_ext" >&5
25172 ac_hi=-1 ac_mid=-1
25173   while :; do
25174     cat >"conftest.$ac_ext" <<_ACEOF
25175 #line 25175 "configure"
25176 #include "confdefs.h"
25177
25178 #include <stdlib.h>
25179 #include <stdio.h>
25180
25181 #if defined(__cplusplus)
25182
25183 #ifdef HAVE_GXX_BUILTIN_H
25184 #include <g++/builtin.h>
25185 #elif HAVE_GPP_BUILTIN_H
25186 #include <gpp/builtin.h>
25187 #elif HAVE_BUILTIN_H
25188 #include <builtin.h>
25189 #endif
25190
25191 #else
25192
25193 #if $cf_cv_header_stdbool_h
25194 #include <stdbool.h>
25195 #endif
25196
25197 #endif
25198
25199 int
25200 main (void)
25201 {
25202 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
25203   ;
25204   return 0;
25205 }
25206 _ACEOF
25207 rm -f "conftest.$ac_objext"
25208 if { (eval echo "$as_me:25208: \"$ac_compile\"") >&5
25209   (eval $ac_compile) 2>&5
25210   ac_status=$?
25211   echo "$as_me:25211: \$? = $ac_status" >&5
25212   (exit "$ac_status"); } &&
25213          { ac_try='test -s "conftest.$ac_objext"'
25214   { (eval echo "$as_me:25214: \"$ac_try\"") >&5
25215   (eval $ac_try) 2>&5
25216   ac_status=$?
25217   echo "$as_me:25217: \$? = $ac_status" >&5
25218   (exit "$ac_status"); }; }; then
25219   ac_lo=$ac_mid; break
25220 else
25221   echo "$as_me: failed program was:" >&5
25222 cat "conftest.$ac_ext" >&5
25223 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
25224 fi
25225 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25226   done
25227 fi
25228 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25229 # Binary search between lo and hi bounds.
25230 while test "x$ac_lo" != "x$ac_hi"; do
25231   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
25232   cat >"conftest.$ac_ext" <<_ACEOF
25233 #line 25233 "configure"
25234 #include "confdefs.h"
25235
25236 #include <stdlib.h>
25237 #include <stdio.h>
25238
25239 #if defined(__cplusplus)
25240
25241 #ifdef HAVE_GXX_BUILTIN_H
25242 #include <g++/builtin.h>
25243 #elif HAVE_GPP_BUILTIN_H
25244 #include <gpp/builtin.h>
25245 #elif HAVE_BUILTIN_H
25246 #include <builtin.h>
25247 #endif
25248
25249 #else
25250
25251 #if $cf_cv_header_stdbool_h
25252 #include <stdbool.h>
25253 #endif
25254
25255 #endif
25256
25257 int
25258 main (void)
25259 {
25260 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25261   ;
25262   return 0;
25263 }
25264 _ACEOF
25265 rm -f "conftest.$ac_objext"
25266 if { (eval echo "$as_me:25266: \"$ac_compile\"") >&5
25267   (eval $ac_compile) 2>&5
25268   ac_status=$?
25269   echo "$as_me:25269: \$? = $ac_status" >&5
25270   (exit "$ac_status"); } &&
25271          { ac_try='test -s "conftest.$ac_objext"'
25272   { (eval echo "$as_me:25272: \"$ac_try\"") >&5
25273   (eval $ac_try) 2>&5
25274   ac_status=$?
25275   echo "$as_me:25275: \$? = $ac_status" >&5
25276   (exit "$ac_status"); }; }; then
25277   ac_hi=$ac_mid
25278 else
25279   echo "$as_me: failed program was:" >&5
25280 cat "conftest.$ac_ext" >&5
25281 ac_lo=`expr "$ac_mid" + 1`
25282 fi
25283 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25284 done
25285 ac_cv_sizeof_bool=$ac_lo
25286 else
25287   if test "$cross_compiling" = yes; then
25288   { { echo "$as_me:25288: error: cannot run test program while cross compiling" >&5
25289 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25290    { (exit 1); exit 1; }; }
25291 else
25292   cat >"conftest.$ac_ext" <<_ACEOF
25293 #line 25293 "configure"
25294 #include "confdefs.h"
25295
25296 #include <stdlib.h>
25297 #include <stdio.h>
25298
25299 #if defined(__cplusplus)
25300
25301 #ifdef HAVE_GXX_BUILTIN_H
25302 #include <g++/builtin.h>
25303 #elif HAVE_GPP_BUILTIN_H
25304 #include <gpp/builtin.h>
25305 #elif HAVE_BUILTIN_H
25306 #include <builtin.h>
25307 #endif
25308
25309 #else
25310
25311 #if $cf_cv_header_stdbool_h
25312 #include <stdbool.h>
25313 #endif
25314
25315 #endif
25316
25317 int
25318 main (void)
25319 {
25320 FILE *f = fopen ("conftest.val", "w");
25321 if (!f)
25322   $ac_main_return (1);
25323 fprintf (f, "%d", (sizeof (bool)));
25324 fclose (f);
25325   ;
25326   return 0;
25327 }
25328 _ACEOF
25329 rm -f "conftest$ac_exeext"
25330 if { (eval echo "$as_me:25330: \"$ac_link\"") >&5
25331   (eval $ac_link) 2>&5
25332   ac_status=$?
25333   echo "$as_me:25333: \$? = $ac_status" >&5
25334   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25335   { (eval echo "$as_me:25335: \"$ac_try\"") >&5
25336   (eval $ac_try) 2>&5
25337   ac_status=$?
25338   echo "$as_me:25338: \$? = $ac_status" >&5
25339   (exit "$ac_status"); }; }; then
25340   ac_cv_sizeof_bool=`cat conftest.val`
25341 else
25342   echo "$as_me: program exited with status $ac_status" >&5
25343 echo "$as_me: failed program was:" >&5
25344 cat "conftest.$ac_ext" >&5
25345 fi
25346 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25347 fi
25348 fi
25349 rm -f conftest.val
25350 else
25351   ac_cv_sizeof_bool=0
25352 fi
25353 fi
25354 echo "$as_me:25354: result: $ac_cv_sizeof_bool" >&5
25355 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
25356 cat >>confdefs.h <<EOF
25357 #define SIZEOF_BOOL $ac_cv_sizeof_bool
25358 EOF
25359
25360 echo "$as_me:25360: checking for type of bool" >&5
25361 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
25362 if test "${cf_cv_type_of_bool+set}" = set; then
25363   echo $ECHO_N "(cached) $ECHO_C" >&6
25364 else
25365
25366         rm -f cf_test.out
25367         if test "$cross_compiling" = yes; then
25368
25369                 case x$ac_cv_sizeof_bool in
25370                 (x1) cf_cv_type_of_bool="unsigned char";;
25371                 (x2) cf_cv_type_of_bool="unsigned short";;
25372                 (x4) cf_cv_type_of_bool="unsigned int";;
25373                 (x8) cf_cv_type_of_bool="unsigned long";;
25374                 (*)  cf_cv_type_of_bool=unknown;;
25375                 esac
25376
25377 else
25378   cat >"conftest.$ac_ext" <<_ACEOF
25379 #line 25379 "configure"
25380 #include "confdefs.h"
25381
25382 #include <stdlib.h>
25383 #include <stdio.h>
25384
25385 #if defined(__cplusplus)
25386
25387 #ifdef HAVE_GXX_BUILTIN_H
25388 #include <g++/builtin.h>
25389 #elif HAVE_GPP_BUILTIN_H
25390 #include <gpp/builtin.h>
25391 #elif HAVE_BUILTIN_H
25392 #include <builtin.h>
25393 #endif
25394
25395 #else
25396
25397 #if $cf_cv_header_stdbool_h
25398 #include <stdbool.h>
25399 #endif
25400
25401 #endif
25402
25403 int main(void)
25404 {
25405         FILE *fp = fopen("cf_test.out", "w");
25406         if (fp != 0) {
25407                 bool x = true;
25408                 if ((bool)(-x) >= 0)
25409                         fputs("unsigned ", fp);
25410                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
25411                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
25412                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
25413                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
25414                 fclose(fp);
25415         }
25416         ${cf_cv_main_return:-return}(0);
25417 }
25418
25419 _ACEOF
25420 rm -f "conftest$ac_exeext"
25421 if { (eval echo "$as_me:25421: \"$ac_link\"") >&5
25422   (eval $ac_link) 2>&5
25423   ac_status=$?
25424   echo "$as_me:25424: \$? = $ac_status" >&5
25425   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25426   { (eval echo "$as_me:25426: \"$ac_try\"") >&5
25427   (eval $ac_try) 2>&5
25428   ac_status=$?
25429   echo "$as_me:25429: \$? = $ac_status" >&5
25430   (exit "$ac_status"); }; }; then
25431   cf_cv_type_of_bool=`cat cf_test.out`
25432                  if test -z "$cf_cv_type_of_bool"; then
25433                    cf_cv_type_of_bool=unknown
25434                  fi
25435 else
25436   echo "$as_me: program exited with status $ac_status" >&5
25437 echo "$as_me: failed program was:" >&5
25438 cat "conftest.$ac_ext" >&5
25439 cf_cv_type_of_bool=unknown
25440 fi
25441 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25442 fi
25443         rm -f cf_test.out
25444
25445 fi
25446 echo "$as_me:25446: result: $cf_cv_type_of_bool" >&5
25447 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
25448
25449 if test "$cf_cv_type_of_bool" = unknown ; then
25450         case .$NCURSES_BOOL in
25451         (.auto|.) NCURSES_BOOL=unsigned;;
25452         esac
25453         { echo "$as_me:25453: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
25454 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
25455         cf_cv_type_of_bool=$NCURSES_BOOL
25456 fi
25457
25458 echo "$as_me:25458: checking for special defines needed for etip.h" >&5
25459 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
25460 cf_save_CXXFLAGS="$CXXFLAGS"
25461 cf_result="none"
25462
25463 # etip.h includes ncurses.h which includes ncurses_dll.h
25464 # But ncurses_dll.h is generated - fix here.
25465 test -d include || mkdir include
25466 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
25467
25468 for cf_math in "" MATH_H
25469 do
25470 for cf_excp in "" MATH_EXCEPTION
25471 do
25472         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
25473         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
25474         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
25475 cat >"conftest.$ac_ext" <<_ACEOF
25476 #line 25476 "configure"
25477 #include "confdefs.h"
25478
25479 #include <etip.h.in>
25480
25481 int
25482 main (void)
25483 {
25484
25485   ;
25486   return 0;
25487 }
25488 _ACEOF
25489 rm -f "conftest.$ac_objext"
25490 if { (eval echo "$as_me:25490: \"$ac_compile\"") >&5
25491   (eval $ac_compile) 2>&5
25492   ac_status=$?
25493   echo "$as_me:25493: \$? = $ac_status" >&5
25494   (exit "$ac_status"); } &&
25495          { ac_try='test -s "conftest.$ac_objext"'
25496   { (eval echo "$as_me:25496: \"$ac_try\"") >&5
25497   (eval $ac_try) 2>&5
25498   ac_status=$?
25499   echo "$as_me:25499: \$? = $ac_status" >&5
25500   (exit "$ac_status"); }; }; then
25501
25502         test -n "$cf_math" && cat >>confdefs.h <<EOF
25503 #define ETIP_NEEDS_${cf_math} 1
25504 EOF
25505
25506         test -n "$cf_excp" && cat >>confdefs.h <<EOF
25507 #define ETIP_NEEDS_${cf_excp} 1
25508 EOF
25509
25510         cf_result="$cf_math $cf_excp"
25511         break 2
25512
25513 else
25514   echo "$as_me: failed program was:" >&5
25515 cat "conftest.$ac_ext" >&5
25516 fi
25517 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25518 done
25519 done
25520 echo "$as_me:25520: result: $cf_result" >&5
25521 echo "${ECHO_T}$cf_result" >&6
25522 CXXFLAGS="$cf_save_CXXFLAGS"
25523
25524 if test -n "$CXX"; then
25525 echo "$as_me:25525: checking if $CXX accepts parameter initialization" >&5
25526 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
25527 if test "${cf_cv_cpp_param_init+set}" = set; then
25528   echo $ECHO_N "(cached) $ECHO_C" >&6
25529 else
25530
25531         ac_ext=cc
25532 ac_cpp='$CXXCPP $CPPFLAGS'
25533 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25534 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25535 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25536 ac_main_return="return"
25537
25538         if test "$cross_compiling" = yes; then
25539   cf_cv_cpp_param_init=unknown
25540 else
25541   cat >"conftest.$ac_ext" <<_ACEOF
25542 #line 25542 "configure"
25543 #include "confdefs.h"
25544
25545 class TEST {
25546 private:
25547         int value;
25548 public:
25549         TEST(int x = 1);
25550         ~TEST();
25551 };
25552
25553 TEST::TEST(int x = 1)   // some compilers do not like second initializer
25554 {
25555         value = x;
25556 }
25557 int main(void) { }
25558
25559 _ACEOF
25560 rm -f "conftest$ac_exeext"
25561 if { (eval echo "$as_me:25561: \"$ac_link\"") >&5
25562   (eval $ac_link) 2>&5
25563   ac_status=$?
25564   echo "$as_me:25564: \$? = $ac_status" >&5
25565   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25566   { (eval echo "$as_me:25566: \"$ac_try\"") >&5
25567   (eval $ac_try) 2>&5
25568   ac_status=$?
25569   echo "$as_me:25569: \$? = $ac_status" >&5
25570   (exit "$ac_status"); }; }; then
25571   cf_cv_cpp_param_init=yes
25572 else
25573   echo "$as_me: program exited with status $ac_status" >&5
25574 echo "$as_me: failed program was:" >&5
25575 cat "conftest.$ac_ext" >&5
25576 cf_cv_cpp_param_init=no
25577 fi
25578 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25579 fi
25580         ac_ext=cc
25581 ac_cpp='$CXXCPP $CPPFLAGS'
25582 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25583 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25584 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25585 ac_main_return="return"
25586
25587 fi
25588 echo "$as_me:25588: result: $cf_cv_cpp_param_init" >&5
25589 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
25590 fi
25591 test "$cf_cv_cpp_param_init" = yes &&
25592 cat >>confdefs.h <<\EOF
25593 #define CPP_HAS_PARAM_INIT 1
25594 EOF
25595
25596 if test -n "$CXX"; then
25597
25598 echo "$as_me:25598: checking if $CXX accepts static_cast" >&5
25599 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
25600 if test "${cf_cv_cpp_static_cast+set}" = set; then
25601   echo $ECHO_N "(cached) $ECHO_C" >&6
25602 else
25603
25604         ac_ext=cc
25605 ac_cpp='$CXXCPP $CPPFLAGS'
25606 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25607 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25608 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25609 ac_main_return="return"
25610
25611         cat >"conftest.$ac_ext" <<_ACEOF
25612 #line 25612 "configure"
25613 #include "confdefs.h"
25614
25615 class NCursesPanel
25616 {
25617 public:
25618   NCursesPanel(int nlines,
25619                int ncols,
25620                int begin_y = 0,
25621                int begin_x = 0)
25622   {
25623   }
25624   NCursesPanel();
25625   ~NCursesPanel();
25626 };
25627
25628 template<class T> class NCursesUserPanel : public NCursesPanel
25629 {
25630 public:
25631   NCursesUserPanel (int nlines,
25632                     int ncols,
25633                     int begin_y = 0,
25634                     int begin_x = 0,
25635                     const T* p_UserData = static_cast<T*>(0))
25636     : NCursesPanel (nlines, ncols, begin_y, begin_x)
25637   {
25638   };
25639   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
25640   {
25641   };
25642
25643   virtual ~NCursesUserPanel() {};
25644 };
25645
25646 int
25647 main (void)
25648 {
25649
25650         const char* p_UserData = static_cast<char*>(0)
25651   ;
25652   return 0;
25653 }
25654 _ACEOF
25655 rm -f "conftest.$ac_objext"
25656 if { (eval echo "$as_me:25656: \"$ac_compile\"") >&5
25657   (eval $ac_compile) 2>&5
25658   ac_status=$?
25659   echo "$as_me:25659: \$? = $ac_status" >&5
25660   (exit "$ac_status"); } &&
25661          { ac_try='test -s "conftest.$ac_objext"'
25662   { (eval echo "$as_me:25662: \"$ac_try\"") >&5
25663   (eval $ac_try) 2>&5
25664   ac_status=$?
25665   echo "$as_me:25665: \$? = $ac_status" >&5
25666   (exit "$ac_status"); }; }; then
25667   cf_cv_cpp_static_cast=yes
25668 else
25669   echo "$as_me: failed program was:" >&5
25670 cat "conftest.$ac_ext" >&5
25671 cf_cv_cpp_static_cast=no
25672 fi
25673 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25674
25675         ac_ext=cc
25676 ac_cpp='$CXXCPP $CPPFLAGS'
25677 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25678 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25679 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25680 ac_main_return="return"
25681
25682 fi
25683 echo "$as_me:25683: result: $cf_cv_cpp_static_cast" >&5
25684 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
25685
25686 fi
25687
25688 test "$cf_cv_cpp_static_cast" = yes &&
25689 cat >>confdefs.h <<\EOF
25690 #define CPP_HAS_STATIC_CAST 1
25691 EOF
25692
25693         CXX_AR='$(AR)'
25694         CXX_ARFLAGS='$(ARFLAGS)'
25695         case "$cf_cv_system_name" in
25696         (irix*)
25697             if test "$GXX" != yes ; then
25698                 CXX_AR='$(CXX)'
25699                 CXX_ARFLAGS='-ar -o'
25700             fi
25701             ;;
25702         (sco3.2v5*)
25703             CXXLDFLAGS="-u main"
25704             ;;
25705         (solaris2*)
25706             if test "$GXX" != yes ; then
25707                 CXX_AR='$(CXX)'
25708                 CXX_ARFLAGS='-xar -o'
25709             fi
25710             ;;
25711         esac
25712
25713 else
25714         cf_cxx_library=no
25715         cf_cv_builtin_bool=1
25716
25717         # Just because we are not configuring against C++ right now does not
25718         # mean that a user will not want to use C++.  Some distributors disable
25719         # the C++ portion of this configuration as a shortcut (or just to avoid
25720         # compiling the demo in the c++ directory).  So we need a reasonable
25721         # default for the 'bool' type.
25722         #
25723         # Caveat: since the storage of the bool type is not standardized, it
25724         # may change.
25725
25726         if test "$NCURSES_BOOL" != auto ; then
25727                 cf_cv_type_of_bool=$NCURSES_BOOL
25728                 cf_cv_header_stdbool_h=0
25729         else
25730                 if test "$cf_cv_header_stdbool_h" = 1 ; then
25731
25732 echo "$as_me:25732: checking for bool" >&5
25733 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25734 if test "${ac_cv_type_bool+set}" = set; then
25735   echo $ECHO_N "(cached) $ECHO_C" >&6
25736 else
25737   cat >"conftest.$ac_ext" <<_ACEOF
25738 #line 25738 "configure"
25739 #include "confdefs.h"
25740
25741 #include <stdlib.h>
25742 #include <stdio.h>
25743
25744 #if defined(__cplusplus)
25745
25746 #ifdef HAVE_GXX_BUILTIN_H
25747 #include <g++/builtin.h>
25748 #elif HAVE_GPP_BUILTIN_H
25749 #include <gpp/builtin.h>
25750 #elif HAVE_BUILTIN_H
25751 #include <builtin.h>
25752 #endif
25753
25754 #else
25755
25756 #if $cf_cv_header_stdbool_h
25757 #include <stdbool.h>
25758 #endif
25759
25760 #endif
25761
25762 int
25763 main (void)
25764 {
25765 if ((bool *) 0)
25766   return 0;
25767 if (sizeof (bool))
25768   return 0;
25769   ;
25770   return 0;
25771 }
25772 _ACEOF
25773 rm -f "conftest.$ac_objext"
25774 if { (eval echo "$as_me:25774: \"$ac_compile\"") >&5
25775   (eval $ac_compile) 2>&5
25776   ac_status=$?
25777   echo "$as_me:25777: \$? = $ac_status" >&5
25778   (exit "$ac_status"); } &&
25779          { ac_try='test -s "conftest.$ac_objext"'
25780   { (eval echo "$as_me:25780: \"$ac_try\"") >&5
25781   (eval $ac_try) 2>&5
25782   ac_status=$?
25783   echo "$as_me:25783: \$? = $ac_status" >&5
25784   (exit "$ac_status"); }; }; then
25785   ac_cv_type_bool=yes
25786 else
25787   echo "$as_me: failed program was:" >&5
25788 cat "conftest.$ac_ext" >&5
25789 ac_cv_type_bool=no
25790 fi
25791 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25792 fi
25793 echo "$as_me:25793: result: $ac_cv_type_bool" >&5
25794 echo "${ECHO_T}$ac_cv_type_bool" >&6
25795
25796 echo "$as_me:25796: checking size of bool" >&5
25797 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25798 if test "${ac_cv_sizeof_bool+set}" = set; then
25799   echo $ECHO_N "(cached) $ECHO_C" >&6
25800 else
25801   if test "$ac_cv_type_bool" = yes; then
25802   if test "$cross_compiling" = yes; then
25803   # Depending upon the size, compute the lo and hi bounds.
25804 cat >"conftest.$ac_ext" <<_ACEOF
25805 #line 25805 "configure"
25806 #include "confdefs.h"
25807
25808 #include <stdlib.h>
25809 #include <stdio.h>
25810
25811 #if defined(__cplusplus)
25812
25813 #ifdef HAVE_GXX_BUILTIN_H
25814 #include <g++/builtin.h>
25815 #elif HAVE_GPP_BUILTIN_H
25816 #include <gpp/builtin.h>
25817 #elif HAVE_BUILTIN_H
25818 #include <builtin.h>
25819 #endif
25820
25821 #else
25822
25823 #if $cf_cv_header_stdbool_h
25824 #include <stdbool.h>
25825 #endif
25826
25827 #endif
25828
25829 int
25830 main (void)
25831 {
25832 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25833   ;
25834   return 0;
25835 }
25836 _ACEOF
25837 rm -f "conftest.$ac_objext"
25838 if { (eval echo "$as_me:25838: \"$ac_compile\"") >&5
25839   (eval $ac_compile) 2>&5
25840   ac_status=$?
25841   echo "$as_me:25841: \$? = $ac_status" >&5
25842   (exit "$ac_status"); } &&
25843          { ac_try='test -s "conftest.$ac_objext"'
25844   { (eval echo "$as_me:25844: \"$ac_try\"") >&5
25845   (eval $ac_try) 2>&5
25846   ac_status=$?
25847   echo "$as_me:25847: \$? = $ac_status" >&5
25848   (exit "$ac_status"); }; }; then
25849   ac_lo=0 ac_mid=0
25850   while :; do
25851     cat >"conftest.$ac_ext" <<_ACEOF
25852 #line 25852 "configure"
25853 #include "confdefs.h"
25854
25855 #include <stdlib.h>
25856 #include <stdio.h>
25857
25858 #if defined(__cplusplus)
25859
25860 #ifdef HAVE_GXX_BUILTIN_H
25861 #include <g++/builtin.h>
25862 #elif HAVE_GPP_BUILTIN_H
25863 #include <gpp/builtin.h>
25864 #elif HAVE_BUILTIN_H
25865 #include <builtin.h>
25866 #endif
25867
25868 #else
25869
25870 #if $cf_cv_header_stdbool_h
25871 #include <stdbool.h>
25872 #endif
25873
25874 #endif
25875
25876 int
25877 main (void)
25878 {
25879 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25880   ;
25881   return 0;
25882 }
25883 _ACEOF
25884 rm -f "conftest.$ac_objext"
25885 if { (eval echo "$as_me:25885: \"$ac_compile\"") >&5
25886   (eval $ac_compile) 2>&5
25887   ac_status=$?
25888   echo "$as_me:25888: \$? = $ac_status" >&5
25889   (exit "$ac_status"); } &&
25890          { ac_try='test -s "conftest.$ac_objext"'
25891   { (eval echo "$as_me:25891: \"$ac_try\"") >&5
25892   (eval $ac_try) 2>&5
25893   ac_status=$?
25894   echo "$as_me:25894: \$? = $ac_status" >&5
25895   (exit "$ac_status"); }; }; then
25896   ac_hi=$ac_mid; break
25897 else
25898   echo "$as_me: failed program was:" >&5
25899 cat "conftest.$ac_ext" >&5
25900 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
25901 fi
25902 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25903   done
25904 else
25905   echo "$as_me: failed program was:" >&5
25906 cat "conftest.$ac_ext" >&5
25907 ac_hi=-1 ac_mid=-1
25908   while :; do
25909     cat >"conftest.$ac_ext" <<_ACEOF
25910 #line 25910 "configure"
25911 #include "confdefs.h"
25912
25913 #include <stdlib.h>
25914 #include <stdio.h>
25915
25916 #if defined(__cplusplus)
25917
25918 #ifdef HAVE_GXX_BUILTIN_H
25919 #include <g++/builtin.h>
25920 #elif HAVE_GPP_BUILTIN_H
25921 #include <gpp/builtin.h>
25922 #elif HAVE_BUILTIN_H
25923 #include <builtin.h>
25924 #endif
25925
25926 #else
25927
25928 #if $cf_cv_header_stdbool_h
25929 #include <stdbool.h>
25930 #endif
25931
25932 #endif
25933
25934 int
25935 main (void)
25936 {
25937 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
25938   ;
25939   return 0;
25940 }
25941 _ACEOF
25942 rm -f "conftest.$ac_objext"
25943 if { (eval echo "$as_me:25943: \"$ac_compile\"") >&5
25944   (eval $ac_compile) 2>&5
25945   ac_status=$?
25946   echo "$as_me:25946: \$? = $ac_status" >&5
25947   (exit "$ac_status"); } &&
25948          { ac_try='test -s "conftest.$ac_objext"'
25949   { (eval echo "$as_me:25949: \"$ac_try\"") >&5
25950   (eval $ac_try) 2>&5
25951   ac_status=$?
25952   echo "$as_me:25952: \$? = $ac_status" >&5
25953   (exit "$ac_status"); }; }; then
25954   ac_lo=$ac_mid; break
25955 else
25956   echo "$as_me: failed program was:" >&5
25957 cat "conftest.$ac_ext" >&5
25958 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
25959 fi
25960 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25961   done
25962 fi
25963 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25964 # Binary search between lo and hi bounds.
25965 while test "x$ac_lo" != "x$ac_hi"; do
25966   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
25967   cat >"conftest.$ac_ext" <<_ACEOF
25968 #line 25968 "configure"
25969 #include "confdefs.h"
25970
25971 #include <stdlib.h>
25972 #include <stdio.h>
25973
25974 #if defined(__cplusplus)
25975
25976 #ifdef HAVE_GXX_BUILTIN_H
25977 #include <g++/builtin.h>
25978 #elif HAVE_GPP_BUILTIN_H
25979 #include <gpp/builtin.h>
25980 #elif HAVE_BUILTIN_H
25981 #include <builtin.h>
25982 #endif
25983
25984 #else
25985
25986 #if $cf_cv_header_stdbool_h
25987 #include <stdbool.h>
25988 #endif
25989
25990 #endif
25991
25992 int
25993 main (void)
25994 {
25995 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25996   ;
25997   return 0;
25998 }
25999 _ACEOF
26000 rm -f "conftest.$ac_objext"
26001 if { (eval echo "$as_me:26001: \"$ac_compile\"") >&5
26002   (eval $ac_compile) 2>&5
26003   ac_status=$?
26004   echo "$as_me:26004: \$? = $ac_status" >&5
26005   (exit "$ac_status"); } &&
26006          { ac_try='test -s "conftest.$ac_objext"'
26007   { (eval echo "$as_me:26007: \"$ac_try\"") >&5
26008   (eval $ac_try) 2>&5
26009   ac_status=$?
26010   echo "$as_me:26010: \$? = $ac_status" >&5
26011   (exit "$ac_status"); }; }; then
26012   ac_hi=$ac_mid
26013 else
26014   echo "$as_me: failed program was:" >&5
26015 cat "conftest.$ac_ext" >&5
26016 ac_lo=`expr "$ac_mid" + 1`
26017 fi
26018 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26019 done
26020 ac_cv_sizeof_bool=$ac_lo
26021 else
26022   if test "$cross_compiling" = yes; then
26023   { { echo "$as_me:26023: error: cannot run test program while cross compiling" >&5
26024 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26025    { (exit 1); exit 1; }; }
26026 else
26027   cat >"conftest.$ac_ext" <<_ACEOF
26028 #line 26028 "configure"
26029 #include "confdefs.h"
26030
26031 #include <stdlib.h>
26032 #include <stdio.h>
26033
26034 #if defined(__cplusplus)
26035
26036 #ifdef HAVE_GXX_BUILTIN_H
26037 #include <g++/builtin.h>
26038 #elif HAVE_GPP_BUILTIN_H
26039 #include <gpp/builtin.h>
26040 #elif HAVE_BUILTIN_H
26041 #include <builtin.h>
26042 #endif
26043
26044 #else
26045
26046 #if $cf_cv_header_stdbool_h
26047 #include <stdbool.h>
26048 #endif
26049
26050 #endif
26051
26052 int
26053 main (void)
26054 {
26055 FILE *f = fopen ("conftest.val", "w");
26056 if (!f)
26057   $ac_main_return (1);
26058 fprintf (f, "%d", (sizeof (bool)));
26059 fclose (f);
26060   ;
26061   return 0;
26062 }
26063 _ACEOF
26064 rm -f "conftest$ac_exeext"
26065 if { (eval echo "$as_me:26065: \"$ac_link\"") >&5
26066   (eval $ac_link) 2>&5
26067   ac_status=$?
26068   echo "$as_me:26068: \$? = $ac_status" >&5
26069   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26070   { (eval echo "$as_me:26070: \"$ac_try\"") >&5
26071   (eval $ac_try) 2>&5
26072   ac_status=$?
26073   echo "$as_me:26073: \$? = $ac_status" >&5
26074   (exit "$ac_status"); }; }; then
26075   ac_cv_sizeof_bool=`cat conftest.val`
26076 else
26077   echo "$as_me: program exited with status $ac_status" >&5
26078 echo "$as_me: failed program was:" >&5
26079 cat "conftest.$ac_ext" >&5
26080 fi
26081 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26082 fi
26083 fi
26084 rm -f conftest.val
26085 else
26086   ac_cv_sizeof_bool=0
26087 fi
26088 fi
26089 echo "$as_me:26089: result: $ac_cv_sizeof_bool" >&5
26090 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26091 cat >>confdefs.h <<EOF
26092 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26093 EOF
26094
26095 echo "$as_me:26095: checking for type of bool" >&5
26096 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26097 if test "${cf_cv_type_of_bool+set}" = set; then
26098   echo $ECHO_N "(cached) $ECHO_C" >&6
26099 else
26100
26101         rm -f cf_test.out
26102         if test "$cross_compiling" = yes; then
26103
26104                 case x$ac_cv_sizeof_bool in
26105                 (x1) cf_cv_type_of_bool="unsigned char";;
26106                 (x2) cf_cv_type_of_bool="unsigned short";;
26107                 (x4) cf_cv_type_of_bool="unsigned int";;
26108                 (x8) cf_cv_type_of_bool="unsigned long";;
26109                 (*)  cf_cv_type_of_bool=unknown;;
26110                 esac
26111
26112 else
26113   cat >"conftest.$ac_ext" <<_ACEOF
26114 #line 26114 "configure"
26115 #include "confdefs.h"
26116
26117 #include <stdlib.h>
26118 #include <stdio.h>
26119
26120 #if defined(__cplusplus)
26121
26122 #ifdef HAVE_GXX_BUILTIN_H
26123 #include <g++/builtin.h>
26124 #elif HAVE_GPP_BUILTIN_H
26125 #include <gpp/builtin.h>
26126 #elif HAVE_BUILTIN_H
26127 #include <builtin.h>
26128 #endif
26129
26130 #else
26131
26132 #if $cf_cv_header_stdbool_h
26133 #include <stdbool.h>
26134 #endif
26135
26136 #endif
26137
26138 int main(void)
26139 {
26140         FILE *fp = fopen("cf_test.out", "w");
26141         if (fp != 0) {
26142                 bool x = true;
26143                 if ((bool)(-x) >= 0)
26144                         fputs("unsigned ", fp);
26145                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26146                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26147                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26148                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26149                 fclose(fp);
26150         }
26151         ${cf_cv_main_return:-return}(0);
26152 }
26153
26154 _ACEOF
26155 rm -f "conftest$ac_exeext"
26156 if { (eval echo "$as_me:26156: \"$ac_link\"") >&5
26157   (eval $ac_link) 2>&5
26158   ac_status=$?
26159   echo "$as_me:26159: \$? = $ac_status" >&5
26160   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26161   { (eval echo "$as_me:26161: \"$ac_try\"") >&5
26162   (eval $ac_try) 2>&5
26163   ac_status=$?
26164   echo "$as_me:26164: \$? = $ac_status" >&5
26165   (exit "$ac_status"); }; }; then
26166   cf_cv_type_of_bool=`cat cf_test.out`
26167                  if test -z "$cf_cv_type_of_bool"; then
26168                    cf_cv_type_of_bool=unknown
26169                  fi
26170 else
26171   echo "$as_me: program exited with status $ac_status" >&5
26172 echo "$as_me: failed program was:" >&5
26173 cat "conftest.$ac_ext" >&5
26174 cf_cv_type_of_bool=unknown
26175 fi
26176 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26177 fi
26178         rm -f cf_test.out
26179
26180 fi
26181 echo "$as_me:26181: result: $cf_cv_type_of_bool" >&5
26182 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26183
26184 if test "$cf_cv_type_of_bool" = unknown ; then
26185         case .$NCURSES_BOOL in
26186         (.auto|.) NCURSES_BOOL=unsigned;;
26187         esac
26188         { echo "$as_me:26188: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26189 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26190         cf_cv_type_of_bool=$NCURSES_BOOL
26191 fi
26192
26193                 else
26194                         echo "$as_me:26194: checking for fallback type of bool" >&5
26195 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
26196                         case "$host_cpu" in
26197                         (i?86)  cf_cv_type_of_bool=char ;;
26198                         (*)     cf_cv_type_of_bool=int  ;;
26199                         esac
26200                         echo "$as_me:26200: result: $cf_cv_type_of_bool" >&5
26201 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26202                 fi
26203         fi
26204 fi
26205
26206 # If the C compiler did not declare bool, and we did not determine that the C++
26207 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
26208 # ncurses library use the same type as C++ bool.  Note that this allows one to
26209 # specify the type of bool in a configure-script option and postpone
26210 # integration with the C++ compiler provided that the types are compatible.
26211 USE_CXX_BOOL=1
26212 if test "$cf_cv_cc_bool_type" = 1
26213 then
26214         # oops: C has a bool.  Unlikely, but C++ could differ.
26215         USE_CXX_BOOL=0
26216 elif test "$cf_cv_builtin_bool" = 0
26217 then
26218         # C++ has no bool
26219         USE_CXX_BOOL=0
26220 else
26221         # this is the normal case
26222         USE_CXX_BOOL='defined(__cplusplus)'
26223 fi
26224
26225 if test -f "${srcdir}/Ada95/Makefile.in" ; then
26226
26227         if test "$cf_with_ada" != "no" ; then
26228                 if test "$with_libtool" != "no"; then
26229                         { echo "$as_me:26229: WARNING: libtool does not support Ada - disabling feature" >&5
26230 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
26231                         cf_with_ada=no
26232                 fi
26233         fi
26234
26235         if test "$cf_with_ada" != "no" ; then
26236
26237 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
26238 do
26239
26240 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26241
26242         unset ac_cv_path_cf_TEMP_gnat
26243         unset cf_TEMP_gnat
26244         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
26245 set dummy $cf_prog_gnat; ac_word=$2
26246 echo "$as_me:26246: checking for $ac_word" >&5
26247 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26248 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
26249   echo $ECHO_N "(cached) $ECHO_C" >&6
26250 else
26251   case $cf_TEMP_gnat in
26252   [\\/]* | ?:[\\/]*)
26253   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
26254   ;;
26255   *)
26256   ac_save_IFS=$IFS; IFS=$ac_path_separator
26257 ac_dummy="$PATH"
26258 for ac_dir in $ac_dummy; do
26259   IFS=$ac_save_IFS
26260   test -z "$ac_dir" && ac_dir=.
26261   if $as_executable_p "$ac_dir/$ac_word"; then
26262    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
26263    echo "$as_me:26263: found $ac_dir/$ac_word" >&5
26264    break
26265 fi
26266 done
26267
26268   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
26269   ;;
26270 esac
26271 fi
26272 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
26273
26274 if test -n "$cf_TEMP_gnat"; then
26275   echo "$as_me:26275: result: $cf_TEMP_gnat" >&5
26276 echo "${ECHO_T}$cf_TEMP_gnat" >&6
26277 else
26278   echo "$as_me:26278: result: no" >&5
26279 echo "${ECHO_T}no" >&6
26280 fi
26281
26282         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
26283
26284         if test "x$cf_TEMP_gnat" != xno; then
26285                 unset cf_cv_gnat_version
26286                 unset cf_TEMP_gnat
26287
26288 echo "$as_me:26288: checking for $cf_prog_gnat version" >&5
26289 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
26290 if test "${cf_cv_gnat_version+set}" = set; then
26291   echo $ECHO_N "(cached) $ECHO_C" >&6
26292 else
26293
26294 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
26295         grep '[0-9].[0-9][0-9]*' |\
26296         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26297
26298 fi
26299 echo "$as_me:26299: result: $cf_cv_gnat_version" >&5
26300 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26301 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26302 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
26303
26304         fi
26305         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
26306
26307         unset cf_TEMP_gnat
26308         unset cf_cv_gnat_version
26309         unset ac_cv_path_cf_TEMP_gnat
26310 done
26311
26312 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
26313         cf_ada_make=
26314         cf_cv_prog_gnat_correct=no
26315 else
26316         cf_ada_make=gnatmake
26317         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
26318                 # gprconfig is newer than gnatmake; we can continue...
26319                 cf_ada_config="##"
26320         else
26321                 rm -rf ./conftest* ./*~conftest*
26322                 if mkdir conftest.src
26323                 then
26324                         cf_ada_config=""
26325                         cd conftest.src
26326                         for cf_gprconfig in Ada C
26327                         do
26328                                 echo "$as_me:26328: checking for gprconfig name for $cf_gprconfig" >&5
26329 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
26330                                 if test "$cf_gprconfig" = C
26331                                 then
26332                                         for cf_gprconfig_param in \
26333                                                 "$cf_gprconfig,,,,GNATGCC" \
26334                                                 "$cf_gprconfig,,,,GCC" \
26335                                                 "$cf_gprconfig"
26336                                         do
26337                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26338                                                 test -n "$cf_gprconfig_value" && break
26339                                         done
26340                                 else
26341                                         cf_gprconfig_param=$cf_gprconfig
26342                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26343                                 fi
26344                                 if test -n "$cf_gprconfig_value"
26345                                 then
26346                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
26347                                         echo "$as_me:26347: result: $cf_gprconfig_value" >&5
26348 echo "${ECHO_T}$cf_gprconfig_value" >&6
26349                                 else
26350                                         echo "$as_me:26350: result: missing" >&5
26351 echo "${ECHO_T}missing" >&6
26352                                         cf_ada_config="#"
26353                                         break
26354                                 fi
26355                         done
26356                         cd ..
26357                         rm -rf ./conftest* ./*~conftest*
26358                 fi
26359         fi
26360         if test "x$cf_ada_config" != "x#"
26361         then
26362
26363 echo "$as_me:26363: checking for gnat version" >&5
26364 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
26365 if test "${cf_cv_gnat_version+set}" = set; then
26366   echo $ECHO_N "(cached) $ECHO_C" >&6
26367 else
26368
26369 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
26370         grep '[0-9].[0-9][0-9]*' |\
26371         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26372
26373 fi
26374 echo "$as_me:26374: result: $cf_cv_gnat_version" >&5
26375 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26376 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26377
26378 case "$cf_cv_gnat_version" in
26379 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26380         cf_cv_prog_gnat_correct=yes
26381         ;;
26382 (*)
26383         { echo "$as_me:26383: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
26384 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
26385         cf_cv_prog_gnat_correct=no
26386         ;;
26387 esac
26388
26389                 # Extract the first word of "m4", so it can be a program name with args.
26390 set dummy m4; ac_word=$2
26391 echo "$as_me:26391: checking for $ac_word" >&5
26392 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26393 if test "${ac_cv_prog_M4_exists+set}" = set; then
26394   echo $ECHO_N "(cached) $ECHO_C" >&6
26395 else
26396   if test -n "$M4_exists"; then
26397   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
26398 else
26399   ac_save_IFS=$IFS; IFS=$ac_path_separator
26400 ac_dummy="$PATH"
26401 for ac_dir in $ac_dummy; do
26402   IFS=$ac_save_IFS
26403   test -z "$ac_dir" && ac_dir=.
26404   $as_executable_p "$ac_dir/$ac_word" || continue
26405 ac_cv_prog_M4_exists="yes"
26406 echo "$as_me:26406: found $ac_dir/$ac_word" >&5
26407 break
26408 done
26409
26410   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
26411 fi
26412 fi
26413 M4_exists=$ac_cv_prog_M4_exists
26414 if test -n "$M4_exists"; then
26415   echo "$as_me:26415: result: $M4_exists" >&5
26416 echo "${ECHO_T}$M4_exists" >&6
26417 else
26418   echo "$as_me:26418: result: no" >&5
26419 echo "${ECHO_T}no" >&6
26420 fi
26421
26422                 if test "$ac_cv_prog_M4_exists" = no; then
26423                         cf_cv_prog_gnat_correct=no
26424                         { echo "$as_me:26424: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
26425 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
26426                 fi
26427                 if test "$cf_cv_prog_gnat_correct" = yes; then
26428                         echo "$as_me:26428: checking if GNAT works" >&5
26429 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
26430
26431 rm -rf ./conftest* ./*~conftest*
26432 cat >>conftest.ads <<CF_EOF
26433 procedure conftest;
26434 CF_EOF
26435 cat >>conftest.adb <<CF_EOF
26436 with Text_IO;
26437 with GNAT.OS_Lib;
26438 procedure conftest is
26439 begin
26440    Text_IO.Put ("Hello World");
26441    Text_IO.New_Line;
26442    GNAT.OS_Lib.OS_Exit (0);
26443 end conftest;
26444 CF_EOF
26445 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26446    if ( ./conftest 1>&5 2>&1 ) ; then
26447       cf_cv_prog_gnat_correct=yes
26448    else
26449       cf_cv_prog_gnat_correct=no
26450    fi
26451 else
26452    cf_cv_prog_gnat_correct=no
26453 fi
26454 rm -rf ./conftest* ./*~conftest*
26455
26456                         echo "$as_me:26456: result: $cf_cv_prog_gnat_correct" >&5
26457 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
26458                 fi
26459         else
26460                 cf_cv_prog_gnat_correct=no
26461         fi
26462 fi
26463
26464                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
26465
26466         ADAFLAGS="$ADAFLAGS -gnatpn"
26467
26468         echo "$as_me:26468: checking optimization options for ADAFLAGS" >&5
26469 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
26470         case "$CFLAGS" in
26471         (*-g*)
26472
26473         ADAFLAGS="$ADAFLAGS -g"
26474
26475                 ;;
26476         esac
26477         case "$CFLAGS" in
26478         (*-O*)
26479                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
26480
26481         ADAFLAGS="$ADAFLAGS $cf_O_flag"
26482
26483                 ;;
26484         esac
26485         echo "$as_me:26485: result: $ADAFLAGS" >&5
26486 echo "${ECHO_T}$ADAFLAGS" >&6
26487
26488 echo "$as_me:26488: checking if GNATPREP supports -T option" >&5
26489 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
26490 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
26491   echo $ECHO_N "(cached) $ECHO_C" >&6
26492 else
26493
26494 cf_cv_gnatprep_opt_t=no
26495 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
26496
26497 fi
26498 echo "$as_me:26498: result: $cf_cv_gnatprep_opt_t" >&5
26499 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
26500 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
26501
26502 echo "$as_me:26502: checking if GNAT supports generics" >&5
26503 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
26504 case "$cf_cv_gnat_version" in
26505 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26506         cf_gnat_generics=yes
26507         ;;
26508 (*)
26509         cf_gnat_generics=no
26510         ;;
26511 esac
26512 echo "$as_me:26512: result: $cf_gnat_generics" >&5
26513 echo "${ECHO_T}$cf_gnat_generics" >&6
26514
26515 if test "$cf_gnat_generics" = yes
26516 then
26517         cf_compile_generics=generics
26518         cf_generic_objects="\${GENOBJS}"
26519 else
26520         cf_compile_generics=
26521         cf_generic_objects=
26522 fi
26523
26524 echo "$as_me:26524: checking if GNAT supports SIGINT" >&5
26525 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
26526 if test "${cf_cv_gnat_sigint+set}" = set; then
26527   echo $ECHO_N "(cached) $ECHO_C" >&6
26528 else
26529
26530 rm -rf ./conftest* ./*~conftest*
26531 cat >>conftest.ads <<CF_EOF
26532 with Ada.Interrupts.Names;
26533
26534 package ConfTest is
26535
26536    pragma Warnings (Off);  --  the next pragma exists since 3.11p
26537    pragma Unreserve_All_Interrupts;
26538    pragma Warnings (On);
26539
26540    protected Process is
26541       procedure Stop;
26542       function Continue return Boolean;
26543       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
26544    private
26545       Done : Boolean := False;
26546    end Process;
26547
26548 end ConfTest;
26549 CF_EOF
26550 cat >>conftest.adb <<CF_EOF
26551 package body ConfTest is
26552    protected body Process is
26553       procedure Stop is
26554       begin
26555          Done := True;
26556       end Stop;
26557       function Continue return Boolean is
26558       begin
26559          return not Done;
26560       end Continue;
26561    end Process;
26562 end ConfTest;
26563 CF_EOF
26564 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26565       cf_cv_gnat_sigint=yes
26566 else
26567    cf_cv_gnat_sigint=no
26568 fi
26569 rm -rf ./conftest* ./*~conftest*
26570
26571 fi
26572 echo "$as_me:26572: result: $cf_cv_gnat_sigint" >&5
26573 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
26574
26575 if test "$cf_cv_gnat_sigint" = yes ; then
26576         USE_GNAT_SIGINT=""
26577 else
26578         USE_GNAT_SIGINT="#"
26579 fi
26580
26581 cf_gnat_libraries=no
26582 cf_gnat_projects=no
26583
26584 if test "$enable_gnat_projects" != no ; then
26585 echo "$as_me:26585: checking if GNAT supports project files" >&5
26586 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
26587 case "$cf_cv_gnat_version" in
26588 (3.[0-9]*)
26589         ;;
26590 (*)
26591         case "$cf_cv_system_name" in
26592         (cygwin*|msys*)
26593                 ;;
26594         (*)
26595                 rm -rf ./conftest* ./*~conftest*
26596                 if mkdir conftest.src conftest.bin conftest.lib
26597                 then
26598                         cd conftest.src
26599                         rm -rf ./conftest* ./*~conftest*
26600                         cat >>library.gpr <<CF_EOF
26601 project Library is
26602   Kind := External ("LIB_KIND");
26603   for Library_Name use "ConfTest";
26604   for Object_Dir use ".";
26605   for Library_ALI_Dir use External("LIBRARY_DIR");
26606   for Library_Version use External ("SONAME");
26607   for Library_Kind use Kind;
26608   for Library_Dir use External("BUILD_DIR");
26609   Source_Dir := External ("SOURCE_DIR");
26610   for Source_Dirs use (Source_Dir);
26611 end Library;
26612 CF_EOF
26613                         cat >>confpackage.ads <<CF_EOF
26614 package ConfPackage is
26615    procedure conftest;
26616 end ConfPackage;
26617 CF_EOF
26618                         cat >>confpackage.adb <<CF_EOF
26619 with Text_IO;
26620 package body ConfPackage is
26621    procedure conftest is
26622    begin
26623       Text_IO.Put ("Hello World");
26624       Text_IO.New_Line;
26625    end conftest;
26626 end ConfPackage;
26627 CF_EOF
26628                         if ( "$cf_ada_make" $ADAFLAGS \
26629                                         -Plibrary.gpr \
26630                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
26631                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
26632                                         -XSOURCE_DIR="`pwd`" \
26633                                         -XSONAME=libConfTest.so.1 \
26634                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
26635                                 cf_gnat_projects=yes
26636                         fi
26637                         cd ..
26638                 fi
26639                 if test -f conftest.lib/confpackage.ali
26640                 then
26641                         cf_gnat_libraries=yes
26642                 fi
26643                 rm -rf ./conftest* ./*~conftest*
26644                 ;;
26645         esac
26646         ;;
26647 esac
26648 echo "$as_me:26648: result: $cf_gnat_projects" >&5
26649 echo "${ECHO_T}$cf_gnat_projects" >&6
26650 fi # enable_gnat_projects
26651
26652 if test "$cf_gnat_projects" = yes
26653 then
26654         echo "$as_me:26654: checking if GNAT supports libraries" >&5
26655 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
26656         echo "$as_me:26656: result: $cf_gnat_libraries" >&5
26657 echo "${ECHO_T}$cf_gnat_libraries" >&6
26658 fi
26659
26660 USE_OLD_MAKERULES=""
26661 USE_GNAT_PROJECTS="#"
26662 USE_GNAT_MAKE_GPR="#"
26663 USE_GNAT_GPRBUILD="#"
26664
26665 if test "$cf_gnat_projects" = yes
26666 then
26667         USE_OLD_MAKERULES="#"
26668         USE_GNAT_PROJECTS=""
26669         if test "$cf_cv_VERSION_GPRBUILD" != no
26670         then
26671                 USE_GNAT_GPRBUILD=""
26672         elif test "$cf_cv_VERSION_GNATMAKE" != no
26673         then
26674                 USE_GNAT_MAKE_GPR=""
26675         else
26676                 { echo "$as_me:26676: WARNING: use old makefile rules since tools are missing" >&5
26677 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
26678         fi
26679 fi
26680
26681 if test "$cf_gnat_libraries" = yes
26682 then
26683         USE_GNAT_LIBRARIES=""
26684 else
26685         USE_GNAT_LIBRARIES="#"
26686 fi
26687
26688 echo "$as_me:26688: checking for ada-compiler" >&5
26689 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
26690
26691 # Check whether --with-ada-compiler or --without-ada-compiler was given.
26692 if test "${with_ada_compiler+set}" = set; then
26693   withval="$with_ada_compiler"
26694   cf_ada_compiler=$withval
26695 else
26696   cf_ada_compiler=gnatmake
26697 fi;
26698
26699 echo "$as_me:26699: result: $cf_ada_compiler" >&5
26700 echo "${ECHO_T}$cf_ada_compiler" >&6
26701
26702                         cf_ada_package=terminal_interface
26703
26704 echo "$as_me:26704: checking for ada-include" >&5
26705 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
26706
26707 # Check whether --with-ada-include or --without-ada-include was given.
26708 if test "${with_ada_include+set}" = set; then
26709   withval="$with_ada_include"
26710
26711 else
26712   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
26713 fi; if test -n "$prefix/share/ada/adainclude" ; then
26714
26715 if test "x$prefix" != xNONE; then
26716         cf_path_syntax="$prefix"
26717 else
26718         cf_path_syntax="$ac_default_prefix"
26719 fi
26720
26721 case ".$withval" in
26722 (.\$\(*\)*|.\'*\'*)
26723         ;;
26724 (..|./*|.\\*)
26725         ;;
26726 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
26727         ;;
26728 (.\$\{*prefix\}*|.\$\{*dir\}*)
26729         eval withval="$withval"
26730         case ".$withval" in
26731         (.NONE/*)
26732                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26733                 ;;
26734         esac
26735         ;;
26736 (.no|.NONE/*)
26737         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26738         ;;
26739 (*)
26740         { { echo "$as_me:26740: error: expected a pathname, not \"$withval\"" >&5
26741 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
26742    { (exit 1); exit 1; }; }
26743         ;;
26744 esac
26745
26746 fi
26747 eval ADA_INCLUDE="$withval"
26748
26749 echo "$as_me:26749: result: $ADA_INCLUDE" >&5
26750 echo "${ECHO_T}$ADA_INCLUDE" >&6
26751
26752 echo "$as_me:26752: checking for ada-objects" >&5
26753 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
26754
26755 # Check whether --with-ada-objects or --without-ada-objects was given.
26756 if test "${with_ada_objects+set}" = set; then
26757   withval="$with_ada_objects"
26758
26759 else
26760   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
26761 fi; if test -n "$prefix/lib/ada/adalib" ; then
26762
26763 if test "x$prefix" != xNONE; then
26764         cf_path_syntax="$prefix"
26765 else
26766         cf_path_syntax="$ac_default_prefix"
26767 fi
26768
26769 case ".$withval" in
26770 (.\$\(*\)*|.\'*\'*)
26771         ;;
26772 (..|./*|.\\*)
26773         ;;
26774 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
26775         ;;
26776 (.\$\{*prefix\}*|.\$\{*dir\}*)
26777         eval withval="$withval"
26778         case ".$withval" in
26779         (.NONE/*)
26780                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26781                 ;;
26782         esac
26783         ;;
26784 (.no|.NONE/*)
26785         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26786         ;;
26787 (*)
26788         { { echo "$as_me:26788: error: expected a pathname, not \"$withval\"" >&5
26789 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
26790    { (exit 1); exit 1; }; }
26791         ;;
26792 esac
26793
26794 fi
26795 eval ADA_OBJECTS="$withval"
26796
26797 echo "$as_me:26797: result: $ADA_OBJECTS" >&5
26798 echo "${ECHO_T}$ADA_OBJECTS" >&6
26799
26800 echo "$as_me:26800: checking if an Ada95 shared-library should be built" >&5
26801 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
26802
26803 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
26804 if test "${with_ada_sharedlib+set}" = set; then
26805   withval="$with_ada_sharedlib"
26806   with_ada_sharedlib=$withval
26807 else
26808   with_ada_sharedlib=no
26809 fi;
26810 echo "$as_me:26810: result: $with_ada_sharedlib" >&5
26811 echo "${ECHO_T}$with_ada_sharedlib" >&6
26812
26813 if test "x$with_ada_sharedlib" != xno
26814 then
26815         if test "x$cf_gnat_projects" != xyes
26816         then
26817                 { echo "$as_me:26817: WARNING: disabling shared-library since GNAT projects are not supported" >&5
26818 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
26819                 with_ada_sharedlib=no
26820         fi
26821 fi
26822
26823 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
26824 MAKE_ADA_SHAREDLIB="#"
26825
26826 if test "x$with_ada_sharedlib" != xno
26827 then
26828         MAKE_ADA_SHAREDLIB=
26829         if test "x$with_ada_sharedlib" != xyes
26830         then
26831                 ADA_SHAREDLIB="$with_ada_sharedlib"
26832         fi
26833 fi
26834
26835                         # allow the Ada binding to be renamed
26836
26837 echo "$as_me:26837: checking for ada-libname" >&5
26838 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
26839
26840 # Check whether --with-ada-libname or --without-ada-libname was given.
26841 if test "${with_ada_libname+set}" = set; then
26842   withval="$with_ada_libname"
26843   ADA_LIBNAME=$withval
26844 else
26845   ADA_LIBNAME=AdaCurses
26846 fi;
26847 case "x$ADA_LIBNAME" in
26848 (x|xyes|xno)
26849         ADA_LIBNAME=AdaCurses
26850         ;;
26851 esac
26852
26853 echo "$as_me:26853: result: $ADA_LIBNAME" >&5
26854 echo "${ECHO_T}$ADA_LIBNAME" >&6
26855
26856                 fi
26857         fi
26858 else
26859         cf_with_ada=no
26860 fi
26861
26862 # do this "late" to avoid conflict with header-checks
26863 if test "x$with_widec" = xyes ; then
26864         echo "$as_me:26864: checking for wchar_t" >&5
26865 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
26866 if test "${ac_cv_type_wchar_t+set}" = set; then
26867   echo $ECHO_N "(cached) $ECHO_C" >&6
26868 else
26869   cat >"conftest.$ac_ext" <<_ACEOF
26870 #line 26870 "configure"
26871 #include "confdefs.h"
26872 $ac_includes_default
26873 int
26874 main (void)
26875 {
26876 if ((wchar_t *) 0)
26877   return 0;
26878 if (sizeof (wchar_t))
26879   return 0;
26880   ;
26881   return 0;
26882 }
26883 _ACEOF
26884 rm -f "conftest.$ac_objext"
26885 if { (eval echo "$as_me:26885: \"$ac_compile\"") >&5
26886   (eval $ac_compile) 2>&5
26887   ac_status=$?
26888   echo "$as_me:26888: \$? = $ac_status" >&5
26889   (exit "$ac_status"); } &&
26890          { ac_try='test -s "conftest.$ac_objext"'
26891   { (eval echo "$as_me:26891: \"$ac_try\"") >&5
26892   (eval $ac_try) 2>&5
26893   ac_status=$?
26894   echo "$as_me:26894: \$? = $ac_status" >&5
26895   (exit "$ac_status"); }; }; then
26896   ac_cv_type_wchar_t=yes
26897 else
26898   echo "$as_me: failed program was:" >&5
26899 cat "conftest.$ac_ext" >&5
26900 ac_cv_type_wchar_t=no
26901 fi
26902 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26903 fi
26904 echo "$as_me:26904: result: $ac_cv_type_wchar_t" >&5
26905 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
26906
26907 echo "$as_me:26907: checking size of wchar_t" >&5
26908 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
26909 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
26910   echo $ECHO_N "(cached) $ECHO_C" >&6
26911 else
26912   if test "$ac_cv_type_wchar_t" = yes; then
26913   if test "$cross_compiling" = yes; then
26914   # Depending upon the size, compute the lo and hi bounds.
26915 cat >"conftest.$ac_ext" <<_ACEOF
26916 #line 26916 "configure"
26917 #include "confdefs.h"
26918 $ac_includes_default
26919 int
26920 main (void)
26921 {
26922 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
26923   ;
26924   return 0;
26925 }
26926 _ACEOF
26927 rm -f "conftest.$ac_objext"
26928 if { (eval echo "$as_me:26928: \"$ac_compile\"") >&5
26929   (eval $ac_compile) 2>&5
26930   ac_status=$?
26931   echo "$as_me:26931: \$? = $ac_status" >&5
26932   (exit "$ac_status"); } &&
26933          { ac_try='test -s "conftest.$ac_objext"'
26934   { (eval echo "$as_me:26934: \"$ac_try\"") >&5
26935   (eval $ac_try) 2>&5
26936   ac_status=$?
26937   echo "$as_me:26937: \$? = $ac_status" >&5
26938   (exit "$ac_status"); }; }; then
26939   ac_lo=0 ac_mid=0
26940   while :; do
26941     cat >"conftest.$ac_ext" <<_ACEOF
26942 #line 26942 "configure"
26943 #include "confdefs.h"
26944 $ac_includes_default
26945 int
26946 main (void)
26947 {
26948 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
26949   ;
26950   return 0;
26951 }
26952 _ACEOF
26953 rm -f "conftest.$ac_objext"
26954 if { (eval echo "$as_me:26954: \"$ac_compile\"") >&5
26955   (eval $ac_compile) 2>&5
26956   ac_status=$?
26957   echo "$as_me:26957: \$? = $ac_status" >&5
26958   (exit "$ac_status"); } &&
26959          { ac_try='test -s "conftest.$ac_objext"'
26960   { (eval echo "$as_me:26960: \"$ac_try\"") >&5
26961   (eval $ac_try) 2>&5
26962   ac_status=$?
26963   echo "$as_me:26963: \$? = $ac_status" >&5
26964   (exit "$ac_status"); }; }; then
26965   ac_hi=$ac_mid; break
26966 else
26967   echo "$as_me: failed program was:" >&5
26968 cat "conftest.$ac_ext" >&5
26969 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26970 fi
26971 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26972   done
26973 else
26974   echo "$as_me: failed program was:" >&5
26975 cat "conftest.$ac_ext" >&5
26976 ac_hi=-1 ac_mid=-1
26977   while :; do
26978     cat >"conftest.$ac_ext" <<_ACEOF
26979 #line 26979 "configure"
26980 #include "confdefs.h"
26981 $ac_includes_default
26982 int
26983 main (void)
26984 {
26985 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
26986   ;
26987   return 0;
26988 }
26989 _ACEOF
26990 rm -f "conftest.$ac_objext"
26991 if { (eval echo "$as_me:26991: \"$ac_compile\"") >&5
26992   (eval $ac_compile) 2>&5
26993   ac_status=$?
26994   echo "$as_me:26994: \$? = $ac_status" >&5
26995   (exit "$ac_status"); } &&
26996          { ac_try='test -s "conftest.$ac_objext"'
26997   { (eval echo "$as_me:26997: \"$ac_try\"") >&5
26998   (eval $ac_try) 2>&5
26999   ac_status=$?
27000   echo "$as_me:27000: \$? = $ac_status" >&5
27001   (exit "$ac_status"); }; }; then
27002   ac_lo=$ac_mid; break
27003 else
27004   echo "$as_me: failed program was:" >&5
27005 cat "conftest.$ac_ext" >&5
27006 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27007 fi
27008 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27009   done
27010 fi
27011 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27012 # Binary search between lo and hi bounds.
27013 while test "x$ac_lo" != "x$ac_hi"; do
27014   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27015   cat >"conftest.$ac_ext" <<_ACEOF
27016 #line 27016 "configure"
27017 #include "confdefs.h"
27018 $ac_includes_default
27019 int
27020 main (void)
27021 {
27022 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27023   ;
27024   return 0;
27025 }
27026 _ACEOF
27027 rm -f "conftest.$ac_objext"
27028 if { (eval echo "$as_me:27028: \"$ac_compile\"") >&5
27029   (eval $ac_compile) 2>&5
27030   ac_status=$?
27031   echo "$as_me:27031: \$? = $ac_status" >&5
27032   (exit "$ac_status"); } &&
27033          { ac_try='test -s "conftest.$ac_objext"'
27034   { (eval echo "$as_me:27034: \"$ac_try\"") >&5
27035   (eval $ac_try) 2>&5
27036   ac_status=$?
27037   echo "$as_me:27037: \$? = $ac_status" >&5
27038   (exit "$ac_status"); }; }; then
27039   ac_hi=$ac_mid
27040 else
27041   echo "$as_me: failed program was:" >&5
27042 cat "conftest.$ac_ext" >&5
27043 ac_lo=`expr "$ac_mid" + 1`
27044 fi
27045 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27046 done
27047 ac_cv_sizeof_wchar_t=$ac_lo
27048 else
27049   if test "$cross_compiling" = yes; then
27050   { { echo "$as_me:27050: error: cannot run test program while cross compiling" >&5
27051 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27052    { (exit 1); exit 1; }; }
27053 else
27054   cat >"conftest.$ac_ext" <<_ACEOF
27055 #line 27055 "configure"
27056 #include "confdefs.h"
27057 $ac_includes_default
27058 int
27059 main (void)
27060 {
27061 FILE *f = fopen ("conftest.val", "w");
27062 if (!f)
27063   $ac_main_return (1);
27064 fprintf (f, "%d", (sizeof (wchar_t)));
27065 fclose (f);
27066   ;
27067   return 0;
27068 }
27069 _ACEOF
27070 rm -f "conftest$ac_exeext"
27071 if { (eval echo "$as_me:27071: \"$ac_link\"") >&5
27072   (eval $ac_link) 2>&5
27073   ac_status=$?
27074   echo "$as_me:27074: \$? = $ac_status" >&5
27075   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27076   { (eval echo "$as_me:27076: \"$ac_try\"") >&5
27077   (eval $ac_try) 2>&5
27078   ac_status=$?
27079   echo "$as_me:27079: \$? = $ac_status" >&5
27080   (exit "$ac_status"); }; }; then
27081   ac_cv_sizeof_wchar_t=`cat conftest.val`
27082 else
27083   echo "$as_me: program exited with status $ac_status" >&5
27084 echo "$as_me: failed program was:" >&5
27085 cat "conftest.$ac_ext" >&5
27086 fi
27087 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27088 fi
27089 fi
27090 rm -f conftest.val
27091 else
27092   ac_cv_sizeof_wchar_t=0
27093 fi
27094 fi
27095 echo "$as_me:27095: result: $ac_cv_sizeof_wchar_t" >&5
27096 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
27097 cat >>confdefs.h <<EOF
27098 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
27099 EOF
27100
27101         # cross-compiling to mingw can run into the problem that attempting to
27102         # link with the regex library fails, causing the test to not set this to
27103         # a number.  "recent" autoconf does not address this problem either -TD
27104         if test -z "$ac_cv_sizeof_wchar_t"
27105         then
27106                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
27107
27108 echo "${as_me:-configure}:27108: testing test failed (assume 2) ..." 1>&5
27109
27110                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
27111                 mv confdefs.tmp confdefs.h
27112                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
27113         fi
27114 fi
27115
27116 ### Construct the ncurses library-subsets, if any, from this set of keywords:
27117 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
27118 ###
27119 ### ticlib modules may be a separate library, otherwise contained in termlib.
27120 ### termlib modules may be a separate library, otherwise contained in ncurses.
27121 ###
27122 ### The of "+" or " " between the tokens controls the way the script
27123 ### chooses to split module lists into libraries.
27124 ###
27125 ### (see CF_LIB_RULES).
27126 echo "$as_me:27126: checking for library subsets" >&5
27127 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
27128 LIB_SUBSETS=
27129
27130 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
27131         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
27132         if test "$with_ticlib" != no ; then
27133                 LIB_SUBSETS="${LIB_SUBSETS} "
27134         else
27135                 LIB_SUBSETS="${LIB_SUBSETS}+"
27136         fi
27137 fi
27138
27139 LIB_SUBSETS="${LIB_SUBSETS}termlib"
27140 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
27141
27142 if test "$with_termlib" != no ; then
27143         LIB_SUBSETS="${LIB_SUBSETS} "
27144 else
27145         LIB_SUBSETS="${LIB_SUBSETS}+"
27146 fi
27147
27148 LIB_SUBSETS="${LIB_SUBSETS}base"
27149
27150 # Most term-driver calls are to tinfo, but some like init_pair are to the
27151 # base library (so it resides in base).
27152 if test "$with_term_driver" != no ; then
27153         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
27154         case "$cf_cv_system_name" in
27155         (*mingw32*|*mingw64*)
27156                 if test "x$with_exp_win32" = xyes ; then
27157                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
27158                 else
27159                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
27160                 fi
27161                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
27162                 ;;
27163         (*)
27164                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
27165                 ;;
27166         esac
27167 elif test "x$with_exp_win32" = xyes ; then
27168         case "$cf_cv_system_name" in
27169         (*mingw32*|*mingw64*)
27170                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
27171                 ;;
27172         (*)
27173                 ;;
27174         esac
27175 fi
27176
27177 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
27178 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
27179
27180 echo "$as_me:27180: result: $LIB_SUBSETS" >&5
27181 echo "${ECHO_T}$LIB_SUBSETS" >&6
27182
27183 ### Construct the list of include-directories to be generated
27184
27185 if test "$srcdir" != "."; then
27186         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
27187 fi
27188 CPPFLAGS="-I../include $CPPFLAGS"
27189 if test "$srcdir" != "."; then
27190         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
27191 fi
27192 CPPFLAGS="-I. $CPPFLAGS"
27193
27194 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
27195 if test "$srcdir" != "."; then
27196         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
27197 fi
27198 if test "$GCC" != yes; then
27199         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27200 elif test "$includedir" != "/usr/include"; then
27201         if test "$includedir" = '${prefix}/include' ; then
27202                 if test x$prefix != x/usr ; then
27203                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27204                 fi
27205         else
27206                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27207         fi
27208 fi
27209
27210 ### Build up pieces for makefile rules
27211 echo "$as_me:27211: checking default library suffix" >&5
27212 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
27213
27214         case $DFT_LWR_MODEL in
27215         (libtool) DFT_ARG_SUFFIX=''   ;;
27216         (normal)  DFT_ARG_SUFFIX=''   ;;
27217         (debug)   DFT_ARG_SUFFIX='_g' ;;
27218         (profile) DFT_ARG_SUFFIX='_p' ;;
27219         (shared)  DFT_ARG_SUFFIX=''   ;;
27220         esac
27221         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
27222 echo "$as_me:27222: result: $DFT_ARG_SUFFIX" >&5
27223 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
27224
27225 echo "$as_me:27225: checking default library-dependency suffix" >&5
27226 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
27227
27228         case X$DFT_LWR_MODEL in
27229         (Xlibtool)
27230                 DFT_LIB_SUFFIX='.la'
27231                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27232                 ;;
27233         (Xdebug)
27234                 case "$cf_cv_system_name" in
27235                 (*-msvc*)
27236                         DFT_LIB_SUFFIX='_g.lib'
27237                         ;;
27238                 (*)
27239                         DFT_LIB_SUFFIX='_g.a'
27240                         ;;
27241                 esac
27242                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27243                 ;;
27244         (Xprofile)
27245                 case "$cf_cv_system_name" in
27246                 (*-msvc*)
27247                         DFT_LIB_SUFFIX='_p.lib'
27248                         ;;
27249                 (*)
27250                         DFT_LIB_SUFFIX='_p.a'
27251                         ;;
27252                 esac
27253                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27254                 ;;
27255         (Xshared)
27256                 case "$cf_cv_system_name" in
27257                 (aix[5-7]*)
27258                         DFT_LIB_SUFFIX='.so'
27259                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27260                         ;;
27261                 (*-msvc*)
27262                         DFT_LIB_SUFFIX='.dll'
27263                         DFT_DEP_SUFFIX='.dll.lib'
27264                         ;;
27265                 (cygwin*|msys*|mingw*)
27266                         DFT_LIB_SUFFIX='.dll'
27267                         DFT_DEP_SUFFIX='.dll.a'
27268                         ;;
27269                 (darwin*)
27270                         DFT_LIB_SUFFIX='.dylib'
27271                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27272                         ;;
27273                 (hpux*)
27274                         case "$target" in
27275                         (ia64*)
27276                                 DFT_LIB_SUFFIX='.so'
27277                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27278                                 ;;
27279                         (*)
27280                                 DFT_LIB_SUFFIX='.sl'
27281                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27282                                 ;;
27283                         esac
27284                         ;;
27285                 (*)
27286                         DFT_LIB_SUFFIX='.so'
27287                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27288                         ;;
27289                 esac
27290                 ;;
27291         (*)
27292                 case "$target" in
27293                 (*-msvc*)
27294                         DFT_LIB_SUFFIX='.lib'
27295                         ;;
27296                 (*)
27297                         DFT_LIB_SUFFIX='.a'
27298                         ;;
27299                 esac
27300                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27301                 ;;
27302         esac
27303         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27304         then
27305                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
27306                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
27307         fi
27308 echo "$as_me:27308: result: $DFT_DEP_SUFFIX" >&5
27309 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
27310
27311 echo "$as_me:27311: checking default object directory" >&5
27312 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
27313
27314         case $DFT_LWR_MODEL in
27315         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
27316         (normal)  DFT_OBJ_SUBDIR='objects' ;;
27317         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
27318         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
27319         (shared)
27320                 case "$cf_cv_system_name" in
27321                 (cygwin|msys)
27322                         DFT_OBJ_SUBDIR='objects' ;;
27323                 (*)
27324                         DFT_OBJ_SUBDIR='obj_s' ;;
27325                 esac
27326         esac
27327 echo "$as_me:27327: result: $DFT_OBJ_SUBDIR" >&5
27328 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
27329
27330 if test "x$cf_with_cxx" = xyes ; then
27331 echo "$as_me:27331: checking c++ library-dependency suffix" >&5
27332 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
27333 if test "$with_libtool" != "no"; then
27334         # libtool thinks it can make c++ shared libraries (perhaps only g++)
27335         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27336 elif test "$with_shared_cxx" != "no"; then
27337         # also for g++ users...
27338         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27339 else
27340         # we normally make a static library because C/C++ library rules differ
27341
27342         case Xnormal in
27343         (Xlibtool)
27344                 CXX_LIB_SUFFIX='.la'
27345                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27346                 ;;
27347         (Xdebug)
27348                 case "$cf_cv_system_name" in
27349                 (*-msvc*)
27350                         CXX_LIB_SUFFIX='_g.lib'
27351                         ;;
27352                 (*)
27353                         CXX_LIB_SUFFIX='_g.a'
27354                         ;;
27355                 esac
27356                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27357                 ;;
27358         (Xprofile)
27359                 case "$cf_cv_system_name" in
27360                 (*-msvc*)
27361                         CXX_LIB_SUFFIX='_p.lib'
27362                         ;;
27363                 (*)
27364                         CXX_LIB_SUFFIX='_p.a'
27365                         ;;
27366                 esac
27367                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27368                 ;;
27369         (Xshared)
27370                 case "$cf_cv_system_name" in
27371                 (aix[5-7]*)
27372                         CXX_LIB_SUFFIX='.so'
27373                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27374                         ;;
27375                 (*-msvc*)
27376                         CXX_LIB_SUFFIX='.dll'
27377                         CXX_DEP_SUFFIX='.dll.lib'
27378                         ;;
27379                 (cygwin*|msys*|mingw*)
27380                         CXX_LIB_SUFFIX='.dll'
27381                         CXX_DEP_SUFFIX='.dll.a'
27382                         ;;
27383                 (darwin*)
27384                         CXX_LIB_SUFFIX='.dylib'
27385                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27386                         ;;
27387                 (hpux*)
27388                         case "$target" in
27389                         (ia64*)
27390                                 CXX_LIB_SUFFIX='.so'
27391                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27392                                 ;;
27393                         (*)
27394                                 CXX_LIB_SUFFIX='.sl'
27395                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27396                                 ;;
27397                         esac
27398                         ;;
27399                 (*)
27400                         CXX_LIB_SUFFIX='.so'
27401                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27402                         ;;
27403                 esac
27404                 ;;
27405         (*)
27406                 case "$target" in
27407                 (*-msvc*)
27408                         CXX_LIB_SUFFIX='.lib'
27409                         ;;
27410                 (*)
27411                         CXX_LIB_SUFFIX='.a'
27412                         ;;
27413                 esac
27414                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27415                 ;;
27416         esac
27417         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27418         then
27419                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
27420                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
27421         fi
27422
27423 fi
27424 echo "$as_me:27424: result: $CXX_LIB_SUFFIX" >&5
27425 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
27426
27427 fi
27428
27429 # do not want -ldl in build except as needed for -lncurses dependency
27430 if test "x$with_dlsym" = xyes ; then
27431 if test "$DFT_LWR_MODEL" = shared || \
27432    test "$DFT_LWR_MODEL" = libtool ; then
27433
27434 # remove dl library from $LIBS
27435 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
27436
27437 fi
27438 fi
27439 ### Set up low-level terminfo dependencies for makefiles.
27440
27441 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
27442 # do not need libdl
27443 TICS_LIST=
27444 if test "x$with_dlsym" = xyes ; then
27445
27446 # remove dl library from $SHLIB_LIST
27447 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
27448
27449 fi
27450
27451 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
27452 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
27453 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
27454 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
27455 then
27456         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
27457 fi
27458
27459 if test "$with_ticlib" != no ; then
27460
27461         if test "x$with_ticlib" != xyes ; then
27462                 TICS_NAME=$with_ticlib
27463                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
27464                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27465                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27466                 TICS_LIB_SUFFIX="${with_ticlib}"
27467         else
27468                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
27469                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
27470                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
27471                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
27472         fi
27473         TICS_LDFLAGS="-L${LIB_DIR}"
27474         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
27475 else
27476         TICS_SUFFIX=${DFT_LIB_SUFFIX}
27477         TICS_LDFLAGS="-L${LIB_DIR}"
27478         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27479 fi
27480
27481 if test "$with_termlib" != no ; then
27482
27483         if test "x$with_termlib" != xyes ; then
27484                 TINFO_NAME=$with_termlib
27485                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
27486                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27487                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27488                 TINFO_LIB_SUFFIX="${with_termlib}"
27489         else
27490                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27491                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
27492                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
27493                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
27494         fi
27495
27496         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
27497         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
27498         if test "$DFT_LWR_MODEL" = "libtool"; then
27499                 TEST_ARGS="${TEST_DEPS}"
27500                 TEST_ARG2="${TEST_DEP2}"
27501                 TINFO_LDFLAGS="-L${LIB_DIR}"
27502                 TINFO_LIBS="$TEST_ARGS"
27503                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
27504                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
27505         else
27506                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
27507                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
27508                 if test "x$with_term_driver" != xno ; then
27509                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
27510                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
27511                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
27512                 else
27513                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
27514                         TINFO_LIBS="$TEST_ARGS"
27515                 fi
27516                 TINFO_LDFLAGS="-L${LIB_DIR}"
27517                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
27518         fi
27519 else
27520         # the next lines are needed for linking libtic over libncurses
27521         TINFO_NAME=${LIB_NAME}
27522         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27523         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
27524         if test "x$with_tic_depends" = xyes ; then
27525                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
27526         else
27527                 TICS_LIST="$SHLIB_LIST"
27528         fi
27529
27530         TINFO_LDFLAGS="-L${LIB_DIR}"
27531         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27532 fi
27533
27534 if test "$DFT_LWR_MODEL" = shared ; then
27535         case "$cf_cv_system_name" in
27536         (cygwin*|msys*)
27537                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
27538                 TINFO_SUFFIX=.dll
27539                 ;;
27540         esac
27541 fi
27542
27543 if test "x$with_dlsym" = xyes ; then
27544
27545 # remove dl library from $TICS_LIST
27546 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
27547
27548 fi
27549
27550 if test "$DFT_LWR_MODEL" = "libtool"; then
27551         OBJEXT=lo
27552 fi
27553
27554 # needed for Ada95
27555 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
27556
27557 case "$DFT_LWR_MODEL" in
27558 (normal|debug|profile)
27559
27560 if test "$GCC" = yes ; then
27561         case "$cf_cv_system_name" in
27562         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
27563                 LDFLAGS_STATIC=
27564                 LDFLAGS_SHARED=
27565                 ;;
27566         (*)     # normally, except when broken
27567                 LDFLAGS_STATIC=-static
27568                 LDFLAGS_SHARED=-dynamic
27569                 ;;
27570         esac
27571 else
27572         case "$cf_cv_system_name" in
27573         (aix[4-7]*)     # from ld manpage
27574                 LDFLAGS_STATIC=-bstatic
27575                 LDFLAGS_SHARED=-bdynamic
27576                 ;;
27577         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
27578                 # We could also use just "archive" and "shared".
27579                 LDFLAGS_STATIC=-Wl,-a,archive_shared
27580                 LDFLAGS_SHARED=-Wl,-a,shared_archive
27581                 ;;
27582         (irix*)         # from ld manpage IRIX64
27583                 LDFLAGS_STATIC=-Bstatic
27584                 LDFLAGS_SHARED=-Bdynamic
27585                 ;;
27586         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
27587                 # alternative "-oldstyle_liblookup" (not in cc manpage)
27588                 LDFLAGS_STATIC=-noso
27589                 LDFLAGS_SHARED=-so_archive
27590                 ;;
27591         (solaris2*)
27592                 LDFLAGS_STATIC=-Bstatic
27593                 LDFLAGS_SHARED=-Bdynamic
27594                 ;;
27595         esac
27596 fi
27597
27598 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
27599 then
27600         echo "$as_me:27600: checking if linker supports switching between static/dynamic" >&5
27601 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
27602
27603         rm -f libconftest.a
27604         cat >conftest.$ac_ext <<EOF
27605 #line 27605 "configure"
27606 #include <stdio.h>
27607 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
27608 EOF
27609         if { (eval echo "$as_me:27609: \"$ac_compile\"") >&5
27610   (eval $ac_compile) 2>&5
27611   ac_status=$?
27612   echo "$as_me:27612: \$? = $ac_status" >&5
27613   (exit "$ac_status"); } ; then
27614                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
27615                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
27616         fi
27617         rm -f conftest.*
27618
27619         cf_save_LIBS="$LIBS"
27620
27621         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
27622         cat >"conftest.$ac_ext" <<_ACEOF
27623 #line 27623 "configure"
27624 #include "confdefs.h"
27625
27626 #line 27626 "configure"
27627 #include <stdio.h>
27628 int cf_ldflags_static(FILE *fp);
27629
27630 int
27631 main (void)
27632 {
27633
27634         return cf_ldflags_static(stdin);
27635
27636   ;
27637   return 0;
27638 }
27639 _ACEOF
27640 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
27641 if { (eval echo "$as_me:27641: \"$ac_link\"") >&5
27642   (eval $ac_link) 2>&5
27643   ac_status=$?
27644   echo "$as_me:27644: \$? = $ac_status" >&5
27645   (exit "$ac_status"); } &&
27646          { ac_try='test -s "conftest$ac_exeext"'
27647   { (eval echo "$as_me:27647: \"$ac_try\"") >&5
27648   (eval $ac_try) 2>&5
27649   ac_status=$?
27650   echo "$as_me:27650: \$? = $ac_status" >&5
27651   (exit "$ac_status"); }; }; then
27652
27653         # some linkers simply ignore the -dynamic
27654         case x`file "conftest$ac_exeext" 2>/dev/null` in
27655         (*static*)
27656                 cf_ldflags_static=no
27657                 ;;
27658         (*)
27659                 cf_ldflags_static=yes
27660                 ;;
27661         esac
27662
27663 else
27664   echo "$as_me: failed program was:" >&5
27665 cat "conftest.$ac_ext" >&5
27666 cf_ldflags_static=no
27667 fi
27668 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
27669
27670         rm -f libconftest.*
27671         LIBS="$cf_save_LIBS"
27672
27673         echo "$as_me:27673: result: $cf_ldflags_static" >&5
27674 echo "${ECHO_T}$cf_ldflags_static" >&6
27675
27676         if test "$cf_ldflags_static" != yes
27677         then
27678                 LDFLAGS_STATIC=
27679                 LDFLAGS_SHARED=
27680         fi
27681 else
27682         LDFLAGS_STATIC=
27683         LDFLAGS_SHARED=
27684 fi
27685
27686         ;;
27687 esac
27688
27689 echo "$as_me:27689: checking where we will install curses.h" >&5
27690 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
27691
27692 includesubdir=
27693 if test "$with_overwrite" = no && \
27694  { test "x$includedir" = 'x${prefix}/include' || \
27695    test "x$includedir" = "x${prefix}/include"; }
27696 then
27697         includesubdir="/ncurses${USE_LIB_SUFFIX}"
27698 fi
27699 echo "$as_me:27699: result: ${includedir}${includesubdir}" >&5
27700 echo "${ECHO_T}${includedir}${includesubdir}" >&6
27701
27702 ### Resolve a conflict between normal and wide-curses by forcing applications
27703 ### that will need libutf8 to add it to their configure script.
27704 if test "$with_overwrite" != no ; then
27705 if test "$NCURSES_LIBUTF8" = 1 ; then
27706         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
27707         { echo "$as_me:27707: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
27708 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
27709 fi
27710 fi
27711 WITH_OVERWRITE=$with_overwrite
27712
27713 ### At least on MinGW a shared library build without libtool
27714 ### requires adding the additional libs to the link list.
27715 case "$cf_cv_system_name" in
27716 (*mingw32*|*mingw64*)
27717         if test "$DFT_LWR_MODEL" != "libtool"; then
27718            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
27719         fi
27720         ;;
27721 *)      ;;
27722 esac
27723
27724 # used to separate tack out of the tree
27725 NCURSES_TREE=
27726
27727 ### predefined stuff for the test programs
27728
27729 cat >>confdefs.h <<\EOF
27730 #define HAVE_SLK_COLOR 1
27731 EOF
27732
27733 # pkgsrc uses these
27734
27735 echo "$as_me:27735: checking for desired basename for form library" >&5
27736 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
27737
27738 # Check whether --with-form-libname or --without-form-libname was given.
27739 if test "${with_form_libname+set}" = set; then
27740   withval="$with_form_libname"
27741   with_lib_basename=$withval
27742 else
27743   with_lib_basename=form
27744 fi;
27745 FORM_NAME="$with_lib_basename"
27746
27747 case "x$FORM_NAME" in
27748 (x|xno|xnone|xyes)
27749         FORM_NAME=form
27750         ;;
27751 (*)
27752         ;;
27753 esac
27754
27755 echo "$as_me:27755: result: $FORM_NAME" >&5
27756 echo "${ECHO_T}$FORM_NAME" >&6
27757
27758 echo "$as_me:27758: checking for desired basename for menu library" >&5
27759 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
27760
27761 # Check whether --with-menu-libname or --without-menu-libname was given.
27762 if test "${with_menu_libname+set}" = set; then
27763   withval="$with_menu_libname"
27764   with_lib_basename=$withval
27765 else
27766   with_lib_basename=menu
27767 fi;
27768 MENU_NAME="$with_lib_basename"
27769
27770 case "x$MENU_NAME" in
27771 (x|xno|xnone|xyes)
27772         MENU_NAME=menu
27773         ;;
27774 (*)
27775         ;;
27776 esac
27777
27778 echo "$as_me:27778: result: $MENU_NAME" >&5
27779 echo "${ECHO_T}$MENU_NAME" >&6
27780
27781 echo "$as_me:27781: checking for desired basename for panel library" >&5
27782 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
27783
27784 # Check whether --with-panel-libname or --without-panel-libname was given.
27785 if test "${with_panel_libname+set}" = set; then
27786   withval="$with_panel_libname"
27787   with_lib_basename=$withval
27788 else
27789   with_lib_basename=panel
27790 fi;
27791 PANEL_NAME="$with_lib_basename"
27792
27793 case "x$PANEL_NAME" in
27794 (x|xno|xnone|xyes)
27795         PANEL_NAME=panel
27796         ;;
27797 (*)
27798         ;;
27799 esac
27800
27801 echo "$as_me:27801: result: $PANEL_NAME" >&5
27802 echo "${ECHO_T}$PANEL_NAME" >&6
27803
27804 echo "$as_me:27804: checking for desired basename for cxx library" >&5
27805 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
27806
27807 # Check whether --with-cxx-libname or --without-cxx-libname was given.
27808 if test "${with_cxx_libname+set}" = set; then
27809   withval="$with_cxx_libname"
27810   with_lib_basename=$withval
27811 else
27812   with_lib_basename=ncurses++
27813 fi;
27814 CXX_NAME="$with_lib_basename"
27815
27816 case "x$CXX_NAME" in
27817 (x|xno|xnone|xyes)
27818         CXX_NAME=ncurses++
27819         ;;
27820 (*)
27821         ;;
27822 esac
27823
27824 echo "$as_me:27824: result: $CXX_NAME" >&5
27825 echo "${ECHO_T}$CXX_NAME" >&6
27826
27827 ### Construct the list of subdirectories for which we'll customize makefiles
27828 ### with the appropriate compile-rules.
27829
27830 echo "$as_me:27830: checking for src modules" >&5
27831 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
27832
27833 # dependencies and linker-arguments for test-programs
27834 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
27835 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
27836 if test "$DFT_LWR_MODEL" = "libtool"; then
27837         TEST_ARGS="${TEST_DEPS}"
27838         TEST_ARG2="${TEST_DEP2}"
27839 else
27840         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
27841         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
27842 fi
27843
27844 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
27845 cf_cv_src_modules=
27846 for cf_dir in $modules_to_build
27847 do
27848         if test -f "$srcdir/$cf_dir/modules" ; then
27849
27850                 # We may/may not have tack in the distribution, though the
27851                 # makefile is.
27852                 if test "$cf_dir" = tack ; then
27853                         if test "x$cf_with_tack" != "xyes"; then
27854                                 continue
27855                         fi
27856                 fi
27857
27858                 if test -z "$cf_cv_src_modules"; then
27859                         cf_cv_src_modules=$cf_dir
27860                 else
27861                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
27862                 fi
27863
27864                 # Make the ncurses_cfg.h file record the library interface files as
27865                 # well.  These are header files that are the same name as their
27866                 # directory.  Ncurses is the only library that does not follow
27867                 # that pattern.
27868                 if test "$cf_dir" = tack ; then
27869                         continue
27870                 elif test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
27871
27872 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27873
27874                         cat >>confdefs.h <<EOF
27875 #define HAVE_${cf_have_include}_H 1
27876 EOF
27877
27878                         cat >>confdefs.h <<EOF
27879 #define HAVE_LIB${cf_have_include} 1
27880 EOF
27881
27882 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27883
27884 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
27885
27886                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
27887                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
27888                         if test "$DFT_LWR_MODEL" = "libtool"; then
27889                                 TEST_ARGS="${TEST_DEPS}"
27890                                 TEST_ARG2="${TEST_DEP2}"
27891                         else
27892                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
27893                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
27894                         fi
27895                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
27896                 fi
27897         fi
27898 done
27899 echo "$as_me:27899: result: $cf_cv_src_modules" >&5
27900 echo "${ECHO_T}$cf_cv_src_modules" >&6
27901
27902 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
27903 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
27904
27905 SRC_SUBDIRS=
27906 if test "x$cf_with_manpages" != xno ; then
27907         SRC_SUBDIRS="$SRC_SUBDIRS man"
27908 fi
27909 SRC_SUBDIRS="$SRC_SUBDIRS include"
27910 for cf_dir in $cf_cv_src_modules
27911 do
27912         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
27913 done
27914 if test "x$cf_with_tests" != "xno" ; then
27915         SRC_SUBDIRS="$SRC_SUBDIRS test"
27916 fi
27917 # always make this, to install the ncurses-config script
27918 SRC_SUBDIRS="$SRC_SUBDIRS misc"
27919 if test "$cf_with_cxx_binding" != no; then
27920         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
27921         SRC_SUBDIRS="$SRC_SUBDIRS c++"
27922 fi
27923
27924 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
27925 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
27926
27927 ADA_SUBDIRS=
27928 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
27929         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
27930         ADA_SUBDIRS="gen src"
27931         if test "x$cf_with_tests" != "xno" ; then
27932                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
27933         fi
27934 fi
27935
27936 SUB_MAKEFILES=
27937 for cf_dir in $SRC_SUBDIRS
27938 do
27939         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
27940 done
27941
27942 if test -n "$ADA_SUBDIRS"; then
27943         for cf_dir in $ADA_SUBDIRS
27944         do
27945                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
27946         done
27947
27948 fi
27949
27950 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
27951    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
27952    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
27953    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
27954 fi
27955
27956 DIRS_TO_MAKE="lib"
27957 for cf_item in $cf_list_models
27958 do
27959
27960         case $cf_item in
27961         (libtool) cf_subdir='obj_lo'  ;;
27962         (normal)  cf_subdir='objects' ;;
27963         (debug)   cf_subdir='obj_g' ;;
27964         (profile) cf_subdir='obj_p' ;;
27965         (shared)
27966                 case "$cf_cv_system_name" in
27967                 (cygwin|msys)
27968                         cf_subdir='objects' ;;
27969                 (*)
27970                         cf_subdir='obj_s' ;;
27971                 esac
27972         esac
27973
27974         for cf_item2 in $DIRS_TO_MAKE
27975         do
27976                 test "$cf_item2" = "$cf_subdir" && break
27977         done
27978         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
27979 done
27980 for cf_dir in $DIRS_TO_MAKE
27981 do
27982         test ! -d "$cf_dir" && mkdir "$cf_dir"
27983 done
27984
27985 # symbols that differ when compiling Ada95 by itself.
27986 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
27987
27988 # values to use as strings
27989
27990 cat >>confdefs.h <<EOF
27991 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
27992 EOF
27993
27994 cat >>confdefs.h <<EOF
27995 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
27996 EOF
27997
27998 ### Define substitutions for header files to avoid name-pollution
27999
28000 if test "x$cf_cv_have_tcgetattr" = xyes ; then
28001         HAVE_TCGETATTR=1
28002 else
28003         HAVE_TCGETATTR=0
28004 fi
28005
28006 if test "x$ac_cv_header_stdint_h" = xyes ; then
28007         HAVE_STDINT_H=1
28008 else
28009         HAVE_STDINT_H=0
28010 fi
28011
28012 if test "x$ac_cv_header_termio_h" = xyes ; then
28013         HAVE_TERMIO_H=1
28014 else
28015         HAVE_TERMIO_H=0
28016 fi
28017
28018 if test "x$ac_cv_header_termios_h" = xyes ; then
28019         HAVE_TERMIOS_H=1
28020 else
28021         HAVE_TERMIOS_H=0
28022 fi
28023
28024 ################################################################################
28025 test "x$use_database" = xyes && \
28026 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
28027
28028 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
28029 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
28030
28031 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
28032 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
28033 fi
28034
28035 if test "x$cf_with_tests" != xno ; then
28036         MAKE_TESTS=
28037 else
28038         MAKE_TESTS="#"
28039 fi
28040
28041 ADAHTML_DIR=../../doc/html/ada
28042
28043 # workaround for OS/2 (20151017)
28044 case "$cf_cv_system_name" in
28045 (os2*)
28046         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
28047         ;;
28048 (*)
28049         LIBTOOL_OPTS_CXX=
28050         ;;
28051 esac
28052
28053 # workaround for g++ versus Solaris (20131116)
28054 case "$cf_cv_system_name" in
28055 (solaris2*)
28056         case "x$CPPFLAGS" in
28057         (*-D_XOPEN_SOURCE_EXTENDED*)
28058                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
28059
28060 echo "${as_me:-configure}:28060: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
28061
28062                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
28063                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
28064                 ;;
28065         esac
28066         ;;
28067 esac
28068
28069 # Help to automatically enable the extended curses features when using either
28070 # the *-config or the ".pc" files by adding defines.
28071 echo "$as_me:28071: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
28072 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
28073 PKG_CFLAGS=
28074 for cf_loop1 in $CPPFLAGS_after_XOPEN
28075 do
28076         cf_found=no
28077         for cf_loop2 in $CPPFLAGS_before_XOPEN
28078         do
28079                 if test "x$cf_loop1" = "x$cf_loop2"
28080                 then
28081                         cf_found=yes
28082                         break
28083                 fi
28084         done
28085         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
28086 done
28087 echo "$as_me:28087: result: $PKG_CFLAGS" >&5
28088 echo "${ECHO_T}$PKG_CFLAGS" >&6
28089
28090 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
28091 case "x$NCURSES_OSPEED" in
28092 (*short*)
28093         cf_compatible=1
28094         ;;
28095 (*)
28096         cf_compatible=0
28097         ;;
28098 esac
28099
28100 cat >>confdefs.h <<EOF
28101 #define NCURSES_OSPEED_COMPAT $cf_compatible
28102 EOF
28103
28104 case "x$cf_cv_typeof_chtype" in
28105 (xshort|xint|xlong)
28106         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
28107         ;;
28108 esac
28109
28110 case "x$cf_cv_typeof_mmask_t" in
28111 (xshort|xint|xlong)
28112         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
28113         ;;
28114 esac
28115
28116 # substitute into misc/Makefile to suppress
28117 # (un)install.data from the
28118 # (un)install rules.
28119 if test "x$cf_with_db_install" = "xno"; then
28120         MISC_INSTALL_DATA=
28121         MISC_UNINSTALL_DATA=
28122 else
28123         MISC_INSTALL_DATA=install.data
28124         MISC_UNINSTALL_DATA=uninstall.data
28125 fi
28126
28127 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
28128         MAKE_DATABASE="#"
28129 else
28130         MAKE_DATABASE="$MAKE_TERMINFO"
28131 fi
28132
28133 if test -n "$PACKAGE"
28134 then
28135         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
28136         export PACKAGE
28137         echo "package: $PACKAGE"
28138 fi
28139
28140 UNALTERED_SYMS=
28141 cf_filter_syms=no
28142
28143 if test -n "$RESULTING_SYMS"
28144 then
28145         cf_filter_syms=$cf_dft_filter_syms
28146         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
28147
28148 echo "${as_me:-configure}:28148: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
28149
28150 fi
28151
28152 if test "x$WILDCARD_SYMS" = xno
28153 then
28154         cf_filter_syms=yes
28155 fi
28156
28157 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
28158
28159 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
28160 if test "$cf_filter_syms" = yes
28161 then
28162         RESULTING_SYMS=resulting.map
28163 fi
28164
28165 if test "x$cross_compiling" = xyes ; then
28166         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
28167         CHECK_BUILD="#"
28168 else
28169         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
28170         CHECK_BUILD=
28171 fi
28172
28173 # This is used for the *-config script and *.pc data files.
28174
28175 echo "$as_me:28175: checking for linker search path" >&5
28176 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
28177 if test "${cf_cv_ld_searchpath+set}" = set; then
28178   echo $ECHO_N "(cached) $ECHO_C" >&6
28179 else
28180
28181 if test "$cross_compiling" != yes ; then
28182
28183 # GNU binutils' ld does not involve permissions which may stop ldconfig.
28184 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
28185
28186 # The -NX options tell newer versions of Linux ldconfig to not attempt to
28187 # update the cache, which makes it run faster.
28188 test -z "$cf_pathlist" && \
28189         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
28190
28191 test -z "$cf_pathlist" &&
28192         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
28193
28194 # This works with OpenBSD 6.5, which lists only filenames
28195 test -z "$cf_pathlist" &&
28196         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
28197
28198 if test -z "$cf_pathlist"
28199 then
28200         # dyld default path with MacOS
28201         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
28202         then
28203                 # do this to bypass check
28204                 cf_cv_ld_searchpath='$HOME/lib'
28205                 cf_pathlist="/usr/local/lib /lib /usr/lib"
28206         fi
28207 fi
28208
28209 if test -z "$cf_pathlist"
28210 then
28211         # Solaris is "SunOS"
28212         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
28213         then
28214                 case x`(isainfo -b)` in
28215                 (x64)
28216                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
28217                         ;;
28218                 (x32)
28219                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
28220                         cf_pathlist="$cf_pathlist /lib /usr/lib"
28221                         ;;
28222                 (*)
28223                         { echo "$as_me:28223: WARNING: problem with Solaris architecture" >&5
28224 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
28225                         ;;
28226                 esac
28227         fi
28228 fi
28229
28230 if test -z "$cf_pathlist"
28231 then
28232         # HP-UX
28233         if test x"`uname -s`" = xHP-UX
28234         then
28235                 case x`getconf LONG_BIT` in
28236                 (x64)
28237                         cf_pathlist="/usr/lib/hpux64"
28238                         ;;
28239                 (x*)
28240                         cf_pathlist="/usr/lib/hpux32"
28241                         ;;
28242                 esac
28243         fi
28244 fi
28245
28246 fi
28247
28248 # If nothing else, assume it is conventional
28249 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
28250
28251 # Finally, check that this is only directories
28252 for cf_path in $0 $cf_pathlist
28253 do
28254         if test -d "$cf_path"; then
28255                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
28256                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
28257         fi
28258 done
28259
28260 # Ensure that it is nonempty
28261 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
28262
28263 fi
28264 echo "$as_me:28264: result: $cf_cv_ld_searchpath" >&5
28265 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
28266
28267 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
28268
28269 cat >>confdefs.h <<\EOF
28270 #define HAVE_CURSES_DATA_BOOLNAMES 1
28271 EOF
28272
28273 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"
28274 ac_config_commands="$ac_config_commands default"
28275 cat >confcache <<\_ACEOF
28276 # This file is a shell script that caches the results of configure
28277 # tests run on this system so they can be shared between configure
28278 # scripts and configure runs, see configure's option --config-cache.
28279 # It is not useful on other systems.  If it contains results you don't
28280 # want to keep, you may remove or edit it.
28281 #
28282 # config.status only pays attention to the cache file if you give it
28283 # the --recheck option to rerun configure.
28284 #
28285 # `ac_cv_env_foo' variables (set or unset) will be overriden when
28286 # loading this file, other *unset* `ac_cv_foo' will be assigned the
28287 # following values.
28288
28289 _ACEOF
28290
28291 # The following way of writing the cache mishandles newlines in values,
28292 # but we know of no workaround that is simple, portable, and efficient.
28293 # So, don't put newlines in cache variables' values.
28294 # Ultrix sh set writes to stderr and can't be redirected directly,
28295 # and sets the high bit in the cache file unless we assign to the vars.
28296 {
28297   (set) 2>&1 |
28298     case `(ac_space=' '; set | grep ac_space) 2>&1` in
28299     *ac_space=\ *)
28300       # `set' does not quote correctly, so add quotes (double-quote
28301       # substitution turns \\\\ into \\, and sed turns \\ into \).
28302       sed -n \
28303         "s/'/'\\\\''/g;
28304           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
28305       ;;
28306     *)
28307       # `set' quotes correctly as required by POSIX, so do not add quotes.
28308       sed -n \
28309         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
28310       ;;
28311     esac;
28312 } |
28313   sed '
28314      t clear
28315      : clear
28316      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
28317      t end
28318      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
28319      : end' >>confcache
28320 if cmp -s $cache_file confcache; then :; else
28321   if test -w $cache_file; then
28322     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
28323     cat confcache >$cache_file
28324   else
28325     echo "not updating unwritable cache $cache_file"
28326   fi
28327 fi
28328 rm -f confcache
28329
28330 test "x$prefix" = xNONE && prefix=$ac_default_prefix
28331 # Let make expand exec_prefix.
28332 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
28333
28334 # VPATH may cause trouble with some makes, so we remove $(srcdir),
28335 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28336 # trailing colons and then remove the whole line if VPATH becomes empty
28337 # (actually we leave an empty line to preserve line numbers).
28338 if test "x$srcdir" = x.; then
28339   ac_vpsub='/^[         ]*VPATH[        ]*=/{
28340 s/:*\$(srcdir):*/:/;
28341 s/:*\${srcdir}:*/:/;
28342 s/:*@srcdir@:*/:/;
28343 s/^\([^=]*=[    ]*\):*/\1/;
28344 s/:*$//;
28345 s/^[^=]*=[      ]*$//;
28346 }'
28347 fi
28348
28349 DEFS=-DHAVE_CONFIG_H
28350
28351 : "${CONFIG_STATUS=./config.status}"
28352 ac_clean_files_save=$ac_clean_files
28353 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
28354 { echo "$as_me:28354: creating $CONFIG_STATUS" >&5
28355 echo "$as_me: creating $CONFIG_STATUS" >&6;}
28356 cat >"$CONFIG_STATUS" <<_ACEOF
28357 #! $SHELL
28358 # Generated automatically by configure.
28359 # Run this file to recreate the current configuration.
28360 # Compiler output produced by configure, useful for debugging
28361 # configure, is in config.log if it exists.
28362
28363 debug=false
28364 SHELL=\${CONFIG_SHELL-$SHELL}
28365 ac_cs_invocation="\$0 \$@"
28366
28367 CLICOLOR_FORCE= GREP_OPTIONS=
28368 unset CLICOLOR_FORCE GREP_OPTIONS
28369 _ACEOF
28370
28371 cat >>"$CONFIG_STATUS" <<\_ACEOF
28372 # Be Bourne compatible
28373 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
28374   emulate sh
28375   NULLCMD=:
28376 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28377   set -o posix
28378 fi
28379
28380 # Name of the executable.
28381 as_me=`echo "$0" |sed 's,.*[\\/],,'`
28382
28383 if expr a : '\(a\)' >/dev/null 2>&1; then
28384   as_expr=expr
28385 else
28386   as_expr=false
28387 fi
28388
28389 rm -f conf$$ conf$$.exe conf$$.file
28390 echo >conf$$.file
28391 if ln -s conf$$.file conf$$ 2>/dev/null; then
28392   # We could just check for DJGPP; but this test a) works b) is more generic
28393   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
28394   if test -f conf$$.exe; then
28395     # Don't use ln at all; we don't have any links
28396     as_ln_s='cp -p'
28397   else
28398     as_ln_s='ln -s'
28399   fi
28400 elif ln conf$$.file conf$$ 2>/dev/null; then
28401   as_ln_s=ln
28402 else
28403   as_ln_s='cp -p'
28404 fi
28405 rm -f conf$$ conf$$.exe conf$$.file
28406
28407 as_executable_p="test -f"
28408
28409 # Support unset when possible.
28410 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
28411   as_unset="unset"
28412 else
28413   as_unset="false"
28414 fi
28415
28416 # NLS nuisances.
28417 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
28418 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
28419 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
28420 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
28421 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
28422 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
28423 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
28424 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
28425
28426 # IFS
28427 # We need space, tab and new line, in precisely that order.
28428 as_nl='
28429 '
28430 IFS="   $as_nl"
28431
28432 # CDPATH.
28433 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
28434
28435 exec 6>&1
28436
28437 _ACEOF
28438
28439 # Files that config.status was made for.
28440 if test -n "$ac_config_files"; then
28441   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
28442 fi
28443
28444 if test -n "$ac_config_headers"; then
28445   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
28446 fi
28447
28448 if test -n "$ac_config_links"; then
28449   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
28450 fi
28451
28452 if test -n "$ac_config_commands"; then
28453   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
28454 fi
28455
28456 cat >>"$CONFIG_STATUS" <<\EOF
28457
28458 ac_cs_usage="\
28459 \`$as_me' instantiates files from templates according to the
28460 current configuration.
28461
28462 Usage: $0 [OPTIONS] [FILE]...
28463
28464   -h, --help       print this help, then exit
28465   -V, --version    print version number, then exit
28466   -d, --debug      don't remove temporary files
28467       --recheck    update $as_me by reconfiguring in the same conditions
28468   --file=FILE[:TEMPLATE]
28469                    instantiate the configuration file FILE
28470   --header=FILE[:TEMPLATE]
28471                    instantiate the configuration header FILE
28472
28473 Configuration files:
28474 $config_files
28475
28476 Configuration headers:
28477 $config_headers
28478
28479 Configuration commands:
28480 $config_commands
28481
28482 Report bugs to <dickey@invisible-island.net>."
28483 EOF
28484
28485 cat >>"$CONFIG_STATUS" <<EOF
28486 ac_cs_version="\\
28487 config.status
28488 configured by $0, generated by GNU Autoconf 2.52.20210105,
28489   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
28490
28491 Copyright 2003-2020,2021        Thomas E. Dickey
28492 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
28493 Free Software Foundation, Inc.
28494 This config.status script is free software; the Free Software Foundation
28495 gives unlimited permission to copy, distribute and modify it."
28496 srcdir="$srcdir"
28497 INSTALL="$INSTALL"
28498 EOF
28499
28500 cat >>"$CONFIG_STATUS" <<\EOF
28501 # If no file are specified by the user, then we need to provide default
28502 # value.  By we need to know if files were specified by the user.
28503 ac_need_defaults=:
28504 while test $# != 0
28505 do
28506   case $1 in
28507   --*=*)
28508     ac_option=`expr "x$1" : 'x\([^=]*\)='`
28509     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
28510     shift
28511     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
28512     shift
28513     ;;
28514   -*);;
28515   *) # This is not an option, so the user has probably given explicit
28516      # arguments.
28517      ac_need_defaults=false;;
28518   esac
28519
28520   case $1 in
28521   # Handling of the options.
28522 EOF
28523 cat >>"$CONFIG_STATUS" <<EOF
28524   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28525     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
28526     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
28527 EOF
28528 cat >>"$CONFIG_STATUS" <<\EOF
28529   --version | --vers* | -V )
28530     echo "$ac_cs_version"; exit 0 ;;
28531   --he | --h)
28532     # Conflict between --help and --header
28533     { { echo "$as_me:28533: error: ambiguous option: $1
28534 Try \`$0 --help' for more information." >&5
28535 echo "$as_me: error: ambiguous option: $1
28536 Try \`$0 --help' for more information." >&2;}
28537    { (exit 1); exit 1; }; };;
28538   --help | --hel | -h )
28539     echo "$ac_cs_usage"; exit 0 ;;
28540   --debug | --d* | -d )
28541     debug=: ;;
28542   --file | --fil | --fi | --f )
28543     shift
28544     CONFIG_FILES="$CONFIG_FILES $1"
28545     ac_need_defaults=false;;
28546   --header | --heade | --head | --hea )
28547     shift
28548     CONFIG_HEADERS="$CONFIG_HEADERS $1"
28549     ac_need_defaults=false;;
28550
28551   # This is an error.
28552   -*) { { echo "$as_me:28552: error: unrecognized option: $1
28553 Try \`$0 --help' for more information." >&5
28554 echo "$as_me: error: unrecognized option: $1
28555 Try \`$0 --help' for more information." >&2;}
28556    { (exit 1); exit 1; }; } ;;
28557
28558   *) ac_config_targets="$ac_config_targets $1" ;;
28559
28560   esac
28561   shift
28562 done
28563
28564 exec 5>>config.log
28565 cat >&5 << _ACEOF
28566
28567 ## ----------------------- ##
28568 ## Running config.status.  ##
28569 ## ----------------------- ##
28570
28571 This file was extended by $as_me 2.52.20210105, executed with
28572   CONFIG_FILES    = $CONFIG_FILES
28573   CONFIG_HEADERS  = $CONFIG_HEADERS
28574   CONFIG_LINKS    = $CONFIG_LINKS
28575   CONFIG_COMMANDS = $CONFIG_COMMANDS
28576   > "$ac_cs_invocation"
28577 on `(hostname || uname -n) 2>/dev/null | sed 1q`
28578
28579 _ACEOF
28580 EOF
28581
28582 cat >>"$CONFIG_STATUS" <<EOF
28583 #
28584 # INIT-COMMANDS section.
28585 #
28586
28587 ### Special initialization commands, used to pass information from the
28588 ### configuration-run into config.status
28589
28590 ALTERNATE_SYMS="$ALTERNATE_SYMS"
28591 AWK="$AWK"
28592 CXX_NAME="$CXX_NAME"
28593 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
28594 DFT_LWR_MODEL="$DFT_LWR_MODEL"
28595 ECHO_LD="$ECHO_LD"
28596 EXTRA_SUFFIX="$EXTRA_SUFFIX"
28597 FORM_NAME="$FORM_NAME"
28598 LDCONFIG="$LDCONFIG"
28599 LIBTOOL_VERSION="$LIBTOOL_VERSION"
28600 LIB_NAME="$LIB_NAME"
28601 LIB_PREFIX="$LIB_PREFIX"
28602 LIB_SUBSETS="$LIB_SUBSETS"
28603 LIB_SUFFIX="$LIB_SUFFIX"
28604 LIB_TRACING="$LIB_TRACING"
28605 LN_S="$LN_S"
28606 MAKE_TERMINFO="$MAKE_TERMINFO"
28607 MENU_NAME="$MENU_NAME"
28608 NCURSES_MAJOR="$NCURSES_MAJOR"
28609 NCURSES_MINOR="$NCURSES_MINOR"
28610 NCURSES_OSPEED="$NCURSES_OSPEED"
28611 NCURSES_PATCH="$NCURSES_PATCH"
28612 PANEL_NAME="$PANEL_NAME"
28613 SRC_SUBDIRS="$SRC_SUBDIRS"
28614 TERMINFO="$TERMINFO"
28615 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
28616 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
28617 TICS_NAME="$TICS_NAME"
28618 TICS_SUFFIX="$TICS_SUFFIX"
28619 TIC_PATH="$TIC_PATH"
28620 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
28621 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
28622 TINFO_NAME="$TINFO_NAME"
28623 TINFO_SUFFIX="$TINFO_SUFFIX"
28624 UNALTERED_SYMS="$UNALTERED_SYMS"
28625 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
28626 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
28627 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
28628 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
28629 WILDCARD_SYMS="$WILDCARD_SYMS"
28630 WITH_CURSES_H="$with_curses_h"
28631 WITH_ECHO="${enable_echo:=yes}"
28632 WITH_OVERWRITE="$with_overwrite"
28633 cf_LIST_MODELS="$cf_list_models"
28634 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
28635 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
28636 cf_cv_abi_version="$cf_cv_abi_version"
28637 cf_cv_do_relink="$cf_cv_do_relink"
28638 cf_cv_do_reranlib="$cf_cv_do_reranlib"
28639 cf_cv_do_symlinks="$cf_cv_do_symlinks"
28640 cf_cv_enable_lp64="$cf_cv_enable_lp64"
28641 cf_cv_enable_opaque="$cf_cv_enable_opaque"
28642 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
28643 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
28644 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
28645 cf_cv_rel_version="$cf_cv_rel_version"
28646 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
28647 cf_cv_shared_soname='$cf_cv_shared_soname'
28648 cf_cv_shlib_version="$cf_cv_shlib_version"
28649 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
28650 cf_cv_system_name="$cf_cv_system_name"
28651 cf_cv_term_driver="$with_term_driver"
28652 cf_with_ada="$cf_with_ada"
28653 cf_with_cxx_binding="$cf_with_cxx_binding"
28654 cf_with_db_install="$cf_with_db_install"
28655 cf_with_manpages="$cf_with_manpages"
28656 cf_with_tests="$cf_with_tests"
28657 host="$host"
28658 target="$target"
28659 with_shared_cxx="$with_shared_cxx"
28660
28661 EOF
28662
28663 cat >>"$CONFIG_STATUS" <<\EOF
28664 for ac_config_target in $ac_config_targets
28665 do
28666   case "$ac_config_target" in
28667   # Handling of arguments.
28668   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
28669   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
28670   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
28671   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
28672   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
28673   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
28674   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
28675   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
28676   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
28677   *) { { echo "$as_me:28677: error: invalid argument: $ac_config_target" >&5
28678 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
28679    { (exit 1); exit 1; }; };;
28680   esac
28681 done
28682
28683 # If the user did not use the arguments to specify the items to instantiate,
28684 # then the envvar interface is used.  Set only those that are not.
28685 # We use the long form for the default assignment because of an extremely
28686 # bizarre bug on SunOS 4.1.3.
28687 if "$ac_need_defaults"; then
28688   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
28689   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28690   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
28691 fi
28692
28693 # Create a temporary directory, and hook for its removal unless debugging.
28694 $debug ||
28695 {
28696   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
28697   trap '{ (exit 1); exit 1; }' 1 2 13 15
28698 }
28699
28700 # Create a (secure) tmp directory for tmp files.
28701 : ${TMPDIR=/tmp}
28702 {
28703   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
28704   test -n "$tmp" && test -d "$tmp"
28705 }  ||
28706 {
28707   tmp=$TMPDIR/cs$$-$RANDOM
28708   (umask 077 && mkdir $tmp)
28709 } ||
28710 {
28711    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
28712    { (exit 1); exit 1; }
28713 }
28714
28715 EOF
28716
28717 cat >>"$CONFIG_STATUS" <<EOF
28718
28719 #
28720 # CONFIG_FILES section.
28721 #
28722
28723 # No need to generate the scripts if there are no CONFIG_FILES.
28724 # This happens for instance when ./config.status config.h
28725 if test -n "\$CONFIG_FILES"; then
28726   # Protect against being on the right side of a sed subst in config.status.
28727   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
28728    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
28729 s,@SHELL@,$SHELL,;t t
28730 s,@exec_prefix@,$exec_prefix,;t t
28731 s,@prefix@,$prefix,;t t
28732 s,@program_transform_name@,$program_transform_name,;t t
28733 s,@bindir@,$bindir,;t t
28734 s,@sbindir@,$sbindir,;t t
28735 s,@libexecdir@,$libexecdir,;t t
28736 s,@datarootdir@,$datarootdir,;t t
28737 s,@datadir@,$datadir,;t t
28738 s,@sysconfdir@,$sysconfdir,;t t
28739 s,@sharedstatedir@,$sharedstatedir,;t t
28740 s,@localstatedir@,$localstatedir,;t t
28741 s,@runstatedir@,$runstatedir,;t t
28742 s,@libdir@,$libdir,;t t
28743 s,@includedir@,$includedir,;t t
28744 s,@oldincludedir@,$oldincludedir,;t t
28745 s,@infodir@,$infodir,;t t
28746 s,@mandir@,$mandir,;t t
28747 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
28748 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
28749 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
28750 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
28751 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
28752 s,@build_alias@,$build_alias,;t t
28753 s,@host_alias@,$host_alias,;t t
28754 s,@target_alias@,$target_alias,;t t
28755 s,@ECHO_C@,$ECHO_C,;t t
28756 s,@ECHO_N@,$ECHO_N,;t t
28757 s,@ECHO_T@,$ECHO_T,;t t
28758 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
28759 s,@DEFS@,$DEFS,;t t
28760 s,@LIBS@,$LIBS,;t t
28761 s,@top_builddir@,$top_builddir,;t t
28762 s,@GREP@,$GREP,;t t
28763 s,@EGREP@,$EGREP,;t t
28764 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
28765 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
28766 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
28767 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
28768 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
28769 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
28770 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
28771 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
28772 s,@VERSION@,$VERSION,;t t
28773 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
28774 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
28775 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
28776 s,@PACKAGE@,$PACKAGE,;t t
28777 s,@build@,$build,;t t
28778 s,@build_cpu@,$build_cpu,;t t
28779 s,@build_vendor@,$build_vendor,;t t
28780 s,@build_os@,$build_os,;t t
28781 s,@host@,$host,;t t
28782 s,@host_cpu@,$host_cpu,;t t
28783 s,@host_vendor@,$host_vendor,;t t
28784 s,@host_os@,$host_os,;t t
28785 s,@target@,$target,;t t
28786 s,@target_cpu@,$target_cpu,;t t
28787 s,@target_vendor@,$target_vendor,;t t
28788 s,@target_os@,$target_os,;t t
28789 s,@FGREP@,$FGREP,;t t
28790 s,@CC@,$CC,;t t
28791 s,@CFLAGS@,$CFLAGS,;t t
28792 s,@LDFLAGS@,$LDFLAGS,;t t
28793 s,@CPPFLAGS@,$CPPFLAGS,;t t
28794 s,@ac_ct_CC@,$ac_ct_CC,;t t
28795 s,@EXEEXT@,$EXEEXT,;t t
28796 s,@OBJEXT@,$OBJEXT,;t t
28797 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
28798 s,@CPP@,$CPP,;t t
28799 s,@LDCONFIG@,$LDCONFIG,;t t
28800 s,@CXX@,$CXX,;t t
28801 s,@CXXFLAGS@,$CXXFLAGS,;t t
28802 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
28803 s,@AWK@,$AWK,;t t
28804 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
28805 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
28806 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
28807 s,@LINT@,$LINT,;t t
28808 s,@LINT_OPTS@,$LINT_OPTS,;t t
28809 s,@LN_S@,$LN_S,;t t
28810 s,@cf_config_suffix@,$cf_config_suffix,;t t
28811 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
28812 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
28813 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
28814 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
28815 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
28816 s,@SET_MAKE@,$SET_MAKE,;t t
28817 s,@CTAGS@,$CTAGS,;t t
28818 s,@ETAGS@,$ETAGS,;t t
28819 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
28820 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
28821 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
28822 s,@RANLIB@,$RANLIB,;t t
28823 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
28824 s,@LD@,$LD,;t t
28825 s,@ac_ct_LD@,$ac_ct_LD,;t t
28826 s,@AR@,$AR,;t t
28827 s,@ac_ct_AR@,$ac_ct_AR,;t t
28828 s,@NM@,$NM,;t t
28829 s,@ac_ct_NM@,$ac_ct_NM,;t t
28830 s,@ARFLAGS@,$ARFLAGS,;t t
28831 s,@DESTDIR@,$DESTDIR,;t t
28832 s,@BUILD_CC@,$BUILD_CC,;t t
28833 s,@BUILD_CPP@,$BUILD_CPP,;t t
28834 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
28835 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
28836 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
28837 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
28838 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
28839 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
28840 s,@cf_list_models@,$cf_list_models,;t t
28841 s,@ABI_VERSION@,$ABI_VERSION,;t t
28842 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
28843 s,@LIBTOOL@,$LIBTOOL,;t t
28844 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
28845 s,@LT_UNDEF@,$LT_UNDEF,;t t
28846 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
28847 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
28848 s,@LIB_CREATE@,$LIB_CREATE,;t t
28849 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
28850 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
28851 s,@LIB_PREP@,$LIB_PREP,;t t
28852 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
28853 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
28854 s,@LIB_LINK@,$LIB_LINK,;t t
28855 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
28856 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
28857 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
28858 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
28859 s,@TICS_NAME@,$TICS_NAME,;t t
28860 s,@TINFO_NAME@,$TINFO_NAME,;t t
28861 s,@LIB_NAME@,$LIB_NAME,;t t
28862 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
28863 s,@CC_G_OPT@,$CC_G_OPT,;t t
28864 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
28865 s,@LD_MODEL@,$LD_MODEL,;t t
28866 s,@shlibdir@,$shlibdir,;t t
28867 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
28868 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
28869 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
28870 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
28871 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
28872 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
28873 s,@LINK_PROGS@,$LINK_PROGS,;t t
28874 s,@LINK_TESTS@,$LINK_TESTS,;t t
28875 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
28876 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
28877 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
28878 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
28879 s,@RPATH_LIST@,$RPATH_LIST,;t t
28880 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
28881 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
28882 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
28883 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
28884 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
28885 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
28886 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
28887 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
28888 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
28889 s,@TIC@,$TIC,;t t
28890 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
28891 s,@INFOCMP@,$INFOCMP,;t t
28892 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
28893 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
28894 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
28895 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
28896 s,@XTERM_KBS@,$XTERM_KBS,;t t
28897 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
28898 s,@TERMINFO@,$TERMINFO,;t t
28899 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
28900 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
28901 s,@TERMPATH@,$TERMPATH,;t t
28902 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
28903 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
28904 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
28905 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
28906 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
28907 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
28908 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
28909 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
28910 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
28911 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
28912 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
28913 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
28914 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
28915 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
28916 s,@RGB_PATH@,$RGB_PATH,;t t
28917 s,@no_x11_rgb@,$no_x11_rgb,;t t
28918 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
28919 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
28920 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
28921 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
28922 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
28923 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
28924 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
28925 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
28926 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
28927 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
28928 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
28929 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
28930 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
28931 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
28932 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
28933 s,@PTHREAD@,$PTHREAD,;t t
28934 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
28935 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
28936 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
28937 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
28938 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
28939 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
28940 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
28941 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
28942 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
28943 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
28944 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
28945 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
28946 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
28947 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
28948 s,@ECHO_LT@,$ECHO_LT,;t t
28949 s,@ECHO_LD@,$ECHO_LD,;t t
28950 s,@RULE_CC@,$RULE_CC,;t t
28951 s,@SHOW_CC@,$SHOW_CC,;t t
28952 s,@ECHO_CC@,$ECHO_CC,;t t
28953 s,@ECHO_LINK@,$ECHO_LINK,;t t
28954 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
28955 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
28956 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
28957 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
28958 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
28959 s,@ADAFLAGS@,$ADAFLAGS,;t t
28960 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
28961 s,@ADA_TRACE@,$ADA_TRACE,;t t
28962 s,@MATH_LIB@,$MATH_LIB,;t t
28963 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
28964 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
28965 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
28966 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
28967 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
28968 s,@TEST_LIBS@,$TEST_LIBS,;t t
28969 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
28970 s,@CXXCPP@,$CXXCPP,;t t
28971 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
28972 s,@CXX_AR@,$CXX_AR,;t t
28973 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
28974 s,@CXXLIBS@,$CXXLIBS,;t t
28975 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
28976 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
28977 s,@M4_exists@,$M4_exists,;t t
28978 s,@cf_ada_make@,$cf_ada_make,;t t
28979 s,@cf_ada_config@,$cf_ada_config,;t t
28980 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
28981 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
28982 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
28983 s,@cf_compile_generics@,$cf_compile_generics,;t t
28984 s,@cf_generic_objects@,$cf_generic_objects,;t t
28985 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
28986 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
28987 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
28988 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
28989 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
28990 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
28991 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
28992 s,@cf_ada_package@,$cf_ada_package,;t t
28993 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
28994 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
28995 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
28996 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
28997 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
28998 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
28999 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
29000 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
29001 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
29002 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
29003 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
29004 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
29005 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
29006 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
29007 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
29008 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
29009 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
29010 s,@TICS_LIBS@,$TICS_LIBS,;t t
29011 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
29012 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
29013 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
29014 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
29015 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
29016 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
29017 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
29018 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
29019 s,@includesubdir@,$includesubdir,;t t
29020 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
29021 s,@TICS_LIST@,$TICS_LIST,;t t
29022 s,@TINFO_LIST@,$TINFO_LIST,;t t
29023 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
29024 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
29025 s,@FORM_NAME@,$FORM_NAME,;t t
29026 s,@MENU_NAME@,$MENU_NAME,;t t
29027 s,@PANEL_NAME@,$PANEL_NAME,;t t
29028 s,@CXX_NAME@,$CXX_NAME,;t t
29029 s,@TEST_ARGS@,$TEST_ARGS,;t t
29030 s,@TEST_DEPS@,$TEST_DEPS,;t t
29031 s,@TEST_ARG2@,$TEST_ARG2,;t t
29032 s,@TEST_DEP2@,$TEST_DEP2,;t t
29033 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
29034 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
29035 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
29036 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
29037 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
29038 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
29039 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
29040 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
29041 s,@cross_compiling@,$cross_compiling,;t t
29042 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
29043 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
29044 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
29045 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
29046 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
29047 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
29048 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
29049 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
29050 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
29051 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
29052 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
29053 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
29054 CEOF
29055
29056 EOF
29057
29058   cat >>"$CONFIG_STATUS" <<\EOF
29059   # Split the substitutions into bite-sized pieces for seds with
29060   # small command number limits, like on Digital OSF/1 and HP-UX.
29061   ac_max_sed_lines=48
29062   ac_sed_frag=1 # Number of current file.
29063   ac_beg=1 # First line for current file.
29064   ac_end=$ac_max_sed_lines # Line after last line for current file.
29065   ac_more_lines=:
29066   ac_sed_cmds=
29067   while "$ac_more_lines"; do
29068     if test "$ac_beg" -gt 1; then
29069       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29070     else
29071       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29072     fi
29073     if test ! -s $tmp/subs.frag; then
29074       ac_more_lines=false
29075     else
29076       # The purpose of the label and of the branching condition is to
29077       # speed up the sed processing (if there are no `@' at all, there
29078       # is no need to browse any of the substitutions).
29079       # These are the two extra sed commands mentioned above.
29080       (echo ':t
29081   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
29082       # It is possible to make a multiline substitution using escaped newlines.
29083       # Ensure that we do not split the substitution between script fragments.
29084       ac_BEG=$ac_end
29085       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
29086       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
29087       if test -s $tmp/subs.next; then
29088         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
29089         if test ! -s $tmp/subs.edit; then
29090           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
29091           if test ! -s $tmp/subs.edit; then
29092             if test "$ac_beg" -gt 1; then
29093               ac_end=`expr "$ac_end" - 1`
29094               continue
29095             fi
29096           fi
29097         fi
29098       fi
29099
29100       if test -z "$ac_sed_cmds"; then
29101         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
29102       else
29103         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
29104       fi
29105       ac_sed_frag=`expr "$ac_sed_frag" + 1`
29106       ac_beg=$ac_end
29107       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
29108     fi
29109   done
29110   if test -z "$ac_sed_cmds"; then
29111     ac_sed_cmds=cat
29112   fi
29113 fi # test -n "$CONFIG_FILES"
29114
29115 EOF
29116 cat >>"$CONFIG_STATUS" <<\EOF
29117 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
29118   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29119   case "$ac_file" in
29120   - | *:- | *:-:* ) # input from stdin
29121         cat >$tmp/stdin
29122         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29123         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29124   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29125         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29126   * )   ac_file_in=$ac_file.in ;;
29127   esac
29128
29129   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
29130   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29131          X"$ac_file" : 'X\(//\)[^/]' \| \
29132          X"$ac_file" : 'X\(//\)$' \| \
29133          X"$ac_file" : 'X\(/\)' \| \
29134          .     : '\(.\)' 2>/dev/null ||
29135 echo X"$ac_file" |
29136     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29137           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29138           /^X\(\/\/\)$/{ s//\1/; q; }
29139           /^X\(\/\).*/{ s//\1/; q; }
29140           s/.*/./; q'`
29141   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29142     { case "$ac_dir" in
29143   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29144   *)                      as_incr_dir=.;;
29145 esac
29146 as_dummy="$ac_dir"
29147 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29148   case $as_mkdir_dir in
29149     # Skip DOS drivespec
29150     ?:) as_incr_dir=$as_mkdir_dir ;;
29151     *)
29152       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29153       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29154     ;;
29155   esac
29156 done; }
29157
29158     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
29159     # A "../" for each directory in $ac_dir_suffix.
29160     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
29161   else
29162     ac_dir_suffix= ac_dots=
29163   fi
29164
29165   case "$srcdir" in
29166   .)  ac_srcdir=.
29167       if test -z "$ac_dots"; then
29168          ac_top_srcdir=.
29169       else
29170          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
29171       fi ;;
29172   [\\/]* | ?:[\\/]* )
29173       ac_srcdir="$srcdir$ac_dir_suffix";
29174       ac_top_srcdir="$srcdir" ;;
29175   *) # Relative path.
29176     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
29177     ac_top_srcdir="$ac_dots$srcdir" ;;
29178   esac
29179
29180   case $INSTALL in
29181   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
29182   *) ac_INSTALL=$ac_dots$INSTALL ;;
29183   esac
29184
29185   if test x"$ac_file" != x-; then
29186     { echo "$as_me:29186: creating $ac_file" >&5
29187 echo "$as_me: creating $ac_file" >&6;}
29188     rm -f "$ac_file"
29189   fi
29190   # Let's still pretend it is `configure' which instantiates (i.e., don't
29191   # use $as_me), people would be surprised to read:
29192   #    /* config.h.  Generated automatically by config.status.  */
29193   configure_input="Generated automatically from `echo $ac_file_in |
29194                                                  sed 's,.*/,,'` by configure."
29195
29196   # First look for the input files in the build tree, otherwise in the
29197   # src tree.
29198   ac_file_inputs=`IFS=:
29199     for f in $ac_file_in; do
29200       case $f in
29201       -) echo $tmp/stdin ;;
29202       [\\/$]*)
29203          # Absolute (can't be DOS-style, as IFS=:)
29204          test -f "$f" || { { echo "$as_me:29204: error: cannot find input file: $f" >&5
29205 echo "$as_me: error: cannot find input file: $f" >&2;}
29206    { (exit 1); exit 1; }; }
29207          echo $f;;
29208       *) # Relative
29209          if test -f "$f"; then
29210            # Build tree
29211            echo $f
29212          elif test -f "$srcdir/$f"; then
29213            # Source tree
29214            echo "$srcdir/$f"
29215          else
29216            # /dev/null tree
29217            { { echo "$as_me:29217: error: cannot find input file: $f" >&5
29218 echo "$as_me: error: cannot find input file: $f" >&2;}
29219    { (exit 1); exit 1; }; }
29220          fi;;
29221       esac
29222     done` || { (exit 1); exit 1; }
29223 EOF
29224 cat >>"$CONFIG_STATUS" <<\EOF
29225   ac_warn_datarootdir=no
29226   if test x"$ac_file" != x-; then
29227     for ac_item in $ac_file_inputs
29228     do
29229       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
29230       if test -n "$ac_seen"; then
29231         ac_used=`grep '@datarootdir@' "$ac_item"`
29232         if test -z "$ac_used"; then
29233           { echo "$as_me:29233: WARNING: datarootdir was used implicitly but not set:
29234 $ac_seen" >&5
29235 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
29236 $ac_seen" >&2;}
29237           ac_warn_datarootdir=yes
29238         fi
29239       fi
29240       ac_seen=`grep '${datarootdir}' "$ac_item"`
29241       if test -n "$ac_seen"; then
29242         { echo "$as_me:29242: WARNING: datarootdir was used explicitly but not set:
29243 $ac_seen" >&5
29244 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
29245 $ac_seen" >&2;}
29246         ac_warn_datarootdir=yes
29247       fi
29248     done
29249   fi
29250
29251 if test "x$ac_warn_datarootdir" = xyes; then
29252   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
29253 fi
29254
29255 EOF
29256 cat >>"$CONFIG_STATUS" <<EOF
29257   sed "$ac_vpsub
29258 $extrasub
29259 EOF
29260 cat >>"$CONFIG_STATUS" <<\EOF
29261 :t
29262 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
29263 s,@configure_input@,$configure_input,;t t
29264 s,@srcdir@,$ac_srcdir,;t t
29265 s,@top_srcdir@,$ac_top_srcdir,;t t
29266 s,@INSTALL@,$ac_INSTALL,;t t
29267 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
29268   rm -f $tmp/stdin
29269   if test x"$ac_file" != x-; then
29270     cp "$tmp/out" "$ac_file"
29271
29272     for ac_name in prefix exec_prefix datarootdir
29273     do
29274         ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
29275         if test -n "$ac_seen"; then
29276             ac_init=`${EGREP-egrep} '[  ]*'$ac_name'[   ]*=' "$ac_file"`
29277             if test -z "$ac_init"; then
29278               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
29279               { echo "$as_me:29279: WARNING: Variable $ac_name is used but was not set:
29280 $ac_seen" >&5
29281 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
29282 $ac_seen" >&2;}
29283             fi
29284         fi
29285     done
29286     ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
29287     ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
29288     if test -s $tmp/out; then
29289       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
29290       { echo "$as_me:29290: WARNING: Some variables may not be substituted:
29291 $ac_seen" >&5
29292 echo "$as_me: WARNING: Some variables may not be substituted:
29293 $ac_seen" >&2;}
29294     fi
29295   else
29296     cat $tmp/out
29297   fi
29298   rm -f $tmp/out
29299
29300 done
29301 EOF
29302 cat >>"$CONFIG_STATUS" <<\EOF
29303
29304 #
29305 # CONFIG_HEADER section.
29306 #
29307
29308 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
29309 # NAME is the cpp macro being defined and VALUE is the value it is being given.
29310 #
29311 # ac_d sets the value in "#define NAME VALUE" lines.
29312 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
29313 ac_dB='[        ].*$,\1#\2'
29314 ac_dC=' '
29315 ac_dD=',;t'
29316 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
29317 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29318 ac_iB='\([      ]\),\1#\2define\3'
29319 ac_iC=' '
29320 ac_iD='\4,;t'
29321 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
29322 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29323 ac_uB='$,\1#\2define\3'
29324 ac_uC=' '
29325 ac_uD=',;t'
29326
29327 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
29328   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29329   case "$ac_file" in
29330   - | *:- | *:-:* ) # input from stdin
29331         cat >$tmp/stdin
29332         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29333         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29334   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29335         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29336   * )   ac_file_in=$ac_file.in ;;
29337   esac
29338
29339   test x"$ac_file" != x- && { echo "$as_me:29339: creating $ac_file" >&5
29340 echo "$as_me: creating $ac_file" >&6;}
29341
29342   # First look for the input files in the build tree, otherwise in the
29343   # src tree.
29344   ac_file_inputs=`IFS=:
29345     for f in $ac_file_in; do
29346       case $f in
29347       -) echo $tmp/stdin ;;
29348       [\\/$]*)
29349          # Absolute (can't be DOS-style, as IFS=:)
29350          test -f "$f" || { { echo "$as_me:29350: error: cannot find input file: $f" >&5
29351 echo "$as_me: error: cannot find input file: $f" >&2;}
29352    { (exit 1); exit 1; }; }
29353          echo $f;;
29354       *) # Relative
29355          if test -f "$f"; then
29356            # Build tree
29357            echo $f
29358          elif test -f "$srcdir/$f"; then
29359            # Source tree
29360            echo "$srcdir/$f"
29361          else
29362            # /dev/null tree
29363            { { echo "$as_me:29363: error: cannot find input file: $f" >&5
29364 echo "$as_me: error: cannot find input file: $f" >&2;}
29365    { (exit 1); exit 1; }; }
29366          fi;;
29367       esac
29368     done` || { (exit 1); exit 1; }
29369   # Remove the trailing spaces.
29370   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
29371
29372 EOF
29373
29374 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
29375 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
29376 # be either 'cat' or 'sort'.
29377 cat confdefs.h | uniq >conftest.vals
29378
29379 # Break up conftest.vals because some shells have a limit on
29380 # the size of here documents, and old seds have small limits too.
29381
29382 rm -f conftest.tail
29383 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
29384 while grep . conftest.vals >/dev/null
29385 do
29386   # Write chunks of a limited-size here document to conftest.frag.
29387   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
29388   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
29389   echo 'CEOF' >> "$CONFIG_STATUS"
29390   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
29391   rm -f conftest.vals
29392   mv conftest.tail conftest.vals
29393 done
29394 rm -f conftest.vals
29395
29396 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
29397 # marker @DEFS@.
29398 echo '  cat >> conftest.edit <<CEOF
29399 /@DEFS@/r conftest.frag
29400 /@DEFS@/d
29401 CEOF
29402 sed -f conftest.edit $tmp/in > $tmp/out
29403 rm -f $tmp/in
29404 mv $tmp/out $tmp/in
29405 rm -f conftest.edit conftest.frag
29406 ' >> "$CONFIG_STATUS"
29407
29408 cat >>"$CONFIG_STATUS" <<\EOF
29409   # Let's still pretend it is `configure' which instantiates (i.e., don't
29410   # use $as_me), people would be surprised to read:
29411   #    /* config.h.  Generated automatically by config.status.  */
29412   if test x"$ac_file" = x-; then
29413     echo "/* Generated automatically by configure.  */" >$tmp/config.h
29414   else
29415     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
29416   fi
29417   cat $tmp/in >>$tmp/config.h
29418   rm -f $tmp/in
29419   if test x"$ac_file" != x-; then
29420     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
29421       { echo "$as_me:29421: $ac_file is unchanged" >&5
29422 echo "$as_me: $ac_file is unchanged" >&6;}
29423     else
29424       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29425          X"$ac_file" : 'X\(//\)[^/]' \| \
29426          X"$ac_file" : 'X\(//\)$' \| \
29427          X"$ac_file" : 'X\(/\)' \| \
29428          .     : '\(.\)' 2>/dev/null ||
29429 echo X"$ac_file" |
29430     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29431           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29432           /^X\(\/\/\)$/{ s//\1/; q; }
29433           /^X\(\/\).*/{ s//\1/; q; }
29434           s/.*/./; q'`
29435       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29436         { case "$ac_dir" in
29437   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29438   *)                      as_incr_dir=.;;
29439 esac
29440 as_dummy="$ac_dir"
29441 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29442   case $as_mkdir_dir in
29443     # Skip DOS drivespec
29444     ?:) as_incr_dir=$as_mkdir_dir ;;
29445     *)
29446       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29447       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29448     ;;
29449   esac
29450 done; }
29451
29452       fi
29453       rm -f "$ac_file"
29454       mv "$tmp/config.h" "$ac_file"
29455     fi
29456   else
29457     cat $tmp/config.h
29458     rm -f $tmp/config.h
29459   fi
29460 done
29461 EOF
29462 cat >>"$CONFIG_STATUS" <<\EOF
29463 #
29464 # CONFIG_COMMANDS section.
29465 #
29466 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
29467   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
29468   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
29469
29470   case "$ac_dest" in
29471     default )
29472 if test "x$cf_with_tests" != xno ; then
29473
29474 for cf_dir in test
29475 do
29476         if test ! -d "$srcdir/$cf_dir" ; then
29477                 continue
29478         elif test -f "$srcdir/$cf_dir/programs" ; then
29479                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
29480         fi
29481 done
29482
29483 fi
29484
29485 cf_prefix=$LIB_PREFIX
29486
29487 case "$cf_cv_shlib_version" in
29488 (cygdll|msysdll|mingw|msvcdll)
29489         TINFO_NAME=$TINFO_ARG_SUFFIX
29490         TINFO_SUFFIX=.dll
29491         ;;
29492 esac
29493
29494 if test -n "$TINFO_SUFFIX" ; then
29495         case "$TINFO_SUFFIX" in
29496         (tw*)
29497                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
29498                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
29499                 ;;
29500         (t*)
29501                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
29502                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
29503                 ;;
29504         (w*)
29505                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
29506                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
29507                 ;;
29508         esac
29509 fi
29510
29511 for cf_dir in $SRC_SUBDIRS
29512 do
29513         if test ! -d "$srcdir/$cf_dir" ; then
29514                 continue
29515         elif test -f "$srcdir/$cf_dir/modules" ; then
29516
29517                 SHARED_LIB=
29518                 Libs_To_Make=
29519                 cf_awk_program=
29520                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
29521                 then
29522                         cf_awk_program="$cf_awk_program\
29523 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
29524 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
29525 "
29526                 fi
29527
29528                 if test "x$WILDCARD_SYMS" = xno
29529                 then
29530                         cf_awk_program="$cf_awk_program\
29531 /[      ]_\\*;/ { skip=1; next; }\
29532 "
29533                 fi
29534
29535                 if test "x$cf_awk_program" != "x"
29536                 then
29537                         cat >>$cf_dir/Makefile <<CF_EOF
29538
29539 # Generated by CF_LIB_RULES
29540 resulting.map: $UNALTERED_SYMS
29541         $AWK 'BEGIN { skip = 1; last=""; } \
29542 $cf_awk_program \
29543 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
29544  skip = 0; last = \$\$0; } \
29545 END { print last; }' < "$UNALTERED_SYMS" >\$@
29546
29547 distclean::
29548         rm -f resulting.map
29549 CF_EOF
29550                 fi
29551
29552                 for cf_item in $cf_LIST_MODELS
29553                 do
29554
29555         case X$cf_item in
29556         (Xlibtool)
29557                 cf_suffix='.la'
29558                 cf_depsuf=$cf_suffix
29559                 ;;
29560         (Xdebug)
29561                 case "$cf_cv_system_name" in
29562                 (*-msvc*)
29563                         cf_suffix='_g.lib'
29564                         ;;
29565                 (*)
29566                         cf_suffix='_g.a'
29567                         ;;
29568                 esac
29569                 cf_depsuf=$cf_suffix
29570                 ;;
29571         (Xprofile)
29572                 case "$cf_cv_system_name" in
29573                 (*-msvc*)
29574                         cf_suffix='_p.lib'
29575                         ;;
29576                 (*)
29577                         cf_suffix='_p.a'
29578                         ;;
29579                 esac
29580                 cf_depsuf=$cf_suffix
29581                 ;;
29582         (Xshared)
29583                 case "$cf_cv_system_name" in
29584                 (aix[5-7]*)
29585                         cf_suffix='.so'
29586                         cf_depsuf=$cf_suffix
29587                         ;;
29588                 (*-msvc*)
29589                         cf_suffix='.dll'
29590                         cf_depsuf='.dll.lib'
29591                         ;;
29592                 (cygwin*|msys*|mingw*)
29593                         cf_suffix='.dll'
29594                         cf_depsuf='.dll.a'
29595                         ;;
29596                 (darwin*)
29597                         cf_suffix='.dylib'
29598                         cf_depsuf=$cf_suffix
29599                         ;;
29600                 (hpux*)
29601                         case "$target" in
29602                         (ia64*)
29603                                 cf_suffix='.so'
29604                                 cf_depsuf=$cf_suffix
29605                                 ;;
29606                         (*)
29607                                 cf_suffix='.sl'
29608                                 cf_depsuf=$cf_suffix
29609                                 ;;
29610                         esac
29611                         ;;
29612                 (*)
29613                         cf_suffix='.so'
29614                         cf_depsuf=$cf_suffix
29615                         ;;
29616                 esac
29617                 ;;
29618         (*)
29619                 case "$target" in
29620                 (*-msvc*)
29621                         cf_suffix='.lib'
29622                         ;;
29623                 (*)
29624                         cf_suffix='.a'
29625                         ;;
29626                 esac
29627                 cf_depsuf=$cf_suffix
29628                 ;;
29629         esac
29630         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
29631         then
29632                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
29633                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
29634         fi
29635
29636                         if test "$cf_dir" = "c++"
29637                         then
29638
29639 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29640
29641 eval cf_libname="\$${cf_map_lib_basename}_NAME"
29642
29643                         else
29644
29645 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29646
29647 eval cf_libname="\$${cf_map_lib_basename}_NAME"
29648
29649                         fi
29650                         test -z "$cf_libname" && cf_libname="$cf_dir"
29651                         if test "$cf_item" = shared ; then
29652                                 if test -n "${LIB_SUFFIX}"
29653                                 then
29654                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
29655                                 else
29656                                         cf_shared_suffix="$cf_suffix"
29657                                 fi
29658                                 if test "$cf_cv_do_symlinks" = yes ; then
29659                                         cf_version_name=
29660
29661                                         case "$cf_cv_shlib_version" in
29662                                         (rel)
29663                                                 cf_version_name=REL_VERSION
29664                                                 ;;
29665                                         (abi)
29666                                                 cf_version_name=ABI_VERSION
29667                                                 ;;
29668                                         esac
29669
29670                                         if test -n "$cf_version_name"
29671                                         then
29672                                                 case "$cf_cv_system_name" in
29673                                                 (darwin*)
29674                                                         # "w", etc?
29675                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
29676                                                         ;;
29677                                                 (*)
29678                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
29679                                                         ;;
29680                                                 esac
29681                                         fi
29682                                         if test -n "${USE_LIB_SUFFIX}"
29683                                         then
29684                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
29685                                         else
29686                                                 cf_shared_suffix="$cf_suffix"
29687                                         fi
29688                                 fi
29689                                 # cygwin needs import library, and has unique naming convention
29690                                 # use autodetected ${cf_prefix} for import lib and static lib, but
29691                                 # use 'cyg' prefix for shared lib.
29692                                 case "$cf_cv_shlib_version" in
29693                                 (cygdll)
29694                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29695                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
29696                                         ;;
29697                                 (msysdll)
29698                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29699                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
29700                                         ;;
29701                                 (mingw)
29702                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29703                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
29704                                         ;;
29705                                 (msvcdll)
29706                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29707                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
29708                                         ;;
29709                                 (*)
29710                                         cf_add_lib=
29711                                         ;;
29712                                 esac
29713                                 if test -n "$cf_add_lib"
29714                                 then
29715                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
29716                                         continue
29717                                 fi
29718                         fi
29719                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
29720                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
29721                 done
29722
29723                 if test "$cf_dir" = ncurses ; then
29724                         cf_subsets="$LIB_SUBSETS"
29725                         cf_r_parts="$cf_subsets"
29726                         cf_liblist="$Libs_To_Make"
29727
29728                         while test -n "$cf_r_parts"
29729                         do
29730                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
29731                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
29732                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
29733                                         cf_add_lib=
29734                                         case "$cf_l_parts" in
29735                                         (*termlib*)
29736                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
29737                                                 ;;
29738                                         (*ticlib*)
29739                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
29740                                                 ;;
29741                                         (*)
29742                                                 break
29743                                                 ;;
29744                                         esac
29745                                         if test -n "$cf_add_lib"; then
29746                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
29747                                         fi
29748                                 else
29749                                         break
29750                                 fi
29751                         done
29752                 else
29753                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
29754                 fi
29755
29756                 if test "$cf_dir" = c++; then
29757                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
29758                                 cf_list=
29759                                 for cf_item in $Libs_To_Make
29760                                 do
29761                                         case "$cf_item" in
29762                                         (*.a)
29763                                                 ;;
29764                                         (*)
29765                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
29766                                                 ;;
29767                                         esac
29768                                         for cf_test in $cf_list
29769                                         do
29770                                                 if test "$cf_test" = "$cf_item"
29771                                                 then
29772                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
29773                                                         cf_item=
29774                                                         break
29775                                                 fi
29776                                         done
29777                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
29778                                 done
29779                                 Libs_To_Make="$cf_list"
29780                         fi
29781                 fi
29782
29783                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
29784                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
29785                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
29786                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
29787
29788                 $AWK -f "$srcdir/mk-0th.awk" \
29789                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
29790                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
29791
29792                 for cf_subset in $cf_subsets
29793                 do
29794                         cf_subdirs=
29795                         for cf_item in $cf_LIST_MODELS
29796                         do
29797
29798                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
29799
29800 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29801
29802                         CXX_MODEL=$cf_ITEM
29803                         if test "$CXX_MODEL" = SHARED; then
29804                                 case "$cf_cv_shlib_version" in
29805                                 (cygdll|msysdll|mingw|msvcdll)
29806                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
29807
29808 echo "${as_me:-configure}:29808: testing overriding CXX_MODEL to SHARED ..." 1>&5
29809
29810                                         with_shared_cxx=yes
29811                                         ;;
29812                                 (*)
29813                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
29814                                         ;;
29815                                 esac
29816                         fi
29817
29818         case X$cf_item in
29819         (Xlibtool)
29820                 cf_suffix='.la'
29821                 cf_depsuf=$cf_suffix
29822                 ;;
29823         (Xdebug)
29824                 case "$cf_cv_system_name" in
29825                 (*-msvc*)
29826                         cf_suffix='_g.lib'
29827                         ;;
29828                 (*)
29829                         cf_suffix='_g.a'
29830                         ;;
29831                 esac
29832                 cf_depsuf=$cf_suffix
29833                 ;;
29834         (Xprofile)
29835                 case "$cf_cv_system_name" in
29836                 (*-msvc*)
29837                         cf_suffix='_p.lib'
29838                         ;;
29839                 (*)
29840                         cf_suffix='_p.a'
29841                         ;;
29842                 esac
29843                 cf_depsuf=$cf_suffix
29844                 ;;
29845         (Xshared)
29846                 case "$cf_cv_system_name" in
29847                 (aix[5-7]*)
29848                         cf_suffix='.so'
29849                         cf_depsuf=$cf_suffix
29850                         ;;
29851                 (*-msvc*)
29852                         cf_suffix='.dll'
29853                         cf_depsuf='.dll.lib'
29854                         ;;
29855                 (cygwin*|msys*|mingw*)
29856                         cf_suffix='.dll'
29857                         cf_depsuf='.dll.a'
29858                         ;;
29859                 (darwin*)
29860                         cf_suffix='.dylib'
29861                         cf_depsuf=$cf_suffix
29862                         ;;
29863                 (hpux*)
29864                         case "$target" in
29865                         (ia64*)
29866                                 cf_suffix='.so'
29867                                 cf_depsuf=$cf_suffix
29868                                 ;;
29869                         (*)
29870                                 cf_suffix='.sl'
29871                                 cf_depsuf=$cf_suffix
29872                                 ;;
29873                         esac
29874                         ;;
29875                 (*)
29876                         cf_suffix='.so'
29877                         cf_depsuf=$cf_suffix
29878                         ;;
29879                 esac
29880                 ;;
29881         (*)
29882                 case "$target" in
29883                 (*-msvc*)
29884                         cf_suffix='.lib'
29885                         ;;
29886                 (*)
29887                         cf_suffix='.a'
29888                         ;;
29889                 esac
29890                 cf_depsuf=$cf_suffix
29891                 ;;
29892         esac
29893         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
29894         then
29895                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
29896                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
29897         fi
29898
29899         case $cf_item in
29900         (libtool) cf_subdir='obj_lo'  ;;
29901         (normal)  cf_subdir='objects' ;;
29902         (debug)   cf_subdir='obj_g' ;;
29903         (profile) cf_subdir='obj_p' ;;
29904         (shared)
29905                 case "$cf_cv_system_name" in
29906                 (cygwin|msys)
29907                         cf_subdir='objects' ;;
29908                 (*)
29909                         cf_subdir='obj_s' ;;
29910                 esac
29911         esac
29912
29913                         # Test for case where we build libtinfo with a different name.
29914                         cf_libname=$cf_dir
29915                         if test "$cf_dir" = ncurses ; then
29916                                 case "$cf_subset" in
29917                                 (*base*)
29918                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
29919                                         ;;
29920                                 (*termlib*)
29921                                         cf_libname=$TINFO_LIB_SUFFIX
29922                                         ;;
29923                                 (ticlib*)
29924                                         cf_libname=$TICS_LIB_SUFFIX
29925                                         ;;
29926                                 esac
29927                         elif test "$cf_dir" = c++ ; then
29928
29929 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29930
29931 eval cf_libname="\$${cf_map_lib_basename}_NAME"
29932
29933                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
29934                         else
29935
29936 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29937
29938 eval cf_libname="\$${cf_map_lib_basename}_NAME"
29939
29940                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
29941                         fi
29942                         if test -n "${USE_ARG_SUFFIX}" ; then
29943                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
29944                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
29945                         fi
29946
29947                         # These dependencies really are for development, not
29948                         # builds, but they are useful in porting, too.
29949                         cf_depend="../include/ncurses_cfg.h"
29950                         if test "$srcdir" = "."; then
29951                                 cf_reldir="."
29952                         else
29953                                 cf_reldir="\${srcdir}"
29954                         fi
29955
29956                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
29957                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
29958                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
29959                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
29960                         fi
29961
29962                         cf_dir_suffix=
29963                         old_cf_suffix="$cf_suffix"
29964                         if test "$cf_cv_shlib_version_infix" = yes ; then
29965                         if test -n "$USE_LIB_SUFFIX" ; then
29966                                 case "$USE_LIB_SUFFIX" in
29967                                 (tw*)
29968                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
29969                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
29970                                         cf_dir_suffix=tw$EXTRA_SUFFIX
29971                                         ;;
29972                                 (t*)
29973                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
29974                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
29975                                         cf_dir_suffix=t$EXTRA_SUFFIX
29976                                         ;;
29977                                 (w*)
29978                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
29979                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
29980                                         cf_dir_suffix=w$EXTRA_SUFFIX
29981                                         ;;
29982                                 (*)
29983                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
29984                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
29985                                         cf_dir_suffix=$EXTRA_SUFFIX
29986                                         ;;
29987                                 esac
29988                         fi
29989                         fi
29990
29991                         $AWK -f "$srcdir/mk-1st.awk" \
29992                                 name=${cf_libname}${cf_dir_suffix} \
29993                                 traces=$LIB_TRACING \
29994                                 MODEL=$cf_ITEM \
29995                                 CXX_MODEL=$CXX_MODEL \
29996                                 model=$cf_subdir \
29997                                 prefix=$cf_prefix \
29998                                 suffix=$cf_suffix \
29999                                 subset=$cf_subset \
30000                                 driver=$cf_cv_term_driver \
30001                                 SymLink="$LN_S" \
30002                                 TermlibRoot=$TINFO_NAME \
30003                                 TermlibSuffix=$TINFO_SUFFIX \
30004                                 ShlibVer=$cf_cv_shlib_version \
30005                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
30006                                 ReLink=${cf_cv_do_relink:-no} \
30007                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
30008                                 DoLinks=$cf_cv_do_symlinks \
30009                                 rmSoLocs=$cf_cv_rm_so_locs \
30010                                 ldconfig="$LDCONFIG" \
30011                                 overwrite=$WITH_OVERWRITE \
30012                                 depend="$cf_depend" \
30013                                 host="$host" \
30014                                 libtool_version="$LIBTOOL_VERSION" \
30015                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30016
30017                         cf_suffix="$old_cf_suffix"
30018
30019                         for cf_subdir2 in $cf_subdirs lib
30020                         do
30021                                 test "$cf_subdir" = "$cf_subdir2" && break
30022                         done
30023                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
30024                         $AWK -f "$srcdir/mk-2nd.awk" \
30025                                 name=$cf_dir \
30026                                 traces=$LIB_TRACING \
30027                                 MODEL=$cf_ITEM \
30028                                 model=$cf_subdir \
30029                                 subset=$cf_subset \
30030                                 srcdir=$srcdir \
30031                                 echo=$WITH_ECHO \
30032                                 crenames=$cf_cv_prog_CC_c_o \
30033                                 cxxrenames=$cf_cv_prog_CXX_c_o \
30034                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30035                         cf_subdirs="$cf_subdirs $cf_subdir"
30036                         done
30037                 done
30038         fi
30039
30040         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
30041 done
30042
30043 for cf_dir in $SRC_SUBDIRS
30044 do
30045         if test ! -d "$srcdir/$cf_dir" ; then
30046                 continue
30047         fi
30048
30049         if test -f "$cf_dir/Makefile" ; then
30050                 case "$cf_dir" in
30051                 (Ada95)
30052                         echo 'libs \' >> Makefile
30053                         echo 'install.libs \' >> Makefile
30054                         echo 'uninstall.libs ::' >> Makefile
30055                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
30056                         ;;
30057                 esac
30058         fi
30059
30060         if test -f "$srcdir/$cf_dir/modules" ; then
30061                 echo >> Makefile
30062                 if test -f "$srcdir/$cf_dir/headers" ; then
30063 cat >> Makefile <<CF_EOF
30064 install.includes \\
30065 uninstall.includes \\
30066 CF_EOF
30067                 fi
30068
30069 echo 'lint \' >> Makefile
30070
30071 cat >> Makefile <<CF_EOF
30072 libs \\
30073 lintlib \\
30074 install.libs \\
30075 uninstall.libs \\
30076 install.$cf_dir \\
30077 uninstall.$cf_dir ::
30078         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30079 CF_EOF
30080         elif test -f "$srcdir/$cf_dir/headers" ; then
30081 cat >> Makefile <<CF_EOF
30082
30083 libs \\
30084 install.libs \\
30085 uninstall.libs \\
30086 install.includes \\
30087 uninstall.includes ::
30088         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30089 CF_EOF
30090 fi
30091 done
30092
30093 if test "x$cf_with_db_install" = xyes; then
30094 cat >> Makefile <<CF_EOF
30095
30096 install.libs uninstall.libs \\
30097 install.data uninstall.data ::
30098 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30099 CF_EOF
30100 else
30101 cat >> Makefile <<CF_EOF
30102
30103 install.libs uninstall.libs ::
30104         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30105 CF_EOF
30106 fi
30107
30108 if test "x$cf_with_manpages" = xyes; then
30109 cat >> Makefile <<CF_EOF
30110
30111 install.man \\
30112 uninstall.man ::
30113         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
30114 CF_EOF
30115 fi
30116
30117 cat >> Makefile <<CF_EOF
30118
30119 distclean ::
30120         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
30121         rm -f headers.sh headers.sed mk_shared_lib.sh
30122         rm -f edit_man.* man_alias.*
30123         rm -rf \${DIRS_TO_MAKE}
30124 CF_EOF
30125
30126 # Special case: tack's manpage lives in its own directory.
30127 if test "x$cf_with_manpages" = xyes; then
30128 if test "x$cf_with_tack" = "xyes"; then
30129 cat >> Makefile <<CF_EOF
30130
30131 install.man \\
30132 uninstall.man ::
30133         ( cd tack && \${MAKE} \${TOP_MFLAGS} \$@ )
30134 CF_EOF
30135 fi
30136 fi
30137
30138 rm -f headers.sed headers.sh
30139
30140 echo creating headers.sh
30141 cat >headers.sh <<CF_EOF
30142 #! $SHELL
30143 # This shell script is generated by the 'configure' script.  It is invoked in a
30144 # subdirectory of the build tree.  It generates a sed-script in the parent
30145 # directory that is used to adjust includes for header files that reside in a
30146 # subdirectory of /usr/include, etc.
30147 PRG=""
30148 while test \$# != 3
30149 do
30150 PRG="\$PRG \$1"; shift
30151 done
30152 DST=\$1
30153 REF=\$2
30154 SRC=\$3
30155 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
30156 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
30157 echo installing \$SRC in \$DST
30158 CF_EOF
30159
30160 if test "$WITH_CURSES_H" = yes; then
30161         cat >>headers.sh <<CF_EOF
30162 case \$DST in
30163 (/*/include/*)
30164         END=\`basename \$DST\`
30165         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30166         do
30167                 NAME=\`basename \$i\`
30168                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30169         done
30170         ;;
30171 (*)
30172         echo "" >> \$TMPSED
30173         ;;
30174 esac
30175 CF_EOF
30176
30177 else
30178         cat >>headers.sh <<CF_EOF
30179 case \$DST in
30180 (/*/include/*)
30181         END=\`basename \$DST\`
30182         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30183         do
30184                 NAME=\`basename \$i\`
30185                 if test "\$NAME" = "curses.h"
30186                 then
30187                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30188                         NAME=ncurses.h
30189                 fi
30190                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30191         done
30192         ;;
30193 (*)
30194         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30195         ;;
30196 esac
30197 CF_EOF
30198 fi
30199 cat >>headers.sh <<CF_EOF
30200 rm -f \$TMPSRC
30201 sed -f \$TMPSED \$SRC > \$TMPSRC
30202 NAME=\`basename \$SRC\`
30203 CF_EOF
30204 if test "$WITH_CURSES_H" != yes; then
30205         cat >>headers.sh <<CF_EOF
30206 test "\$NAME" = "curses.h" && NAME=ncurses.h
30207 CF_EOF
30208 fi
30209 cat >>headers.sh <<CF_EOF
30210 # Just in case someone gzip'd manpages, remove the conflicting copy.
30211 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
30212
30213 eval \$PRG \$TMPSRC \$DST/\$NAME
30214 rm -f \$TMPSRC \$TMPSED
30215 CF_EOF
30216
30217 chmod 0755 headers.sh
30218
30219 for cf_dir in $SRC_SUBDIRS
30220 do
30221         if test ! -d "$srcdir/$cf_dir" ; then
30222                 continue
30223         fi
30224
30225         if test -f "$srcdir/$cf_dir/headers" ; then
30226                 $AWK -f "$srcdir/mk-hdr.awk" \
30227                         subset="$LIB_SUBSETS" \
30228                         compat="$WITH_CURSES_H" \
30229                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
30230         fi
30231
30232         if test -f "$srcdir/$cf_dir/modules" ; then
30233                 if test "$cf_dir" != "c++" ; then
30234                         cat >>$cf_dir/Makefile <<"CF_EOF"
30235 depend : ${AUTO_SRC}
30236         makedepend -- ${CPPFLAGS} -- ${C_SRC}
30237
30238 # DO NOT DELETE THIS LINE -- make depend depends on it.
30239 CF_EOF
30240                 fi
30241         fi
30242 done
30243
30244 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
30245 if test -z "$USE_OLD_MAKERULES" ; then
30246         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
30247 fi
30248 fi
30249  ;;
30250   esac
30251 done
30252 EOF
30253
30254 cat >>"$CONFIG_STATUS" <<\EOF
30255
30256 { (exit 0); exit 0; }
30257 EOF
30258 chmod +x "$CONFIG_STATUS"
30259 ac_clean_files=$ac_clean_files_save
30260
30261 # configure is writing to config.log, and then calls config.status.
30262 # config.status does its own redirection, appending to config.log.
30263 # Unfortunately, on DOS this fails, as config.log is still kept open
30264 # by configure, so config.status won't be able to write to it; its
30265 # output is simply discarded.  So we exec the FD to /dev/null,
30266 # effectively closing config.log, so it can be properly (re)opened and
30267 # appended to by config.status.  When coming back to configure, we
30268 # need to make the FD available again.
30269 if test "$no_create" != yes; then
30270   ac_cs_success=:
30271   exec 5>/dev/null
30272   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
30273   exec 5>>config.log
30274   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30275   # would make configure fail if this is the last instruction.
30276   "$ac_cs_success" || { (exit 1); exit 1; }
30277 fi
30278 ${MAKE:-make} preinstall