]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
e8d96edbc242909829ba4c240773b0f115e33d9e
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.730 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20210509.
5 #
6 # Copyright 2003-2020,2021      Thomas E. Dickey
7 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
8 # Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11
12 # Avoid depending upon Character Ranges.
13 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16 as_cr_digits='0123456789'
17 as_cr_alnum=$as_cr_Letters$as_cr_digits
18
19 # Sed expression to map a string onto a valid variable name.
20 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
21
22 # Sed expression to map a string onto a valid CPP name.
23 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
24
25 # Be Bourne compatible
26 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27   emulate sh
28   NULLCMD=:
29 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
30   set -o posix
31 fi
32
33 # Name of the executable.
34 as_me=`echo "$0" |sed 's,.*[\\/],,'`
35
36 if expr a : '\(a\)' >/dev/null 2>&1; then
37   as_expr=expr
38 else
39   as_expr=false
40 fi
41
42 rm -f conf$$ conf$$.exe conf$$.file
43 echo >conf$$.file
44 if ln -s conf$$.file conf$$ 2>/dev/null; then
45   # We could just check for DJGPP; but this test a) works b) is more generic
46   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
47   if test -f conf$$.exe; then
48     # Don't use ln at all; we don't have any links
49     as_ln_s='cp -p'
50   else
51     as_ln_s='ln -s'
52   fi
53 elif ln conf$$.file conf$$ 2>/dev/null; then
54   as_ln_s=ln
55 else
56   as_ln_s='cp -p'
57 fi
58 rm -f conf$$ conf$$.exe conf$$.file
59
60 as_executable_p="test -f"
61
62 # Support unset when possible.
63 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
64   as_unset="unset"
65 else
66   as_unset="false"
67 fi
68
69 # NLS nuisances.
70 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
71 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
72 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
73 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
74 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
75 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
76 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
77 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
78
79 # IFS
80 # We need space, tab and new line, in precisely that order.
81 as_nl='
82 '
83 IFS="   $as_nl"
84
85 # CDPATH.
86 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
87
88 # Name of the host.
89 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
90 # so uname gets run too.
91 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
92
93 exec 6>&1
94
95 #
96 # Initializations.
97 #
98 ac_default_prefix=/usr/local
99 cross_compiling=no
100 subdirs=
101 MFLAGS=
102 MAKEFLAGS=
103 SHELL=${CONFIG_SHELL-/bin/sh}
104
105 # Maximum number of lines to put in a shell here document.
106 # This variable seems obsolete.  It should probably be removed, and
107 # only ac_max_sed_lines should be used.
108 : "${ac_max_here_lines=38}"
109
110 ac_unique_file="ncurses/base/lib_initscr.c"
111 # Factoring default headers for most tests.
112 ac_includes_default="\
113 #include <stdio.h>
114 #if HAVE_SYS_TYPES_H
115 # include <sys/types.h>
116 #endif
117 #if HAVE_SYS_STAT_H
118 # include <sys/stat.h>
119 #endif
120 #if STDC_HEADERS
121 # include <stdlib.h>
122 # include <stddef.h>
123 #else
124 # if HAVE_STDLIB_H
125 #  include <stdlib.h>
126 # endif
127 #endif
128 #if HAVE_STRING_H
129 # if !STDC_HEADERS && HAVE_MEMORY_H
130 #  include <memory.h>
131 # endif
132 # include <string.h>
133 #endif
134 #if HAVE_STRINGS_H
135 # include <strings.h>
136 #endif
137 #if HAVE_INTTYPES_H
138 # include <inttypes.h>
139 #else
140 # if HAVE_STDINT_H
141 #  include <stdint.h>
142 # endif
143 #endif
144 #if HAVE_UNISTD_H
145 # include <unistd.h>
146 #endif"
147
148 # Initialize some variables set by options.
149 ac_init_help=
150 ac_init_version=false
151 # The variables have the same names as the options, with
152 # dashes changed to underlines.
153 cache_file=/dev/null
154 exec_prefix=NONE
155 no_create=
156 no_recursion=
157 prefix=NONE
158 program_prefix=NONE
159 program_suffix=NONE
160 program_transform_name=s,x,x,
161 silent=
162 site=
163 srcdir=
164 verbose=
165 x_includes=NONE
166 x_libraries=NONE
167
168 # Installation directory options.
169 # These are left unexpanded so users can "make install exec_prefix=/foo"
170 # and all the variables that are supposed to be based on exec_prefix
171 # by default will actually change.
172 # Use braces instead of parens because sh, perl, etc. also accept them.
173 bindir='${exec_prefix}/bin'
174 sbindir='${exec_prefix}/sbin'
175 libexecdir='${exec_prefix}/libexec'
176 datarootdir='${prefix}/share'
177 datadir='${datarootdir}'
178 sysconfdir='${prefix}/etc'
179 sharedstatedir='${prefix}/com'
180 localstatedir='${prefix}/var'
181 runstatedir='${localstatedir}/run'
182 libdir='${exec_prefix}/lib'
183 includedir='${prefix}/include'
184 oldincludedir='/usr/include'
185 infodir='${datarootdir}/info'
186 mandir='${datarootdir}/man'
187
188 # Identity of this package.
189 PACKAGE_NAME=
190 PACKAGE_TARNAME=
191 PACKAGE_VERSION=
192 PACKAGE_STRING=
193 PACKAGE_BUGREPORT=
194
195 ac_prev=
196 for ac_option
197 do
198   # If the previous option needs an argument, assign it.
199   if test -n "$ac_prev"; then
200     eval "$ac_prev=\$ac_option"
201     ac_prev=
202     continue
203   fi
204
205   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
206
207   # Accept the important Cygnus configure options, so we can diagnose typos.
208
209   case "$ac_option" in
210
211   -bindir | --bindir | --bindi | --bind | --bin | --bi)
212     ac_prev=bindir ;;
213   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
214     bindir=$ac_optarg ;;
215
216   -build | --build | --buil | --bui | --bu)
217     ac_prev=build_alias ;;
218   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
219     build_alias=$ac_optarg ;;
220
221   -cache-file | --cache-file | --cache-fil | --cache-fi \
222   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
223     ac_prev=cache_file ;;
224   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
225   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
226     cache_file=$ac_optarg ;;
227
228   --config-cache | -C)
229     cache_file=config.cache ;;
230
231   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
232     ac_prev=datadir ;;
233   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
234   | --da=*)
235     datadir=$ac_optarg ;;
236
237   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
238   | --dataroo | --dataro | --datar)
239     ac_prev=datarootdir ;;
240   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
241   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
242     datarootdir=$ac_optarg ;;
243
244   -disable-* | --disable-*)
245     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
246     # Reject names that are not valid shell variable names.
247     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
248       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
249    { (exit 1); exit 1; }; }
250     ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
251     eval "enable_$ac_feature=no" ;;
252
253   -enable-* | --enable-*)
254     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
255     # Reject names that are not valid shell variable names.
256     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
257       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
258    { (exit 1); exit 1; }; }
259     ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
260     case "$ac_option" in
261       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
262       *) ac_optarg=yes ;;
263     esac
264     eval "enable_$ac_feature='$ac_optarg'" ;;
265
266   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
267   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
268   | --exec | --exe | --ex)
269     ac_prev=exec_prefix ;;
270   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
271   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
272   | --exec=* | --exe=* | --ex=*)
273     exec_prefix=$ac_optarg ;;
274
275   -gas | --gas | --ga | --g)
276     # Obsolete; use --with-gas.
277     with_gas=yes ;;
278
279   -help | --help | --hel | --he | -h)
280     ac_init_help=long ;;
281   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
282     ac_init_help=recursive ;;
283   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
284     ac_init_help=short ;;
285
286   -host | --host | --hos | --ho)
287     ac_prev=host_alias ;;
288   -host=* | --host=* | --hos=* | --ho=*)
289     host_alias=$ac_optarg ;;
290
291   -includedir | --includedir | --includedi | --included | --include \
292   | --includ | --inclu | --incl | --inc)
293     ac_prev=includedir ;;
294   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
295   | --includ=* | --inclu=* | --incl=* | --inc=*)
296     includedir=$ac_optarg ;;
297
298   -infodir | --infodir | --infodi | --infod | --info | --inf)
299     ac_prev=infodir ;;
300   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
301     infodir=$ac_optarg ;;
302
303   -libdir | --libdir | --libdi | --libd)
304     ac_prev=libdir ;;
305   -libdir=* | --libdir=* | --libdi=* | --libd=*)
306     libdir=$ac_optarg ;;
307
308   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
309   | --libexe | --libex | --libe)
310     ac_prev=libexecdir ;;
311   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
312   | --libexe=* | --libex=* | --libe=*)
313     libexecdir=$ac_optarg ;;
314
315   -localstatedir | --localstatedir | --localstatedi | --localstated \
316   | --localstate | --localstat | --localsta | --localst \
317   | --locals | --local | --loca | --loc | --lo)
318     ac_prev=localstatedir ;;
319   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
320   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
321   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
322     localstatedir=$ac_optarg ;;
323
324   -runstatedir | --runstatedir | --runstatedi | --runstated \
325   | --runstate | --runstat | --runsta | --runst \
326   | --runs | --run | --ru)
327     ac_prev=runstatedir ;;
328   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
329   | --runstate=* | --runstat=* | --runsta=* | --runst=* \
330   | --runs=* | --run=* | --ru=*)
331     runstatedir=$ac_optarg ;;
332
333   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
334     ac_prev=mandir ;;
335   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
336     mandir=$ac_optarg ;;
337
338   -nfp | --nfp | --nf)
339     # Obsolete; use --without-fp.
340     with_fp=no ;;
341
342   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
343   | --no-cr | --no-c)
344     no_create=yes ;;
345
346   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
347   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
348     no_recursion=yes ;;
349
350   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
351   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
352   | --oldin | --oldi | --old | --ol | --o)
353     ac_prev=oldincludedir ;;
354   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
355   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
356   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
357     oldincludedir=$ac_optarg ;;
358
359   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
360     ac_prev=prefix ;;
361   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
362     prefix=$ac_optarg ;;
363
364   -program-prefix | --program-prefix | --program-prefi | --program-pref \
365   | --program-pre | --program-pr | --program-p)
366     ac_prev=program_prefix ;;
367   -program-prefix=* | --program-prefix=* | --program-prefi=* \
368   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
369     program_prefix=$ac_optarg ;;
370
371   -program-suffix | --program-suffix | --program-suffi | --program-suff \
372   | --program-suf | --program-su | --program-s)
373     ac_prev=program_suffix ;;
374   -program-suffix=* | --program-suffix=* | --program-suffi=* \
375   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
376     program_suffix=$ac_optarg ;;
377
378   -program-transform-name | --program-transform-name \
379   | --program-transform-nam | --program-transform-na \
380   | --program-transform-n | --program-transform- \
381   | --program-transform | --program-transfor \
382   | --program-transfo | --program-transf \
383   | --program-trans | --program-tran \
384   | --progr-tra | --program-tr | --program-t)
385     ac_prev=program_transform_name ;;
386   -program-transform-name=* | --program-transform-name=* \
387   | --program-transform-nam=* | --program-transform-na=* \
388   | --program-transform-n=* | --program-transform-=* \
389   | --program-transform=* | --program-transfor=* \
390   | --program-transfo=* | --program-transf=* \
391   | --program-trans=* | --program-tran=* \
392   | --progr-tra=* | --program-tr=* | --program-t=*)
393     program_transform_name=$ac_optarg ;;
394
395   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
396   | -silent | --silent | --silen | --sile | --sil)
397     silent=yes ;;
398
399   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
400     ac_prev=sbindir ;;
401   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
402   | --sbi=* | --sb=*)
403     sbindir=$ac_optarg ;;
404
405   -sharedstatedir | --sharedstatedir | --sharedstatedi \
406   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
407   | --sharedst | --shareds | --shared | --share | --shar \
408   | --sha | --sh)
409     ac_prev=sharedstatedir ;;
410   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
411   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
412   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
413   | --sha=* | --sh=*)
414     sharedstatedir=$ac_optarg ;;
415
416   -site | --site | --sit)
417     ac_prev=site ;;
418   -site=* | --site=* | --sit=*)
419     site=$ac_optarg ;;
420
421   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
422     ac_prev=srcdir ;;
423   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
424     srcdir=$ac_optarg ;;
425
426   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
427   | --syscon | --sysco | --sysc | --sys | --sy)
428     ac_prev=sysconfdir ;;
429   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
430   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
431     sysconfdir=$ac_optarg ;;
432
433   -target | --target | --targe | --targ | --tar | --ta | --t)
434     ac_prev=target_alias ;;
435   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
436     target_alias=$ac_optarg ;;
437
438   -v | -verbose | --verbose | --verbos | --verbo | --verb)
439     verbose=yes ;;
440
441   -version | --version | --versio | --versi | --vers | -V)
442     ac_init_version=: ;;
443
444   -with-* | --with-*)
445     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
446     # Reject names that are not valid shell variable names.
447     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
448       { echo "$as_me: error: invalid package name: $ac_package" >&2
449    { (exit 1); exit 1; }; }
450     ac_package=`echo "$ac_package" | sed 's/-/_/g'`
451     case "$ac_option" in
452       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
453       *) ac_optarg=yes ;;
454     esac
455     eval "with_$ac_package='$ac_optarg'" ;;
456
457   -without-* | --without-*)
458     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
459     # Reject names that are not valid shell variable names.
460     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
461       { echo "$as_me: error: invalid package name: $ac_package" >&2
462    { (exit 1); exit 1; }; }
463     ac_package=`echo "$ac_package" | sed 's/-/_/g'`
464     eval "with_$ac_package=no" ;;
465
466   --x)
467     # Obsolete; use --with-x.
468     with_x=yes ;;
469
470   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
471   | --x-incl | --x-inc | --x-in | --x-i)
472     ac_prev=x_includes ;;
473   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
474   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
475     x_includes=$ac_optarg ;;
476
477   -x-libraries | --x-libraries | --x-librarie | --x-librari \
478   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
479     ac_prev=x_libraries ;;
480   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
481   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
482     x_libraries=$ac_optarg ;;
483
484   -*) { echo "$as_me: error: unrecognized option: $ac_option
485 Try \`$0 --help' for more information." >&2
486    { (exit 1); exit 1; }; }
487     ;;
488
489   *=*)
490     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
491     # Reject names that are not valid shell variable names.
492     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
493       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
494    { (exit 1); exit 1; }; }
495     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
496     eval "$ac_envvar='$ac_optarg'"
497     export "$ac_envvar" ;;
498
499   *)
500     # FIXME: should be removed in autoconf 3.0.
501     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
502     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
504     : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
505     ;;
506
507   esac
508 done
509
510 if test -n "$ac_prev"; then
511   ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
512   { echo "$as_me: error: missing argument to $ac_option" >&2
513    { (exit 1); exit 1; }; }
514 fi
515
516 # Be sure to have absolute paths.
517 for ac_var in exec_prefix prefix
518 do
519   eval ac_val=$`echo "$ac_var"`
520   case "$ac_val" in
521     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # Be sure to have absolute paths.
528 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
529               localstatedir libdir includedir oldincludedir infodir mandir
530 do
531   eval ac_val=$`echo "$ac_var"`
532   case "$ac_val" in
533     [\\/$]* | ?:[\\/]* ) ;;
534     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
535    { (exit 1); exit 1; }; };;
536   esac
537 done
538
539 # There might be people who depend on the old broken behavior: `$host'
540 # used to hold the argument of --host etc.
541 build=$build_alias
542 host=$host_alias
543 target=$target_alias
544
545 # FIXME: should be removed in autoconf 3.0.
546 if test "x$host_alias" != x; then
547   if test "x$build_alias" = x; then
548     cross_compiling=maybe
549     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
550     If a cross compiler is detected then cross compile mode will be used." >&2
551   elif test "x$build_alias" != "x$host_alias"; then
552     cross_compiling=yes
553   fi
554 fi
555
556 ac_tool_prefix=
557 test -n "$host_alias" && ac_tool_prefix=$host_alias-
558
559 test "$silent" = yes && exec 6>/dev/null
560
561 # Find the source files, if location was not specified.
562 if test -z "$srcdir"; then
563   ac_srcdir_defaulted=yes
564   # Try the directory containing this script, then its parent.
565   ac_prog=$0
566   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
567   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
568   srcdir=$ac_confdir
569   if test ! -r "$srcdir/$ac_unique_file"; then
570     srcdir=..
571   fi
572 else
573   ac_srcdir_defaulted=no
574 fi
575 if test ! -r "$srcdir/$ac_unique_file"; then
576   if test "$ac_srcdir_defaulted" = yes; then
577     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
578    { (exit 1); exit 1; }; }
579   else
580     { echo "$as_me: error: cannot find sources in $srcdir" >&2
581    { (exit 1); exit 1; }; }
582   fi
583 fi
584 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
585 ac_env_build_alias_set=${build_alias+set}
586 ac_env_build_alias_value=$build_alias
587 ac_cv_env_build_alias_set=${build_alias+set}
588 ac_cv_env_build_alias_value=$build_alias
589 ac_env_host_alias_set=${host_alias+set}
590 ac_env_host_alias_value=$host_alias
591 ac_cv_env_host_alias_set=${host_alias+set}
592 ac_cv_env_host_alias_value=$host_alias
593 ac_env_target_alias_set=${target_alias+set}
594 ac_env_target_alias_value=$target_alias
595 ac_cv_env_target_alias_set=${target_alias+set}
596 ac_cv_env_target_alias_value=$target_alias
597 ac_env_CC_set=${CC+set}
598 ac_env_CC_value=$CC
599 ac_cv_env_CC_set=${CC+set}
600 ac_cv_env_CC_value=$CC
601 ac_env_CFLAGS_set=${CFLAGS+set}
602 ac_env_CFLAGS_value=$CFLAGS
603 ac_cv_env_CFLAGS_set=${CFLAGS+set}
604 ac_cv_env_CFLAGS_value=$CFLAGS
605 ac_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_env_LDFLAGS_value=$LDFLAGS
607 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
608 ac_cv_env_LDFLAGS_value=$LDFLAGS
609 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_env_CPPFLAGS_value=$CPPFLAGS
611 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
612 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
613 ac_env_CPP_set=${CPP+set}
614 ac_env_CPP_value=$CPP
615 ac_cv_env_CPP_set=${CPP+set}
616 ac_cv_env_CPP_value=$CPP
617 ac_env_CXX_set=${CXX+set}
618 ac_env_CXX_value=$CXX
619 ac_cv_env_CXX_set=${CXX+set}
620 ac_cv_env_CXX_value=$CXX
621 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
622 ac_env_CXXFLAGS_value=$CXXFLAGS
623 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
624 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
625 ac_env_CXXCPP_set=${CXXCPP+set}
626 ac_env_CXXCPP_value=$CXXCPP
627 ac_cv_env_CXXCPP_set=${CXXCPP+set}
628 ac_cv_env_CXXCPP_value=$CXXCPP
629
630 #
631 # Report the --help message.
632 #
633 if test "$ac_init_help" = "long"; then
634   # Omit some internal or obsolete options to make the list less imposing.
635   # This message is too long to be a string in the A/UX 3.1 sh.
636   cat <<EOF
637 \`configure' configures this package to adapt to many kinds of systems.
638
639 Usage: $0 [OPTION]... [VAR=VALUE]...
640
641 To assign environment variables (e.g., CC, CFLAGS...), specify them as
642 VAR=VALUE.  See below for descriptions of some of the useful variables.
643
644 Defaults for the options are specified in brackets.
645
646 Configuration:
647   -h, --help              display this help and exit
648       --help=short        display options specific to this package
649       --help=recursive    display the short help of all the included packages
650   -V, --version           display version information and exit
651   -q, --quiet, --silent   do not print \`checking...' messages
652       --cache-file=FILE   cache test results in FILE [disabled]
653   -C, --config-cache      alias for \`--cache-file=config.cache'
654   -n, --no-create         do not create output files
655       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
656
657 EOF
658
659   cat <<EOF
660 Installation directories:
661   --prefix=PREFIX         install architecture-independent files in PREFIX
662                           [$ac_default_prefix]
663   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
664                           [PREFIX]
665
666 By default, \`make install' will install all the files in
667 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
668 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
669 for instance \`--prefix=\$HOME'.
670
671 For better control, use the options below.
672
673 Fine tuning of the installation directories:
674   --bindir=DIR            user executables [EPREFIX/bin]
675   --sbindir=DIR           system admin executables [EPREFIX/sbin]
676   --libexecdir=DIR        program executables [EPREFIX/libexec]
677   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
678   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
679   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
680   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
681   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
682   --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
683   --libdir=DIR            object code libraries [EPREFIX/lib]
684   --includedir=DIR        C header files [PREFIX/include]
685   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
686   --infodir=DIR           info documentation [DATAROOTDIR/info]
687   --mandir=DIR            man documentation [DATAROOTDIR/man]
688 EOF
689
690   cat <<\EOF
691
692 Program names:
693   --program-prefix=PREFIX            prepend PREFIX to installed program names
694   --program-suffix=SUFFIX            append SUFFIX to installed program names
695   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
696
697 System types:
698   --build=BUILD           configure for building on BUILD [guessed]
699   --host=HOST       build programs to run on HOST [BUILD]
700   --target=TARGET   configure for building compilers for TARGET [HOST]
701 EOF
702 fi
703
704 if test -n "$ac_init_help"; then
705
706   cat <<\EOF
707
708 Optional Packages:
709   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
710   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
711
712 Optional Features:
713   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
714   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
715
716   --with-rel-version=XXX  override derived release version
717   --with-abi-version=XXX  override derived ABI version
718   --with-system-type=XXX  test: override derived host system-type
719   --without-ada           suppress check for Ada compiler, don't build demo
720   --without-cxx           do not adjust ncurses bool to match C++
721   --without-cxx-binding   do not build C++ binding and demo
722   --disable-db-install    suppress install of terminal database
723   --without-manpages      suppress install of manpages
724   --without-progs         suppress build/install with programs (e.g., tic)
725   --without-tack          suppress build/install with tack program
726   --without-tests         suppress build/install with test-programs
727   --without-curses-h      install curses.h as ncurses.h only
728   --with-config-suffix=X  suffixes ncursesXX-config file
729   --with-pkg-config{=path} enable/disable use of pkg-config
730   --with-pkg-config-libdir=XXX use given directory for installing pc-files
731   --enable-pc-files       generate and install .pc files for pkg-config
732   --with-pc-suffix        suffixes pc-files
733   --enable-mixed-case     tic should assume mixed-case filenames
734   --with-install-prefix   prefixes actual install-location ($DESTDIR)
735 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
736   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
737   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
738   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
739   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
740   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
741   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
742 Options to Specify the Libraries Built/Used:
743   --disable-libtool-version  enable to use libtool's incompatible naming scheme
744   --with-libtool          generate libraries with libtool
745   --with-shared           generate shared-libraries
746   --with-normal           generate normal-libraries (default)
747   --with-debug            generate debug-libraries (default)
748   --with-profile          generate profile-libraries
749   --with-cxx-shared       generate C++ shared-libraries
750   --with-lib-prefix       override library-prefix
751   --with-termlib          generate separate terminfo library
752   --with-ticlib           generate separate tic library
753   --enable-rpath          use rpath option when generating shared libraries
754   --disable-relink        relink shared libraries during install
755   --with-shlib-version=X  Specify rel or abi version for shared libs
756   --with-libtool-opts=XXX specify additional libtool options
757   --with-export-syms=XXX  limit exported symbols using libtool
758   --with-versioned-syms=X markup versioned symbols using ld
759   --with-gpm              use Alessandro Rubini's GPM library
760   --without-dlsym         do not use dlsym() to load GPM dynamically
761   --with-pcre2            use PCRE2 for regular-expressions
762   --with-sysmouse         use sysmouse (FreeBSD console)
763   --disable-lib-suffixes  disable library suffixes
764   --disable-rpath-hack    don't add rpath options for additional libraries
765   --disable-pkg-ldflags   disable extra LDFLAGS for package-scripts
766 Fine-Tuning Your Configuration:
767   --with-extra-suffix=X   append extra suffix to header/library paths
768   --disable-overwrite     put headers in subdir, omit link to -lcurses
769   --disable-database      do not use terminfo, only fallbacks/termcap
770   --with-database=XXX     specify terminfo source to install
771   --with-hashed-db        specify hashed-database library
772   --with-fallbacks=XXX    specify list of fallback terminal descriptions
773   --with-tic-path=XXX     specify path of tic for fallbacks
774   --with-infocmp-path=XXX     specify path of infocmp for fallbacks
775   --without-xterm-new     specify if xterm terminfo should be old version
776   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
777   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
778   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
779   --disable-big-core      assume machine has little memory
780   --disable-big-strings   assume compiler has only standard-size strings
781   --enable-termcap        compile in termcap fallback support
782   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
783   --enable-getcap         fast termcap load, no xrefs to terminfo
784   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
785   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
786   --disable-root-environ  restrict 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-stdnoreturn    enable C11 _Noreturn feature for diagnostics
853   --enable-string-hacks   work around bogus compiler/loader warnings
854   --enable-assertions     test: turn on generation of assertion code
855   --with-dmalloc          test: use Gray Watson's dmalloc library
856   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
857   --with-valgrind         test: use valgrind
858   --disable-leaks         test: free permanent memory, analyze leaks
859   --enable-expanded       test: generate functions for certain macros
860   --disable-macros        test: use functions rather than macros
861   --with-trace            test: add trace() function to all models of ncurses
862   --disable-gnat-projects test: disable GNAT projects even if usable
863 Ada Binding Options:
864   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
865   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
866   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
867   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
868   --with-ada-libname=XXX  override default Ada library-name
869   --with-form-libname=XXX override form basename of library
870   --with-menu-libname=XXX override menu basename of library
871   --with-panel-libname=XXX override panel basename of library
872   --with-cxx-libname=XXX override ncurses++ basename of library
873
874 Some influential environment variables:
875   CC          C compiler command
876   CFLAGS      C compiler flags
877   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
878               nonstandard directory <lib dir>
879   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
880               headers in a nonstandard directory <include dir>
881   CPP         C preprocessor
882   CXX         C++ compiler command
883   CXXFLAGS    C++ compiler flags
884   CXXCPP      C++ preprocessor
885
886 Use these variables to override the choices made by `configure' or to help
887 it to find libraries and programs with nonstandard names/locations.
888
889 EOF
890 fi
891
892 if test "$ac_init_help" = "recursive"; then
893   # If there are subdirs, report their specific --help.
894   ac_popdir=`pwd`
895   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
896     cd "$ac_subdir"
897     # A "../" for each directory in /$ac_subdir.
898     ac_dots=`echo "$ac_subdir" |
899              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
900
901     case "$srcdir" in
902     .) # No --srcdir option.  We are building in place.
903       ac_sub_srcdir="$srcdir" ;;
904     [\\/]* | ?:[\\/]* ) # Absolute path.
905       ac_sub_srcdir="$srcdir/$ac_subdir" ;;
906     *) # Relative path.
907       ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
908     esac
909
910     # Check for guested configure; otherwise get Cygnus style configure.
911     if test -f "$ac_sub_srcdir/configure.gnu"; then
912       echo
913       $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
914     elif test -f "$ac_sub_srcdir/configure"; then
915       echo
916       $SHELL "$ac_sub_srcdir/configure" --help=recursive
917     elif test -f "$ac_sub_srcdir/configure.ac" ||
918            test -f "$ac_sub_srcdir/configure.in"; then
919       echo
920       "$ac_configure" --help
921     else
922       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
923     fi
924     cd "$ac_popdir"
925   done
926 fi
927
928 test -n "$ac_init_help" && exit 0
929 if "$ac_init_version"; then
930   cat <<\EOF
931
932 Copyright 2003-2020,2021        Thomas E. Dickey
933 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
934 Free Software Foundation, Inc.
935 This configure script is free software; the Free Software Foundation
936 gives unlimited permission to copy, distribute and modify it.
937 EOF
938   exit 0
939 fi
940 exec 5>config.log
941 cat >&5 <<EOF
942 This file contains any messages produced by compilers while
943 running configure, to aid debugging if configure makes a mistake.
944
945 It was created by $as_me, which was
946 generated by GNU Autoconf 2.52.20210509.  Invocation command line was
947
948   $ $0 $@
949
950 EOF
951 {
952 cat <<_ASUNAME
953 ## ---------- ##
954 ## Platform.  ##
955 ## ---------- ##
956
957 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
958 uname -m = `(uname -m) 2>/dev/null || echo unknown`
959 uname -r = `(uname -r) 2>/dev/null || echo unknown`
960 uname -s = `(uname -s) 2>/dev/null || echo unknown`
961 uname -v = `(uname -v) 2>/dev/null || echo unknown`
962
963 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
964 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
965
966 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
967 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
968 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
969 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
970 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
971 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
972 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
973
974 PATH = $PATH
975
976 _ASUNAME
977 } >&5
978
979 cat >&5 <<EOF
980 ## ------------ ##
981 ## Core tests.  ##
982 ## ------------ ##
983
984 EOF
985
986 # Keep a trace of the command line.
987 # Strip out --no-create and --no-recursion so they do not pile up.
988 # Also quote any args containing shell meta-characters.
989 ac_configure_args=
990 ac_sep=
991 for ac_arg
992 do
993   case "$ac_arg" in
994   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
995   | --no-cr | --no-c) ;;
996   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
997   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
998   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
999     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
1000     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1001     ac_sep=" " ;;
1002   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
1003      ac_sep=" " ;;
1004   esac
1005   # Get rid of the leading space.
1006 done
1007
1008 # When interrupted or exit'd, cleanup temporary files, and complete
1009 # config.log.  We remove comments because anyway the quotes in there
1010 # would cause problems or look ugly.
1011 trap 'exit_status=$?
1012   # Save into config.log some information that might help in debugging.
1013   echo >&5
1014   echo "## ----------------- ##" >&5
1015   echo "## Cache variables.  ##" >&5
1016   echo "## ----------------- ##" >&5
1017   echo >&5
1018   # The following way of writing the cache mishandles newlines in values,
1019 {
1020   (set) 2>&1 |
1021     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1022     *ac_space=\ *)
1023       sed -n \
1024         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1025           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1026       ;;
1027     *)
1028       sed -n \
1029         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1030       ;;
1031     esac;
1032 } >&5
1033   sed "/^$/d" confdefs.h >conftest.log
1034   if test -s conftest.log; then
1035     echo >&5
1036     echo "## ------------ ##" >&5
1037     echo "## confdefs.h.  ##" >&5
1038     echo "## ------------ ##" >&5
1039     echo >&5
1040     cat conftest.log >&5
1041   fi
1042   (echo; echo) >&5
1043   test "$ac_signal" != 0 &&
1044     echo "$as_me: caught signal $ac_signal" >&5
1045   echo "$as_me: exit $exit_status" >&5
1046   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1047     exit $exit_status
1048      ' 0
1049 for ac_signal in 1 2 13 15; do
1050   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1051 done
1052 ac_signal=0
1053
1054 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1055 rm -rf conftest* confdefs.h
1056 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1057 echo >confdefs.h
1058
1059 # Let the site file select an alternate cache file if it wants to.
1060 # Prefer explicitly selected file to automatically selected ones.
1061 if test -z "$CONFIG_SITE"; then
1062   if test "x$prefix" != xNONE; then
1063     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1064   else
1065     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1066   fi
1067 fi
1068 for ac_site_file in $CONFIG_SITE; do
1069   if test -r "$ac_site_file"; then
1070     { echo "$as_me:1070: loading site script $ac_site_file" >&5
1071 echo "$as_me: loading site script $ac_site_file" >&6;}
1072     cat "$ac_site_file" >&5
1073     . "$ac_site_file"
1074   fi
1075 done
1076
1077 if test -r "$cache_file"; then
1078   # Some versions of bash will fail to source /dev/null (special
1079   # files actually), so we avoid doing that.
1080   if test -f "$cache_file"; then
1081     { echo "$as_me:1081: loading cache $cache_file" >&5
1082 echo "$as_me: loading cache $cache_file" >&6;}
1083     case $cache_file in
1084       [\\/]* | ?:[\\/]* ) . $cache_file;;
1085       *)                      . ./$cache_file;;
1086     esac
1087   fi
1088 else
1089   { echo "$as_me:1089: creating cache $cache_file" >&5
1090 echo "$as_me: creating cache $cache_file" >&6;}
1091   >$cache_file
1092 fi
1093
1094 # Check that the precious variables saved in the cache have kept the same
1095 # value.
1096 ac_cache_corrupted=false
1097 for ac_var in `(set) 2>&1 |
1098                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1099   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1100   eval ac_new_set=\$ac_env_${ac_var}_set
1101   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1102   eval ac_new_val="\$ac_env_${ac_var}_value"
1103   case "$ac_old_set,$ac_new_set" in
1104     set,)
1105       { echo "$as_me:1105: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1106 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1107       ac_cache_corrupted=: ;;
1108     ,set)
1109       { echo "$as_me:1109: error: \`$ac_var' was not set in the previous run" >&5
1110 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1111       ac_cache_corrupted=: ;;
1112     ,);;
1113     *)
1114       if test "x$ac_old_val" != "x$ac_new_val"; then
1115         { echo "$as_me:1115: error: \`$ac_var' has changed since the previous run:" >&5
1116 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1117         { echo "$as_me:1117:   former value:  $ac_old_val" >&5
1118 echo "$as_me:   former value:  $ac_old_val" >&2;}
1119         { echo "$as_me:1119:   current value: $ac_new_val" >&5
1120 echo "$as_me:   current value: $ac_new_val" >&2;}
1121         ac_cache_corrupted=:
1122       fi;;
1123   esac
1124   # Pass precious variables to config.status.  It doesn't matter if
1125   # we pass some twice (in addition to the command line arguments).
1126   if test "$ac_new_set" = set; then
1127     case "$ac_new_val" in
1128     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1129       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1130       ac_configure_args="$ac_configure_args '$ac_arg'"
1131       ;;
1132     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1133        ;;
1134     esac
1135   fi
1136 done
1137 if "$ac_cache_corrupted"; then
1138   { echo "$as_me:1138: error: changes in the environment can compromise the build" >&5
1139 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1140   { { echo "$as_me:1140: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1141 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1142    { (exit 1); exit 1; }; }
1143 fi
1144
1145 ac_ext=c
1146 ac_cpp='$CPP $CPPFLAGS'
1147 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1148 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1149 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1150 ac_main_return="return"
1151
1152 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1153   *c*,-n*) ECHO_N=
1154            ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1155            ECHO_T='     '
1156            ;;
1157   *c*,*  ) ECHO_N=-n
1158            ECHO_C=
1159            ECHO_T=
1160            ;;
1161   *)       ECHO_N=
1162            ECHO_C='\c'
1163            ECHO_T=
1164            ;;
1165 esac
1166 echo "#! $SHELL" >conftest.sh
1167 echo  "exit 0"   >>conftest.sh
1168 chmod +x conftest.sh
1169 if { (echo "$as_me:1169: PATH=\".;.\"; conftest.sh") >&5
1170   (PATH=".;."; conftest.sh) 2>&5
1171   ac_status=$?
1172   echo "$as_me:1172: \$? = $ac_status" >&5
1173   (exit "$ac_status"); }; then
1174   ac_path_separator=';'
1175 else
1176   ac_path_separator=:
1177 fi
1178 PATH_SEPARATOR="$ac_path_separator"
1179 rm -f conftest.sh
1180
1181 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1182
1183 top_builddir=`pwd`
1184
1185 for ac_prog in ggrep grep
1186 do
1187   # Extract the first word of "$ac_prog", so it can be a program name with args.
1188 set dummy $ac_prog; ac_word=$2
1189 echo "$as_me:1189: checking for $ac_word" >&5
1190 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1191 if test "${ac_cv_prog_GREP+set}" = set; then
1192   echo $ECHO_N "(cached) $ECHO_C" >&6
1193 else
1194   if test -n "$GREP"; then
1195   ac_cv_prog_GREP="$GREP" # Let the user override the test.
1196 else
1197   ac_save_IFS=$IFS; IFS=$ac_path_separator
1198 ac_dummy="$PATH"
1199 for ac_dir in $ac_dummy; do
1200   IFS=$ac_save_IFS
1201   test -z "$ac_dir" && ac_dir=.
1202   $as_executable_p "$ac_dir/$ac_word" || continue
1203 ac_cv_prog_GREP="$ac_prog"
1204 echo "$as_me:1204: found $ac_dir/$ac_word" >&5
1205 break
1206 done
1207
1208 fi
1209 fi
1210 GREP=$ac_cv_prog_GREP
1211 if test -n "$GREP"; then
1212   echo "$as_me:1212: result: $GREP" >&5
1213 echo "${ECHO_T}$GREP" >&6
1214 else
1215   echo "$as_me:1215: result: no" >&5
1216 echo "${ECHO_T}no" >&6
1217 fi
1218
1219   test -n "$GREP" && break
1220 done
1221 test -n "$GREP" || GREP=": "
1222
1223 echo "$as_me:1223: checking for egrep" >&5
1224 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1225 if test "${ac_cv_path_EGREP+set}" = set; then
1226   echo $ECHO_N "(cached) $ECHO_C" >&6
1227 else
1228   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
1229    then ac_cv_path_EGREP="$GREP -E"
1230    else
1231      for ac_prog in gegrep egrep
1232 do
1233   # Extract the first word of "$ac_prog", so it can be a program name with args.
1234 set dummy $ac_prog; ac_word=$2
1235 echo "$as_me:1235: checking for $ac_word" >&5
1236 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1237 if test "${ac_cv_path_EGREP+set}" = set; then
1238   echo $ECHO_N "(cached) $ECHO_C" >&6
1239 else
1240   case $EGREP in
1241   [\\/]* | ?:[\\/]*)
1242   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
1243   ;;
1244   *)
1245   ac_save_IFS=$IFS; IFS=$ac_path_separator
1246 ac_dummy="$PATH"
1247 for ac_dir in $ac_dummy; do
1248   IFS=$ac_save_IFS
1249   test -z "$ac_dir" && ac_dir=.
1250   if $as_executable_p "$ac_dir/$ac_word"; then
1251    ac_cv_path_EGREP="$ac_dir/$ac_word"
1252    echo "$as_me:1252: found $ac_dir/$ac_word" >&5
1253    break
1254 fi
1255 done
1256
1257   ;;
1258 esac
1259 fi
1260 EGREP=$ac_cv_path_EGREP
1261
1262 if test -n "$EGREP"; then
1263   echo "$as_me:1263: result: $EGREP" >&5
1264 echo "${ECHO_T}$EGREP" >&6
1265 else
1266   echo "$as_me:1266: result: no" >&5
1267 echo "${ECHO_T}no" >&6
1268 fi
1269
1270   test -n "$EGREP" && break
1271 done
1272 test -n "$EGREP" || EGREP=": "
1273
1274      test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:1274: error: cannot find workable egrep" >&5
1275 echo "$as_me: error: cannot find workable egrep" >&2;}
1276    { (exit 1); exit 1; }; }
1277    fi
1278 fi
1279 echo "$as_me:1279: result: $ac_cv_path_EGREP" >&5
1280 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
1281  EGREP="$ac_cv_path_EGREP"
1282
1283 NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1284 NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1285 NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1286 cf_cv_abi_version=${NCURSES_MAJOR}
1287 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1288 cf_cv_timestamp=`date`
1289 echo "$as_me:1289: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1290 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1291
1292 if test -f "$srcdir/VERSION" ; then
1293         echo "$as_me:1293: checking for package version" >&5
1294 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1295
1296         # if there are not enough fields, cut returns the last one...
1297         cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
1298         cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
1299         cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
1300
1301         # this is how CF_BUNDLED_INTL uses $VERSION:
1302         VERSION="$cf_field1"
1303
1304         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1305         test -z "$VERSION_MAJOR" && { { echo "$as_me:1305: error: missing major-version" >&5
1306 echo "$as_me: error: missing major-version" >&2;}
1307    { (exit 1); exit 1; }; }
1308
1309         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1310         test -z "$VERSION_MINOR" && { { echo "$as_me:1310: error: missing minor-version" >&5
1311 echo "$as_me: error: missing minor-version" >&2;}
1312    { (exit 1); exit 1; }; }
1313
1314         echo "$as_me:1314: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1315 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1316
1317         echo "$as_me:1317: checking for package patch date" >&5
1318 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1319         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1320         case .$VERSION_PATCH in
1321         (.)
1322                 { { echo "$as_me:1322: error: missing patch-date $VERSION_PATCH" >&5
1323 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1324    { (exit 1); exit 1; }; }
1325                 ;;
1326         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1327                 ;;
1328         (*)
1329                 { { echo "$as_me:1329: error: illegal patch-date $VERSION_PATCH" >&5
1330 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1331    { (exit 1); exit 1; }; }
1332                 ;;
1333         esac
1334         echo "$as_me:1334: result: $VERSION_PATCH" >&5
1335 echo "${ECHO_T}$VERSION_PATCH" >&6
1336 else
1337         { { echo "$as_me:1337: error: did not find $srcdir/VERSION" >&5
1338 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1339    { (exit 1); exit 1; }; }
1340 fi
1341
1342 # show the actual data that we have for versions:
1343 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1344
1345 echo "${as_me:-configure}:1345: testing ABI VERSION $VERSION ..." 1>&5
1346
1347 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1348
1349 echo "${as_me:-configure}:1349: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1350
1351 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1352
1353 echo "${as_me:-configure}:1353: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1354
1355 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1356
1357 echo "${as_me:-configure}:1357: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1358
1359         cf_PACKAGE=NCURSES
1360         PACKAGE=ncurses
1361
1362 cat >>confdefs.h <<EOF
1363 #define PACKAGE "$PACKAGE"
1364 EOF
1365
1366 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1367
1368         cat >>confdefs.h <<EOF
1369 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1370 EOF
1371
1372         cat >>confdefs.h <<EOF
1373 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1374 EOF
1375
1376 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1377
1378 # Check whether --with-rel-version or --without-rel-version was given.
1379 if test "${with_rel_version+set}" = set; then
1380   withval="$with_rel_version"
1381   { echo "$as_me:1381: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1382 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1383  cf_cv_rel_version=$withval
1384 fi;
1385
1386  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1387  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1388
1389 if test -n "$NCURSES_MAJOR" ; then
1390   case $NCURSES_MAJOR in
1391   ([0-9]*)
1392         ;;
1393   (*)
1394         { { echo "$as_me:1394: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1395 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1396    { (exit 1); exit 1; }; }
1397         ;;
1398   esac
1399 else
1400   { { echo "$as_me:1400: error: Release major-version value is empty" >&5
1401 echo "$as_me: error: Release major-version value is empty" >&2;}
1402    { (exit 1); exit 1; }; }
1403 fi
1404
1405 if test -n "$NCURSES_MINOR" ; then
1406   case $NCURSES_MINOR in
1407   ([0-9]*)
1408         ;;
1409   (*)
1410         { { echo "$as_me:1410: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1411 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1412    { (exit 1); exit 1; }; }
1413         ;;
1414   esac
1415 else
1416   { { echo "$as_me:1416: error: Release minor-version value is empty" >&5
1417 echo "$as_me: error: Release minor-version value is empty" >&2;}
1418    { (exit 1); exit 1; }; }
1419 fi
1420
1421 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1422
1423 # Check whether --with-abi-version or --without-abi-version was given.
1424 if test "${with_abi_version+set}" = set; then
1425   withval="$with_abi_version"
1426
1427         if test "x$cf_cv_abi_version" != "x$withval"
1428         then
1429                 { echo "$as_me:1429: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1430 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1431                 case "$cf_cv_rel_version" in
1432                 (5.*)
1433                         cf_cv_rel_version=$withval.0
1434                         ;;
1435                 (6.*)
1436                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1437                         ;;
1438                 esac
1439         fi
1440         cf_cv_abi_version=$withval
1441 fi;
1442
1443 if test -n "$cf_cv_abi_version" ; then
1444   case $cf_cv_abi_version in
1445   ([0-9]*)
1446         ;;
1447   (*)
1448         { { echo "$as_me:1448: error: ABI version is not a number: $cf_cv_abi_version" >&5
1449 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1450    { (exit 1); exit 1; }; }
1451         ;;
1452   esac
1453 else
1454   { { echo "$as_me:1454: error: ABI version value is empty" >&5
1455 echo "$as_me: error: ABI version value is empty" >&2;}
1456    { (exit 1); exit 1; }; }
1457 fi
1458
1459 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1460 then
1461         case "$cf_cv_rel_version" in
1462         (5.*)
1463                 cf_cv_rel_version=$with_abi_version.0
1464                 ;;
1465         esac
1466 fi
1467
1468 ac_aux_dir=
1469 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1470   if test -f "$ac_dir/install-sh"; then
1471     ac_aux_dir=$ac_dir
1472     ac_install_sh="$ac_aux_dir/install-sh -c"
1473     break
1474   elif test -f "$ac_dir/install.sh"; then
1475     ac_aux_dir=$ac_dir
1476     ac_install_sh="$ac_aux_dir/install.sh -c"
1477     break
1478   elif test -f "$ac_dir/shtool"; then
1479     ac_aux_dir=$ac_dir
1480     ac_install_sh="$ac_aux_dir/shtool install -c"
1481     break
1482   fi
1483 done
1484 if test -z "$ac_aux_dir"; then
1485   { { echo "$as_me:1485: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1486 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1487    { (exit 1); exit 1; }; }
1488 fi
1489 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1490 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1491 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1492
1493 # Make sure we can run config.sub.
1494 $ac_config_sub sun4 >/dev/null 2>&1 ||
1495   { { echo "$as_me:1495: error: cannot run $ac_config_sub" >&5
1496 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1497    { (exit 1); exit 1; }; }
1498
1499 echo "$as_me:1499: checking build system type" >&5
1500 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1501 if test "${ac_cv_build+set}" = set; then
1502   echo $ECHO_N "(cached) $ECHO_C" >&6
1503 else
1504   ac_cv_build_alias=$build_alias
1505 test -z "$ac_cv_build_alias" &&
1506   ac_cv_build_alias=`$ac_config_guess`
1507 test -z "$ac_cv_build_alias" &&
1508   { { echo "$as_me:1508: error: cannot guess build type; you must specify one" >&5
1509 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1510    { (exit 1); exit 1; }; }
1511 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1512   { { echo "$as_me:1512: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1513 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1514    { (exit 1); exit 1; }; }
1515
1516 fi
1517 echo "$as_me:1517: result: $ac_cv_build" >&5
1518 echo "${ECHO_T}$ac_cv_build" >&6
1519 build=$ac_cv_build
1520 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1521 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1522 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1523
1524 echo "$as_me:1524: checking host system type" >&5
1525 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1526 if test "${ac_cv_host+set}" = set; then
1527   echo $ECHO_N "(cached) $ECHO_C" >&6
1528 else
1529   ac_cv_host_alias=$host_alias
1530 test -z "$ac_cv_host_alias" &&
1531   ac_cv_host_alias=$ac_cv_build_alias
1532 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1533   { { echo "$as_me:1533: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1534 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1535    { (exit 1); exit 1; }; }
1536
1537 fi
1538 echo "$as_me:1538: result: $ac_cv_host" >&5
1539 echo "${ECHO_T}$ac_cv_host" >&6
1540 host=$ac_cv_host
1541 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1542 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1543 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1544
1545 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1546         echo "$as_me:1546: checking target system type" >&5
1547 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1548 if test "${ac_cv_target+set}" = set; then
1549   echo $ECHO_N "(cached) $ECHO_C" >&6
1550 else
1551   ac_cv_target_alias=$target_alias
1552 test "x$ac_cv_target_alias" = "x" &&
1553   ac_cv_target_alias=$ac_cv_host_alias
1554 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1555   { { echo "$as_me:1555: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1556 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1557    { (exit 1); exit 1; }; }
1558
1559 fi
1560 echo "$as_me:1560: result: $ac_cv_target" >&5
1561 echo "${ECHO_T}$ac_cv_target" >&6
1562 target=$ac_cv_target
1563 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1564 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1565 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1566
1567 # The aliases save the names the user supplied, while $host etc.
1568 # will get canonicalized.
1569 test -n "$target_alias" &&
1570   test "$program_prefix$program_suffix$program_transform_name" = \
1571     NONENONEs,x,x, &&
1572   program_prefix=${target_alias}-
1573         system_name="$host_os"
1574 else
1575         system_name="`(uname -s -r) 2>/dev/null`"
1576         if test -z "$system_name" ; then
1577                 system_name="`(hostname) 2>/dev/null`"
1578         fi
1579 fi
1580 test -n "$system_name" &&
1581 cat >>confdefs.h <<EOF
1582 #define SYSTEM_NAME "$system_name"
1583 EOF
1584
1585 if test "${cf_cv_system_name+set}" = set; then
1586   echo $ECHO_N "(cached) $ECHO_C" >&6
1587 else
1588   cf_cv_system_name="$system_name"
1589 fi
1590
1591 test -z "$system_name" && system_name="$cf_cv_system_name"
1592 test -n "$cf_cv_system_name" && echo "$as_me:1592: result: Configuring for $cf_cv_system_name" >&5
1593 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1594
1595 if test ".$system_name" != ".$cf_cv_system_name" ; then
1596         echo "$as_me:1596: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1597 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1598         { { echo "$as_me:1598: error: \"Please remove config.cache and try again.\"" >&5
1599 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1600    { (exit 1); exit 1; }; }
1601 fi
1602
1603 # Check whether --with-system-type or --without-system-type was given.
1604 if test "${with_system_type+set}" = set; then
1605   withval="$with_system_type"
1606   { echo "$as_me:1606: WARNING: overriding system type to $withval" >&5
1607 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1608         cf_cv_system_name=$withval
1609         host_os=$withval
1610
1611 fi;
1612
1613 ###     Save the given $CFLAGS to allow user-override.
1614 cf_user_CFLAGS="$CFLAGS"
1615
1616 ###     Default install-location
1617 echo "$as_me:1617: checking for fgrep" >&5
1618 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1619 if test "${ac_cv_path_FGREP+set}" = set; then
1620   echo $ECHO_N "(cached) $ECHO_C" >&6
1621 else
1622   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1623    then ac_cv_path_FGREP="$GREP -F"
1624    else
1625      for ac_prog in gfgrep fgrep
1626 do
1627   # Extract the first word of "$ac_prog", so it can be a program name with args.
1628 set dummy $ac_prog; ac_word=$2
1629 echo "$as_me:1629: checking for $ac_word" >&5
1630 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1631 if test "${ac_cv_path_FGREP+set}" = set; then
1632   echo $ECHO_N "(cached) $ECHO_C" >&6
1633 else
1634   case $FGREP in
1635   [\\/]* | ?:[\\/]*)
1636   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1637   ;;
1638   *)
1639   ac_save_IFS=$IFS; IFS=$ac_path_separator
1640 ac_dummy="$PATH"
1641 for ac_dir in $ac_dummy; do
1642   IFS=$ac_save_IFS
1643   test -z "$ac_dir" && ac_dir=.
1644   if $as_executable_p "$ac_dir/$ac_word"; then
1645    ac_cv_path_FGREP="$ac_dir/$ac_word"
1646    echo "$as_me:1646: found $ac_dir/$ac_word" >&5
1647    break
1648 fi
1649 done
1650
1651   ;;
1652 esac
1653 fi
1654 FGREP=$ac_cv_path_FGREP
1655
1656 if test -n "$FGREP"; then
1657   echo "$as_me:1657: result: $FGREP" >&5
1658 echo "${ECHO_T}$FGREP" >&6
1659 else
1660   echo "$as_me:1660: result: no" >&5
1661 echo "${ECHO_T}no" >&6
1662 fi
1663
1664   test -n "$FGREP" && break
1665 done
1666 test -n "$FGREP" || FGREP=": "
1667
1668      test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1668: error: cannot find workable fgrep" >&5
1669 echo "$as_me: error: cannot find workable fgrep" >&2;}
1670    { (exit 1); exit 1; }; }
1671    fi
1672 fi
1673 echo "$as_me:1673: result: $ac_cv_path_FGREP" >&5
1674 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1675  FGREP="$ac_cv_path_FGREP"
1676
1677 echo "$as_me:1677: checking for prefix" >&5
1678 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1679 if test "x$prefix" = "xNONE" ; then
1680         case "$cf_cv_system_name" in
1681                 # non-vendor systems don't have a conflict
1682         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1683                 prefix=/usr
1684                 ;;
1685         (*)     prefix=$ac_default_prefix
1686                 ;;
1687         esac
1688 fi
1689 echo "$as_me:1689: result: $prefix" >&5
1690 echo "${ECHO_T}$prefix" >&6
1691
1692 if test "x$prefix" = "xNONE" ; then
1693 echo "$as_me:1693: checking for default include-directory" >&5
1694 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1695 test -n "$verbose" && echo 1>&6
1696 for cf_symbol in \
1697         "$includedir" \
1698         "$includedir/ncurses" \
1699         "$prefix/include" \
1700         "$prefix/include/ncurses" \
1701         /usr/local/include \
1702         /usr/local/include/ncurses \
1703         /usr/include \
1704         /usr/include/ncurses
1705 do
1706         cf_dir=`eval echo "$cf_symbol"`
1707         if test -f "$cf_dir/curses.h" ; then
1708         if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1709                 includedir="$cf_symbol"
1710                 test -n "$verbose"  && echo $ECHO_N "   found " 1>&6
1711                 break
1712         fi
1713         fi
1714         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1715 done
1716 echo "$as_me:1716: result: $includedir" >&5
1717 echo "${ECHO_T}$includedir" >&6
1718 fi
1719
1720 ### Defaults for ncurses ABI
1721
1722 case x$cf_cv_abi_version in
1723 (x[6789])
1724         cf_dft_ext_colors=yes
1725         cf_dft_ext_const=yes
1726         cf_dft_ext_mouse=yes
1727         cf_dft_ext_putwin=yes
1728         cf_dft_ext_spfuncs=yes
1729         cf_dft_filter_syms=yes
1730         cf_dft_chtype=uint32_t
1731         cf_dft_mmask_t=uint32_t
1732         cf_dft_interop=yes
1733         cf_dft_tparm_arg=intptr_t
1734         cf_dft_with_lp64=yes
1735         ;;
1736 (*)
1737         cf_dft_ext_colors=no
1738         cf_dft_ext_const=no
1739         cf_dft_ext_mouse=no
1740         cf_dft_ext_putwin=no
1741         cf_dft_ext_spfuncs=no
1742         cf_dft_filter_syms=no
1743         cf_dft_chtype=auto
1744         cf_dft_mmask_t=auto
1745         cf_dft_interop=no
1746         cf_dft_tparm_arg=long
1747         cf_dft_with_lp64=no
1748         ;;
1749 esac
1750
1751 ###     Checks for programs.
1752
1753 # Check whether --with-ada or --without-ada was given.
1754 if test "${with_ada+set}" = set; then
1755   withval="$with_ada"
1756   cf_with_ada=$withval
1757 else
1758   cf_with_ada=yes
1759 fi;
1760
1761 if test "x$cf_with_ada" = xyes
1762 then
1763         cf_prog_cc="gnatgcc gcc cc"
1764 else
1765         cf_prog_cc="gcc cc"
1766 fi
1767
1768 ac_ext=c
1769 ac_cpp='$CPP $CPPFLAGS'
1770 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1771 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1772 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1773 ac_main_return="return"
1774 if test -n "$ac_tool_prefix"; then
1775   for ac_prog in $cf_prog_cc
1776   do
1777     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1778 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1779 echo "$as_me:1779: checking for $ac_word" >&5
1780 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1781 if test "${ac_cv_prog_CC+set}" = set; then
1782   echo $ECHO_N "(cached) $ECHO_C" >&6
1783 else
1784   if test -n "$CC"; then
1785   ac_cv_prog_CC="$CC" # Let the user override the test.
1786 else
1787   ac_save_IFS=$IFS; IFS=$ac_path_separator
1788 ac_dummy="$PATH"
1789 for ac_dir in $ac_dummy; do
1790   IFS=$ac_save_IFS
1791   test -z "$ac_dir" && ac_dir=.
1792   $as_executable_p "$ac_dir/$ac_word" || continue
1793 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1794 echo "$as_me:1794: found $ac_dir/$ac_word" >&5
1795 break
1796 done
1797
1798 fi
1799 fi
1800 CC=$ac_cv_prog_CC
1801 if test -n "$CC"; then
1802   echo "$as_me:1802: result: $CC" >&5
1803 echo "${ECHO_T}$CC" >&6
1804 else
1805   echo "$as_me:1805: result: no" >&5
1806 echo "${ECHO_T}no" >&6
1807 fi
1808
1809     test -n "$CC" && break
1810   done
1811 fi
1812 if test -z "$CC"; then
1813   ac_ct_CC=$CC
1814   for ac_prog in $cf_prog_cc
1815 do
1816   # Extract the first word of "$ac_prog", so it can be a program name with args.
1817 set dummy $ac_prog; ac_word=$2
1818 echo "$as_me:1818: checking for $ac_word" >&5
1819 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1820 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1821   echo $ECHO_N "(cached) $ECHO_C" >&6
1822 else
1823   if test -n "$ac_ct_CC"; then
1824   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1825 else
1826   ac_save_IFS=$IFS; IFS=$ac_path_separator
1827 ac_dummy="$PATH"
1828 for ac_dir in $ac_dummy; do
1829   IFS=$ac_save_IFS
1830   test -z "$ac_dir" && ac_dir=.
1831   $as_executable_p "$ac_dir/$ac_word" || continue
1832 ac_cv_prog_ac_ct_CC="$ac_prog"
1833 echo "$as_me:1833: found $ac_dir/$ac_word" >&5
1834 break
1835 done
1836
1837 fi
1838 fi
1839 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1840 if test -n "$ac_ct_CC"; then
1841   echo "$as_me:1841: result: $ac_ct_CC" >&5
1842 echo "${ECHO_T}$ac_ct_CC" >&6
1843 else
1844   echo "$as_me:1844: result: no" >&5
1845 echo "${ECHO_T}no" >&6
1846 fi
1847
1848   test -n "$ac_ct_CC" && break
1849 done
1850
1851   CC=$ac_ct_CC
1852 fi
1853
1854 test -z "$CC" && { { echo "$as_me:1854: error: no acceptable cc found in \$PATH" >&5
1855 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1856    { (exit 1); exit 1; }; }
1857
1858 # Provide some information about the compiler.
1859 echo "$as_me:1859:" \
1860      "checking for C compiler version" >&5
1861 ac_compiler=`set X $ac_compile; echo "$2"`
1862 { (eval echo "$as_me:1862: \"$ac_compiler --version </dev/null >&5\"") >&5
1863   (eval $ac_compiler --version </dev/null >&5) 2>&5
1864   ac_status=$?
1865   echo "$as_me:1865: \$? = $ac_status" >&5
1866   (exit "$ac_status"); }
1867 { (eval echo "$as_me:1867: \"$ac_compiler -v </dev/null >&5\"") >&5
1868   (eval $ac_compiler -v </dev/null >&5) 2>&5
1869   ac_status=$?
1870   echo "$as_me:1870: \$? = $ac_status" >&5
1871   (exit "$ac_status"); }
1872 { (eval echo "$as_me:1872: \"$ac_compiler -V </dev/null >&5\"") >&5
1873   (eval $ac_compiler -V </dev/null >&5) 2>&5
1874   ac_status=$?
1875   echo "$as_me:1875: \$? = $ac_status" >&5
1876   (exit "$ac_status"); }
1877
1878 cat >"conftest.$ac_ext" <<_ACEOF
1879 #line 1879 "configure"
1880 #include "confdefs.h"
1881
1882 int
1883 main (void)
1884 {
1885
1886   ;
1887   return 0;
1888 }
1889 _ACEOF
1890 ac_clean_files_save=$ac_clean_files
1891 ac_clean_files="$ac_clean_files a.out a.exe"
1892 # Try to create an executable without -o first, disregard a.out.
1893 # It will help us diagnose broken compilers, and finding out an intuition
1894 # of exeext.
1895 echo "$as_me:1895: checking for C compiler default output" >&5
1896 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1897 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1898 if { (eval echo "$as_me:1898: \"$ac_link_default\"") >&5
1899   (eval $ac_link_default) 2>&5
1900   ac_status=$?
1901   echo "$as_me:1901: \$? = $ac_status" >&5
1902   (exit "$ac_status"); }; then
1903   # Find the output, starting from the most likely.  This scheme is
1904 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1905 # resort.
1906 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1907                 ls a.out conftest 2>/dev/null;
1908                 ls a.* conftest.* 2>/dev/null`; do
1909   case $ac_file in
1910     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1911     a.out ) # We found the default executable, but exeext='' is most
1912             # certainly right.
1913             break;;
1914     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1915           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1916           export ac_cv_exeext
1917           break;;
1918     * ) break;;
1919   esac
1920 done
1921 else
1922   echo "$as_me: failed program was:" >&5
1923 cat "conftest.$ac_ext" >&5
1924 { { echo "$as_me:1924: error: C compiler cannot create executables" >&5
1925 echo "$as_me: error: C compiler cannot create executables" >&2;}
1926    { (exit 77); exit 77; }; }
1927 fi
1928
1929 ac_exeext=$ac_cv_exeext
1930 echo "$as_me:1930: result: $ac_file" >&5
1931 echo "${ECHO_T}$ac_file" >&6
1932
1933 # Check the compiler produces executables we can run.  If not, either
1934 # the compiler is broken, or we cross compile.
1935 echo "$as_me:1935: checking whether the C compiler works" >&5
1936 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1937 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1938 # If not cross compiling, check that we can run a simple program.
1939 if test "$cross_compiling" != yes; then
1940   if { ac_try='./$ac_file'
1941   { (eval echo "$as_me:1941: \"$ac_try\"") >&5
1942   (eval $ac_try) 2>&5
1943   ac_status=$?
1944   echo "$as_me:1944: \$? = $ac_status" >&5
1945   (exit "$ac_status"); }; }; then
1946     cross_compiling=no
1947   else
1948     if test "$cross_compiling" = maybe; then
1949         cross_compiling=yes
1950     else
1951         { { echo "$as_me:1951: error: cannot run C compiled programs.
1952 If you meant to cross compile, use \`--host'." >&5
1953 echo "$as_me: error: cannot run C compiled programs.
1954 If you meant to cross compile, use \`--host'." >&2;}
1955    { (exit 1); exit 1; }; }
1956     fi
1957   fi
1958 fi
1959 echo "$as_me:1959: result: yes" >&5
1960 echo "${ECHO_T}yes" >&6
1961
1962 rm -f a.out a.exe "conftest$ac_cv_exeext"
1963 ac_clean_files=$ac_clean_files_save
1964 # Check the compiler produces executables we can run.  If not, either
1965 # the compiler is broken, or we cross compile.
1966 echo "$as_me:1966: checking whether we are cross compiling" >&5
1967 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1968 echo "$as_me:1968: result: $cross_compiling" >&5
1969 echo "${ECHO_T}$cross_compiling" >&6
1970
1971 echo "$as_me:1971: checking for executable suffix" >&5
1972 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1973 if { (eval echo "$as_me:1973: \"$ac_link\"") >&5
1974   (eval $ac_link) 2>&5
1975   ac_status=$?
1976   echo "$as_me:1976: \$? = $ac_status" >&5
1977   (exit "$ac_status"); }; then
1978   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1979 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1980 # work properly (i.e., refer to `conftest.exe'), while it won't with
1981 # `rm'.
1982 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1983   case $ac_file in
1984     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1985     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1986           export ac_cv_exeext
1987           break;;
1988     * ) break;;
1989   esac
1990 done
1991 else
1992   { { echo "$as_me:1992: error: cannot compute EXEEXT: cannot compile and link" >&5
1993 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1994    { (exit 1); exit 1; }; }
1995 fi
1996
1997 rm -f "conftest$ac_cv_exeext"
1998 echo "$as_me:1998: result: $ac_cv_exeext" >&5
1999 echo "${ECHO_T}$ac_cv_exeext" >&6
2000
2001 rm -f "conftest.$ac_ext"
2002 EXEEXT=$ac_cv_exeext
2003 ac_exeext=$EXEEXT
2004 echo "$as_me:2004: checking for object suffix" >&5
2005 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2006 if test "${ac_cv_objext+set}" = set; then
2007   echo $ECHO_N "(cached) $ECHO_C" >&6
2008 else
2009   cat >"conftest.$ac_ext" <<_ACEOF
2010 #line 2010 "configure"
2011 #include "confdefs.h"
2012
2013 int
2014 main (void)
2015 {
2016
2017   ;
2018   return 0;
2019 }
2020 _ACEOF
2021 rm -f conftest.o conftest.obj
2022 if { (eval echo "$as_me:2022: \"$ac_compile\"") >&5
2023   (eval $ac_compile) 2>&5
2024   ac_status=$?
2025   echo "$as_me:2025: \$? = $ac_status" >&5
2026   (exit "$ac_status"); }; then
2027   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2028   case $ac_file in
2029     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
2030     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2031        break;;
2032   esac
2033 done
2034 else
2035   echo "$as_me: failed program was:" >&5
2036 cat "conftest.$ac_ext" >&5
2037 { { echo "$as_me:2037: error: cannot compute OBJEXT: cannot compile" >&5
2038 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2039    { (exit 1); exit 1; }; }
2040 fi
2041
2042 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
2043 fi
2044 echo "$as_me:2044: result: $ac_cv_objext" >&5
2045 echo "${ECHO_T}$ac_cv_objext" >&6
2046 OBJEXT=$ac_cv_objext
2047 ac_objext=$OBJEXT
2048 echo "$as_me:2048: checking whether we are using the GNU C compiler" >&5
2049 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2050 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2051   echo $ECHO_N "(cached) $ECHO_C" >&6
2052 else
2053   cat >"conftest.$ac_ext" <<_ACEOF
2054 #line 2054 "configure"
2055 #include "confdefs.h"
2056
2057 int
2058 main (void)
2059 {
2060 #ifndef __GNUC__
2061        choke me
2062 #endif
2063
2064   ;
2065   return 0;
2066 }
2067 _ACEOF
2068 rm -f "conftest.$ac_objext"
2069 if { (eval echo "$as_me:2069: \"$ac_compile\"") >&5
2070   (eval $ac_compile) 2>&5
2071   ac_status=$?
2072   echo "$as_me:2072: \$? = $ac_status" >&5
2073   (exit "$ac_status"); } &&
2074          { ac_try='test -s "conftest.$ac_objext"'
2075   { (eval echo "$as_me:2075: \"$ac_try\"") >&5
2076   (eval $ac_try) 2>&5
2077   ac_status=$?
2078   echo "$as_me:2078: \$? = $ac_status" >&5
2079   (exit "$ac_status"); }; }; then
2080   ac_compiler_gnu=yes
2081 else
2082   echo "$as_me: failed program was:" >&5
2083 cat "conftest.$ac_ext" >&5
2084 ac_compiler_gnu=no
2085 fi
2086 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2087 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2088
2089 fi
2090 echo "$as_me:2090: result: $ac_cv_c_compiler_gnu" >&5
2091 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2092 GCC=`test $ac_compiler_gnu = yes && echo yes`
2093 ac_test_CFLAGS=${CFLAGS+set}
2094 ac_save_CFLAGS=$CFLAGS
2095 CFLAGS="-g"
2096 echo "$as_me:2096: checking whether $CC accepts -g" >&5
2097 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2098 if test "${ac_cv_prog_cc_g+set}" = set; then
2099   echo $ECHO_N "(cached) $ECHO_C" >&6
2100 else
2101   cat >"conftest.$ac_ext" <<_ACEOF
2102 #line 2102 "configure"
2103 #include "confdefs.h"
2104
2105 int
2106 main (void)
2107 {
2108
2109   ;
2110   return 0;
2111 }
2112 _ACEOF
2113 rm -f "conftest.$ac_objext"
2114 if { (eval echo "$as_me:2114: \"$ac_compile\"") >&5
2115   (eval $ac_compile) 2>&5
2116   ac_status=$?
2117   echo "$as_me:2117: \$? = $ac_status" >&5
2118   (exit "$ac_status"); } &&
2119          { ac_try='test -s "conftest.$ac_objext"'
2120   { (eval echo "$as_me:2120: \"$ac_try\"") >&5
2121   (eval $ac_try) 2>&5
2122   ac_status=$?
2123   echo "$as_me:2123: \$? = $ac_status" >&5
2124   (exit "$ac_status"); }; }; then
2125   ac_cv_prog_cc_g=yes
2126 else
2127   echo "$as_me: failed program was:" >&5
2128 cat "conftest.$ac_ext" >&5
2129 ac_cv_prog_cc_g=no
2130 fi
2131 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2132 fi
2133 echo "$as_me:2133: result: $ac_cv_prog_cc_g" >&5
2134 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2135 if test "$ac_test_CFLAGS" = set; then
2136   CFLAGS=$ac_save_CFLAGS
2137 elif test $ac_cv_prog_cc_g = yes; then
2138   if test "$GCC" = yes; then
2139     CFLAGS="-g -O2"
2140   else
2141     CFLAGS="-g"
2142   fi
2143 else
2144   if test "$GCC" = yes; then
2145     CFLAGS="-O2"
2146   else
2147     CFLAGS=
2148   fi
2149 fi
2150 # Some people use a C++ compiler to compile C.  Since we use `exit',
2151 # in C++ we need to declare it.  In case someone uses the same compiler
2152 # for both compiling C and C++ we need to have the C++ compiler decide
2153 # the declaration of exit, since it's the most demanding environment.
2154 cat >"conftest.$ac_ext" <<_ACEOF
2155 #ifndef __cplusplus
2156   choke me
2157 #endif
2158 _ACEOF
2159 rm -f "conftest.$ac_objext"
2160 if { (eval echo "$as_me:2160: \"$ac_compile\"") >&5
2161   (eval $ac_compile) 2>&5
2162   ac_status=$?
2163   echo "$as_me:2163: \$? = $ac_status" >&5
2164   (exit "$ac_status"); } &&
2165          { ac_try='test -s "conftest.$ac_objext"'
2166   { (eval echo "$as_me:2166: \"$ac_try\"") >&5
2167   (eval $ac_try) 2>&5
2168   ac_status=$?
2169   echo "$as_me:2169: \$? = $ac_status" >&5
2170   (exit "$ac_status"); }; }; then
2171   for ac_declaration in \
2172    ''\
2173    '#include <stdlib.h>' \
2174    'extern "C" void std::exit (int) throw (); using std::exit;' \
2175    'extern "C" void std::exit (int); using std::exit;' \
2176    'extern "C" void exit (int) throw ();' \
2177    'extern "C" void exit (int);' \
2178    'void exit (int);'
2179 do
2180   cat >"conftest.$ac_ext" <<_ACEOF
2181 #line 2181 "configure"
2182 #include "confdefs.h"
2183 #include <stdlib.h>
2184 $ac_declaration
2185 int
2186 main (void)
2187 {
2188 exit (42);
2189   ;
2190   return 0;
2191 }
2192 _ACEOF
2193 rm -f "conftest.$ac_objext"
2194 if { (eval echo "$as_me:2194: \"$ac_compile\"") >&5
2195   (eval $ac_compile) 2>&5
2196   ac_status=$?
2197   echo "$as_me:2197: \$? = $ac_status" >&5
2198   (exit "$ac_status"); } &&
2199          { ac_try='test -s "conftest.$ac_objext"'
2200   { (eval echo "$as_me:2200: \"$ac_try\"") >&5
2201   (eval $ac_try) 2>&5
2202   ac_status=$?
2203   echo "$as_me:2203: \$? = $ac_status" >&5
2204   (exit "$ac_status"); }; }; then
2205   :
2206 else
2207   echo "$as_me: failed program was:" >&5
2208 cat "conftest.$ac_ext" >&5
2209 continue
2210 fi
2211 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2212   cat >"conftest.$ac_ext" <<_ACEOF
2213 #line 2213 "configure"
2214 #include "confdefs.h"
2215 $ac_declaration
2216 int
2217 main (void)
2218 {
2219 exit (42);
2220   ;
2221   return 0;
2222 }
2223 _ACEOF
2224 rm -f "conftest.$ac_objext"
2225 if { (eval echo "$as_me:2225: \"$ac_compile\"") >&5
2226   (eval $ac_compile) 2>&5
2227   ac_status=$?
2228   echo "$as_me:2228: \$? = $ac_status" >&5
2229   (exit "$ac_status"); } &&
2230          { ac_try='test -s "conftest.$ac_objext"'
2231   { (eval echo "$as_me:2231: \"$ac_try\"") >&5
2232   (eval $ac_try) 2>&5
2233   ac_status=$?
2234   echo "$as_me:2234: \$? = $ac_status" >&5
2235   (exit "$ac_status"); }; }; then
2236   break
2237 else
2238   echo "$as_me: failed program was:" >&5
2239 cat "conftest.$ac_ext" >&5
2240 fi
2241 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2242 done
2243 rm -rf conftest*
2244 if test -n "$ac_declaration"; then
2245   echo '#ifdef __cplusplus' >>confdefs.h
2246   echo "$ac_declaration"    >>confdefs.h
2247   echo '#endif'             >>confdefs.h
2248 fi
2249
2250 else
2251   echo "$as_me: failed program was:" >&5
2252 cat "conftest.$ac_ext" >&5
2253 fi
2254 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2255 ac_ext=c
2256 ac_cpp='$CPP $CPPFLAGS'
2257 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2258 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2259 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2260 ac_main_return="return"
2261
2262 GCC_VERSION=none
2263 if test "$GCC" = yes ; then
2264         echo "$as_me:2264: checking version of $CC" >&5
2265 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2266         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.].*//'`"
2267         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2268         echo "$as_me:2268: result: $GCC_VERSION" >&5
2269 echo "${ECHO_T}$GCC_VERSION" >&6
2270 fi
2271
2272 INTEL_COMPILER=no
2273
2274 if test "$GCC" = yes ; then
2275         case "$host_os" in
2276         (linux*|gnu*)
2277                 echo "$as_me:2277: checking if this is really Intel C compiler" >&5
2278 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2279                 cf_save_CFLAGS="$CFLAGS"
2280                 CFLAGS="$CFLAGS -no-gcc"
2281                 cat >"conftest.$ac_ext" <<_ACEOF
2282 #line 2282 "configure"
2283 #include "confdefs.h"
2284
2285 int
2286 main (void)
2287 {
2288
2289 #ifdef __INTEL_COMPILER
2290 #else
2291 make an error
2292 #endif
2293
2294   ;
2295   return 0;
2296 }
2297 _ACEOF
2298 rm -f "conftest.$ac_objext"
2299 if { (eval echo "$as_me:2299: \"$ac_compile\"") >&5
2300   (eval $ac_compile) 2>&5
2301   ac_status=$?
2302   echo "$as_me:2302: \$? = $ac_status" >&5
2303   (exit "$ac_status"); } &&
2304          { ac_try='test -s "conftest.$ac_objext"'
2305   { (eval echo "$as_me:2305: \"$ac_try\"") >&5
2306   (eval $ac_try) 2>&5
2307   ac_status=$?
2308   echo "$as_me:2308: \$? = $ac_status" >&5
2309   (exit "$ac_status"); }; }; then
2310   INTEL_COMPILER=yes
2311 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2312
2313 else
2314   echo "$as_me: failed program was:" >&5
2315 cat "conftest.$ac_ext" >&5
2316 fi
2317 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2318                 CFLAGS="$cf_save_CFLAGS"
2319                 echo "$as_me:2319: result: $INTEL_COMPILER" >&5
2320 echo "${ECHO_T}$INTEL_COMPILER" >&6
2321                 ;;
2322         esac
2323 fi
2324
2325 CLANG_COMPILER=no
2326
2327 if test "$GCC" = yes ; then
2328         echo "$as_me:2328: checking if this is really Clang C compiler" >&5
2329 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2330         cf_save_CFLAGS="$CFLAGS"
2331         cat >"conftest.$ac_ext" <<_ACEOF
2332 #line 2332 "configure"
2333 #include "confdefs.h"
2334
2335 int
2336 main (void)
2337 {
2338
2339 #ifdef __clang__
2340 #else
2341 make an error
2342 #endif
2343
2344   ;
2345   return 0;
2346 }
2347 _ACEOF
2348 rm -f "conftest.$ac_objext"
2349 if { (eval echo "$as_me:2349: \"$ac_compile\"") >&5
2350   (eval $ac_compile) 2>&5
2351   ac_status=$?
2352   echo "$as_me:2352: \$? = $ac_status" >&5
2353   (exit "$ac_status"); } &&
2354          { ac_try='test -s "conftest.$ac_objext"'
2355   { (eval echo "$as_me:2355: \"$ac_try\"") >&5
2356   (eval $ac_try) 2>&5
2357   ac_status=$?
2358   echo "$as_me:2358: \$? = $ac_status" >&5
2359   (exit "$ac_status"); }; }; then
2360   CLANG_COMPILER=yes
2361
2362 else
2363   echo "$as_me: failed program was:" >&5
2364 cat "conftest.$ac_ext" >&5
2365 fi
2366 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2367         CFLAGS="$cf_save_CFLAGS"
2368         echo "$as_me:2368: result: $CLANG_COMPILER" >&5
2369 echo "${ECHO_T}$CLANG_COMPILER" >&6
2370 fi
2371
2372 CLANG_VERSION=none
2373
2374 if test "x$CLANG_COMPILER" = "xyes" ; then
2375         case "$CC" in
2376         (c[1-9][0-9]|*/c[1-9][0-9])
2377                 { echo "$as_me:2377: WARNING: replacing broken compiler alias $CC" >&5
2378 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2379                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2380                 CC=clang
2381                 ;;
2382         esac
2383
2384         echo "$as_me:2384: checking version of $CC" >&5
2385 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2386         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.].*//'`"
2387         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2388         echo "$as_me:2388: result: $CLANG_VERSION" >&5
2389 echo "${ECHO_T}$CLANG_VERSION" >&6
2390
2391         for cf_clang_opt in \
2392                 -Qunused-arguments \
2393                 -Wno-error=implicit-function-declaration
2394         do
2395                 echo "$as_me:2395: checking if option $cf_clang_opt works" >&5
2396 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2397                 cf_save_CFLAGS="$CFLAGS"
2398                 CFLAGS="$CFLAGS $cf_clang_opt"
2399                 cat >"conftest.$ac_ext" <<_ACEOF
2400 #line 2400 "configure"
2401 #include "confdefs.h"
2402
2403                         #include <stdio.h>
2404 int
2405 main (void)
2406 {
2407
2408                         printf("hello!\\n");
2409   ;
2410   return 0;
2411 }
2412 _ACEOF
2413 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2414 if { (eval echo "$as_me:2414: \"$ac_link\"") >&5
2415   (eval $ac_link) 2>&5
2416   ac_status=$?
2417   echo "$as_me:2417: \$? = $ac_status" >&5
2418   (exit "$ac_status"); } &&
2419          { ac_try='test -s "conftest$ac_exeext"'
2420   { (eval echo "$as_me:2420: \"$ac_try\"") >&5
2421   (eval $ac_try) 2>&5
2422   ac_status=$?
2423   echo "$as_me:2423: \$? = $ac_status" >&5
2424   (exit "$ac_status"); }; }; then
2425
2426                         cf_clang_optok=yes
2427 else
2428   echo "$as_me: failed program was:" >&5
2429 cat "conftest.$ac_ext" >&5
2430
2431                         cf_clang_optok=no
2432 fi
2433 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2434                 echo "$as_me:2434: result: $cf_clang_optok" >&5
2435 echo "${ECHO_T}$cf_clang_optok" >&6
2436                 CFLAGS="$cf_save_CFLAGS"
2437                 if test "$cf_clang_optok" = yes; then
2438                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2439
2440 echo "${as_me:-configure}:2440: testing adding option $cf_clang_opt ..." 1>&5
2441
2442         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2443         CFLAGS="${CFLAGS}$cf_clang_opt"
2444
2445                 fi
2446         done
2447 fi
2448
2449 echo "$as_me:2449: checking for $CC option to accept ANSI C" >&5
2450 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2451 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2452   echo $ECHO_N "(cached) $ECHO_C" >&6
2453 else
2454   ac_cv_prog_cc_stdc=no
2455 ac_save_CC=$CC
2456 cat >"conftest.$ac_ext" <<_ACEOF
2457 #line 2457 "configure"
2458 #include "confdefs.h"
2459 #include <stdarg.h>
2460 #include <stdio.h>
2461 #include <sys/types.h>
2462 #include <sys/stat.h>
2463 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2464 struct buf { int x; };
2465 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2466 static char *e (p, i)
2467      char **p;
2468      int i;
2469 {
2470   return p[i];
2471 }
2472 static char *f (char * (*g) (char **, int), char **p, ...)
2473 {
2474   char *s;
2475   va_list v;
2476   va_start (v,p);
2477   s = g (p, va_arg (v,int));
2478   va_end (v);
2479   return s;
2480 }
2481 int test (int i, double x);
2482 struct s1 {int (*f) (int a);};
2483 struct s2 {int (*f) (double a);};
2484 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2485 int argc;
2486 char **argv;
2487 int
2488 main (void)
2489 {
2490 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2491   ;
2492   return 0;
2493 }
2494 _ACEOF
2495 # Don't try gcc -ansi; that turns off useful extensions and
2496 # breaks some systems' header files.
2497 # AIX                   -qlanglvl=ansi
2498 # Ultrix and OSF/1      -std1
2499 # HP-UX 10.20 and later -Ae
2500 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2501 # SVR4                  -Xc -D__EXTENSIONS__
2502 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2503 do
2504   CC="$ac_save_CC $ac_arg"
2505   rm -f "conftest.$ac_objext"
2506 if { (eval echo "$as_me:2506: \"$ac_compile\"") >&5
2507   (eval $ac_compile) 2>&5
2508   ac_status=$?
2509   echo "$as_me:2509: \$? = $ac_status" >&5
2510   (exit "$ac_status"); } &&
2511          { ac_try='test -s "conftest.$ac_objext"'
2512   { (eval echo "$as_me:2512: \"$ac_try\"") >&5
2513   (eval $ac_try) 2>&5
2514   ac_status=$?
2515   echo "$as_me:2515: \$? = $ac_status" >&5
2516   (exit "$ac_status"); }; }; then
2517   ac_cv_prog_cc_stdc=$ac_arg
2518 break
2519 else
2520   echo "$as_me: failed program was:" >&5
2521 cat "conftest.$ac_ext" >&5
2522 fi
2523 rm -f "conftest.$ac_objext"
2524 done
2525 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2526 CC=$ac_save_CC
2527
2528 fi
2529
2530 case "x$ac_cv_prog_cc_stdc" in
2531   x|xno)
2532     echo "$as_me:2532: result: none needed" >&5
2533 echo "${ECHO_T}none needed" >&6 ;;
2534   *)
2535     echo "$as_me:2535: result: $ac_cv_prog_cc_stdc" >&5
2536 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2537     CC="$CC $ac_cv_prog_cc_stdc" ;;
2538 esac
2539
2540 # This should have been defined by AC_PROG_CC
2541 : "${CC:=cc}"
2542
2543 echo "$as_me:2543: checking \$CFLAGS variable" >&5
2544 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2545 case "x$CFLAGS" in
2546 (*-[IUD]*)
2547         echo "$as_me:2547: result: broken" >&5
2548 echo "${ECHO_T}broken" >&6
2549         { echo "$as_me:2549: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2550 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2551         cf_flags="$CFLAGS"
2552         CFLAGS=
2553         for cf_arg in $cf_flags
2554         do
2555
2556 cf_fix_cppflags=no
2557 cf_new_cflags=
2558 cf_new_cppflags=
2559 cf_new_extra_cppflags=
2560
2561 for cf_add_cflags in $cf_arg
2562 do
2563 case "$cf_fix_cppflags" in
2564 (no)
2565         case "$cf_add_cflags" in
2566         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2567                 case "$cf_add_cflags" in
2568                 (-D*)
2569                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2570
2571                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2572                                 && test -z "${cf_tst_cflags}" \
2573                                 && cf_fix_cppflags=yes
2574
2575                         if test "$cf_fix_cppflags" = yes ; then
2576
2577         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2578         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2579
2580                                 continue
2581                         elif test "${cf_tst_cflags}" = "\"'" ; then
2582
2583         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2584         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2585
2586                                 continue
2587                         fi
2588                         ;;
2589                 esac
2590                 case "$CPPFLAGS" in
2591                 (*$cf_add_cflags)
2592                         ;;
2593                 (*)
2594                         case "$cf_add_cflags" in
2595                         (-D*)
2596                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2597
2598 CPPFLAGS=`echo "$CPPFLAGS" | \
2599         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2600                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2601
2602                                 ;;
2603                         esac
2604
2605         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2606         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2607
2608                         ;;
2609                 esac
2610                 ;;
2611         (*)
2612
2613         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2614         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2615
2616                 ;;
2617         esac
2618         ;;
2619 (yes)
2620
2621         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2622         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2623
2624         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2625
2626         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2627                 && test -z "${cf_tst_cflags}" \
2628                 && cf_fix_cppflags=no
2629         ;;
2630 esac
2631 done
2632
2633 if test -n "$cf_new_cflags" ; then
2634
2635         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2636         CFLAGS="${CFLAGS}$cf_new_cflags"
2637
2638 fi
2639
2640 if test -n "$cf_new_cppflags" ; then
2641
2642         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2643         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2644
2645 fi
2646
2647 if test -n "$cf_new_extra_cppflags" ; then
2648
2649         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2650         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2651
2652 fi
2653
2654         done
2655         ;;
2656 (*)
2657         echo "$as_me:2657: result: ok" >&5
2658 echo "${ECHO_T}ok" >&6
2659         ;;
2660 esac
2661
2662 echo "$as_me:2662: checking \$CC variable" >&5
2663 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2664 case "$CC" in
2665 (*[\ \  ]-*)
2666         echo "$as_me:2666: result: broken" >&5
2667 echo "${ECHO_T}broken" >&6
2668         { echo "$as_me:2668: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2669 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2670         # humor him...
2671         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2672         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2673         CC="$cf_prog"
2674         for cf_arg in $cf_flags
2675         do
2676                 case "x$cf_arg" in
2677                 (x-[IUDfgOW]*)
2678
2679 cf_fix_cppflags=no
2680 cf_new_cflags=
2681 cf_new_cppflags=
2682 cf_new_extra_cppflags=
2683
2684 for cf_add_cflags in $cf_arg
2685 do
2686 case "$cf_fix_cppflags" in
2687 (no)
2688         case "$cf_add_cflags" in
2689         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2690                 case "$cf_add_cflags" in
2691                 (-D*)
2692                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2693
2694                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2695                                 && test -z "${cf_tst_cflags}" \
2696                                 && cf_fix_cppflags=yes
2697
2698                         if test "$cf_fix_cppflags" = yes ; then
2699
2700         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2701         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2702
2703                                 continue
2704                         elif test "${cf_tst_cflags}" = "\"'" ; then
2705
2706         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2707         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2708
2709                                 continue
2710                         fi
2711                         ;;
2712                 esac
2713                 case "$CPPFLAGS" in
2714                 (*$cf_add_cflags)
2715                         ;;
2716                 (*)
2717                         case "$cf_add_cflags" in
2718                         (-D*)
2719                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2720
2721 CPPFLAGS=`echo "$CPPFLAGS" | \
2722         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2723                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2724
2725                                 ;;
2726                         esac
2727
2728         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2729         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2730
2731                         ;;
2732                 esac
2733                 ;;
2734         (*)
2735
2736         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2737         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2738
2739                 ;;
2740         esac
2741         ;;
2742 (yes)
2743
2744         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2745         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2746
2747         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2748
2749         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2750                 && test -z "${cf_tst_cflags}" \
2751                 && cf_fix_cppflags=no
2752         ;;
2753 esac
2754 done
2755
2756 if test -n "$cf_new_cflags" ; then
2757
2758         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2759         CFLAGS="${CFLAGS}$cf_new_cflags"
2760
2761 fi
2762
2763 if test -n "$cf_new_cppflags" ; then
2764
2765         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2766         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2767
2768 fi
2769
2770 if test -n "$cf_new_extra_cppflags" ; then
2771
2772         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2773         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2774
2775 fi
2776
2777                         ;;
2778                 (*)
2779                         CC="$CC $cf_arg"
2780                         ;;
2781                 esac
2782         done
2783         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2784
2785 echo "${as_me:-configure}:2785: testing resulting CC: '$CC' ..." 1>&5
2786
2787         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2788
2789 echo "${as_me:-configure}:2789: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2790
2791         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2792
2793 echo "${as_me:-configure}:2793: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2794
2795         ;;
2796 (*)
2797         echo "$as_me:2797: result: ok" >&5
2798 echo "${ECHO_T}ok" >&6
2799         ;;
2800 esac
2801
2802 ac_ext=c
2803 ac_cpp='$CPP $CPPFLAGS'
2804 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2805 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2806 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2807 ac_main_return="return"
2808 echo "$as_me:2808: checking how to run the C preprocessor" >&5
2809 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2810 # On Suns, sometimes $CPP names a directory.
2811 if test -n "$CPP" && test -d "$CPP"; then
2812   CPP=
2813 fi
2814 if test -z "$CPP"; then
2815   if test "${ac_cv_prog_CPP+set}" = set; then
2816   echo $ECHO_N "(cached) $ECHO_C" >&6
2817 else
2818       # Double quotes because CPP needs to be expanded
2819     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2820     do
2821       ac_preproc_ok=false
2822 for ac_c_preproc_warn_flag in '' yes
2823 do
2824   # Use a header file that comes with gcc, so configuring glibc
2825   # with a fresh cross-compiler works.
2826   # On the NeXT, cc -E runs the code through the compiler's parser,
2827   # not just through cpp. "Syntax error" is here to catch this case.
2828   cat >"conftest.$ac_ext" <<_ACEOF
2829 #line 2829 "configure"
2830 #include "confdefs.h"
2831 #include <assert.h>
2832                      Syntax error
2833 _ACEOF
2834 if { (eval echo "$as_me:2834: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2835   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2836   ac_status=$?
2837   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2838   rm -f conftest.er1
2839   cat conftest.err >&5
2840   echo "$as_me:2840: \$? = $ac_status" >&5
2841   (exit "$ac_status"); } >/dev/null; then
2842   if test -s conftest.err; then
2843     ac_cpp_err=$ac_c_preproc_warn_flag
2844   else
2845     ac_cpp_err=
2846   fi
2847 else
2848   ac_cpp_err=yes
2849 fi
2850 if test -z "$ac_cpp_err"; then
2851   :
2852 else
2853   echo "$as_me: failed program was:" >&5
2854   cat "conftest.$ac_ext" >&5
2855   # Broken: fails on valid input.
2856 continue
2857 fi
2858 rm -f conftest.err "conftest.$ac_ext"
2859
2860   # OK, works on sane cases.  Now check whether non-existent headers
2861   # can be detected and how.
2862   cat >"conftest.$ac_ext" <<_ACEOF
2863 #line 2863 "configure"
2864 #include "confdefs.h"
2865 #include <ac_nonexistent.h>
2866 _ACEOF
2867 if { (eval echo "$as_me:2867: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2868   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2869   ac_status=$?
2870   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2871   rm -f conftest.er1
2872   cat conftest.err >&5
2873   echo "$as_me:2873: \$? = $ac_status" >&5
2874   (exit "$ac_status"); } >/dev/null; then
2875   if test -s conftest.err; then
2876     ac_cpp_err=$ac_c_preproc_warn_flag
2877   else
2878     ac_cpp_err=
2879   fi
2880 else
2881   ac_cpp_err=yes
2882 fi
2883 if test -z "$ac_cpp_err"; then
2884   # Broken: success on invalid input.
2885 continue
2886 else
2887   echo "$as_me: failed program was:" >&5
2888   cat "conftest.$ac_ext" >&5
2889   # Passes both tests.
2890 ac_preproc_ok=:
2891 break
2892 fi
2893 rm -f conftest.err "conftest.$ac_ext"
2894
2895 done
2896 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2897 rm -f conftest.err "conftest.$ac_ext"
2898 if $ac_preproc_ok; then
2899   break
2900 fi
2901
2902     done
2903     ac_cv_prog_CPP=$CPP
2904
2905 fi
2906   CPP=$ac_cv_prog_CPP
2907 else
2908   ac_cv_prog_CPP=$CPP
2909 fi
2910 echo "$as_me:2910: result: $CPP" >&5
2911 echo "${ECHO_T}$CPP" >&6
2912 ac_preproc_ok=false
2913 for ac_c_preproc_warn_flag in '' yes
2914 do
2915   # Use a header file that comes with gcc, so configuring glibc
2916   # with a fresh cross-compiler works.
2917   # On the NeXT, cc -E runs the code through the compiler's parser,
2918   # not just through cpp. "Syntax error" is here to catch this case.
2919   cat >"conftest.$ac_ext" <<_ACEOF
2920 #line 2920 "configure"
2921 #include "confdefs.h"
2922 #include <assert.h>
2923                      Syntax error
2924 _ACEOF
2925 if { (eval echo "$as_me:2925: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2926   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2927   ac_status=$?
2928   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2929   rm -f conftest.er1
2930   cat conftest.err >&5
2931   echo "$as_me:2931: \$? = $ac_status" >&5
2932   (exit "$ac_status"); } >/dev/null; then
2933   if test -s conftest.err; then
2934     ac_cpp_err=$ac_c_preproc_warn_flag
2935   else
2936     ac_cpp_err=
2937   fi
2938 else
2939   ac_cpp_err=yes
2940 fi
2941 if test -z "$ac_cpp_err"; then
2942   :
2943 else
2944   echo "$as_me: failed program was:" >&5
2945   cat "conftest.$ac_ext" >&5
2946   # Broken: fails on valid input.
2947 continue
2948 fi
2949 rm -f conftest.err "conftest.$ac_ext"
2950
2951   # OK, works on sane cases.  Now check whether non-existent headers
2952   # can be detected and how.
2953   cat >"conftest.$ac_ext" <<_ACEOF
2954 #line 2954 "configure"
2955 #include "confdefs.h"
2956 #include <ac_nonexistent.h>
2957 _ACEOF
2958 if { (eval echo "$as_me:2958: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2959   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2960   ac_status=$?
2961   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2962   rm -f conftest.er1
2963   cat conftest.err >&5
2964   echo "$as_me:2964: \$? = $ac_status" >&5
2965   (exit "$ac_status"); } >/dev/null; then
2966   if test -s conftest.err; then
2967     ac_cpp_err=$ac_c_preproc_warn_flag
2968   else
2969     ac_cpp_err=
2970   fi
2971 else
2972   ac_cpp_err=yes
2973 fi
2974 if test -z "$ac_cpp_err"; then
2975   # Broken: success on invalid input.
2976 continue
2977 else
2978   echo "$as_me: failed program was:" >&5
2979   cat "conftest.$ac_ext" >&5
2980   # Passes both tests.
2981 ac_preproc_ok=:
2982 break
2983 fi
2984 rm -f conftest.err "conftest.$ac_ext"
2985
2986 done
2987 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2988 rm -f conftest.err "conftest.$ac_ext"
2989 if $ac_preproc_ok; then
2990   :
2991 else
2992   { { echo "$as_me:2992: error: C preprocessor \"$CPP\" fails sanity check" >&5
2993 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2994    { (exit 1); exit 1; }; }
2995 fi
2996
2997 ac_ext=c
2998 ac_cpp='$CPP $CPPFLAGS'
2999 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3000 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3001 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3002 ac_main_return="return"
3003
3004 if test $ac_cv_c_compiler_gnu = yes; then
3005     echo "$as_me:3005: checking whether $CC needs -traditional" >&5
3006 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
3007 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
3008   echo $ECHO_N "(cached) $ECHO_C" >&6
3009 else
3010     ac_pattern="Autoconf.*'x'"
3011   cat >"conftest.$ac_ext" <<_ACEOF
3012 #line 3012 "configure"
3013 #include "confdefs.h"
3014 #include <sgtty.h>
3015 int Autoconf = TIOCGETP;
3016 _ACEOF
3017 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3018   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3019   ac_cv_prog_gcc_traditional=yes
3020 else
3021   ac_cv_prog_gcc_traditional=no
3022 fi
3023 rm -rf conftest*
3024
3025   if test $ac_cv_prog_gcc_traditional = no; then
3026     cat >"conftest.$ac_ext" <<_ACEOF
3027 #line 3027 "configure"
3028 #include "confdefs.h"
3029 #include <termio.h>
3030 int Autoconf = TCGETA;
3031 _ACEOF
3032 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3033   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3034   ac_cv_prog_gcc_traditional=yes
3035 fi
3036 rm -rf conftest*
3037
3038   fi
3039 fi
3040 echo "$as_me:3040: result: $ac_cv_prog_gcc_traditional" >&5
3041 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3042   if test $ac_cv_prog_gcc_traditional = yes; then
3043     CC="$CC -traditional"
3044   fi
3045 fi
3046
3047 echo "$as_me:3047: checking whether $CC understands -c and -o together" >&5
3048 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3049 if test "${cf_cv_prog_CC_c_o+set}" = set; then
3050   echo $ECHO_N "(cached) $ECHO_C" >&6
3051 else
3052
3053 cat > conftest.$ac_ext <<CF_EOF
3054 int main(void)
3055 {
3056         ${cf_cv_main_return:-return}(0);
3057 }
3058 CF_EOF
3059 # We do the test twice because some compilers refuse to overwrite an
3060 # existing .o file with -o, though they will create one.
3061 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3062 if { (eval echo "$as_me:3062: \"$ac_try\"") >&5
3063   (eval $ac_try) 2>&5
3064   ac_status=$?
3065   echo "$as_me:3065: \$? = $ac_status" >&5
3066   (exit "$ac_status"); } &&
3067   test -f conftest2.$ac_objext && { (eval echo "$as_me:3067: \"$ac_try\"") >&5
3068   (eval $ac_try) 2>&5
3069   ac_status=$?
3070   echo "$as_me:3070: \$? = $ac_status" >&5
3071   (exit "$ac_status"); };
3072 then
3073   eval cf_cv_prog_CC_c_o=yes
3074 else
3075   eval cf_cv_prog_CC_c_o=no
3076 fi
3077 rm -rf ./conftest*
3078
3079 fi
3080 if test "$cf_cv_prog_CC_c_o" = yes; then
3081   echo "$as_me:3081: result: yes" >&5
3082 echo "${ECHO_T}yes" >&6
3083 else
3084   echo "$as_me:3084: result: no" >&5
3085 echo "${ECHO_T}no" >&6
3086 fi
3087
3088 if test "$cross_compiling" = yes ; then
3089         LDCONFIG=:
3090 else
3091         case "$cf_cv_system_name" in
3092         (dragonfly*|mirbsd*|freebsd*)
3093                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
3094                 ;;
3095         (*) LDPATH=$PATH:/sbin:/usr/sbin
3096                 # Extract the first word of "ldconfig", so it can be a program name with args.
3097 set dummy ldconfig; ac_word=$2
3098 echo "$as_me:3098: checking for $ac_word" >&5
3099 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3100 if test "${ac_cv_path_LDCONFIG+set}" = set; then
3101   echo $ECHO_N "(cached) $ECHO_C" >&6
3102 else
3103   case $LDCONFIG in
3104   [\\/]* | ?:[\\/]*)
3105   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
3106   ;;
3107   *)
3108   ac_save_IFS=$IFS; IFS=$ac_path_separator
3109 ac_dummy="$LDPATH"
3110 for ac_dir in $ac_dummy; do
3111   IFS=$ac_save_IFS
3112   test -z "$ac_dir" && ac_dir=.
3113   if $as_executable_p "$ac_dir/$ac_word"; then
3114    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
3115    echo "$as_me:3115: found $ac_dir/$ac_word" >&5
3116    break
3117 fi
3118 done
3119
3120   ;;
3121 esac
3122 fi
3123 LDCONFIG=$ac_cv_path_LDCONFIG
3124
3125 if test -n "$LDCONFIG"; then
3126   echo "$as_me:3126: result: $LDCONFIG" >&5
3127 echo "${ECHO_T}$LDCONFIG" >&6
3128 else
3129   echo "$as_me:3129: result: no" >&5
3130 echo "${ECHO_T}no" >&6
3131 fi
3132
3133                 ;;
3134         esac
3135 fi
3136
3137 echo "$as_me:3137: checking if you want to ensure bool is consistent with C++" >&5
3138 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
3139
3140 # Check whether --with-cxx or --without-cxx was given.
3141 if test "${with_cxx+set}" = set; then
3142   withval="$with_cxx"
3143   cf_with_cxx=$withval
3144 else
3145   cf_with_cxx=yes
3146 fi;
3147 echo "$as_me:3147: result: $cf_with_cxx" >&5
3148 echo "${ECHO_T}$cf_with_cxx" >&6
3149 if test "X$cf_with_cxx" = Xno ; then
3150         CXX=""
3151         GXX=""
3152 else
3153         # with autoconf 2.13, we can change the error to a warning:
3154                 ac_ext=cc
3155 ac_cpp='$CXXCPP $CPPFLAGS'
3156 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3157 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3158 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3159 ac_main_return="return"
3160 if test -n "$ac_tool_prefix"; then
3161   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3162   do
3163     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3164 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3165 echo "$as_me:3165: checking for $ac_word" >&5
3166 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3167 if test "${ac_cv_prog_CXX+set}" = set; then
3168   echo $ECHO_N "(cached) $ECHO_C" >&6
3169 else
3170   if test -n "$CXX"; then
3171   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3172 else
3173   ac_save_IFS=$IFS; IFS=$ac_path_separator
3174 ac_dummy="$PATH"
3175 for ac_dir in $ac_dummy; do
3176   IFS=$ac_save_IFS
3177   test -z "$ac_dir" && ac_dir=.
3178   $as_executable_p "$ac_dir/$ac_word" || continue
3179 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3180 echo "$as_me:3180: found $ac_dir/$ac_word" >&5
3181 break
3182 done
3183
3184 fi
3185 fi
3186 CXX=$ac_cv_prog_CXX
3187 if test -n "$CXX"; then
3188   echo "$as_me:3188: result: $CXX" >&5
3189 echo "${ECHO_T}$CXX" >&6
3190 else
3191   echo "$as_me:3191: result: no" >&5
3192 echo "${ECHO_T}no" >&6
3193 fi
3194
3195     test -n "$CXX" && break
3196   done
3197 fi
3198 if test -z "$CXX"; then
3199   ac_ct_CXX=$CXX
3200   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3201 do
3202   # Extract the first word of "$ac_prog", so it can be a program name with args.
3203 set dummy $ac_prog; ac_word=$2
3204 echo "$as_me:3204: checking for $ac_word" >&5
3205 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3206 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3207   echo $ECHO_N "(cached) $ECHO_C" >&6
3208 else
3209   if test -n "$ac_ct_CXX"; then
3210   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3211 else
3212   ac_save_IFS=$IFS; IFS=$ac_path_separator
3213 ac_dummy="$PATH"
3214 for ac_dir in $ac_dummy; do
3215   IFS=$ac_save_IFS
3216   test -z "$ac_dir" && ac_dir=.
3217   $as_executable_p "$ac_dir/$ac_word" || continue
3218 ac_cv_prog_ac_ct_CXX="$ac_prog"
3219 echo "$as_me:3219: found $ac_dir/$ac_word" >&5
3220 break
3221 done
3222
3223 fi
3224 fi
3225 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3226 if test -n "$ac_ct_CXX"; then
3227   echo "$as_me:3227: result: $ac_ct_CXX" >&5
3228 echo "${ECHO_T}$ac_ct_CXX" >&6
3229 else
3230   echo "$as_me:3230: result: no" >&5
3231 echo "${ECHO_T}no" >&6
3232 fi
3233
3234   test -n "$ac_ct_CXX" && break
3235 done
3236 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3237
3238   CXX=$ac_ct_CXX
3239 fi
3240
3241 # Provide some information about the compiler.
3242 echo "$as_me:3242:" \
3243      "checking for C++ compiler version" >&5
3244 ac_compiler=`set X $ac_compile; echo $2`
3245 { (eval echo "$as_me:3245: \"$ac_compiler --version </dev/null >&5\"") >&5
3246   (eval $ac_compiler --version </dev/null >&5) 2>&5
3247   ac_status=$?
3248   echo "$as_me:3248: \$? = $ac_status" >&5
3249   (exit "$ac_status"); }
3250 { (eval echo "$as_me:3250: \"$ac_compiler -v </dev/null >&5\"") >&5
3251   (eval $ac_compiler -v </dev/null >&5) 2>&5
3252   ac_status=$?
3253   echo "$as_me:3253: \$? = $ac_status" >&5
3254   (exit "$ac_status"); }
3255 { (eval echo "$as_me:3255: \"$ac_compiler -V </dev/null >&5\"") >&5
3256   (eval $ac_compiler -V </dev/null >&5) 2>&5
3257   ac_status=$?
3258   echo "$as_me:3258: \$? = $ac_status" >&5
3259   (exit "$ac_status"); }
3260
3261 echo "$as_me:3261: checking whether we are using the GNU C++ compiler" >&5
3262 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3263 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3264   echo $ECHO_N "(cached) $ECHO_C" >&6
3265 else
3266   cat >"conftest.$ac_ext" <<_ACEOF
3267 #line 3267 "configure"
3268 #include "confdefs.h"
3269
3270 int
3271 main (void)
3272 {
3273 #ifndef __GNUC__
3274        choke me
3275 #endif
3276
3277   ;
3278   return 0;
3279 }
3280 _ACEOF
3281 rm -f "conftest.$ac_objext"
3282 if { (eval echo "$as_me:3282: \"$ac_compile\"") >&5
3283   (eval $ac_compile) 2>&5
3284   ac_status=$?
3285   echo "$as_me:3285: \$? = $ac_status" >&5
3286   (exit "$ac_status"); } &&
3287          { ac_try='test -s "conftest.$ac_objext"'
3288   { (eval echo "$as_me:3288: \"$ac_try\"") >&5
3289   (eval $ac_try) 2>&5
3290   ac_status=$?
3291   echo "$as_me:3291: \$? = $ac_status" >&5
3292   (exit "$ac_status"); }; }; then
3293   ac_compiler_gnu=yes
3294 else
3295   echo "$as_me: failed program was:" >&5
3296 cat "conftest.$ac_ext" >&5
3297 ac_compiler_gnu=no
3298 fi
3299 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3300 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3301
3302 fi
3303 echo "$as_me:3303: result: $ac_cv_cxx_compiler_gnu" >&5
3304 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3305 GXX=`test $ac_compiler_gnu = yes && echo yes`
3306 ac_test_CXXFLAGS=${CXXFLAGS+set}
3307 ac_save_CXXFLAGS=$CXXFLAGS
3308 CXXFLAGS="-g"
3309 echo "$as_me:3309: checking whether $CXX accepts -g" >&5
3310 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3311 if test "${ac_cv_prog_cxx_g+set}" = set; then
3312   echo $ECHO_N "(cached) $ECHO_C" >&6
3313 else
3314   cat >"conftest.$ac_ext" <<_ACEOF
3315 #line 3315 "configure"
3316 #include "confdefs.h"
3317
3318 int
3319 main (void)
3320 {
3321
3322   ;
3323   return 0;
3324 }
3325 _ACEOF
3326 rm -f "conftest.$ac_objext"
3327 if { (eval echo "$as_me:3327: \"$ac_compile\"") >&5
3328   (eval $ac_compile) 2>&5
3329   ac_status=$?
3330   echo "$as_me:3330: \$? = $ac_status" >&5
3331   (exit "$ac_status"); } &&
3332          { ac_try='test -s "conftest.$ac_objext"'
3333   { (eval echo "$as_me:3333: \"$ac_try\"") >&5
3334   (eval $ac_try) 2>&5
3335   ac_status=$?
3336   echo "$as_me:3336: \$? = $ac_status" >&5
3337   (exit "$ac_status"); }; }; then
3338   ac_cv_prog_cxx_g=yes
3339 else
3340   echo "$as_me: failed program was:" >&5
3341 cat "conftest.$ac_ext" >&5
3342 ac_cv_prog_cxx_g=no
3343 fi
3344 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3345 fi
3346 echo "$as_me:3346: result: $ac_cv_prog_cxx_g" >&5
3347 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3348 if test "$ac_test_CXXFLAGS" = set; then
3349   CXXFLAGS=$ac_save_CXXFLAGS
3350 elif test $ac_cv_prog_cxx_g = yes; then
3351   if test "$GXX" = yes; then
3352     CXXFLAGS="-g -O2"
3353   else
3354     CXXFLAGS="-g"
3355   fi
3356 else
3357   if test "$GXX" = yes; then
3358     CXXFLAGS="-O2"
3359   else
3360     CXXFLAGS=
3361   fi
3362 fi
3363 for ac_declaration in \
3364    ''\
3365    '#include <stdlib.h>' \
3366    'extern "C" void std::exit (int) throw (); using std::exit;' \
3367    'extern "C" void std::exit (int); using std::exit;' \
3368    'extern "C" void exit (int) throw ();' \
3369    'extern "C" void exit (int);' \
3370    'void exit (int);'
3371 do
3372   cat >"conftest.$ac_ext" <<_ACEOF
3373 #line 3373 "configure"
3374 #include "confdefs.h"
3375 #include <stdlib.h>
3376 $ac_declaration
3377 int
3378 main (void)
3379 {
3380 exit (42);
3381   ;
3382   return 0;
3383 }
3384 _ACEOF
3385 rm -f "conftest.$ac_objext"
3386 if { (eval echo "$as_me:3386: \"$ac_compile\"") >&5
3387   (eval $ac_compile) 2>&5
3388   ac_status=$?
3389   echo "$as_me:3389: \$? = $ac_status" >&5
3390   (exit "$ac_status"); } &&
3391          { ac_try='test -s "conftest.$ac_objext"'
3392   { (eval echo "$as_me:3392: \"$ac_try\"") >&5
3393   (eval $ac_try) 2>&5
3394   ac_status=$?
3395   echo "$as_me:3395: \$? = $ac_status" >&5
3396   (exit "$ac_status"); }; }; then
3397   :
3398 else
3399   echo "$as_me: failed program was:" >&5
3400 cat "conftest.$ac_ext" >&5
3401 continue
3402 fi
3403 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3404   cat >"conftest.$ac_ext" <<_ACEOF
3405 #line 3405 "configure"
3406 #include "confdefs.h"
3407 $ac_declaration
3408 int
3409 main (void)
3410 {
3411 exit (42);
3412   ;
3413   return 0;
3414 }
3415 _ACEOF
3416 rm -f "conftest.$ac_objext"
3417 if { (eval echo "$as_me:3417: \"$ac_compile\"") >&5
3418   (eval $ac_compile) 2>&5
3419   ac_status=$?
3420   echo "$as_me:3420: \$? = $ac_status" >&5
3421   (exit "$ac_status"); } &&
3422          { ac_try='test -s "conftest.$ac_objext"'
3423   { (eval echo "$as_me:3423: \"$ac_try\"") >&5
3424   (eval $ac_try) 2>&5
3425   ac_status=$?
3426   echo "$as_me:3426: \$? = $ac_status" >&5
3427   (exit "$ac_status"); }; }; then
3428   break
3429 else
3430   echo "$as_me: failed program was:" >&5
3431 cat "conftest.$ac_ext" >&5
3432 fi
3433 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3434 done
3435 rm -rf conftest*
3436 if test -n "$ac_declaration"; then
3437   echo '#ifdef __cplusplus' >>confdefs.h
3438   echo "$ac_declaration"    >>confdefs.h
3439   echo '#endif'             >>confdefs.h
3440 fi
3441
3442 ac_ext=c
3443 ac_cpp='$CPP $CPPFLAGS'
3444 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3445 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3446 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3447 ac_main_return="return"
3448
3449         ac_ext=cc
3450 ac_cpp='$CXXCPP $CPPFLAGS'
3451 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3452 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3453 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3454 ac_main_return="return"
3455
3456         if test "x$cf_with_cxx" != xno
3457         then
3458                 # Several of the C++ configurations do not work, particularly when
3459                 # cross-compiling (20140913 -TD)
3460                 echo "$as_me:3460: checking if $CXX works" >&5
3461 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3462
3463                 save_CPPFLAGS="$CPPFLAGS"
3464                 eval cf_includedir=${includedir}
3465                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3466
3467 cat >"conftest.$ac_ext" <<_ACEOF
3468 #line 3468 "configure"
3469 #include "confdefs.h"
3470
3471 #include <stdlib.h>
3472 #include <stdio.h>
3473
3474 int
3475 main (void)
3476 {
3477
3478                 printf("Hello world!\n")
3479
3480   ;
3481   return 0;
3482 }
3483 _ACEOF
3484 rm -f "conftest.$ac_objext"
3485 if { (eval echo "$as_me:3485: \"$ac_compile\"") >&5
3486   (eval $ac_compile) 2>&5
3487   ac_status=$?
3488   echo "$as_me:3488: \$? = $ac_status" >&5
3489   (exit "$ac_status"); } &&
3490          { ac_try='test -s "conftest.$ac_objext"'
3491   { (eval echo "$as_me:3491: \"$ac_try\"") >&5
3492   (eval $ac_try) 2>&5
3493   ac_status=$?
3494   echo "$as_me:3494: \$? = $ac_status" >&5
3495   (exit "$ac_status"); }; }; then
3496   cf_cxx_works=yes
3497 else
3498   echo "$as_me: failed program was:" >&5
3499 cat "conftest.$ac_ext" >&5
3500 cf_cxx_works=no
3501 fi
3502 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3503                 CPPFLAGS="$save_CPPFLAGS"
3504
3505                 echo "$as_me:3505: result: $cf_cxx_works" >&5
3506 echo "${ECHO_T}$cf_cxx_works" >&6
3507                 if test "x$cf_cxx_works" = xno
3508                 then
3509                         { echo "$as_me:3509: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3510 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3511                         cf_with_cxx=no; CXX=""; GXX="";
3512                 fi
3513         fi
3514         ac_ext=c
3515 ac_cpp='$CPP $CPPFLAGS'
3516 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3517 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3518 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3519 ac_main_return="return"
3520
3521         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3522         if test "$CXX" = "g++" ; then
3523                 # Extract the first word of "g++", so it can be a program name with args.
3524 set dummy g++; ac_word=$2
3525 echo "$as_me:3525: checking for $ac_word" >&5
3526 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3527 if test "${ac_cv_path_CXX+set}" = set; then
3528   echo $ECHO_N "(cached) $ECHO_C" >&6
3529 else
3530   case $CXX in
3531   [\\/]* | ?:[\\/]*)
3532   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3533   ;;
3534   *)
3535   ac_save_IFS=$IFS; IFS=$ac_path_separator
3536 ac_dummy="$PATH"
3537 for ac_dir in $ac_dummy; do
3538   IFS=$ac_save_IFS
3539   test -z "$ac_dir" && ac_dir=.
3540   if $as_executable_p "$ac_dir/$ac_word"; then
3541    ac_cv_path_CXX="$ac_dir/$ac_word"
3542    echo "$as_me:3542: found $ac_dir/$ac_word" >&5
3543    break
3544 fi
3545 done
3546
3547   ;;
3548 esac
3549 fi
3550 CXX=$ac_cv_path_CXX
3551
3552 if test -n "$CXX"; then
3553   echo "$as_me:3553: result: $CXX" >&5
3554 echo "${ECHO_T}$CXX" >&6
3555 else
3556   echo "$as_me:3556: result: no" >&5
3557 echo "${ECHO_T}no" >&6
3558 fi
3559
3560         fi
3561         case "x$CXX" in
3562         (x|xg++)
3563                 { echo "$as_me:3563: WARNING: You don't have any C++ compiler, too bad" >&5
3564 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3565                 cf_with_cxx=no; CXX=""; GXX="";
3566                 ;;
3567         esac
3568 fi
3569
3570 GXX_VERSION=none
3571 if test "$GXX" = yes; then
3572         echo "$as_me:3572: checking version of ${CXX:-g++}" >&5
3573 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3574         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3575         if test -z "$GXX_VERSION"
3576         then
3577                 GXX_VERSION=unknown
3578                 GXX=no
3579         fi
3580         echo "$as_me:3580: result: $GXX_VERSION" >&5
3581 echo "${ECHO_T}$GXX_VERSION" >&6
3582 fi
3583
3584 case "$GXX_VERSION" in
3585 ([1-9][0-9].*)
3586         ;;
3587 (1.*|2.[0-6]*)
3588         { echo "$as_me:3588: WARNING: templates do not work" >&5
3589 echo "$as_me: WARNING: templates do not work" >&2;}
3590         ;;
3591 esac
3592
3593 echo "$as_me:3593: checking if you want to build C++ binding and demo" >&5
3594 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3595
3596 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3597 if test "${with_cxx_binding+set}" = set; then
3598   withval="$with_cxx_binding"
3599   cf_with_cxx_binding=$withval
3600 else
3601   cf_with_cxx_binding=$cf_with_cxx
3602 fi;
3603 echo "$as_me:3603: result: $cf_with_cxx_binding" >&5
3604 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3605
3606 echo "$as_me:3606: checking if you want to build with Ada" >&5
3607 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3608 echo "$as_me:3608: result: $cf_with_ada" >&5
3609 echo "${ECHO_T}$cf_with_ada" >&6
3610
3611 echo "$as_me:3611: checking if you want to install terminal database" >&5
3612 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3613
3614 # Check whether --enable-db-install or --disable-db-install was given.
3615 if test "${enable_db_install+set}" = set; then
3616   enableval="$enable_db_install"
3617   cf_with_db_install=$enableval
3618 else
3619   cf_with_db_install=yes
3620 fi;
3621 echo "$as_me:3621: result: $cf_with_db_install" >&5
3622 echo "${ECHO_T}$cf_with_db_install" >&6
3623
3624 echo "$as_me:3624: checking if you want to install manpages" >&5
3625 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3626
3627 # Check whether --with-manpages or --without-manpages was given.
3628 if test "${with_manpages+set}" = set; then
3629   withval="$with_manpages"
3630   cf_with_manpages=$withval
3631 else
3632   cf_with_manpages=yes
3633 fi;
3634 echo "$as_me:3634: result: $cf_with_manpages" >&5
3635 echo "${ECHO_T}$cf_with_manpages" >&6
3636
3637 echo "$as_me:3637: checking if you want to build programs such as tic" >&5
3638 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3639
3640 # Check whether --with-progs or --without-progs was given.
3641 if test "${with_progs+set}" = set; then
3642   withval="$with_progs"
3643   cf_with_progs=$withval
3644 else
3645   cf_with_progs=yes
3646 fi;
3647 echo "$as_me:3647: result: $cf_with_progs" >&5
3648 echo "${ECHO_T}$cf_with_progs" >&6
3649
3650 if test -f "$srcdir/tack/tack.h" ; then
3651         if test "x$cross_compiling" = xyes ; then
3652                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3653
3654 echo "${as_me:-configure}:3654: testing ignoring tack because we are cross-compiling ..." 1>&5
3655
3656                 cf_with_tack=no
3657         else
3658                 echo "$as_me:3658: checking if you want to build the tack program" >&5
3659 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3660
3661 # Check whether --with-tack or --without-tack was given.
3662 if test "${with_tack+set}" = set; then
3663   withval="$with_tack"
3664   cf_with_tack=$withval
3665 else
3666   cf_with_tack=$cf_with_progs
3667 fi;
3668                 echo "$as_me:3668: result: $cf_with_tack" >&5
3669 echo "${ECHO_T}$cf_with_tack" >&6
3670         fi
3671 else
3672         cf_with_tack=no
3673 fi
3674
3675 echo "$as_me:3675: checking if you want to build test-programs" >&5
3676 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3677
3678 # Check whether --with-tests or --without-tests was given.
3679 if test "${with_tests+set}" = set; then
3680   withval="$with_tests"
3681   cf_with_tests=$withval
3682 else
3683   cf_with_tests=yes
3684 fi;
3685 echo "$as_me:3685: result: $cf_with_tests" >&5
3686 echo "${ECHO_T}$cf_with_tests" >&6
3687
3688 echo "$as_me:3688: checking if you wish to install curses.h" >&5
3689 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3690
3691 # Check whether --with-curses-h or --without-curses-h was given.
3692 if test "${with_curses_h+set}" = set; then
3693   withval="$with_curses_h"
3694   with_curses_h=$withval
3695 else
3696   with_curses_h=yes
3697 fi;
3698 echo "$as_me:3698: result: $with_curses_h" >&5
3699 echo "${ECHO_T}$with_curses_h" >&6
3700
3701 modules_to_build="ncurses"
3702 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3703 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3704 modules_to_build="$modules_to_build panel menu form"
3705
3706 test "$program_prefix" != NONE &&
3707   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3708 # Use a double $ so make ignores it.
3709 test "$program_suffix" != NONE &&
3710   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3711 # Double any \ or $.  echo might interpret backslashes.
3712 # By default was `s,x,x', remove it if useless.
3713 cat <<\_ACEOF >conftest.sed
3714 s/[\\$]/&&/g;s/;s,x,x,$//
3715 _ACEOF
3716 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3717 rm conftest.sed
3718
3719 for ac_prog in mawk gawk nawk awk
3720 do
3721   # Extract the first word of "$ac_prog", so it can be a program name with args.
3722 set dummy $ac_prog; ac_word=$2
3723 echo "$as_me:3723: checking for $ac_word" >&5
3724 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3725 if test "${ac_cv_prog_AWK+set}" = set; then
3726   echo $ECHO_N "(cached) $ECHO_C" >&6
3727 else
3728   if test -n "$AWK"; then
3729   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3730 else
3731   ac_save_IFS=$IFS; IFS=$ac_path_separator
3732 ac_dummy="$PATH"
3733 for ac_dir in $ac_dummy; do
3734   IFS=$ac_save_IFS
3735   test -z "$ac_dir" && ac_dir=.
3736   $as_executable_p "$ac_dir/$ac_word" || continue
3737 ac_cv_prog_AWK="$ac_prog"
3738 echo "$as_me:3738: found $ac_dir/$ac_word" >&5
3739 break
3740 done
3741
3742 fi
3743 fi
3744 AWK=$ac_cv_prog_AWK
3745 if test -n "$AWK"; then
3746   echo "$as_me:3746: result: $AWK" >&5
3747 echo "${ECHO_T}$AWK" >&6
3748 else
3749   echo "$as_me:3749: result: no" >&5
3750 echo "${ECHO_T}no" >&6
3751 fi
3752
3753   test -n "$AWK" && break
3754 done
3755
3756 test -z "$AWK" && { { echo "$as_me:3756: error: No awk program found" >&5
3757 echo "$as_me: error: No awk program found" >&2;}
3758    { (exit 1); exit 1; }; }
3759
3760 # Find a good install program.  We prefer a C program (faster),
3761 # so one script is as good as another.  But avoid the broken or
3762 # incompatible versions:
3763 # SysV /etc/install, /usr/sbin/install
3764 # SunOS /usr/etc/install
3765 # IRIX /sbin/install
3766 # AIX /bin/install
3767 # AmigaOS /C/install, which installs bootblocks on floppy discs
3768 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3769 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3770 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3771 # ./install, which can be erroneously created by make from ./install.sh.
3772 echo "$as_me:3772: checking for a BSD compatible install" >&5
3773 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3774 if test -z "$INSTALL"; then
3775 if test "${ac_cv_path_install+set}" = set; then
3776   echo $ECHO_N "(cached) $ECHO_C" >&6
3777 else
3778     ac_save_IFS=$IFS; IFS=$ac_path_separator
3779   for ac_dir in $PATH; do
3780     IFS=$ac_save_IFS
3781     # Account for people who put trailing slashes in PATH elements.
3782     case $ac_dir/ in
3783     / | ./ | .// | /cC/* \
3784     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3785     | /usr/ucb/* ) ;;
3786     *)
3787       # OSF1 and SCO ODT 3.0 have their own names for install.
3788       # Don't use installbsd from OSF since it installs stuff as root
3789       # by default.
3790       for ac_prog in ginstall scoinst install; do
3791         if $as_executable_p "$ac_dir/$ac_prog"; then
3792           if test $ac_prog = install &&
3793             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3794             # AIX install.  It has an incompatible calling convention.
3795             :
3796           elif test $ac_prog = install &&
3797             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3798             # program-specific install script used by HP pwplus--don't use.
3799             :
3800           else
3801             ac_cv_path_install="$ac_dir/$ac_prog -c"
3802             break 2
3803           fi
3804         fi
3805       done
3806       ;;
3807     esac
3808   done
3809
3810 fi
3811   if test "${ac_cv_path_install+set}" = set; then
3812     INSTALL=$ac_cv_path_install
3813   else
3814     # As a last resort, use the slow shell script.  We don't cache a
3815     # path for INSTALL within a source directory, because that will
3816     # break other packages using the cache if that directory is
3817     # removed, or if the path is relative.
3818     INSTALL=$ac_install_sh
3819   fi
3820 fi
3821 echo "$as_me:3821: result: $INSTALL" >&5
3822 echo "${ECHO_T}$INSTALL" >&6
3823
3824 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3825 # It thinks the first close brace ends the variable substitution.
3826 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3827
3828 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3829
3830 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3831
3832 case $INSTALL in
3833 (/*)
3834         ;;
3835 (*)
3836         cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
3837         test -z "$cf_dir" && cf_dir=.
3838         INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
3839         ;;
3840 esac
3841
3842 for ac_prog in lint cppcheck splint
3843 do
3844   # Extract the first word of "$ac_prog", so it can be a program name with args.
3845 set dummy $ac_prog; ac_word=$2
3846 echo "$as_me:3846: checking for $ac_word" >&5
3847 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3848 if test "${ac_cv_prog_LINT+set}" = set; then
3849   echo $ECHO_N "(cached) $ECHO_C" >&6
3850 else
3851   if test -n "$LINT"; then
3852   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3853 else
3854   ac_save_IFS=$IFS; IFS=$ac_path_separator
3855 ac_dummy="$PATH"
3856 for ac_dir in $ac_dummy; do
3857   IFS=$ac_save_IFS
3858   test -z "$ac_dir" && ac_dir=.
3859   $as_executable_p "$ac_dir/$ac_word" || continue
3860 ac_cv_prog_LINT="$ac_prog"
3861 echo "$as_me:3861: found $ac_dir/$ac_word" >&5
3862 break
3863 done
3864
3865 fi
3866 fi
3867 LINT=$ac_cv_prog_LINT
3868 if test -n "$LINT"; then
3869   echo "$as_me:3869: result: $LINT" >&5
3870 echo "${ECHO_T}$LINT" >&6
3871 else
3872   echo "$as_me:3872: result: no" >&5
3873 echo "${ECHO_T}no" >&6
3874 fi
3875
3876   test -n "$LINT" && break
3877 done
3878
3879 case "x$LINT" in
3880 (xcppcheck|x*/cppcheck)
3881         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3882         ;;
3883 esac
3884
3885 echo "$as_me:3885: checking whether ln -s works" >&5
3886 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3887 LN_S=$as_ln_s
3888 if test "$LN_S" = "ln -s"; then
3889   echo "$as_me:3889: result: yes" >&5
3890 echo "${ECHO_T}yes" >&6
3891 else
3892   echo "$as_me:3892: result: no, using $LN_S" >&5
3893 echo "${ECHO_T}no, using $LN_S" >&6
3894 fi
3895
3896 echo "$as_me:3896: checking if $LN_S -f options work" >&5
3897 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3898
3899 rm -f conf$$.src conf$$dst
3900 echo >conf$$.dst
3901 echo first >conf$$.src
3902 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3903         cf_prog_ln_sf=yes
3904 else
3905         cf_prog_ln_sf=no
3906 fi
3907 rm -f conf$$.dst conf$$src
3908 echo "$as_me:3908: result: $cf_prog_ln_sf" >&5
3909 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3910
3911 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3912
3913 echo "$as_me:3913: checking for long file names" >&5
3914 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3915 if test "${ac_cv_sys_long_file_names+set}" = set; then
3916   echo $ECHO_N "(cached) $ECHO_C" >&6
3917 else
3918   ac_cv_sys_long_file_names=yes
3919 # Test for long file names in all the places we know might matter:
3920 #      .                the current directory, where building will happen
3921 #      $prefix/lib      where we will be installing things
3922 #      $exec_prefix/lib likewise
3923 # eval it to expand exec_prefix.
3924 #      $TMPDIR          if set, where it might want to write temporary files
3925 # if $TMPDIR is not set:
3926 #      /tmp             where it might want to write temporary files
3927 #      /var/tmp         likewise
3928 #      /usr/tmp         likewise
3929 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3930   ac_tmpdirs=$TMPDIR
3931 else
3932   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3933 fi
3934 for ac_dir in  . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3935   test -d "$ac_dir" || continue
3936   test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3937   ac_xdir=$ac_dir/cf$$
3938   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3939   ac_tf1=$ac_xdir/conftest9012345
3940   ac_tf2=$ac_xdir/conftest9012346
3941   (echo 1 >"$ac_tf1") 2>/dev/null
3942   (echo 2 >"$ac_tf2") 2>/dev/null
3943   ac_val=`cat "$ac_tf1" 2>/dev/null`
3944   if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3945     ac_cv_sys_long_file_names=no
3946     rm -rf "$ac_xdir" 2>/dev/null
3947     break
3948   fi
3949   rm -rf "$ac_xdir" 2>/dev/null
3950 done
3951 fi
3952 echo "$as_me:3952: result: $ac_cv_sys_long_file_names" >&5
3953 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3954 if test "$ac_cv_sys_long_file_names" = yes; then
3955
3956 cat >>confdefs.h <<\EOF
3957 #define HAVE_LONG_FILE_NAMES 1
3958 EOF
3959
3960 fi
3961
3962 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3963 # of package conflict.
3964 cf_config_suffix=
3965
3966 # Check whether --with-config-suffix or --without-config-suffix was given.
3967 if test "${with_config_suffix+set}" = set; then
3968   withval="$with_config_suffix"
3969   case "x$withval" in
3970         (xyes|xno)
3971                 { echo "$as_me:3971: WARNING: expected a value for config-suffix option" >&5
3972 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3973                 ;;
3974         (*)     cf_config_suffix="$withval"
3975                 ;;
3976         esac
3977 fi;
3978
3979 # If we find pkg-config, check if we should install the ".pc" files.
3980
3981 echo "$as_me:3981: checking if you want to use pkg-config" >&5
3982 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3983
3984 # Check whether --with-pkg-config or --without-pkg-config was given.
3985 if test "${with_pkg_config+set}" = set; then
3986   withval="$with_pkg_config"
3987   cf_pkg_config=$withval
3988 else
3989   cf_pkg_config=yes
3990 fi;
3991 echo "$as_me:3991: result: $cf_pkg_config" >&5
3992 echo "${ECHO_T}$cf_pkg_config" >&6
3993
3994 case "$cf_pkg_config" in
3995 (no)
3996         PKG_CONFIG=none
3997         ;;
3998 (yes)
3999
4000 if test -n "$ac_tool_prefix"; then
4001   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4002 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4003 echo "$as_me:4003: checking for $ac_word" >&5
4004 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4005 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4006   echo $ECHO_N "(cached) $ECHO_C" >&6
4007 else
4008   case $PKG_CONFIG in
4009   [\\/]* | ?:[\\/]*)
4010   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4011   ;;
4012   *)
4013   ac_save_IFS=$IFS; IFS=$ac_path_separator
4014 ac_dummy="$PATH"
4015 for ac_dir in $ac_dummy; do
4016   IFS=$ac_save_IFS
4017   test -z "$ac_dir" && ac_dir=.
4018   if $as_executable_p "$ac_dir/$ac_word"; then
4019    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4020    echo "$as_me:4020: found $ac_dir/$ac_word" >&5
4021    break
4022 fi
4023 done
4024
4025   ;;
4026 esac
4027 fi
4028 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4029
4030 if test -n "$PKG_CONFIG"; then
4031   echo "$as_me:4031: result: $PKG_CONFIG" >&5
4032 echo "${ECHO_T}$PKG_CONFIG" >&6
4033 else
4034   echo "$as_me:4034: result: no" >&5
4035 echo "${ECHO_T}no" >&6
4036 fi
4037
4038 fi
4039 if test -z "$ac_cv_path_PKG_CONFIG"; then
4040   ac_pt_PKG_CONFIG=$PKG_CONFIG
4041   # Extract the first word of "pkg-config", so it can be a program name with args.
4042 set dummy pkg-config; ac_word=$2
4043 echo "$as_me:4043: checking for $ac_word" >&5
4044 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4045 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4046   echo $ECHO_N "(cached) $ECHO_C" >&6
4047 else
4048   case $ac_pt_PKG_CONFIG in
4049   [\\/]* | ?:[\\/]*)
4050   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4051   ;;
4052   *)
4053   ac_save_IFS=$IFS; IFS=$ac_path_separator
4054 ac_dummy="$PATH"
4055 for ac_dir in $ac_dummy; do
4056   IFS=$ac_save_IFS
4057   test -z "$ac_dir" && ac_dir=.
4058   if $as_executable_p "$ac_dir/$ac_word"; then
4059    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4060    echo "$as_me:4060: found $ac_dir/$ac_word" >&5
4061    break
4062 fi
4063 done
4064
4065   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4066   ;;
4067 esac
4068 fi
4069 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4070
4071 if test -n "$ac_pt_PKG_CONFIG"; then
4072   echo "$as_me:4072: result: $ac_pt_PKG_CONFIG" >&5
4073 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4074 else
4075   echo "$as_me:4075: result: no" >&5
4076 echo "${ECHO_T}no" >&6
4077 fi
4078
4079   PKG_CONFIG=$ac_pt_PKG_CONFIG
4080 else
4081   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4082 fi
4083
4084         ;;
4085 (*)
4086         PKG_CONFIG=$withval
4087         ;;
4088 esac
4089
4090 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4091 if test "$PKG_CONFIG" != none ; then
4092
4093 if test "x$prefix" != xNONE; then
4094         cf_path_syntax="$prefix"
4095 else
4096         cf_path_syntax="$ac_default_prefix"
4097 fi
4098
4099 case ".$PKG_CONFIG" in
4100 (.\$\(*\)*|.\'*\'*)
4101         ;;
4102 (..|./*|.\\*)
4103         ;;
4104 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4105         ;;
4106 (.\$\{*prefix\}*|.\$\{*dir\}*)
4107         eval PKG_CONFIG="$PKG_CONFIG"
4108         case ".$PKG_CONFIG" in
4109         (.NONE/*)
4110                 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4111                 ;;
4112         esac
4113         ;;
4114 (.no|.NONE/*)
4115         PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4116         ;;
4117 (*)
4118         { { echo "$as_me:4118: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4119 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4120    { (exit 1); exit 1; }; }
4121         ;;
4122 esac
4123
4124 elif test "x$cf_pkg_config" != xno ; then
4125         { echo "$as_me:4125: WARNING: pkg-config is not installed" >&5
4126 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4127 fi
4128
4129 case "$PKG_CONFIG" in
4130 (no|none|yes)
4131         echo "$as_me:4131: checking for pkg-config library directory" >&5
4132 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4133         ;;
4134 (*)
4135         echo "$as_me:4135: checking for $PKG_CONFIG library directory" >&5
4136 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
4137         ;;
4138 esac
4139
4140 PKG_CONFIG_LIBDIR=no
4141
4142 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4143 if test "${with_pkg_config_libdir+set}" = set; then
4144   withval="$with_pkg_config_libdir"
4145   PKG_CONFIG_LIBDIR=$withval
4146 else
4147   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
4148 fi;
4149
4150 case x$PKG_CONFIG_LIBDIR in
4151 (x/*)
4152         ;;
4153 (xyes)
4154         # Look for the library directory using the same prefix as the executable
4155         if test "x$PKG_CONFIG" = xnone
4156         then
4157                 cf_path=$prefix
4158         else
4159                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
4160         fi
4161
4162         # If you don't like using the default architecture, you have to specify the
4163         # intended library directory and corresponding compiler/linker options.
4164         #
4165         # This case allows for Debian's 2014-flavor of multiarch, along with the
4166         # most common variations before that point.  Some other variants spell the
4167         # directory differently, e.g., "pkg-config", and put it in unusual places.
4168         # pkg-config has always been poorly standardized, which is ironic...
4169         case x`(arch) 2>/dev/null` in
4170         (*64)
4171                 cf_search_path="\
4172                         $cf_path/lib/*64-linux-gnu \
4173                         $cf_path/share \
4174                         $cf_path/lib64 \
4175                         $cf_path/lib32 \
4176                         $cf_path/lib"
4177                 ;;
4178         (*)
4179                 cf_search_path="\
4180                         $cf_path/lib/*-linux-gnu \
4181                         $cf_path/share \
4182                         $cf_path/lib32 \
4183                         $cf_path/lib \
4184                         $cf_path/libdata"
4185                 ;;
4186         esac
4187
4188         test -n "$verbose" && echo "    list..." 1>&6
4189
4190 echo "${as_me:-configure}:4190: testing list... ..." 1>&5
4191
4192         for cf_config in $cf_search_path
4193         do
4194                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
4195
4196 echo "${as_me:-configure}:4196: testing checking $cf_config/pkgconfig ..." 1>&5
4197
4198                 if test -d "$cf_config/pkgconfig"
4199                 then
4200                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
4201                         echo "$as_me:4201: checking done" >&5
4202 echo $ECHO_N "checking done... $ECHO_C" >&6
4203                         break
4204                 fi
4205         done
4206         ;;
4207 (*)
4208         ;;
4209 esac
4210
4211 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
4212         echo "$as_me:4212: result: $PKG_CONFIG_LIBDIR" >&5
4213 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4214 fi
4215
4216 if test "x$PKG_CONFIG" != xnone
4217 then
4218         echo "$as_me:4218: checking if we should install .pc files for $PKG_CONFIG" >&5
4219 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4220 else
4221         echo "$as_me:4221: checking if we should install .pc files" >&5
4222 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4223 fi
4224
4225 # Check whether --enable-pc-files or --disable-pc-files was given.
4226 if test "${enable_pc_files+set}" = set; then
4227   enableval="$enable_pc_files"
4228   enable_pc_files=$enableval
4229 else
4230   enable_pc_files=no
4231 fi;
4232 echo "$as_me:4232: result: $enable_pc_files" >&5
4233 echo "${ECHO_T}$enable_pc_files" >&6
4234
4235 if test "x$enable_pc_files" != xno
4236 then
4237         MAKE_PC_FILES=
4238         case "x$PKG_CONFIG_LIBDIR" in
4239         (xno|xyes)
4240                 { echo "$as_me:4240: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4241 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4242                 ;;
4243         (*)
4244
4245 if test "x$prefix" != xNONE; then
4246         cf_path_syntax="$prefix"
4247 else
4248         cf_path_syntax="$ac_default_prefix"
4249 fi
4250
4251 case ".$PKG_CONFIG_LIBDIR" in
4252 (.\$\(*\)*|.\'*\'*)
4253         ;;
4254 (..|./*|.\\*)
4255         ;;
4256 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4257         ;;
4258 (.\$\{*prefix\}*|.\$\{*dir\}*)
4259         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
4260         case ".$PKG_CONFIG_LIBDIR" in
4261         (.NONE/*)
4262                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e s%NONE%$cf_path_syntax%`
4263                 ;;
4264         esac
4265         ;;
4266 (.no|.NONE/*)
4267         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e s%NONE%$cf_path_syntax%`
4268         ;;
4269 (*)
4270         { { echo "$as_me:4270: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
4271 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
4272    { (exit 1); exit 1; }; }
4273         ;;
4274 esac
4275
4276                 ;;
4277         esac
4278 else
4279         MAKE_PC_FILES="#"
4280 fi
4281
4282 if test -z "$MAKE_PC_FILES"
4283 then
4284         echo "$as_me:4284: checking for suffix to add to pc-files" >&5
4285 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4286
4287 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4288 if test "${with_pc_suffix+set}" = set; then
4289   withval="$with_pc_suffix"
4290   case "x$withval" in
4291         (xyes|xno)
4292                 PC_MODULE_SUFFIX=
4293                 ;;
4294         (*)     PC_MODULE_SUFFIX="$withval"
4295                 ;;
4296         esac
4297 fi;
4298         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4299         echo "$as_me:4299: result: $PC_MODULE_SUFFIX" >&5
4300 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4301         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4302
4303 fi
4304
4305 echo "$as_me:4305: checking if we should assume mixed-case filenames" >&5
4306 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4307
4308 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4309 if test "${enable_mixed_case+set}" = set; then
4310   enableval="$enable_mixed_case"
4311   enable_mixedcase=$enableval
4312 else
4313   enable_mixedcase=auto
4314 fi;
4315 echo "$as_me:4315: result: $enable_mixedcase" >&5
4316 echo "${ECHO_T}$enable_mixedcase" >&6
4317 if test "$enable_mixedcase" = "auto" ; then
4318
4319 echo "$as_me:4319: checking if filesystem supports mixed-case filenames" >&5
4320 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4321 if test "${cf_cv_mixedcase+set}" = set; then
4322   echo $ECHO_N "(cached) $ECHO_C" >&6
4323 else
4324
4325 if test "$cross_compiling" = yes ; then
4326         case "$target_alias" in
4327         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4328                 cf_cv_mixedcase=no
4329                 ;;
4330         (*)
4331                 cf_cv_mixedcase=yes
4332                 ;;
4333         esac
4334 else
4335         rm -f conftest CONFTEST
4336         echo test >conftest
4337         if test -f CONFTEST ; then
4338                 cf_cv_mixedcase=no
4339         else
4340                 cf_cv_mixedcase=yes
4341         fi
4342         rm -f conftest CONFTEST
4343 fi
4344
4345 fi
4346 echo "$as_me:4346: result: $cf_cv_mixedcase" >&5
4347 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4348 test "$cf_cv_mixedcase" = yes &&
4349 cat >>confdefs.h <<\EOF
4350 #define MIXEDCASE_FILENAMES 1
4351 EOF
4352
4353 else
4354         cf_cv_mixedcase=$enable_mixedcase
4355         if test "x$enable_mixedcase" = "xyes" ; then
4356
4357 cat >>confdefs.h <<\EOF
4358 #define MIXEDCASE_FILENAMES 1
4359 EOF
4360
4361         fi
4362 fi
4363
4364 # do this after mixed-case option (tags/TAGS is not as important as tic).
4365 echo "$as_me:4365: checking whether ${MAKE-make} sets \${MAKE}" >&5
4366 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4367 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4368 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4369   echo $ECHO_N "(cached) $ECHO_C" >&6
4370 else
4371   cat >conftest.make <<\EOF
4372 all:
4373         @echo 'ac_maketemp="${MAKE}"'
4374 EOF
4375 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4376 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4377 if test -n "$ac_maketemp"; then
4378   eval ac_cv_prog_make_${ac_make}_set=yes
4379 else
4380   eval ac_cv_prog_make_${ac_make}_set=no
4381 fi
4382 rm -f conftest.make
4383 fi
4384 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4385   echo "$as_me:4385: result: yes" >&5
4386 echo "${ECHO_T}yes" >&6
4387   SET_MAKE=
4388 else
4389   echo "$as_me:4389: result: no" >&5
4390 echo "${ECHO_T}no" >&6
4391   SET_MAKE="MAKE=${MAKE-make}"
4392 fi
4393
4394 for ac_prog in exctags ctags
4395 do
4396   # Extract the first word of "$ac_prog", so it can be a program name with args.
4397 set dummy $ac_prog; ac_word=$2
4398 echo "$as_me:4398: checking for $ac_word" >&5
4399 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4400 if test "${ac_cv_prog_CTAGS+set}" = set; then
4401   echo $ECHO_N "(cached) $ECHO_C" >&6
4402 else
4403   if test -n "$CTAGS"; then
4404   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4405 else
4406   ac_save_IFS=$IFS; IFS=$ac_path_separator
4407 ac_dummy="$PATH"
4408 for ac_dir in $ac_dummy; do
4409   IFS=$ac_save_IFS
4410   test -z "$ac_dir" && ac_dir=.
4411   $as_executable_p "$ac_dir/$ac_word" || continue
4412 ac_cv_prog_CTAGS="$ac_prog"
4413 echo "$as_me:4413: found $ac_dir/$ac_word" >&5
4414 break
4415 done
4416
4417 fi
4418 fi
4419 CTAGS=$ac_cv_prog_CTAGS
4420 if test -n "$CTAGS"; then
4421   echo "$as_me:4421: result: $CTAGS" >&5
4422 echo "${ECHO_T}$CTAGS" >&6
4423 else
4424   echo "$as_me:4424: result: no" >&5
4425 echo "${ECHO_T}no" >&6
4426 fi
4427
4428   test -n "$CTAGS" && break
4429 done
4430
4431 for ac_prog in exetags etags
4432 do
4433   # Extract the first word of "$ac_prog", so it can be a program name with args.
4434 set dummy $ac_prog; ac_word=$2
4435 echo "$as_me:4435: checking for $ac_word" >&5
4436 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4437 if test "${ac_cv_prog_ETAGS+set}" = set; then
4438   echo $ECHO_N "(cached) $ECHO_C" >&6
4439 else
4440   if test -n "$ETAGS"; then
4441   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4442 else
4443   ac_save_IFS=$IFS; IFS=$ac_path_separator
4444 ac_dummy="$PATH"
4445 for ac_dir in $ac_dummy; do
4446   IFS=$ac_save_IFS
4447   test -z "$ac_dir" && ac_dir=.
4448   $as_executable_p "$ac_dir/$ac_word" || continue
4449 ac_cv_prog_ETAGS="$ac_prog"
4450 echo "$as_me:4450: found $ac_dir/$ac_word" >&5
4451 break
4452 done
4453
4454 fi
4455 fi
4456 ETAGS=$ac_cv_prog_ETAGS
4457 if test -n "$ETAGS"; then
4458   echo "$as_me:4458: result: $ETAGS" >&5
4459 echo "${ECHO_T}$ETAGS" >&6
4460 else
4461   echo "$as_me:4461: result: no" >&5
4462 echo "${ECHO_T}no" >&6
4463 fi
4464
4465   test -n "$ETAGS" && break
4466 done
4467
4468 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4469 set dummy ${CTAGS:-ctags}; ac_word=$2
4470 echo "$as_me:4470: checking for $ac_word" >&5
4471 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4472 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4473   echo $ECHO_N "(cached) $ECHO_C" >&6
4474 else
4475   if test -n "$MAKE_LOWER_TAGS"; then
4476   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4477 else
4478   ac_save_IFS=$IFS; IFS=$ac_path_separator
4479 ac_dummy="$PATH"
4480 for ac_dir in $ac_dummy; do
4481   IFS=$ac_save_IFS
4482   test -z "$ac_dir" && ac_dir=.
4483   $as_executable_p "$ac_dir/$ac_word" || continue
4484 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4485 echo "$as_me:4485: found $ac_dir/$ac_word" >&5
4486 break
4487 done
4488
4489   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4490 fi
4491 fi
4492 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4493 if test -n "$MAKE_LOWER_TAGS"; then
4494   echo "$as_me:4494: result: $MAKE_LOWER_TAGS" >&5
4495 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4496 else
4497   echo "$as_me:4497: result: no" >&5
4498 echo "${ECHO_T}no" >&6
4499 fi
4500
4501 if test "$cf_cv_mixedcase" = yes ; then
4502         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4503 set dummy ${ETAGS:-etags}; ac_word=$2
4504 echo "$as_me:4504: checking for $ac_word" >&5
4505 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4506 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4507   echo $ECHO_N "(cached) $ECHO_C" >&6
4508 else
4509   if test -n "$MAKE_UPPER_TAGS"; then
4510   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4511 else
4512   ac_save_IFS=$IFS; IFS=$ac_path_separator
4513 ac_dummy="$PATH"
4514 for ac_dir in $ac_dummy; do
4515   IFS=$ac_save_IFS
4516   test -z "$ac_dir" && ac_dir=.
4517   $as_executable_p "$ac_dir/$ac_word" || continue
4518 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4519 echo "$as_me:4519: found $ac_dir/$ac_word" >&5
4520 break
4521 done
4522
4523   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4524 fi
4525 fi
4526 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4527 if test -n "$MAKE_UPPER_TAGS"; then
4528   echo "$as_me:4528: result: $MAKE_UPPER_TAGS" >&5
4529 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4530 else
4531   echo "$as_me:4531: result: no" >&5
4532 echo "${ECHO_T}no" >&6
4533 fi
4534
4535 else
4536         MAKE_UPPER_TAGS=no
4537 fi
4538
4539 if test "$MAKE_UPPER_TAGS" = yes ; then
4540         MAKE_UPPER_TAGS=
4541 else
4542         MAKE_UPPER_TAGS="#"
4543 fi
4544
4545 if test "$MAKE_LOWER_TAGS" = yes ; then
4546         MAKE_LOWER_TAGS=
4547 else
4548         MAKE_LOWER_TAGS="#"
4549 fi
4550
4551 echo "$as_me:4551: checking for makeflags variable" >&5
4552 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4553 if test "${cf_cv_makeflags+set}" = set; then
4554   echo $ECHO_N "(cached) $ECHO_C" >&6
4555 else
4556
4557         cf_cv_makeflags=''
4558         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4559         do
4560                 cat >cf_makeflags.tmp <<CF_EOF
4561 SHELL = $SHELL
4562 all :
4563         @ echo '.$cf_option'
4564 CF_EOF
4565                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4566                 case "$cf_result" in
4567                 (.*k|.*kw)
4568                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4569                         case "$cf_result" in
4570                         (.*CC=*)        cf_cv_makeflags=
4571                                 ;;
4572                         (*)     cf_cv_makeflags=$cf_option
4573                                 ;;
4574                         esac
4575                         break
4576                         ;;
4577                 (.-)
4578                         ;;
4579                 (*)
4580
4581 echo "${as_me:-configure}:4581: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4582
4583                         ;;
4584                 esac
4585         done
4586         rm -f cf_makeflags.tmp
4587
4588 fi
4589 echo "$as_me:4589: result: $cf_cv_makeflags" >&5
4590 echo "${ECHO_T}$cf_cv_makeflags" >&6
4591
4592 if test -n "$ac_tool_prefix"; then
4593   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4594 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4595 echo "$as_me:4595: checking for $ac_word" >&5
4596 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4597 if test "${ac_cv_prog_RANLIB+set}" = set; then
4598   echo $ECHO_N "(cached) $ECHO_C" >&6
4599 else
4600   if test -n "$RANLIB"; then
4601   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4602 else
4603   ac_save_IFS=$IFS; IFS=$ac_path_separator
4604 ac_dummy="$PATH"
4605 for ac_dir in $ac_dummy; do
4606   IFS=$ac_save_IFS
4607   test -z "$ac_dir" && ac_dir=.
4608   $as_executable_p "$ac_dir/$ac_word" || continue
4609 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4610 echo "$as_me:4610: found $ac_dir/$ac_word" >&5
4611 break
4612 done
4613
4614 fi
4615 fi
4616 RANLIB=$ac_cv_prog_RANLIB
4617 if test -n "$RANLIB"; then
4618   echo "$as_me:4618: result: $RANLIB" >&5
4619 echo "${ECHO_T}$RANLIB" >&6
4620 else
4621   echo "$as_me:4621: result: no" >&5
4622 echo "${ECHO_T}no" >&6
4623 fi
4624
4625 fi
4626 if test -z "$ac_cv_prog_RANLIB"; then
4627   ac_ct_RANLIB=$RANLIB
4628   # Extract the first word of "ranlib", so it can be a program name with args.
4629 set dummy ranlib; ac_word=$2
4630 echo "$as_me:4630: checking for $ac_word" >&5
4631 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4632 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4633   echo $ECHO_N "(cached) $ECHO_C" >&6
4634 else
4635   if test -n "$ac_ct_RANLIB"; then
4636   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4637 else
4638   ac_save_IFS=$IFS; IFS=$ac_path_separator
4639 ac_dummy="$PATH"
4640 for ac_dir in $ac_dummy; do
4641   IFS=$ac_save_IFS
4642   test -z "$ac_dir" && ac_dir=.
4643   $as_executable_p "$ac_dir/$ac_word" || continue
4644 ac_cv_prog_ac_ct_RANLIB="ranlib"
4645 echo "$as_me:4645: found $ac_dir/$ac_word" >&5
4646 break
4647 done
4648
4649   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4650 fi
4651 fi
4652 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4653 if test -n "$ac_ct_RANLIB"; then
4654   echo "$as_me:4654: result: $ac_ct_RANLIB" >&5
4655 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4656 else
4657   echo "$as_me:4657: result: no" >&5
4658 echo "${ECHO_T}no" >&6
4659 fi
4660
4661   RANLIB=$ac_ct_RANLIB
4662 else
4663   RANLIB="$ac_cv_prog_RANLIB"
4664 fi
4665
4666 if test -n "$ac_tool_prefix"; then
4667   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4668 set dummy ${ac_tool_prefix}ld; ac_word=$2
4669 echo "$as_me:4669: checking for $ac_word" >&5
4670 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4671 if test "${ac_cv_prog_LD+set}" = set; then
4672   echo $ECHO_N "(cached) $ECHO_C" >&6
4673 else
4674   if test -n "$LD"; then
4675   ac_cv_prog_LD="$LD" # Let the user override the test.
4676 else
4677   ac_save_IFS=$IFS; IFS=$ac_path_separator
4678 ac_dummy="$PATH"
4679 for ac_dir in $ac_dummy; do
4680   IFS=$ac_save_IFS
4681   test -z "$ac_dir" && ac_dir=.
4682   $as_executable_p "$ac_dir/$ac_word" || continue
4683 ac_cv_prog_LD="${ac_tool_prefix}ld"
4684 echo "$as_me:4684: found $ac_dir/$ac_word" >&5
4685 break
4686 done
4687
4688 fi
4689 fi
4690 LD=$ac_cv_prog_LD
4691 if test -n "$LD"; then
4692   echo "$as_me:4692: result: $LD" >&5
4693 echo "${ECHO_T}$LD" >&6
4694 else
4695   echo "$as_me:4695: result: no" >&5
4696 echo "${ECHO_T}no" >&6
4697 fi
4698
4699 fi
4700 if test -z "$ac_cv_prog_LD"; then
4701   ac_ct_LD=$LD
4702   # Extract the first word of "ld", so it can be a program name with args.
4703 set dummy ld; ac_word=$2
4704 echo "$as_me:4704: checking for $ac_word" >&5
4705 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4706 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4707   echo $ECHO_N "(cached) $ECHO_C" >&6
4708 else
4709   if test -n "$ac_ct_LD"; then
4710   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4711 else
4712   ac_save_IFS=$IFS; IFS=$ac_path_separator
4713 ac_dummy="$PATH"
4714 for ac_dir in $ac_dummy; do
4715   IFS=$ac_save_IFS
4716   test -z "$ac_dir" && ac_dir=.
4717   $as_executable_p "$ac_dir/$ac_word" || continue
4718 ac_cv_prog_ac_ct_LD="ld"
4719 echo "$as_me:4719: found $ac_dir/$ac_word" >&5
4720 break
4721 done
4722
4723   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4724 fi
4725 fi
4726 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4727 if test -n "$ac_ct_LD"; then
4728   echo "$as_me:4728: result: $ac_ct_LD" >&5
4729 echo "${ECHO_T}$ac_ct_LD" >&6
4730 else
4731   echo "$as_me:4731: result: no" >&5
4732 echo "${ECHO_T}no" >&6
4733 fi
4734
4735   LD=$ac_ct_LD
4736 else
4737   LD="$ac_cv_prog_LD"
4738 fi
4739
4740 if test -n "$ac_tool_prefix"; then
4741   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4742 set dummy ${ac_tool_prefix}ar; ac_word=$2
4743 echo "$as_me:4743: checking for $ac_word" >&5
4744 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4745 if test "${ac_cv_prog_AR+set}" = set; then
4746   echo $ECHO_N "(cached) $ECHO_C" >&6
4747 else
4748   if test -n "$AR"; then
4749   ac_cv_prog_AR="$AR" # Let the user override the test.
4750 else
4751   ac_save_IFS=$IFS; IFS=$ac_path_separator
4752 ac_dummy="$PATH"
4753 for ac_dir in $ac_dummy; do
4754   IFS=$ac_save_IFS
4755   test -z "$ac_dir" && ac_dir=.
4756   $as_executable_p "$ac_dir/$ac_word" || continue
4757 ac_cv_prog_AR="${ac_tool_prefix}ar"
4758 echo "$as_me:4758: found $ac_dir/$ac_word" >&5
4759 break
4760 done
4761
4762 fi
4763 fi
4764 AR=$ac_cv_prog_AR
4765 if test -n "$AR"; then
4766   echo "$as_me:4766: result: $AR" >&5
4767 echo "${ECHO_T}$AR" >&6
4768 else
4769   echo "$as_me:4769: result: no" >&5
4770 echo "${ECHO_T}no" >&6
4771 fi
4772
4773 fi
4774 if test -z "$ac_cv_prog_AR"; then
4775   ac_ct_AR=$AR
4776   # Extract the first word of "ar", so it can be a program name with args.
4777 set dummy ar; ac_word=$2
4778 echo "$as_me:4778: checking for $ac_word" >&5
4779 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4780 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4781   echo $ECHO_N "(cached) $ECHO_C" >&6
4782 else
4783   if test -n "$ac_ct_AR"; then
4784   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4785 else
4786   ac_save_IFS=$IFS; IFS=$ac_path_separator
4787 ac_dummy="$PATH"
4788 for ac_dir in $ac_dummy; do
4789   IFS=$ac_save_IFS
4790   test -z "$ac_dir" && ac_dir=.
4791   $as_executable_p "$ac_dir/$ac_word" || continue
4792 ac_cv_prog_ac_ct_AR="ar"
4793 echo "$as_me:4793: found $ac_dir/$ac_word" >&5
4794 break
4795 done
4796
4797   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4798 fi
4799 fi
4800 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4801 if test -n "$ac_ct_AR"; then
4802   echo "$as_me:4802: result: $ac_ct_AR" >&5
4803 echo "${ECHO_T}$ac_ct_AR" >&6
4804 else
4805   echo "$as_me:4805: result: no" >&5
4806 echo "${ECHO_T}no" >&6
4807 fi
4808
4809   AR=$ac_ct_AR
4810 else
4811   AR="$ac_cv_prog_AR"
4812 fi
4813
4814 if test -n "$ac_tool_prefix"; then
4815   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4816 set dummy ${ac_tool_prefix}nm; ac_word=$2
4817 echo "$as_me:4817: checking for $ac_word" >&5
4818 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4819 if test "${ac_cv_prog_NM+set}" = set; then
4820   echo $ECHO_N "(cached) $ECHO_C" >&6
4821 else
4822   if test -n "$NM"; then
4823   ac_cv_prog_NM="$NM" # Let the user override the test.
4824 else
4825   ac_save_IFS=$IFS; IFS=$ac_path_separator
4826 ac_dummy="$PATH"
4827 for ac_dir in $ac_dummy; do
4828   IFS=$ac_save_IFS
4829   test -z "$ac_dir" && ac_dir=.
4830   $as_executable_p "$ac_dir/$ac_word" || continue
4831 ac_cv_prog_NM="${ac_tool_prefix}nm"
4832 echo "$as_me:4832: found $ac_dir/$ac_word" >&5
4833 break
4834 done
4835
4836 fi
4837 fi
4838 NM=$ac_cv_prog_NM
4839 if test -n "$NM"; then
4840   echo "$as_me:4840: result: $NM" >&5
4841 echo "${ECHO_T}$NM" >&6
4842 else
4843   echo "$as_me:4843: result: no" >&5
4844 echo "${ECHO_T}no" >&6
4845 fi
4846
4847 fi
4848 if test -z "$ac_cv_prog_NM"; then
4849   ac_ct_NM=$NM
4850   # Extract the first word of "nm", so it can be a program name with args.
4851 set dummy nm; ac_word=$2
4852 echo "$as_me:4852: checking for $ac_word" >&5
4853 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4854 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4855   echo $ECHO_N "(cached) $ECHO_C" >&6
4856 else
4857   if test -n "$ac_ct_NM"; then
4858   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4859 else
4860   ac_save_IFS=$IFS; IFS=$ac_path_separator
4861 ac_dummy="$PATH"
4862 for ac_dir in $ac_dummy; do
4863   IFS=$ac_save_IFS
4864   test -z "$ac_dir" && ac_dir=.
4865   $as_executable_p "$ac_dir/$ac_word" || continue
4866 ac_cv_prog_ac_ct_NM="nm"
4867 echo "$as_me:4867: found $ac_dir/$ac_word" >&5
4868 break
4869 done
4870
4871   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4872 fi
4873 fi
4874 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4875 if test -n "$ac_ct_NM"; then
4876   echo "$as_me:4876: result: $ac_ct_NM" >&5
4877 echo "${ECHO_T}$ac_ct_NM" >&6
4878 else
4879   echo "$as_me:4879: result: no" >&5
4880 echo "${ECHO_T}no" >&6
4881 fi
4882
4883   NM=$ac_ct_NM
4884 else
4885   NM="$ac_cv_prog_NM"
4886 fi
4887
4888 if test -n "$ac_tool_prefix"; then
4889   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4890 set dummy ${ac_tool_prefix}ar; ac_word=$2
4891 echo "$as_me:4891: checking for $ac_word" >&5
4892 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4893 if test "${ac_cv_prog_AR+set}" = set; then
4894   echo $ECHO_N "(cached) $ECHO_C" >&6
4895 else
4896   if test -n "$AR"; then
4897   ac_cv_prog_AR="$AR" # Let the user override the test.
4898 else
4899   ac_save_IFS=$IFS; IFS=$ac_path_separator
4900 ac_dummy="$PATH"
4901 for ac_dir in $ac_dummy; do
4902   IFS=$ac_save_IFS
4903   test -z "$ac_dir" && ac_dir=.
4904   $as_executable_p "$ac_dir/$ac_word" || continue
4905 ac_cv_prog_AR="${ac_tool_prefix}ar"
4906 echo "$as_me:4906: found $ac_dir/$ac_word" >&5
4907 break
4908 done
4909
4910 fi
4911 fi
4912 AR=$ac_cv_prog_AR
4913 if test -n "$AR"; then
4914   echo "$as_me:4914: result: $AR" >&5
4915 echo "${ECHO_T}$AR" >&6
4916 else
4917   echo "$as_me:4917: result: no" >&5
4918 echo "${ECHO_T}no" >&6
4919 fi
4920
4921 fi
4922 if test -z "$ac_cv_prog_AR"; then
4923   ac_ct_AR=$AR
4924   # Extract the first word of "ar", so it can be a program name with args.
4925 set dummy ar; ac_word=$2
4926 echo "$as_me:4926: checking for $ac_word" >&5
4927 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4928 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4929   echo $ECHO_N "(cached) $ECHO_C" >&6
4930 else
4931   if test -n "$ac_ct_AR"; then
4932   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4933 else
4934   ac_save_IFS=$IFS; IFS=$ac_path_separator
4935 ac_dummy="$PATH"
4936 for ac_dir in $ac_dummy; do
4937   IFS=$ac_save_IFS
4938   test -z "$ac_dir" && ac_dir=.
4939   $as_executable_p "$ac_dir/$ac_word" || continue
4940 ac_cv_prog_ac_ct_AR="ar"
4941 echo "$as_me:4941: found $ac_dir/$ac_word" >&5
4942 break
4943 done
4944
4945   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4946 fi
4947 fi
4948 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4949 if test -n "$ac_ct_AR"; then
4950   echo "$as_me:4950: result: $ac_ct_AR" >&5
4951 echo "${ECHO_T}$ac_ct_AR" >&6
4952 else
4953   echo "$as_me:4953: result: no" >&5
4954 echo "${ECHO_T}no" >&6
4955 fi
4956
4957   AR=$ac_ct_AR
4958 else
4959   AR="$ac_cv_prog_AR"
4960 fi
4961
4962 echo "$as_me:4962: checking for options to update archives" >&5
4963 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4964 if test "${cf_cv_ar_flags+set}" = set; then
4965   echo $ECHO_N "(cached) $ECHO_C" >&6
4966 else
4967
4968         case "$cf_cv_system_name" in
4969         (*-msvc*)
4970                 cf_cv_ar_flags=''
4971                 cat >mk_static_lib.sh <<-EOF
4972                 #!$SHELL
4973                 MSVC_BIN="$AR"
4974                 out="\$1"
4975                 shift
4976                 exec \$MSVC_BIN -out:"\$out" \$@
4977                 EOF
4978                 chmod +x mk_static_lib.sh
4979                 AR=`pwd`/mk_static_lib.sh
4980                 ;;
4981         (*)
4982                 cf_cv_ar_flags=unknown
4983                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4984                 do
4985
4986                         # check if $ARFLAGS already contains this choice
4987                         if test "x$ARFLAGS" != "x" ; then
4988                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4989                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4990                                         cf_cv_ar_flags=
4991                                         break
4992                                 fi
4993                         fi
4994
4995                         rm -f "conftest.$ac_cv_objext"
4996                         rm -f conftest.a
4997
4998                         cat >"conftest.$ac_ext" <<EOF
4999 #line 4999 "configure"
5000 int     testdata[3] = { 123, 456, 789 };
5001 EOF
5002                         if { (eval echo "$as_me:5002: \"$ac_compile\"") >&5
5003   (eval $ac_compile) 2>&5
5004   ac_status=$?
5005   echo "$as_me:5005: \$? = $ac_status" >&5
5006   (exit "$ac_status"); } ; then
5007                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5008                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5009                                 if test -f conftest.a ; then
5010                                         cf_cv_ar_flags="$cf_ar_flags"
5011                                         break
5012                                 fi
5013                         else
5014                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5015
5016 echo "${as_me:-configure}:5016: testing cannot compile test-program ..." 1>&5
5017
5018                                 break
5019                         fi
5020                 done
5021                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5022                 ;;
5023         esac
5024
5025 fi
5026 echo "$as_me:5026: result: $cf_cv_ar_flags" >&5
5027 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5028
5029 if test -n "$ARFLAGS" ; then
5030         if test -n "$cf_cv_ar_flags" ; then
5031                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5032         fi
5033 else
5034         ARFLAGS=$cf_cv_ar_flags
5035 fi
5036
5037 echo "$as_me:5037: checking if you have specified an install-prefix" >&5
5038 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
5039
5040 # Check whether --with-install-prefix or --without-install-prefix was given.
5041 if test "${with_install_prefix+set}" = set; then
5042   withval="$with_install_prefix"
5043   case "x$withval" in
5044         (xyes|xno)
5045                 ;;
5046         (*)     DESTDIR="$withval"
5047                 ;;
5048         esac
5049 fi;
5050 echo "$as_me:5050: result: $DESTDIR" >&5
5051 echo "${ECHO_T}$DESTDIR" >&6
5052
5053 ###############################################################################
5054
5055 # If we're cross-compiling, allow the user to override the tools and their
5056 # options.  The configure script is oriented toward identifying the host
5057 # compiler, etc., but we need a build compiler to generate parts of the source.
5058
5059 case "$cf_cv_system_name" in
5060 (*-msvc*)
5061         LDFLAGS="$LDFLAGS user32.lib"
5062         export LDFLAGS
5063         ;;
5064 esac
5065
5066 if test "$cross_compiling" = yes ; then
5067
5068         # defaults that we might want to override
5069         : ${BUILD_CFLAGS:=''}
5070         : ${BUILD_CPPFLAGS:=''}
5071         : ${BUILD_LDFLAGS:=''}
5072         : ${BUILD_LIBS:=''}
5073         : ${BUILD_EXEEXT:='$x'}
5074         : ${BUILD_OBJEXT:='o'}
5075
5076 # Check whether --with-build-cc or --without-build-cc was given.
5077 if test "${with_build_cc+set}" = set; then
5078   withval="$with_build_cc"
5079   BUILD_CC="$withval"
5080 else
5081   for ac_prog in gcc clang c99 c89 cc cl
5082 do
5083   # Extract the first word of "$ac_prog", so it can be a program name with args.
5084 set dummy $ac_prog; ac_word=$2
5085 echo "$as_me:5085: checking for $ac_word" >&5
5086 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5087 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5088   echo $ECHO_N "(cached) $ECHO_C" >&6
5089 else
5090   if test -n "$BUILD_CC"; then
5091   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5092 else
5093   ac_save_IFS=$IFS; IFS=$ac_path_separator
5094 ac_dummy="$PATH"
5095 for ac_dir in $ac_dummy; do
5096   IFS=$ac_save_IFS
5097   test -z "$ac_dir" && ac_dir=.
5098   $as_executable_p "$ac_dir/$ac_word" || continue
5099 ac_cv_prog_BUILD_CC="$ac_prog"
5100 echo "$as_me:5100: found $ac_dir/$ac_word" >&5
5101 break
5102 done
5103
5104 fi
5105 fi
5106 BUILD_CC=$ac_cv_prog_BUILD_CC
5107 if test -n "$BUILD_CC"; then
5108   echo "$as_me:5108: result: $BUILD_CC" >&5
5109 echo "${ECHO_T}$BUILD_CC" >&6
5110 else
5111   echo "$as_me:5111: result: no" >&5
5112 echo "${ECHO_T}no" >&6
5113 fi
5114
5115   test -n "$BUILD_CC" && break
5116 done
5117 test -n "$BUILD_CC" || BUILD_CC="none"
5118
5119 fi;
5120         echo "$as_me:5120: checking for native build C compiler" >&5
5121 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5122         echo "$as_me:5122: result: $BUILD_CC" >&5
5123 echo "${ECHO_T}$BUILD_CC" >&6
5124
5125         echo "$as_me:5125: checking for native build C preprocessor" >&5
5126 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5127
5128 # Check whether --with-build-cpp or --without-build-cpp was given.
5129 if test "${with_build_cpp+set}" = set; then
5130   withval="$with_build_cpp"
5131   BUILD_CPP="$withval"
5132 else
5133   BUILD_CPP='${BUILD_CC} -E'
5134 fi;
5135         echo "$as_me:5135: result: $BUILD_CPP" >&5
5136 echo "${ECHO_T}$BUILD_CPP" >&6
5137
5138         echo "$as_me:5138: checking for native build C flags" >&5
5139 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5140
5141 # Check whether --with-build-cflags or --without-build-cflags was given.
5142 if test "${with_build_cflags+set}" = set; then
5143   withval="$with_build_cflags"
5144   BUILD_CFLAGS="$withval"
5145 fi;
5146         echo "$as_me:5146: result: $BUILD_CFLAGS" >&5
5147 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5148
5149         echo "$as_me:5149: checking for native build C preprocessor-flags" >&5
5150 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5151
5152 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5153 if test "${with_build_cppflags+set}" = set; then
5154   withval="$with_build_cppflags"
5155   BUILD_CPPFLAGS="$withval"
5156 fi;
5157         echo "$as_me:5157: result: $BUILD_CPPFLAGS" >&5
5158 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5159
5160         echo "$as_me:5160: checking for native build linker-flags" >&5
5161 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5162
5163 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5164 if test "${with_build_ldflags+set}" = set; then
5165   withval="$with_build_ldflags"
5166   BUILD_LDFLAGS="$withval"
5167 fi;
5168         echo "$as_me:5168: result: $BUILD_LDFLAGS" >&5
5169 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5170
5171         echo "$as_me:5171: checking for native build linker-libraries" >&5
5172 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5173
5174 # Check whether --with-build-libs or --without-build-libs was given.
5175 if test "${with_build_libs+set}" = set; then
5176   withval="$with_build_libs"
5177   BUILD_LIBS="$withval"
5178 fi;
5179         echo "$as_me:5179: result: $BUILD_LIBS" >&5
5180 echo "${ECHO_T}$BUILD_LIBS" >&6
5181
5182         # this assumes we're on Unix.
5183         BUILD_EXEEXT=
5184         BUILD_OBJEXT=o
5185
5186         : ${BUILD_CC:='${CC}'}
5187
5188         if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
5189                 { { echo "$as_me:5189: error: Cross-build requires two compilers.
5190 Use --with-build-cc to specify the native compiler." >&5
5191 echo "$as_me: error: Cross-build requires two compilers.
5192 Use --with-build-cc to specify the native compiler." >&2;}
5193    { (exit 1); exit 1; }; }
5194         fi
5195
5196 else
5197         : ${BUILD_CC:='${CC}'}
5198         : ${BUILD_CPP:='${CPP}'}
5199         : ${BUILD_CFLAGS:='${CFLAGS}'}
5200         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5201         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5202         : ${BUILD_LIBS:='${LIBS}'}
5203         : ${BUILD_EXEEXT:='$x'}
5204         : ${BUILD_OBJEXT:='o'}
5205 fi
5206
5207 ###############################################################################
5208
5209 ### Options to allow the user to specify the set of libraries which are used.
5210 ### Use "--without-normal --with-shared" to allow the default model to be
5211 ### shared, for example.
5212 cf_list_models=""
5213
5214 echo "$as_me:5214: checking if libtool -version-number should be used" >&5
5215 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5216
5217 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5218 if test "${enable_libtool_version+set}" = set; then
5219   enableval="$enable_libtool_version"
5220   test "$enableval" != no && enableval=yes
5221         if test "$enableval" != "yes" ; then
5222     cf_libtool_version=no
5223         else
5224                 cf_libtool_version=yes
5225         fi
5226 else
5227   enableval=yes
5228         cf_libtool_version=yes
5229
5230 fi;
5231 echo "$as_me:5231: result: $cf_libtool_version" >&5
5232 echo "${ECHO_T}$cf_libtool_version" >&6
5233
5234 if test "$cf_libtool_version" = yes ; then
5235         LIBTOOL_VERSION="-version-number"
5236 else
5237         LIBTOOL_VERSION="-version-info"
5238         case "x$VERSION" in
5239         (x)
5240                 { echo "$as_me:5240: WARNING: VERSION was not set" >&5
5241 echo "$as_me: WARNING: VERSION was not set" >&2;}
5242                 ;;
5243         (x*.*.*)
5244                 ABI_VERSION="$VERSION"
5245                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5246
5247 echo "${as_me:-configure}:5247: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5248
5249                 ;;
5250         (x*:*:*)
5251                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5252                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5253
5254 echo "${as_me:-configure}:5254: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5255
5256                 ;;
5257         (*)
5258                 { echo "$as_me:5258: WARNING: unexpected VERSION value: $VERSION" >&5
5259 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5260                 ;;
5261         esac
5262 fi
5263
5264 LIBTOOL=
5265
5266 # common library maintenance symbols that are convenient for libtool scripts:
5267 LIB_CREATE='${AR} -cr'
5268 LIB_OBJECT='${OBJECTS}'
5269 LIB_SUFFIX=.a
5270 LIB_PREP="$RANLIB"
5271
5272 # symbols used to prop libtool up to enable it to determine what it should be
5273 # doing:
5274 LIB_CLEAN=
5275 LIB_COMPILE=
5276 LIB_LINK='${CC}'
5277 LIB_INSTALL=
5278 LIB_UNINSTALL=
5279
5280 echo "$as_me:5280: checking if you want to build libraries with libtool" >&5
5281 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5282
5283 # Check whether --with-libtool or --without-libtool was given.
5284 if test "${with_libtool+set}" = set; then
5285   withval="$with_libtool"
5286   with_libtool=$withval
5287 else
5288   with_libtool=no
5289 fi;
5290 echo "$as_me:5290: result: $with_libtool" >&5
5291 echo "${ECHO_T}$with_libtool" >&6
5292 if test "$with_libtool" != "no"; then
5293
5294         if test "$with_libtool" != "yes" ; then
5295
5296 if test "x$prefix" != xNONE; then
5297         cf_path_syntax="$prefix"
5298 else
5299         cf_path_syntax="$ac_default_prefix"
5300 fi
5301
5302 case ".$with_libtool" in
5303 (.\$\(*\)*|.\'*\'*)
5304         ;;
5305 (..|./*|.\\*)
5306         ;;
5307 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5308         ;;
5309 (.\$\{*prefix\}*|.\$\{*dir\}*)
5310         eval with_libtool="$with_libtool"
5311         case ".$with_libtool" in
5312         (.NONE/*)
5313                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5314                 ;;
5315         esac
5316         ;;
5317 (.no|.NONE/*)
5318         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5319         ;;
5320 (*)
5321         { { echo "$as_me:5321: error: expected a pathname, not \"$with_libtool\"" >&5
5322 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5323    { (exit 1); exit 1; }; }
5324         ;;
5325 esac
5326
5327                 LIBTOOL=$with_libtool
5328         else
5329                 if test -n "$ac_tool_prefix"; then
5330   for ac_prog in libtool glibtool
5331   do
5332     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5333 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5334 echo "$as_me:5334: checking for $ac_word" >&5
5335 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5336 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5337   echo $ECHO_N "(cached) $ECHO_C" >&6
5338 else
5339   if test -n "$LIBTOOL"; then
5340   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5341 else
5342   ac_save_IFS=$IFS; IFS=$ac_path_separator
5343 ac_dummy="$PATH"
5344 for ac_dir in $ac_dummy; do
5345   IFS=$ac_save_IFS
5346   test -z "$ac_dir" && ac_dir=.
5347   $as_executable_p "$ac_dir/$ac_word" || continue
5348 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5349 echo "$as_me:5349: found $ac_dir/$ac_word" >&5
5350 break
5351 done
5352
5353 fi
5354 fi
5355 LIBTOOL=$ac_cv_prog_LIBTOOL
5356 if test -n "$LIBTOOL"; then
5357   echo "$as_me:5357: result: $LIBTOOL" >&5
5358 echo "${ECHO_T}$LIBTOOL" >&6
5359 else
5360   echo "$as_me:5360: result: no" >&5
5361 echo "${ECHO_T}no" >&6
5362 fi
5363
5364     test -n "$LIBTOOL" && break
5365   done
5366 fi
5367 if test -z "$LIBTOOL"; then
5368   ac_ct_LIBTOOL=$LIBTOOL
5369   for ac_prog in libtool glibtool
5370 do
5371   # Extract the first word of "$ac_prog", so it can be a program name with args.
5372 set dummy $ac_prog; ac_word=$2
5373 echo "$as_me:5373: checking for $ac_word" >&5
5374 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5375 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5376   echo $ECHO_N "(cached) $ECHO_C" >&6
5377 else
5378   if test -n "$ac_ct_LIBTOOL"; then
5379   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5380 else
5381   ac_save_IFS=$IFS; IFS=$ac_path_separator
5382 ac_dummy="$PATH"
5383 for ac_dir in $ac_dummy; do
5384   IFS=$ac_save_IFS
5385   test -z "$ac_dir" && ac_dir=.
5386   $as_executable_p "$ac_dir/$ac_word" || continue
5387 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5388 echo "$as_me:5388: found $ac_dir/$ac_word" >&5
5389 break
5390 done
5391
5392 fi
5393 fi
5394 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5395 if test -n "$ac_ct_LIBTOOL"; then
5396   echo "$as_me:5396: result: $ac_ct_LIBTOOL" >&5
5397 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5398 else
5399   echo "$as_me:5399: result: no" >&5
5400 echo "${ECHO_T}no" >&6
5401 fi
5402
5403   test -n "$ac_ct_LIBTOOL" && break
5404 done
5405 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5406
5407   LIBTOOL=$ac_ct_LIBTOOL
5408 fi
5409
5410 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5411 then
5412         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.].*//'`
5413 else
5414         cf_cv_libtool_version=
5415 fi
5416 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5417
5418                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5419                 then
5420
5421 unset ac_cv_prog_ac_ct_LIBTOOL
5422 unset ac_ct_LIBTOOL
5423 unset LIBTOOL
5424
5425                         if test -n "$ac_tool_prefix"; then
5426   for ac_prog in glibtool
5427   do
5428     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5429 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5430 echo "$as_me:5430: checking for $ac_word" >&5
5431 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5432 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5433   echo $ECHO_N "(cached) $ECHO_C" >&6
5434 else
5435   if test -n "$LIBTOOL"; then
5436   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5437 else
5438   ac_save_IFS=$IFS; IFS=$ac_path_separator
5439 ac_dummy="$PATH"
5440 for ac_dir in $ac_dummy; do
5441   IFS=$ac_save_IFS
5442   test -z "$ac_dir" && ac_dir=.
5443   $as_executable_p "$ac_dir/$ac_word" || continue
5444 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5445 echo "$as_me:5445: found $ac_dir/$ac_word" >&5
5446 break
5447 done
5448
5449 fi
5450 fi
5451 LIBTOOL=$ac_cv_prog_LIBTOOL
5452 if test -n "$LIBTOOL"; then
5453   echo "$as_me:5453: result: $LIBTOOL" >&5
5454 echo "${ECHO_T}$LIBTOOL" >&6
5455 else
5456   echo "$as_me:5456: result: no" >&5
5457 echo "${ECHO_T}no" >&6
5458 fi
5459
5460     test -n "$LIBTOOL" && break
5461   done
5462 fi
5463 if test -z "$LIBTOOL"; then
5464   ac_ct_LIBTOOL=$LIBTOOL
5465   for ac_prog in glibtool
5466 do
5467   # Extract the first word of "$ac_prog", so it can be a program name with args.
5468 set dummy $ac_prog; ac_word=$2
5469 echo "$as_me:5469: checking for $ac_word" >&5
5470 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5471 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5472   echo $ECHO_N "(cached) $ECHO_C" >&6
5473 else
5474   if test -n "$ac_ct_LIBTOOL"; then
5475   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5476 else
5477   ac_save_IFS=$IFS; IFS=$ac_path_separator
5478 ac_dummy="$PATH"
5479 for ac_dir in $ac_dummy; do
5480   IFS=$ac_save_IFS
5481   test -z "$ac_dir" && ac_dir=.
5482   $as_executable_p "$ac_dir/$ac_word" || continue
5483 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5484 echo "$as_me:5484: found $ac_dir/$ac_word" >&5
5485 break
5486 done
5487
5488 fi
5489 fi
5490 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5491 if test -n "$ac_ct_LIBTOOL"; then
5492   echo "$as_me:5492: result: $ac_ct_LIBTOOL" >&5
5493 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5494 else
5495   echo "$as_me:5495: result: no" >&5
5496 echo "${ECHO_T}no" >&6
5497 fi
5498
5499   test -n "$ac_ct_LIBTOOL" && break
5500 done
5501 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5502
5503   LIBTOOL=$ac_ct_LIBTOOL
5504 fi
5505
5506 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5507 then
5508         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.].*//'`
5509 else
5510         cf_cv_libtool_version=
5511 fi
5512 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5513
5514                 fi
5515         fi
5516         if test -z "$LIBTOOL" ; then
5517                 { { echo "$as_me:5517: error: Cannot find libtool" >&5
5518 echo "$as_me: error: Cannot find libtool" >&2;}
5519    { (exit 1); exit 1; }; }
5520         fi
5521         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5522         LIB_OBJECT='${OBJECTS:.o=.lo}'
5523         LIB_SUFFIX=.la
5524         LIB_CLEAN='${LIBTOOL} --mode=clean'
5525         LIB_COMPILE='${LIBTOOL} --mode=compile'
5526         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5527         LIB_INSTALL='${LIBTOOL} --mode=install'
5528         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5529         LIB_PREP=:
5530
5531 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5532 then
5533         echo "$as_me:5533: checking version of $LIBTOOL" >&5
5534 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5535
5536 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5537 then
5538         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.].*//'`
5539 else
5540         cf_cv_libtool_version=
5541 fi
5542 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5543
5544         echo "$as_me:5544: result: $cf_cv_libtool_version" >&5
5545 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5546         if test -n "$cf_cv_libtool_version"
5547         then
5548                 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
5549                 case "x$cf_check_libtool_version" in
5550                 (*...GNU-libtool...*)
5551                         ;;
5552                 (*)
5553                         { { echo "$as_me:5553: error: This is not GNU libtool" >&5
5554 echo "$as_me: error: This is not GNU libtool" >&2;}
5555    { (exit 1); exit 1; }; }
5556                         ;;
5557                 esac
5558         else
5559                 { { echo "$as_me:5559: error: No version found for $LIBTOOL" >&5
5560 echo "$as_me: error: No version found for $LIBTOOL" >&2;}
5561    { (exit 1); exit 1; }; }
5562         fi
5563 else
5564         { { echo "$as_me:5564: error: GNU libtool has not been found" >&5
5565 echo "$as_me: error: GNU libtool has not been found" >&2;}
5566    { (exit 1); exit 1; }; }
5567 fi
5568
5569         # special hack to add -no-undefined (which libtool should do for itself)
5570         LT_UNDEF=
5571         case "$cf_cv_system_name" in
5572         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5573                 LT_UNDEF=-no-undefined
5574                 ;;
5575         esac
5576
5577         # special hack to add --tag option for C++ compiler
5578         case "$cf_cv_libtool_version" in
5579         (1.[5-9]*|[2-9].[0-9.a-z]*)
5580                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5581                 LIBTOOL="$LIBTOOL --tag=CC"
5582                 ;;
5583         (*)
5584                 LIBTOOL_CXX="$LIBTOOL"
5585                 ;;
5586         esac
5587 else
5588         LIBTOOL=""
5589         LIBTOOL_CXX=""
5590 fi
5591
5592 test -z "$LIBTOOL" && ECHO_LT=
5593
5594 if test "$with_libtool" != "no" ; then
5595
5596 cf_list_models="$cf_list_models libtool"
5597
5598 else
5599
5600 echo "$as_me:5600: checking if you want to build shared libraries" >&5
5601 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5602
5603 # Check whether --with-shared or --without-shared was given.
5604 if test "${with_shared+set}" = set; then
5605   withval="$with_shared"
5606   with_shared=$withval
5607 else
5608   with_shared=no
5609 fi;
5610 echo "$as_me:5610: result: $with_shared" >&5
5611 echo "${ECHO_T}$with_shared" >&6
5612 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5613
5614 echo "$as_me:5614: checking if you want to build static libraries" >&5
5615 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5616
5617 # Check whether --with-normal or --without-normal was given.
5618 if test "${with_normal+set}" = set; then
5619   withval="$with_normal"
5620   with_normal=$withval
5621 else
5622   with_normal=yes
5623 fi;
5624 echo "$as_me:5624: result: $with_normal" >&5
5625 echo "${ECHO_T}$with_normal" >&6
5626 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5627
5628 echo "$as_me:5628: checking if you want to build debug libraries" >&5
5629 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5630
5631 # Check whether --with-debug or --without-debug was given.
5632 if test "${with_debug+set}" = set; then
5633   withval="$with_debug"
5634   with_debug=$withval
5635 else
5636   with_debug=yes
5637 fi;
5638 echo "$as_me:5638: result: $with_debug" >&5
5639 echo "${ECHO_T}$with_debug" >&6
5640 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5641
5642 echo "$as_me:5642: checking if you want to build profiling libraries" >&5
5643 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5644
5645 # Check whether --with-profile or --without-profile was given.
5646 if test "${with_profile+set}" = set; then
5647   withval="$with_profile"
5648   with_profile=$withval
5649 else
5650   with_profile=no
5651 fi;
5652 echo "$as_me:5652: result: $with_profile" >&5
5653 echo "${ECHO_T}$with_profile" >&6
5654 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5655
5656 fi
5657
5658 if test "X$cf_with_cxx_binding" != Xno; then
5659 if test "x$with_shared" = "xyes"; then
5660 echo "$as_me:5660: checking if you want to build C++ shared libraries" >&5
5661 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5662
5663 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5664 if test "${with_cxx_shared+set}" = set; then
5665   withval="$with_cxx_shared"
5666   with_shared_cxx=$withval
5667 else
5668   with_shared_cxx=no
5669 fi;
5670 echo "$as_me:5670: result: $with_shared_cxx" >&5
5671 echo "${ECHO_T}$with_shared_cxx" >&6
5672 fi
5673 fi
5674
5675 ###############################################################################
5676
5677 echo "$as_me:5677: checking for specified models" >&5
5678 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5679 test -z "$cf_list_models" && cf_list_models=normal
5680 test "$with_libtool" != "no" && cf_list_models=libtool
5681 echo "$as_me:5681: result: $cf_list_models" >&5
5682 echo "${ECHO_T}$cf_list_models" >&6
5683
5684 ### Use the first model as the default, and save its suffix for use in building
5685 ### up test-applications.
5686 echo "$as_me:5686: checking for default model" >&5
5687 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5688 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5689 echo "$as_me:5689: result: $DFT_LWR_MODEL" >&5
5690 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5691
5692 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5693
5694 TICS_NAME=tic
5695
5696 TINFO_NAME=tinfo
5697
5698 LIB_NAME=ncurses
5699
5700 LIB_DIR=../lib
5701 LIB_2ND=../../lib
5702
5703 echo "$as_me:5703: checking if you want to have a library-prefix" >&5
5704 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5705
5706 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5707 if test "${with_lib_prefix+set}" = set; then
5708   withval="$with_lib_prefix"
5709   with_lib_prefix=$withval
5710 else
5711   with_lib_prefix=auto
5712 fi;
5713 echo "$as_me:5713: result: $with_lib_prefix" >&5
5714 echo "${ECHO_T}$with_lib_prefix" >&6
5715
5716 if test "$with_lib_prefix" = auto
5717 then
5718
5719         case "$cf_cv_system_name" in
5720         (OS/2*|os2*)
5721                 if test "$DFT_LWR_MODEL" = libtool; then
5722                         LIB_PREFIX='lib'
5723                 else
5724                         LIB_PREFIX=''
5725                 fi
5726                 ;;
5727         (*-msvc*)
5728                 LIB_PREFIX=''
5729                 ;;
5730         (*)     LIB_PREFIX='lib'
5731                 ;;
5732         esac
5733 cf_prefix=$LIB_PREFIX
5734
5735 elif test "$with_lib_prefix" = no
5736 then
5737         LIB_PREFIX=
5738 else
5739         LIB_PREFIX=$with_lib_prefix
5740 fi
5741
5742 LIB_SUFFIX=
5743
5744         echo "$as_me:5744: checking for PATH separator" >&5
5745 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5746         case "$cf_cv_system_name" in
5747         (os2*)  PATH_SEPARATOR=';'  ;;
5748         (*)     ${PATH_SEPARATOR:=':'}  ;;
5749         esac
5750
5751         echo "$as_me:5751: result: $PATH_SEPARATOR" >&5
5752 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5753
5754 ###############################################################################
5755
5756 echo "$as_me:5756: checking if you want to build a separate terminfo library" >&5
5757 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5758
5759 # Check whether --with-termlib or --without-termlib was given.
5760 if test "${with_termlib+set}" = set; then
5761   withval="$with_termlib"
5762   with_termlib=$withval
5763 else
5764   with_termlib=no
5765 fi;
5766 echo "$as_me:5766: result: $with_termlib" >&5
5767 echo "${ECHO_T}$with_termlib" >&6
5768
5769 echo "$as_me:5769: checking if you want to build a separate tic library" >&5
5770 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5771
5772 # Check whether --with-ticlib or --without-ticlib was given.
5773 if test "${with_ticlib+set}" = set; then
5774   withval="$with_ticlib"
5775   with_ticlib=$withval
5776 else
5777   with_ticlib=no
5778 fi;
5779 echo "$as_me:5779: result: $with_ticlib" >&5
5780 echo "${ECHO_T}$with_ticlib" >&6
5781
5782 if test X"$CC_G_OPT" = X"" ; then
5783         CC_G_OPT='-g'
5784         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5785 fi
5786
5787 if test X"$CXX_G_OPT" = X"" ; then
5788         CXX_G_OPT='-g'
5789         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5790 fi
5791
5792 echo "$as_me:5792: checking for default loader flags" >&5
5793 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5794 case "$DFT_LWR_MODEL" in
5795 (libtool) LD_MODEL=''   ;;
5796 (normal)  LD_MODEL=''   ;;
5797 (debug)   LD_MODEL=$CC_G_OPT ;;
5798 (profile) LD_MODEL='-pg';;
5799 (shared)  LD_MODEL=''   ;;
5800 esac
5801 echo "$as_me:5801: result: $LD_MODEL" >&5
5802 echo "${ECHO_T}$LD_MODEL" >&6
5803
5804 case "$DFT_LWR_MODEL" in
5805 (shared)
5806
5807 echo "$as_me:5807: checking if rpath option should be used" >&5
5808 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5809
5810 # Check whether --enable-rpath or --disable-rpath was given.
5811 if test "${enable_rpath+set}" = set; then
5812   enableval="$enable_rpath"
5813   cf_cv_enable_rpath=$enableval
5814 else
5815   cf_cv_enable_rpath=no
5816 fi;
5817 echo "$as_me:5817: result: $cf_cv_enable_rpath" >&5
5818 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5819
5820 echo "$as_me:5820: checking if shared libraries should be relinked during install" >&5
5821 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5822
5823 # Check whether --enable-relink or --disable-relink was given.
5824 if test "${enable_relink+set}" = set; then
5825   enableval="$enable_relink"
5826   cf_cv_do_relink=$enableval
5827 else
5828   cf_cv_do_relink=yes
5829 fi;
5830 echo "$as_me:5830: result: $cf_cv_do_relink" >&5
5831 echo "${ECHO_T}$cf_cv_do_relink" >&6
5832         ;;
5833 esac
5834
5835 # we will build libraries one-level down.
5836 rel_builddir=..
5837
5838 LD_RPATH_OPT=
5839 if test "x$cf_cv_enable_rpath" != xno
5840 then
5841         echo "$as_me:5841: checking for an rpath option" >&5
5842 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5843         case "$cf_cv_system_name" in
5844         (irix*)
5845                 if test "$GCC" = yes; then
5846                         LD_RPATH_OPT="-Wl,-rpath,"
5847                 else
5848                         LD_RPATH_OPT="-rpath "
5849                 fi
5850                 ;;
5851         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5852                 LD_RPATH_OPT="-Wl,-rpath,"
5853                 ;;
5854         (openbsd[2-9].*|mirbsd*)
5855                 LD_RPATH_OPT="-Wl,-rpath,"
5856                 ;;
5857         (dragonfly*)
5858                 LD_RPATH_OPT="-rpath "
5859                 ;;
5860         (netbsd*)
5861                 LD_RPATH_OPT="-Wl,-rpath,"
5862                 ;;
5863         (osf*|mls+*)
5864                 LD_RPATH_OPT="-rpath "
5865                 ;;
5866         (solaris2*)
5867                 LD_RPATH_OPT="-R"
5868                 ;;
5869         (*)
5870                 ;;
5871         esac
5872         echo "$as_me:5872: result: $LD_RPATH_OPT" >&5
5873 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5874
5875         case "x$LD_RPATH_OPT" in
5876         (x-R*)
5877                 echo "$as_me:5877: checking if we need a space after rpath option" >&5
5878 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5879                 cf_save_LIBS="$LIBS"
5880
5881 cf_add_libs="$LIBS"
5882 # reverse order
5883 cf_add_0lib=
5884 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5885 # filter duplicates
5886 for cf_add_1lib in $cf_add_0lib; do
5887         for cf_add_2lib in $cf_add_libs; do
5888                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5889                         cf_add_1lib=
5890                         break
5891                 fi
5892         done
5893         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5894 done
5895 LIBS="$cf_add_libs"
5896
5897                 cat >"conftest.$ac_ext" <<_ACEOF
5898 #line 5898 "configure"
5899 #include "confdefs.h"
5900
5901 int
5902 main (void)
5903 {
5904
5905   ;
5906   return 0;
5907 }
5908 _ACEOF
5909 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5910 if { (eval echo "$as_me:5910: \"$ac_link\"") >&5
5911   (eval $ac_link) 2>&5
5912   ac_status=$?
5913   echo "$as_me:5913: \$? = $ac_status" >&5
5914   (exit "$ac_status"); } &&
5915          { ac_try='test -s "conftest$ac_exeext"'
5916   { (eval echo "$as_me:5916: \"$ac_try\"") >&5
5917   (eval $ac_try) 2>&5
5918   ac_status=$?
5919   echo "$as_me:5919: \$? = $ac_status" >&5
5920   (exit "$ac_status"); }; }; then
5921   cf_rpath_space=no
5922 else
5923   echo "$as_me: failed program was:" >&5
5924 cat "conftest.$ac_ext" >&5
5925 cf_rpath_space=yes
5926 fi
5927 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5928                 LIBS="$cf_save_LIBS"
5929                 echo "$as_me:5929: result: $cf_rpath_space" >&5
5930 echo "${ECHO_T}$cf_rpath_space" >&6
5931                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5932                 ;;
5933         esac
5934 fi
5935
5936         RM_SHARED_OPTS=
5937         LOCAL_LDFLAGS=
5938         LOCAL_LDFLAGS2=
5939         LD_SHARED_OPTS=
5940         INSTALL_LIB="-m 644"
5941         : ${rel_builddir:=.}
5942
5943         shlibdir=$libdir
5944
5945         MAKE_DLLS="#"
5946
5947         cf_cv_do_symlinks=no
5948         cf_ld_rpath_opt=
5949         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5950
5951         echo "$as_me:5951: checking if release/abi version should be used for shared libs" >&5
5952 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5953
5954 # Check whether --with-shlib-version or --without-shlib-version was given.
5955 if test "${with_shlib_version+set}" = set; then
5956   withval="$with_shlib_version"
5957   test -z "$withval" && withval=auto
5958         case "$withval" in
5959         (yes)
5960                 cf_cv_shlib_version=auto
5961                 ;;
5962         (rel|abi|auto)
5963                 cf_cv_shlib_version=$withval
5964                 ;;
5965         (*)
5966                 echo "$as_me:5966: result: $withval" >&5
5967 echo "${ECHO_T}$withval" >&6
5968                 { { echo "$as_me:5968: error: option value must be one of: rel, abi, or auto" >&5
5969 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5970    { (exit 1); exit 1; }; }
5971                 ;;
5972         esac
5973
5974 else
5975   cf_cv_shlib_version=auto
5976 fi;
5977         echo "$as_me:5977: result: $cf_cv_shlib_version" >&5
5978 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5979
5980         cf_cv_rm_so_locs=no
5981         cf_try_cflags=
5982
5983         # Some less-capable ports of gcc support only -fpic
5984         CC_SHARED_OPTS=
5985
5986         cf_try_fPIC=no
5987         if test "$GCC" = yes
5988         then
5989                 cf_try_fPIC=yes
5990         else
5991                 case "$cf_cv_system_name" in
5992                 (*linux*)       # e.g., PGI compiler
5993                         cf_try_fPIC=yes
5994                         ;;
5995                 esac
5996         fi
5997
5998         if test "$cf_try_fPIC" = yes
5999         then
6000                 echo "$as_me:6000: checking which $CC option to use" >&5
6001 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6002                 cf_save_CFLAGS="$CFLAGS"
6003                 for CC_SHARED_OPTS in -fPIC -fpic ''
6004                 do
6005                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6006                         cat >"conftest.$ac_ext" <<_ACEOF
6007 #line 6007 "configure"
6008 #include "confdefs.h"
6009 #include <stdio.h>
6010 int
6011 main (void)
6012 {
6013 int x = 1
6014   ;
6015   return 0;
6016 }
6017 _ACEOF
6018 rm -f "conftest.$ac_objext"
6019 if { (eval echo "$as_me:6019: \"$ac_compile\"") >&5
6020   (eval $ac_compile) 2>&5
6021   ac_status=$?
6022   echo "$as_me:6022: \$? = $ac_status" >&5
6023   (exit "$ac_status"); } &&
6024          { ac_try='test -s "conftest.$ac_objext"'
6025   { (eval echo "$as_me:6025: \"$ac_try\"") >&5
6026   (eval $ac_try) 2>&5
6027   ac_status=$?
6028   echo "$as_me:6028: \$? = $ac_status" >&5
6029   (exit "$ac_status"); }; }; then
6030   break
6031 else
6032   echo "$as_me: failed program was:" >&5
6033 cat "conftest.$ac_ext" >&5
6034 fi
6035 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6036                 done
6037                 echo "$as_me:6037: result: $CC_SHARED_OPTS" >&5
6038 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6039                 CFLAGS="$cf_save_CFLAGS"
6040         fi
6041
6042         cf_cv_shlib_version_infix=no
6043
6044         case "$cf_cv_system_name" in
6045         (aix4.3-9*|aix[5-7]*)
6046                 if test "$GCC" = yes; then
6047                         CC_SHARED_OPTS='-Wl,-brtl'
6048                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6049                 else
6050                         CC_SHARED_OPTS='-brtl'
6051                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6052                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6053                 fi
6054                 ;;
6055         (beos*)
6056                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6057                 ;;
6058         (cygwin*)
6059                 CC_SHARED_OPTS=
6060                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6061                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6062                 cf_cv_shlib_version=cygdll
6063                 cf_cv_shlib_version_infix=cygdll
6064                 shlibdir=$bindir
6065                 MAKE_DLLS=
6066                 cat >mk_shared_lib.sh <<-CF_EOF
6067                 #!$SHELL
6068                 SHARED_LIB=\$1
6069                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6070                 shift
6071                 cat <<-EOF
6072                 Linking shared library
6073                 ** SHARED_LIB \$SHARED_LIB
6074                 ** IMPORT_LIB \$IMPORT_LIB
6075 EOF
6076                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6077 CF_EOF
6078                 chmod +x mk_shared_lib.sh
6079                 ;;
6080         (msys*)
6081                 CC_SHARED_OPTS=
6082                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6083                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6084                 cf_cv_shlib_version=msysdll
6085                 cf_cv_shlib_version_infix=msysdll
6086                 shlibdir=$bindir
6087                 MAKE_DLLS=
6088                 cat >mk_shared_lib.sh <<-CF_EOF
6089                 #!$SHELL
6090                 SHARED_LIB=\$1
6091                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6092                 shift
6093                 cat <<-EOF
6094                 Linking shared library
6095                 ** SHARED_LIB \$SHARED_LIB
6096                 ** IMPORT_LIB \$IMPORT_LIB
6097 EOF
6098                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6099 CF_EOF
6100                 chmod +x mk_shared_lib.sh
6101                 ;;
6102         (darwin*)
6103                 cf_try_cflags="no-cpp-precomp"
6104                 CC_SHARED_OPTS="-dynamic"
6105                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6106                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6107                 cf_cv_shlib_version_infix=yes
6108                 echo "$as_me:6108: checking if ld -search_paths_first works" >&5
6109 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6110 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6111   echo $ECHO_N "(cached) $ECHO_C" >&6
6112 else
6113
6114                         cf_save_LDFLAGS=$LDFLAGS
6115                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6116                         cat >"conftest.$ac_ext" <<_ACEOF
6117 #line 6117 "configure"
6118 #include "confdefs.h"
6119
6120 int
6121 main (void)
6122 {
6123 int i;
6124   ;
6125   return 0;
6126 }
6127 _ACEOF
6128 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6129 if { (eval echo "$as_me:6129: \"$ac_link\"") >&5
6130   (eval $ac_link) 2>&5
6131   ac_status=$?
6132   echo "$as_me:6132: \$? = $ac_status" >&5
6133   (exit "$ac_status"); } &&
6134          { ac_try='test -s "conftest$ac_exeext"'
6135   { (eval echo "$as_me:6135: \"$ac_try\"") >&5
6136   (eval $ac_try) 2>&5
6137   ac_status=$?
6138   echo "$as_me:6138: \$? = $ac_status" >&5
6139   (exit "$ac_status"); }; }; then
6140   cf_cv_ldflags_search_paths_first=yes
6141 else
6142   echo "$as_me: failed program was:" >&5
6143 cat "conftest.$ac_ext" >&5
6144 cf_cv_ldflags_search_paths_first=no
6145 fi
6146 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6147                                 LDFLAGS=$cf_save_LDFLAGS
6148 fi
6149 echo "$as_me:6149: result: $cf_cv_ldflags_search_paths_first" >&5
6150 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6151                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6152                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6153                 fi
6154                 ;;
6155         (hpux[7-8]*)
6156                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6157                 if test "$GCC" != yes; then
6158                         CC_SHARED_OPTS='+Z'
6159                 fi
6160                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6161                 INSTALL_LIB="-m 555"
6162                 ;;
6163         (hpux*)
6164                 # (tested with gcc 2.7.2 -- I don't have c89)
6165                 if test "$GCC" = yes; then
6166                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6167                 else
6168                         CC_SHARED_OPTS='+Z'
6169                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6170                 fi
6171                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6172                 # HP-UX shared libraries must be executable, and should be
6173                 # readonly to exploit a quirk in the memory manager.
6174                 INSTALL_LIB="-m 555"
6175                 ;;
6176         (interix*)
6177                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6178                 if test "$cf_cv_shlib_version" = rel; then
6179                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6180                 else
6181                         cf_shared_soname='`basename $@`'
6182                 fi
6183                 CC_SHARED_OPTS=
6184                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6185                 ;;
6186         (irix*)
6187                 if test "$cf_cv_enable_rpath" = yes ; then
6188                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6189                 fi
6190                 # tested with IRIX 5.2 and 'cc'.
6191                 if test "$GCC" != yes; then
6192                         CC_SHARED_OPTS='-KPIC'
6193                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6194                 else
6195                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6196                 fi
6197                 cf_cv_rm_so_locs=yes
6198                 ;;
6199         (linux*|gnu*|k*bsd*-gnu)
6200                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6201                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6202                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6203                 fi
6204                 if test "$cf_cv_enable_rpath" = yes ; then
6205                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6206                 fi
6207
6208         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6209         if test "$cf_cv_shlib_version" = rel; then
6210                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6211         else
6212                 cf_cv_shared_soname='`basename $@`'
6213         fi
6214
6215                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6216                 ;;
6217         (mingw*msvc*)
6218                 cf_cv_shlib_version=msvcdll
6219                 cf_cv_shlib_version_infix=msvcdll
6220                 shlibdir=$bindir
6221                 MAKE_DLLS=
6222                 if test "$DFT_LWR_MODEL" = "shared" ; then
6223                         LOCAL_LDFLAGS="-link -dll"
6224                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6225                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6226                 fi
6227                 CC_SHARED_OPTS=
6228                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6229                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6230                 cat >mk_shared_lib.sh <<-CF_EOF
6231                 #!$SHELL
6232                 SHARED_LIB=\$1
6233                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6234                 shift
6235                 my_ld=\$1
6236                 shift
6237                 cat <<-EOF
6238                 Linking shared library
6239                 ** SHARED LIB \$SHARED_LIB
6240                 ** IMPORT_LIB \$IMPORT_LIB
6241 EOF
6242                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6243                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6244                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6245 CF_EOF
6246                 chmod +x mk_shared_lib.sh
6247                 cat >mk_prog.sh <<-CF_EOF
6248                 #!$SHELL
6249                 shift
6250                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6251                 LD="$LD"
6252                 clopts=()
6253                 ldopts=("/subsystem:console")
6254                 libs=()
6255                 isdll=0
6256                 while test \$# -gt 0; do
6257                         case "\$1" in
6258                                 -link)
6259                                         # ignore -link argument
6260                                         ;;
6261                                 -M[TD] | -M[TD]d)
6262                                         # ignore runtime-library option
6263                                         ;;
6264                                 -dll)
6265                                         isdll=1
6266                                         ;;
6267                                 -W* | -w*)
6268                                         # ignore warnings
6269                                         ;;
6270                                 -D*)
6271                                         clopts+=("\$1")
6272                                         ;;
6273                                 -I*)
6274                                         clopts+=("\$1")
6275                                         ;;
6276                                 -l*)
6277                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6278                                         ;;
6279                                 -L*)
6280                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6281                                         ;;
6282                                 *.obj | *.o)
6283                                         ldopts+=("\$1")
6284                                         ;;
6285                                 -Wl,*)
6286                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6287                                                 ldopts+=("\${linkarg}")
6288                                         done
6289                                         ;;
6290                                 *.lib)
6291                                         ldopts+=("\$1")
6292                                         ;;
6293                                 -o)
6294                                         shift
6295                                         ldopts+=("-out:\$1")
6296                                         ;;
6297                                 *)
6298                                         clopts+=("\$1")
6299                                         ldopts+=("\$1")
6300                                         ;;
6301                         esac
6302                         shift
6303                 done
6304                 if [ "\$isdll" -ne 0 ]; then
6305                         for lib in \${libs[*]}; do
6306                                 ldopts+=("\$lib.dll.lib")
6307                         done
6308                 else
6309                         for lib in \${libs[*]}; do
6310                                 ldopts+=("\$lib.lib")
6311                         done
6312                 fi
6313                 cat <<-EOF
6314                 Creating program
6315                 ** ld options:   "\${ldopts[@]}"
6316 EOF
6317                 exec \$LD \${ldopts[@]}
6318 CF_EOF
6319                 chmod +x mk_prog.sh
6320                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6321                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6322                 ;;
6323         (mingw*)
6324                 cf_cv_shlib_version=mingw
6325                 cf_cv_shlib_version_infix=mingw
6326                 shlibdir=$bindir
6327                 MAKE_DLLS=
6328                 if test "$DFT_LWR_MODEL" = "shared" ; then
6329                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6330                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6331                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6332                 fi
6333                 CC_SHARED_OPTS=
6334                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6335                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6336                 cat >mk_shared_lib.sh <<-CF_EOF
6337                 #!$SHELL
6338                 SHARED_LIB=\$1
6339                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6340                 shift
6341                 cat <<-EOF
6342                 Linking shared library
6343                 ** SHARED_LIB \$SHARED_LIB
6344                 ** IMPORT_LIB \$IMPORT_LIB
6345 EOF
6346                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6347 CF_EOF
6348                 chmod +x mk_shared_lib.sh
6349                 ;;
6350         (openbsd[2-9].*|mirbsd*)
6351                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6352                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6353                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6354                 fi
6355                 if test "$cf_cv_enable_rpath" = yes ; then
6356                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6357                 fi
6358                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6359
6360         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6361         if test "$cf_cv_shlib_version" = rel; then
6362                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6363         else
6364                 cf_cv_shared_soname='`basename $@`'
6365         fi
6366
6367                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6368                 ;;
6369         (nskJ*)
6370                 CC_SHARED_OPTS=
6371                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6372                 ;;
6373         (nskL*)
6374                 CC_SHARED_OPTS=
6375                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6376                 ;;
6377         (nto-qnx*|openbsd*|freebsd[12].*)
6378                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6379                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6380                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6381                 ;;
6382         (dragonfly*|freebsd*)
6383                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6384                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6385                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6386                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6387                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6388                 fi
6389
6390         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6391         if test "$cf_cv_shlib_version" = rel; then
6392                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6393         else
6394                 cf_cv_shared_soname='`basename $@`'
6395         fi
6396
6397                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6398                 ;;
6399         (netbsd*)
6400                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6401                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6402                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6403                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6404                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6405                         if test "$cf_cv_shlib_version" = auto; then
6406                         if test -f /usr/libexec/ld.elf_so; then
6407                                 cf_cv_shlib_version=abi
6408                         else
6409                                 cf_cv_shlib_version=rel
6410                         fi
6411                         fi
6412
6413         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6414         if test "$cf_cv_shlib_version" = rel; then
6415                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6416         else
6417                 cf_cv_shared_soname='`basename $@`'
6418         fi
6419
6420                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6421                 else
6422                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
6423                 fi
6424                 ;;
6425         (osf*|mls+*)
6426                 # tested with OSF/1 V3.2 and 'cc'
6427                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6428                 # link with shared libs).
6429                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6430                 case "$host_os" in
6431                 (osf4*)
6432                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6433                         ;;
6434                 esac
6435                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6436                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6437                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6438                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6439                 fi
6440                 cf_cv_rm_so_locs=yes
6441                 ;;
6442         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6443                 # tested with osr5.0.5
6444                 if test "$GCC" != yes; then
6445                         CC_SHARED_OPTS='-belf -KPIC'
6446                 fi
6447                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6448                 if test "$cf_cv_enable_rpath" = yes ; then
6449                         # only way is to set LD_RUN_PATH but no switch for it
6450                         RUN_PATH=$libdir
6451                 fi
6452                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6453                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6454                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6455                 ;;
6456         (sunos4*)
6457                 # tested with SunOS 4.1.1 and gcc 2.7.0
6458                 if test "$GCC" != yes; then
6459                         CC_SHARED_OPTS='-KPIC'
6460                 fi
6461                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6462                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6463                 ;;
6464         (solaris2*)
6465                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6466                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6467                 if test "$DFT_LWR_MODEL" = "shared" ; then
6468                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6469                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6470                 fi
6471                 if test "$cf_cv_enable_rpath" = yes ; then
6472                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6473                 fi
6474
6475         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6476         if test "$cf_cv_shlib_version" = rel; then
6477                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6478         else
6479                 cf_cv_shared_soname='`basename $@`'
6480         fi
6481
6482                 if test "$GCC" != yes; then
6483                         cf_save_CFLAGS="$CFLAGS"
6484                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6485                         do
6486                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6487                                 cat >"conftest.$ac_ext" <<_ACEOF
6488 #line 6488 "configure"
6489 #include "confdefs.h"
6490 #include <stdio.h>
6491 int
6492 main (void)
6493 {
6494 printf("Hello\\n");
6495   ;
6496   return 0;
6497 }
6498 _ACEOF
6499 rm -f "conftest.$ac_objext"
6500 if { (eval echo "$as_me:6500: \"$ac_compile\"") >&5
6501   (eval $ac_compile) 2>&5
6502   ac_status=$?
6503   echo "$as_me:6503: \$? = $ac_status" >&5
6504   (exit "$ac_status"); } &&
6505          { ac_try='test -s "conftest.$ac_objext"'
6506   { (eval echo "$as_me:6506: \"$ac_try\"") >&5
6507   (eval $ac_try) 2>&5
6508   ac_status=$?
6509   echo "$as_me:6509: \$? = $ac_status" >&5
6510   (exit "$ac_status"); }; }; then
6511   break
6512 else
6513   echo "$as_me: failed program was:" >&5
6514 cat "conftest.$ac_ext" >&5
6515 fi
6516 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6517                         done
6518                         CFLAGS="$cf_save_CFLAGS"
6519                         CC_SHARED_OPTS=$cf_shared_opts
6520                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6521                 else
6522                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6523                 fi
6524                 ;;
6525         (sysv5uw7*|unix_sv*)
6526                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6527                 if test "$GCC" != yes; then
6528                         CC_SHARED_OPTS='-KPIC'
6529                 fi
6530                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6531                 ;;
6532         (*)
6533                 CC_SHARED_OPTS='unknown'
6534                 MK_SHARED_LIB='echo unknown'
6535                 ;;
6536         esac
6537
6538         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6539         case "$cf_cv_shlib_version" in
6540         (rel|abi)
6541                 case "$MK_SHARED_LIB" in
6542                 (*'-o $@')
6543                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6544                         ;;
6545                 (*)
6546                         { echo "$as_me:6546: WARNING: ignored --with-shlib-version" >&5
6547 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6548                         ;;
6549                 esac
6550                 ;;
6551         esac
6552
6553         if test -n "$cf_try_cflags"
6554         then
6555 cat > conftest.$ac_ext <<EOF
6556 #line 6556 "${as_me:-configure}"
6557 #include <stdio.h>
6558 int main(int argc, char *argv[])
6559 {
6560         printf("hello\\n");
6561         return (argv[argc-1] == 0) ;
6562 }
6563 EOF
6564                 cf_save_CFLAGS="$CFLAGS"
6565                 for cf_opt in $cf_try_cflags
6566                 do
6567                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6568                         echo "$as_me:6568: checking if CFLAGS option -$cf_opt works" >&5
6569 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6570                         if { (eval echo "$as_me:6570: \"$ac_compile\"") >&5
6571   (eval $ac_compile) 2>&5
6572   ac_status=$?
6573   echo "$as_me:6573: \$? = $ac_status" >&5
6574   (exit "$ac_status"); }; then
6575                                 echo "$as_me:6575: result: yes" >&5
6576 echo "${ECHO_T}yes" >&6
6577                                 cf_save_CFLAGS="$CFLAGS"
6578                         else
6579                                 echo "$as_me:6579: result: no" >&5
6580 echo "${ECHO_T}no" >&6
6581                         fi
6582                 done
6583                 CFLAGS="$cf_save_CFLAGS"
6584         fi
6585
6586         # RPATH_LIST is a colon-separated list of directories
6587         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6588         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6589
6590         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6591
6592         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6593
6594 echo "${as_me:-configure}:6594: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6595
6596         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6597
6598 echo "${as_me:-configure}:6598: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6599
6600 for model in $cf_list_models ; do
6601         case "$model" in
6602         (libtool)
6603
6604 echo "$as_me:6604: checking for additional libtool options" >&5
6605 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6606
6607 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6608 if test "${with_libtool_opts+set}" = set; then
6609   withval="$with_libtool_opts"
6610   with_libtool_opts=$withval
6611 else
6612   with_libtool_opts=no
6613 fi;
6614 echo "$as_me:6614: result: $with_libtool_opts" >&5
6615 echo "${ECHO_T}$with_libtool_opts" >&6
6616
6617 case .$with_libtool_opts in
6618 (.yes|.no|.)
6619         ;;
6620 (*)
6621         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6622         ;;
6623 esac
6624
6625 echo "$as_me:6625: checking if exported-symbols file should be used" >&5
6626 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6627
6628 # Check whether --with-export-syms or --without-export-syms was given.
6629 if test "${with_export_syms+set}" = set; then
6630   withval="$with_export_syms"
6631   with_export_syms=$withval
6632 else
6633   with_export_syms=no
6634 fi;
6635 if test "x$with_export_syms" = xyes
6636 then
6637         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6638
6639 fi
6640 echo "$as_me:6640: result: $with_export_syms" >&5
6641 echo "${ECHO_T}$with_export_syms" >&6
6642 if test "x$with_export_syms" != xno
6643 then
6644         EXPORT_SYMS="-export-symbols $with_export_syms"
6645
6646 fi
6647
6648                 ;;
6649         (shared)
6650                 if test "$CC_SHARED_OPTS" = "unknown"; then
6651                         { { echo "$as_me:6651: error: Shared libraries are not supported in this version" >&5
6652 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6653    { (exit 1); exit 1; }; }
6654                 fi
6655                 # workaround for inept transition to PIE vs PIC...
6656                 echo "$as_me:6656: checking if current CFLAGS link properly" >&5
6657 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6658                 cat >"conftest.$ac_ext" <<_ACEOF
6659 #line 6659 "configure"
6660 #include "confdefs.h"
6661 #include <stdio.h>
6662 int
6663 main (void)
6664 {
6665 printf("Hello work\\n");
6666   ;
6667   return 0;
6668 }
6669 _ACEOF
6670 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6671 if { (eval echo "$as_me:6671: \"$ac_link\"") >&5
6672   (eval $ac_link) 2>&5
6673   ac_status=$?
6674   echo "$as_me:6674: \$? = $ac_status" >&5
6675   (exit "$ac_status"); } &&
6676          { ac_try='test -s "conftest$ac_exeext"'
6677   { (eval echo "$as_me:6677: \"$ac_try\"") >&5
6678   (eval $ac_try) 2>&5
6679   ac_status=$?
6680   echo "$as_me:6680: \$? = $ac_status" >&5
6681   (exit "$ac_status"); }; }; then
6682   cf_cflags_work=yes
6683 else
6684   echo "$as_me: failed program was:" >&5
6685 cat "conftest.$ac_ext" >&5
6686 cf_cflags_work=no
6687 fi
6688 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6689                 echo "$as_me:6689: result: $cf_cflags_work" >&5
6690 echo "${ECHO_T}$cf_cflags_work" >&6
6691                 if test "$cf_cflags_work" = no
6692                 then
6693                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6694
6695 echo "${as_me:-configure}:6695: testing try to work around by appending shared-options ..." 1>&5
6696
6697                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6698                 fi
6699
6700 echo "$as_me:6700: checking if versioned-symbols file should be used" >&5
6701 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6702
6703 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6704 if test "${with_versioned_syms+set}" = set; then
6705   withval="$with_versioned_syms"
6706   with_versioned_syms=$withval
6707 else
6708   with_versioned_syms=no
6709 fi;
6710 case "x$with_versioned_syms" in
6711 (xyes)
6712         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6713
6714         ;;
6715 (xno)
6716         ;;
6717 (x/*)
6718         test -f "$with_versioned_syms" || { { echo "$as_me:6718: error: expected a filename: $with_versioned_syms" >&5
6719 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6720    { (exit 1); exit 1; }; }
6721         ;;
6722 (*)
6723         test -f "$with_versioned_syms" || { { echo "$as_me:6723: error: expected a filename: $with_versioned_syms" >&5
6724 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6725    { (exit 1); exit 1; }; }
6726         with_versioned_syms=`pwd`/"$with_versioned_syms"
6727         ;;
6728 esac
6729 echo "$as_me:6729: result: $with_versioned_syms" >&5
6730 echo "${ECHO_T}$with_versioned_syms" >&6
6731
6732 RESULTING_SYMS=
6733 VERSIONED_SYMS=
6734 WILDCARD_SYMS=
6735
6736 if test "x$with_versioned_syms" != xno
6737 then
6738         RESULTING_SYMS=$with_versioned_syms
6739         case "x$MK_SHARED_LIB" in
6740         (*-Wl,*)
6741                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6742                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6743                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6744
6745 echo "${as_me:-configure}:6745: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6746
6747                 ;;
6748         (*-dy\ *)
6749                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6750                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6751                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6752
6753 echo "${as_me:-configure}:6753: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6754
6755                 ;;
6756         (*)
6757                 { echo "$as_me:6757: WARNING: this system does not support versioned-symbols" >&5
6758 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6759                 ;;
6760         esac
6761
6762         # Linux ld can selectively override scope, e.g., of symbols beginning with
6763         # "_" by first declaring some as global, and then using a wildcard to
6764         # declare the others as local.  Some other loaders cannot do this.  Check
6765         # by constructing a (very) simple shared library and inspecting its
6766         # symbols.
6767         if test "x$VERSIONED_SYMS" != "x"
6768         then
6769                 echo "$as_me:6769: checking if wildcards can be used to selectively omit symbols" >&5
6770 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6771                 WILDCARD_SYMS=no
6772
6773                 # make sources
6774                 rm -f conftest.*
6775
6776                 cat >conftest.ver <<EOF
6777 module_1.0 {
6778 global:
6779         globalf1;
6780 local:
6781         localf1;
6782 };
6783 module_2.0 {
6784 global:
6785         globalf2;
6786 local:
6787         localf2;
6788         _*;
6789 } module_1.0;
6790 submodule_1.0 {
6791 global:
6792         subglobalf1;
6793         _ismissing;
6794 local:
6795         sublocalf1;
6796 };
6797 submodule_2.0 {
6798 global:
6799         subglobalf2;
6800 local:
6801         sublocalf2;
6802         _*;
6803 } submodule_1.0;
6804 EOF
6805                 cat >conftest.$ac_ext <<EOF
6806 #line 6806 "configure"
6807 int     _ismissing(void) { return 1; }
6808 int     _localf1(void) { return 1; }
6809 int     _localf2(void) { return 2; }
6810 int     globalf1(void) { return 1; }
6811 int     globalf2(void) { return 2; }
6812 int     _sublocalf1(void) { return 1; }
6813 int     _sublocalf2(void) { return 2; }
6814 int     subglobalf1(void) { return 1; }
6815 int     subglobalf2(void) { return 2; }
6816 EOF
6817                 cat >conftest.mk <<EOF
6818 CC=${CC}
6819 CFLAGS=${CFLAGS}
6820 CPPFLAGS=${CPPFLAGS}
6821 LDFLAGS=${LDFLAGS}
6822 LIBS=${LIBS}
6823 VERSIONED_SYMS=${VERSIONED_SYMS}
6824 RESULTING_SYMS=conftest.ver
6825 MK_SHARED_LIB=${MK_SHARED_LIB}
6826 conftest.so: conftest.$ac_cv_objext
6827                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6828 EOF
6829
6830                 # compile source, make library
6831                 if make -f conftest.mk 2>&5 >/dev/null
6832                 then
6833                         # test for missing symbol in either Data or Text section
6834                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
6835                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6836                 fi
6837                 echo "$as_me:6837: result: $WILDCARD_SYMS" >&5
6838 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6839                 rm -f conftest.*
6840         fi
6841 fi
6842
6843                 ;;
6844         esac
6845 done
6846
6847 ### Checks for special libraries, must be done up-front.
6848 SHLIB_LIST=""
6849
6850 echo "$as_me:6850: checking if you want to link with the GPM mouse library" >&5
6851 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6852
6853 # Check whether --with-gpm or --without-gpm was given.
6854 if test "${with_gpm+set}" = set; then
6855   withval="$with_gpm"
6856   with_gpm=$withval
6857 else
6858   with_gpm=maybe
6859 fi;
6860 echo "$as_me:6860: result: $with_gpm" >&5
6861 echo "${ECHO_T}$with_gpm" >&6
6862
6863 if test "$with_gpm" != no ; then
6864         echo "$as_me:6864: checking for gpm.h" >&5
6865 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6866 if test "${ac_cv_header_gpm_h+set}" = set; then
6867   echo $ECHO_N "(cached) $ECHO_C" >&6
6868 else
6869   cat >"conftest.$ac_ext" <<_ACEOF
6870 #line 6870 "configure"
6871 #include "confdefs.h"
6872 #include <gpm.h>
6873 _ACEOF
6874 if { (eval echo "$as_me:6874: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6875   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6876   ac_status=$?
6877   $EGREP -v '^ *\+' conftest.er1 >conftest.err
6878   rm -f conftest.er1
6879   cat conftest.err >&5
6880   echo "$as_me:6880: \$? = $ac_status" >&5
6881   (exit "$ac_status"); } >/dev/null; then
6882   if test -s conftest.err; then
6883     ac_cpp_err=$ac_c_preproc_warn_flag
6884   else
6885     ac_cpp_err=
6886   fi
6887 else
6888   ac_cpp_err=yes
6889 fi
6890 if test -z "$ac_cpp_err"; then
6891   ac_cv_header_gpm_h=yes
6892 else
6893   echo "$as_me: failed program was:" >&5
6894   cat "conftest.$ac_ext" >&5
6895   ac_cv_header_gpm_h=no
6896 fi
6897 rm -f conftest.err "conftest.$ac_ext"
6898 fi
6899 echo "$as_me:6899: result: $ac_cv_header_gpm_h" >&5
6900 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6901 if test "$ac_cv_header_gpm_h" = yes; then
6902
6903 cat >>confdefs.h <<\EOF
6904 #define HAVE_GPM_H 1
6905 EOF
6906
6907                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6908                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6909
6910 echo "${as_me:-configure}:6910: testing assuming we really have GPM library ..." 1>&5
6911
6912 cat >>confdefs.h <<\EOF
6913 #define HAVE_LIBGPM 1
6914 EOF
6915
6916                         with_gpm=yes
6917                 else
6918                         echo "$as_me:6918: checking for Gpm_Open in -lgpm" >&5
6919 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6920 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6921   echo $ECHO_N "(cached) $ECHO_C" >&6
6922 else
6923   ac_check_lib_save_LIBS=$LIBS
6924 LIBS="-lgpm  $LIBS"
6925 cat >"conftest.$ac_ext" <<_ACEOF
6926 #line 6926 "configure"
6927 #include "confdefs.h"
6928
6929 /* Override any gcc2 internal prototype to avoid an error.  */
6930 #ifdef __cplusplus
6931 extern "C"
6932 #endif
6933 /* We use char because int might match the return type of a gcc2
6934    builtin and then its argument prototype would still apply.  */
6935 char Gpm_Open ();
6936 int
6937 main (void)
6938 {
6939 Gpm_Open ();
6940   ;
6941   return 0;
6942 }
6943 _ACEOF
6944 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6945 if { (eval echo "$as_me:6945: \"$ac_link\"") >&5
6946   (eval $ac_link) 2>&5
6947   ac_status=$?
6948   echo "$as_me:6948: \$? = $ac_status" >&5
6949   (exit "$ac_status"); } &&
6950          { ac_try='test -s "conftest$ac_exeext"'
6951   { (eval echo "$as_me:6951: \"$ac_try\"") >&5
6952   (eval $ac_try) 2>&5
6953   ac_status=$?
6954   echo "$as_me:6954: \$? = $ac_status" >&5
6955   (exit "$ac_status"); }; }; then
6956   ac_cv_lib_gpm_Gpm_Open=yes
6957 else
6958   echo "$as_me: failed program was:" >&5
6959 cat "conftest.$ac_ext" >&5
6960 ac_cv_lib_gpm_Gpm_Open=no
6961 fi
6962 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6963 LIBS=$ac_check_lib_save_LIBS
6964 fi
6965 echo "$as_me:6965: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6966 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6967 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
6968   with_gpm=yes
6969 else
6970
6971                                 if test "$with_gpm" = maybe; then
6972                                         { echo "$as_me:6972: WARNING: Cannot link with GPM library" >&5
6973 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6974                                         with_gpm=no
6975                                 else
6976                                         { { echo "$as_me:6976: error: Cannot link with GPM library" >&5
6977 echo "$as_me: error: Cannot link with GPM library" >&2;}
6978    { (exit 1); exit 1; }; }
6979                                 fi
6980
6981 fi
6982
6983                 fi
6984
6985 else
6986
6987                 test "$with_gpm" != maybe && { echo "$as_me:6987: WARNING: Cannot find GPM header" >&5
6988 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6989                 with_gpm=no
6990
6991 fi
6992
6993 fi
6994
6995 if test "$with_gpm" != no ; then
6996         echo "$as_me:6996: checking if you want to load GPM dynamically" >&5
6997 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6998
6999 # Check whether --with-dlsym or --without-dlsym was given.
7000 if test "${with_dlsym+set}" = set; then
7001   withval="$with_dlsym"
7002   with_dlsym=$withval
7003 else
7004   with_dlsym=yes
7005 fi;
7006         echo "$as_me:7006: result: $with_dlsym" >&5
7007 echo "${ECHO_T}$with_dlsym" >&6
7008         if test "x$with_dlsym" = xyes ; then
7009
7010 cf_have_dlsym=no
7011 echo "$as_me:7011: checking for dlsym" >&5
7012 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7013 if test "${ac_cv_func_dlsym+set}" = set; then
7014   echo $ECHO_N "(cached) $ECHO_C" >&6
7015 else
7016   cat >"conftest.$ac_ext" <<_ACEOF
7017 #line 7017 "configure"
7018 #include "confdefs.h"
7019 #define dlsym autoconf_temporary
7020 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7021 #undef dlsym
7022
7023 #ifdef __cplusplus
7024 extern "C"
7025 #endif
7026
7027 /* We use char because int might match the return type of a gcc2
7028    builtin and then its argument prototype would still apply.  */
7029 char dlsym (void);
7030
7031 int
7032 main (void)
7033 {
7034
7035 /* The GNU C library defines stubs for functions which it implements
7036     to always fail with ENOSYS.  Some functions are actually named
7037     something starting with __ and the normal name is an alias.  */
7038 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7039 #error found stub for dlsym
7040 #endif
7041
7042         return dlsym ();
7043   ;
7044   return 0;
7045 }
7046 _ACEOF
7047 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7048 if { (eval echo "$as_me:7048: \"$ac_link\"") >&5
7049   (eval $ac_link) 2>&5
7050   ac_status=$?
7051   echo "$as_me:7051: \$? = $ac_status" >&5
7052   (exit "$ac_status"); } &&
7053          { ac_try='test -s "conftest$ac_exeext"'
7054   { (eval echo "$as_me:7054: \"$ac_try\"") >&5
7055   (eval $ac_try) 2>&5
7056   ac_status=$?
7057   echo "$as_me:7057: \$? = $ac_status" >&5
7058   (exit "$ac_status"); }; }; then
7059   ac_cv_func_dlsym=yes
7060 else
7061   echo "$as_me: failed program was:" >&5
7062 cat "conftest.$ac_ext" >&5
7063 ac_cv_func_dlsym=no
7064 fi
7065 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7066 fi
7067 echo "$as_me:7067: result: $ac_cv_func_dlsym" >&5
7068 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7069 if test "$ac_cv_func_dlsym" = yes; then
7070   cf_have_dlsym=yes
7071 else
7072
7073 cf_have_libdl=no
7074 echo "$as_me:7074: checking for dlsym in -ldl" >&5
7075 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7076 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7077   echo $ECHO_N "(cached) $ECHO_C" >&6
7078 else
7079   ac_check_lib_save_LIBS=$LIBS
7080 LIBS="-ldl  $LIBS"
7081 cat >"conftest.$ac_ext" <<_ACEOF
7082 #line 7082 "configure"
7083 #include "confdefs.h"
7084
7085 /* Override any gcc2 internal prototype to avoid an error.  */
7086 #ifdef __cplusplus
7087 extern "C"
7088 #endif
7089 /* We use char because int might match the return type of a gcc2
7090    builtin and then its argument prototype would still apply.  */
7091 char dlsym ();
7092 int
7093 main (void)
7094 {
7095 dlsym ();
7096   ;
7097   return 0;
7098 }
7099 _ACEOF
7100 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7101 if { (eval echo "$as_me:7101: \"$ac_link\"") >&5
7102   (eval $ac_link) 2>&5
7103   ac_status=$?
7104   echo "$as_me:7104: \$? = $ac_status" >&5
7105   (exit "$ac_status"); } &&
7106          { ac_try='test -s "conftest$ac_exeext"'
7107   { (eval echo "$as_me:7107: \"$ac_try\"") >&5
7108   (eval $ac_try) 2>&5
7109   ac_status=$?
7110   echo "$as_me:7110: \$? = $ac_status" >&5
7111   (exit "$ac_status"); }; }; then
7112   ac_cv_lib_dl_dlsym=yes
7113 else
7114   echo "$as_me: failed program was:" >&5
7115 cat "conftest.$ac_ext" >&5
7116 ac_cv_lib_dl_dlsym=no
7117 fi
7118 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7119 LIBS=$ac_check_lib_save_LIBS
7120 fi
7121 echo "$as_me:7121: result: $ac_cv_lib_dl_dlsym" >&5
7122 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7123 if test "$ac_cv_lib_dl_dlsym" = yes; then
7124
7125         cf_have_dlsym=yes
7126         cf_have_libdl=yes
7127 fi
7128
7129 fi
7130
7131 if test "$cf_have_dlsym" = yes ; then
7132         test "$cf_have_libdl" = yes && {
7133 cf_add_libs="$LIBS"
7134 # reverse order
7135 cf_add_0lib=
7136 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7137 # filter duplicates
7138 for cf_add_1lib in $cf_add_0lib; do
7139         for cf_add_2lib in $cf_add_libs; do
7140                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7141                         cf_add_1lib=
7142                         break
7143                 fi
7144         done
7145         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7146 done
7147 LIBS="$cf_add_libs"
7148  }
7149
7150         echo "$as_me:7150: checking whether able to link to dl*() functions" >&5
7151 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7152         cat >"conftest.$ac_ext" <<_ACEOF
7153 #line 7153 "configure"
7154 #include "confdefs.h"
7155 #include <dlfcn.h>
7156 int
7157 main (void)
7158 {
7159
7160                 void *obj;
7161                 if ((obj = dlopen("filename", 0)) != 0) {
7162                         if (dlsym(obj, "symbolname") == 0) {
7163                         dlclose(obj);
7164                         }
7165                 }
7166   ;
7167   return 0;
7168 }
7169 _ACEOF
7170 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7171 if { (eval echo "$as_me:7171: \"$ac_link\"") >&5
7172   (eval $ac_link) 2>&5
7173   ac_status=$?
7174   echo "$as_me:7174: \$? = $ac_status" >&5
7175   (exit "$ac_status"); } &&
7176          { ac_try='test -s "conftest$ac_exeext"'
7177   { (eval echo "$as_me:7177: \"$ac_try\"") >&5
7178   (eval $ac_try) 2>&5
7179   ac_status=$?
7180   echo "$as_me:7180: \$? = $ac_status" >&5
7181   (exit "$ac_status"); }; }; then
7182
7183 cat >>confdefs.h <<\EOF
7184 #define HAVE_LIBDL 1
7185 EOF
7186
7187 else
7188   echo "$as_me: failed program was:" >&5
7189 cat "conftest.$ac_ext" >&5
7190
7191                 { { echo "$as_me:7191: error: Cannot link test program for libdl" >&5
7192 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7193    { (exit 1); exit 1; }; }
7194 fi
7195 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7196         echo "$as_me:7196: result: ok" >&5
7197 echo "${ECHO_T}ok" >&6
7198 else
7199         { { echo "$as_me:7199: error: Cannot find dlsym function" >&5
7200 echo "$as_me: error: Cannot find dlsym function" >&2;}
7201    { (exit 1); exit 1; }; }
7202 fi
7203
7204                 if test "x$with_gpm" != xyes ; then
7205                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7206
7207 echo "${as_me:-configure}:7207: testing assuming soname for gpm is $with_gpm ..." 1>&5
7208
7209                         cf_cv_gpm_soname="$with_gpm"
7210                 else
7211
7212 echo "$as_me:7212: checking for soname of gpm library" >&5
7213 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7214 if test "${cf_cv_gpm_soname+set}" = set; then
7215   echo $ECHO_N "(cached) $ECHO_C" >&6
7216 else
7217
7218 cf_cv_gpm_soname=unknown
7219 if test "$cross_compiling" != yes ; then
7220 cat >conftest.$ac_ext <<CF_EOF
7221 #include <gpm.h>
7222 int main(void)
7223 {
7224 if (Gpm_Open(0,0)) Gpm_Close();
7225         ${cf_cv_main_return:-return}(0);
7226 }
7227 CF_EOF
7228 cf_save_LIBS="$LIBS"
7229
7230 cf_add_libs="$LIBS"
7231 # reverse order
7232 cf_add_0lib=
7233 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7234 # filter duplicates
7235 for cf_add_1lib in $cf_add_0lib; do
7236         for cf_add_2lib in $cf_add_libs; do
7237                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7238                         cf_add_1lib=
7239                         break
7240                 fi
7241         done
7242         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7243 done
7244 LIBS="$cf_add_libs"
7245
7246         if { (eval echo "$as_me:7246: \"$ac_compile\"") >&5
7247   (eval $ac_compile) 2>&5
7248   ac_status=$?
7249   echo "$as_me:7249: \$? = $ac_status" >&5
7250   (exit "$ac_status"); } ; then
7251                 if { (eval echo "$as_me:7251: \"$ac_link\"") >&5
7252   (eval $ac_link) 2>&5
7253   ac_status=$?
7254   echo "$as_me:7254: \$? = $ac_status" >&5
7255   (exit "$ac_status"); } ; then
7256                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7257                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7258                 fi
7259         fi
7260 rm -rf ./conftest*
7261 LIBS="$cf_save_LIBS"
7262 fi
7263
7264 fi
7265 echo "$as_me:7265: result: $cf_cv_gpm_soname" >&5
7266 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7267
7268                 fi
7269                 test "$cf_cv_gpm_soname" != "unknown" &&
7270 cat >>confdefs.h <<EOF
7271 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7272 EOF
7273
7274                 SHLIB_LIST="-ldl $SHLIB_LIST"
7275
7276 cf_add_libs="$PRIVATE_LIBS"
7277 # reverse order
7278 cf_add_0lib=
7279 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7280 # filter duplicates
7281 for cf_add_1lib in $cf_add_0lib; do
7282         for cf_add_2lib in $cf_add_libs; do
7283                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7284                         cf_add_1lib=
7285                         break
7286                 fi
7287         done
7288         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7289 done
7290 PRIVATE_LIBS="$cf_add_libs"
7291
7292         else
7293                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7294
7295 cf_add_libs="$TEST_LIBS"
7296 # reverse order
7297 cf_add_0lib=
7298 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7299 # filter duplicates
7300 for cf_add_1lib in $cf_add_0lib; do
7301         for cf_add_2lib in $cf_add_libs; do
7302                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7303                         cf_add_1lib=
7304                         break
7305                 fi
7306         done
7307         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7308 done
7309 TEST_LIBS="$cf_add_libs"
7310
7311 cf_add_libs="$PRIVATE_LIBS"
7312 # reverse order
7313 cf_add_0lib=
7314 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7315 # filter duplicates
7316 for cf_add_1lib in $cf_add_0lib; do
7317         for cf_add_2lib in $cf_add_libs; do
7318                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7319                         cf_add_1lib=
7320                         break
7321                 fi
7322         done
7323         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7324 done
7325 PRIVATE_LIBS="$cf_add_libs"
7326
7327         fi
7328
7329 cat >>confdefs.h <<\EOF
7330 #define HAVE_LIBGPM 1
7331 EOF
7332
7333 echo "$as_me:7333: checking for Gpm_Wgetch in -lgpm" >&5
7334 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7335 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7336   echo $ECHO_N "(cached) $ECHO_C" >&6
7337 else
7338   ac_check_lib_save_LIBS=$LIBS
7339 LIBS="-lgpm  $LIBS"
7340 cat >"conftest.$ac_ext" <<_ACEOF
7341 #line 7341 "configure"
7342 #include "confdefs.h"
7343
7344 /* Override any gcc2 internal prototype to avoid an error.  */
7345 #ifdef __cplusplus
7346 extern "C"
7347 #endif
7348 /* We use char because int might match the return type of a gcc2
7349    builtin and then its argument prototype would still apply.  */
7350 char Gpm_Wgetch ();
7351 int
7352 main (void)
7353 {
7354 Gpm_Wgetch ();
7355   ;
7356   return 0;
7357 }
7358 _ACEOF
7359 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7360 if { (eval echo "$as_me:7360: \"$ac_link\"") >&5
7361   (eval $ac_link) 2>&5
7362   ac_status=$?
7363   echo "$as_me:7363: \$? = $ac_status" >&5
7364   (exit "$ac_status"); } &&
7365          { ac_try='test -s "conftest$ac_exeext"'
7366   { (eval echo "$as_me:7366: \"$ac_try\"") >&5
7367   (eval $ac_try) 2>&5
7368   ac_status=$?
7369   echo "$as_me:7369: \$? = $ac_status" >&5
7370   (exit "$ac_status"); }; }; then
7371   ac_cv_lib_gpm_Gpm_Wgetch=yes
7372 else
7373   echo "$as_me: failed program was:" >&5
7374 cat "conftest.$ac_ext" >&5
7375 ac_cv_lib_gpm_Gpm_Wgetch=no
7376 fi
7377 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7378 LIBS=$ac_check_lib_save_LIBS
7379 fi
7380 echo "$as_me:7380: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7381 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7382 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
7383
7384 echo "$as_me:7384: checking if GPM is weakly bound to curses library" >&5
7385 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7386 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7387   echo $ECHO_N "(cached) $ECHO_C" >&6
7388 else
7389
7390 cf_cv_check_gpm_wgetch=unknown
7391 if test "$cross_compiling" != yes ; then
7392
7393 cat >conftest.$ac_ext <<CF_EOF
7394 #include <gpm.h>
7395 int main(void)
7396 {
7397         Gpm_Wgetch();
7398         ${cf_cv_main_return:-return}(0);
7399 }
7400 CF_EOF
7401
7402         cf_save_LIBS="$LIBS"
7403         # This only works if we can look at the symbol table.  If a shared
7404         # library is stripped for install, we cannot use that.  So we're forced
7405         # to rely on the static library, noting that some packagers may not
7406         # include it.
7407         LIBS="-static -lgpm -dynamic $LIBS"
7408         if { (eval echo "$as_me:7408: \"$ac_compile\"") >&5
7409   (eval $ac_compile) 2>&5
7410   ac_status=$?
7411   echo "$as_me:7411: \$? = $ac_status" >&5
7412   (exit "$ac_status"); } ; then
7413                 if { (eval echo "$as_me:7413: \"$ac_link\"") >&5
7414   (eval $ac_link) 2>&5
7415   ac_status=$?
7416   echo "$as_me:7416: \$? = $ac_status" >&5
7417   (exit "$ac_status"); } ; then
7418                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
7419                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7420                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7421                 fi
7422         fi
7423         rm -rf ./conftest*
7424         LIBS="$cf_save_LIBS"
7425 fi
7426
7427 fi
7428 echo "$as_me:7428: result: $cf_cv_check_gpm_wgetch" >&5
7429 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7430
7431 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7432         { echo "$as_me:7432: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7433 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7434 fi
7435
7436 fi
7437
7438 fi
7439
7440 echo "$as_me:7440: checking if you want to use PCRE2 for regular-expressions" >&5
7441 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7442
7443 # Check whether --with-pcre2 or --without-pcre2 was given.
7444 if test "${with_pcre2+set}" = set; then
7445   withval="$with_pcre2"
7446
7447 fi;
7448 test -z "$with_pcre2" && with_pcre2=no
7449 echo "$as_me:7449: result: $with_pcre2" >&5
7450 echo "${ECHO_T}$with_pcre2" >&6
7451
7452 if test "x$with_pcre2" != xno ; then
7453         cf_with_pcre2_ok=no
7454         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
7455         do
7456
7457 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
7458         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
7459
7460 echo "${as_me:-configure}:7460: testing found package $cf_with_pcre2 ..." 1>&5
7461
7462         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
7463         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
7464         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7465
7466 echo "${as_me:-configure}:7466: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7467
7468         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7469
7470 echo "${as_me:-configure}:7470: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7471
7472 cf_fix_cppflags=no
7473 cf_new_cflags=
7474 cf_new_cppflags=
7475 cf_new_extra_cppflags=
7476
7477 for cf_add_cflags in $cf_pkgconfig_incs
7478 do
7479 case "$cf_fix_cppflags" in
7480 (no)
7481         case "$cf_add_cflags" in
7482         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7483                 case "$cf_add_cflags" in
7484                 (-D*)
7485                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7486
7487                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7488                                 && test -z "${cf_tst_cflags}" \
7489                                 && cf_fix_cppflags=yes
7490
7491                         if test "$cf_fix_cppflags" = yes ; then
7492
7493         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7494         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7495
7496                                 continue
7497                         elif test "${cf_tst_cflags}" = "\"'" ; then
7498
7499         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7500         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7501
7502                                 continue
7503                         fi
7504                         ;;
7505                 esac
7506                 case "$CPPFLAGS" in
7507                 (*$cf_add_cflags)
7508                         ;;
7509                 (*)
7510                         case "$cf_add_cflags" in
7511                         (-D*)
7512                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7513
7514 CPPFLAGS=`echo "$CPPFLAGS" | \
7515         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7516                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7517
7518                                 ;;
7519                         esac
7520
7521         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7522         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7523
7524                         ;;
7525                 esac
7526                 ;;
7527         (*)
7528
7529         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7530         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7531
7532                 ;;
7533         esac
7534         ;;
7535 (yes)
7536
7537         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7538         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7539
7540         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7541
7542         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7543                 && test -z "${cf_tst_cflags}" \
7544                 && cf_fix_cppflags=no
7545         ;;
7546 esac
7547 done
7548
7549 if test -n "$cf_new_cflags" ; then
7550
7551         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7552         CFLAGS="${CFLAGS}$cf_new_cflags"
7553
7554 fi
7555
7556 if test -n "$cf_new_cppflags" ; then
7557
7558         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7559         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7560
7561 fi
7562
7563 if test -n "$cf_new_extra_cppflags" ; then
7564
7565         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7566         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7567
7568 fi
7569
7570 cf_add_libs="$LIBS"
7571 # reverse order
7572 cf_add_0lib=
7573 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7574 # filter duplicates
7575 for cf_add_1lib in $cf_add_0lib; do
7576         for cf_add_2lib in $cf_add_libs; do
7577                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7578                         cf_add_1lib=
7579                         break
7580                 fi
7581         done
7582         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7583 done
7584 LIBS="$cf_add_libs"
7585
7586         cf_with_pcre2_ok=yes; break
7587 else
7588         cf_pkgconfig_incs=
7589         cf_pkgconfig_libs=
7590         :
7591 fi
7592
7593         done
7594         cf_with_pcre2_ok=yes || { { echo "$as_me:7594: error: Cannot find PCRE2 library" >&5
7595 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7596    { (exit 1); exit 1; }; }
7597
7598 cat >>confdefs.h <<\EOF
7599 #define HAVE_LIB_PCRE2 1
7600 EOF
7601
7602         # if pkgconfig gave no results, look for the libraries directly
7603         case "$LIBS" in
7604         (*pcre2-posix*|*pcreposix*)
7605                 ;;
7606         (*)
7607                 echo "$as_me:7607: checking for regcomp in -lpcre2-posix" >&5
7608 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7609 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7610   echo $ECHO_N "(cached) $ECHO_C" >&6
7611 else
7612   ac_check_lib_save_LIBS=$LIBS
7613 LIBS="-lpcre2-posix  $LIBS"
7614 cat >"conftest.$ac_ext" <<_ACEOF
7615 #line 7615 "configure"
7616 #include "confdefs.h"
7617
7618 /* Override any gcc2 internal prototype to avoid an error.  */
7619 #ifdef __cplusplus
7620 extern "C"
7621 #endif
7622 /* We use char because int might match the return type of a gcc2
7623    builtin and then its argument prototype would still apply.  */
7624 char regcomp ();
7625 int
7626 main (void)
7627 {
7628 regcomp ();
7629   ;
7630   return 0;
7631 }
7632 _ACEOF
7633 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7634 if { (eval echo "$as_me:7634: \"$ac_link\"") >&5
7635   (eval $ac_link) 2>&5
7636   ac_status=$?
7637   echo "$as_me:7637: \$? = $ac_status" >&5
7638   (exit "$ac_status"); } &&
7639          { ac_try='test -s "conftest$ac_exeext"'
7640   { (eval echo "$as_me:7640: \"$ac_try\"") >&5
7641   (eval $ac_try) 2>&5
7642   ac_status=$?
7643   echo "$as_me:7643: \$? = $ac_status" >&5
7644   (exit "$ac_status"); }; }; then
7645   ac_cv_lib_pcre2_posix_regcomp=yes
7646 else
7647   echo "$as_me: failed program was:" >&5
7648 cat "conftest.$ac_ext" >&5
7649 ac_cv_lib_pcre2_posix_regcomp=no
7650 fi
7651 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7652 LIBS=$ac_check_lib_save_LIBS
7653 fi
7654 echo "$as_me:7654: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7655 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7656 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
7657
7658 cf_add_libs="$LIBS"
7659 # reverse order
7660 cf_add_0lib=
7661 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7662 # filter duplicates
7663 for cf_add_1lib in $cf_add_0lib; do
7664         for cf_add_2lib in $cf_add_libs; do
7665                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7666                         cf_add_1lib=
7667                         break
7668                 fi
7669         done
7670         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7671 done
7672 LIBS="$cf_add_libs"
7673
7674 else
7675   echo "$as_me:7675: checking for regcomp in -lpcreposix" >&5
7676 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7677 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7678   echo $ECHO_N "(cached) $ECHO_C" >&6
7679 else
7680   ac_check_lib_save_LIBS=$LIBS
7681 LIBS="-lpcreposix  $LIBS"
7682 cat >"conftest.$ac_ext" <<_ACEOF
7683 #line 7683 "configure"
7684 #include "confdefs.h"
7685
7686 /* Override any gcc2 internal prototype to avoid an error.  */
7687 #ifdef __cplusplus
7688 extern "C"
7689 #endif
7690 /* We use char because int might match the return type of a gcc2
7691    builtin and then its argument prototype would still apply.  */
7692 char regcomp ();
7693 int
7694 main (void)
7695 {
7696 regcomp ();
7697   ;
7698   return 0;
7699 }
7700 _ACEOF
7701 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7702 if { (eval echo "$as_me:7702: \"$ac_link\"") >&5
7703   (eval $ac_link) 2>&5
7704   ac_status=$?
7705   echo "$as_me:7705: \$? = $ac_status" >&5
7706   (exit "$ac_status"); } &&
7707          { ac_try='test -s "conftest$ac_exeext"'
7708   { (eval echo "$as_me:7708: \"$ac_try\"") >&5
7709   (eval $ac_try) 2>&5
7710   ac_status=$?
7711   echo "$as_me:7711: \$? = $ac_status" >&5
7712   (exit "$ac_status"); }; }; then
7713   ac_cv_lib_pcreposix_regcomp=yes
7714 else
7715   echo "$as_me: failed program was:" >&5
7716 cat "conftest.$ac_ext" >&5
7717 ac_cv_lib_pcreposix_regcomp=no
7718 fi
7719 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7720 LIBS=$ac_check_lib_save_LIBS
7721 fi
7722 echo "$as_me:7722: result: $ac_cv_lib_pcreposix_regcomp" >&5
7723 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7724 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
7725
7726 cf_add_libs="$LIBS"
7727 # reverse order
7728 cf_add_0lib=
7729 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7730 # filter duplicates
7731 for cf_add_1lib in $cf_add_0lib; do
7732         for cf_add_2lib in $cf_add_libs; do
7733                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7734                         cf_add_1lib=
7735                         break
7736                 fi
7737         done
7738         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7739 done
7740 LIBS="$cf_add_libs"
7741
7742 else
7743   { { echo "$as_me:7743: error: Cannot find PCRE2 POSIX library" >&5
7744 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7745    { (exit 1); exit 1; }; }
7746 fi
7747
7748 fi
7749
7750                 ;;
7751         esac
7752
7753         # either way, check for the library header files
7754
7755 for ac_header in pcre2posix.h pcreposix.h
7756 do
7757 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7758 echo "$as_me:7758: checking for $ac_header" >&5
7759 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7760 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7761   echo $ECHO_N "(cached) $ECHO_C" >&6
7762 else
7763   cat >"conftest.$ac_ext" <<_ACEOF
7764 #line 7764 "configure"
7765 #include "confdefs.h"
7766 #include <$ac_header>
7767 _ACEOF
7768 if { (eval echo "$as_me:7768: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7769   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7770   ac_status=$?
7771   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7772   rm -f conftest.er1
7773   cat conftest.err >&5
7774   echo "$as_me:7774: \$? = $ac_status" >&5
7775   (exit "$ac_status"); } >/dev/null; then
7776   if test -s conftest.err; then
7777     ac_cpp_err=$ac_c_preproc_warn_flag
7778   else
7779     ac_cpp_err=
7780   fi
7781 else
7782   ac_cpp_err=yes
7783 fi
7784 if test -z "$ac_cpp_err"; then
7785   eval "$as_ac_Header=yes"
7786 else
7787   echo "$as_me: failed program was:" >&5
7788   cat "conftest.$ac_ext" >&5
7789   eval "$as_ac_Header=no"
7790 fi
7791 rm -f conftest.err "conftest.$ac_ext"
7792 fi
7793 echo "$as_me:7793: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7794 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7795 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7796   cat >>confdefs.h <<EOF
7797 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7798 EOF
7799
7800 fi
7801 done
7802
7803 fi
7804
7805 # not everyone has "test -c"
7806 if test -c /dev/sysmouse 2>/dev/null ; then
7807 echo "$as_me:7807: checking if you want to use sysmouse" >&5
7808 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7809
7810 # Check whether --with-sysmouse or --without-sysmouse was given.
7811 if test "${with_sysmouse+set}" = set; then
7812   withval="$with_sysmouse"
7813   cf_with_sysmouse=$withval
7814 else
7815   cf_with_sysmouse=maybe
7816 fi;
7817         if test "$cf_with_sysmouse" != no ; then
7818         cat >"conftest.$ac_ext" <<_ACEOF
7819 #line 7819 "configure"
7820 #include "confdefs.h"
7821
7822 #include <osreldate.h>
7823 #if (__FreeBSD_version >= 400017)
7824 #include <sys/consio.h>
7825 #include <sys/fbio.h>
7826 #else
7827 #include <machine/console.h>
7828 #endif
7829
7830 int
7831 main (void)
7832 {
7833
7834         struct mouse_info the_mouse;
7835         ioctl(0, CONS_MOUSECTL, &the_mouse);
7836
7837   ;
7838   return 0;
7839 }
7840 _ACEOF
7841 rm -f "conftest.$ac_objext"
7842 if { (eval echo "$as_me:7842: \"$ac_compile\"") >&5
7843   (eval $ac_compile) 2>&5
7844   ac_status=$?
7845   echo "$as_me:7845: \$? = $ac_status" >&5
7846   (exit "$ac_status"); } &&
7847          { ac_try='test -s "conftest.$ac_objext"'
7848   { (eval echo "$as_me:7848: \"$ac_try\"") >&5
7849   (eval $ac_try) 2>&5
7850   ac_status=$?
7851   echo "$as_me:7851: \$? = $ac_status" >&5
7852   (exit "$ac_status"); }; }; then
7853   cf_with_sysmouse=yes
7854 else
7855   echo "$as_me: failed program was:" >&5
7856 cat "conftest.$ac_ext" >&5
7857 cf_with_sysmouse=no
7858 fi
7859 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7860         fi
7861 echo "$as_me:7861: result: $cf_with_sysmouse" >&5
7862 echo "${ECHO_T}$cf_with_sysmouse" >&6
7863 test "$cf_with_sysmouse" = yes &&
7864 cat >>confdefs.h <<\EOF
7865 #define USE_SYSMOUSE 1
7866 EOF
7867
7868 fi
7869
7870 # pretend that ncurses==ncursesw==ncursest
7871 echo "$as_me:7871: checking if you want to disable library suffixes" >&5
7872 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7873
7874 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7875 if test "${enable_lib_suffixes+set}" = set; then
7876   enableval="$enable_lib_suffixes"
7877   test "$enableval" != no && enableval=yes
7878         if test "$enableval" != "yes" ; then
7879     disable_lib_suffixes=yes
7880         else
7881                 disable_lib_suffixes=no
7882         fi
7883 else
7884   enableval=yes
7885         disable_lib_suffixes=no
7886
7887 fi;
7888 echo "$as_me:7888: result: $disable_lib_suffixes" >&5
7889 echo "${ECHO_T}$disable_lib_suffixes" >&6
7890
7891 ### If we're building with rpath, try to link non-standard libs that way too.
7892 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7893
7894 echo "$as_me:7894: checking if rpath-hack should be disabled" >&5
7895 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7896
7897 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7898 if test "${enable_rpath_hack+set}" = set; then
7899   enableval="$enable_rpath_hack"
7900   test "$enableval" != no && enableval=yes
7901         if test "$enableval" != "yes" ; then
7902     enable_rpath_hack=no
7903         else
7904                 enable_rpath_hack=yes
7905         fi
7906 else
7907   enableval=yes
7908         enable_rpath_hack=yes
7909
7910 fi;
7911 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
7912 echo "$as_me:7912: result: $cf_disable_rpath_hack" >&5
7913 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7914
7915 if test "$enable_rpath_hack" = yes ; then
7916
7917 echo "$as_me:7917: checking for updated LDFLAGS" >&5
7918 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7919 if test -n "$LD_RPATH_OPT" ; then
7920         echo "$as_me:7920: result: maybe" >&5
7921 echo "${ECHO_T}maybe" >&6
7922
7923         for ac_prog in ldd
7924 do
7925   # Extract the first word of "$ac_prog", so it can be a program name with args.
7926 set dummy $ac_prog; ac_word=$2
7927 echo "$as_me:7927: checking for $ac_word" >&5
7928 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7929 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7930   echo $ECHO_N "(cached) $ECHO_C" >&6
7931 else
7932   if test -n "$cf_ldd_prog"; then
7933   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7934 else
7935   ac_save_IFS=$IFS; IFS=$ac_path_separator
7936 ac_dummy="$PATH"
7937 for ac_dir in $ac_dummy; do
7938   IFS=$ac_save_IFS
7939   test -z "$ac_dir" && ac_dir=.
7940   $as_executable_p "$ac_dir/$ac_word" || continue
7941 ac_cv_prog_cf_ldd_prog="$ac_prog"
7942 echo "$as_me:7942: found $ac_dir/$ac_word" >&5
7943 break
7944 done
7945
7946 fi
7947 fi
7948 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7949 if test -n "$cf_ldd_prog"; then
7950   echo "$as_me:7950: result: $cf_ldd_prog" >&5
7951 echo "${ECHO_T}$cf_ldd_prog" >&6
7952 else
7953   echo "$as_me:7953: result: no" >&5
7954 echo "${ECHO_T}no" >&6
7955 fi
7956
7957   test -n "$cf_ldd_prog" && break
7958 done
7959 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7960
7961         cf_rpath_list="/usr/lib /lib"
7962         if test "$cf_ldd_prog" != no
7963         then
7964                 cf_rpath_oops=
7965
7966 cat >"conftest.$ac_ext" <<_ACEOF
7967 #line 7967 "configure"
7968 #include "confdefs.h"
7969 #include <stdio.h>
7970 int
7971 main (void)
7972 {
7973 printf("Hello");
7974   ;
7975   return 0;
7976 }
7977 _ACEOF
7978 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7979 if { (eval echo "$as_me:7979: \"$ac_link\"") >&5
7980   (eval $ac_link) 2>&5
7981   ac_status=$?
7982   echo "$as_me:7982: \$? = $ac_status" >&5
7983   (exit "$ac_status"); } &&
7984          { ac_try='test -s "conftest$ac_exeext"'
7985   { (eval echo "$as_me:7985: \"$ac_try\"") >&5
7986   (eval $ac_try) 2>&5
7987   ac_status=$?
7988   echo "$as_me:7988: \$? = $ac_status" >&5
7989   (exit "$ac_status"); }; }; then
7990   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7991                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7992 else
7993   echo "$as_me: failed program was:" >&5
7994 cat "conftest.$ac_ext" >&5
7995 fi
7996 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7997
7998                 # If we passed the link-test, but get a "not found" on a given library,
7999                 # this could be due to inept reconfiguration of gcc to make it only
8000                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
8001                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
8002                 # /usr/local libraries.
8003                 if test -n "$cf_rpath_oops"
8004                 then
8005                         for cf_rpath_src in $cf_rpath_oops
8006                         do
8007                                 for cf_rpath_dir in \
8008                                         /usr/local \
8009                                         /usr/pkg \
8010                                         /opt/sfw
8011                                 do
8012                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8013                                         then
8014                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8015
8016 echo "${as_me:-configure}:8016: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8017
8018                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8019                                                 break
8020                                         fi
8021                                 done
8022                         done
8023                 fi
8024         fi
8025
8026         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8027
8028 echo "${as_me:-configure}:8028: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8029
8030 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8031
8032 echo "${as_me:-configure}:8032: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8033
8034 cf_rpath_dst=
8035 for cf_rpath_src in $LDFLAGS
8036 do
8037         case "$cf_rpath_src" in
8038         (-L*)
8039
8040                 # check if this refers to a directory which we will ignore
8041                 cf_rpath_skip=no
8042                 if test -n "$cf_rpath_list"
8043                 then
8044                         for cf_rpath_item in $cf_rpath_list
8045                         do
8046                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8047                                 then
8048                                         cf_rpath_skip=yes
8049                                         break
8050                                 fi
8051                         done
8052                 fi
8053
8054                 if test "$cf_rpath_skip" = no
8055                 then
8056                         # transform the option
8057                         if test "$LD_RPATH_OPT" = "-R " ; then
8058                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8059                         else
8060                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8061                         fi
8062
8063                         # if we have not already added this, add it now
8064                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8065                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8066                         then
8067                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8068
8069 echo "${as_me:-configure}:8069: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8070
8071                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8072                         fi
8073                 fi
8074                 ;;
8075         esac
8076         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8077 done
8078 LDFLAGS=$cf_rpath_dst
8079
8080 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8081
8082 echo "${as_me:-configure}:8082: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8083
8084 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8085
8086 echo "${as_me:-configure}:8086: testing ...checking LIBS $LIBS ..." 1>&5
8087
8088 cf_rpath_dst=
8089 for cf_rpath_src in $LIBS
8090 do
8091         case "$cf_rpath_src" in
8092         (-L*)
8093
8094                 # check if this refers to a directory which we will ignore
8095                 cf_rpath_skip=no
8096                 if test -n "$cf_rpath_list"
8097                 then
8098                         for cf_rpath_item in $cf_rpath_list
8099                         do
8100                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8101                                 then
8102                                         cf_rpath_skip=yes
8103                                         break
8104                                 fi
8105                         done
8106                 fi
8107
8108                 if test "$cf_rpath_skip" = no
8109                 then
8110                         # transform the option
8111                         if test "$LD_RPATH_OPT" = "-R " ; then
8112                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8113                         else
8114                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8115                         fi
8116
8117                         # if we have not already added this, add it now
8118                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8119                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8120                         then
8121                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8122
8123 echo "${as_me:-configure}:8123: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8124
8125                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8126                         fi
8127                 fi
8128                 ;;
8129         esac
8130         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8131 done
8132 LIBS=$cf_rpath_dst
8133
8134 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8135
8136 echo "${as_me:-configure}:8136: testing ...checked LIBS $LIBS ..." 1>&5
8137
8138         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8139
8140 echo "${as_me:-configure}:8140: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8141
8142 else
8143         echo "$as_me:8143: result: no" >&5
8144 echo "${ECHO_T}no" >&6
8145 fi
8146
8147 fi
8148
8149 fi
8150
8151 ### Depending on the system, someone may use rpath to build ncurses but not
8152 # want users of the package to rely upon that feature.  Give those people an
8153 # option to suppress that detail from EXTRA_LDFLAGS.
8154 EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
8155 if test -n "$EXTRA_PKG_LDFLAGS"
8156 then
8157         echo "$as_me:8157: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8158 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8159
8160 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8161 if test "${enable_pkg_ldflags+set}" = set; then
8162   enableval="$enable_pkg_ldflags"
8163   test "$enableval" != no && enableval=yes
8164         if test "$enableval" != "yes" ; then
8165     disable_pkg_ldflags=yes
8166         else
8167                 disable_pkg_ldflags=no
8168         fi
8169 else
8170   enableval=yes
8171         disable_pkg_ldflags=no
8172
8173 fi;
8174         echo "$as_me:8174: result: $disable_pkg_ldflags" >&5
8175 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8176         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8177 fi
8178
8179 ###############################################################################
8180
8181 ###     use option --with-extra-suffix to append suffix to headers and libraries
8182 echo "$as_me:8182: checking if you wish to append extra suffix to header/library paths" >&5
8183 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8184 EXTRA_SUFFIX=
8185
8186 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8187 if test "${with_extra_suffix+set}" = set; then
8188   withval="$with_extra_suffix"
8189   case x$withval in
8190         (xno)
8191                 ;;
8192         (xyes|x)
8193                 EXTRA_SUFFIX=$cf_cv_abi_version
8194                 ;;
8195         (*)
8196                 EXTRA_SUFFIX=$withval
8197                 ;;
8198         esac
8199
8200 fi;
8201 echo "$as_me:8201: result: $EXTRA_SUFFIX" >&5
8202 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8203
8204 ###     use option --disable-overwrite to leave out the link to -lcurses
8205 echo "$as_me:8205: checking if you wish to install ncurses overwriting curses" >&5
8206 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8207
8208 # Check whether --enable-overwrite or --disable-overwrite was given.
8209 if test "${enable_overwrite+set}" = set; then
8210   enableval="$enable_overwrite"
8211   with_overwrite=$enableval
8212 else
8213   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8214 fi;
8215 echo "$as_me:8215: result: $with_overwrite" >&5
8216 echo "${ECHO_T}$with_overwrite" >&6
8217
8218 echo "$as_me:8218: checking if external terminfo-database is used" >&5
8219 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8220
8221 # Check whether --enable-database or --disable-database was given.
8222 if test "${enable_database+set}" = set; then
8223   enableval="$enable_database"
8224   use_database=$enableval
8225 else
8226   use_database=yes
8227 fi;
8228 echo "$as_me:8228: result: $use_database" >&5
8229 echo "${ECHO_T}$use_database" >&6
8230
8231 case "$host_os" in
8232 (os2*)
8233         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8234         ;;
8235 (*)
8236         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8237         ;;
8238 esac
8239
8240 NCURSES_USE_DATABASE=0
8241 if test "$use_database" != no ; then
8242         NCURSES_USE_DATABASE=1
8243
8244         echo "$as_me:8244: checking which terminfo source-file will be installed" >&5
8245 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8246
8247 # Check whether --with-database or --without-database was given.
8248 if test "${with_database+set}" = set; then
8249   withval="$with_database"
8250   TERMINFO_SRC=$withval
8251 fi;
8252         echo "$as_me:8252: result: $TERMINFO_SRC" >&5
8253 echo "${ECHO_T}$TERMINFO_SRC" >&6
8254
8255         echo "$as_me:8255: checking whether to use hashed database instead of directory/tree" >&5
8256 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8257
8258 # Check whether --with-hashed-db or --without-hashed-db was given.
8259 if test "${with_hashed_db+set}" = set; then
8260   withval="$with_hashed_db"
8261
8262 else
8263   with_hashed_db=no
8264 fi;
8265         echo "$as_me:8265: result: $with_hashed_db" >&5
8266 echo "${ECHO_T}$with_hashed_db" >&6
8267 else
8268         with_hashed_db=no
8269 fi
8270
8271 echo "$as_me:8271: checking for list of fallback descriptions" >&5
8272 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8273
8274 # Check whether --with-fallbacks or --without-fallbacks was given.
8275 if test "${with_fallbacks+set}" = set; then
8276   withval="$with_fallbacks"
8277   with_fallback=$withval
8278 else
8279   with_fallback=
8280 fi;
8281 echo "$as_me:8281: result: $with_fallback" >&5
8282 echo "${ECHO_T}$with_fallback" >&6
8283
8284 case ".$with_fallback" in
8285 (.|.no)
8286         FALLBACK_LIST=
8287         ;;
8288 (.yes)
8289         { echo "$as_me:8289: WARNING: expected a list of terminal descriptions" >&5
8290 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8291         ;;
8292 (*)
8293         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8294         ;;
8295 esac
8296
8297 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8298 # tree for generating the terminal descriptions that will be compiled into the
8299 # library.  If your toolchain is old, it may not handle current terminal
8300 # databases.  Use configure-options to point to the tools which will be used,
8301 # rather than the first ones found on the $PATH.
8302 if test -n "$ac_tool_prefix"; then
8303   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8304 set dummy ${ac_tool_prefix}tic; ac_word=$2
8305 echo "$as_me:8305: checking for $ac_word" >&5
8306 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8307 if test "${ac_cv_prog_TIC+set}" = set; then
8308   echo $ECHO_N "(cached) $ECHO_C" >&6
8309 else
8310   if test -n "$TIC"; then
8311   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8312 else
8313   ac_save_IFS=$IFS; IFS=$ac_path_separator
8314 ac_dummy="$PATH"
8315 for ac_dir in $ac_dummy; do
8316   IFS=$ac_save_IFS
8317   test -z "$ac_dir" && ac_dir=.
8318   $as_executable_p "$ac_dir/$ac_word" || continue
8319 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8320 echo "$as_me:8320: found $ac_dir/$ac_word" >&5
8321 break
8322 done
8323
8324 fi
8325 fi
8326 TIC=$ac_cv_prog_TIC
8327 if test -n "$TIC"; then
8328   echo "$as_me:8328: result: $TIC" >&5
8329 echo "${ECHO_T}$TIC" >&6
8330 else
8331   echo "$as_me:8331: result: no" >&5
8332 echo "${ECHO_T}no" >&6
8333 fi
8334
8335 fi
8336 if test -z "$ac_cv_prog_TIC"; then
8337   ac_ct_TIC=$TIC
8338   # Extract the first word of "tic", so it can be a program name with args.
8339 set dummy tic; ac_word=$2
8340 echo "$as_me:8340: checking for $ac_word" >&5
8341 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8342 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
8343   echo $ECHO_N "(cached) $ECHO_C" >&6
8344 else
8345   if test -n "$ac_ct_TIC"; then
8346   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
8347 else
8348   ac_save_IFS=$IFS; IFS=$ac_path_separator
8349 ac_dummy="$PATH"
8350 for ac_dir in $ac_dummy; do
8351   IFS=$ac_save_IFS
8352   test -z "$ac_dir" && ac_dir=.
8353   $as_executable_p "$ac_dir/$ac_word" || continue
8354 ac_cv_prog_ac_ct_TIC="tic"
8355 echo "$as_me:8355: found $ac_dir/$ac_word" >&5
8356 break
8357 done
8358
8359 fi
8360 fi
8361 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
8362 if test -n "$ac_ct_TIC"; then
8363   echo "$as_me:8363: result: $ac_ct_TIC" >&5
8364 echo "${ECHO_T}$ac_ct_TIC" >&6
8365 else
8366   echo "$as_me:8366: result: no" >&5
8367 echo "${ECHO_T}no" >&6
8368 fi
8369
8370   TIC=$ac_ct_TIC
8371 else
8372   TIC="$ac_cv_prog_TIC"
8373 fi
8374
8375 if test -n "$ac_tool_prefix"; then
8376   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
8377 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
8378 echo "$as_me:8378: checking for $ac_word" >&5
8379 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8380 if test "${ac_cv_prog_INFOCMP+set}" = set; then
8381   echo $ECHO_N "(cached) $ECHO_C" >&6
8382 else
8383   if test -n "$INFOCMP"; then
8384   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
8385 else
8386   ac_save_IFS=$IFS; IFS=$ac_path_separator
8387 ac_dummy="$PATH"
8388 for ac_dir in $ac_dummy; do
8389   IFS=$ac_save_IFS
8390   test -z "$ac_dir" && ac_dir=.
8391   $as_executable_p "$ac_dir/$ac_word" || continue
8392 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
8393 echo "$as_me:8393: found $ac_dir/$ac_word" >&5
8394 break
8395 done
8396
8397 fi
8398 fi
8399 INFOCMP=$ac_cv_prog_INFOCMP
8400 if test -n "$INFOCMP"; then
8401   echo "$as_me:8401: result: $INFOCMP" >&5
8402 echo "${ECHO_T}$INFOCMP" >&6
8403 else
8404   echo "$as_me:8404: result: no" >&5
8405 echo "${ECHO_T}no" >&6
8406 fi
8407
8408 fi
8409 if test -z "$ac_cv_prog_INFOCMP"; then
8410   ac_ct_INFOCMP=$INFOCMP
8411   # Extract the first word of "infocmp", so it can be a program name with args.
8412 set dummy infocmp; ac_word=$2
8413 echo "$as_me:8413: checking for $ac_word" >&5
8414 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8415 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
8416   echo $ECHO_N "(cached) $ECHO_C" >&6
8417 else
8418   if test -n "$ac_ct_INFOCMP"; then
8419   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
8420 else
8421   ac_save_IFS=$IFS; IFS=$ac_path_separator
8422 ac_dummy="$PATH"
8423 for ac_dir in $ac_dummy; do
8424   IFS=$ac_save_IFS
8425   test -z "$ac_dir" && ac_dir=.
8426   $as_executable_p "$ac_dir/$ac_word" || continue
8427 ac_cv_prog_ac_ct_INFOCMP="infocmp"
8428 echo "$as_me:8428: found $ac_dir/$ac_word" >&5
8429 break
8430 done
8431
8432 fi
8433 fi
8434 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
8435 if test -n "$ac_ct_INFOCMP"; then
8436   echo "$as_me:8436: result: $ac_ct_INFOCMP" >&5
8437 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
8438 else
8439   echo "$as_me:8439: result: no" >&5
8440 echo "${ECHO_T}no" >&6
8441 fi
8442
8443   INFOCMP=$ac_ct_INFOCMP
8444 else
8445   INFOCMP="$ac_cv_prog_INFOCMP"
8446 fi
8447
8448 if test -n "$FALLBACK_LIST"
8449 then
8450
8451 # Check whether --with-tic-path or --without-tic-path was given.
8452 if test "${with_tic_path+set}" = set; then
8453   withval="$with_tic_path"
8454   echo "$as_me:8454: checking for tic program for fallbacks" >&5
8455 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8456                 TIC=$withval
8457                 echo "$as_me:8457: result: $TIC" >&5
8458 echo "${ECHO_T}$TIC" >&6
8459
8460 if test "x$prefix" != xNONE; then
8461         cf_path_syntax="$prefix"
8462 else
8463         cf_path_syntax="$ac_default_prefix"
8464 fi
8465
8466 case ".$TIC" in
8467 (.\$\(*\)*|.\'*\'*)
8468         ;;
8469 (..|./*|.\\*)
8470         ;;
8471 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8472         ;;
8473 (.\$\{*prefix\}*|.\$\{*dir\}*)
8474         eval TIC="$TIC"
8475         case ".$TIC" in
8476         (.NONE/*)
8477                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8478                 ;;
8479         esac
8480         ;;
8481 (.no|.NONE/*)
8482         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8483         ;;
8484 (*)
8485         { { echo "$as_me:8485: error: expected a pathname, not \"$TIC\"" >&5
8486 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8487    { (exit 1); exit 1; }; }
8488         ;;
8489 esac
8490
8491 else
8492
8493 test -z "$TIC" && TIC="tic"
8494 for ac_prog in $TIC tic
8495 do
8496   # Extract the first word of "$ac_prog", so it can be a program name with args.
8497 set dummy $ac_prog; ac_word=$2
8498 echo "$as_me:8498: checking for $ac_word" >&5
8499 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8500 if test "${ac_cv_path_TIC+set}" = set; then
8501   echo $ECHO_N "(cached) $ECHO_C" >&6
8502 else
8503   case $TIC in
8504   [\\/]* | ?:[\\/]*)
8505   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8506   ;;
8507   *)
8508   ac_save_IFS=$IFS; IFS=$ac_path_separator
8509 ac_dummy="$PATH:/usr/local/ncurses/bin"
8510 for ac_dir in $ac_dummy; do
8511   IFS=$ac_save_IFS
8512   test -z "$ac_dir" && ac_dir=.
8513   if $as_executable_p "$ac_dir/$ac_word"; then
8514    ac_cv_path_TIC="$ac_dir/$ac_word"
8515    echo "$as_me:8515: found $ac_dir/$ac_word" >&5
8516    break
8517 fi
8518 done
8519
8520   ;;
8521 esac
8522 fi
8523 TIC=$ac_cv_path_TIC
8524
8525 if test -n "$TIC"; then
8526   echo "$as_me:8526: result: $TIC" >&5
8527 echo "${ECHO_T}$TIC" >&6
8528 else
8529   echo "$as_me:8529: result: no" >&5
8530 echo "${ECHO_T}no" >&6
8531 fi
8532
8533   test -n "$TIC" && break
8534 done
8535 test -n "$TIC" || TIC="$TIC"
8536
8537 cf_path_prog=""
8538 cf_path_args=""
8539 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8540 for cf_temp in $ac_cv_path_TIC
8541 do
8542         if test -z "$cf_path_prog" ; then
8543                 if test "$with_full_paths" = yes ; then
8544
8545 if test "x$prefix" != xNONE; then
8546         cf_path_syntax="$prefix"
8547 else
8548         cf_path_syntax="$ac_default_prefix"
8549 fi
8550
8551 case ".$cf_temp" in
8552 (.\$\(*\)*|.\'*\'*)
8553         ;;
8554 (..|./*|.\\*)
8555         ;;
8556 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8557         ;;
8558 (.\$\{*prefix\}*|.\$\{*dir\}*)
8559         eval cf_temp="$cf_temp"
8560         case ".$cf_temp" in
8561         (.NONE/*)
8562                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8563                 ;;
8564         esac
8565         ;;
8566 (.no|.NONE/*)
8567         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8568         ;;
8569 (*)
8570         break
8571         ;;
8572 esac
8573
8574                         cf_path_prog="$cf_temp"
8575                 else
8576                         cf_path_prog="`basename "$cf_temp"`"
8577                 fi
8578         elif test -z "$cf_path_args" ; then
8579                 cf_path_args="$cf_temp"
8580         else
8581                 cf_path_args="$cf_path_args $cf_temp"
8582         fi
8583 done
8584 IFS="$cf_save_ifs"
8585
8586 if test -n "$cf_path_prog" ; then
8587
8588 echo "${as_me:-configure}:8588: testing defining path for ${cf_path_prog} ..." 1>&5
8589
8590 cat >>confdefs.h <<EOF
8591 #define TIC_PATH "$cf_path_prog"
8592 EOF
8593
8594         test -n "$cf_path_args" &&
8595 cat >>confdefs.h <<EOF
8596 #define TIC_ARGS "$cf_path_args"
8597 EOF
8598
8599 fi
8600
8601                 if test -z "$TIC"
8602                 then
8603                         { echo "$as_me:8603: WARNING: no tic program found for fallbacks" >&5
8604 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8605                 fi
8606
8607 fi;
8608
8609 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8610 if test "${with_infocmp_path+set}" = set; then
8611   withval="$with_infocmp_path"
8612   echo "$as_me:8612: checking for infocmp program for fallbacks" >&5
8613 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8614                 INFOCMP=$withval
8615                 echo "$as_me:8615: result: $INFOCMP" >&5
8616 echo "${ECHO_T}$INFOCMP" >&6
8617
8618 if test "x$prefix" != xNONE; then
8619         cf_path_syntax="$prefix"
8620 else
8621         cf_path_syntax="$ac_default_prefix"
8622 fi
8623
8624 case ".$INFOCMP" in
8625 (.\$\(*\)*|.\'*\'*)
8626         ;;
8627 (..|./*|.\\*)
8628         ;;
8629 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8630         ;;
8631 (.\$\{*prefix\}*|.\$\{*dir\}*)
8632         eval INFOCMP="$INFOCMP"
8633         case ".$INFOCMP" in
8634         (.NONE/*)
8635                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8636                 ;;
8637         esac
8638         ;;
8639 (.no|.NONE/*)
8640         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8641         ;;
8642 (*)
8643         { { echo "$as_me:8643: error: expected a pathname, not \"$INFOCMP\"" >&5
8644 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8645    { (exit 1); exit 1; }; }
8646         ;;
8647 esac
8648
8649 else
8650
8651 test -z "$INFOCMP" && INFOCMP="infocmp"
8652 for ac_prog in $INFOCMP infocmp
8653 do
8654   # Extract the first word of "$ac_prog", so it can be a program name with args.
8655 set dummy $ac_prog; ac_word=$2
8656 echo "$as_me:8656: checking for $ac_word" >&5
8657 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8658 if test "${ac_cv_path_INFOCMP+set}" = set; then
8659   echo $ECHO_N "(cached) $ECHO_C" >&6
8660 else
8661   case $INFOCMP in
8662   [\\/]* | ?:[\\/]*)
8663   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8664   ;;
8665   *)
8666   ac_save_IFS=$IFS; IFS=$ac_path_separator
8667 ac_dummy="$PATH:/usr/local/ncurses/bin"
8668 for ac_dir in $ac_dummy; do
8669   IFS=$ac_save_IFS
8670   test -z "$ac_dir" && ac_dir=.
8671   if $as_executable_p "$ac_dir/$ac_word"; then
8672    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8673    echo "$as_me:8673: found $ac_dir/$ac_word" >&5
8674    break
8675 fi
8676 done
8677
8678   ;;
8679 esac
8680 fi
8681 INFOCMP=$ac_cv_path_INFOCMP
8682
8683 if test -n "$INFOCMP"; then
8684   echo "$as_me:8684: result: $INFOCMP" >&5
8685 echo "${ECHO_T}$INFOCMP" >&6
8686 else
8687   echo "$as_me:8687: result: no" >&5
8688 echo "${ECHO_T}no" >&6
8689 fi
8690
8691   test -n "$INFOCMP" && break
8692 done
8693 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8694
8695 cf_path_prog=""
8696 cf_path_args=""
8697 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8698 for cf_temp in $ac_cv_path_INFOCMP
8699 do
8700         if test -z "$cf_path_prog" ; then
8701                 if test "$with_full_paths" = yes ; then
8702
8703 if test "x$prefix" != xNONE; then
8704         cf_path_syntax="$prefix"
8705 else
8706         cf_path_syntax="$ac_default_prefix"
8707 fi
8708
8709 case ".$cf_temp" in
8710 (.\$\(*\)*|.\'*\'*)
8711         ;;
8712 (..|./*|.\\*)
8713         ;;
8714 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8715         ;;
8716 (.\$\{*prefix\}*|.\$\{*dir\}*)
8717         eval cf_temp="$cf_temp"
8718         case ".$cf_temp" in
8719         (.NONE/*)
8720                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8721                 ;;
8722         esac
8723         ;;
8724 (.no|.NONE/*)
8725         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8726         ;;
8727 (*)
8728         break
8729         ;;
8730 esac
8731
8732                         cf_path_prog="$cf_temp"
8733                 else
8734                         cf_path_prog="`basename "$cf_temp"`"
8735                 fi
8736         elif test -z "$cf_path_args" ; then
8737                 cf_path_args="$cf_temp"
8738         else
8739                 cf_path_args="$cf_path_args $cf_temp"
8740         fi
8741 done
8742 IFS="$cf_save_ifs"
8743
8744 if test -n "$cf_path_prog" ; then
8745
8746 echo "${as_me:-configure}:8746: testing defining path for ${cf_path_prog} ..." 1>&5
8747
8748 cat >>confdefs.h <<EOF
8749 #define INFOCMP_PATH "$cf_path_prog"
8750 EOF
8751
8752         test -n "$cf_path_args" &&
8753 cat >>confdefs.h <<EOF
8754 #define INFOCMP_ARGS "$cf_path_args"
8755 EOF
8756
8757 fi
8758
8759                 if test -z "$INFOCMP"
8760                 then
8761                         { echo "$as_me:8761: WARNING: no infocmp program found for fallbacks" >&5
8762 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8763                 fi
8764
8765 fi;
8766
8767         test -z "$TIC" && FALLBACK_LIST=
8768         test -z "$INFOCMP" && FALLBACK_LIST=
8769         if test -z "$FALLBACK_LIST"
8770         then
8771                 { echo "$as_me:8771: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
8772 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
8773         fi
8774 fi
8775
8776 USE_FALLBACKS=
8777 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8778
8779 echo "$as_me:8779: checking if you want modern xterm or antique" >&5
8780 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8781
8782 # Check whether --with-xterm-new or --without-xterm-new was given.
8783 if test "${with_xterm_new+set}" = set; then
8784   withval="$with_xterm_new"
8785   with_xterm_new=$withval
8786 else
8787   with_xterm_new=yes
8788 fi;
8789 case "$with_xterm_new" in
8790 (no) with_xterm_new=xterm-old;;
8791 (*)      with_xterm_new=xterm-new;;
8792 esac
8793 echo "$as_me:8793: result: $with_xterm_new" >&5
8794 echo "${ECHO_T}$with_xterm_new" >&6
8795 WHICH_XTERM=$with_xterm_new
8796
8797 echo "$as_me:8797: checking if xterm backspace sends BS or DEL" >&5
8798 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8799
8800 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8801 if test "${with_xterm_kbs+set}" = set; then
8802   withval="$with_xterm_kbs"
8803   with_xterm_kbs=$withval
8804 else
8805   with_xterm_kbs=BS
8806 fi;
8807 case x$with_xterm_kbs in
8808 (xyes|xno|xBS|xbs|x8)
8809         with_xterm_kbs=BS
8810         ;;
8811 (xDEL|xdel|x127)
8812         with_xterm_kbs=DEL
8813         ;;
8814 (*)
8815         with_xterm_kbs=$withval
8816         ;;
8817 esac
8818 echo "$as_me:8818: result: $with_xterm_kbs" >&5
8819 echo "${ECHO_T}$with_xterm_kbs" >&6
8820 XTERM_KBS=$with_xterm_kbs
8821
8822 MAKE_TERMINFO=
8823 if test "$use_database" = no ; then
8824         TERMINFO="${datadir}/terminfo"
8825         MAKE_TERMINFO="#"
8826 else
8827
8828 echo "$as_me:8828: checking for list of terminfo directories" >&5
8829 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
8830
8831 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
8832 if test "${with_terminfo_dirs+set}" = set; then
8833   withval="$with_terminfo_dirs"
8834
8835 else
8836   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
8837 fi;
8838 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8839 cf_dst_path=
8840 for cf_src_path in $withval
8841 do
8842
8843 if test "x$prefix" != xNONE; then
8844         cf_path_syntax="$prefix"
8845 else
8846         cf_path_syntax="$ac_default_prefix"
8847 fi
8848
8849 case ".$cf_src_path" in
8850 (.\$\(*\)*|.\'*\'*)
8851         ;;
8852 (..|./*|.\\*)
8853         ;;
8854 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8855         ;;
8856 (.\$\{*prefix\}*|.\$\{*dir\}*)
8857         eval cf_src_path="$cf_src_path"
8858         case ".$cf_src_path" in
8859         (.NONE/*)
8860                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
8861                 ;;
8862         esac
8863         ;;
8864 (.no|.NONE/*)
8865         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
8866         ;;
8867 (*)
8868         { { echo "$as_me:8868: error: expected a pathname, not \"$cf_src_path\"" >&5
8869 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8870    { (exit 1); exit 1; }; }
8871         ;;
8872 esac
8873
8874   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8875   cf_dst_path="${cf_dst_path}${cf_src_path}"
8876 done
8877 IFS="$ac_save_ifs"
8878
8879 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8880 # so we have to check/work around.  We do prefer the result of "eval"...
8881 eval cf_dst_eval="$cf_dst_path"
8882 case "x$cf_dst_eval" in
8883 (xNONE*)
8884         TERMINFO_DIRS=$cf_dst_path
8885         ;;
8886 (*)
8887         TERMINFO_DIRS="$cf_dst_eval"
8888         ;;
8889 esac
8890
8891 echo "$as_me:8891: result: $TERMINFO_DIRS" >&5
8892 echo "${ECHO_T}$TERMINFO_DIRS" >&6
8893 test -n "$TERMINFO_DIRS" &&
8894 cat >>confdefs.h <<EOF
8895 #define TERMINFO_DIRS "$TERMINFO_DIRS"
8896 EOF
8897
8898 case "x$TERMINFO" in
8899 x???:*)
8900         { echo "$as_me:8900: WARNING: ignoring non-directory/file TERMINFO value" >&5
8901 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
8902         unset TERMINFO
8903         ;;
8904 esac
8905
8906 echo "$as_me:8906: checking for default terminfo directory" >&5
8907 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8908
8909 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8910 if test "${with_default_terminfo_dir+set}" = set; then
8911   withval="$with_default_terminfo_dir"
8912
8913 else
8914   withval="${TERMINFO:-${datadir}/terminfo}"
8915 fi; if test -n "${datadir}/terminfo" ; then
8916
8917 if test "x$prefix" != xNONE; then
8918         cf_path_syntax="$prefix"
8919 else
8920         cf_path_syntax="$ac_default_prefix"
8921 fi
8922
8923 case ".$withval" in
8924 (.\$\(*\)*|.\'*\'*)
8925         ;;
8926 (..|./*|.\\*)
8927         ;;
8928 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8929         ;;
8930 (.\$\{*prefix\}*|.\$\{*dir\}*)
8931         eval withval="$withval"
8932         case ".$withval" in
8933         (.NONE/*)
8934                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
8935                 ;;
8936         esac
8937         ;;
8938 (.no|.NONE/*)
8939         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
8940         ;;
8941 (*)
8942         { { echo "$as_me:8942: error: expected a pathname, not \"$withval\"" >&5
8943 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8944    { (exit 1); exit 1; }; }
8945         ;;
8946 esac
8947
8948 fi
8949 eval TERMINFO="$withval"
8950
8951 echo "$as_me:8951: result: $TERMINFO" >&5
8952 echo "${ECHO_T}$TERMINFO" >&6
8953
8954 cat >>confdefs.h <<EOF
8955 #define TERMINFO "$TERMINFO"
8956 EOF
8957
8958 fi
8959
8960 ###     use option --disable-big-core to make tic run on small machines
8961 ###     We need 4Mb, check if we can allocate 50% more than that.
8962 echo "$as_me:8962: checking if big-core option selected" >&5
8963 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
8964
8965 # Check whether --enable-big-core or --disable-big-core was given.
8966 if test "${enable_big_core+set}" = set; then
8967   enableval="$enable_big_core"
8968   with_big_core=$enableval
8969 else
8970   if test "$cross_compiling" = yes; then
8971   with_big_core=no
8972 else
8973   cat >"conftest.$ac_ext" <<_ACEOF
8974 #line 8974 "configure"
8975 #include "confdefs.h"
8976
8977 #include <stdlib.h>
8978 #include <string.h>
8979 int main() {
8980         unsigned long n = 6000000L;
8981         char *s = malloc(n);
8982         if (s != 0)
8983                 s[0] = s[n-1] = 0;
8984         ${cf_cv_main_return:-return}(s == 0);
8985 }
8986 _ACEOF
8987 rm -f "conftest$ac_exeext"
8988 if { (eval echo "$as_me:8988: \"$ac_link\"") >&5
8989   (eval $ac_link) 2>&5
8990   ac_status=$?
8991   echo "$as_me:8991: \$? = $ac_status" >&5
8992   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8993   { (eval echo "$as_me:8993: \"$ac_try\"") >&5
8994   (eval $ac_try) 2>&5
8995   ac_status=$?
8996   echo "$as_me:8996: \$? = $ac_status" >&5
8997   (exit "$ac_status"); }; }; then
8998   with_big_core=yes
8999 else
9000   echo "$as_me: program exited with status $ac_status" >&5
9001 echo "$as_me: failed program was:" >&5
9002 cat "conftest.$ac_ext" >&5
9003 with_big_core=no
9004 fi
9005 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9006 fi
9007 fi;
9008 echo "$as_me:9008: result: $with_big_core" >&5
9009 echo "${ECHO_T}$with_big_core" >&6
9010 test "x$with_big_core" = "xyes" &&
9011 cat >>confdefs.h <<\EOF
9012 #define HAVE_BIG_CORE 1
9013 EOF
9014
9015 ### ISO C only guarantees 512-char strings, we have tables which load faster
9016 ### when constructed using "big" strings.  More than the C compiler, the awk
9017 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9018 echo "$as_me:9018: checking if big-strings option selected" >&5
9019 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9020
9021 # Check whether --enable-big-strings or --disable-big-strings was given.
9022 if test "${enable_big_strings+set}" = set; then
9023   enableval="$enable_big_strings"
9024   with_big_strings=$enableval
9025 else
9026
9027         case x$AWK in
9028         (x)
9029                 eval with_big_strings=no
9030                 ;;
9031         (*)
9032                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9033                         | $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
9034                         eval with_big_strings=yes
9035                 else
9036                         eval with_big_strings=no
9037                 fi
9038                 ;;
9039         esac
9040
9041 fi;
9042 echo "$as_me:9042: result: $with_big_strings" >&5
9043 echo "${ECHO_T}$with_big_strings" >&6
9044
9045 USE_BIG_STRINGS=0
9046 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9047
9048 ###     use option --enable-termcap to compile in the termcap fallback support
9049 echo "$as_me:9049: checking if you want termcap-fallback support" >&5
9050 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9051
9052 # Check whether --enable-termcap or --disable-termcap was given.
9053 if test "${enable_termcap+set}" = set; then
9054   enableval="$enable_termcap"
9055   with_termcap=$enableval
9056 else
9057   with_termcap=no
9058 fi;
9059 echo "$as_me:9059: result: $with_termcap" >&5
9060 echo "${ECHO_T}$with_termcap" >&6
9061
9062 NCURSES_USE_TERMCAP=0
9063 if test "x$with_termcap" != "xyes" ; then
9064         if test "$use_database" = no ; then
9065                 if test -z "$with_fallback" ; then
9066                         { { echo "$as_me:9066: error: You have disabled the database w/o specifying fallbacks" >&5
9067 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9068    { (exit 1); exit 1; }; }
9069                 fi
9070         fi
9071
9072 cat >>confdefs.h <<\EOF
9073 #define PURE_TERMINFO 1
9074 EOF
9075
9076 else
9077
9078         if test "$with_ticlib" != no ; then
9079                 { { echo "$as_me:9079: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9080 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9081    { (exit 1); exit 1; }; }
9082         fi
9083
9084         NCURSES_USE_TERMCAP=1
9085         echo "$as_me:9085: checking for list of termcap files" >&5
9086 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9087
9088 # Check whether --with-termpath or --without-termpath was given.
9089 if test "${with_termpath+set}" = set; then
9090   withval="$with_termpath"
9091
9092 else
9093   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9094 fi;
9095 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9096 cf_dst_path=
9097 for cf_src_path in $withval
9098 do
9099
9100 if test "x$prefix" != xNONE; then
9101         cf_path_syntax="$prefix"
9102 else
9103         cf_path_syntax="$ac_default_prefix"
9104 fi
9105
9106 case ".$cf_src_path" in
9107 (.\$\(*\)*|.\'*\'*)
9108         ;;
9109 (..|./*|.\\*)
9110         ;;
9111 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9112         ;;
9113 (.\$\{*prefix\}*|.\$\{*dir\}*)
9114         eval cf_src_path="$cf_src_path"
9115         case ".$cf_src_path" in
9116         (.NONE/*)
9117                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9118                 ;;
9119         esac
9120         ;;
9121 (.no|.NONE/*)
9122         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9123         ;;
9124 (*)
9125         { { echo "$as_me:9125: error: expected a pathname, not \"$cf_src_path\"" >&5
9126 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9127    { (exit 1); exit 1; }; }
9128         ;;
9129 esac
9130
9131   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9132   cf_dst_path="${cf_dst_path}${cf_src_path}"
9133 done
9134 IFS="$ac_save_ifs"
9135
9136 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9137 # so we have to check/work around.  We do prefer the result of "eval"...
9138 eval cf_dst_eval="$cf_dst_path"
9139 case "x$cf_dst_eval" in
9140 (xNONE*)
9141         TERMPATH=$cf_dst_path
9142         ;;
9143 (*)
9144         TERMPATH="$cf_dst_eval"
9145         ;;
9146 esac
9147
9148         echo "$as_me:9148: result: $TERMPATH" >&5
9149 echo "${ECHO_T}$TERMPATH" >&6
9150         test -n "$TERMPATH" &&
9151 cat >>confdefs.h <<EOF
9152 #define TERMPATH "$TERMPATH"
9153 EOF
9154
9155         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9156         echo "$as_me:9156: checking if fast termcap-loader is needed" >&5
9157 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9158
9159 # Check whether --enable-getcap or --disable-getcap was given.
9160 if test "${enable_getcap+set}" = set; then
9161   enableval="$enable_getcap"
9162   with_getcap=$enableval
9163 else
9164   with_getcap=no
9165 fi;
9166         echo "$as_me:9166: result: $with_getcap" >&5
9167 echo "${ECHO_T}$with_getcap" >&6
9168         test "x$with_getcap" = "xyes" &&
9169 cat >>confdefs.h <<\EOF
9170 #define USE_GETCAP 1
9171 EOF
9172
9173         echo "$as_me:9173: checking if translated termcaps will be cached in ~/.terminfo" >&5
9174 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9175
9176 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9177 if test "${enable_getcap_cache+set}" = set; then
9178   enableval="$enable_getcap_cache"
9179   with_getcap_cache=$enableval
9180 else
9181   with_getcap_cache=no
9182 fi;
9183         echo "$as_me:9183: result: $with_getcap_cache" >&5
9184 echo "${ECHO_T}$with_getcap_cache" >&6
9185         test "x$with_getcap_cache" = "xyes" &&
9186 cat >>confdefs.h <<\EOF
9187 #define USE_GETCAP_CACHE 1
9188 EOF
9189
9190 fi
9191
9192 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9193 echo "$as_me:9193: checking if ~/.terminfo is wanted" >&5
9194 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9195
9196 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9197 if test "${enable_home_terminfo+set}" = set; then
9198   enableval="$enable_home_terminfo"
9199   with_home_terminfo=$enableval
9200 else
9201   with_home_terminfo=yes
9202 fi;
9203 echo "$as_me:9203: result: $with_home_terminfo" >&5
9204 echo "${ECHO_T}$with_home_terminfo" >&6
9205 test "x$with_home_terminfo" = "xyes" &&
9206 cat >>confdefs.h <<\EOF
9207 #define USE_HOME_TERMINFO 1
9208 EOF
9209
9210 echo "$as_me:9210: checking if you want to use restricted environment when running as root" >&5
9211 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
9212
9213 # Check whether --enable-root-environ or --disable-root-environ was given.
9214 if test "${enable_root_environ+set}" = set; then
9215   enableval="$enable_root_environ"
9216   with_root_environ=$enableval
9217 else
9218   with_root_environ=yes
9219 fi;
9220 echo "$as_me:9220: result: $with_root_environ" >&5
9221 echo "${ECHO_T}$with_root_environ" >&6
9222 test "x$with_root_environ" = xyes &&
9223 cat >>confdefs.h <<\EOF
9224 #define USE_ROOT_ENVIRON 1
9225 EOF
9226
9227 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9228 ###   to reduce storage requirements for the terminfo database.
9229
9230 for ac_header in \
9231 unistd.h \
9232
9233 do
9234 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9235 echo "$as_me:9235: checking for $ac_header" >&5
9236 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9237 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9238   echo $ECHO_N "(cached) $ECHO_C" >&6
9239 else
9240   cat >"conftest.$ac_ext" <<_ACEOF
9241 #line 9241 "configure"
9242 #include "confdefs.h"
9243 #include <$ac_header>
9244 _ACEOF
9245 if { (eval echo "$as_me:9245: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9246   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9247   ac_status=$?
9248   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9249   rm -f conftest.er1
9250   cat conftest.err >&5
9251   echo "$as_me:9251: \$? = $ac_status" >&5
9252   (exit "$ac_status"); } >/dev/null; then
9253   if test -s conftest.err; then
9254     ac_cpp_err=$ac_c_preproc_warn_flag
9255   else
9256     ac_cpp_err=
9257   fi
9258 else
9259   ac_cpp_err=yes
9260 fi
9261 if test -z "$ac_cpp_err"; then
9262   eval "$as_ac_Header=yes"
9263 else
9264   echo "$as_me: failed program was:" >&5
9265   cat "conftest.$ac_ext" >&5
9266   eval "$as_ac_Header=no"
9267 fi
9268 rm -f conftest.err "conftest.$ac_ext"
9269 fi
9270 echo "$as_me:9270: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9271 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9272 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9273   cat >>confdefs.h <<EOF
9274 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9275 EOF
9276
9277 fi
9278 done
9279
9280 for ac_func in \
9281         remove \
9282         unlink
9283 do
9284 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9285 echo "$as_me:9285: checking for $ac_func" >&5
9286 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9287 if eval "test \"\${$as_ac_var+set}\" = set"; then
9288   echo $ECHO_N "(cached) $ECHO_C" >&6
9289 else
9290   cat >"conftest.$ac_ext" <<_ACEOF
9291 #line 9291 "configure"
9292 #include "confdefs.h"
9293 #define $ac_func autoconf_temporary
9294 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9295 #undef $ac_func
9296
9297 #ifdef __cplusplus
9298 extern "C"
9299 #endif
9300
9301 /* We use char because int might match the return type of a gcc2
9302    builtin and then its argument prototype would still apply.  */
9303 char $ac_func (void);
9304
9305 int
9306 main (void)
9307 {
9308
9309 /* The GNU C library defines stubs for functions which it implements
9310     to always fail with ENOSYS.  Some functions are actually named
9311     something starting with __ and the normal name is an alias.  */
9312 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9313 #error found stub for $ac_func
9314 #endif
9315
9316         return $ac_func ();
9317   ;
9318   return 0;
9319 }
9320 _ACEOF
9321 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9322 if { (eval echo "$as_me:9322: \"$ac_link\"") >&5
9323   (eval $ac_link) 2>&5
9324   ac_status=$?
9325   echo "$as_me:9325: \$? = $ac_status" >&5
9326   (exit "$ac_status"); } &&
9327          { ac_try='test -s "conftest$ac_exeext"'
9328   { (eval echo "$as_me:9328: \"$ac_try\"") >&5
9329   (eval $ac_try) 2>&5
9330   ac_status=$?
9331   echo "$as_me:9331: \$? = $ac_status" >&5
9332   (exit "$ac_status"); }; }; then
9333   eval "$as_ac_var=yes"
9334 else
9335   echo "$as_me: failed program was:" >&5
9336 cat "conftest.$ac_ext" >&5
9337 eval "$as_ac_var=no"
9338 fi
9339 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9340 fi
9341 echo "$as_me:9341: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9342 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9343 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9344   cat >>confdefs.h <<EOF
9345 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9346 EOF
9347
9348 fi
9349 done
9350
9351 if test "$cross_compiling" = yes ; then
9352
9353 for ac_func in \
9354                 link \
9355                 symlink
9356 do
9357 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9358 echo "$as_me:9358: checking for $ac_func" >&5
9359 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9360 if eval "test \"\${$as_ac_var+set}\" = set"; then
9361   echo $ECHO_N "(cached) $ECHO_C" >&6
9362 else
9363   cat >"conftest.$ac_ext" <<_ACEOF
9364 #line 9364 "configure"
9365 #include "confdefs.h"
9366 #define $ac_func autoconf_temporary
9367 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9368 #undef $ac_func
9369
9370 #ifdef __cplusplus
9371 extern "C"
9372 #endif
9373
9374 /* We use char because int might match the return type of a gcc2
9375    builtin and then its argument prototype would still apply.  */
9376 char $ac_func (void);
9377
9378 int
9379 main (void)
9380 {
9381
9382 /* The GNU C library defines stubs for functions which it implements
9383     to always fail with ENOSYS.  Some functions are actually named
9384     something starting with __ and the normal name is an alias.  */
9385 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9386 #error found stub for $ac_func
9387 #endif
9388
9389         return $ac_func ();
9390   ;
9391   return 0;
9392 }
9393 _ACEOF
9394 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9395 if { (eval echo "$as_me:9395: \"$ac_link\"") >&5
9396   (eval $ac_link) 2>&5
9397   ac_status=$?
9398   echo "$as_me:9398: \$? = $ac_status" >&5
9399   (exit "$ac_status"); } &&
9400          { ac_try='test -s "conftest$ac_exeext"'
9401   { (eval echo "$as_me:9401: \"$ac_try\"") >&5
9402   (eval $ac_try) 2>&5
9403   ac_status=$?
9404   echo "$as_me:9404: \$? = $ac_status" >&5
9405   (exit "$ac_status"); }; }; then
9406   eval "$as_ac_var=yes"
9407 else
9408   echo "$as_me: failed program was:" >&5
9409 cat "conftest.$ac_ext" >&5
9410 eval "$as_ac_var=no"
9411 fi
9412 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9413 fi
9414 echo "$as_me:9414: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9415 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9416 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9417   cat >>confdefs.h <<EOF
9418 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9419 EOF
9420
9421 fi
9422 done
9423
9424 else
9425         echo "$as_me:9425: checking if link/symlink functions work" >&5
9426 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9427 if test "${cf_cv_link_funcs+set}" = set; then
9428   echo $ECHO_N "(cached) $ECHO_C" >&6
9429 else
9430
9431                 cf_cv_link_funcs=
9432                 for cf_func in link symlink ; do
9433                         if test "$cross_compiling" = yes; then
9434
9435                         eval 'ac_cv_func_'$cf_func'=error'
9436 else
9437   cat >"conftest.$ac_ext" <<_ACEOF
9438 #line 9438 "configure"
9439 #include "confdefs.h"
9440
9441 #include <stdio.h>
9442 #include <sys/types.h>
9443 #include <sys/stat.h>
9444 #ifdef HAVE_UNISTD_H
9445 #include <unistd.h>
9446 #endif
9447 int main(void)
9448 {
9449         int fail = 0;
9450         char *src = "conftest.tmp";
9451         char *dst = "conftest.chk";
9452         struct stat src_sb, dst_sb;
9453         FILE *fp = fopen(src, "w");
9454         if (fp == 0) { fail = 3; } else {
9455                 fclose(fp); stat(src, &src_sb);
9456                 if ($cf_func(src, dst) < 0) {
9457                         fail = 1;
9458                 } else if (stat(dst, &dst_sb) < 0) {
9459                         fail = 2;
9460                 } else {
9461                         long diff = (dst_sb.st_mtime - src_sb.st_mtime);
9462                         if (diff < 0) diff = -diff;
9463                         if (diff > 2) fail = 3;
9464                 }
9465         }
9466 #ifdef HAVE_UNLINK
9467         unlink(dst); unlink(src);
9468 #else
9469         remove(dst); remove(src);
9470 #endif
9471         ${cf_cv_main_return:-return} (fail);
9472 }
9473
9474 _ACEOF
9475 rm -f "conftest$ac_exeext"
9476 if { (eval echo "$as_me:9476: \"$ac_link\"") >&5
9477   (eval $ac_link) 2>&5
9478   ac_status=$?
9479   echo "$as_me:9479: \$? = $ac_status" >&5
9480   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9481   { (eval echo "$as_me:9481: \"$ac_try\"") >&5
9482   (eval $ac_try) 2>&5
9483   ac_status=$?
9484   echo "$as_me:9484: \$? = $ac_status" >&5
9485   (exit "$ac_status"); }; }; then
9486
9487                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9488                         eval 'ac_cv_func_'$cf_func'=yes'
9489 else
9490   echo "$as_me: program exited with status $ac_status" >&5
9491 echo "$as_me: failed program was:" >&5
9492 cat "conftest.$ac_ext" >&5
9493
9494                         eval 'ac_cv_func_'$cf_func'=no'
9495 fi
9496 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9497 fi
9498                 done
9499                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9500
9501 fi
9502 echo "$as_me:9502: result: $cf_cv_link_funcs" >&5
9503 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9504         test "$ac_cv_func_link"    = yes &&
9505 cat >>confdefs.h <<\EOF
9506 #define HAVE_LINK 1
9507 EOF
9508
9509         test "$ac_cv_func_symlink" = yes &&
9510 cat >>confdefs.h <<\EOF
9511 #define HAVE_SYMLINK 1
9512 EOF
9513
9514 fi
9515
9516 with_links=no
9517 with_symlinks=no
9518
9519 # soft links (symbolic links) are useful for some systems where hard links do
9520 # not work, or to make it simpler to copy terminfo trees around.
9521 if test "x$ac_cv_func_symlink" = xyes ; then
9522         echo "$as_me:9522: checking if tic should use symbolic links" >&5
9523 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9524
9525 # Check whether --enable-symlinks or --disable-symlinks was given.
9526 if test "${enable_symlinks+set}" = set; then
9527   enableval="$enable_symlinks"
9528   with_symlinks=$enableval
9529 else
9530   with_symlinks=no
9531 fi;
9532         echo "$as_me:9532: result: $with_symlinks" >&5
9533 echo "${ECHO_T}$with_symlinks" >&6
9534 fi
9535
9536 # If we have hard links and did not choose to use soft links instead, there is
9537 # no reason to make this choice optional - use the hard links.
9538 if test "$with_symlinks" = no ; then
9539         echo "$as_me:9539: checking if tic should use hard links" >&5
9540 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9541         if test "x$ac_cv_func_link" = xyes ; then
9542                 with_links=yes
9543         else
9544                 with_links=no
9545         fi
9546         echo "$as_me:9546: result: $with_links" >&5
9547 echo "${ECHO_T}$with_links" >&6
9548 fi
9549
9550 test "x$with_links" = xyes &&
9551 cat >>confdefs.h <<\EOF
9552 #define USE_LINKS 1
9553 EOF
9554
9555 test "x$with_symlinks" = xyes &&
9556 cat >>confdefs.h <<\EOF
9557 #define USE_SYMLINKS 1
9558 EOF
9559
9560 ###   use option --enable-broken-linker to force on use of broken-linker support
9561
9562 echo "$as_me:9562: checking if you want broken-linker support code" >&5
9563 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9564
9565 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9566 if test "${enable_broken_linker+set}" = set; then
9567   enableval="$enable_broken_linker"
9568   with_broken_linker=$enableval
9569 else
9570   with_broken_linker=no
9571 fi;
9572 echo "$as_me:9572: result: $with_broken_linker" >&5
9573 echo "${ECHO_T}$with_broken_linker" >&6
9574
9575 : "${BROKEN_LINKER:=0}"
9576 if test "x$with_broken_linker" = xyes ; then
9577
9578 cat >>confdefs.h <<\EOF
9579 #define BROKEN_LINKER 1
9580 EOF
9581
9582         BROKEN_LINKER=1
9583 fi
9584
9585 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9586 echo "$as_me:9586: checking if tputs should process BSD-style prefix padding" >&5
9587 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9588
9589 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9590 if test "${enable_bsdpad+set}" = set; then
9591   enableval="$enable_bsdpad"
9592   with_bsdpad=$enableval
9593 else
9594   with_bsdpad=no
9595 fi;
9596 echo "$as_me:9596: result: $with_bsdpad" >&5
9597 echo "${ECHO_T}$with_bsdpad" >&6
9598 test "x$with_bsdpad" = xyes &&
9599 cat >>confdefs.h <<\EOF
9600 #define BSD_TPUTS 1
9601 EOF
9602
9603 ###   use option --enable-widec to turn on use of wide-character support
9604 NCURSES_CH_T=chtype
9605 NCURSES_LIBUTF8=0
9606
9607 NEED_WCHAR_H=0
9608 NCURSES_MBSTATE_T=0
9609 NCURSES_WCHAR_T=0
9610 NCURSES_WINT_T=0
9611
9612 # Check to define _XOPEN_SOURCE "automatically"
9613 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9614
9615 echo "$as_me:9615: checking if the POSIX test-macros are already defined" >&5
9616 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9617 if test "${cf_cv_posix_visible+set}" = set; then
9618   echo $ECHO_N "(cached) $ECHO_C" >&6
9619 else
9620
9621 cat >"conftest.$ac_ext" <<_ACEOF
9622 #line 9622 "configure"
9623 #include "confdefs.h"
9624 #include <stdio.h>
9625 int
9626 main (void)
9627 {
9628
9629 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9630         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9631         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9632         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9633 #error conflicting symbols found
9634 #endif
9635
9636   ;
9637   return 0;
9638 }
9639 _ACEOF
9640 rm -f "conftest.$ac_objext"
9641 if { (eval echo "$as_me:9641: \"$ac_compile\"") >&5
9642   (eval $ac_compile) 2>&5
9643   ac_status=$?
9644   echo "$as_me:9644: \$? = $ac_status" >&5
9645   (exit "$ac_status"); } &&
9646          { ac_try='test -s "conftest.$ac_objext"'
9647   { (eval echo "$as_me:9647: \"$ac_try\"") >&5
9648   (eval $ac_try) 2>&5
9649   ac_status=$?
9650   echo "$as_me:9650: \$? = $ac_status" >&5
9651   (exit "$ac_status"); }; }; then
9652   cf_cv_posix_visible=no
9653 else
9654   echo "$as_me: failed program was:" >&5
9655 cat "conftest.$ac_ext" >&5
9656 cf_cv_posix_visible=yes
9657 fi
9658 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9659
9660 fi
9661 echo "$as_me:9661: result: $cf_cv_posix_visible" >&5
9662 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9663
9664 if test "$cf_cv_posix_visible" = no; then
9665
9666 cf_XOPEN_SOURCE=600
9667 cf_POSIX_C_SOURCE=199506L
9668 cf_xopen_source=
9669
9670 case "$host_os" in
9671 (aix[4-7]*)
9672         cf_xopen_source="-D_ALL_SOURCE"
9673         ;;
9674 (msys)
9675         cf_XOPEN_SOURCE=600
9676         ;;
9677 (darwin[0-8].*)
9678         cf_xopen_source="-D_APPLE_C_SOURCE"
9679         ;;
9680 (darwin*)
9681         cf_xopen_source="-D_DARWIN_C_SOURCE"
9682         cf_XOPEN_SOURCE=
9683         ;;
9684 (freebsd*|dragonfly*|midnightbsd*)
9685         # 5.x headers associate
9686         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9687         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9688         cf_POSIX_C_SOURCE=200112L
9689         cf_XOPEN_SOURCE=600
9690         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9691         ;;
9692 (hpux11*)
9693         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9694         ;;
9695 (hpux*)
9696         cf_xopen_source="-D_HPUX_SOURCE"
9697         ;;
9698 (irix[56].*)
9699         cf_xopen_source="-D_SGI_SOURCE"
9700         cf_XOPEN_SOURCE=
9701         ;;
9702 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9703
9704 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9705
9706 echo "$as_me:9706: checking if this is the GNU C library" >&5
9707 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9708 if test "${cf_cv_gnu_library+set}" = set; then
9709   echo $ECHO_N "(cached) $ECHO_C" >&6
9710 else
9711
9712 cat >"conftest.$ac_ext" <<_ACEOF
9713 #line 9713 "configure"
9714 #include "confdefs.h"
9715 #include <sys/types.h>
9716 int
9717 main (void)
9718 {
9719
9720         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9721                 return 0;
9722         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9723                 return 0;
9724         #else
9725         #       error not GNU C library
9726         #endif
9727   ;
9728   return 0;
9729 }
9730 _ACEOF
9731 rm -f "conftest.$ac_objext"
9732 if { (eval echo "$as_me:9732: \"$ac_compile\"") >&5
9733   (eval $ac_compile) 2>&5
9734   ac_status=$?
9735   echo "$as_me:9735: \$? = $ac_status" >&5
9736   (exit "$ac_status"); } &&
9737          { ac_try='test -s "conftest.$ac_objext"'
9738   { (eval echo "$as_me:9738: \"$ac_try\"") >&5
9739   (eval $ac_try) 2>&5
9740   ac_status=$?
9741   echo "$as_me:9741: \$? = $ac_status" >&5
9742   (exit "$ac_status"); }; }; then
9743   cf_cv_gnu_library=yes
9744 else
9745   echo "$as_me: failed program was:" >&5
9746 cat "conftest.$ac_ext" >&5
9747 cf_cv_gnu_library=no
9748 fi
9749 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9750
9751 fi
9752 echo "$as_me:9752: result: $cf_cv_gnu_library" >&5
9753 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9754
9755 if test x$cf_cv_gnu_library = xyes; then
9756
9757         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9758         # was changed to help a little.  newlib incorporated the change about 4
9759         # years later.
9760         echo "$as_me:9760: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9761 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9762 if test "${cf_cv_gnu_library_219+set}" = set; then
9763   echo $ECHO_N "(cached) $ECHO_C" >&6
9764 else
9765
9766                 cf_save="$CPPFLAGS"
9767
9768         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9769         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9770
9771                 cat >"conftest.$ac_ext" <<_ACEOF
9772 #line 9772 "configure"
9773 #include "confdefs.h"
9774 #include <sys/types.h>
9775 int
9776 main (void)
9777 {
9778
9779                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9780                                 return 0;
9781                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9782                                 return 0;
9783                         #else
9784                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9785                         #endif
9786   ;
9787   return 0;
9788 }
9789 _ACEOF
9790 rm -f "conftest.$ac_objext"
9791 if { (eval echo "$as_me:9791: \"$ac_compile\"") >&5
9792   (eval $ac_compile) 2>&5
9793   ac_status=$?
9794   echo "$as_me:9794: \$? = $ac_status" >&5
9795   (exit "$ac_status"); } &&
9796          { ac_try='test -s "conftest.$ac_objext"'
9797   { (eval echo "$as_me:9797: \"$ac_try\"") >&5
9798   (eval $ac_try) 2>&5
9799   ac_status=$?
9800   echo "$as_me:9800: \$? = $ac_status" >&5
9801   (exit "$ac_status"); }; }; then
9802   cf_cv_gnu_library_219=yes
9803 else
9804   echo "$as_me: failed program was:" >&5
9805 cat "conftest.$ac_ext" >&5
9806 cf_cv_gnu_library_219=no
9807 fi
9808 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9809                 CPPFLAGS="$cf_save"
9810
9811 fi
9812 echo "$as_me:9812: result: $cf_cv_gnu_library_219" >&5
9813 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
9814
9815         if test "x$cf_cv_gnu_library_219" = xyes; then
9816                 cf_save="$CPPFLAGS"
9817                 echo "$as_me:9817: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
9818 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
9819 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
9820   echo $ECHO_N "(cached) $ECHO_C" >&6
9821 else
9822
9823 cf_fix_cppflags=no
9824 cf_new_cflags=
9825 cf_new_cppflags=
9826 cf_new_extra_cppflags=
9827
9828 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
9829 do
9830 case "$cf_fix_cppflags" in
9831 (no)
9832         case "$cf_add_cflags" in
9833         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9834                 case "$cf_add_cflags" in
9835                 (-D*)
9836                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9837
9838                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9839                                 && test -z "${cf_tst_cflags}" \
9840                                 && cf_fix_cppflags=yes
9841
9842                         if test "$cf_fix_cppflags" = yes ; then
9843
9844         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9845         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9846
9847                                 continue
9848                         elif test "${cf_tst_cflags}" = "\"'" ; then
9849
9850         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9851         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9852
9853                                 continue
9854                         fi
9855                         ;;
9856                 esac
9857                 case "$CPPFLAGS" in
9858                 (*$cf_add_cflags)
9859                         ;;
9860                 (*)
9861                         case "$cf_add_cflags" in
9862                         (-D*)
9863                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9864
9865 CPPFLAGS=`echo "$CPPFLAGS" | \
9866         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9867                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9868
9869                                 ;;
9870                         esac
9871
9872         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9873         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9874
9875                         ;;
9876                 esac
9877                 ;;
9878         (*)
9879
9880         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9881         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9882
9883                 ;;
9884         esac
9885         ;;
9886 (yes)
9887
9888         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9889         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9890
9891         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9892
9893         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9894                 && test -z "${cf_tst_cflags}" \
9895                 && cf_fix_cppflags=no
9896         ;;
9897 esac
9898 done
9899
9900 if test -n "$cf_new_cflags" ; then
9901
9902         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9903         CFLAGS="${CFLAGS}$cf_new_cflags"
9904
9905 fi
9906
9907 if test -n "$cf_new_cppflags" ; then
9908
9909         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9910         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9911
9912 fi
9913
9914 if test -n "$cf_new_extra_cppflags" ; then
9915
9916         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9917         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9918
9919 fi
9920
9921                         cat >"conftest.$ac_ext" <<_ACEOF
9922 #line 9922 "configure"
9923 #include "confdefs.h"
9924
9925                                 #include <limits.h>
9926                                 #include <sys/types.h>
9927
9928 int
9929 main (void)
9930 {
9931
9932                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
9933                                         return 0;
9934                                 #else
9935                                 #       error GNU C library is too old
9936                                 #endif
9937   ;
9938   return 0;
9939 }
9940 _ACEOF
9941 rm -f "conftest.$ac_objext"
9942 if { (eval echo "$as_me:9942: \"$ac_compile\"") >&5
9943   (eval $ac_compile) 2>&5
9944   ac_status=$?
9945   echo "$as_me:9945: \$? = $ac_status" >&5
9946   (exit "$ac_status"); } &&
9947          { ac_try='test -s "conftest.$ac_objext"'
9948   { (eval echo "$as_me:9948: \"$ac_try\"") >&5
9949   (eval $ac_try) 2>&5
9950   ac_status=$?
9951   echo "$as_me:9951: \$? = $ac_status" >&5
9952   (exit "$ac_status"); }; }; then
9953   cf_cv_gnu_dftsrc_219=yes
9954 else
9955   echo "$as_me: failed program was:" >&5
9956 cat "conftest.$ac_ext" >&5
9957 cf_cv_gnu_dftsrc_219=no
9958 fi
9959 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9960
9961 fi
9962 echo "$as_me:9962: result: $cf_cv_gnu_dftsrc_219" >&5
9963 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
9964                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9965         else
9966                 cf_cv_gnu_dftsrc_219=maybe
9967         fi
9968
9969         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9970
9971                 echo "$as_me:9971: checking if we must define _GNU_SOURCE" >&5
9972 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9973 if test "${cf_cv_gnu_source+set}" = set; then
9974   echo $ECHO_N "(cached) $ECHO_C" >&6
9975 else
9976
9977                 cat >"conftest.$ac_ext" <<_ACEOF
9978 #line 9978 "configure"
9979 #include "confdefs.h"
9980 #include <sys/types.h>
9981 int
9982 main (void)
9983 {
9984
9985                         #ifndef _XOPEN_SOURCE
9986                         #error  expected _XOPEN_SOURCE to be defined
9987                         #endif
9988   ;
9989   return 0;
9990 }
9991 _ACEOF
9992 rm -f "conftest.$ac_objext"
9993 if { (eval echo "$as_me:9993: \"$ac_compile\"") >&5
9994   (eval $ac_compile) 2>&5
9995   ac_status=$?
9996   echo "$as_me:9996: \$? = $ac_status" >&5
9997   (exit "$ac_status"); } &&
9998          { ac_try='test -s "conftest.$ac_objext"'
9999   { (eval echo "$as_me:9999: \"$ac_try\"") >&5
10000   (eval $ac_try) 2>&5
10001   ac_status=$?
10002   echo "$as_me:10002: \$? = $ac_status" >&5
10003   (exit "$ac_status"); }; }; then
10004   cf_cv_gnu_source=no
10005 else
10006   echo "$as_me: failed program was:" >&5
10007 cat "conftest.$ac_ext" >&5
10008 cf_save="$CPPFLAGS"
10009
10010 cf_fix_cppflags=no
10011 cf_new_cflags=
10012 cf_new_cppflags=
10013 cf_new_extra_cppflags=
10014
10015 for cf_add_cflags in -D_GNU_SOURCE
10016 do
10017 case "$cf_fix_cppflags" in
10018 (no)
10019         case "$cf_add_cflags" in
10020         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10021                 case "$cf_add_cflags" in
10022                 (-D*)
10023                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10024
10025                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10026                                 && test -z "${cf_tst_cflags}" \
10027                                 && cf_fix_cppflags=yes
10028
10029                         if test "$cf_fix_cppflags" = yes ; then
10030
10031         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10032         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10033
10034                                 continue
10035                         elif test "${cf_tst_cflags}" = "\"'" ; then
10036
10037         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10038         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10039
10040                                 continue
10041                         fi
10042                         ;;
10043                 esac
10044                 case "$CPPFLAGS" in
10045                 (*$cf_add_cflags)
10046                         ;;
10047                 (*)
10048                         case "$cf_add_cflags" in
10049                         (-D*)
10050                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10051
10052 CPPFLAGS=`echo "$CPPFLAGS" | \
10053         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10054                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10055
10056                                 ;;
10057                         esac
10058
10059         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10060         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10061
10062                         ;;
10063                 esac
10064                 ;;
10065         (*)
10066
10067         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10068         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10069
10070                 ;;
10071         esac
10072         ;;
10073 (yes)
10074
10075         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10076         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10077
10078         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10079
10080         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10081                 && test -z "${cf_tst_cflags}" \
10082                 && cf_fix_cppflags=no
10083         ;;
10084 esac
10085 done
10086
10087 if test -n "$cf_new_cflags" ; then
10088
10089         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10090         CFLAGS="${CFLAGS}$cf_new_cflags"
10091
10092 fi
10093
10094 if test -n "$cf_new_cppflags" ; then
10095
10096         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10097         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10098
10099 fi
10100
10101 if test -n "$cf_new_extra_cppflags" ; then
10102
10103         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10104         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10105
10106 fi
10107
10108                          cat >"conftest.$ac_ext" <<_ACEOF
10109 #line 10109 "configure"
10110 #include "confdefs.h"
10111 #include <sys/types.h>
10112 int
10113 main (void)
10114 {
10115
10116                                 #ifdef _XOPEN_SOURCE
10117                                 #error  expected _XOPEN_SOURCE to be undefined
10118                                 #endif
10119   ;
10120   return 0;
10121 }
10122 _ACEOF
10123 rm -f "conftest.$ac_objext"
10124 if { (eval echo "$as_me:10124: \"$ac_compile\"") >&5
10125   (eval $ac_compile) 2>&5
10126   ac_status=$?
10127   echo "$as_me:10127: \$? = $ac_status" >&5
10128   (exit "$ac_status"); } &&
10129          { ac_try='test -s "conftest.$ac_objext"'
10130   { (eval echo "$as_me:10130: \"$ac_try\"") >&5
10131   (eval $ac_try) 2>&5
10132   ac_status=$?
10133   echo "$as_me:10133: \$? = $ac_status" >&5
10134   (exit "$ac_status"); }; }; then
10135   cf_cv_gnu_source=no
10136 else
10137   echo "$as_me: failed program was:" >&5
10138 cat "conftest.$ac_ext" >&5
10139 cf_cv_gnu_source=yes
10140 fi
10141 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10142                         CPPFLAGS="$cf_save"
10143
10144 fi
10145 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10146
10147 fi
10148 echo "$as_me:10148: result: $cf_cv_gnu_source" >&5
10149 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10150
10151                 if test "$cf_cv_gnu_source" = yes
10152                 then
10153                 echo "$as_me:10153: checking if we should also define _DEFAULT_SOURCE" >&5
10154 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10155 if test "${cf_cv_default_source+set}" = set; then
10156   echo $ECHO_N "(cached) $ECHO_C" >&6
10157 else
10158
10159         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10160         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10161
10162                         cat >"conftest.$ac_ext" <<_ACEOF
10163 #line 10163 "configure"
10164 #include "confdefs.h"
10165 #include <sys/types.h>
10166 int
10167 main (void)
10168 {
10169
10170                                 #ifdef _DEFAULT_SOURCE
10171                                 #error  expected _DEFAULT_SOURCE to be undefined
10172                                 #endif
10173   ;
10174   return 0;
10175 }
10176 _ACEOF
10177 rm -f "conftest.$ac_objext"
10178 if { (eval echo "$as_me:10178: \"$ac_compile\"") >&5
10179   (eval $ac_compile) 2>&5
10180   ac_status=$?
10181   echo "$as_me:10181: \$? = $ac_status" >&5
10182   (exit "$ac_status"); } &&
10183          { ac_try='test -s "conftest.$ac_objext"'
10184   { (eval echo "$as_me:10184: \"$ac_try\"") >&5
10185   (eval $ac_try) 2>&5
10186   ac_status=$?
10187   echo "$as_me:10187: \$? = $ac_status" >&5
10188   (exit "$ac_status"); }; }; then
10189   cf_cv_default_source=no
10190 else
10191   echo "$as_me: failed program was:" >&5
10192 cat "conftest.$ac_ext" >&5
10193 cf_cv_default_source=yes
10194 fi
10195 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10196
10197 fi
10198 echo "$as_me:10198: result: $cf_cv_default_source" >&5
10199 echo "${ECHO_T}$cf_cv_default_source" >&6
10200                         if test "$cf_cv_default_source" = yes
10201                         then
10202
10203         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10204         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10205
10206                         fi
10207                 fi
10208         fi
10209
10210 fi
10211
10212         ;;
10213 (minix*)
10214         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10215         ;;
10216 (mirbsd*)
10217         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10218         cf_XOPEN_SOURCE=
10219
10220 if test "$cf_cv_posix_visible" = no; then
10221
10222 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10223
10224 cf_save_CFLAGS="$CFLAGS"
10225 cf_save_CPPFLAGS="$CPPFLAGS"
10226
10227 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10228         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10229                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10230
10231 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10232         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10233                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10234
10235 echo "$as_me:10235: checking if we should define _POSIX_C_SOURCE" >&5
10236 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10237 if test "${cf_cv_posix_c_source+set}" = set; then
10238   echo $ECHO_N "(cached) $ECHO_C" >&6
10239 else
10240
10241 echo "${as_me:-configure}:10241: testing if the symbol is already defined go no further ..." 1>&5
10242
10243         cat >"conftest.$ac_ext" <<_ACEOF
10244 #line 10244 "configure"
10245 #include "confdefs.h"
10246 #include <sys/types.h>
10247 int
10248 main (void)
10249 {
10250
10251 #ifndef _POSIX_C_SOURCE
10252 make an error
10253 #endif
10254   ;
10255   return 0;
10256 }
10257 _ACEOF
10258 rm -f "conftest.$ac_objext"
10259 if { (eval echo "$as_me:10259: \"$ac_compile\"") >&5
10260   (eval $ac_compile) 2>&5
10261   ac_status=$?
10262   echo "$as_me:10262: \$? = $ac_status" >&5
10263   (exit "$ac_status"); } &&
10264          { ac_try='test -s "conftest.$ac_objext"'
10265   { (eval echo "$as_me:10265: \"$ac_try\"") >&5
10266   (eval $ac_try) 2>&5
10267   ac_status=$?
10268   echo "$as_me:10268: \$? = $ac_status" >&5
10269   (exit "$ac_status"); }; }; then
10270   cf_cv_posix_c_source=no
10271 else
10272   echo "$as_me: failed program was:" >&5
10273 cat "conftest.$ac_ext" >&5
10274 cf_want_posix_source=no
10275          case .$cf_POSIX_C_SOURCE in
10276          (.[12]??*)
10277                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10278                 ;;
10279          (.2)
10280                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10281                 cf_want_posix_source=yes
10282                 ;;
10283          (.*)
10284                 cf_want_posix_source=yes
10285                 ;;
10286          esac
10287          if test "$cf_want_posix_source" = yes ; then
10288                 cat >"conftest.$ac_ext" <<_ACEOF
10289 #line 10289 "configure"
10290 #include "confdefs.h"
10291 #include <sys/types.h>
10292 int
10293 main (void)
10294 {
10295
10296 #ifdef _POSIX_SOURCE
10297 make an error
10298 #endif
10299   ;
10300   return 0;
10301 }
10302 _ACEOF
10303 rm -f "conftest.$ac_objext"
10304 if { (eval echo "$as_me:10304: \"$ac_compile\"") >&5
10305   (eval $ac_compile) 2>&5
10306   ac_status=$?
10307   echo "$as_me:10307: \$? = $ac_status" >&5
10308   (exit "$ac_status"); } &&
10309          { ac_try='test -s "conftest.$ac_objext"'
10310   { (eval echo "$as_me:10310: \"$ac_try\"") >&5
10311   (eval $ac_try) 2>&5
10312   ac_status=$?
10313   echo "$as_me:10313: \$? = $ac_status" >&5
10314   (exit "$ac_status"); }; }; then
10315   :
10316 else
10317   echo "$as_me: failed program was:" >&5
10318 cat "conftest.$ac_ext" >&5
10319 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10320 fi
10321 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10322          fi
10323
10324 echo "${as_me:-configure}:10324: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10325
10326          CFLAGS="$cf_trim_CFLAGS"
10327          CPPFLAGS="$cf_trim_CPPFLAGS"
10328
10329         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10330         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10331
10332 echo "${as_me:-configure}:10332: testing if the second compile does not leave our definition intact error ..." 1>&5
10333
10334          cat >"conftest.$ac_ext" <<_ACEOF
10335 #line 10335 "configure"
10336 #include "confdefs.h"
10337 #include <sys/types.h>
10338 int
10339 main (void)
10340 {
10341
10342 #ifndef _POSIX_C_SOURCE
10343 make an error
10344 #endif
10345   ;
10346   return 0;
10347 }
10348 _ACEOF
10349 rm -f "conftest.$ac_objext"
10350 if { (eval echo "$as_me:10350: \"$ac_compile\"") >&5
10351   (eval $ac_compile) 2>&5
10352   ac_status=$?
10353   echo "$as_me:10353: \$? = $ac_status" >&5
10354   (exit "$ac_status"); } &&
10355          { ac_try='test -s "conftest.$ac_objext"'
10356   { (eval echo "$as_me:10356: \"$ac_try\"") >&5
10357   (eval $ac_try) 2>&5
10358   ac_status=$?
10359   echo "$as_me:10359: \$? = $ac_status" >&5
10360   (exit "$ac_status"); }; }; then
10361   :
10362 else
10363   echo "$as_me: failed program was:" >&5
10364 cat "conftest.$ac_ext" >&5
10365 cf_cv_posix_c_source=no
10366 fi
10367 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10368          CFLAGS="$cf_save_CFLAGS"
10369          CPPFLAGS="$cf_save_CPPFLAGS"
10370
10371 fi
10372 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10373
10374 fi
10375 echo "$as_me:10375: result: $cf_cv_posix_c_source" >&5
10376 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10377
10378 if test "$cf_cv_posix_c_source" != no ; then
10379         CFLAGS="$cf_trim_CFLAGS"
10380         CPPFLAGS="$cf_trim_CPPFLAGS"
10381
10382 cf_fix_cppflags=no
10383 cf_new_cflags=
10384 cf_new_cppflags=
10385 cf_new_extra_cppflags=
10386
10387 for cf_add_cflags in $cf_cv_posix_c_source
10388 do
10389 case "$cf_fix_cppflags" in
10390 (no)
10391         case "$cf_add_cflags" in
10392         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10393                 case "$cf_add_cflags" in
10394                 (-D*)
10395                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10396
10397                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10398                                 && test -z "${cf_tst_cflags}" \
10399                                 && cf_fix_cppflags=yes
10400
10401                         if test "$cf_fix_cppflags" = yes ; then
10402
10403         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10404         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10405
10406                                 continue
10407                         elif test "${cf_tst_cflags}" = "\"'" ; then
10408
10409         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10410         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10411
10412                                 continue
10413                         fi
10414                         ;;
10415                 esac
10416                 case "$CPPFLAGS" in
10417                 (*$cf_add_cflags)
10418                         ;;
10419                 (*)
10420                         case "$cf_add_cflags" in
10421                         (-D*)
10422                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10423
10424 CPPFLAGS=`echo "$CPPFLAGS" | \
10425         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10426                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10427
10428                                 ;;
10429                         esac
10430
10431         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10432         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10433
10434                         ;;
10435                 esac
10436                 ;;
10437         (*)
10438
10439         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10440         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10441
10442                 ;;
10443         esac
10444         ;;
10445 (yes)
10446
10447         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10448         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10449
10450         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10451
10452         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10453                 && test -z "${cf_tst_cflags}" \
10454                 && cf_fix_cppflags=no
10455         ;;
10456 esac
10457 done
10458
10459 if test -n "$cf_new_cflags" ; then
10460
10461         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10462         CFLAGS="${CFLAGS}$cf_new_cflags"
10463
10464 fi
10465
10466 if test -n "$cf_new_cppflags" ; then
10467
10468         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10469         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10470
10471 fi
10472
10473 if test -n "$cf_new_extra_cppflags" ; then
10474
10475         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10476         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10477
10478 fi
10479
10480 fi
10481
10482 fi # cf_cv_posix_visible
10483
10484         ;;
10485 (netbsd*)
10486         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10487         ;;
10488 (openbsd[6-9]*)
10489         # OpenBSD 6.x has broken locale support, both compile-time and runtime.
10490         # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
10491         # Abusing the conformance level is a workaround.
10492         { echo "$as_me:10492: WARNING: this system does not provide usable locale support" >&5
10493 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
10494         cf_xopen_source="-D_BSD_SOURCE"
10495         cf_XOPEN_SOURCE=700
10496         ;;
10497 (openbsd[4-5]*)
10498         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10499         cf_xopen_source="-D_BSD_SOURCE"
10500         cf_XOPEN_SOURCE=600
10501         ;;
10502 (openbsd*)
10503         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10504         ;;
10505 (osf[45]*)
10506         cf_xopen_source="-D_OSF_SOURCE"
10507         ;;
10508 (nto-qnx*)
10509         cf_xopen_source="-D_QNX_SOURCE"
10510         ;;
10511 (sco*)
10512         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10513         ;;
10514 (solaris2.*)
10515         cf_xopen_source="-D__EXTENSIONS__"
10516         cf_cv_xopen_source=broken
10517         ;;
10518 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10519         cf_XOPEN_SOURCE=
10520         cf_POSIX_C_SOURCE=
10521         ;;
10522 (*)
10523
10524 echo "$as_me:10524: checking if we should define _XOPEN_SOURCE" >&5
10525 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10526 if test "${cf_cv_xopen_source+set}" = set; then
10527   echo $ECHO_N "(cached) $ECHO_C" >&6
10528 else
10529
10530         cat >"conftest.$ac_ext" <<_ACEOF
10531 #line 10531 "configure"
10532 #include "confdefs.h"
10533
10534 #include <stdlib.h>
10535 #include <string.h>
10536 #include <sys/types.h>
10537
10538 int
10539 main (void)
10540 {
10541
10542 #ifndef _XOPEN_SOURCE
10543 make an error
10544 #endif
10545   ;
10546   return 0;
10547 }
10548 _ACEOF
10549 rm -f "conftest.$ac_objext"
10550 if { (eval echo "$as_me:10550: \"$ac_compile\"") >&5
10551   (eval $ac_compile) 2>&5
10552   ac_status=$?
10553   echo "$as_me:10553: \$? = $ac_status" >&5
10554   (exit "$ac_status"); } &&
10555          { ac_try='test -s "conftest.$ac_objext"'
10556   { (eval echo "$as_me:10556: \"$ac_try\"") >&5
10557   (eval $ac_try) 2>&5
10558   ac_status=$?
10559   echo "$as_me:10559: \$? = $ac_status" >&5
10560   (exit "$ac_status"); }; }; then
10561   cf_cv_xopen_source=no
10562 else
10563   echo "$as_me: failed program was:" >&5
10564 cat "conftest.$ac_ext" >&5
10565 cf_save="$CPPFLAGS"
10566
10567         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10568         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10569
10570          cat >"conftest.$ac_ext" <<_ACEOF
10571 #line 10571 "configure"
10572 #include "confdefs.h"
10573
10574 #include <stdlib.h>
10575 #include <string.h>
10576 #include <sys/types.h>
10577
10578 int
10579 main (void)
10580 {
10581
10582 #ifdef _XOPEN_SOURCE
10583 make an error
10584 #endif
10585   ;
10586   return 0;
10587 }
10588 _ACEOF
10589 rm -f "conftest.$ac_objext"
10590 if { (eval echo "$as_me:10590: \"$ac_compile\"") >&5
10591   (eval $ac_compile) 2>&5
10592   ac_status=$?
10593   echo "$as_me:10593: \$? = $ac_status" >&5
10594   (exit "$ac_status"); } &&
10595          { ac_try='test -s "conftest.$ac_objext"'
10596   { (eval echo "$as_me:10596: \"$ac_try\"") >&5
10597   (eval $ac_try) 2>&5
10598   ac_status=$?
10599   echo "$as_me:10599: \$? = $ac_status" >&5
10600   (exit "$ac_status"); }; }; then
10601   cf_cv_xopen_source=no
10602 else
10603   echo "$as_me: failed program was:" >&5
10604 cat "conftest.$ac_ext" >&5
10605 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10606 fi
10607 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10608         CPPFLAGS="$cf_save"
10609
10610 fi
10611 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10612
10613 fi
10614 echo "$as_me:10614: result: $cf_cv_xopen_source" >&5
10615 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10616
10617 if test "$cf_cv_xopen_source" != no ; then
10618
10619 CFLAGS=`echo "$CFLAGS" | \
10620         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10621                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10622
10623 CPPFLAGS=`echo "$CPPFLAGS" | \
10624         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10625                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10626
10627         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10628
10629 cf_fix_cppflags=no
10630 cf_new_cflags=
10631 cf_new_cppflags=
10632 cf_new_extra_cppflags=
10633
10634 for cf_add_cflags in $cf_temp_xopen_source
10635 do
10636 case "$cf_fix_cppflags" in
10637 (no)
10638         case "$cf_add_cflags" in
10639         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10640                 case "$cf_add_cflags" in
10641                 (-D*)
10642                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10643
10644                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10645                                 && test -z "${cf_tst_cflags}" \
10646                                 && cf_fix_cppflags=yes
10647
10648                         if test "$cf_fix_cppflags" = yes ; then
10649
10650         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10651         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10652
10653                                 continue
10654                         elif test "${cf_tst_cflags}" = "\"'" ; then
10655
10656         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10657         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10658
10659                                 continue
10660                         fi
10661                         ;;
10662                 esac
10663                 case "$CPPFLAGS" in
10664                 (*$cf_add_cflags)
10665                         ;;
10666                 (*)
10667                         case "$cf_add_cflags" in
10668                         (-D*)
10669                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10670
10671 CPPFLAGS=`echo "$CPPFLAGS" | \
10672         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10673                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10674
10675                                 ;;
10676                         esac
10677
10678         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10679         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10680
10681                         ;;
10682                 esac
10683                 ;;
10684         (*)
10685
10686         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10687         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10688
10689                 ;;
10690         esac
10691         ;;
10692 (yes)
10693
10694         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10695         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10696
10697         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10698
10699         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10700                 && test -z "${cf_tst_cflags}" \
10701                 && cf_fix_cppflags=no
10702         ;;
10703 esac
10704 done
10705
10706 if test -n "$cf_new_cflags" ; then
10707
10708         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10709         CFLAGS="${CFLAGS}$cf_new_cflags"
10710
10711 fi
10712
10713 if test -n "$cf_new_cppflags" ; then
10714
10715         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10716         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10717
10718 fi
10719
10720 if test -n "$cf_new_extra_cppflags" ; then
10721
10722         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10723         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10724
10725 fi
10726
10727 fi
10728
10729 if test "$cf_cv_posix_visible" = no; then
10730
10731 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10732
10733 cf_save_CFLAGS="$CFLAGS"
10734 cf_save_CPPFLAGS="$CPPFLAGS"
10735
10736 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10737         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10738                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10739
10740 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10741         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10742                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10743
10744 echo "$as_me:10744: checking if we should define _POSIX_C_SOURCE" >&5
10745 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10746 if test "${cf_cv_posix_c_source+set}" = set; then
10747   echo $ECHO_N "(cached) $ECHO_C" >&6
10748 else
10749
10750 echo "${as_me:-configure}:10750: testing if the symbol is already defined go no further ..." 1>&5
10751
10752         cat >"conftest.$ac_ext" <<_ACEOF
10753 #line 10753 "configure"
10754 #include "confdefs.h"
10755 #include <sys/types.h>
10756 int
10757 main (void)
10758 {
10759
10760 #ifndef _POSIX_C_SOURCE
10761 make an error
10762 #endif
10763   ;
10764   return 0;
10765 }
10766 _ACEOF
10767 rm -f "conftest.$ac_objext"
10768 if { (eval echo "$as_me:10768: \"$ac_compile\"") >&5
10769   (eval $ac_compile) 2>&5
10770   ac_status=$?
10771   echo "$as_me:10771: \$? = $ac_status" >&5
10772   (exit "$ac_status"); } &&
10773          { ac_try='test -s "conftest.$ac_objext"'
10774   { (eval echo "$as_me:10774: \"$ac_try\"") >&5
10775   (eval $ac_try) 2>&5
10776   ac_status=$?
10777   echo "$as_me:10777: \$? = $ac_status" >&5
10778   (exit "$ac_status"); }; }; then
10779   cf_cv_posix_c_source=no
10780 else
10781   echo "$as_me: failed program was:" >&5
10782 cat "conftest.$ac_ext" >&5
10783 cf_want_posix_source=no
10784          case .$cf_POSIX_C_SOURCE in
10785          (.[12]??*)
10786                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10787                 ;;
10788          (.2)
10789                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10790                 cf_want_posix_source=yes
10791                 ;;
10792          (.*)
10793                 cf_want_posix_source=yes
10794                 ;;
10795          esac
10796          if test "$cf_want_posix_source" = yes ; then
10797                 cat >"conftest.$ac_ext" <<_ACEOF
10798 #line 10798 "configure"
10799 #include "confdefs.h"
10800 #include <sys/types.h>
10801 int
10802 main (void)
10803 {
10804
10805 #ifdef _POSIX_SOURCE
10806 make an error
10807 #endif
10808   ;
10809   return 0;
10810 }
10811 _ACEOF
10812 rm -f "conftest.$ac_objext"
10813 if { (eval echo "$as_me:10813: \"$ac_compile\"") >&5
10814   (eval $ac_compile) 2>&5
10815   ac_status=$?
10816   echo "$as_me:10816: \$? = $ac_status" >&5
10817   (exit "$ac_status"); } &&
10818          { ac_try='test -s "conftest.$ac_objext"'
10819   { (eval echo "$as_me:10819: \"$ac_try\"") >&5
10820   (eval $ac_try) 2>&5
10821   ac_status=$?
10822   echo "$as_me:10822: \$? = $ac_status" >&5
10823   (exit "$ac_status"); }; }; then
10824   :
10825 else
10826   echo "$as_me: failed program was:" >&5
10827 cat "conftest.$ac_ext" >&5
10828 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10829 fi
10830 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10831          fi
10832
10833 echo "${as_me:-configure}:10833: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10834
10835          CFLAGS="$cf_trim_CFLAGS"
10836          CPPFLAGS="$cf_trim_CPPFLAGS"
10837
10838         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10839         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10840
10841 echo "${as_me:-configure}:10841: testing if the second compile does not leave our definition intact error ..." 1>&5
10842
10843          cat >"conftest.$ac_ext" <<_ACEOF
10844 #line 10844 "configure"
10845 #include "confdefs.h"
10846 #include <sys/types.h>
10847 int
10848 main (void)
10849 {
10850
10851 #ifndef _POSIX_C_SOURCE
10852 make an error
10853 #endif
10854   ;
10855   return 0;
10856 }
10857 _ACEOF
10858 rm -f "conftest.$ac_objext"
10859 if { (eval echo "$as_me:10859: \"$ac_compile\"") >&5
10860   (eval $ac_compile) 2>&5
10861   ac_status=$?
10862   echo "$as_me:10862: \$? = $ac_status" >&5
10863   (exit "$ac_status"); } &&
10864          { ac_try='test -s "conftest.$ac_objext"'
10865   { (eval echo "$as_me:10865: \"$ac_try\"") >&5
10866   (eval $ac_try) 2>&5
10867   ac_status=$?
10868   echo "$as_me:10868: \$? = $ac_status" >&5
10869   (exit "$ac_status"); }; }; then
10870   :
10871 else
10872   echo "$as_me: failed program was:" >&5
10873 cat "conftest.$ac_ext" >&5
10874 cf_cv_posix_c_source=no
10875 fi
10876 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10877          CFLAGS="$cf_save_CFLAGS"
10878          CPPFLAGS="$cf_save_CPPFLAGS"
10879
10880 fi
10881 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10882
10883 fi
10884 echo "$as_me:10884: result: $cf_cv_posix_c_source" >&5
10885 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10886
10887 if test "$cf_cv_posix_c_source" != no ; then
10888         CFLAGS="$cf_trim_CFLAGS"
10889         CPPFLAGS="$cf_trim_CPPFLAGS"
10890
10891 cf_fix_cppflags=no
10892 cf_new_cflags=
10893 cf_new_cppflags=
10894 cf_new_extra_cppflags=
10895
10896 for cf_add_cflags in $cf_cv_posix_c_source
10897 do
10898 case "$cf_fix_cppflags" in
10899 (no)
10900         case "$cf_add_cflags" in
10901         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10902                 case "$cf_add_cflags" in
10903                 (-D*)
10904                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10905
10906                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10907                                 && test -z "${cf_tst_cflags}" \
10908                                 && cf_fix_cppflags=yes
10909
10910                         if test "$cf_fix_cppflags" = yes ; then
10911
10912         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10913         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10914
10915                                 continue
10916                         elif test "${cf_tst_cflags}" = "\"'" ; then
10917
10918         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10919         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10920
10921                                 continue
10922                         fi
10923                         ;;
10924                 esac
10925                 case "$CPPFLAGS" in
10926                 (*$cf_add_cflags)
10927                         ;;
10928                 (*)
10929                         case "$cf_add_cflags" in
10930                         (-D*)
10931                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10932
10933 CPPFLAGS=`echo "$CPPFLAGS" | \
10934         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10935                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10936
10937                                 ;;
10938                         esac
10939
10940         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10941         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10942
10943                         ;;
10944                 esac
10945                 ;;
10946         (*)
10947
10948         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10949         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10950
10951                 ;;
10952         esac
10953         ;;
10954 (yes)
10955
10956         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10957         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10958
10959         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10960
10961         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10962                 && test -z "${cf_tst_cflags}" \
10963                 && cf_fix_cppflags=no
10964         ;;
10965 esac
10966 done
10967
10968 if test -n "$cf_new_cflags" ; then
10969
10970         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10971         CFLAGS="${CFLAGS}$cf_new_cflags"
10972
10973 fi
10974
10975 if test -n "$cf_new_cppflags" ; then
10976
10977         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10978         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10979
10980 fi
10981
10982 if test -n "$cf_new_extra_cppflags" ; then
10983
10984         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10985         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10986
10987 fi
10988
10989 fi
10990
10991 fi # cf_cv_posix_visible
10992
10993         ;;
10994 esac
10995
10996 if test -n "$cf_xopen_source" ; then
10997
10998 cf_fix_cppflags=no
10999 cf_new_cflags=
11000 cf_new_cppflags=
11001 cf_new_extra_cppflags=
11002
11003 for cf_add_cflags in $cf_xopen_source
11004 do
11005 case "$cf_fix_cppflags" in
11006 (no)
11007         case "$cf_add_cflags" in
11008         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11009                 case "$cf_add_cflags" in
11010                 (-D*)
11011                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11012
11013                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11014                                 && test -z "${cf_tst_cflags}" \
11015                                 && cf_fix_cppflags=yes
11016
11017                         if test "$cf_fix_cppflags" = yes ; then
11018
11019         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11020         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11021
11022                                 continue
11023                         elif test "${cf_tst_cflags}" = "\"'" ; then
11024
11025         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11026         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11027
11028                                 continue
11029                         fi
11030                         ;;
11031                 esac
11032                 case "$CPPFLAGS" in
11033                 (*$cf_add_cflags)
11034                         ;;
11035                 (*)
11036                         case "$cf_add_cflags" in
11037                         (-D*)
11038                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11039
11040 CPPFLAGS=`echo "$CPPFLAGS" | \
11041         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11042                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11043
11044                                 ;;
11045                         esac
11046
11047         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11048         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11049
11050                         ;;
11051                 esac
11052                 ;;
11053         (*)
11054
11055         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11056         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11057
11058                 ;;
11059         esac
11060         ;;
11061 (yes)
11062
11063         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11064         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11065
11066         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11067
11068         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11069                 && test -z "${cf_tst_cflags}" \
11070                 && cf_fix_cppflags=no
11071         ;;
11072 esac
11073 done
11074
11075 if test -n "$cf_new_cflags" ; then
11076         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11077
11078 echo "${as_me:-configure}:11078: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11079
11080         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11081         CFLAGS="${CFLAGS}$cf_new_cflags"
11082
11083 fi
11084
11085 if test -n "$cf_new_cppflags" ; then
11086         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11087
11088 echo "${as_me:-configure}:11088: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11089
11090         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11091         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11092
11093 fi
11094
11095 if test -n "$cf_new_extra_cppflags" ; then
11096         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11097
11098 echo "${as_me:-configure}:11098: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11099
11100         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11101         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11102
11103 fi
11104
11105 fi
11106
11107 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11108         echo "$as_me:11108: checking if _XOPEN_SOURCE really is set" >&5
11109 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11110         cat >"conftest.$ac_ext" <<_ACEOF
11111 #line 11111 "configure"
11112 #include "confdefs.h"
11113 #include <stdlib.h>
11114 int
11115 main (void)
11116 {
11117
11118 #ifndef _XOPEN_SOURCE
11119 make an error
11120 #endif
11121   ;
11122   return 0;
11123 }
11124 _ACEOF
11125 rm -f "conftest.$ac_objext"
11126 if { (eval echo "$as_me:11126: \"$ac_compile\"") >&5
11127   (eval $ac_compile) 2>&5
11128   ac_status=$?
11129   echo "$as_me:11129: \$? = $ac_status" >&5
11130   (exit "$ac_status"); } &&
11131          { ac_try='test -s "conftest.$ac_objext"'
11132   { (eval echo "$as_me:11132: \"$ac_try\"") >&5
11133   (eval $ac_try) 2>&5
11134   ac_status=$?
11135   echo "$as_me:11135: \$? = $ac_status" >&5
11136   (exit "$ac_status"); }; }; then
11137   cf_XOPEN_SOURCE_set=yes
11138 else
11139   echo "$as_me: failed program was:" >&5
11140 cat "conftest.$ac_ext" >&5
11141 cf_XOPEN_SOURCE_set=no
11142 fi
11143 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11144         echo "$as_me:11144: result: $cf_XOPEN_SOURCE_set" >&5
11145 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11146         if test "$cf_XOPEN_SOURCE_set" = yes
11147         then
11148                 cat >"conftest.$ac_ext" <<_ACEOF
11149 #line 11149 "configure"
11150 #include "confdefs.h"
11151 #include <stdlib.h>
11152 int
11153 main (void)
11154 {
11155
11156 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11157 make an error
11158 #endif
11159   ;
11160   return 0;
11161 }
11162 _ACEOF
11163 rm -f "conftest.$ac_objext"
11164 if { (eval echo "$as_me:11164: \"$ac_compile\"") >&5
11165   (eval $ac_compile) 2>&5
11166   ac_status=$?
11167   echo "$as_me:11167: \$? = $ac_status" >&5
11168   (exit "$ac_status"); } &&
11169          { ac_try='test -s "conftest.$ac_objext"'
11170   { (eval echo "$as_me:11170: \"$ac_try\"") >&5
11171   (eval $ac_try) 2>&5
11172   ac_status=$?
11173   echo "$as_me:11173: \$? = $ac_status" >&5
11174   (exit "$ac_status"); }; }; then
11175   cf_XOPEN_SOURCE_set_ok=yes
11176 else
11177   echo "$as_me: failed program was:" >&5
11178 cat "conftest.$ac_ext" >&5
11179 cf_XOPEN_SOURCE_set_ok=no
11180 fi
11181 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11182                 if test "$cf_XOPEN_SOURCE_set_ok" = no
11183                 then
11184                         { echo "$as_me:11184: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11185 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11186                 fi
11187         else
11188
11189 echo "$as_me:11189: checking if we should define _XOPEN_SOURCE" >&5
11190 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11191 if test "${cf_cv_xopen_source+set}" = set; then
11192   echo $ECHO_N "(cached) $ECHO_C" >&6
11193 else
11194
11195         cat >"conftest.$ac_ext" <<_ACEOF
11196 #line 11196 "configure"
11197 #include "confdefs.h"
11198
11199 #include <stdlib.h>
11200 #include <string.h>
11201 #include <sys/types.h>
11202
11203 int
11204 main (void)
11205 {
11206
11207 #ifndef _XOPEN_SOURCE
11208 make an error
11209 #endif
11210   ;
11211   return 0;
11212 }
11213 _ACEOF
11214 rm -f "conftest.$ac_objext"
11215 if { (eval echo "$as_me:11215: \"$ac_compile\"") >&5
11216   (eval $ac_compile) 2>&5
11217   ac_status=$?
11218   echo "$as_me:11218: \$? = $ac_status" >&5
11219   (exit "$ac_status"); } &&
11220          { ac_try='test -s "conftest.$ac_objext"'
11221   { (eval echo "$as_me:11221: \"$ac_try\"") >&5
11222   (eval $ac_try) 2>&5
11223   ac_status=$?
11224   echo "$as_me:11224: \$? = $ac_status" >&5
11225   (exit "$ac_status"); }; }; then
11226   cf_cv_xopen_source=no
11227 else
11228   echo "$as_me: failed program was:" >&5
11229 cat "conftest.$ac_ext" >&5
11230 cf_save="$CPPFLAGS"
11231
11232         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11233         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11234
11235          cat >"conftest.$ac_ext" <<_ACEOF
11236 #line 11236 "configure"
11237 #include "confdefs.h"
11238
11239 #include <stdlib.h>
11240 #include <string.h>
11241 #include <sys/types.h>
11242
11243 int
11244 main (void)
11245 {
11246
11247 #ifdef _XOPEN_SOURCE
11248 make an error
11249 #endif
11250   ;
11251   return 0;
11252 }
11253 _ACEOF
11254 rm -f "conftest.$ac_objext"
11255 if { (eval echo "$as_me:11255: \"$ac_compile\"") >&5
11256   (eval $ac_compile) 2>&5
11257   ac_status=$?
11258   echo "$as_me:11258: \$? = $ac_status" >&5
11259   (exit "$ac_status"); } &&
11260          { ac_try='test -s "conftest.$ac_objext"'
11261   { (eval echo "$as_me:11261: \"$ac_try\"") >&5
11262   (eval $ac_try) 2>&5
11263   ac_status=$?
11264   echo "$as_me:11264: \$? = $ac_status" >&5
11265   (exit "$ac_status"); }; }; then
11266   cf_cv_xopen_source=no
11267 else
11268   echo "$as_me: failed program was:" >&5
11269 cat "conftest.$ac_ext" >&5
11270 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11271 fi
11272 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11273         CPPFLAGS="$cf_save"
11274
11275 fi
11276 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11277
11278 fi
11279 echo "$as_me:11279: result: $cf_cv_xopen_source" >&5
11280 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11281
11282 if test "$cf_cv_xopen_source" != no ; then
11283
11284 CFLAGS=`echo "$CFLAGS" | \
11285         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11286                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11287
11288 CPPFLAGS=`echo "$CPPFLAGS" | \
11289         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11290                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11291
11292         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11293
11294 cf_fix_cppflags=no
11295 cf_new_cflags=
11296 cf_new_cppflags=
11297 cf_new_extra_cppflags=
11298
11299 for cf_add_cflags in $cf_temp_xopen_source
11300 do
11301 case "$cf_fix_cppflags" in
11302 (no)
11303         case "$cf_add_cflags" in
11304         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11305                 case "$cf_add_cflags" in
11306                 (-D*)
11307                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11308
11309                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11310                                 && test -z "${cf_tst_cflags}" \
11311                                 && cf_fix_cppflags=yes
11312
11313                         if test "$cf_fix_cppflags" = yes ; then
11314
11315         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11316         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11317
11318                                 continue
11319                         elif test "${cf_tst_cflags}" = "\"'" ; then
11320
11321         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11322         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11323
11324                                 continue
11325                         fi
11326                         ;;
11327                 esac
11328                 case "$CPPFLAGS" in
11329                 (*$cf_add_cflags)
11330                         ;;
11331                 (*)
11332                         case "$cf_add_cflags" in
11333                         (-D*)
11334                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11335
11336 CPPFLAGS=`echo "$CPPFLAGS" | \
11337         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11338                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11339
11340                                 ;;
11341                         esac
11342
11343         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11344         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11345
11346                         ;;
11347                 esac
11348                 ;;
11349         (*)
11350
11351         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11352         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11353
11354                 ;;
11355         esac
11356         ;;
11357 (yes)
11358
11359         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11360         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11361
11362         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11363
11364         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11365                 && test -z "${cf_tst_cflags}" \
11366                 && cf_fix_cppflags=no
11367         ;;
11368 esac
11369 done
11370
11371 if test -n "$cf_new_cflags" ; then
11372
11373         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11374         CFLAGS="${CFLAGS}$cf_new_cflags"
11375
11376 fi
11377
11378 if test -n "$cf_new_cppflags" ; then
11379
11380         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11381         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11382
11383 fi
11384
11385 if test -n "$cf_new_extra_cppflags" ; then
11386
11387         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11388         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11389
11390 fi
11391
11392 fi
11393
11394         fi
11395 fi
11396 fi # cf_cv_posix_visible
11397
11398 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11399
11400 # Work around breakage on OS X
11401
11402 echo "$as_me:11402: checking if SIGWINCH is defined" >&5
11403 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11404 if test "${cf_cv_define_sigwinch+set}" = set; then
11405   echo $ECHO_N "(cached) $ECHO_C" >&6
11406 else
11407
11408         cat >"conftest.$ac_ext" <<_ACEOF
11409 #line 11409 "configure"
11410 #include "confdefs.h"
11411
11412 #include <sys/types.h>
11413 #include <sys/signal.h>
11414
11415 int
11416 main (void)
11417 {
11418 int x = SIGWINCH; (void)x
11419   ;
11420   return 0;
11421 }
11422 _ACEOF
11423 rm -f "conftest.$ac_objext"
11424 if { (eval echo "$as_me:11424: \"$ac_compile\"") >&5
11425   (eval $ac_compile) 2>&5
11426   ac_status=$?
11427   echo "$as_me:11427: \$? = $ac_status" >&5
11428   (exit "$ac_status"); } &&
11429          { ac_try='test -s "conftest.$ac_objext"'
11430   { (eval echo "$as_me:11430: \"$ac_try\"") >&5
11431   (eval $ac_try) 2>&5
11432   ac_status=$?
11433   echo "$as_me:11433: \$? = $ac_status" >&5
11434   (exit "$ac_status"); }; }; then
11435   cf_cv_define_sigwinch=yes
11436 else
11437   echo "$as_me: failed program was:" >&5
11438 cat "conftest.$ac_ext" >&5
11439 cat >"conftest.$ac_ext" <<_ACEOF
11440 #line 11440 "configure"
11441 #include "confdefs.h"
11442
11443 #undef _XOPEN_SOURCE
11444 #undef _POSIX_SOURCE
11445 #undef _POSIX_C_SOURCE
11446 #include <sys/types.h>
11447 #include <sys/signal.h>
11448
11449 int
11450 main (void)
11451 {
11452 int x = SIGWINCH; (void)x
11453   ;
11454   return 0;
11455 }
11456 _ACEOF
11457 rm -f "conftest.$ac_objext"
11458 if { (eval echo "$as_me:11458: \"$ac_compile\"") >&5
11459   (eval $ac_compile) 2>&5
11460   ac_status=$?
11461   echo "$as_me:11461: \$? = $ac_status" >&5
11462   (exit "$ac_status"); } &&
11463          { ac_try='test -s "conftest.$ac_objext"'
11464   { (eval echo "$as_me:11464: \"$ac_try\"") >&5
11465   (eval $ac_try) 2>&5
11466   ac_status=$?
11467   echo "$as_me:11467: \$? = $ac_status" >&5
11468   (exit "$ac_status"); }; }; then
11469   cf_cv_define_sigwinch=maybe
11470 else
11471   echo "$as_me: failed program was:" >&5
11472 cat "conftest.$ac_ext" >&5
11473 cf_cv_define_sigwinch=no
11474 fi
11475 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11476
11477 fi
11478 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11479
11480 fi
11481 echo "$as_me:11481: result: $cf_cv_define_sigwinch" >&5
11482 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11483
11484 if test "$cf_cv_define_sigwinch" = maybe ; then
11485 echo "$as_me:11485: checking for actual SIGWINCH definition" >&5
11486 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11487 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11488   echo $ECHO_N "(cached) $ECHO_C" >&6
11489 else
11490
11491 cf_cv_fixup_sigwinch=unknown
11492 cf_sigwinch=32
11493 while test "$cf_sigwinch" != 1
11494 do
11495         cat >"conftest.$ac_ext" <<_ACEOF
11496 #line 11496 "configure"
11497 #include "confdefs.h"
11498
11499 #undef _XOPEN_SOURCE
11500 #undef _POSIX_SOURCE
11501 #undef _POSIX_C_SOURCE
11502 #include <sys/types.h>
11503 #include <sys/signal.h>
11504
11505 int
11506 main (void)
11507 {
11508
11509 #if SIGWINCH != $cf_sigwinch
11510 make an error
11511 #endif
11512 int x = SIGWINCH; (void)x
11513   ;
11514   return 0;
11515 }
11516 _ACEOF
11517 rm -f "conftest.$ac_objext"
11518 if { (eval echo "$as_me:11518: \"$ac_compile\"") >&5
11519   (eval $ac_compile) 2>&5
11520   ac_status=$?
11521   echo "$as_me:11521: \$? = $ac_status" >&5
11522   (exit "$ac_status"); } &&
11523          { ac_try='test -s "conftest.$ac_objext"'
11524   { (eval echo "$as_me:11524: \"$ac_try\"") >&5
11525   (eval $ac_try) 2>&5
11526   ac_status=$?
11527   echo "$as_me:11527: \$? = $ac_status" >&5
11528   (exit "$ac_status"); }; }; then
11529   cf_cv_fixup_sigwinch=$cf_sigwinch
11530          break
11531 else
11532   echo "$as_me: failed program was:" >&5
11533 cat "conftest.$ac_ext" >&5
11534 fi
11535 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11536
11537 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
11538 done
11539
11540 fi
11541 echo "$as_me:11541: result: $cf_cv_fixup_sigwinch" >&5
11542 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11543
11544         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11545                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11546         fi
11547 fi
11548
11549 # Checks for CODESET support.
11550
11551 echo "$as_me:11551: checking for nl_langinfo and CODESET" >&5
11552 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11553 if test "${am_cv_langinfo_codeset+set}" = set; then
11554   echo $ECHO_N "(cached) $ECHO_C" >&6
11555 else
11556   cat >"conftest.$ac_ext" <<_ACEOF
11557 #line 11557 "configure"
11558 #include "confdefs.h"
11559 #include <langinfo.h>
11560 int
11561 main (void)
11562 {
11563 char* cs = nl_langinfo(CODESET); (void)cs
11564   ;
11565   return 0;
11566 }
11567 _ACEOF
11568 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11569 if { (eval echo "$as_me:11569: \"$ac_link\"") >&5
11570   (eval $ac_link) 2>&5
11571   ac_status=$?
11572   echo "$as_me:11572: \$? = $ac_status" >&5
11573   (exit "$ac_status"); } &&
11574          { ac_try='test -s "conftest$ac_exeext"'
11575   { (eval echo "$as_me:11575: \"$ac_try\"") >&5
11576   (eval $ac_try) 2>&5
11577   ac_status=$?
11578   echo "$as_me:11578: \$? = $ac_status" >&5
11579   (exit "$ac_status"); }; }; then
11580   am_cv_langinfo_codeset=yes
11581 else
11582   echo "$as_me: failed program was:" >&5
11583 cat "conftest.$ac_ext" >&5
11584 am_cv_langinfo_codeset=no
11585 fi
11586 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11587
11588 fi
11589 echo "$as_me:11589: result: $am_cv_langinfo_codeset" >&5
11590 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11591         if test "$am_cv_langinfo_codeset" = yes; then
11592
11593 cat >>confdefs.h <<\EOF
11594 #define HAVE_LANGINFO_CODESET 1
11595 EOF
11596
11597         fi
11598
11599 # use these variables to work around a defect in gcc's fixincludes.
11600 NCURSES_OK_WCHAR_T=
11601 NCURSES_OK_WINT_T=
11602
11603 echo "$as_me:11603: checking if you want wide-character code" >&5
11604 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11605
11606 # Check whether --enable-widec or --disable-widec was given.
11607 if test "${enable_widec+set}" = set; then
11608   enableval="$enable_widec"
11609   with_widec=$enableval
11610 else
11611   with_widec=no
11612 fi;
11613 echo "$as_me:11613: result: $with_widec" >&5
11614 echo "${ECHO_T}$with_widec" >&6
11615
11616 NCURSES_WCWIDTH_GRAPHICS=1
11617
11618 if test "x$with_widec" = xyes ; then
11619         if test "x$disable_lib_suffixes" = xno ; then
11620                 LIB_SUFFIX="w${LIB_SUFFIX}"
11621         fi
11622
11623 cat >>confdefs.h <<\EOF
11624 #define USE_WIDEC_SUPPORT 1
11625 EOF
11626
11627 cat >>confdefs.h <<\EOF
11628 #define NCURSES_WIDECHAR 1
11629 EOF
11630
11631 for ac_header in \
11632 wchar.h \
11633 wctype.h \
11634
11635 do
11636 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11637 echo "$as_me:11637: checking for $ac_header" >&5
11638 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11639 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11640   echo $ECHO_N "(cached) $ECHO_C" >&6
11641 else
11642   cat >"conftest.$ac_ext" <<_ACEOF
11643 #line 11643 "configure"
11644 #include "confdefs.h"
11645 #include <$ac_header>
11646 _ACEOF
11647 if { (eval echo "$as_me:11647: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11648   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11649   ac_status=$?
11650   $EGREP -v '^ *\+' conftest.er1 >conftest.err
11651   rm -f conftest.er1
11652   cat conftest.err >&5
11653   echo "$as_me:11653: \$? = $ac_status" >&5
11654   (exit "$ac_status"); } >/dev/null; then
11655   if test -s conftest.err; then
11656     ac_cpp_err=$ac_c_preproc_warn_flag
11657   else
11658     ac_cpp_err=
11659   fi
11660 else
11661   ac_cpp_err=yes
11662 fi
11663 if test -z "$ac_cpp_err"; then
11664   eval "$as_ac_Header=yes"
11665 else
11666   echo "$as_me: failed program was:" >&5
11667   cat "conftest.$ac_ext" >&5
11668   eval "$as_ac_Header=no"
11669 fi
11670 rm -f conftest.err "conftest.$ac_ext"
11671 fi
11672 echo "$as_me:11672: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
11673 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
11674 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
11675   cat >>confdefs.h <<EOF
11676 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11677 EOF
11678
11679 fi
11680 done
11681
11682 echo "$as_me:11682: checking if wchar.h can be used as is" >&5
11683 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11684 if test "${cf_cv_wchar_h_okay+set}" = set; then
11685   echo $ECHO_N "(cached) $ECHO_C" >&6
11686 else
11687
11688 cat >"conftest.$ac_ext" <<_ACEOF
11689 #line 11689 "configure"
11690 #include "confdefs.h"
11691
11692 #include <stdlib.h>
11693 #ifdef HAVE_WCHAR_H
11694 #include <wchar.h>
11695 #endif
11696 #ifdef HAVE_WCTYPE_H
11697 #include <wctype.h>
11698 #endif
11699
11700 int
11701 main (void)
11702 {
11703
11704         wint_t foo = 0;
11705         int bar = iswpunct(foo)
11706   ;
11707   return 0;
11708 }
11709 _ACEOF
11710 rm -f "conftest.$ac_objext"
11711 if { (eval echo "$as_me:11711: \"$ac_compile\"") >&5
11712   (eval $ac_compile) 2>&5
11713   ac_status=$?
11714   echo "$as_me:11714: \$? = $ac_status" >&5
11715   (exit "$ac_status"); } &&
11716          { ac_try='test -s "conftest.$ac_objext"'
11717   { (eval echo "$as_me:11717: \"$ac_try\"") >&5
11718   (eval $ac_try) 2>&5
11719   ac_status=$?
11720   echo "$as_me:11720: \$? = $ac_status" >&5
11721   (exit "$ac_status"); }; }; then
11722   cf_cv_wchar_h_okay=yes
11723 else
11724   echo "$as_me: failed program was:" >&5
11725 cat "conftest.$ac_ext" >&5
11726 cf_cv_wchar_h_okay=no
11727 fi
11728 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11729 fi
11730 echo "$as_me:11730: result: $cf_cv_wchar_h_okay" >&5
11731 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
11732
11733 if test "$cf_cv_wchar_h_okay" = no
11734 then
11735
11736 echo "$as_me:11736: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
11737 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
11738 cat >"conftest.$ac_ext" <<_ACEOF
11739 #line 11739 "configure"
11740 #include "confdefs.h"
11741 #include <sys/types.h>
11742
11743 int
11744 main (void)
11745 {
11746
11747 #ifndef _XOPEN_SOURCE_EXTENDED
11748 make an error
11749 #endif
11750   ;
11751   return 0;
11752 }
11753 _ACEOF
11754 rm -f "conftest.$ac_objext"
11755 if { (eval echo "$as_me:11755: \"$ac_compile\"") >&5
11756   (eval $ac_compile) 2>&5
11757   ac_status=$?
11758   echo "$as_me:11758: \$? = $ac_status" >&5
11759   (exit "$ac_status"); } &&
11760          { ac_try='test -s "conftest.$ac_objext"'
11761   { (eval echo "$as_me:11761: \"$ac_try\"") >&5
11762   (eval $ac_try) 2>&5
11763   ac_status=$?
11764   echo "$as_me:11764: \$? = $ac_status" >&5
11765   (exit "$ac_status"); }; }; then
11766   cf_result=no
11767 else
11768   echo "$as_me: failed program was:" >&5
11769 cat "conftest.$ac_ext" >&5
11770 cf_result=yes
11771 fi
11772 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11773 echo "$as_me:11773: result: $cf_result" >&5
11774 echo "${ECHO_T}$cf_result" >&6
11775
11776 if test "$cf_result" = yes ; then
11777         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
11778 elif test "x" != "x" ; then
11779         echo "$as_me:11779: checking checking for compatible value versus " >&5
11780 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
11781         cat >"conftest.$ac_ext" <<_ACEOF
11782 #line 11782 "configure"
11783 #include "confdefs.h"
11784 #include <sys/types.h>
11785
11786 int
11787 main (void)
11788 {
11789
11790 #if _XOPEN_SOURCE_EXTENDED- < 0
11791 make an error
11792 #endif
11793   ;
11794   return 0;
11795 }
11796 _ACEOF
11797 rm -f "conftest.$ac_objext"
11798 if { (eval echo "$as_me:11798: \"$ac_compile\"") >&5
11799   (eval $ac_compile) 2>&5
11800   ac_status=$?
11801   echo "$as_me:11801: \$? = $ac_status" >&5
11802   (exit "$ac_status"); } &&
11803          { ac_try='test -s "conftest.$ac_objext"'
11804   { (eval echo "$as_me:11804: \"$ac_try\"") >&5
11805   (eval $ac_try) 2>&5
11806   ac_status=$?
11807   echo "$as_me:11807: \$? = $ac_status" >&5
11808   (exit "$ac_status"); }; }; then
11809   cf_result=yes
11810 else
11811   echo "$as_me: failed program was:" >&5
11812 cat "conftest.$ac_ext" >&5
11813 cf_result=no
11814 fi
11815 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11816         echo "$as_me:11816: result: $cf_result" >&5
11817 echo "${ECHO_T}$cf_result" >&6
11818         if test "$cf_result" = no ; then
11819                 # perhaps we can override it - try...
11820                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
11821         fi
11822 fi
11823
11824 fi
11825
11826 echo "$as_me:11826: checking if wcwidth agrees graphics are single-width" >&5
11827 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
11828 if test "${cf_cv_wcwidth_graphics+set}" = set; then
11829   echo $ECHO_N "(cached) $ECHO_C" >&6
11830 else
11831
11832 cat >conftest.in <<CF_EOF
11833 -       VT100 symbols
11834 0x250c  upper left corner
11835 0x2514  lower left corner
11836 0x2510  upper right corner
11837 0x2518  lower right corner
11838 0x251c  tee pointing left
11839 0x2524  tee pointing right
11840 0x2534  tee pointing up
11841 0x252c  tee pointing down
11842 0x2500  horizontal line
11843 0x2502  vertical line
11844 0x253c  large plus or crossover
11845 0x23ba  scan line 1
11846 0x23bd  scan line 9
11847 0x25c6  diamond
11848 0x2592  checker board (stipple)
11849 0x00b0  degree symbol
11850 0x00b1  plus/minus
11851 0x00b7  bullet
11852 -       Teletype 5410v1 symbols
11853 0x2190  arrow pointing left
11854 0x2192  arrow pointing right
11855 0x2193  arrow pointing down
11856 0x2191  arrow pointing up
11857 0x2592  board of squares
11858 0x2603  lantern symbol
11859 0x25ae  solid square block
11860 -       these defaults were invented for ncurses
11861 0x23bb  scan line 3
11862 0x23bc  scan line 7
11863 0x2264  less-than-or-equal-to
11864 0x2265  greater-than-or-equal-to
11865 0x03c0  greek pi
11866 0x2260  not-equal
11867 0x00a3  pound-sterling symbol
11868 -       thick-line-drawing
11869 0x250f  upper left corner
11870 0x2517  lower left corner
11871 0x2513  upper right corner
11872 0x251b  lower right corner
11873 0x2523  tee pointing left
11874 0x252b  tee pointing right
11875 0x253b  tee pointing up
11876 0x2533  tee pointing down
11877 0x2501  horizontal line
11878 0x2503  vertical line
11879 0x254b  large plus or crossover
11880 -       double-line-drawing
11881 0x2554  upper left corner
11882 0x255a  lower left corner
11883 0x2557  upper right corner
11884 0x255d  lower right corner
11885 0x2563  tee pointing left
11886 0x2560  tee pointing right
11887 0x2569  tee pointing up
11888 0x2566  tee pointing down
11889 0x2550  horizontal line
11890 0x2551  vertical line
11891 0x256c  large plus or crossover
11892 CF_EOF
11893 if test "$cross_compiling" = yes; then
11894   cf_cv_wcwidth_graphics=unknown
11895 else
11896   cat >"conftest.$ac_ext" <<_ACEOF
11897 #line 11897 "configure"
11898 #include "confdefs.h"
11899
11900 #include <locale.h>
11901 #include <stdio.h>
11902 #include <wchar.h>
11903
11904 #define MY_LEN 80
11905
11906 int
11907 main(void)
11908 {
11909         FILE *fp;
11910         int value;
11911         char buffer[MY_LEN + 1];
11912         char notes[MY_LEN + 1];
11913         int totals = 0;
11914         int passed = 0;
11915
11916         if (setlocale(LC_ALL, "en_US.UTF8") ||
11917                 setlocale(LC_ALL, "en_US.UTF-8") ||
11918                 setlocale(LC_ALL, "en_US.utf8") ||
11919                 setlocale(LC_ALL, "en_US.utf-8")) {
11920                 if ((fp = fopen("conftest.in", "r")) != 0) {
11921                         while (fgets(buffer, MY_LEN, fp) != 0) {
11922                                 if (*buffer == '-') {
11923                                         fprintf(stderr, "\\t%s", buffer);
11924                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
11925                                         ++totals;
11926                                         if (wcwidth(value) == 1)
11927                                                 ++passed;
11928                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
11929                                 } else {
11930                                         fprintf(stderr, "?\\t%s", buffer);
11931                                 }
11932                         }
11933                 }
11934         }
11935         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
11936         return (totals == passed) ? 0 : 1;
11937 }
11938
11939 _ACEOF
11940 rm -f "conftest$ac_exeext"
11941 if { (eval echo "$as_me:11941: \"$ac_link\"") >&5
11942   (eval $ac_link) 2>&5
11943   ac_status=$?
11944   echo "$as_me:11944: \$? = $ac_status" >&5
11945   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
11946   { (eval echo "$as_me:11946: \"$ac_try\"") >&5
11947   (eval $ac_try) 2>&5
11948   ac_status=$?
11949   echo "$as_me:11949: \$? = $ac_status" >&5
11950   (exit "$ac_status"); }; }; then
11951   cf_cv_wcwidth_graphics=yes
11952 else
11953   echo "$as_me: program exited with status $ac_status" >&5
11954 echo "$as_me: failed program was:" >&5
11955 cat "conftest.$ac_ext" >&5
11956 cf_cv_wcwidth_graphics=no
11957 fi
11958 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
11959 fi
11960
11961 fi
11962 echo "$as_me:11962: result: $cf_cv_wcwidth_graphics" >&5
11963 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
11964
11965         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
11966
11967         # with_overwrite=no
11968         NCURSES_CH_T=cchar_t
11969
11970 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
11971 do
11972 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11973 echo "$as_me:11973: checking for $ac_func" >&5
11974 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11975 if eval "test \"\${$as_ac_var+set}\" = set"; then
11976   echo $ECHO_N "(cached) $ECHO_C" >&6
11977 else
11978   cat >"conftest.$ac_ext" <<_ACEOF
11979 #line 11979 "configure"
11980 #include "confdefs.h"
11981 #define $ac_func autoconf_temporary
11982 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
11983 #undef $ac_func
11984
11985 #ifdef __cplusplus
11986 extern "C"
11987 #endif
11988
11989 /* We use char because int might match the return type of a gcc2
11990    builtin and then its argument prototype would still apply.  */
11991 char $ac_func (void);
11992
11993 int
11994 main (void)
11995 {
11996
11997 /* The GNU C library defines stubs for functions which it implements
11998     to always fail with ENOSYS.  Some functions are actually named
11999     something starting with __ and the normal name is an alias.  */
12000 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12001 #error found stub for $ac_func
12002 #endif
12003
12004         return $ac_func ();
12005   ;
12006   return 0;
12007 }
12008 _ACEOF
12009 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12010 if { (eval echo "$as_me:12010: \"$ac_link\"") >&5
12011   (eval $ac_link) 2>&5
12012   ac_status=$?
12013   echo "$as_me:12013: \$? = $ac_status" >&5
12014   (exit "$ac_status"); } &&
12015          { ac_try='test -s "conftest$ac_exeext"'
12016   { (eval echo "$as_me:12016: \"$ac_try\"") >&5
12017   (eval $ac_try) 2>&5
12018   ac_status=$?
12019   echo "$as_me:12019: \$? = $ac_status" >&5
12020   (exit "$ac_status"); }; }; then
12021   eval "$as_ac_var=yes"
12022 else
12023   echo "$as_me: failed program was:" >&5
12024 cat "conftest.$ac_ext" >&5
12025 eval "$as_ac_var=no"
12026 fi
12027 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12028 fi
12029 echo "$as_me:12029: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12030 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12031 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12032   cat >>confdefs.h <<EOF
12033 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12034 EOF
12035
12036 fi
12037 done
12038
12039         if test "x$ac_cv_func_putwc" != xyes ; then
12040
12041 for ac_header in wchar.h
12042 do
12043 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12044 echo "$as_me:12044: checking for $ac_header" >&5
12045 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12046 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12047   echo $ECHO_N "(cached) $ECHO_C" >&6
12048 else
12049   cat >"conftest.$ac_ext" <<_ACEOF
12050 #line 12050 "configure"
12051 #include "confdefs.h"
12052 #include <$ac_header>
12053 _ACEOF
12054 if { (eval echo "$as_me:12054: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12055   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12056   ac_status=$?
12057   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12058   rm -f conftest.er1
12059   cat conftest.err >&5
12060   echo "$as_me:12060: \$? = $ac_status" >&5
12061   (exit "$ac_status"); } >/dev/null; then
12062   if test -s conftest.err; then
12063     ac_cpp_err=$ac_c_preproc_warn_flag
12064   else
12065     ac_cpp_err=
12066   fi
12067 else
12068   ac_cpp_err=yes
12069 fi
12070 if test -z "$ac_cpp_err"; then
12071   eval "$as_ac_Header=yes"
12072 else
12073   echo "$as_me: failed program was:" >&5
12074   cat "conftest.$ac_ext" >&5
12075   eval "$as_ac_Header=no"
12076 fi
12077 rm -f conftest.err "conftest.$ac_ext"
12078 fi
12079 echo "$as_me:12079: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12080 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12081 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12082   cat >>confdefs.h <<EOF
12083 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12084 EOF
12085
12086 fi
12087 done
12088
12089 echo "$as_me:12089: checking for multibyte character support" >&5
12090 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12091 if test "${cf_cv_utf8_lib+set}" = set; then
12092   echo $ECHO_N "(cached) $ECHO_C" >&6
12093 else
12094
12095         cf_save_LIBS="$LIBS"
12096         cat >"conftest.$ac_ext" <<_ACEOF
12097 #line 12097 "configure"
12098 #include "confdefs.h"
12099
12100 #include <stdlib.h>
12101 #include <stdio.h>
12102 #ifdef HAVE_WCHAR_H
12103 #include <wchar.h>
12104 #endif
12105
12106 int
12107 main (void)
12108 {
12109 putwc(0,0);
12110   ;
12111   return 0;
12112 }
12113 _ACEOF
12114 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12115 if { (eval echo "$as_me:12115: \"$ac_link\"") >&5
12116   (eval $ac_link) 2>&5
12117   ac_status=$?
12118   echo "$as_me:12118: \$? = $ac_status" >&5
12119   (exit "$ac_status"); } &&
12120          { ac_try='test -s "conftest$ac_exeext"'
12121   { (eval echo "$as_me:12121: \"$ac_try\"") >&5
12122   (eval $ac_try) 2>&5
12123   ac_status=$?
12124   echo "$as_me:12124: \$? = $ac_status" >&5
12125   (exit "$ac_status"); }; }; then
12126   cf_cv_utf8_lib=yes
12127 else
12128   echo "$as_me: failed program was:" >&5
12129 cat "conftest.$ac_ext" >&5
12130
12131 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12132 # will be set on completion of the AC_TRY_LINK below.
12133 cf_cv_header_path_utf8=
12134 cf_cv_library_path_utf8=
12135
12136 echo "${as_me:-configure}:12136: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
12137
12138 cf_save_LIBS="$LIBS"
12139
12140 cat >"conftest.$ac_ext" <<_ACEOF
12141 #line 12141 "configure"
12142 #include "confdefs.h"
12143
12144 #include <libutf8.h>
12145 int
12146 main (void)
12147 {
12148 putwc(0,0);
12149   ;
12150   return 0;
12151 }
12152 _ACEOF
12153 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12154 if { (eval echo "$as_me:12154: \"$ac_link\"") >&5
12155   (eval $ac_link) 2>&5
12156   ac_status=$?
12157   echo "$as_me:12157: \$? = $ac_status" >&5
12158   (exit "$ac_status"); } &&
12159          { ac_try='test -s "conftest$ac_exeext"'
12160   { (eval echo "$as_me:12160: \"$ac_try\"") >&5
12161   (eval $ac_try) 2>&5
12162   ac_status=$?
12163   echo "$as_me:12163: \$? = $ac_status" >&5
12164   (exit "$ac_status"); }; }; then
12165
12166         cf_cv_find_linkage_utf8=yes
12167         cf_cv_header_path_utf8=/usr/include
12168         cf_cv_library_path_utf8=/usr/lib
12169
12170 else
12171   echo "$as_me: failed program was:" >&5
12172 cat "conftest.$ac_ext" >&5
12173
12174 LIBS="-lutf8  $cf_save_LIBS"
12175
12176 cat >"conftest.$ac_ext" <<_ACEOF
12177 #line 12177 "configure"
12178 #include "confdefs.h"
12179
12180 #include <libutf8.h>
12181 int
12182 main (void)
12183 {
12184 putwc(0,0);
12185   ;
12186   return 0;
12187 }
12188 _ACEOF
12189 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12190 if { (eval echo "$as_me:12190: \"$ac_link\"") >&5
12191   (eval $ac_link) 2>&5
12192   ac_status=$?
12193   echo "$as_me:12193: \$? = $ac_status" >&5
12194   (exit "$ac_status"); } &&
12195          { ac_try='test -s "conftest$ac_exeext"'
12196   { (eval echo "$as_me:12196: \"$ac_try\"") >&5
12197   (eval $ac_try) 2>&5
12198   ac_status=$?
12199   echo "$as_me:12199: \$? = $ac_status" >&5
12200   (exit "$ac_status"); }; }; then
12201
12202         cf_cv_find_linkage_utf8=yes
12203         cf_cv_header_path_utf8=/usr/include
12204         cf_cv_library_path_utf8=/usr/lib
12205         cf_cv_library_file_utf8="-lutf8"
12206
12207 else
12208   echo "$as_me: failed program was:" >&5
12209 cat "conftest.$ac_ext" >&5
12210
12211         cf_cv_find_linkage_utf8=no
12212         LIBS="$cf_save_LIBS"
12213
12214         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
12215
12216 echo "${as_me:-configure}:12216: testing find linkage for utf8 library ..." 1>&5
12217
12218 echo "${as_me:-configure}:12218: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
12219
12220         cf_save_CPPFLAGS="$CPPFLAGS"
12221         cf_test_CPPFLAGS="$CPPFLAGS"
12222
12223 cf_search=
12224
12225 # collect the current set of include-directories from compiler flags
12226 cf_header_path_list=""
12227 if test -n "${CFLAGS}${CPPFLAGS}" ; then
12228         for cf_header_path in $CPPFLAGS $CFLAGS
12229         do
12230                 case "$cf_header_path" in
12231                 (-I*)
12232                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
12233
12234 test "x$cf_header_path" != "xNONE" && \
12235 test -d "$cf_header_path" && \
12236  {
12237         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
12238         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
12239         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
12240         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
12241         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
12242         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
12243 }
12244
12245                         cf_header_path_list="$cf_header_path_list $cf_search"
12246                         ;;
12247                 esac
12248         done
12249 fi
12250
12251 # add the variations for the package we are looking for
12252
12253 cf_search=
12254
12255 test "x$prefix" != "xNONE" && \
12256 test -d "$prefix" && \
12257  {
12258         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
12259         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
12260         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
12261         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
12262         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
12263         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
12264 }
12265
12266 for cf_subdir_prefix in \
12267         /usr \
12268         /usr/local \
12269         /usr/pkg \
12270         /opt \
12271         /opt/local \
12272         $HOME
12273 do
12274
12275 test "x$cf_subdir_prefix" != "x$prefix" && \
12276 test -d "$cf_subdir_prefix" && \
12277 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12278         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
12279         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
12280         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
12281         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
12282         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
12283         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
12284 }
12285
12286 done
12287
12288 test "$includedir" != NONE && \
12289 test "$includedir" != "/usr/include" && \
12290 test -d "$includedir" && {
12291         test -d "$includedir" &&    cf_search="$cf_search $includedir"
12292         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
12293 }
12294
12295 test "$oldincludedir" != NONE && \
12296 test "$oldincludedir" != "/usr/include" && \
12297 test -d "$oldincludedir" && {
12298         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
12299         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
12300 }
12301
12302 cf_search="$cf_search $cf_header_path_list"
12303
12304         for cf_cv_header_path_utf8 in $cf_search
12305         do
12306                 if test -d "$cf_cv_header_path_utf8" ; then
12307                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
12308
12309 echo "${as_me:-configure}:12309: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
12310
12311                         CPPFLAGS="$cf_save_CPPFLAGS"
12312
12313         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12314         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
12315
12316                         cat >"conftest.$ac_ext" <<_ACEOF
12317 #line 12317 "configure"
12318 #include "confdefs.h"
12319
12320 #include <libutf8.h>
12321 int
12322 main (void)
12323 {
12324 putwc(0,0);
12325   ;
12326   return 0;
12327 }
12328 _ACEOF
12329 rm -f "conftest.$ac_objext"
12330 if { (eval echo "$as_me:12330: \"$ac_compile\"") >&5
12331   (eval $ac_compile) 2>&5
12332   ac_status=$?
12333   echo "$as_me:12333: \$? = $ac_status" >&5
12334   (exit "$ac_status"); } &&
12335          { ac_try='test -s "conftest.$ac_objext"'
12336   { (eval echo "$as_me:12336: \"$ac_try\"") >&5
12337   (eval $ac_try) 2>&5
12338   ac_status=$?
12339   echo "$as_me:12339: \$? = $ac_status" >&5
12340   (exit "$ac_status"); }; }; then
12341
12342                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12343
12344 echo "${as_me:-configure}:12344: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12345
12346                                 cf_cv_find_linkage_utf8=maybe
12347                                 cf_test_CPPFLAGS="$CPPFLAGS"
12348                                 break
12349 else
12350   echo "$as_me: failed program was:" >&5
12351 cat "conftest.$ac_ext" >&5
12352
12353                                 CPPFLAGS="$cf_save_CPPFLAGS"
12354
12355 fi
12356 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12357                 fi
12358         done
12359
12360         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12361
12362 echo "${as_me:-configure}:12362: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12363
12364                 cf_save_LIBS="$LIBS"
12365                 cf_save_LDFLAGS="$LDFLAGS"
12366
12367                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12368
12369 cf_search=
12370 cf_library_path_list=""
12371 if test -n "${LDFLAGS}${LIBS}" ; then
12372         for cf_library_path in $LDFLAGS $LIBS
12373         do
12374                 case "$cf_library_path" in
12375                 (-L*)
12376                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12377
12378 test "x$cf_library_path" != "xNONE" && \
12379 test -d "$cf_library_path" && \
12380  {
12381         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12382         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
12383         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12384         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12385         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12386         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12387 }
12388
12389                         cf_library_path_list="$cf_library_path_list $cf_search"
12390                         ;;
12391                 esac
12392         done
12393 fi
12394
12395 cf_search=
12396
12397 test "x$prefix" != "xNONE" && \
12398 test -d "$prefix" && \
12399  {
12400         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12401         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
12402         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
12403         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12404         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
12405         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12406 }
12407
12408 for cf_subdir_prefix in \
12409         /usr \
12410         /usr/local \
12411         /usr/pkg \
12412         /opt \
12413         /opt/local \
12414         $HOME
12415 do
12416
12417 test "x$cf_subdir_prefix" != "x$prefix" && \
12418 test -d "$cf_subdir_prefix" && \
12419 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12420         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12421         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12422         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12423         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12424         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12425         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12426 }
12427
12428 done
12429
12430 cf_search="$cf_library_path_list $cf_search"
12431
12432                         for cf_cv_library_path_utf8 in $cf_search
12433                         do
12434                                 if test -d "$cf_cv_library_path_utf8" ; then
12435                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12436
12437 echo "${as_me:-configure}:12437: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12438
12439                                         CPPFLAGS="$cf_test_CPPFLAGS"
12440                                         LIBS="-lutf8  $cf_save_LIBS"
12441                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12442                                         cat >"conftest.$ac_ext" <<_ACEOF
12443 #line 12443 "configure"
12444 #include "confdefs.h"
12445
12446 #include <libutf8.h>
12447 int
12448 main (void)
12449 {
12450 putwc(0,0);
12451   ;
12452   return 0;
12453 }
12454 _ACEOF
12455 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12456 if { (eval echo "$as_me:12456: \"$ac_link\"") >&5
12457   (eval $ac_link) 2>&5
12458   ac_status=$?
12459   echo "$as_me:12459: \$? = $ac_status" >&5
12460   (exit "$ac_status"); } &&
12461          { ac_try='test -s "conftest$ac_exeext"'
12462   { (eval echo "$as_me:12462: \"$ac_try\"") >&5
12463   (eval $ac_try) 2>&5
12464   ac_status=$?
12465   echo "$as_me:12465: \$? = $ac_status" >&5
12466   (exit "$ac_status"); }; }; then
12467
12468                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12469
12470 echo "${as_me:-configure}:12470: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12471
12472                                         cf_cv_find_linkage_utf8=yes
12473                                         cf_cv_library_file_utf8="-lutf8"
12474                                         break
12475 else
12476   echo "$as_me: failed program was:" >&5
12477 cat "conftest.$ac_ext" >&5
12478
12479                                         CPPFLAGS="$cf_save_CPPFLAGS"
12480                                         LIBS="$cf_save_LIBS"
12481                                         LDFLAGS="$cf_save_LDFLAGS"
12482
12483 fi
12484 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12485                                 fi
12486                         done
12487                         CPPFLAGS="$cf_save_CPPFLAGS"
12488                         LDFLAGS="$cf_save_LDFLAGS"
12489                 fi
12490
12491         else
12492                 cf_cv_find_linkage_utf8=no
12493         fi
12494
12495 fi
12496 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12497
12498 fi
12499 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12500
12501 LIBS="$cf_save_LIBS"
12502
12503 if test "$cf_cv_find_linkage_utf8" = yes ; then
12504 cf_cv_utf8_lib=add-on
12505 else
12506 cf_cv_utf8_lib=no
12507 fi
12508
12509 fi
12510 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12511 fi
12512 echo "$as_me:12512: result: $cf_cv_utf8_lib" >&5
12513 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12514
12515 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12516 # ncurses/ncursesw:
12517 if test "$cf_cv_utf8_lib" = "add-on" ; then
12518
12519 cat >>confdefs.h <<\EOF
12520 #define HAVE_LIBUTF8_H 1
12521 EOF
12522
12523 if test -n "$cf_cv_header_path_utf8" ; then
12524   for cf_add_incdir in $cf_cv_header_path_utf8
12525   do
12526         while test "$cf_add_incdir" != /usr/include
12527         do
12528           if test -d "$cf_add_incdir"
12529           then
12530                 cf_have_incdir=no
12531                 if test -n "$CFLAGS$CPPFLAGS" ; then
12532                   # a loop is needed to ensure we can add subdirs of existing dirs
12533                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12534                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12535                           cf_have_incdir=yes; break
12536                         fi
12537                   done
12538                 fi
12539
12540                 if test "$cf_have_incdir" = no ; then
12541                   if test "$cf_add_incdir" = /usr/local/include ; then
12542                         if test "$GCC" = yes
12543                         then
12544                           cf_save_CPPFLAGS=$CPPFLAGS
12545
12546         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12547         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12548
12549                           cat >"conftest.$ac_ext" <<_ACEOF
12550 #line 12550 "configure"
12551 #include "confdefs.h"
12552 #include <stdio.h>
12553 int
12554 main (void)
12555 {
12556 printf("Hello")
12557   ;
12558   return 0;
12559 }
12560 _ACEOF
12561 rm -f "conftest.$ac_objext"
12562 if { (eval echo "$as_me:12562: \"$ac_compile\"") >&5
12563   (eval $ac_compile) 2>&5
12564   ac_status=$?
12565   echo "$as_me:12565: \$? = $ac_status" >&5
12566   (exit "$ac_status"); } &&
12567          { ac_try='test -s "conftest.$ac_objext"'
12568   { (eval echo "$as_me:12568: \"$ac_try\"") >&5
12569   (eval $ac_try) 2>&5
12570   ac_status=$?
12571   echo "$as_me:12571: \$? = $ac_status" >&5
12572   (exit "$ac_status"); }; }; then
12573   :
12574 else
12575   echo "$as_me: failed program was:" >&5
12576 cat "conftest.$ac_ext" >&5
12577 cf_have_incdir=yes
12578 fi
12579 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12580                           CPPFLAGS=$cf_save_CPPFLAGS
12581                         fi
12582                   fi
12583                 fi
12584
12585                 if test "$cf_have_incdir" = no ; then
12586                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12587
12588 echo "${as_me:-configure}:12588: testing adding $cf_add_incdir to include-path ..." 1>&5
12589
12590                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12591
12592                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
12593                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12594                   cf_add_incdir="$cf_top_incdir"
12595                 else
12596                   break
12597                 fi
12598           else
12599                 break
12600           fi
12601         done
12602   done
12603 fi
12604
12605 if test -n "$cf_cv_library_path_utf8" ; then
12606         for cf_add_libdir in $cf_cv_library_path_utf8
12607         do
12608                 if test "$cf_add_libdir" = /usr/lib ; then
12609                         :
12610                 elif test -d "$cf_add_libdir"
12611                 then
12612                         cf_have_libdir=no
12613                         if test -n "$LDFLAGS$LIBS" ; then
12614                                 # a loop is needed to ensure we can add subdirs of existing dirs
12615                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12616                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12617                                                 cf_have_libdir=yes; break
12618                                         fi
12619                                 done
12620                         fi
12621                         if test "$cf_have_libdir" = no ; then
12622                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12623
12624 echo "${as_me:-configure}:12624: testing adding $cf_add_libdir to library-path ..." 1>&5
12625
12626                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12627                         fi
12628                 fi
12629         done
12630 fi
12631
12632 cf_add_libs="$LIBS"
12633 # reverse order
12634 cf_add_0lib=
12635 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12636 # filter duplicates
12637 for cf_add_1lib in $cf_add_0lib; do
12638         for cf_add_2lib in $cf_add_libs; do
12639                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12640                         cf_add_1lib=
12641                         break
12642                 fi
12643         done
12644         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12645 done
12646 LIBS="$cf_add_libs"
12647
12648 fi
12649
12650                 if test "$cf_cv_utf8_lib" != no ; then
12651                         NCURSES_LIBUTF8=1
12652                 fi
12653         fi
12654
12655 # This is needed on Tru64 5.0 to declare mbstate_t
12656 echo "$as_me:12656: checking if we must include wchar.h to declare mbstate_t" >&5
12657 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12658 if test "${cf_cv_mbstate_t+set}" = set; then
12659   echo $ECHO_N "(cached) $ECHO_C" >&6
12660 else
12661
12662 cat >"conftest.$ac_ext" <<_ACEOF
12663 #line 12663 "configure"
12664 #include "confdefs.h"
12665
12666 #include <stdlib.h>
12667 #include <stdarg.h>
12668 #include <stdio.h>
12669 #ifdef HAVE_LIBUTF8_H
12670 #include <libutf8.h>
12671 #endif
12672 int
12673 main (void)
12674 {
12675 mbstate_t state
12676   ;
12677   return 0;
12678 }
12679 _ACEOF
12680 rm -f "conftest.$ac_objext"
12681 if { (eval echo "$as_me:12681: \"$ac_compile\"") >&5
12682   (eval $ac_compile) 2>&5
12683   ac_status=$?
12684   echo "$as_me:12684: \$? = $ac_status" >&5
12685   (exit "$ac_status"); } &&
12686          { ac_try='test -s "conftest.$ac_objext"'
12687   { (eval echo "$as_me:12687: \"$ac_try\"") >&5
12688   (eval $ac_try) 2>&5
12689   ac_status=$?
12690   echo "$as_me:12690: \$? = $ac_status" >&5
12691   (exit "$ac_status"); }; }; then
12692   cf_cv_mbstate_t=no
12693 else
12694   echo "$as_me: failed program was:" >&5
12695 cat "conftest.$ac_ext" >&5
12696 cat >"conftest.$ac_ext" <<_ACEOF
12697 #line 12697 "configure"
12698 #include "confdefs.h"
12699
12700 #include <stdlib.h>
12701 #include <stdarg.h>
12702 #include <stdio.h>
12703 #include <wchar.h>
12704 #ifdef HAVE_LIBUTF8_H
12705 #include <libutf8.h>
12706 #endif
12707 int
12708 main (void)
12709 {
12710 mbstate_t value
12711   ;
12712   return 0;
12713 }
12714 _ACEOF
12715 rm -f "conftest.$ac_objext"
12716 if { (eval echo "$as_me:12716: \"$ac_compile\"") >&5
12717   (eval $ac_compile) 2>&5
12718   ac_status=$?
12719   echo "$as_me:12719: \$? = $ac_status" >&5
12720   (exit "$ac_status"); } &&
12721          { ac_try='test -s "conftest.$ac_objext"'
12722   { (eval echo "$as_me:12722: \"$ac_try\"") >&5
12723   (eval $ac_try) 2>&5
12724   ac_status=$?
12725   echo "$as_me:12725: \$? = $ac_status" >&5
12726   (exit "$ac_status"); }; }; then
12727   cf_cv_mbstate_t=yes
12728 else
12729   echo "$as_me: failed program was:" >&5
12730 cat "conftest.$ac_ext" >&5
12731 cf_cv_mbstate_t=unknown
12732 fi
12733 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12734 fi
12735 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12736 fi
12737 echo "$as_me:12737: result: $cf_cv_mbstate_t" >&5
12738 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
12739
12740 if test "$cf_cv_mbstate_t" = yes ; then
12741
12742 cat >>confdefs.h <<\EOF
12743 #define NEED_WCHAR_H 1
12744 EOF
12745
12746         NEED_WCHAR_H=1
12747 fi
12748
12749 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
12750 if test "$cf_cv_mbstate_t" = unknown ; then
12751         NCURSES_MBSTATE_T=1
12752 fi
12753
12754 # This is needed on Tru64 5.0 to declare wchar_t
12755 echo "$as_me:12755: checking if we must include wchar.h to declare wchar_t" >&5
12756 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
12757 if test "${cf_cv_wchar_t+set}" = set; then
12758   echo $ECHO_N "(cached) $ECHO_C" >&6
12759 else
12760
12761 cat >"conftest.$ac_ext" <<_ACEOF
12762 #line 12762 "configure"
12763 #include "confdefs.h"
12764
12765 #include <stdlib.h>
12766 #include <stdarg.h>
12767 #include <stdio.h>
12768 #ifdef HAVE_LIBUTF8_H
12769 #include <libutf8.h>
12770 #endif
12771 int
12772 main (void)
12773 {
12774 wchar_t state
12775   ;
12776   return 0;
12777 }
12778 _ACEOF
12779 rm -f "conftest.$ac_objext"
12780 if { (eval echo "$as_me:12780: \"$ac_compile\"") >&5
12781   (eval $ac_compile) 2>&5
12782   ac_status=$?
12783   echo "$as_me:12783: \$? = $ac_status" >&5
12784   (exit "$ac_status"); } &&
12785          { ac_try='test -s "conftest.$ac_objext"'
12786   { (eval echo "$as_me:12786: \"$ac_try\"") >&5
12787   (eval $ac_try) 2>&5
12788   ac_status=$?
12789   echo "$as_me:12789: \$? = $ac_status" >&5
12790   (exit "$ac_status"); }; }; then
12791   cf_cv_wchar_t=no
12792 else
12793   echo "$as_me: failed program was:" >&5
12794 cat "conftest.$ac_ext" >&5
12795 cat >"conftest.$ac_ext" <<_ACEOF
12796 #line 12796 "configure"
12797 #include "confdefs.h"
12798
12799 #include <stdlib.h>
12800 #include <stdarg.h>
12801 #include <stdio.h>
12802 #include <wchar.h>
12803 #ifdef HAVE_LIBUTF8_H
12804 #include <libutf8.h>
12805 #endif
12806 int
12807 main (void)
12808 {
12809 wchar_t value
12810   ;
12811   return 0;
12812 }
12813 _ACEOF
12814 rm -f "conftest.$ac_objext"
12815 if { (eval echo "$as_me:12815: \"$ac_compile\"") >&5
12816   (eval $ac_compile) 2>&5
12817   ac_status=$?
12818   echo "$as_me:12818: \$? = $ac_status" >&5
12819   (exit "$ac_status"); } &&
12820          { ac_try='test -s "conftest.$ac_objext"'
12821   { (eval echo "$as_me:12821: \"$ac_try\"") >&5
12822   (eval $ac_try) 2>&5
12823   ac_status=$?
12824   echo "$as_me:12824: \$? = $ac_status" >&5
12825   (exit "$ac_status"); }; }; then
12826   cf_cv_wchar_t=yes
12827 else
12828   echo "$as_me: failed program was:" >&5
12829 cat "conftest.$ac_ext" >&5
12830 cf_cv_wchar_t=unknown
12831 fi
12832 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12833 fi
12834 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12835 fi
12836 echo "$as_me:12836: result: $cf_cv_wchar_t" >&5
12837 echo "${ECHO_T}$cf_cv_wchar_t" >&6
12838
12839 if test "$cf_cv_wchar_t" = yes ; then
12840
12841 cat >>confdefs.h <<\EOF
12842 #define NEED_WCHAR_H 1
12843 EOF
12844
12845         NEED_WCHAR_H=1
12846 fi
12847
12848 # if we do not find wchar_t in either place, use substitution to provide a fallback.
12849 if test "$cf_cv_wchar_t" = unknown ; then
12850         NCURSES_WCHAR_T=1
12851 fi
12852
12853 # if we find wchar_t in either place, use substitution to provide a fallback.
12854 if test "$cf_cv_wchar_t" != unknown ; then
12855         NCURSES_OK_WCHAR_T=1
12856 fi
12857
12858 # This is needed on Tru64 5.0 to declare wint_t
12859 echo "$as_me:12859: checking if we must include wchar.h to declare wint_t" >&5
12860 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
12861 if test "${cf_cv_wint_t+set}" = set; then
12862   echo $ECHO_N "(cached) $ECHO_C" >&6
12863 else
12864
12865 cat >"conftest.$ac_ext" <<_ACEOF
12866 #line 12866 "configure"
12867 #include "confdefs.h"
12868
12869 #include <stdlib.h>
12870 #include <stdarg.h>
12871 #include <stdio.h>
12872 #ifdef HAVE_LIBUTF8_H
12873 #include <libutf8.h>
12874 #endif
12875 int
12876 main (void)
12877 {
12878 wint_t state
12879   ;
12880   return 0;
12881 }
12882 _ACEOF
12883 rm -f "conftest.$ac_objext"
12884 if { (eval echo "$as_me:12884: \"$ac_compile\"") >&5
12885   (eval $ac_compile) 2>&5
12886   ac_status=$?
12887   echo "$as_me:12887: \$? = $ac_status" >&5
12888   (exit "$ac_status"); } &&
12889          { ac_try='test -s "conftest.$ac_objext"'
12890   { (eval echo "$as_me:12890: \"$ac_try\"") >&5
12891   (eval $ac_try) 2>&5
12892   ac_status=$?
12893   echo "$as_me:12893: \$? = $ac_status" >&5
12894   (exit "$ac_status"); }; }; then
12895   cf_cv_wint_t=no
12896 else
12897   echo "$as_me: failed program was:" >&5
12898 cat "conftest.$ac_ext" >&5
12899 cat >"conftest.$ac_ext" <<_ACEOF
12900 #line 12900 "configure"
12901 #include "confdefs.h"
12902
12903 #include <stdlib.h>
12904 #include <stdarg.h>
12905 #include <stdio.h>
12906 #include <wchar.h>
12907 #ifdef HAVE_LIBUTF8_H
12908 #include <libutf8.h>
12909 #endif
12910 int
12911 main (void)
12912 {
12913 wint_t value
12914   ;
12915   return 0;
12916 }
12917 _ACEOF
12918 rm -f "conftest.$ac_objext"
12919 if { (eval echo "$as_me:12919: \"$ac_compile\"") >&5
12920   (eval $ac_compile) 2>&5
12921   ac_status=$?
12922   echo "$as_me:12922: \$? = $ac_status" >&5
12923   (exit "$ac_status"); } &&
12924          { ac_try='test -s "conftest.$ac_objext"'
12925   { (eval echo "$as_me:12925: \"$ac_try\"") >&5
12926   (eval $ac_try) 2>&5
12927   ac_status=$?
12928   echo "$as_me:12928: \$? = $ac_status" >&5
12929   (exit "$ac_status"); }; }; then
12930   cf_cv_wint_t=yes
12931 else
12932   echo "$as_me: failed program was:" >&5
12933 cat "conftest.$ac_ext" >&5
12934 cf_cv_wint_t=unknown
12935 fi
12936 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12937 fi
12938 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12939 fi
12940 echo "$as_me:12940: result: $cf_cv_wint_t" >&5
12941 echo "${ECHO_T}$cf_cv_wint_t" >&6
12942
12943 if test "$cf_cv_wint_t" = yes ; then
12944
12945 cat >>confdefs.h <<\EOF
12946 #define NEED_WCHAR_H 1
12947 EOF
12948
12949         NEED_WCHAR_H=1
12950 fi
12951
12952 # if we do not find wint_t in either place, use substitution to provide a fallback.
12953 if test "$cf_cv_wint_t" = unknown ; then
12954         NCURSES_WINT_T=1
12955 fi
12956
12957 # if we find wint_t in either place, use substitution to provide a fallback.
12958 if test "$cf_cv_wint_t" != unknown ; then
12959         NCURSES_OK_WINT_T=1
12960 fi
12961
12962         if test "$NCURSES_MBSTATE_T" != 0; then
12963
12964 cat >>confdefs.h <<\EOF
12965 #define NEED_MBSTATE_T_DEF 1
12966 EOF
12967
12968         fi
12969 fi
12970
12971 ###   use option --disable-lp64 to allow long chtype
12972 echo "$as_me:12972: checking whether to enable _LP64 definition in curses.h" >&5
12973 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
12974
12975 # Check whether --enable-lp64 or --disable-lp64 was given.
12976 if test "${enable_lp64+set}" = set; then
12977   enableval="$enable_lp64"
12978   with_lp64=$enableval
12979 else
12980   with_lp64=$cf_dft_with_lp64
12981 fi;
12982 echo "$as_me:12982: result: $with_lp64" >&5
12983 echo "${ECHO_T}$with_lp64" >&6
12984
12985 if test "x$with_lp64" = xyes ; then
12986         cf_cv_enable_lp64=1
12987 else
12988         cf_cv_enable_lp64=0
12989 fi
12990
12991 # Check whether --enable-largefile or --disable-largefile was given.
12992 if test "${enable_largefile+set}" = set; then
12993   enableval="$enable_largefile"
12994
12995 fi;
12996 if test "$enable_largefile" != no; then
12997
12998   echo "$as_me:12998: checking for special C compiler options needed for large files" >&5
12999 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13000 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13001   echo $ECHO_N "(cached) $ECHO_C" >&6
13002 else
13003   ac_cv_sys_largefile_CC=no
13004      if test "$GCC" != yes; then
13005        ac_save_CC=$CC
13006        while :; do
13007          # IRIX 6.2 and later do not support large files by default,
13008          # so use the C compiler's -n32 option if that helps.
13009          cat >"conftest.$ac_ext" <<_ACEOF
13010 #line 13010 "configure"
13011 #include "confdefs.h"
13012 #include <sys/types.h>
13013  /* Check that off_t can represent 2**63 - 1 correctly.
13014     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13015     since some C++ compilers masquerading as C compilers
13016     incorrectly reject 9223372036854775807.  */
13017 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13018   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13019                        && LARGE_OFF_T % 2147483647 == 1)
13020                       ? 1 : -1];
13021 int
13022 main (void)
13023 {
13024
13025   ;
13026   return 0;
13027 }
13028 _ACEOF
13029          rm -f "conftest.$ac_objext"
13030 if { (eval echo "$as_me:13030: \"$ac_compile\"") >&5
13031   (eval $ac_compile) 2>&5
13032   ac_status=$?
13033   echo "$as_me:13033: \$? = $ac_status" >&5
13034   (exit "$ac_status"); } &&
13035          { ac_try='test -s "conftest.$ac_objext"'
13036   { (eval echo "$as_me:13036: \"$ac_try\"") >&5
13037   (eval $ac_try) 2>&5
13038   ac_status=$?
13039   echo "$as_me:13039: \$? = $ac_status" >&5
13040   (exit "$ac_status"); }; }; then
13041   break
13042 else
13043   echo "$as_me: failed program was:" >&5
13044 cat "conftest.$ac_ext" >&5
13045 fi
13046 rm -f "conftest.$ac_objext"
13047          CC="$CC -n32"
13048          rm -f "conftest.$ac_objext"
13049 if { (eval echo "$as_me:13049: \"$ac_compile\"") >&5
13050   (eval $ac_compile) 2>&5
13051   ac_status=$?
13052   echo "$as_me:13052: \$? = $ac_status" >&5
13053   (exit "$ac_status"); } &&
13054          { ac_try='test -s "conftest.$ac_objext"'
13055   { (eval echo "$as_me:13055: \"$ac_try\"") >&5
13056   (eval $ac_try) 2>&5
13057   ac_status=$?
13058   echo "$as_me:13058: \$? = $ac_status" >&5
13059   (exit "$ac_status"); }; }; then
13060   ac_cv_sys_largefile_CC=' -n32'; break
13061 else
13062   echo "$as_me: failed program was:" >&5
13063 cat "conftest.$ac_ext" >&5
13064 fi
13065 rm -f "conftest.$ac_objext"
13066          break
13067        done
13068        CC=$ac_save_CC
13069        rm -f "conftest.$ac_ext"
13070     fi
13071 fi
13072 echo "$as_me:13072: result: $ac_cv_sys_largefile_CC" >&5
13073 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13074   if test "$ac_cv_sys_largefile_CC" != no; then
13075     CC=$CC$ac_cv_sys_largefile_CC
13076   fi
13077
13078   echo "$as_me:13078: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13079 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13080 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13081   echo $ECHO_N "(cached) $ECHO_C" >&6
13082 else
13083   while :; do
13084   ac_cv_sys_file_offset_bits=no
13085   cat >"conftest.$ac_ext" <<_ACEOF
13086 #line 13086 "configure"
13087 #include "confdefs.h"
13088 #include <sys/types.h>
13089  /* Check that off_t can represent 2**63 - 1 correctly.
13090     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13091     since some C++ compilers masquerading as C compilers
13092     incorrectly reject 9223372036854775807.  */
13093 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13094   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13095                        && LARGE_OFF_T % 2147483647 == 1)
13096                       ? 1 : -1];
13097 int
13098 main (void)
13099 {
13100
13101   ;
13102   return 0;
13103 }
13104 _ACEOF
13105 rm -f "conftest.$ac_objext"
13106 if { (eval echo "$as_me:13106: \"$ac_compile\"") >&5
13107   (eval $ac_compile) 2>&5
13108   ac_status=$?
13109   echo "$as_me:13109: \$? = $ac_status" >&5
13110   (exit "$ac_status"); } &&
13111          { ac_try='test -s "conftest.$ac_objext"'
13112   { (eval echo "$as_me:13112: \"$ac_try\"") >&5
13113   (eval $ac_try) 2>&5
13114   ac_status=$?
13115   echo "$as_me:13115: \$? = $ac_status" >&5
13116   (exit "$ac_status"); }; }; then
13117   break
13118 else
13119   echo "$as_me: failed program was:" >&5
13120 cat "conftest.$ac_ext" >&5
13121 fi
13122 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13123   cat >"conftest.$ac_ext" <<_ACEOF
13124 #line 13124 "configure"
13125 #include "confdefs.h"
13126 #define _FILE_OFFSET_BITS 64
13127 #include <sys/types.h>
13128  /* Check that off_t can represent 2**63 - 1 correctly.
13129     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13130     since some C++ compilers masquerading as C compilers
13131     incorrectly reject 9223372036854775807.  */
13132 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13133   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13134                        && LARGE_OFF_T % 2147483647 == 1)
13135                       ? 1 : -1];
13136 int
13137 main (void)
13138 {
13139
13140   ;
13141   return 0;
13142 }
13143 _ACEOF
13144 rm -f "conftest.$ac_objext"
13145 if { (eval echo "$as_me:13145: \"$ac_compile\"") >&5
13146   (eval $ac_compile) 2>&5
13147   ac_status=$?
13148   echo "$as_me:13148: \$? = $ac_status" >&5
13149   (exit "$ac_status"); } &&
13150          { ac_try='test -s "conftest.$ac_objext"'
13151   { (eval echo "$as_me:13151: \"$ac_try\"") >&5
13152   (eval $ac_try) 2>&5
13153   ac_status=$?
13154   echo "$as_me:13154: \$? = $ac_status" >&5
13155   (exit "$ac_status"); }; }; then
13156   ac_cv_sys_file_offset_bits=64; break
13157 else
13158   echo "$as_me: failed program was:" >&5
13159 cat "conftest.$ac_ext" >&5
13160 fi
13161 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13162   break
13163 done
13164 fi
13165 echo "$as_me:13165: result: $ac_cv_sys_file_offset_bits" >&5
13166 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13167 if test "$ac_cv_sys_file_offset_bits" != no; then
13168
13169 cat >>confdefs.h <<EOF
13170 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13171 EOF
13172
13173 fi
13174 rm -rf conftest*
13175   echo "$as_me:13175: checking for _LARGE_FILES value needed for large files" >&5
13176 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13177 if test "${ac_cv_sys_large_files+set}" = set; then
13178   echo $ECHO_N "(cached) $ECHO_C" >&6
13179 else
13180   while :; do
13181   ac_cv_sys_large_files=no
13182   cat >"conftest.$ac_ext" <<_ACEOF
13183 #line 13183 "configure"
13184 #include "confdefs.h"
13185 #include <sys/types.h>
13186  /* Check that off_t can represent 2**63 - 1 correctly.
13187     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13188     since some C++ compilers masquerading as C compilers
13189     incorrectly reject 9223372036854775807.  */
13190 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13191   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13192                        && LARGE_OFF_T % 2147483647 == 1)
13193                       ? 1 : -1];
13194 int
13195 main (void)
13196 {
13197
13198   ;
13199   return 0;
13200 }
13201 _ACEOF
13202 rm -f "conftest.$ac_objext"
13203 if { (eval echo "$as_me:13203: \"$ac_compile\"") >&5
13204   (eval $ac_compile) 2>&5
13205   ac_status=$?
13206   echo "$as_me:13206: \$? = $ac_status" >&5
13207   (exit "$ac_status"); } &&
13208          { ac_try='test -s "conftest.$ac_objext"'
13209   { (eval echo "$as_me:13209: \"$ac_try\"") >&5
13210   (eval $ac_try) 2>&5
13211   ac_status=$?
13212   echo "$as_me:13212: \$? = $ac_status" >&5
13213   (exit "$ac_status"); }; }; then
13214   break
13215 else
13216   echo "$as_me: failed program was:" >&5
13217 cat "conftest.$ac_ext" >&5
13218 fi
13219 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13220   cat >"conftest.$ac_ext" <<_ACEOF
13221 #line 13221 "configure"
13222 #include "confdefs.h"
13223 #define _LARGE_FILES 1
13224 #include <sys/types.h>
13225  /* Check that off_t can represent 2**63 - 1 correctly.
13226     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13227     since some C++ compilers masquerading as C compilers
13228     incorrectly reject 9223372036854775807.  */
13229 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13230   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13231                        && LARGE_OFF_T % 2147483647 == 1)
13232                       ? 1 : -1];
13233 int
13234 main (void)
13235 {
13236
13237   ;
13238   return 0;
13239 }
13240 _ACEOF
13241 rm -f "conftest.$ac_objext"
13242 if { (eval echo "$as_me:13242: \"$ac_compile\"") >&5
13243   (eval $ac_compile) 2>&5
13244   ac_status=$?
13245   echo "$as_me:13245: \$? = $ac_status" >&5
13246   (exit "$ac_status"); } &&
13247          { ac_try='test -s "conftest.$ac_objext"'
13248   { (eval echo "$as_me:13248: \"$ac_try\"") >&5
13249   (eval $ac_try) 2>&5
13250   ac_status=$?
13251   echo "$as_me:13251: \$? = $ac_status" >&5
13252   (exit "$ac_status"); }; }; then
13253   ac_cv_sys_large_files=1; break
13254 else
13255   echo "$as_me: failed program was:" >&5
13256 cat "conftest.$ac_ext" >&5
13257 fi
13258 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13259   break
13260 done
13261 fi
13262 echo "$as_me:13262: result: $ac_cv_sys_large_files" >&5
13263 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13264 if test "$ac_cv_sys_large_files" != no; then
13265
13266 cat >>confdefs.h <<EOF
13267 #define _LARGE_FILES $ac_cv_sys_large_files
13268 EOF
13269
13270 fi
13271 rm -rf conftest*
13272 fi
13273
13274         if test "$enable_largefile" != no ; then
13275         echo "$as_me:13275: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13276 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13277 if test "${ac_cv_sys_largefile_source+set}" = set; then
13278   echo $ECHO_N "(cached) $ECHO_C" >&6
13279 else
13280   while :; do
13281   ac_cv_sys_largefile_source=no
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;
13290   ;
13291   return 0;
13292 }
13293 _ACEOF
13294 rm -f "conftest.$ac_objext"
13295 if { (eval echo "$as_me:13295: \"$ac_compile\"") >&5
13296   (eval $ac_compile) 2>&5
13297   ac_status=$?
13298   echo "$as_me:13298: \$? = $ac_status" >&5
13299   (exit "$ac_status"); } &&
13300          { ac_try='test -s "conftest.$ac_objext"'
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   break
13307 else
13308   echo "$as_me: failed program was:" >&5
13309 cat "conftest.$ac_ext" >&5
13310 fi
13311 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13312   cat >"conftest.$ac_ext" <<_ACEOF
13313 #line 13313 "configure"
13314 #include "confdefs.h"
13315 #define _LARGEFILE_SOURCE 1
13316 #include <stdio.h>
13317 int
13318 main (void)
13319 {
13320 return !fseeko;
13321   ;
13322   return 0;
13323 }
13324 _ACEOF
13325 rm -f "conftest.$ac_objext"
13326 if { (eval echo "$as_me:13326: \"$ac_compile\"") >&5
13327   (eval $ac_compile) 2>&5
13328   ac_status=$?
13329   echo "$as_me:13329: \$? = $ac_status" >&5
13330   (exit "$ac_status"); } &&
13331          { ac_try='test -s "conftest.$ac_objext"'
13332   { (eval echo "$as_me:13332: \"$ac_try\"") >&5
13333   (eval $ac_try) 2>&5
13334   ac_status=$?
13335   echo "$as_me:13335: \$? = $ac_status" >&5
13336   (exit "$ac_status"); }; }; then
13337   ac_cv_sys_largefile_source=1; break
13338 else
13339   echo "$as_me: failed program was:" >&5
13340 cat "conftest.$ac_ext" >&5
13341 fi
13342 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13343   break
13344 done
13345 fi
13346 echo "$as_me:13346: result: $ac_cv_sys_largefile_source" >&5
13347 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13348 if test "$ac_cv_sys_largefile_source" != no; then
13349
13350 cat >>confdefs.h <<EOF
13351 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13352 EOF
13353
13354 fi
13355 rm -rf conftest*
13356
13357 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13358 # in glibc 2.1.3, but that breaks too many other things.
13359 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13360 echo "$as_me:13360: checking for fseeko" >&5
13361 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13362 if test "${ac_cv_func_fseeko+set}" = set; then
13363   echo $ECHO_N "(cached) $ECHO_C" >&6
13364 else
13365   cat >"conftest.$ac_ext" <<_ACEOF
13366 #line 13366 "configure"
13367 #include "confdefs.h"
13368 #include <stdio.h>
13369 int
13370 main (void)
13371 {
13372 return fseeko && fseeko (stdin, 0, 0);
13373   ;
13374   return 0;
13375 }
13376 _ACEOF
13377 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13378 if { (eval echo "$as_me:13378: \"$ac_link\"") >&5
13379   (eval $ac_link) 2>&5
13380   ac_status=$?
13381   echo "$as_me:13381: \$? = $ac_status" >&5
13382   (exit "$ac_status"); } &&
13383          { ac_try='test -s "conftest$ac_exeext"'
13384   { (eval echo "$as_me:13384: \"$ac_try\"") >&5
13385   (eval $ac_try) 2>&5
13386   ac_status=$?
13387   echo "$as_me:13387: \$? = $ac_status" >&5
13388   (exit "$ac_status"); }; }; then
13389   ac_cv_func_fseeko=yes
13390 else
13391   echo "$as_me: failed program was:" >&5
13392 cat "conftest.$ac_ext" >&5
13393 ac_cv_func_fseeko=no
13394 fi
13395 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13396 fi
13397 echo "$as_me:13397: result: $ac_cv_func_fseeko" >&5
13398 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13399 if test $ac_cv_func_fseeko = yes; then
13400
13401 cat >>confdefs.h <<\EOF
13402 #define HAVE_FSEEKO 1
13403 EOF
13404
13405 fi
13406
13407         # Normally we would collect these definitions in the config.h,
13408         # but (like _XOPEN_SOURCE), some environments rely on having these
13409         # defined before any of the system headers are included.  Another
13410         # case comes up with C++, e.g., on AIX the compiler compiles the
13411         # header files by themselves before looking at the body files it is
13412         # told to compile.  For ncurses, those header files do not include
13413         # the config.h
13414         if test "$ac_cv_sys_large_files" != no
13415         then
13416
13417         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13418         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13419
13420         fi
13421         if test "$ac_cv_sys_largefile_source" != no
13422         then
13423
13424         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13425         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13426
13427         fi
13428         if test "$ac_cv_sys_file_offset_bits" != no
13429         then
13430
13431         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13432         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13433
13434         fi
13435
13436         echo "$as_me:13436: checking whether to use struct dirent64" >&5
13437 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13438 if test "${cf_cv_struct_dirent64+set}" = set; then
13439   echo $ECHO_N "(cached) $ECHO_C" >&6
13440 else
13441
13442                 cat >"conftest.$ac_ext" <<_ACEOF
13443 #line 13443 "configure"
13444 #include "confdefs.h"
13445
13446 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13447 #include <sys/types.h>
13448 #include <dirent.h>
13449
13450 int
13451 main (void)
13452 {
13453
13454                 /* if transitional largefile support is setup, this is true */
13455                 extern struct dirent64 * readdir(DIR *);
13456                 struct dirent64 *x = readdir((DIR *)0);
13457                 struct dirent *y = readdir((DIR *)0);
13458                 int z = x - y;
13459                 (void)z;
13460
13461   ;
13462   return 0;
13463 }
13464 _ACEOF
13465 rm -f "conftest.$ac_objext"
13466 if { (eval echo "$as_me:13466: \"$ac_compile\"") >&5
13467   (eval $ac_compile) 2>&5
13468   ac_status=$?
13469   echo "$as_me:13469: \$? = $ac_status" >&5
13470   (exit "$ac_status"); } &&
13471          { ac_try='test -s "conftest.$ac_objext"'
13472   { (eval echo "$as_me:13472: \"$ac_try\"") >&5
13473   (eval $ac_try) 2>&5
13474   ac_status=$?
13475   echo "$as_me:13475: \$? = $ac_status" >&5
13476   (exit "$ac_status"); }; }; then
13477   cf_cv_struct_dirent64=yes
13478 else
13479   echo "$as_me: failed program was:" >&5
13480 cat "conftest.$ac_ext" >&5
13481 cf_cv_struct_dirent64=no
13482 fi
13483 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13484
13485 fi
13486 echo "$as_me:13486: result: $cf_cv_struct_dirent64" >&5
13487 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13488         test "$cf_cv_struct_dirent64" = yes &&
13489 cat >>confdefs.h <<\EOF
13490 #define HAVE_STRUCT_DIRENT64 1
13491 EOF
13492
13493         fi
13494
13495 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13496 echo "$as_me:13496: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13497 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13498
13499 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13500 if test "${enable_tparm_varargs+set}" = set; then
13501   enableval="$enable_tparm_varargs"
13502   with_tparm_varargs=$enableval
13503 else
13504   with_tparm_varargs=yes
13505 fi;
13506 echo "$as_me:13506: result: $with_tparm_varargs" >&5
13507 echo "${ECHO_T}$with_tparm_varargs" >&6
13508 NCURSES_TPARM_VARARGS=0
13509 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13510
13511 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13512 if test "$with_ticlib" != no ; then
13513 echo "$as_me:13513: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13514 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13515
13516 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13517 if test "${enable_tic_depends+set}" = set; then
13518   enableval="$enable_tic_depends"
13519   with_tic_depends=$enableval
13520 else
13521   with_tic_depends=yes
13522 fi;
13523 echo "$as_me:13523: result: $with_tic_depends" >&5
13524 echo "${ECHO_T}$with_tic_depends" >&6
13525 else
13526         with_tic_depends=no
13527 fi
13528
13529 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
13530 echo "$as_me:13530: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
13531 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
13532
13533 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13534 if test "${enable_wattr_macros+set}" = set; then
13535   enableval="$enable_wattr_macros"
13536   with_wattr_macros=$enableval
13537 else
13538   with_wattr_macros=yes
13539 fi;
13540 if [ "x$with_wattr_macros" != xyes ]; then
13541         NCURSES_WATTR_MACROS=0
13542         echo "$as_me:13542: result: yes" >&5
13543 echo "${ECHO_T}yes" >&6
13544 else
13545         NCURSES_WATTR_MACROS=1
13546         echo "$as_me:13546: result: no" >&5
13547 echo "${ECHO_T}no" >&6
13548 fi
13549
13550 echo "$as_me:13550: checking for X11 rgb file" >&5
13551 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13552
13553 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13554 if test "${with_x11_rgb+set}" = set; then
13555   withval="$with_x11_rgb"
13556   RGB_PATH=$withval
13557 else
13558   RGB_PATH=auto
13559 fi;
13560
13561 if test "x$RGB_PATH" = xauto
13562 then
13563         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13564         for cf_path in \
13565                 /opt/local/share/X11/rgb.txt \
13566                 /opt/X11/share/X11/rgb.txt \
13567                 /usr/share/X11/rgb.txt \
13568                 /usr/X11/share/X11/rgb.txt \
13569                 /usr/X11/lib/X11/rgb.txt \
13570                 /usr/lib/X11/rgb.txt \
13571                 /etc/X11/rgb.txt \
13572                 /usr/pkg/lib/X11/rgb.txt \
13573                 /usr/X11R7/lib/X11/rgb.txt \
13574                 /usr/X11R6/lib/X11/rgb.txt \
13575                 /usr/X11R5/lib/X11/rgb.txt \
13576                 /usr/X11R4/lib/X11/rgb.txt \
13577                 /usr/local/lib/X11/rgb.txt \
13578                 /usr/local/share/X11/rgb.txt \
13579                 /usr/lib64/X11/rgb.txt
13580         do
13581                 if test -f "$cf_path" ; then
13582                         RGB_PATH="$cf_path"
13583                         break
13584                 fi
13585         done
13586 else
13587         cf_path=$RGB_PATH
13588
13589 if test "x$prefix" != xNONE; then
13590         cf_path_syntax="$prefix"
13591 else
13592         cf_path_syntax="$ac_default_prefix"
13593 fi
13594
13595 case ".$cf_path" in
13596 (.\$\(*\)*|.\'*\'*)
13597         ;;
13598 (..|./*|.\\*)
13599         ;;
13600 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13601         ;;
13602 (.\$\{*prefix\}*|.\$\{*dir\}*)
13603         eval cf_path="$cf_path"
13604         case ".$cf_path" in
13605         (.NONE/*)
13606                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13607                 ;;
13608         esac
13609         ;;
13610 (.no|.NONE/*)
13611         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13612         ;;
13613 (*)
13614         { { echo "$as_me:13614: error: expected a pathname, not \"$cf_path\"" >&5
13615 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13616    { (exit 1); exit 1; }; }
13617         ;;
13618 esac
13619
13620 fi
13621
13622 echo "$as_me:13622: result: $RGB_PATH" >&5
13623 echo "${ECHO_T}$RGB_PATH" >&6
13624
13625 cat >>confdefs.h <<EOF
13626 #define RGB_PATH "$cf_path"
13627 EOF
13628
13629 no_x11_rgb=
13630 if test "$RGB_PATH" = no
13631 then
13632         no_x11_rgb="#"
13633 fi
13634
13635 ###   use option --with-bool to override bool's type
13636 echo "$as_me:13636: checking for type of bool" >&5
13637 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13638
13639 # Check whether --with-bool or --without-bool was given.
13640 if test "${with_bool+set}" = set; then
13641   withval="$with_bool"
13642   NCURSES_BOOL="$withval"
13643 else
13644   NCURSES_BOOL=auto
13645 fi;
13646 echo "$as_me:13646: result: $NCURSES_BOOL" >&5
13647 echo "${ECHO_T}$NCURSES_BOOL" >&6
13648
13649 echo "$as_me:13649: checking for alternate terminal capabilities file" >&5
13650 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13651
13652 # Check whether --with-caps or --without-caps was given.
13653 if test "${with_caps+set}" = set; then
13654   withval="$with_caps"
13655   TERMINFO_CAPS=Caps.$withval
13656 else
13657   TERMINFO_CAPS=Caps
13658 fi;
13659 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13660 echo "$as_me:13660: result: $TERMINFO_CAPS" >&5
13661 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13662
13663 ###   use option --with-chtype to override chtype's type
13664 echo "$as_me:13664: checking for type of chtype" >&5
13665 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13666
13667 # Check whether --with-chtype or --without-chtype was given.
13668 if test "${with_chtype+set}" = set; then
13669   withval="$with_chtype"
13670   NCURSES_CHTYPE="$withval"
13671 else
13672   NCURSES_CHTYPE=$cf_dft_chtype
13673 fi;
13674 echo "$as_me:13674: result: $NCURSES_CHTYPE" >&5
13675 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13676
13677 ###   use option --with-ospeed to override ospeed's type
13678 echo "$as_me:13678: checking for type of ospeed" >&5
13679 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13680
13681 # Check whether --with-ospeed or --without-ospeed was given.
13682 if test "${with_ospeed+set}" = set; then
13683   withval="$with_ospeed"
13684   NCURSES_OSPEED="$withval"
13685 else
13686   NCURSES_OSPEED=short
13687 fi;
13688 echo "$as_me:13688: result: $NCURSES_OSPEED" >&5
13689 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13690
13691 ###   use option --with-mmask-t to override mmask_t's type
13692 echo "$as_me:13692: checking for type of mmask_t" >&5
13693 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13694
13695 # Check whether --with-mmask-t or --without-mmask-t was given.
13696 if test "${with_mmask_t+set}" = set; then
13697   withval="$with_mmask_t"
13698   NCURSES_MMASK_T="$withval"
13699 else
13700   NCURSES_MMASK_T=$cf_dft_mmask_t
13701 fi;
13702 echo "$as_me:13702: result: $NCURSES_MMASK_T" >&5
13703 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13704
13705 ###   use option --with-ccharw-max to override CCHARW_MAX size
13706 echo "$as_me:13706: checking for size CCHARW_MAX" >&5
13707 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13708
13709 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13710 if test "${with_ccharw_max+set}" = set; then
13711   withval="$with_ccharw_max"
13712   NCURSES_CCHARW_MAX="$withval"
13713 else
13714   NCURSES_CCHARW_MAX=5
13715 fi;
13716 echo "$as_me:13716: result: $NCURSES_CCHARW_MAX" >&5
13717 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13718
13719 echo "$as_me:13719: checking for ANSI C header files" >&5
13720 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13721 if test "${ac_cv_header_stdc+set}" = set; then
13722   echo $ECHO_N "(cached) $ECHO_C" >&6
13723 else
13724   cat >"conftest.$ac_ext" <<_ACEOF
13725 #line 13725 "configure"
13726 #include "confdefs.h"
13727 #include <stdlib.h>
13728 #include <stdarg.h>
13729 #include <string.h>
13730 #include <float.h>
13731
13732 _ACEOF
13733 if { (eval echo "$as_me:13733: \"$ac_cpp "conftest.$ac_ext"\"") >&5
13734   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
13735   ac_status=$?
13736   $EGREP -v '^ *\+' conftest.er1 >conftest.err
13737   rm -f conftest.er1
13738   cat conftest.err >&5
13739   echo "$as_me:13739: \$? = $ac_status" >&5
13740   (exit "$ac_status"); } >/dev/null; then
13741   if test -s conftest.err; then
13742     ac_cpp_err=$ac_c_preproc_warn_flag
13743   else
13744     ac_cpp_err=
13745   fi
13746 else
13747   ac_cpp_err=yes
13748 fi
13749 if test -z "$ac_cpp_err"; then
13750   ac_cv_header_stdc=yes
13751 else
13752   echo "$as_me: failed program was:" >&5
13753   cat "conftest.$ac_ext" >&5
13754   ac_cv_header_stdc=no
13755 fi
13756 rm -f conftest.err "conftest.$ac_ext"
13757
13758 if test $ac_cv_header_stdc = yes; then
13759   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13760   cat >"conftest.$ac_ext" <<_ACEOF
13761 #line 13761 "configure"
13762 #include "confdefs.h"
13763 #include <string.h>
13764
13765 _ACEOF
13766 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13767   $EGREP "memchr" >/dev/null 2>&1; then
13768   :
13769 else
13770   ac_cv_header_stdc=no
13771 fi
13772 rm -rf conftest*
13773
13774 fi
13775
13776 if test $ac_cv_header_stdc = yes; then
13777   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13778   cat >"conftest.$ac_ext" <<_ACEOF
13779 #line 13779 "configure"
13780 #include "confdefs.h"
13781 #include <stdlib.h>
13782
13783 _ACEOF
13784 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13785   $EGREP "free" >/dev/null 2>&1; then
13786   :
13787 else
13788   ac_cv_header_stdc=no
13789 fi
13790 rm -rf conftest*
13791
13792 fi
13793
13794 if test $ac_cv_header_stdc = yes; then
13795   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13796   if test "$cross_compiling" = yes; then
13797   :
13798 else
13799   cat >"conftest.$ac_ext" <<_ACEOF
13800 #line 13800 "configure"
13801 #include "confdefs.h"
13802 #include <ctype.h>
13803 #if ((' ' & 0x0FF) == 0x020)
13804 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13805 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13806 #else
13807 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13808                      || ('j' <= (c) && (c) <= 'r') \
13809                      || ('s' <= (c) && (c) <= 'z'))
13810 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13811 #endif
13812
13813 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13814 int
13815 main (void)
13816 {
13817   int i;
13818   for (i = 0; i < 256; i++)
13819     if (XOR (islower (i), ISLOWER (i))
13820         || toupper (i) != TOUPPER (i))
13821       $ac_main_return(2);
13822   $ac_main_return (0);
13823 }
13824 _ACEOF
13825 rm -f "conftest$ac_exeext"
13826 if { (eval echo "$as_me:13826: \"$ac_link\"") >&5
13827   (eval $ac_link) 2>&5
13828   ac_status=$?
13829   echo "$as_me:13829: \$? = $ac_status" >&5
13830   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
13831   { (eval echo "$as_me:13831: \"$ac_try\"") >&5
13832   (eval $ac_try) 2>&5
13833   ac_status=$?
13834   echo "$as_me:13834: \$? = $ac_status" >&5
13835   (exit "$ac_status"); }; }; then
13836   :
13837 else
13838   echo "$as_me: program exited with status $ac_status" >&5
13839 echo "$as_me: failed program was:" >&5
13840 cat "conftest.$ac_ext" >&5
13841 ac_cv_header_stdc=no
13842 fi
13843 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
13844 fi
13845 fi
13846 fi
13847 echo "$as_me:13847: result: $ac_cv_header_stdc" >&5
13848 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13849 if test $ac_cv_header_stdc = yes; then
13850
13851 cat >>confdefs.h <<\EOF
13852 #define STDC_HEADERS 1
13853 EOF
13854
13855 fi
13856
13857 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
13858
13859 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
13860                   inttypes.h stdint.h unistd.h
13861 do
13862 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13863 echo "$as_me:13863: checking for $ac_header" >&5
13864 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13865 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13866   echo $ECHO_N "(cached) $ECHO_C" >&6
13867 else
13868   cat >"conftest.$ac_ext" <<_ACEOF
13869 #line 13869 "configure"
13870 #include "confdefs.h"
13871 $ac_includes_default
13872 #include <$ac_header>
13873 _ACEOF
13874 rm -f "conftest.$ac_objext"
13875 if { (eval echo "$as_me:13875: \"$ac_compile\"") >&5
13876   (eval $ac_compile) 2>&5
13877   ac_status=$?
13878   echo "$as_me:13878: \$? = $ac_status" >&5
13879   (exit "$ac_status"); } &&
13880          { ac_try='test -s "conftest.$ac_objext"'
13881   { (eval echo "$as_me:13881: \"$ac_try\"") >&5
13882   (eval $ac_try) 2>&5
13883   ac_status=$?
13884   echo "$as_me:13884: \$? = $ac_status" >&5
13885   (exit "$ac_status"); }; }; then
13886   eval "$as_ac_Header=yes"
13887 else
13888   echo "$as_me: failed program was:" >&5
13889 cat "conftest.$ac_ext" >&5
13890 eval "$as_ac_Header=no"
13891 fi
13892 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13893 fi
13894 echo "$as_me:13894: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
13895 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
13896 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
13897   cat >>confdefs.h <<EOF
13898 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13899 EOF
13900
13901 fi
13902 done
13903
13904 echo "$as_me:13904: checking for signed char" >&5
13905 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
13906 if test "${ac_cv_type_signed_char+set}" = set; then
13907   echo $ECHO_N "(cached) $ECHO_C" >&6
13908 else
13909   cat >"conftest.$ac_ext" <<_ACEOF
13910 #line 13910 "configure"
13911 #include "confdefs.h"
13912 $ac_includes_default
13913 int
13914 main (void)
13915 {
13916 if ((signed char *) 0)
13917   return 0;
13918 if (sizeof (signed char))
13919   return 0;
13920   ;
13921   return 0;
13922 }
13923 _ACEOF
13924 rm -f "conftest.$ac_objext"
13925 if { (eval echo "$as_me:13925: \"$ac_compile\"") >&5
13926   (eval $ac_compile) 2>&5
13927   ac_status=$?
13928   echo "$as_me:13928: \$? = $ac_status" >&5
13929   (exit "$ac_status"); } &&
13930          { ac_try='test -s "conftest.$ac_objext"'
13931   { (eval echo "$as_me:13931: \"$ac_try\"") >&5
13932   (eval $ac_try) 2>&5
13933   ac_status=$?
13934   echo "$as_me:13934: \$? = $ac_status" >&5
13935   (exit "$ac_status"); }; }; then
13936   ac_cv_type_signed_char=yes
13937 else
13938   echo "$as_me: failed program was:" >&5
13939 cat "conftest.$ac_ext" >&5
13940 ac_cv_type_signed_char=no
13941 fi
13942 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13943 fi
13944 echo "$as_me:13944: result: $ac_cv_type_signed_char" >&5
13945 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
13946
13947 echo "$as_me:13947: checking size of signed char" >&5
13948 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
13949 if test "${ac_cv_sizeof_signed_char+set}" = set; then
13950   echo $ECHO_N "(cached) $ECHO_C" >&6
13951 else
13952   if test "$ac_cv_type_signed_char" = yes; then
13953   if test "$cross_compiling" = yes; then
13954   # Depending upon the size, compute the lo and hi bounds.
13955 cat >"conftest.$ac_ext" <<_ACEOF
13956 #line 13956 "configure"
13957 #include "confdefs.h"
13958 $ac_includes_default
13959 int
13960 main (void)
13961 {
13962 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
13963   ;
13964   return 0;
13965 }
13966 _ACEOF
13967 rm -f "conftest.$ac_objext"
13968 if { (eval echo "$as_me:13968: \"$ac_compile\"") >&5
13969   (eval $ac_compile) 2>&5
13970   ac_status=$?
13971   echo "$as_me:13971: \$? = $ac_status" >&5
13972   (exit "$ac_status"); } &&
13973          { ac_try='test -s "conftest.$ac_objext"'
13974   { (eval echo "$as_me:13974: \"$ac_try\"") >&5
13975   (eval $ac_try) 2>&5
13976   ac_status=$?
13977   echo "$as_me:13977: \$? = $ac_status" >&5
13978   (exit "$ac_status"); }; }; then
13979   ac_lo=0 ac_mid=0
13980   while :; do
13981     cat >"conftest.$ac_ext" <<_ACEOF
13982 #line 13982 "configure"
13983 #include "confdefs.h"
13984 $ac_includes_default
13985 int
13986 main (void)
13987 {
13988 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13989   ;
13990   return 0;
13991 }
13992 _ACEOF
13993 rm -f "conftest.$ac_objext"
13994 if { (eval echo "$as_me:13994: \"$ac_compile\"") >&5
13995   (eval $ac_compile) 2>&5
13996   ac_status=$?
13997   echo "$as_me:13997: \$? = $ac_status" >&5
13998   (exit "$ac_status"); } &&
13999          { ac_try='test -s "conftest.$ac_objext"'
14000   { (eval echo "$as_me:14000: \"$ac_try\"") >&5
14001   (eval $ac_try) 2>&5
14002   ac_status=$?
14003   echo "$as_me:14003: \$? = $ac_status" >&5
14004   (exit "$ac_status"); }; }; then
14005   ac_hi=$ac_mid; break
14006 else
14007   echo "$as_me: failed program was:" >&5
14008 cat "conftest.$ac_ext" >&5
14009 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
14010 fi
14011 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14012   done
14013 else
14014   echo "$as_me: failed program was:" >&5
14015 cat "conftest.$ac_ext" >&5
14016 ac_hi=-1 ac_mid=-1
14017   while :; do
14018     cat >"conftest.$ac_ext" <<_ACEOF
14019 #line 14019 "configure"
14020 #include "confdefs.h"
14021 $ac_includes_default
14022 int
14023 main (void)
14024 {
14025 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14026   ;
14027   return 0;
14028 }
14029 _ACEOF
14030 rm -f "conftest.$ac_objext"
14031 if { (eval echo "$as_me:14031: \"$ac_compile\"") >&5
14032   (eval $ac_compile) 2>&5
14033   ac_status=$?
14034   echo "$as_me:14034: \$? = $ac_status" >&5
14035   (exit "$ac_status"); } &&
14036          { ac_try='test -s "conftest.$ac_objext"'
14037   { (eval echo "$as_me:14037: \"$ac_try\"") >&5
14038   (eval $ac_try) 2>&5
14039   ac_status=$?
14040   echo "$as_me:14040: \$? = $ac_status" >&5
14041   (exit "$ac_status"); }; }; then
14042   ac_lo=$ac_mid; break
14043 else
14044   echo "$as_me: failed program was:" >&5
14045 cat "conftest.$ac_ext" >&5
14046 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
14047 fi
14048 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14049   done
14050 fi
14051 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14052 # Binary search between lo and hi bounds.
14053 while test "x$ac_lo" != "x$ac_hi"; do
14054   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14055   cat >"conftest.$ac_ext" <<_ACEOF
14056 #line 14056 "configure"
14057 #include "confdefs.h"
14058 $ac_includes_default
14059 int
14060 main (void)
14061 {
14062 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14063   ;
14064   return 0;
14065 }
14066 _ACEOF
14067 rm -f "conftest.$ac_objext"
14068 if { (eval echo "$as_me:14068: \"$ac_compile\"") >&5
14069   (eval $ac_compile) 2>&5
14070   ac_status=$?
14071   echo "$as_me:14071: \$? = $ac_status" >&5
14072   (exit "$ac_status"); } &&
14073          { ac_try='test -s "conftest.$ac_objext"'
14074   { (eval echo "$as_me:14074: \"$ac_try\"") >&5
14075   (eval $ac_try) 2>&5
14076   ac_status=$?
14077   echo "$as_me:14077: \$? = $ac_status" >&5
14078   (exit "$ac_status"); }; }; then
14079   ac_hi=$ac_mid
14080 else
14081   echo "$as_me: failed program was:" >&5
14082 cat "conftest.$ac_ext" >&5
14083 ac_lo=`expr "$ac_mid" + 1`
14084 fi
14085 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14086 done
14087 ac_cv_sizeof_signed_char=$ac_lo
14088 else
14089   if test "$cross_compiling" = yes; then
14090   { { echo "$as_me:14090: error: cannot run test program while cross compiling" >&5
14091 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14092    { (exit 1); exit 1; }; }
14093 else
14094   cat >"conftest.$ac_ext" <<_ACEOF
14095 #line 14095 "configure"
14096 #include "confdefs.h"
14097 $ac_includes_default
14098 int
14099 main (void)
14100 {
14101 FILE *f = fopen ("conftest.val", "w");
14102 if (!f)
14103   $ac_main_return (1);
14104 fprintf (f, "%ld", (long)(sizeof (signed char)));
14105 fclose (f);
14106   ;
14107   return 0;
14108 }
14109 _ACEOF
14110 rm -f "conftest$ac_exeext"
14111 if { (eval echo "$as_me:14111: \"$ac_link\"") >&5
14112   (eval $ac_link) 2>&5
14113   ac_status=$?
14114   echo "$as_me:14114: \$? = $ac_status" >&5
14115   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14116   { (eval echo "$as_me:14116: \"$ac_try\"") >&5
14117   (eval $ac_try) 2>&5
14118   ac_status=$?
14119   echo "$as_me:14119: \$? = $ac_status" >&5
14120   (exit "$ac_status"); }; }; then
14121   ac_cv_sizeof_signed_char=`cat conftest.val`
14122 else
14123   echo "$as_me: program exited with status $ac_status" >&5
14124 echo "$as_me: failed program was:" >&5
14125 cat "conftest.$ac_ext" >&5
14126 fi
14127 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14128 fi
14129 fi
14130 rm -f conftest.val
14131 else
14132   ac_cv_sizeof_signed_char=0
14133 fi
14134 fi
14135 echo "$as_me:14135: result: $ac_cv_sizeof_signed_char" >&5
14136 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14137 cat >>confdefs.h <<EOF
14138 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14139 EOF
14140
14141 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14142         NCURSES_SBOOL="signed char"
14143 else
14144         NCURSES_SBOOL="char"
14145 fi
14146 echo "$as_me:14146: checking if you want to use signed Boolean array in term.h" >&5
14147 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14148
14149 # Check whether --enable-signed-char or --disable-signed-char was given.
14150 if test "${enable_signed_char+set}" = set; then
14151   enableval="$enable_signed_char"
14152   with_signed_char=$enableval
14153 else
14154   with_signed_char=no
14155 fi;
14156 echo "$as_me:14156: result: $with_signed_char" >&5
14157 echo "${ECHO_T}$with_signed_char" >&6
14158 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14159
14160 ###   use option --with-tparm-arg to override tparm's argument type
14161 echo "$as_me:14161: checking for type of tparm args" >&5
14162 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14163
14164 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14165 if test "${with_tparm_arg+set}" = set; then
14166   withval="$with_tparm_arg"
14167   NCURSES_TPARM_ARG="$withval"
14168 else
14169   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14170 fi;
14171 echo "$as_me:14171: result: $NCURSES_TPARM_ARG" >&5
14172 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14173
14174 ### Enable compiling-in rcs id's
14175 echo "$as_me:14175: checking if RCS identifiers should be compiled-in" >&5
14176 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14177
14178 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14179 if test "${with_rcs_ids+set}" = set; then
14180   withval="$with_rcs_ids"
14181   with_rcs_ids=$withval
14182 else
14183   with_rcs_ids=no
14184 fi;
14185 echo "$as_me:14185: result: $with_rcs_ids" >&5
14186 echo "${ECHO_T}$with_rcs_ids" >&6
14187 test "x$with_rcs_ids" = xyes &&
14188 cat >>confdefs.h <<\EOF
14189 #define USE_RCS_IDS 1
14190 EOF
14191
14192 ###############################################################################
14193
14194 echo "$as_me:14194: checking format of man-pages" >&5
14195 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14196
14197 # Check whether --with-manpage-format or --without-manpage-format was given.
14198 if test "${with_manpage_format+set}" = set; then
14199   withval="$with_manpage_format"
14200   MANPAGE_FORMAT=$withval
14201 else
14202   MANPAGE_FORMAT=unknown
14203 fi;
14204
14205 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14206 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14207
14208 cf_unknown=
14209
14210 case "$MANPAGE_FORMAT" in
14211 (unknown)
14212         if test -z "$MANPATH" ; then
14213                 MANPATH="/usr/man:/usr/share/man"
14214         fi
14215
14216         # look for the 'date' man-page (it's most likely to be installed!)
14217         MANPAGE_FORMAT=
14218         cf_preform="no"
14219         cf_catonly="yes"
14220         cf_example="date"
14221
14222         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14223         for cf_dir in $MANPATH; do
14224                 test -z "$cf_dir" && cf_dir=/usr/man
14225                 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
14226                 do
14227                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14228                         if test "x$cf_test" = "x$cf_name" ; then
14229
14230                                 case "$cf_name" in
14231                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14232                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14233                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14234                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14235                                 esac
14236
14237                                 case "$cf_name" in
14238                                 ($cf_dir/man*)
14239                                         cf_catonly=no
14240                                         ;;
14241                                 ($cf_dir/cat*)
14242                                         cf_preform=yes
14243                                         ;;
14244                                 esac
14245                                 break
14246                         fi
14247
14248                         # if we found a match in either man* or cat*, stop looking
14249                         if test -n "$MANPAGE_FORMAT" ; then
14250                                 cf_found=no
14251                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14252                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14253                                 case "$cf_name" in
14254                                 ($cf_dir/cat*)
14255                                         cf_found=yes
14256                                         ;;
14257                                 esac
14258                                 test "$cf_found" = yes && break
14259                         fi
14260                 done
14261                 # only check the first directory in $MANPATH where we find manpages
14262                 if test -n "$MANPAGE_FORMAT" ; then
14263                         break
14264                 fi
14265         done
14266         # if we did not find the example, just assume it is normal
14267         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14268         IFS="$ac_save_ifs"
14269         ;;
14270 (*)
14271         for cf_option in $MANPAGE_FORMAT; do
14272         case "$cf_option" in
14273         (gzip|compress|BSDI|normal|formatted|catonly)
14274                 ;;
14275         (*)
14276                 cf_unknown="$cf_unknown $cf_option"
14277                 ;;
14278         esac
14279         done
14280         ;;
14281 esac
14282
14283 echo "$as_me:14283: result: $MANPAGE_FORMAT" >&5
14284 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14285 if test -n "$cf_unknown" ; then
14286         { echo "$as_me:14286: WARNING: Unexpected manpage-format $cf_unknown" >&5
14287 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14288 fi
14289
14290 echo "$as_me:14290: checking for manpage renaming" >&5
14291 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
14292
14293 # Check whether --with-manpage-renames or --without-manpage-renames was given.
14294 if test "${with_manpage_renames+set}" = set; then
14295   withval="$with_manpage_renames"
14296   MANPAGE_RENAMES=$withval
14297 else
14298   MANPAGE_RENAMES=yes
14299 fi;
14300
14301 case ".$MANPAGE_RENAMES" in
14302 (.no)
14303         ;;
14304 (.|.yes)
14305         # Debian 'man' program?
14306         if test -f /etc/debian_version ; then
14307                 MANPAGE_RENAMES=`cd "$srcdir" && pwd`/man/man_db.renames
14308         else
14309                 MANPAGE_RENAMES=no
14310         fi
14311         ;;
14312 esac
14313
14314 if test "$MANPAGE_RENAMES" != no ; then
14315         if test -f "$srcdir/man/$MANPAGE_RENAMES" ; then
14316                 MANPAGE_RENAMES=`cd "$srcdir/man" && pwd`/$MANPAGE_RENAMES
14317         elif test ! -f "$MANPAGE_RENAMES" ; then
14318                 { { echo "$as_me:14318: error: not a filename: $MANPAGE_RENAMES" >&5
14319 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
14320    { (exit 1); exit 1; }; }
14321         fi
14322
14323         test ! -d man && mkdir man
14324
14325         # Construct a sed-script to perform renaming within man-pages
14326         if test -n "$MANPAGE_RENAMES" ; then
14327                 test ! -d man && mkdir man
14328                 $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
14329         fi
14330 fi
14331
14332 echo "$as_me:14332: result: $MANPAGE_RENAMES" >&5
14333 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14334
14335 echo "$as_me:14335: checking if manpage aliases will be installed" >&5
14336 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14337
14338 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14339 if test "${with_manpage_aliases+set}" = set; then
14340   withval="$with_manpage_aliases"
14341   MANPAGE_ALIASES=$withval
14342 else
14343   MANPAGE_ALIASES=yes
14344 fi;
14345
14346 echo "$as_me:14346: result: $MANPAGE_ALIASES" >&5
14347 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14348
14349 case "x$LN_S" in
14350 (xln*)
14351         cf_use_symlinks=yes
14352         ;;
14353 (*)
14354         cf_use_symlinks=no
14355         ;;
14356 esac
14357
14358 MANPAGE_SYMLINKS=no
14359 if test "$MANPAGE_ALIASES" = yes ; then
14360 echo "$as_me:14360: checking if manpage symlinks should be used" >&5
14361 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14362
14363 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14364 if test "${with_manpage_symlinks+set}" = set; then
14365   withval="$with_manpage_symlinks"
14366   MANPAGE_SYMLINKS=$withval
14367 else
14368   MANPAGE_SYMLINKS=$cf_use_symlinks
14369 fi;
14370
14371 if test "$$cf_use_symlinks" = no; then
14372 if test "$MANPAGE_SYMLINKS" = yes ; then
14373         { echo "$as_me:14373: WARNING: cannot make symlinks" >&5
14374 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14375         MANPAGE_SYMLINKS=no
14376 fi
14377 fi
14378
14379 echo "$as_me:14379: result: $MANPAGE_SYMLINKS" >&5
14380 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14381 fi
14382
14383 echo "$as_me:14383: checking for manpage tbl" >&5
14384 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14385
14386 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14387 if test "${with_manpage_tbl+set}" = set; then
14388   withval="$with_manpage_tbl"
14389   MANPAGE_TBL=$withval
14390 else
14391   MANPAGE_TBL=no
14392 fi;
14393
14394 echo "$as_me:14394: result: $MANPAGE_TBL" >&5
14395 echo "${ECHO_T}$MANPAGE_TBL" >&6
14396
14397 if test "$prefix" = "NONE" ; then
14398         cf_prefix="$ac_default_prefix"
14399 else
14400         cf_prefix="$prefix"
14401 fi
14402
14403 case "$MANPAGE_FORMAT" in
14404 (*catonly*)
14405         cf_format=yes
14406         cf_inboth=no
14407         ;;
14408 (*formatted*)
14409         cf_format=yes
14410         cf_inboth=yes
14411         ;;
14412 (*)
14413         cf_format=no
14414         cf_inboth=no
14415         ;;
14416 esac
14417
14418 test ! -d man && mkdir man
14419
14420 cf_so_strip=
14421 cf_compress=
14422 case "$MANPAGE_FORMAT" in
14423 (*compress*)
14424         cf_so_strip="Z"
14425         cf_compress=compress
14426         ;;
14427 (*gzip*)
14428         cf_so_strip="gz"
14429         cf_compress=gzip
14430         ;;
14431 esac
14432
14433 cf_edit_man=./edit_man.sh
14434 cf_man_alias=`pwd`/man_alias.sed
14435
14436 cat >$cf_edit_man <<CF_EOF
14437 #! $SHELL
14438 # this script is generated by the configure-script CF_MAN_PAGES macro.
14439
14440 prefix="$cf_prefix"
14441 datarootdir="$datarootdir"
14442 datadir="$datadir"
14443
14444 NCURSES_MAJOR="$NCURSES_MAJOR"
14445 NCURSES_MINOR="$NCURSES_MINOR"
14446 NCURSES_PATCH="$NCURSES_PATCH"
14447
14448 NCURSES_OSPEED="$NCURSES_OSPEED"
14449 TERMINFO="$TERMINFO"
14450
14451 INSTALL="$INSTALL"
14452 INSTALL_DATA="$INSTALL_DATA"
14453
14454 transform="$program_transform_name"
14455
14456 TMP=\${TMPDIR:=/tmp}/man\$\$
14457 trap "rm -f \$TMP" 0 1 2 3 15
14458
14459 form=\$1
14460 shift || exit 1
14461
14462 verb=\$1
14463 shift || exit 1
14464
14465 mandir=\$1
14466 shift || exit 1
14467
14468 srcdir=\$1
14469 top_srcdir=\$srcdir/..
14470 shift || exit 1
14471
14472 if test "\$form" = normal ; then
14473         if test "$cf_format" = yes ; then
14474         if test "$cf_inboth" = no ; then
14475                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14476                 exit $?
14477         fi
14478         fi
14479         cf_subdir=\$mandir/man
14480         cf_tables=$MANPAGE_TBL
14481 else
14482         cf_subdir=\$mandir/cat
14483         cf_tables=yes
14484 fi
14485
14486 # process the list of source-files
14487 for i in "\$@" ; do
14488 case \$i in
14489 (*.orig|*.rej) ;;
14490 (*.[0-9]*)
14491         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14492         if test "\$verb" = installing ; then
14493         if test ! -d "\$cf_subdir\${section}" ; then
14494                 mkdir -p "\$cf_subdir\$section"
14495         fi
14496         fi
14497
14498         # replace variables in man page
14499         if test ! -f "$cf_man_alias" ; then
14500 cat >>$cf_man_alias <<-CF_EOF2
14501                 s,@DATADIR@,\$datadir,g
14502                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14503                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14504                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14505                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14506                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14507                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14508 CF_EOF
14509
14510         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14511         do
14512                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14513                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
14514 cat >>$cf_edit_man <<-CF_EOF
14515                 s,@$cf_NAME@,$cf_name,g
14516 CF_EOF
14517         done
14518
14519 cat >>$cf_edit_man <<CF_EOF
14520 CF_EOF2
14521                 echo "...made $cf_man_alias"
14522         fi
14523
14524         aliases=
14525         cf_source=\`basename "\$i"\`
14526         inalias=\$cf_source
14527         test ! -f "\$inalias" && inalias="\$srcdir/\$inalias"
14528         if test ! -f "\$inalias" ; then
14529                 echo ".. skipped \$cf_source"
14530                 continue
14531         fi
14532 CF_EOF
14533
14534 if test "$MANPAGE_ALIASES" != no ; then
14535 cat >>$cf_edit_man <<CF_EOF
14536         nCurses=ignore.3x
14537         test "$with_curses_h" = yes && nCurses=ncurses.3x
14538         aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$inalias" |sed -f "$cf_man_alias" | sort -u; test "\$inalias" = "\$nCurses" && echo curses\`
14539 CF_EOF
14540 fi
14541
14542 if test "$MANPAGE_RENAMES" = no ; then
14543 cat >>$cf_edit_man <<CF_EOF
14544         # perform program transformations for section 1 man pages
14545         if test \$section = 1 ; then
14546                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14547         else
14548                 cf_target=\$cf_subdir\${section}/\$cf_source
14549         fi
14550 CF_EOF
14551 else
14552 cat >>$cf_edit_man <<CF_EOF
14553         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14554         if test -z "\$cf_target" ; then
14555                 echo "? missing rename for \$cf_source"
14556                 cf_target="\$cf_source"
14557         fi
14558         cf_target="\$cf_subdir\${section}/\${cf_target}"
14559
14560 CF_EOF
14561 fi
14562
14563 cat >>$cf_edit_man <<CF_EOF
14564         sed     -f "$cf_man_alias" \\
14565 CF_EOF
14566
14567 if test -f "$MANPAGE_RENAMES" ; then
14568 cat >>$cf_edit_man <<CF_EOF
14569                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
14570 CF_EOF
14571 else
14572 cat >>$cf_edit_man <<CF_EOF
14573                 < "\$i" >\$TMP
14574 CF_EOF
14575 fi
14576
14577 cat >>$cf_edit_man <<CF_EOF
14578 if test \$cf_tables = yes ; then
14579         tbl \$TMP >\$TMP.out
14580         mv \$TMP.out \$TMP
14581 fi
14582 CF_EOF
14583
14584 if test "$with_overwrite" != yes ; then
14585 cat >>$cf_edit_man <<CF_EOF
14586         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14587         mv \$TMP.out \$TMP
14588 CF_EOF
14589 fi
14590
14591 if test "$with_curses_h" != yes ; then
14592 cat >>$cf_edit_man <<CF_EOF
14593         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14594         mv \$TMP.out \$TMP
14595 CF_EOF
14596 fi
14597
14598 cat >>$cf_edit_man <<CF_EOF
14599         if test "\$form" = format ; then
14600                 nroff -man \$TMP >\$TMP.out
14601                 mv \$TMP.out \$TMP
14602         fi
14603 CF_EOF
14604
14605 if test -n "$cf_compress" ; then
14606 cat >>$cf_edit_man <<CF_EOF
14607         if test "\$verb" = installing ; then
14608         if ( "$cf_compress" -f \$TMP )
14609         then
14610                 mv \$TMP.$cf_so_strip \$TMP
14611         fi
14612         fi
14613         cf_target="\$cf_target.$cf_so_strip"
14614 CF_EOF
14615 fi
14616
14617 case "$MANPAGE_FORMAT" in
14618 (*BSDI*)
14619 cat >>$cf_edit_man <<CF_EOF
14620         if test "\$form" = format ; then
14621                 # BSDI installs only .0 suffixes in the cat directories
14622                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
14623         fi
14624 CF_EOF
14625   ;;
14626 esac
14627
14628 cat >>$cf_edit_man <<CF_EOF
14629         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
14630         if test "\$verb" = installing ; then
14631                 echo "\$verb \$cf_target"
14632                 \$INSTALL_DATA \$TMP "\$cf_target"
14633                 test -d "\$cf_subdir\${section}" &&
14634                 test -n "\$aliases" && (
14635                         cd "\$cf_subdir\${section}" && (
14636                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
14637                                 test -n "$cf_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_so_strip\$%%'\`
14638                                 cf_target=\`basename "\$cf_target"\`
14639                                 for cf_alias in \$aliases
14640                                 do
14641                                         if test "\$section" = 1 ; then
14642                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14643                                         fi
14644
14645                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14646                                                 if test -f "\$cf_alias\${suffix}" ; then
14647                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
14648                                                         then
14649                                                                 continue
14650                                                         fi
14651                                                 fi
14652                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14653 CF_EOF
14654 case "x$LN_S" in
14655 (*-f)
14656 cat >>$cf_edit_man <<CF_EOF
14657                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14658 CF_EOF
14659         ;;
14660 (*)
14661 cat >>$cf_edit_man <<CF_EOF
14662                                                 rm -f "\$cf_alias\${suffix}"
14663                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14664 CF_EOF
14665         ;;
14666 esac
14667 cat >>$cf_edit_man <<CF_EOF
14668                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14669                                                 echo ".so \$cf_source" >\$TMP
14670 CF_EOF
14671 if test -n "$cf_compress" ; then
14672 cat >>$cf_edit_man <<CF_EOF
14673                                                 if test -n "$cf_so_strip" ; then
14674                                                         "$cf_compress" -f \$TMP
14675                                                         mv \$TMP.$cf_so_strip \$TMP
14676                                                 fi
14677 CF_EOF
14678 fi
14679 cat >>$cf_edit_man <<CF_EOF
14680                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14681                                                 rm -f "\$cf_alias\${suffix}"
14682                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
14683                                         fi
14684                                 done
14685                         )
14686                 )
14687         elif test "\$verb" = removing ; then
14688                 test -f "\$cf_target" && (
14689                         echo "\$verb \$cf_target"
14690                         rm -f "\$cf_target"
14691                 )
14692                 test -d "\$cf_subdir\${section}" &&
14693                 test -n "\$aliases" && (
14694                         cd "\$cf_subdir\${section}" && (
14695                                 for cf_alias in \$aliases
14696                                 do
14697                                         if test "\$section" = 1 ; then
14698                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14699                                         fi
14700
14701                                         echo ".. \$verb alias \$cf_alias\${suffix}"
14702                                         rm -f "\$cf_alias\${suffix}"
14703                                 done
14704                         )
14705                 )
14706         else
14707 #               echo ".hy 0"
14708                 cat \$TMP
14709         fi
14710         ;;
14711 esac
14712 done
14713
14714 if test "$cf_inboth" = yes ; then
14715 if test "\$form" != format ; then
14716         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14717 fi
14718 fi
14719
14720 exit 0
14721 CF_EOF
14722 chmod 755 "$cf_edit_man"
14723
14724 ###############################################################################
14725
14726 ### Note that some functions (such as const) are normally disabled anyway.
14727 echo "$as_me:14727: checking if you want to build with function extensions" >&5
14728 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14729
14730 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14731 if test "${enable_ext_funcs+set}" = set; then
14732   enableval="$enable_ext_funcs"
14733   with_ext_funcs=$enableval
14734 else
14735   with_ext_funcs=yes
14736 fi;
14737 echo "$as_me:14737: result: $with_ext_funcs" >&5
14738 echo "${ECHO_T}$with_ext_funcs" >&6
14739 if test "x$with_ext_funcs" = xyes ; then
14740         NCURSES_EXT_FUNCS=1
14741
14742 cat >>confdefs.h <<\EOF
14743 #define NCURSES_EXT_FUNCS 1
14744 EOF
14745
14746 cat >>confdefs.h <<\EOF
14747 #define HAVE_ASSUME_DEFAULT_COLORS 1
14748 EOF
14749
14750 cat >>confdefs.h <<\EOF
14751 #define HAVE_CURSES_VERSION 1
14752 EOF
14753
14754 cat >>confdefs.h <<\EOF
14755 #define HAVE_HAS_KEY 1
14756 EOF
14757
14758 cat >>confdefs.h <<\EOF
14759 #define HAVE_RESIZETERM 1
14760 EOF
14761
14762 cat >>confdefs.h <<\EOF
14763 #define HAVE_RESIZE_TERM 1
14764 EOF
14765
14766 cat >>confdefs.h <<\EOF
14767 #define HAVE_TERM_ENTRY_H 1
14768 EOF
14769
14770 cat >>confdefs.h <<\EOF
14771 #define HAVE_USE_DEFAULT_COLORS 1
14772 EOF
14773
14774 cat >>confdefs.h <<\EOF
14775 #define HAVE_USE_EXTENDED_NAMES 1
14776 EOF
14777
14778 cat >>confdefs.h <<\EOF
14779 #define HAVE_USE_SCREEN 1
14780 EOF
14781
14782 cat >>confdefs.h <<\EOF
14783 #define HAVE_USE_WINDOW 1
14784 EOF
14785
14786 cat >>confdefs.h <<\EOF
14787 #define HAVE_WRESIZE 1
14788 EOF
14789
14790         GENERATED_EXT_FUNCS=generated
14791         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
14792 else
14793         NCURSES_EXT_FUNCS=0
14794         GENERATED_EXT_FUNCS=
14795 fi
14796
14797 echo "$as_me:14797: checking if you want to build with SCREEN extensions" >&5
14798 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
14799
14800 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
14801 if test "${enable_sp_funcs+set}" = set; then
14802   enableval="$enable_sp_funcs"
14803   with_sp_funcs=$enableval
14804 else
14805   with_sp_funcs=$cf_dft_ext_spfuncs
14806 fi;
14807 echo "$as_me:14807: result: $with_sp_funcs" >&5
14808 echo "${ECHO_T}$with_sp_funcs" >&6
14809 if test "x$with_sp_funcs" = xyes ; then
14810         NCURSES_SP_FUNCS=1
14811
14812 cat >>confdefs.h <<\EOF
14813 #define NCURSES_SP_FUNCS 1
14814 EOF
14815
14816 cat >>confdefs.h <<\EOF
14817 #define HAVE_TPUTS_SP 1
14818 EOF
14819
14820         GENERATED_SP_FUNCS=generated
14821 else
14822         NCURSES_SP_FUNCS=0
14823         GENERATED_SP_FUNCS=
14824 fi
14825
14826 echo "$as_me:14826: checking if you want to build with terminal-driver" >&5
14827 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
14828
14829 # Check whether --enable-term-driver or --disable-term-driver was given.
14830 if test "${enable_term_driver+set}" = set; then
14831   enableval="$enable_term_driver"
14832   with_term_driver=$enableval
14833 else
14834   with_term_driver=no
14835 fi;
14836 echo "$as_me:14836: result: $with_term_driver" >&5
14837 echo "${ECHO_T}$with_term_driver" >&6
14838 if test "x$with_term_driver" = xyes ; then
14839
14840 cat >>confdefs.h <<\EOF
14841 #define USE_TERM_DRIVER 1
14842 EOF
14843
14844         if test "x$with_termlib" != xno ; then
14845                 { { echo "$as_me:14845: error: The term-driver option conflicts with the termlib option" >&5
14846 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
14847    { (exit 1); exit 1; }; }
14848         fi
14849         if test "x$with_sp_funcs" != xyes ; then
14850                 { { echo "$as_me:14850: error: The term-driver option relies upon sp-funcs" >&5
14851 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
14852    { (exit 1); exit 1; }; }
14853         fi
14854 fi
14855
14856 ###   use option --enable-const to turn on use of const beyond that in XSI.
14857 echo "$as_me:14857: checking for extended use of const keyword" >&5
14858 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14859
14860 # Check whether --enable-const or --disable-const was given.
14861 if test "${enable_const+set}" = set; then
14862   enableval="$enable_const"
14863   with_ext_const=$enableval
14864 else
14865   with_ext_const=$cf_dft_ext_const
14866 fi;
14867 echo "$as_me:14867: result: $with_ext_const" >&5
14868 echo "${ECHO_T}$with_ext_const" >&6
14869 NCURSES_CONST='/*nothing*/'
14870 if test "x$with_ext_const" = xyes ; then
14871         NCURSES_CONST=const
14872 fi
14873
14874 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
14875 echo "$as_me:14875: checking if you want to use extended colors" >&5
14876 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
14877
14878 # Check whether --enable-ext-colors or --disable-ext-colors was given.
14879 if test "${enable_ext_colors+set}" = set; then
14880   enableval="$enable_ext_colors"
14881   with_ext_colors=$enableval
14882 else
14883   with_ext_colors=$cf_dft_ext_colors
14884 fi;
14885 echo "$as_me:14885: result: $with_ext_colors" >&5
14886 echo "${ECHO_T}$with_ext_colors" >&6
14887 NCURSES_EXT_COLORS=0
14888 if test "x$with_ext_colors" = xyes ; then
14889         if test "x$with_widec" != xyes ; then
14890                 { echo "$as_me:14890: WARNING: This option applies only to wide-character library" >&5
14891 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
14892         else
14893                 # cannot be ABI 5 since it changes sizeof(cchar_t)
14894
14895 if test "${with_abi_version+set}" != set; then
14896         case "$cf_cv_rel_version" in
14897         (5.*)
14898                 cf_cv_rel_version=6.0
14899                 cf_cv_abi_version=6
14900                 { echo "$as_me:14900: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14901 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14902                 ;;
14903         esac
14904 fi
14905
14906                 NCURSES_EXT_COLORS=1
14907
14908 cat >>confdefs.h <<\EOF
14909 #define NCURSES_EXT_COLORS 1
14910 EOF
14911
14912 cat >>confdefs.h <<\EOF
14913 #define HAVE_ALLOC_PAIR 1
14914 EOF
14915
14916 cat >>confdefs.h <<\EOF
14917 #define HAVE_INIT_EXTENDED_COLOR 1
14918 EOF
14919
14920 cat >>confdefs.h <<\EOF
14921 #define HAVE_RESET_COLOR_PAIRS 1
14922 EOF
14923
14924         fi
14925 fi
14926
14927 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
14928 echo "$as_me:14928: checking if you want to use extended mouse encoding" >&5
14929 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
14930
14931 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
14932 if test "${enable_ext_mouse+set}" = set; then
14933   enableval="$enable_ext_mouse"
14934   with_ext_mouse=$enableval
14935 else
14936   with_ext_mouse=$cf_dft_ext_mouse
14937 fi;
14938 echo "$as_me:14938: result: $with_ext_mouse" >&5
14939 echo "${ECHO_T}$with_ext_mouse" >&6
14940 NCURSES_MOUSE_VERSION=1
14941 if test "x$with_ext_mouse" = xyes ; then
14942         NCURSES_MOUSE_VERSION=2
14943
14944 if test "${with_abi_version+set}" != set; then
14945         case "$cf_cv_rel_version" in
14946         (5.*)
14947                 cf_cv_rel_version=6.0
14948                 cf_cv_abi_version=6
14949                 { echo "$as_me:14949: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14950 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14951                 ;;
14952         esac
14953 fi
14954
14955 fi
14956
14957 ###   use option --enable-ext-putwin to turn on extended screendumps
14958 echo "$as_me:14958: checking if you want to use extended putwin/screendump" >&5
14959 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
14960
14961 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
14962 if test "${enable_ext_putwin+set}" = set; then
14963   enableval="$enable_ext_putwin"
14964   with_ext_putwin=$enableval
14965 else
14966   with_ext_putwin=$cf_dft_ext_putwin
14967 fi;
14968 echo "$as_me:14968: result: $with_ext_putwin" >&5
14969 echo "${ECHO_T}$with_ext_putwin" >&6
14970 if test "x$with_ext_putwin" = xyes ; then
14971
14972 cat >>confdefs.h <<\EOF
14973 #define NCURSES_EXT_PUTWIN 1
14974 EOF
14975
14976 fi
14977
14978 echo "$as_me:14978: checking if you want \$NCURSES_NO_PADDING code" >&5
14979 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
14980
14981 # Check whether --enable-no-padding or --disable-no-padding was given.
14982 if test "${enable_no_padding+set}" = set; then
14983   enableval="$enable_no_padding"
14984   with_no_padding=$enableval
14985 else
14986   with_no_padding=$with_ext_funcs
14987 fi;
14988 echo "$as_me:14988: result: $with_no_padding" >&5
14989 echo "${ECHO_T}$with_no_padding" >&6
14990 test "x$with_no_padding" = xyes &&
14991 cat >>confdefs.h <<\EOF
14992 #define NCURSES_NO_PADDING 1
14993 EOF
14994
14995 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
14996 echo "$as_me:14996: checking if you want SIGWINCH handler" >&5
14997 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
14998
14999 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15000 if test "${enable_sigwinch+set}" = set; then
15001   enableval="$enable_sigwinch"
15002   with_sigwinch=$enableval
15003 else
15004   with_sigwinch=$with_ext_funcs
15005 fi;
15006 echo "$as_me:15006: result: $with_sigwinch" >&5
15007 echo "${ECHO_T}$with_sigwinch" >&6
15008 test "x$with_sigwinch" = xyes &&
15009 cat >>confdefs.h <<\EOF
15010 #define USE_SIGWINCH 1
15011 EOF
15012
15013 ###   use option --enable-tcap-names to allow user to define new capabilities
15014 echo "$as_me:15014: checking if you want user-definable terminal capabilities like termcap" >&5
15015 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15016
15017 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15018 if test "${enable_tcap_names+set}" = set; then
15019   enableval="$enable_tcap_names"
15020   with_tcap_names=$enableval
15021 else
15022   with_tcap_names=$with_ext_funcs
15023 fi;
15024 echo "$as_me:15024: result: $with_tcap_names" >&5
15025 echo "${ECHO_T}$with_tcap_names" >&6
15026 NCURSES_XNAMES=0
15027 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
15028
15029 ##############################################################################
15030
15031 echo "$as_me:15031: checking if you want to link with the pthread library" >&5
15032 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15033
15034 # Check whether --with-pthread or --without-pthread was given.
15035 if test "${with_pthread+set}" = set; then
15036   withval="$with_pthread"
15037   with_pthread=$withval
15038 else
15039   with_pthread=no
15040 fi;
15041 echo "$as_me:15041: result: $with_pthread" >&5
15042 echo "${ECHO_T}$with_pthread" >&6
15043
15044 if test "$with_pthread" != no ; then
15045         echo "$as_me:15045: checking for pthread.h" >&5
15046 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15047 if test "${ac_cv_header_pthread_h+set}" = set; then
15048   echo $ECHO_N "(cached) $ECHO_C" >&6
15049 else
15050   cat >"conftest.$ac_ext" <<_ACEOF
15051 #line 15051 "configure"
15052 #include "confdefs.h"
15053 #include <pthread.h>
15054 _ACEOF
15055 if { (eval echo "$as_me:15055: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15056   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15057   ac_status=$?
15058   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15059   rm -f conftest.er1
15060   cat conftest.err >&5
15061   echo "$as_me:15061: \$? = $ac_status" >&5
15062   (exit "$ac_status"); } >/dev/null; then
15063   if test -s conftest.err; then
15064     ac_cpp_err=$ac_c_preproc_warn_flag
15065   else
15066     ac_cpp_err=
15067   fi
15068 else
15069   ac_cpp_err=yes
15070 fi
15071 if test -z "$ac_cpp_err"; then
15072   ac_cv_header_pthread_h=yes
15073 else
15074   echo "$as_me: failed program was:" >&5
15075   cat "conftest.$ac_ext" >&5
15076   ac_cv_header_pthread_h=no
15077 fi
15078 rm -f conftest.err "conftest.$ac_ext"
15079 fi
15080 echo "$as_me:15080: result: $ac_cv_header_pthread_h" >&5
15081 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15082 if test "$ac_cv_header_pthread_h" = yes; then
15083
15084 cat >>confdefs.h <<\EOF
15085 #define HAVE_PTHREADS_H 1
15086 EOF
15087
15088         for cf_lib_pthread in pthread c_r
15089         do
15090             echo "$as_me:15090: checking if we can link with the $cf_lib_pthread library" >&5
15091 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15092             cf_save_LIBS="$LIBS"
15093
15094 cf_add_libs="$LIBS"
15095 # reverse order
15096 cf_add_0lib=
15097 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15098 # filter duplicates
15099 for cf_add_1lib in $cf_add_0lib; do
15100         for cf_add_2lib in $cf_add_libs; do
15101                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15102                         cf_add_1lib=
15103                         break
15104                 fi
15105         done
15106         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15107 done
15108 LIBS="$cf_add_libs"
15109
15110             cat >"conftest.$ac_ext" <<_ACEOF
15111 #line 15111 "configure"
15112 #include "confdefs.h"
15113
15114 #include <pthread.h>
15115
15116 int
15117 main (void)
15118 {
15119
15120                 int rc = pthread_create(0,0,0,0);
15121                 int r2 = pthread_mutexattr_settype(0, 0);
15122
15123   ;
15124   return 0;
15125 }
15126 _ACEOF
15127 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15128 if { (eval echo "$as_me:15128: \"$ac_link\"") >&5
15129   (eval $ac_link) 2>&5
15130   ac_status=$?
15131   echo "$as_me:15131: \$? = $ac_status" >&5
15132   (exit "$ac_status"); } &&
15133          { ac_try='test -s "conftest$ac_exeext"'
15134   { (eval echo "$as_me:15134: \"$ac_try\"") >&5
15135   (eval $ac_try) 2>&5
15136   ac_status=$?
15137   echo "$as_me:15137: \$? = $ac_status" >&5
15138   (exit "$ac_status"); }; }; then
15139   with_pthread=yes
15140 else
15141   echo "$as_me: failed program was:" >&5
15142 cat "conftest.$ac_ext" >&5
15143 with_pthread=no
15144 fi
15145 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15146             LIBS="$cf_save_LIBS"
15147             echo "$as_me:15147: result: $with_pthread" >&5
15148 echo "${ECHO_T}$with_pthread" >&6
15149             test "$with_pthread" = yes && break
15150         done
15151
15152         if test "$with_pthread" = yes ; then
15153
15154 cf_add_libs="$LIBS"
15155 # reverse order
15156 cf_add_0lib=
15157 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15158 # filter duplicates
15159 for cf_add_1lib in $cf_add_0lib; do
15160         for cf_add_2lib in $cf_add_libs; do
15161                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15162                         cf_add_1lib=
15163                         break
15164                 fi
15165         done
15166         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15167 done
15168 LIBS="$cf_add_libs"
15169
15170 cat >>confdefs.h <<\EOF
15171 #define HAVE_LIBPTHREADS 1
15172 EOF
15173
15174         else
15175             { { echo "$as_me:15175: error: Cannot link with pthread library" >&5
15176 echo "$as_me: error: Cannot link with pthread library" >&2;}
15177    { (exit 1); exit 1; }; }
15178         fi
15179
15180 fi
15181
15182 fi
15183
15184 if test "x$with_pthread" != xno; then
15185         echo "$as_me:15185: checking for pthread_kill" >&5
15186 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15187 if test "${ac_cv_func_pthread_kill+set}" = set; then
15188   echo $ECHO_N "(cached) $ECHO_C" >&6
15189 else
15190   cat >"conftest.$ac_ext" <<_ACEOF
15191 #line 15191 "configure"
15192 #include "confdefs.h"
15193 #define pthread_kill autoconf_temporary
15194 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15195 #undef pthread_kill
15196
15197 #ifdef __cplusplus
15198 extern "C"
15199 #endif
15200
15201 /* We use char because int might match the return type of a gcc2
15202    builtin and then its argument prototype would still apply.  */
15203 char pthread_kill (void);
15204
15205 int
15206 main (void)
15207 {
15208
15209 /* The GNU C library defines stubs for functions which it implements
15210     to always fail with ENOSYS.  Some functions are actually named
15211     something starting with __ and the normal name is an alias.  */
15212 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15213 #error found stub for pthread_kill
15214 #endif
15215
15216         return pthread_kill ();
15217   ;
15218   return 0;
15219 }
15220 _ACEOF
15221 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15222 if { (eval echo "$as_me:15222: \"$ac_link\"") >&5
15223   (eval $ac_link) 2>&5
15224   ac_status=$?
15225   echo "$as_me:15225: \$? = $ac_status" >&5
15226   (exit "$ac_status"); } &&
15227          { ac_try='test -s "conftest$ac_exeext"'
15228   { (eval echo "$as_me:15228: \"$ac_try\"") >&5
15229   (eval $ac_try) 2>&5
15230   ac_status=$?
15231   echo "$as_me:15231: \$? = $ac_status" >&5
15232   (exit "$ac_status"); }; }; then
15233   ac_cv_func_pthread_kill=yes
15234 else
15235   echo "$as_me: failed program was:" >&5
15236 cat "conftest.$ac_ext" >&5
15237 ac_cv_func_pthread_kill=no
15238 fi
15239 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15240 fi
15241 echo "$as_me:15241: result: $ac_cv_func_pthread_kill" >&5
15242 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15243 if test "$ac_cv_func_pthread_kill" = yes; then
15244
15245                 echo "$as_me:15245: checking if you want to allow EINTR in wgetch with pthreads" >&5
15246 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15247
15248 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15249 if test "${enable_pthreads_eintr+set}" = set; then
15250   enableval="$enable_pthreads_eintr"
15251   use_pthreads_eintr=$enableval
15252 else
15253   use_pthreads_eintr=no
15254 fi;
15255                 echo "$as_me:15255: result: $use_pthreads_eintr" >&5
15256 echo "${ECHO_T}$use_pthreads_eintr" >&6
15257                 if test "x$use_pthreads_eintr" = xyes ; then
15258
15259 cat >>confdefs.h <<\EOF
15260 #define USE_PTHREADS_EINTR 1
15261 EOF
15262
15263                 fi
15264 fi
15265
15266         echo "$as_me:15266: checking if you want to use weak-symbols for pthreads" >&5
15267 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15268
15269 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15270 if test "${enable_weak_symbols+set}" = set; then
15271   enableval="$enable_weak_symbols"
15272   use_weak_symbols=$enableval
15273 else
15274   use_weak_symbols=no
15275 fi;
15276         echo "$as_me:15276: result: $use_weak_symbols" >&5
15277 echo "${ECHO_T}$use_weak_symbols" >&6
15278         if test "x$use_weak_symbols" = xyes ; then
15279
15280 echo "$as_me:15280: checking if $CC supports weak symbols" >&5
15281 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15282 if test "${cf_cv_weak_symbols+set}" = set; then
15283   echo $ECHO_N "(cached) $ECHO_C" >&6
15284 else
15285
15286 cat >"conftest.$ac_ext" <<_ACEOF
15287 #line 15287 "configure"
15288 #include "confdefs.h"
15289
15290 #include <stdio.h>
15291 int
15292 main (void)
15293 {
15294
15295 #if defined(__GNUC__)
15296 #  if defined __USE_ISOC99
15297 #    define _cat_pragma(exp)    _Pragma(#exp)
15298 #    define _weak_pragma(exp)   _cat_pragma(weak name)
15299 #  else
15300 #    define _weak_pragma(exp)
15301 #  endif
15302 #  define _declare(name)        __extension__ extern __typeof__(name) name
15303 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
15304 #endif
15305
15306 weak_symbol(fopen);
15307
15308   ;
15309   return 0;
15310 }
15311 _ACEOF
15312 rm -f "conftest.$ac_objext"
15313 if { (eval echo "$as_me:15313: \"$ac_compile\"") >&5
15314   (eval $ac_compile) 2>&5
15315   ac_status=$?
15316   echo "$as_me:15316: \$? = $ac_status" >&5
15317   (exit "$ac_status"); } &&
15318          { ac_try='test -s "conftest.$ac_objext"'
15319   { (eval echo "$as_me:15319: \"$ac_try\"") >&5
15320   (eval $ac_try) 2>&5
15321   ac_status=$?
15322   echo "$as_me:15322: \$? = $ac_status" >&5
15323   (exit "$ac_status"); }; }; then
15324   cf_cv_weak_symbols=yes
15325 else
15326   echo "$as_me: failed program was:" >&5
15327 cat "conftest.$ac_ext" >&5
15328 cf_cv_weak_symbols=no
15329 fi
15330 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15331
15332 fi
15333 echo "$as_me:15333: result: $cf_cv_weak_symbols" >&5
15334 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15335
15336         else
15337                 cf_cv_weak_symbols=no
15338         fi
15339
15340         if test "x$cf_cv_weak_symbols" = xyes ; then
15341
15342 cat >>confdefs.h <<\EOF
15343 #define USE_WEAK_SYMBOLS 1
15344 EOF
15345
15346         fi
15347 fi
15348
15349 PTHREAD=
15350 if test "x$with_pthread" = "xyes" ; then
15351
15352 cat >>confdefs.h <<\EOF
15353 #define USE_PTHREADS 1
15354 EOF
15355
15356         enable_reentrant=yes
15357         if test "x$cf_cv_weak_symbols" = xyes ; then
15358                 PTHREAD=-lpthread
15359
15360 cf_add_libs="$PRIVATE_LIBS"
15361 # reverse order
15362 cf_add_0lib=
15363 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15364 # filter duplicates
15365 for cf_add_1lib in $cf_add_0lib; do
15366         for cf_add_2lib in $cf_add_libs; do
15367                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15368                         cf_add_1lib=
15369                         break
15370                 fi
15371         done
15372         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15373 done
15374 PRIVATE_LIBS="$cf_add_libs"
15375
15376         fi
15377 fi
15378
15379 # Reentrant code has to be opaque; there's little advantage to making ncurses
15380 # opaque outside of that, so there is no --enable-opaque option.  We can use
15381 # this option without --with-pthreads, but this will be always set for
15382 # pthreads.
15383 echo "$as_me:15383: checking if you want reentrant code" >&5
15384 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15385
15386 # Check whether --enable-reentrant or --disable-reentrant was given.
15387 if test "${enable_reentrant+set}" = set; then
15388   enableval="$enable_reentrant"
15389   with_reentrant=$enableval
15390 else
15391   with_reentrant=no
15392 fi;
15393 echo "$as_me:15393: result: $with_reentrant" >&5
15394 echo "${ECHO_T}$with_reentrant" >&6
15395 if test "x$with_reentrant" = xyes ; then
15396         cf_cv_enable_reentrant=1
15397         cf_cv_enable_opaque="NCURSES_INTERNALS"
15398         NCURSES_SIZE_T=int
15399         if test "x$cf_cv_weak_symbols" = xyes ; then
15400
15401 # remove pthread library from $LIBS
15402 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15403
15404 cf_add_libs="$TEST_LIBS"
15405 # reverse order
15406 cf_add_0lib=
15407 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15408 # filter duplicates
15409 for cf_add_1lib in $cf_add_0lib; do
15410         for cf_add_2lib in $cf_add_libs; do
15411                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15412                         cf_add_1lib=
15413                         break
15414                 fi
15415         done
15416         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15417 done
15418 TEST_LIBS="$cf_add_libs"
15419
15420 cf_add_libs="$TEST_LIBS2"
15421 # reverse order
15422 cf_add_0lib=
15423 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15424 # filter duplicates
15425 for cf_add_1lib in $cf_add_0lib; do
15426         for cf_add_2lib in $cf_add_libs; do
15427                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15428                         cf_add_1lib=
15429                         break
15430                 fi
15431         done
15432         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15433 done
15434 TEST_LIBS2="$cf_add_libs"
15435
15436 cf_add_libs="$PRIVATE_LIBS"
15437 # reverse order
15438 cf_add_0lib=
15439 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15440 # filter duplicates
15441 for cf_add_1lib in $cf_add_0lib; do
15442         for cf_add_2lib in $cf_add_libs; do
15443                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15444                         cf_add_1lib=
15445                         break
15446                 fi
15447         done
15448         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15449 done
15450 PRIVATE_LIBS="$cf_add_libs"
15451
15452         else
15453                 # when not using weak symbols but with_reentrant,
15454                 # add 't' to the library suffix on all platforms
15455                 # except cygwin, where we only do that if ALSO
15456                 # compiling with full thread support.
15457                 case "$host" in
15458                 (*cygwin* | *msys*)
15459                         if test "$with_pthread" = "yes" ; then
15460                                 if test "x$disable_lib_suffixes" = "xno" ; then
15461                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15462                                 fi
15463                         fi ;;
15464                 (*)
15465                         if test "x$disable_lib_suffixes" = "xno" ; then
15466                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15467                         fi
15468                         ;;
15469                 esac
15470         fi
15471
15472 cat >>confdefs.h <<\EOF
15473 #define USE_REENTRANT 1
15474 EOF
15475
15476 if test "${with_abi_version+set}" != set; then
15477         case "$cf_cv_rel_version" in
15478         (5.*)
15479                 cf_cv_rel_version=6.0
15480                 cf_cv_abi_version=6
15481                 { echo "$as_me:15481: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15482 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15483                 ;;
15484         esac
15485 fi
15486
15487 else
15488         cf_cv_enable_reentrant=0
15489         cf_cv_enable_opaque="NCURSES_OPAQUE"
15490         NCURSES_SIZE_T=short
15491 fi
15492
15493 echo "$as_me:15493: checking if you want opaque curses-library structures" >&5
15494 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15495
15496 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15497 if test "${enable_opaque_curses+set}" = set; then
15498   enableval="$enable_opaque_curses"
15499   test "$enableval" != yes && enableval=no
15500         if test "$enableval" != "no" ; then
15501     enable_opaque_curses=yes
15502         else
15503
15504          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15505          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15506
15507         fi
15508 else
15509   enableval=no
15510
15511          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15512          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15513
15514 fi;
15515 echo "$as_me:15515: result: $enable_opaque_curses" >&5
15516 echo "${ECHO_T}$enable_opaque_curses" >&6
15517
15518 test "$cf_cv_enable_reentrant" = 1 && \
15519 test "$enable_opaque_curses" = no && \
15520 { { echo "$as_me:15520: error: reentrant configuration requires opaque library" >&5
15521 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15522    { (exit 1); exit 1; }; }
15523
15524 echo "$as_me:15524: checking if you want opaque form-library structures" >&5
15525 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15526
15527 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15528 if test "${enable_opaque_form+set}" = set; then
15529   enableval="$enable_opaque_form"
15530   enable_opaque_form=yes
15531 else
15532   enable_opaque_form=no
15533 fi;
15534 echo "$as_me:15534: result: $enable_opaque_form" >&5
15535 echo "${ECHO_T}$enable_opaque_form" >&6
15536
15537 echo "$as_me:15537: checking if you want opaque menu-library structures" >&5
15538 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15539
15540 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15541 if test "${enable_opaque_menu+set}" = set; then
15542   enableval="$enable_opaque_menu"
15543   enable_opaque_menu=yes
15544 else
15545   enable_opaque_menu=no
15546 fi;
15547 echo "$as_me:15547: result: $enable_opaque_menu" >&5
15548 echo "${ECHO_T}$enable_opaque_menu" >&6
15549
15550 echo "$as_me:15550: checking if you want opaque panel-library structures" >&5
15551 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15552
15553 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15554 if test "${enable_opaque_panel+set}" = set; then
15555   enableval="$enable_opaque_panel"
15556   enable_opaque_panel=yes
15557 else
15558   enable_opaque_panel=no
15559 fi;
15560 echo "$as_me:15560: result: $enable_opaque_panel" >&5
15561 echo "${ECHO_T}$enable_opaque_panel" >&6
15562
15563 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15564 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15565 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15566 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15567
15568 ### Allow using a different wrap-prefix
15569 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15570         echo "$as_me:15570: checking for prefix used to wrap public variables" >&5
15571 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15572
15573 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15574 if test "${with_wrap_prefix+set}" = set; then
15575   withval="$with_wrap_prefix"
15576   NCURSES_WRAP_PREFIX=$withval
15577 else
15578   NCURSES_WRAP_PREFIX=_nc_
15579 fi;
15580         echo "$as_me:15580: result: $NCURSES_WRAP_PREFIX" >&5
15581 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15582 else
15583         NCURSES_WRAP_PREFIX=_nc_
15584 fi
15585
15586 cat >>confdefs.h <<EOF
15587 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15588 EOF
15589
15590 ###############################################################################
15591 # These options are relatively safe to experiment with.
15592
15593 echo "$as_me:15593: checking if you want all development code" >&5
15594 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15595
15596 # Check whether --with-develop or --without-develop was given.
15597 if test "${with_develop+set}" = set; then
15598   withval="$with_develop"
15599   with_develop=$withval
15600 else
15601   with_develop=no
15602 fi;
15603 echo "$as_me:15603: result: $with_develop" >&5
15604 echo "${ECHO_T}$with_develop" >&6
15605
15606 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15607 echo "$as_me:15607: checking if you want hard-tabs code" >&5
15608 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15609
15610 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15611 if test "${enable_hard_tabs+set}" = set; then
15612   enableval="$enable_hard_tabs"
15613
15614 else
15615   enable_hard_tabs=$with_develop
15616 fi;
15617 echo "$as_me:15617: result: $enable_hard_tabs" >&5
15618 echo "${ECHO_T}$enable_hard_tabs" >&6
15619 test "x$enable_hard_tabs" = xyes &&
15620 cat >>confdefs.h <<\EOF
15621 #define USE_HARD_TABS 1
15622 EOF
15623
15624 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15625 echo "$as_me:15625: checking if you want limited support for xmc" >&5
15626 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15627
15628 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15629 if test "${enable_xmc_glitch+set}" = set; then
15630   enableval="$enable_xmc_glitch"
15631
15632 else
15633   enable_xmc_glitch=$with_develop
15634 fi;
15635 echo "$as_me:15635: result: $enable_xmc_glitch" >&5
15636 echo "${ECHO_T}$enable_xmc_glitch" >&6
15637 test "x$enable_xmc_glitch" = xyes &&
15638 cat >>confdefs.h <<\EOF
15639 #define USE_XMC_SUPPORT 1
15640 EOF
15641
15642 ###############################################################################
15643 # These are just experimental, probably should not be in a package:
15644
15645 echo "$as_me:15645: checking if you do not want to assume colors are white-on-black" >&5
15646 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15647
15648 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15649 if test "${enable_assumed_color+set}" = set; then
15650   enableval="$enable_assumed_color"
15651   with_assumed_color=$enableval
15652 else
15653   with_assumed_color=yes
15654 fi;
15655 echo "$as_me:15655: result: $with_assumed_color" >&5
15656 echo "${ECHO_T}$with_assumed_color" >&6
15657 test "x$with_assumed_color" = xyes &&
15658 cat >>confdefs.h <<\EOF
15659 #define USE_ASSUMED_COLOR 1
15660 EOF
15661
15662 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15663 echo "$as_me:15663: checking if you want hashmap scrolling-optimization code" >&5
15664 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15665
15666 # Check whether --enable-hashmap or --disable-hashmap was given.
15667 if test "${enable_hashmap+set}" = set; then
15668   enableval="$enable_hashmap"
15669   with_hashmap=$enableval
15670 else
15671   with_hashmap=yes
15672 fi;
15673 echo "$as_me:15673: result: $with_hashmap" >&5
15674 echo "${ECHO_T}$with_hashmap" >&6
15675 test "x$with_hashmap" = xyes &&
15676 cat >>confdefs.h <<\EOF
15677 #define USE_HASHMAP 1
15678 EOF
15679
15680 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15681 echo "$as_me:15681: checking if you want colorfgbg code" >&5
15682 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15683
15684 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15685 if test "${enable_colorfgbg+set}" = set; then
15686   enableval="$enable_colorfgbg"
15687   with_colorfgbg=$enableval
15688 else
15689   with_colorfgbg=no
15690 fi;
15691 echo "$as_me:15691: result: $with_colorfgbg" >&5
15692 echo "${ECHO_T}$with_colorfgbg" >&6
15693 test "x$with_colorfgbg" = xyes &&
15694 cat >>confdefs.h <<\EOF
15695 #define USE_COLORFGBG 1
15696 EOF
15697
15698 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
15699 echo "$as_me:15699: checking if you want to use gcc -fvisibility option" >&5
15700 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
15701
15702 # Check whether --enable-fvisibility or --disable-fvisibility was given.
15703 if test "${enable_fvisibility+set}" = set; then
15704   enableval="$enable_fvisibility"
15705   cf_with_fvisibility=$enableval
15706 else
15707   cf_with_fvisibility=no
15708 fi;
15709 echo "$as_me:15709: result: $cf_with_fvisibility" >&5
15710 echo "${ECHO_T}$cf_with_fvisibility" >&6
15711
15712 NCURSES_IMPEXP=
15713 NCURSES_CXX_IMPEXP=
15714 if test "x$cf_with_fvisibility" = xyes; then
15715
15716 echo "$as_me:15716: checking if $CC -fvisibility=hidden option works" >&5
15717 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
15718 if test "${cf_cv_fvisibility_hidden+set}" = set; then
15719   echo $ECHO_N "(cached) $ECHO_C" >&6
15720 else
15721
15722     cf_save_cflags="$CFLAGS"
15723     CFLAGS="$CFLAGS -fvisibility=hidden"
15724     cat >"conftest.$ac_ext" <<_ACEOF
15725 #line 15725 "configure"
15726 #include "confdefs.h"
15727
15728 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15729
15730 int
15731 main (void)
15732 {
15733
15734         if (somefunc()) return 1;
15735
15736   ;
15737   return 0;
15738 }
15739 _ACEOF
15740 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15741 if { (eval echo "$as_me:15741: \"$ac_link\"") >&5
15742   (eval $ac_link) 2>&5
15743   ac_status=$?
15744   echo "$as_me:15744: \$? = $ac_status" >&5
15745   (exit "$ac_status"); } &&
15746          { ac_try='test -s "conftest$ac_exeext"'
15747   { (eval echo "$as_me:15747: \"$ac_try\"") >&5
15748   (eval $ac_try) 2>&5
15749   ac_status=$?
15750   echo "$as_me:15750: \$? = $ac_status" >&5
15751   (exit "$ac_status"); }; }; then
15752   cf_cv_fvisibility_hidden=yes
15753 else
15754   echo "$as_me: failed program was:" >&5
15755 cat "conftest.$ac_ext" >&5
15756 cf_cv_fvisibility_hidden=no
15757 fi
15758 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15759     CFLAGS=$cf_save_cflags
15760
15761 fi
15762 echo "$as_me:15762: result: $cf_cv_fvisibility_hidden" >&5
15763 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
15764
15765         if test "x$cf_cv_fvisibility_hidden" = xyes
15766         then
15767
15768 cf_fix_cppflags=no
15769 cf_new_cflags=
15770 cf_new_cppflags=
15771 cf_new_extra_cppflags=
15772
15773 for cf_add_cflags in -fvisibility=hidden
15774 do
15775 case "$cf_fix_cppflags" in
15776 (no)
15777         case "$cf_add_cflags" in
15778         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15779                 case "$cf_add_cflags" in
15780                 (-D*)
15781                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15782
15783                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15784                                 && test -z "${cf_tst_cflags}" \
15785                                 && cf_fix_cppflags=yes
15786
15787                         if test "$cf_fix_cppflags" = yes ; then
15788
15789         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15790         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15791
15792                                 continue
15793                         elif test "${cf_tst_cflags}" = "\"'" ; then
15794
15795         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15796         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15797
15798                                 continue
15799                         fi
15800                         ;;
15801                 esac
15802                 case "$CPPFLAGS" in
15803                 (*$cf_add_cflags)
15804                         ;;
15805                 (*)
15806                         case "$cf_add_cflags" in
15807                         (-D*)
15808                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15809
15810 CPPFLAGS=`echo "$CPPFLAGS" | \
15811         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15812                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15813
15814                                 ;;
15815                         esac
15816
15817         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15818         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15819
15820                         ;;
15821                 esac
15822                 ;;
15823         (*)
15824
15825         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15826         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15827
15828                 ;;
15829         esac
15830         ;;
15831 (yes)
15832
15833         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15834         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15835
15836         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15837
15838         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15839                 && test -z "${cf_tst_cflags}" \
15840                 && cf_fix_cppflags=no
15841         ;;
15842 esac
15843 done
15844
15845 if test -n "$cf_new_cflags" ; then
15846
15847         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15848         CFLAGS="${CFLAGS}$cf_new_cflags"
15849
15850 fi
15851
15852 if test -n "$cf_new_cppflags" ; then
15853
15854         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15855         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15856
15857 fi
15858
15859 if test -n "$cf_new_extra_cppflags" ; then
15860
15861         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15862         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15863
15864 fi
15865
15866                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
15867         fi
15868         if test -n "$CXX"
15869         then
15870                 ac_ext=cc
15871 ac_cpp='$CXXCPP $CPPFLAGS'
15872 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
15873 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
15874 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15875 ac_main_return="return"
15876
15877 echo "$as_me:15877: checking if $CXX -fvisibility=hidden option works" >&5
15878 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
15879 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
15880   echo $ECHO_N "(cached) $ECHO_C" >&6
15881 else
15882
15883     cf_save_cflags="$CXXFLAGS"
15884     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
15885     cat >"conftest.$ac_ext" <<_ACEOF
15886 #line 15886 "configure"
15887 #include "confdefs.h"
15888
15889 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15890
15891 int
15892 main (void)
15893 {
15894
15895         if (somefunc()) return 1;
15896
15897   ;
15898   return 0;
15899 }
15900 _ACEOF
15901 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15902 if { (eval echo "$as_me:15902: \"$ac_link\"") >&5
15903   (eval $ac_link) 2>&5
15904   ac_status=$?
15905   echo "$as_me:15905: \$? = $ac_status" >&5
15906   (exit "$ac_status"); } &&
15907          { ac_try='test -s "conftest$ac_exeext"'
15908   { (eval echo "$as_me:15908: \"$ac_try\"") >&5
15909   (eval $ac_try) 2>&5
15910   ac_status=$?
15911   echo "$as_me:15911: \$? = $ac_status" >&5
15912   (exit "$ac_status"); }; }; then
15913   cf_cv_fvisibility_hidden2=yes
15914 else
15915   echo "$as_me: failed program was:" >&5
15916 cat "conftest.$ac_ext" >&5
15917 cf_cv_fvisibility_hidden2=no
15918 fi
15919 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15920     CXXFLAGS=$cf_save_cflags
15921
15922 fi
15923 echo "$as_me:15923: result: $cf_cv_fvisibility_hidden2" >&5
15924 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
15925
15926                 if test "x$cf_cv_fvisibility_hidden2" = xyes
15927                 then
15928
15929 cf_save_CXXFLAGS="$CFLAGS"
15930 CFLAGS="$CXXFLAGS"
15931
15932 cf_fix_cppflags=no
15933 cf_new_cflags=
15934 cf_new_cppflags=
15935 cf_new_extra_cppflags=
15936
15937 for cf_add_cflags in -fvisibility=hidden
15938 do
15939 case "$cf_fix_cppflags" in
15940 (no)
15941         case "$cf_add_cflags" in
15942         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15943                 case "$cf_add_cflags" in
15944                 (-D*)
15945                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15946
15947                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15948                                 && test -z "${cf_tst_cflags}" \
15949                                 && cf_fix_cppflags=yes
15950
15951                         if test "$cf_fix_cppflags" = yes ; then
15952
15953         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15954         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15955
15956                                 continue
15957                         elif test "${cf_tst_cflags}" = "\"'" ; then
15958
15959         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15960         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15961
15962                                 continue
15963                         fi
15964                         ;;
15965                 esac
15966                 case "$CPPFLAGS" in
15967                 (*$cf_add_cflags)
15968                         ;;
15969                 (*)
15970                         case "$cf_add_cflags" in
15971                         (-D*)
15972                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15973
15974 CPPFLAGS=`echo "$CPPFLAGS" | \
15975         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15976                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15977
15978                                 ;;
15979                         esac
15980
15981         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15982         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15983
15984                         ;;
15985                 esac
15986                 ;;
15987         (*)
15988
15989         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15990         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15991
15992                 ;;
15993         esac
15994         ;;
15995 (yes)
15996
15997         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15998         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15999
16000         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16001
16002         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16003                 && test -z "${cf_tst_cflags}" \
16004                 && cf_fix_cppflags=no
16005         ;;
16006 esac
16007 done
16008
16009 if test -n "$cf_new_cflags" ; then
16010
16011         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16012         CFLAGS="${CFLAGS}$cf_new_cflags"
16013
16014 fi
16015
16016 if test -n "$cf_new_cppflags" ; then
16017
16018         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16019         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16020
16021 fi
16022
16023 if test -n "$cf_new_extra_cppflags" ; then
16024
16025         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16026         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16027
16028 fi
16029
16030 CXXFLAGS="$CFLAGS"
16031 CFLAGS="$cf_save_CXXFLAGS"
16032
16033                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16034                 fi
16035                 ac_ext=c
16036 ac_cpp='$CPP $CPPFLAGS'
16037 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16038 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16039 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16040 ac_main_return="return"
16041
16042         fi
16043 fi
16044
16045 ###   use option --enable-interop to turn on use of bindings used for interop
16046 echo "$as_me:16046: checking if you want interop bindings" >&5
16047 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16048
16049 # Check whether --enable-interop or --disable-interop was given.
16050 if test "${enable_interop+set}" = set; then
16051   enableval="$enable_interop"
16052   with_exp_interop=$enableval
16053 else
16054   with_exp_interop=$cf_dft_interop
16055 fi;
16056 echo "$as_me:16056: result: $with_exp_interop" >&5
16057 echo "${ECHO_T}$with_exp_interop" >&6
16058
16059 NCURSES_INTEROP_FUNCS=0
16060 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16061
16062 echo "$as_me:16062: checking if you want experimental safe-sprintf code" >&5
16063 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16064
16065 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16066 if test "${enable_safe_sprintf+set}" = set; then
16067   enableval="$enable_safe_sprintf"
16068   with_safe_sprintf=$enableval
16069 else
16070   with_safe_sprintf=no
16071 fi;
16072 echo "$as_me:16072: result: $with_safe_sprintf" >&5
16073 echo "${ECHO_T}$with_safe_sprintf" >&6
16074
16075 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16076 # when hashmap is used scroll hints are useless
16077 if test "$with_hashmap" = no ; then
16078 echo "$as_me:16078: checking if you want to experiment without scrolling-hints code" >&5
16079 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16080
16081 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16082 if test "${enable_scroll_hints+set}" = set; then
16083   enableval="$enable_scroll_hints"
16084   with_scroll_hints=$enableval
16085 else
16086   with_scroll_hints=yes
16087 fi;
16088 echo "$as_me:16088: result: $with_scroll_hints" >&5
16089 echo "${ECHO_T}$with_scroll_hints" >&6
16090 test "x$with_scroll_hints" = xyes &&
16091 cat >>confdefs.h <<\EOF
16092 #define USE_SCROLL_HINTS 1
16093 EOF
16094
16095 fi
16096
16097 echo "$as_me:16097: checking if you want wgetch-events code" >&5
16098 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16099
16100 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16101 if test "${enable_wgetch_events+set}" = set; then
16102   enableval="$enable_wgetch_events"
16103   with_wgetch_events=$enableval
16104 else
16105   with_wgetch_events=no
16106 fi;
16107 echo "$as_me:16107: result: $with_wgetch_events" >&5
16108 echo "${ECHO_T}$with_wgetch_events" >&6
16109 if test "x$with_wgetch_events" = xyes ; then
16110
16111 cat >>confdefs.h <<\EOF
16112 #define NCURSES_WGETCH_EVENTS 1
16113 EOF
16114
16115         NCURSES_WGETCH_EVENTS=1
16116 else
16117         NCURSES_WGETCH_EVENTS=0
16118 fi
16119
16120 case "$cf_cv_system_name" in
16121 (*mingw32*|*mingw64*|*-msvc*)
16122         echo "$as_me:16122: checking if you want experimental-Windows driver" >&5
16123 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16124
16125 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16126 if test "${enable_exp_win32+set}" = set; then
16127   enableval="$enable_exp_win32"
16128   with_exp_win32=$enableval
16129 else
16130   with_exp_win32=no
16131 fi;
16132         echo "$as_me:16132: result: $with_exp_win32" >&5
16133 echo "${ECHO_T}$with_exp_win32" >&6
16134         if test "x$with_exp_win32" = xyes
16135         then
16136
16137 cat >>confdefs.h <<\EOF
16138 #define EXP_WIN32_DRIVER 1
16139 EOF
16140
16141                 EXP_WIN32_DRIVER=1
16142                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16143         else
16144                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16145                 EXP_WIN32_DRIVER=0
16146         fi
16147         ;;
16148 (*)
16149         EXP_WIN32_DRIVER=0
16150         INTERNALS_HDR=
16151         ;;
16152 esac
16153
16154 ###############################################################################
16155
16156 ###     use option --disable-echo to suppress full display compiling commands
16157
16158 echo "$as_me:16158: checking if you want to see long compiling messages" >&5
16159 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16160
16161 # Check whether --enable-echo or --disable-echo was given.
16162 if test "${enable_echo+set}" = set; then
16163   enableval="$enable_echo"
16164   test "$enableval" != no && enableval=yes
16165         if test "$enableval" != "yes" ; then
16166
16167         ECHO_LT='--silent'
16168         ECHO_LD='@echo linking $@;'
16169         RULE_CC='@echo compiling $<'
16170         SHOW_CC='@echo compiling $@'
16171         ECHO_CC='@'
16172
16173         else
16174
16175         ECHO_LT=''
16176         ECHO_LD=''
16177         RULE_CC=''
16178         SHOW_CC=''
16179         ECHO_CC=''
16180
16181         fi
16182 else
16183   enableval=yes
16184
16185         ECHO_LT=''
16186         ECHO_LD=''
16187         RULE_CC=''
16188         SHOW_CC=''
16189         ECHO_CC=''
16190
16191 fi;
16192 echo "$as_me:16192: result: $enableval" >&5
16193 echo "${ECHO_T}$enableval" >&6
16194
16195 if test "x$enable_echo" = xyes; then
16196         ECHO_LINK=
16197 else
16198         ECHO_LINK='@ echo linking $@ ... ;'
16199         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16200         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16201 fi
16202
16203 # --disable-stripping is used for debugging
16204
16205 echo "$as_me:16205: checking if you want to install stripped executables" >&5
16206 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16207
16208 # Check whether --enable-stripping or --disable-stripping was given.
16209 if test "${enable_stripping+set}" = set; then
16210   enableval="$enable_stripping"
16211   test "$enableval" != no && enableval=yes
16212         if test "$enableval" != "yes" ; then
16213     enable_stripping=no
16214         else
16215                 enable_stripping=yes
16216         fi
16217 else
16218   enableval=yes
16219         enable_stripping=yes
16220
16221 fi;
16222 echo "$as_me:16222: result: $enable_stripping" >&5
16223 echo "${ECHO_T}$enable_stripping" >&6
16224
16225 if test "$enable_stripping" = yes
16226 then
16227         INSTALL_OPT_S="-s"
16228 else
16229         INSTALL_OPT_S=
16230 fi
16231
16232 : "${INSTALL:=install}"
16233 echo "$as_me:16233: checking if install accepts -p option" >&5
16234 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16235 if test "${cf_cv_install_p+set}" = set; then
16236   echo $ECHO_N "(cached) $ECHO_C" >&6
16237 else
16238
16239         rm -rf ./conftest*
16240         date >conftest.in
16241         mkdir conftest.out
16242         sleep 3
16243         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16244         then
16245                 if test -f conftest.out/conftest.in
16246                 then
16247                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16248                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16249                         if test -s conftest.err
16250                         then
16251                                 cf_cv_install_p=no
16252                         else
16253                                 cf_cv_install_p=yes
16254                         fi
16255                 else
16256                         cf_cv_install_p=no
16257                 fi
16258         else
16259                 cf_cv_install_p=no
16260         fi
16261         rm -rf ./conftest*
16262
16263 fi
16264 echo "$as_me:16264: result: $cf_cv_install_p" >&5
16265 echo "${ECHO_T}$cf_cv_install_p" >&6
16266
16267 echo "$as_me:16267: checking if install needs to be told about ownership" >&5
16268 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16269 case `$ac_config_guess` in
16270 (*minix)
16271         with_install_o=yes
16272         ;;
16273 (*)
16274         with_install_o=no
16275         ;;
16276 esac
16277
16278 echo "$as_me:16278: result: $with_install_o" >&5
16279 echo "${ECHO_T}$with_install_o" >&6
16280 if test "x$with_install_o" = xyes
16281 then
16282         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'`"
16283 else
16284         INSTALL_OPT_O=
16285 fi
16286
16287 # If we're avoiding relinking of shared libraries during install, that is to
16288 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16289 # the install program has "-p" (for preserving timestamps).
16290 cf_cv_do_reranlib=yes
16291 if test "x$cf_cv_install_p" = xyes
16292 then
16293         if test "x$cf_cv_do_relink" != xyes
16294         then
16295                 cf_cv_do_reranlib=no
16296                 INSTALL_OPT_P="-p"
16297                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
16298         fi
16299 fi
16300
16301 ###     use option --enable-warnings to turn on all gcc warnings
16302
16303 echo "$as_me:16303: checking if you want to use C11 _Noreturn feature" >&5
16304 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
16305
16306 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
16307 if test "${enable_stdnoreturn+set}" = set; then
16308   enableval="$enable_stdnoreturn"
16309   test "$enableval" != yes && enableval=no
16310         if test "$enableval" != "no" ; then
16311     enable_stdnoreturn=yes
16312         else
16313                 enable_stdnoreturn=no
16314         fi
16315 else
16316   enableval=no
16317         enable_stdnoreturn=no
16318
16319 fi;
16320 echo "$as_me:16320: result: $enable_stdnoreturn" >&5
16321 echo "${ECHO_T}$enable_stdnoreturn" >&6
16322
16323 if test $enable_stdnoreturn = yes; then
16324 echo "$as_me:16324: checking for C11 _Noreturn feature" >&5
16325 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
16326 if test "${cf_cv_c11_noreturn+set}" = set; then
16327   echo $ECHO_N "(cached) $ECHO_C" >&6
16328 else
16329   cat >"conftest.$ac_ext" <<_ACEOF
16330 #line 16330 "configure"
16331 #include "confdefs.h"
16332
16333 #include <stdio.h>
16334 #include <stdlib.h>
16335 #include <stdnoreturn.h>
16336 static _Noreturn void giveup(void) { exit(0); }
16337
16338 int
16339 main (void)
16340 {
16341 if (feof(stdin)) giveup()
16342   ;
16343   return 0;
16344 }
16345 _ACEOF
16346 rm -f "conftest.$ac_objext"
16347 if { (eval echo "$as_me:16347: \"$ac_compile\"") >&5
16348   (eval $ac_compile) 2>&5
16349   ac_status=$?
16350   echo "$as_me:16350: \$? = $ac_status" >&5
16351   (exit "$ac_status"); } &&
16352          { ac_try='test -s "conftest.$ac_objext"'
16353   { (eval echo "$as_me:16353: \"$ac_try\"") >&5
16354   (eval $ac_try) 2>&5
16355   ac_status=$?
16356   echo "$as_me:16356: \$? = $ac_status" >&5
16357   (exit "$ac_status"); }; }; then
16358   cf_cv_c11_noreturn=yes
16359 else
16360   echo "$as_me: failed program was:" >&5
16361 cat "conftest.$ac_ext" >&5
16362 cf_cv_c11_noreturn=no
16363 fi
16364 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16365
16366 fi
16367 echo "$as_me:16367: result: $cf_cv_c11_noreturn" >&5
16368 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
16369 else
16370         cf_cv_c11_noreturn=no,
16371 fi
16372
16373 if test "$cf_cv_c11_noreturn" = yes; then
16374
16375 cat >>confdefs.h <<\EOF
16376 #define HAVE_STDNORETURN_H 1
16377 EOF
16378
16379 cat >>confdefs.h <<EOF
16380 #define STDC_NORETURN _Noreturn
16381 EOF
16382
16383         HAVE_STDNORETURN_H=1
16384 else
16385         HAVE_STDNORETURN_H=0
16386 fi
16387
16388 if test "$GCC" = yes || test "$GXX" = yes
16389 then
16390
16391 if test "$GCC" = yes || test "$GXX" = yes
16392 then
16393         case $CFLAGS in
16394         (*-Werror=*)
16395                 test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
16396
16397 echo "${as_me:-configure}:16397: testing repairing CFLAGS: $CFLAGS ..." 1>&5
16398
16399                 cf_temp_flags=
16400                 for cf_temp_scan in $CFLAGS
16401                 do
16402                         case "x$cf_temp_scan" in
16403                         (x-Werror=*)
16404
16405         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16406         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16407
16408                                 ;;
16409                         (*)
16410
16411         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16412         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16413
16414                                 ;;
16415                         esac
16416                 done
16417                 CFLAGS="$cf_temp_flags"
16418                 test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
16419
16420 echo "${as_me:-configure}:16420: testing ... fixed $CFLAGS ..." 1>&5
16421
16422                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16423
16424 echo "${as_me:-configure}:16424: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16425
16426                 ;;
16427         esac
16428 fi
16429
16430 if test "$GCC" = yes || test "$GXX" = yes
16431 then
16432         case $CPPFLAGS in
16433         (*-Werror=*)
16434                 test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
16435
16436 echo "${as_me:-configure}:16436: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
16437
16438                 cf_temp_flags=
16439                 for cf_temp_scan in $CPPFLAGS
16440                 do
16441                         case "x$cf_temp_scan" in
16442                         (x-Werror=*)
16443
16444         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16445         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16446
16447                                 ;;
16448                         (*)
16449
16450         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16451         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16452
16453                                 ;;
16454                         esac
16455                 done
16456                 CPPFLAGS="$cf_temp_flags"
16457                 test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
16458
16459 echo "${as_me:-configure}:16459: testing ... fixed $CPPFLAGS ..." 1>&5
16460
16461                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16462
16463 echo "${as_me:-configure}:16463: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16464
16465                 ;;
16466         esac
16467 fi
16468
16469 if test "$GCC" = yes || test "$GXX" = yes
16470 then
16471         case $LDFLAGS in
16472         (*-Werror=*)
16473                 test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
16474
16475 echo "${as_me:-configure}:16475: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
16476
16477                 cf_temp_flags=
16478                 for cf_temp_scan in $LDFLAGS
16479                 do
16480                         case "x$cf_temp_scan" in
16481                         (x-Werror=*)
16482
16483         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16484         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16485
16486                                 ;;
16487                         (*)
16488
16489         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16490         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16491
16492                                 ;;
16493                         esac
16494                 done
16495                 LDFLAGS="$cf_temp_flags"
16496                 test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
16497
16498 echo "${as_me:-configure}:16498: testing ... fixed $LDFLAGS ..." 1>&5
16499
16500                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16501
16502 echo "${as_me:-configure}:16502: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16503
16504                 ;;
16505         esac
16506 fi
16507
16508 echo "$as_me:16508: checking if you want to turn on gcc warnings" >&5
16509 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16510
16511 # Check whether --enable-warnings or --disable-warnings was given.
16512 if test "${enable_warnings+set}" = set; then
16513   enableval="$enable_warnings"
16514   test "$enableval" != yes && enableval=no
16515         if test "$enableval" != "no" ; then
16516     enable_warnings=yes
16517         else
16518                 enable_warnings=no
16519         fi
16520 else
16521   enableval=no
16522         enable_warnings=no
16523
16524 fi;
16525 echo "$as_me:16525: result: $enable_warnings" >&5
16526 echo "${ECHO_T}$enable_warnings" >&6
16527 if test "$enable_warnings" = "yes"
16528 then
16529
16530 if test "x$have_x" = xyes; then
16531
16532 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
16533 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
16534 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
16535 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16536 for cf_X_CFLAGS in $X_CFLAGS
16537 do
16538         case "x$cf_X_CFLAGS" in
16539         x-[IUD]*)
16540                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16541                 ;;
16542         *)
16543                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16544                 ;;
16545         esac
16546 done
16547
16548 cat >"conftest.$ac_ext" <<_ACEOF
16549 #line 16549 "configure"
16550 #include "confdefs.h"
16551
16552 #include <stdlib.h>
16553 #include <X11/Intrinsic.h>
16554
16555 int
16556 main (void)
16557 {
16558 String foo = malloc(1); free((void*)foo)
16559   ;
16560   return 0;
16561 }
16562 _ACEOF
16563 rm -f "conftest.$ac_objext"
16564 if { (eval echo "$as_me:16564: \"$ac_compile\"") >&5
16565   (eval $ac_compile) 2>&5
16566   ac_status=$?
16567   echo "$as_me:16567: \$? = $ac_status" >&5
16568   (exit "$ac_status"); } &&
16569          { ac_try='test -s "conftest.$ac_objext"'
16570   { (eval echo "$as_me:16570: \"$ac_try\"") >&5
16571   (eval $ac_try) 2>&5
16572   ac_status=$?
16573   echo "$as_me:16573: \$? = $ac_status" >&5
16574   (exit "$ac_status"); }; }; then
16575
16576 echo "$as_me:16576: checking for X11/Xt const-feature" >&5
16577 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
16578 if test "${cf_cv_const_x_string+set}" = set; then
16579   echo $ECHO_N "(cached) $ECHO_C" >&6
16580 else
16581
16582         cat >"conftest.$ac_ext" <<_ACEOF
16583 #line 16583 "configure"
16584 #include "confdefs.h"
16585
16586 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16587 #undef  XTSTRINGDEFINES /* X11R5 and later */
16588 #include <stdlib.h>
16589 #include <X11/Intrinsic.h>
16590
16591 int
16592 main (void)
16593 {
16594 String foo = malloc(1); *foo = 0
16595   ;
16596   return 0;
16597 }
16598 _ACEOF
16599 rm -f "conftest.$ac_objext"
16600 if { (eval echo "$as_me:16600: \"$ac_compile\"") >&5
16601   (eval $ac_compile) 2>&5
16602   ac_status=$?
16603   echo "$as_me:16603: \$? = $ac_status" >&5
16604   (exit "$ac_status"); } &&
16605          { ac_try='test -s "conftest.$ac_objext"'
16606   { (eval echo "$as_me:16606: \"$ac_try\"") >&5
16607   (eval $ac_try) 2>&5
16608   ac_status=$?
16609   echo "$as_me:16609: \$? = $ac_status" >&5
16610   (exit "$ac_status"); }; }; then
16611
16612                         cf_cv_const_x_string=no
16613
16614 else
16615   echo "$as_me: failed program was:" >&5
16616 cat "conftest.$ac_ext" >&5
16617
16618                         cf_cv_const_x_string=yes
16619
16620 fi
16621 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16622
16623 fi
16624 echo "$as_me:16624: result: $cf_cv_const_x_string" >&5
16625 echo "${ECHO_T}$cf_cv_const_x_string" >&6
16626
16627 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
16628 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
16629 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
16630
16631 case "$cf_cv_const_x_string" in
16632 (no)
16633
16634         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16635         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
16636
16637         ;;
16638 (*)
16639
16640         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16641         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
16642
16643         ;;
16644 esac
16645
16646 else
16647   echo "$as_me: failed program was:" >&5
16648 cat "conftest.$ac_ext" >&5
16649 fi
16650 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16651  fi
16652 cat > "conftest.$ac_ext" <<EOF
16653 #line 16653 "${as_me:-configure}"
16654 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16655 EOF
16656 if test "$INTEL_COMPILER" = yes
16657 then
16658 # The "-wdXXX" options suppress warnings:
16659 # remark #1419: external declaration in primary source file
16660 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16661 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16662 # remark #193: zero used for undefined preprocessing identifier
16663 # remark #593: variable "curs_sb_left_arrow" was set but never used
16664 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16665 # remark #869: parameter "tw" was never referenced
16666 # remark #981: operands are evaluated in unspecified order
16667 # warning #279: controlling expression is constant
16668
16669         { echo "$as_me:16669: checking for $CC warning options..." >&5
16670 echo "$as_me: checking for $CC warning options..." >&6;}
16671         cf_save_CFLAGS="$CFLAGS"
16672         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
16673         for cf_opt in \
16674                 wd1419 \
16675                 wd1683 \
16676                 wd1684 \
16677                 wd193 \
16678                 wd593 \
16679                 wd279 \
16680                 wd810 \
16681                 wd869 \
16682                 wd981
16683         do
16684                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16685                 if { (eval echo "$as_me:16685: \"$ac_compile\"") >&5
16686   (eval $ac_compile) 2>&5
16687   ac_status=$?
16688   echo "$as_me:16688: \$? = $ac_status" >&5
16689   (exit "$ac_status"); }; then
16690                         test -n "$verbose" && echo "$as_me:16690: result: ... -$cf_opt" >&5
16691 echo "${ECHO_T}... -$cf_opt" >&6
16692                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16693                 fi
16694         done
16695         CFLAGS="$cf_save_CFLAGS"
16696 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
16697 then
16698         { echo "$as_me:16698: checking for $CC warning options..." >&5
16699 echo "$as_me: checking for $CC warning options..." >&6;}
16700         cf_save_CFLAGS="$CFLAGS"
16701         cf_warn_CONST=""
16702         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16703         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16704         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16705         for cf_opt in W Wall \
16706                 Wbad-function-cast \
16707                 Wcast-align \
16708                 Wcast-qual \
16709                 Wdeclaration-after-statement \
16710                 Wextra \
16711                 Winline \
16712                 Wmissing-declarations \
16713                 Wmissing-prototypes \
16714                 Wnested-externs \
16715                 Wpointer-arith \
16716                 Wshadow \
16717                 Wstrict-prototypes \
16718                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
16719         do
16720                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
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_opt" >&5
16727 echo "${ECHO_T}... -$cf_opt" >&6
16728                         case "$cf_opt" in
16729                         (Winline)
16730                                 case "$GCC_VERSION" in
16731                                 ([34].*)
16732                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16733
16734 echo "${as_me:-configure}:16734: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16735
16736                                         continue;;
16737                                 esac
16738                                 ;;
16739                         (Wpointer-arith)
16740                                 case "$GCC_VERSION" in
16741                                 ([12].*)
16742                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16743
16744 echo "${as_me:-configure}:16744: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16745
16746                                         continue;;
16747                                 esac
16748                                 ;;
16749                         esac
16750                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16751                 fi
16752         done
16753         CFLAGS="$cf_save_CFLAGS"
16754 fi
16755 rm -rf ./conftest*
16756
16757 fi
16758
16759 if test "$GCC" = yes || test "$GXX" = yes
16760 then
16761 cat > conftest.i <<EOF
16762 #ifndef GCC_PRINTF
16763 #define GCC_PRINTF 0
16764 #endif
16765 #ifndef GCC_SCANF
16766 #define GCC_SCANF 0
16767 #endif
16768 #ifndef GCC_NORETURN
16769 #define GCC_NORETURN /* nothing */
16770 #endif
16771 #ifndef GCC_UNUSED
16772 #define GCC_UNUSED /* nothing */
16773 #endif
16774 EOF
16775 if test "$GCC" = yes
16776 then
16777         { echo "$as_me:16777: checking for $CC __attribute__ directives..." >&5
16778 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
16779 cat > "conftest.$ac_ext" <<EOF
16780 #line 16780 "${as_me:-configure}"
16781 #include "confdefs.h"
16782 #include "conftest.h"
16783 #include "conftest.i"
16784 #if     GCC_PRINTF
16785 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
16786 #else
16787 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
16788 #endif
16789 #if     GCC_SCANF
16790 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
16791 #else
16792 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
16793 #endif
16794 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
16795 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
16796 extern GCC_NORETURN void foo(void);
16797 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
16798 EOF
16799         cf_printf_attribute=no
16800         cf_scanf_attribute=no
16801         for cf_attribute in scanf printf unused noreturn
16802         do
16803
16804 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16805
16806                 cf_directive="__attribute__(($cf_attribute))"
16807                 echo "checking for $CC $cf_directive" 1>&5
16808
16809                 case "$cf_attribute" in
16810                 (printf)
16811                         cf_printf_attribute=yes
16812                         cat >conftest.h <<EOF
16813 #define GCC_$cf_ATTRIBUTE 1
16814 EOF
16815                         ;;
16816                 (scanf)
16817                         cf_scanf_attribute=yes
16818                         cat >conftest.h <<EOF
16819 #define GCC_$cf_ATTRIBUTE 1
16820 EOF
16821                         ;;
16822                 (*)
16823                         cat >conftest.h <<EOF
16824 #define GCC_$cf_ATTRIBUTE $cf_directive
16825 EOF
16826                         ;;
16827                 esac
16828
16829                 if { (eval echo "$as_me:16829: \"$ac_compile\"") >&5
16830   (eval $ac_compile) 2>&5
16831   ac_status=$?
16832   echo "$as_me:16832: \$? = $ac_status" >&5
16833   (exit "$ac_status"); }; then
16834                         test -n "$verbose" && echo "$as_me:16834: result: ... $cf_attribute" >&5
16835 echo "${ECHO_T}... $cf_attribute" >&6
16836                         cat conftest.h >>confdefs.h
16837                         case "$cf_attribute" in
16838                         (noreturn)
16839
16840 cat >>confdefs.h <<EOF
16841 #define GCC_NORETURN $cf_directive
16842 EOF
16843
16844                                 ;;
16845                         (printf)
16846                                 cf_value='/* nothing */'
16847                                 if test "$cf_printf_attribute" != no ; then
16848                                         cf_value='__attribute__((format(printf,fmt,var)))'
16849
16850 cat >>confdefs.h <<\EOF
16851 #define GCC_PRINTF 1
16852 EOF
16853
16854                                 fi
16855
16856 cat >>confdefs.h <<EOF
16857 #define GCC_PRINTFLIKE(fmt,var) $cf_value
16858 EOF
16859
16860                                 ;;
16861                         (scanf)
16862                                 cf_value='/* nothing */'
16863                                 if test "$cf_scanf_attribute" != no ; then
16864                                         cf_value='__attribute__((format(scanf,fmt,var)))'
16865
16866 cat >>confdefs.h <<\EOF
16867 #define GCC_SCANF 1
16868 EOF
16869
16870                                 fi
16871
16872 cat >>confdefs.h <<EOF
16873 #define GCC_SCANFLIKE(fmt,var) $cf_value
16874 EOF
16875
16876                                 ;;
16877                         (unused)
16878
16879 cat >>confdefs.h <<EOF
16880 #define GCC_UNUSED $cf_directive
16881 EOF
16882
16883                                 ;;
16884                         esac
16885                 fi
16886         done
16887 else
16888         ${FGREP-fgrep} define conftest.i >>confdefs.h
16889 fi
16890 rm -rf ./conftest*
16891 fi
16892
16893 fi
16894
16895 if test "x$enable_warnings" = "xyes"; then
16896
16897         ADAFLAGS="$ADAFLAGS -gnatg"
16898
16899         if test "x$cf_with_cxx" = xyes ; then
16900
16901 INTEL_CPLUSPLUS=no
16902
16903 if test "$GCC" = yes ; then
16904         case "$host_os" in
16905         (linux*|gnu*)
16906                 echo "$as_me:16906: checking if this is really Intel C++ compiler" >&5
16907 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
16908                 cf_save_CFLAGS="$CXXFLAGS"
16909                 CXXFLAGS="$CXXFLAGS -no-gcc"
16910                 cat >"conftest.$ac_ext" <<_ACEOF
16911 #line 16911 "configure"
16912 #include "confdefs.h"
16913
16914 int
16915 main (void)
16916 {
16917
16918 #ifdef __INTEL_COMPILER
16919 #else
16920 make an error
16921 #endif
16922
16923   ;
16924   return 0;
16925 }
16926 _ACEOF
16927 rm -f "conftest.$ac_objext"
16928 if { (eval echo "$as_me:16928: \"$ac_compile\"") >&5
16929   (eval $ac_compile) 2>&5
16930   ac_status=$?
16931   echo "$as_me:16931: \$? = $ac_status" >&5
16932   (exit "$ac_status"); } &&
16933          { ac_try='test -s "conftest.$ac_objext"'
16934   { (eval echo "$as_me:16934: \"$ac_try\"") >&5
16935   (eval $ac_try) 2>&5
16936   ac_status=$?
16937   echo "$as_me:16937: \$? = $ac_status" >&5
16938   (exit "$ac_status"); }; }; then
16939   INTEL_CPLUSPLUS=yes
16940 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
16941
16942 else
16943   echo "$as_me: failed program was:" >&5
16944 cat "conftest.$ac_ext" >&5
16945 fi
16946 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16947                 CXXFLAGS="$cf_save_CFLAGS"
16948                 echo "$as_me:16948: result: $INTEL_CPLUSPLUS" >&5
16949 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
16950                 ;;
16951         esac
16952 fi
16953
16954 CLANG_CPLUSPLUS=no
16955
16956 if test "$GCC" = yes ; then
16957         echo "$as_me:16957: checking if this is really Clang C++ compiler" >&5
16958 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
16959         cf_save_CFLAGS="$CXXFLAGS"
16960         cat >"conftest.$ac_ext" <<_ACEOF
16961 #line 16961 "configure"
16962 #include "confdefs.h"
16963
16964 int
16965 main (void)
16966 {
16967
16968 #ifdef __clang__
16969 #else
16970 make an error
16971 #endif
16972
16973   ;
16974   return 0;
16975 }
16976 _ACEOF
16977 rm -f "conftest.$ac_objext"
16978 if { (eval echo "$as_me:16978: \"$ac_compile\"") >&5
16979   (eval $ac_compile) 2>&5
16980   ac_status=$?
16981   echo "$as_me:16981: \$? = $ac_status" >&5
16982   (exit "$ac_status"); } &&
16983          { ac_try='test -s "conftest.$ac_objext"'
16984   { (eval echo "$as_me:16984: \"$ac_try\"") >&5
16985   (eval $ac_try) 2>&5
16986   ac_status=$?
16987   echo "$as_me:16987: \$? = $ac_status" >&5
16988   (exit "$ac_status"); }; }; then
16989   CLANG_CPLUSPLUS=yes
16990
16991 else
16992   echo "$as_me: failed program was:" >&5
16993 cat "conftest.$ac_ext" >&5
16994 fi
16995 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16996         CXXFLAGS="$cf_save_CFLAGS"
16997         echo "$as_me:16997: result: $CLANG_CPLUSPLUS" >&5
16998 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
16999 fi
17000
17001 CLANG_VERSION=none
17002
17003 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17004         case "$CC" in
17005         (c[1-9][0-9]|*/c[1-9][0-9])
17006                 { echo "$as_me:17006: WARNING: replacing broken compiler alias $CC" >&5
17007 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17008                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17009                 CC=clang
17010                 ;;
17011         esac
17012
17013         echo "$as_me:17013: checking version of $CC" >&5
17014 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17015         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.].*//'`"
17016         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17017         echo "$as_me:17017: result: $CLANG_VERSION" >&5
17018 echo "${ECHO_T}$CLANG_VERSION" >&6
17019
17020         for cf_clang_opt in \
17021                 -Qunused-arguments \
17022                 -Wno-error=implicit-function-declaration
17023         do
17024                 echo "$as_me:17024: checking if option $cf_clang_opt works" >&5
17025 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17026                 cf_save_CFLAGS="$CFLAGS"
17027                 CFLAGS="$CFLAGS $cf_clang_opt"
17028                 cat >"conftest.$ac_ext" <<_ACEOF
17029 #line 17029 "configure"
17030 #include "confdefs.h"
17031
17032                         #include <stdio.h>
17033 int
17034 main (void)
17035 {
17036
17037                         printf("hello!\\n");
17038   ;
17039   return 0;
17040 }
17041 _ACEOF
17042 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17043 if { (eval echo "$as_me:17043: \"$ac_link\"") >&5
17044   (eval $ac_link) 2>&5
17045   ac_status=$?
17046   echo "$as_me:17046: \$? = $ac_status" >&5
17047   (exit "$ac_status"); } &&
17048          { ac_try='test -s "conftest$ac_exeext"'
17049   { (eval echo "$as_me:17049: \"$ac_try\"") >&5
17050   (eval $ac_try) 2>&5
17051   ac_status=$?
17052   echo "$as_me:17052: \$? = $ac_status" >&5
17053   (exit "$ac_status"); }; }; then
17054
17055                         cf_clang_optok=yes
17056 else
17057   echo "$as_me: failed program was:" >&5
17058 cat "conftest.$ac_ext" >&5
17059
17060                         cf_clang_optok=no
17061 fi
17062 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17063                 echo "$as_me:17063: result: $cf_clang_optok" >&5
17064 echo "${ECHO_T}$cf_clang_optok" >&6
17065                 CFLAGS="$cf_save_CFLAGS"
17066                 if test "$cf_clang_optok" = yes; then
17067                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17068
17069 echo "${as_me:-configure}:17069: testing adding option $cf_clang_opt ..." 1>&5
17070
17071         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17072         CFLAGS="${CFLAGS}$cf_clang_opt"
17073
17074                 fi
17075         done
17076 fi
17077
17078 ac_ext=cc
17079 ac_cpp='$CXXCPP $CPPFLAGS'
17080 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17081 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17082 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17083 ac_main_return="return"
17084
17085 cat > conftest.$ac_ext <<EOF
17086 #line 17086 "configure"
17087 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17088 EOF
17089
17090 if test "$INTEL_CPLUSPLUS" = yes
17091 then
17092 # The "-wdXXX" options suppress warnings:
17093 # remark #1419: external declaration in primary source file
17094 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17095 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17096 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17097 # remark #193: zero used for undefined preprocessing identifier
17098 # remark #593: variable "curs_sb_left_arrow" was set but never used
17099 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17100 # remark #869: parameter "tw" was never referenced
17101 # remark #981: operands are evaluated in unspecified order
17102 # warning #269: invalid format string conversion
17103
17104         { echo "$as_me:17104: checking for $CC warning options..." >&5
17105 echo "$as_me: checking for $CC warning options..." >&6;}
17106         cf_save_CXXFLAGS="$CXXFLAGS"
17107         EXTRA_CXXFLAGS="-Wall"
17108         for cf_opt in \
17109                 wd1419 \
17110                 wd1682 \
17111                 wd1683 \
17112                 wd1684 \
17113                 wd193 \
17114                 wd279 \
17115                 wd593 \
17116                 wd810 \
17117                 wd869 \
17118                 wd981
17119         do
17120                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17121                 if { (eval echo "$as_me:17121: \"$ac_compile\"") >&5
17122   (eval $ac_compile) 2>&5
17123   ac_status=$?
17124   echo "$as_me:17124: \$? = $ac_status" >&5
17125   (exit "$ac_status"); }; then
17126                         test -n "$verbose" && echo "$as_me:17126: result: ... -$cf_opt" >&5
17127 echo "${ECHO_T}... -$cf_opt" >&6
17128                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17129                 fi
17130         done
17131         CXXFLAGS="$cf_save_CXXFLAGS"
17132
17133 elif test "$GXX" = yes
17134 then
17135         { echo "$as_me:17135: checking for $CXX warning options..." >&5
17136 echo "$as_me: checking for $CXX warning options..." >&6;}
17137         cf_save_CXXFLAGS="$CXXFLAGS"
17138         EXTRA_CXXFLAGS="-W -Wall"
17139         cf_gxx_extra_warnings=""
17140         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17141         case "$GXX_VERSION" in
17142         ([1-2].*)
17143                 ;;
17144         (*)
17145                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17146                 ;;
17147         esac
17148         for cf_opt in \
17149                 Wabi \
17150                 fabi-version=0 \
17151                 Wextra \
17152                 Wignored-qualifiers \
17153                 Wlogical-op \
17154                 Woverloaded-virtual \
17155                 Wsign-promo \
17156                 Wsynth \
17157                 Wold-style-cast \
17158                 Wcast-align \
17159                 Wcast-qual \
17160                 Wpointer-arith \
17161                 Wshadow \
17162                 Wundef $cf_gxx_extra_warnings Wno-unused
17163         do
17164                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17165                 if { (eval echo "$as_me:17165: \"$ac_compile\"") >&5
17166   (eval $ac_compile) 2>&5
17167   ac_status=$?
17168   echo "$as_me:17168: \$? = $ac_status" >&5
17169   (exit "$ac_status"); }; then
17170                         test -n "$verbose" && echo "$as_me:17170: result: ... -$cf_opt" >&5
17171 echo "${ECHO_T}... -$cf_opt" >&6
17172                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17173                 else
17174                         test -n "$verbose" && echo "$as_me:17174: result: ... no -$cf_opt" >&5
17175 echo "${ECHO_T}... no -$cf_opt" >&6
17176                 fi
17177         done
17178         CXXFLAGS="$cf_save_CXXFLAGS"
17179 fi
17180
17181 rm -rf ./conftest*
17182 ac_ext=c
17183 ac_cpp='$CPP $CPPFLAGS'
17184 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17185 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17186 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17187 ac_main_return="return"
17188
17189         fi
17190 fi
17191
17192 echo "$as_me:17192: checking if you want to work around bogus compiler/loader warnings" >&5
17193 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17194
17195 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17196 if test "${enable_string_hacks+set}" = set; then
17197   enableval="$enable_string_hacks"
17198   enable_string_hacks=$enableval
17199 else
17200   enable_string_hacks=no
17201 fi;
17202 echo "$as_me:17202: result: $enable_string_hacks" >&5
17203 echo "${ECHO_T}$enable_string_hacks" >&6
17204
17205 if test "x$enable_string_hacks" = "xyes"; then
17206
17207 cat >>confdefs.h <<\EOF
17208 #define USE_STRING_HACKS 1
17209 EOF
17210
17211         { echo "$as_me:17211: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
17212 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17213         echo "$as_me:17213: checking for strlcat" >&5
17214 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17215 if test "${ac_cv_func_strlcat+set}" = set; then
17216   echo $ECHO_N "(cached) $ECHO_C" >&6
17217 else
17218   cat >"conftest.$ac_ext" <<_ACEOF
17219 #line 17219 "configure"
17220 #include "confdefs.h"
17221 #define strlcat autoconf_temporary
17222 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17223 #undef strlcat
17224
17225 #ifdef __cplusplus
17226 extern "C"
17227 #endif
17228
17229 /* We use char because int might match the return type of a gcc2
17230    builtin and then its argument prototype would still apply.  */
17231 char strlcat (void);
17232
17233 int
17234 main (void)
17235 {
17236
17237 /* The GNU C library defines stubs for functions which it implements
17238     to always fail with ENOSYS.  Some functions are actually named
17239     something starting with __ and the normal name is an alias.  */
17240 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17241 #error found stub for strlcat
17242 #endif
17243
17244         return strlcat ();
17245   ;
17246   return 0;
17247 }
17248 _ACEOF
17249 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17250 if { (eval echo "$as_me:17250: \"$ac_link\"") >&5
17251   (eval $ac_link) 2>&5
17252   ac_status=$?
17253   echo "$as_me:17253: \$? = $ac_status" >&5
17254   (exit "$ac_status"); } &&
17255          { ac_try='test -s "conftest$ac_exeext"'
17256   { (eval echo "$as_me:17256: \"$ac_try\"") >&5
17257   (eval $ac_try) 2>&5
17258   ac_status=$?
17259   echo "$as_me:17259: \$? = $ac_status" >&5
17260   (exit "$ac_status"); }; }; then
17261   ac_cv_func_strlcat=yes
17262 else
17263   echo "$as_me: failed program was:" >&5
17264 cat "conftest.$ac_ext" >&5
17265 ac_cv_func_strlcat=no
17266 fi
17267 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17268 fi
17269 echo "$as_me:17269: result: $ac_cv_func_strlcat" >&5
17270 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
17271 if test "$ac_cv_func_strlcat" = yes; then
17272
17273 cat >>confdefs.h <<\EOF
17274 #define HAVE_STRLCAT 1
17275 EOF
17276
17277 else
17278
17279                 echo "$as_me:17279: checking for strlcat in -lbsd" >&5
17280 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
17281 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
17282   echo $ECHO_N "(cached) $ECHO_C" >&6
17283 else
17284   ac_check_lib_save_LIBS=$LIBS
17285 LIBS="-lbsd  $LIBS"
17286 cat >"conftest.$ac_ext" <<_ACEOF
17287 #line 17287 "configure"
17288 #include "confdefs.h"
17289
17290 /* Override any gcc2 internal prototype to avoid an error.  */
17291 #ifdef __cplusplus
17292 extern "C"
17293 #endif
17294 /* We use char because int might match the return type of a gcc2
17295    builtin and then its argument prototype would still apply.  */
17296 char strlcat ();
17297 int
17298 main (void)
17299 {
17300 strlcat ();
17301   ;
17302   return 0;
17303 }
17304 _ACEOF
17305 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17306 if { (eval echo "$as_me:17306: \"$ac_link\"") >&5
17307   (eval $ac_link) 2>&5
17308   ac_status=$?
17309   echo "$as_me:17309: \$? = $ac_status" >&5
17310   (exit "$ac_status"); } &&
17311          { ac_try='test -s "conftest$ac_exeext"'
17312   { (eval echo "$as_me:17312: \"$ac_try\"") >&5
17313   (eval $ac_try) 2>&5
17314   ac_status=$?
17315   echo "$as_me:17315: \$? = $ac_status" >&5
17316   (exit "$ac_status"); }; }; then
17317   ac_cv_lib_bsd_strlcat=yes
17318 else
17319   echo "$as_me: failed program was:" >&5
17320 cat "conftest.$ac_ext" >&5
17321 ac_cv_lib_bsd_strlcat=no
17322 fi
17323 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17324 LIBS=$ac_check_lib_save_LIBS
17325 fi
17326 echo "$as_me:17326: result: $ac_cv_lib_bsd_strlcat" >&5
17327 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
17328 if test "$ac_cv_lib_bsd_strlcat" = yes; then
17329
17330 cf_add_libs="$LIBS"
17331 # reverse order
17332 cf_add_0lib=
17333 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17334 # filter duplicates
17335 for cf_add_1lib in $cf_add_0lib; do
17336         for cf_add_2lib in $cf_add_libs; do
17337                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17338                         cf_add_1lib=
17339                         break
17340                 fi
17341         done
17342         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17343 done
17344 LIBS="$cf_add_libs"
17345
17346 for ac_header in bsd/string.h
17347 do
17348 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17349 echo "$as_me:17349: checking for $ac_header" >&5
17350 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17351 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17352   echo $ECHO_N "(cached) $ECHO_C" >&6
17353 else
17354   cat >"conftest.$ac_ext" <<_ACEOF
17355 #line 17355 "configure"
17356 #include "confdefs.h"
17357 #include <$ac_header>
17358 _ACEOF
17359 if { (eval echo "$as_me:17359: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17360   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17361   ac_status=$?
17362   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17363   rm -f conftest.er1
17364   cat conftest.err >&5
17365   echo "$as_me:17365: \$? = $ac_status" >&5
17366   (exit "$ac_status"); } >/dev/null; then
17367   if test -s conftest.err; then
17368     ac_cpp_err=$ac_c_preproc_warn_flag
17369   else
17370     ac_cpp_err=
17371   fi
17372 else
17373   ac_cpp_err=yes
17374 fi
17375 if test -z "$ac_cpp_err"; then
17376   eval "$as_ac_Header=yes"
17377 else
17378   echo "$as_me: failed program was:" >&5
17379   cat "conftest.$ac_ext" >&5
17380   eval "$as_ac_Header=no"
17381 fi
17382 rm -f conftest.err "conftest.$ac_ext"
17383 fi
17384 echo "$as_me:17384: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17385 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17386 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17387   cat >>confdefs.h <<EOF
17388 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17389 EOF
17390
17391 fi
17392 done
17393
17394 cat >>confdefs.h <<\EOF
17395 #define HAVE_STRLCAT 1
17396 EOF
17397
17398 fi
17399
17400 fi
17401
17402 for ac_func in strlcpy snprintf
17403 do
17404 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17405 echo "$as_me:17405: checking for $ac_func" >&5
17406 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17407 if eval "test \"\${$as_ac_var+set}\" = set"; then
17408   echo $ECHO_N "(cached) $ECHO_C" >&6
17409 else
17410   cat >"conftest.$ac_ext" <<_ACEOF
17411 #line 17411 "configure"
17412 #include "confdefs.h"
17413 #define $ac_func autoconf_temporary
17414 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17415 #undef $ac_func
17416
17417 #ifdef __cplusplus
17418 extern "C"
17419 #endif
17420
17421 /* We use char because int might match the return type of a gcc2
17422    builtin and then its argument prototype would still apply.  */
17423 char $ac_func (void);
17424
17425 int
17426 main (void)
17427 {
17428
17429 /* The GNU C library defines stubs for functions which it implements
17430     to always fail with ENOSYS.  Some functions are actually named
17431     something starting with __ and the normal name is an alias.  */
17432 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17433 #error found stub for $ac_func
17434 #endif
17435
17436         return $ac_func ();
17437   ;
17438   return 0;
17439 }
17440 _ACEOF
17441 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17442 if { (eval echo "$as_me:17442: \"$ac_link\"") >&5
17443   (eval $ac_link) 2>&5
17444   ac_status=$?
17445   echo "$as_me:17445: \$? = $ac_status" >&5
17446   (exit "$ac_status"); } &&
17447          { ac_try='test -s "conftest$ac_exeext"'
17448   { (eval echo "$as_me:17448: \"$ac_try\"") >&5
17449   (eval $ac_try) 2>&5
17450   ac_status=$?
17451   echo "$as_me:17451: \$? = $ac_status" >&5
17452   (exit "$ac_status"); }; }; then
17453   eval "$as_ac_var=yes"
17454 else
17455   echo "$as_me: failed program was:" >&5
17456 cat "conftest.$ac_ext" >&5
17457 eval "$as_ac_var=no"
17458 fi
17459 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17460 fi
17461 echo "$as_me:17461: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17462 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17463 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17464   cat >>confdefs.h <<EOF
17465 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17466 EOF
17467
17468 fi
17469 done
17470
17471 fi
17472
17473 ###     use option --enable-assertions to turn on generation of assertion code
17474 echo "$as_me:17474: checking if you want to enable runtime assertions" >&5
17475 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
17476
17477 # Check whether --enable-assertions or --disable-assertions was given.
17478 if test "${enable_assertions+set}" = set; then
17479   enableval="$enable_assertions"
17480   with_assertions=$enableval
17481 else
17482   with_assertions=no
17483 fi;
17484 echo "$as_me:17484: result: $with_assertions" >&5
17485 echo "${ECHO_T}$with_assertions" >&6
17486 if test -n "$GCC"
17487 then
17488         if test "$with_assertions" = no
17489         then
17490                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
17491         else
17492
17493         ADAFLAGS="$ADAFLAGS -gnata"
17494
17495         fi
17496 fi
17497
17498 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
17499
17500 echo "$as_me:17500: checking if you want to use dmalloc for testing" >&5
17501 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17502
17503 # Check whether --with-dmalloc or --without-dmalloc was given.
17504 if test "${with_dmalloc+set}" = set; then
17505   withval="$with_dmalloc"
17506   case "x$withval" in
17507         (x|xno) ;;
17508         (*)
17509                 : "${with_cflags:=-g}"
17510                 : "${enable_leaks:=no}"
17511                 with_dmalloc=yes
17512
17513 cat >>confdefs.h <<EOF
17514 #define USE_DMALLOC 1
17515 EOF
17516
17517                 ;;
17518         esac
17519 else
17520   with_dmalloc=
17521 fi;
17522 echo "$as_me:17522: result: ${with_dmalloc:-no}" >&5
17523 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17524
17525 case ".$with_cflags" in
17526 (.*-g*)
17527         case .$CFLAGS in
17528         (.*-g*)
17529                 ;;
17530         (*)
17531
17532 cf_fix_cppflags=no
17533 cf_new_cflags=
17534 cf_new_cppflags=
17535 cf_new_extra_cppflags=
17536
17537 for cf_add_cflags in -g
17538 do
17539 case "$cf_fix_cppflags" in
17540 (no)
17541         case "$cf_add_cflags" in
17542         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17543                 case "$cf_add_cflags" in
17544                 (-D*)
17545                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17546
17547                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17548                                 && test -z "${cf_tst_cflags}" \
17549                                 && cf_fix_cppflags=yes
17550
17551                         if test "$cf_fix_cppflags" = yes ; then
17552
17553         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17554         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17555
17556                                 continue
17557                         elif test "${cf_tst_cflags}" = "\"'" ; then
17558
17559         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17560         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17561
17562                                 continue
17563                         fi
17564                         ;;
17565                 esac
17566                 case "$CPPFLAGS" in
17567                 (*$cf_add_cflags)
17568                         ;;
17569                 (*)
17570                         case "$cf_add_cflags" in
17571                         (-D*)
17572                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17573
17574 CPPFLAGS=`echo "$CPPFLAGS" | \
17575         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17576                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17577
17578                                 ;;
17579                         esac
17580
17581         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17582         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17583
17584                         ;;
17585                 esac
17586                 ;;
17587         (*)
17588
17589         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17590         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17591
17592                 ;;
17593         esac
17594         ;;
17595 (yes)
17596
17597         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17598         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17599
17600         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17601
17602         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17603                 && test -z "${cf_tst_cflags}" \
17604                 && cf_fix_cppflags=no
17605         ;;
17606 esac
17607 done
17608
17609 if test -n "$cf_new_cflags" ; then
17610
17611         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17612         CFLAGS="${CFLAGS}$cf_new_cflags"
17613
17614 fi
17615
17616 if test -n "$cf_new_cppflags" ; then
17617
17618         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17619         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17620
17621 fi
17622
17623 if test -n "$cf_new_extra_cppflags" ; then
17624
17625         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17626         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17627
17628 fi
17629
17630                 ;;
17631         esac
17632         ;;
17633 esac
17634
17635 if test "$with_dmalloc" = yes ; then
17636         echo "$as_me:17636: checking for dmalloc.h" >&5
17637 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17638 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17639   echo $ECHO_N "(cached) $ECHO_C" >&6
17640 else
17641   cat >"conftest.$ac_ext" <<_ACEOF
17642 #line 17642 "configure"
17643 #include "confdefs.h"
17644 #include <dmalloc.h>
17645 _ACEOF
17646 if { (eval echo "$as_me:17646: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17647   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17648   ac_status=$?
17649   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17650   rm -f conftest.er1
17651   cat conftest.err >&5
17652   echo "$as_me:17652: \$? = $ac_status" >&5
17653   (exit "$ac_status"); } >/dev/null; then
17654   if test -s conftest.err; then
17655     ac_cpp_err=$ac_c_preproc_warn_flag
17656   else
17657     ac_cpp_err=
17658   fi
17659 else
17660   ac_cpp_err=yes
17661 fi
17662 if test -z "$ac_cpp_err"; then
17663   ac_cv_header_dmalloc_h=yes
17664 else
17665   echo "$as_me: failed program was:" >&5
17666   cat "conftest.$ac_ext" >&5
17667   ac_cv_header_dmalloc_h=no
17668 fi
17669 rm -f conftest.err "conftest.$ac_ext"
17670 fi
17671 echo "$as_me:17671: result: $ac_cv_header_dmalloc_h" >&5
17672 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17673 if test "$ac_cv_header_dmalloc_h" = yes; then
17674
17675 echo "$as_me:17675: checking for dmalloc_debug in -ldmalloc" >&5
17676 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17677 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17678   echo $ECHO_N "(cached) $ECHO_C" >&6
17679 else
17680   ac_check_lib_save_LIBS=$LIBS
17681 LIBS="-ldmalloc  $LIBS"
17682 cat >"conftest.$ac_ext" <<_ACEOF
17683 #line 17683 "configure"
17684 #include "confdefs.h"
17685
17686 /* Override any gcc2 internal prototype to avoid an error.  */
17687 #ifdef __cplusplus
17688 extern "C"
17689 #endif
17690 /* We use char because int might match the return type of a gcc2
17691    builtin and then its argument prototype would still apply.  */
17692 char dmalloc_debug ();
17693 int
17694 main (void)
17695 {
17696 dmalloc_debug ();
17697   ;
17698   return 0;
17699 }
17700 _ACEOF
17701 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17702 if { (eval echo "$as_me:17702: \"$ac_link\"") >&5
17703   (eval $ac_link) 2>&5
17704   ac_status=$?
17705   echo "$as_me:17705: \$? = $ac_status" >&5
17706   (exit "$ac_status"); } &&
17707          { ac_try='test -s "conftest$ac_exeext"'
17708   { (eval echo "$as_me:17708: \"$ac_try\"") >&5
17709   (eval $ac_try) 2>&5
17710   ac_status=$?
17711   echo "$as_me:17711: \$? = $ac_status" >&5
17712   (exit "$ac_status"); }; }; then
17713   ac_cv_lib_dmalloc_dmalloc_debug=yes
17714 else
17715   echo "$as_me: failed program was:" >&5
17716 cat "conftest.$ac_ext" >&5
17717 ac_cv_lib_dmalloc_dmalloc_debug=no
17718 fi
17719 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17720 LIBS=$ac_check_lib_save_LIBS
17721 fi
17722 echo "$as_me:17722: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
17723 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
17724 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
17725   cat >>confdefs.h <<EOF
17726 #define HAVE_LIBDMALLOC 1
17727 EOF
17728
17729   LIBS="-ldmalloc $LIBS"
17730
17731 fi
17732
17733 fi
17734
17735 fi
17736
17737 echo "$as_me:17737: checking if you want to use dbmalloc for testing" >&5
17738 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
17739
17740 # Check whether --with-dbmalloc or --without-dbmalloc was given.
17741 if test "${with_dbmalloc+set}" = set; then
17742   withval="$with_dbmalloc"
17743   case "x$withval" in
17744         (x|xno) ;;
17745         (*)
17746                 : "${with_cflags:=-g}"
17747                 : "${enable_leaks:=no}"
17748                 with_dbmalloc=yes
17749
17750 cat >>confdefs.h <<EOF
17751 #define USE_DBMALLOC 1
17752 EOF
17753
17754                 ;;
17755         esac
17756 else
17757   with_dbmalloc=
17758 fi;
17759 echo "$as_me:17759: result: ${with_dbmalloc:-no}" >&5
17760 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
17761
17762 case ".$with_cflags" in
17763 (.*-g*)
17764         case .$CFLAGS in
17765         (.*-g*)
17766                 ;;
17767         (*)
17768
17769 cf_fix_cppflags=no
17770 cf_new_cflags=
17771 cf_new_cppflags=
17772 cf_new_extra_cppflags=
17773
17774 for cf_add_cflags in -g
17775 do
17776 case "$cf_fix_cppflags" in
17777 (no)
17778         case "$cf_add_cflags" in
17779         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17780                 case "$cf_add_cflags" in
17781                 (-D*)
17782                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17783
17784                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17785                                 && test -z "${cf_tst_cflags}" \
17786                                 && cf_fix_cppflags=yes
17787
17788                         if test "$cf_fix_cppflags" = yes ; then
17789
17790         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17791         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17792
17793                                 continue
17794                         elif test "${cf_tst_cflags}" = "\"'" ; then
17795
17796         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17797         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17798
17799                                 continue
17800                         fi
17801                         ;;
17802                 esac
17803                 case "$CPPFLAGS" in
17804                 (*$cf_add_cflags)
17805                         ;;
17806                 (*)
17807                         case "$cf_add_cflags" in
17808                         (-D*)
17809                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17810
17811 CPPFLAGS=`echo "$CPPFLAGS" | \
17812         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17813                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17814
17815                                 ;;
17816                         esac
17817
17818         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17819         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17820
17821                         ;;
17822                 esac
17823                 ;;
17824         (*)
17825
17826         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17827         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17828
17829                 ;;
17830         esac
17831         ;;
17832 (yes)
17833
17834         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17835         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17836
17837         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17838
17839         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17840                 && test -z "${cf_tst_cflags}" \
17841                 && cf_fix_cppflags=no
17842         ;;
17843 esac
17844 done
17845
17846 if test -n "$cf_new_cflags" ; then
17847
17848         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17849         CFLAGS="${CFLAGS}$cf_new_cflags"
17850
17851 fi
17852
17853 if test -n "$cf_new_cppflags" ; then
17854
17855         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17856         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17857
17858 fi
17859
17860 if test -n "$cf_new_extra_cppflags" ; then
17861
17862         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17863         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17864
17865 fi
17866
17867                 ;;
17868         esac
17869         ;;
17870 esac
17871
17872 if test "$with_dbmalloc" = yes ; then
17873         echo "$as_me:17873: checking for dbmalloc.h" >&5
17874 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
17875 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
17876   echo $ECHO_N "(cached) $ECHO_C" >&6
17877 else
17878   cat >"conftest.$ac_ext" <<_ACEOF
17879 #line 17879 "configure"
17880 #include "confdefs.h"
17881 #include <dbmalloc.h>
17882 _ACEOF
17883 if { (eval echo "$as_me:17883: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17884   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17885   ac_status=$?
17886   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17887   rm -f conftest.er1
17888   cat conftest.err >&5
17889   echo "$as_me:17889: \$? = $ac_status" >&5
17890   (exit "$ac_status"); } >/dev/null; then
17891   if test -s conftest.err; then
17892     ac_cpp_err=$ac_c_preproc_warn_flag
17893   else
17894     ac_cpp_err=
17895   fi
17896 else
17897   ac_cpp_err=yes
17898 fi
17899 if test -z "$ac_cpp_err"; then
17900   ac_cv_header_dbmalloc_h=yes
17901 else
17902   echo "$as_me: failed program was:" >&5
17903   cat "conftest.$ac_ext" >&5
17904   ac_cv_header_dbmalloc_h=no
17905 fi
17906 rm -f conftest.err "conftest.$ac_ext"
17907 fi
17908 echo "$as_me:17908: result: $ac_cv_header_dbmalloc_h" >&5
17909 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
17910 if test "$ac_cv_header_dbmalloc_h" = yes; then
17911
17912 echo "$as_me:17912: checking for debug_malloc in -ldbmalloc" >&5
17913 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
17914 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
17915   echo $ECHO_N "(cached) $ECHO_C" >&6
17916 else
17917   ac_check_lib_save_LIBS=$LIBS
17918 LIBS="-ldbmalloc  $LIBS"
17919 cat >"conftest.$ac_ext" <<_ACEOF
17920 #line 17920 "configure"
17921 #include "confdefs.h"
17922
17923 /* Override any gcc2 internal prototype to avoid an error.  */
17924 #ifdef __cplusplus
17925 extern "C"
17926 #endif
17927 /* We use char because int might match the return type of a gcc2
17928    builtin and then its argument prototype would still apply.  */
17929 char debug_malloc ();
17930 int
17931 main (void)
17932 {
17933 debug_malloc ();
17934   ;
17935   return 0;
17936 }
17937 _ACEOF
17938 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17939 if { (eval echo "$as_me:17939: \"$ac_link\"") >&5
17940   (eval $ac_link) 2>&5
17941   ac_status=$?
17942   echo "$as_me:17942: \$? = $ac_status" >&5
17943   (exit "$ac_status"); } &&
17944          { ac_try='test -s "conftest$ac_exeext"'
17945   { (eval echo "$as_me:17945: \"$ac_try\"") >&5
17946   (eval $ac_try) 2>&5
17947   ac_status=$?
17948   echo "$as_me:17948: \$? = $ac_status" >&5
17949   (exit "$ac_status"); }; }; then
17950   ac_cv_lib_dbmalloc_debug_malloc=yes
17951 else
17952   echo "$as_me: failed program was:" >&5
17953 cat "conftest.$ac_ext" >&5
17954 ac_cv_lib_dbmalloc_debug_malloc=no
17955 fi
17956 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17957 LIBS=$ac_check_lib_save_LIBS
17958 fi
17959 echo "$as_me:17959: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
17960 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
17961 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
17962   cat >>confdefs.h <<EOF
17963 #define HAVE_LIBDBMALLOC 1
17964 EOF
17965
17966   LIBS="-ldbmalloc $LIBS"
17967
17968 fi
17969
17970 fi
17971
17972 fi
17973
17974 echo "$as_me:17974: checking if you want to use valgrind for testing" >&5
17975 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
17976
17977 # Check whether --with-valgrind or --without-valgrind was given.
17978 if test "${with_valgrind+set}" = set; then
17979   withval="$with_valgrind"
17980   case "x$withval" in
17981         (x|xno) ;;
17982         (*)
17983                 : "${with_cflags:=-g}"
17984                 : "${enable_leaks:=no}"
17985                 with_valgrind=yes
17986
17987 cat >>confdefs.h <<EOF
17988 #define USE_VALGRIND 1
17989 EOF
17990
17991                 ;;
17992         esac
17993 else
17994   with_valgrind=
17995 fi;
17996 echo "$as_me:17996: result: ${with_valgrind:-no}" >&5
17997 echo "${ECHO_T}${with_valgrind:-no}" >&6
17998
17999 case ".$with_cflags" in
18000 (.*-g*)
18001         case .$CFLAGS in
18002         (.*-g*)
18003                 ;;
18004         (*)
18005
18006 cf_fix_cppflags=no
18007 cf_new_cflags=
18008 cf_new_cppflags=
18009 cf_new_extra_cppflags=
18010
18011 for cf_add_cflags in -g
18012 do
18013 case "$cf_fix_cppflags" in
18014 (no)
18015         case "$cf_add_cflags" in
18016         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18017                 case "$cf_add_cflags" in
18018                 (-D*)
18019                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18020
18021                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18022                                 && test -z "${cf_tst_cflags}" \
18023                                 && cf_fix_cppflags=yes
18024
18025                         if test "$cf_fix_cppflags" = yes ; then
18026
18027         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18028         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18029
18030                                 continue
18031                         elif test "${cf_tst_cflags}" = "\"'" ; then
18032
18033         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18034         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18035
18036                                 continue
18037                         fi
18038                         ;;
18039                 esac
18040                 case "$CPPFLAGS" in
18041                 (*$cf_add_cflags)
18042                         ;;
18043                 (*)
18044                         case "$cf_add_cflags" in
18045                         (-D*)
18046                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18047
18048 CPPFLAGS=`echo "$CPPFLAGS" | \
18049         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18050                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18051
18052                                 ;;
18053                         esac
18054
18055         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18056         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18057
18058                         ;;
18059                 esac
18060                 ;;
18061         (*)
18062
18063         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18064         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18065
18066                 ;;
18067         esac
18068         ;;
18069 (yes)
18070
18071         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18072         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18073
18074         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18075
18076         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18077                 && test -z "${cf_tst_cflags}" \
18078                 && cf_fix_cppflags=no
18079         ;;
18080 esac
18081 done
18082
18083 if test -n "$cf_new_cflags" ; then
18084
18085         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18086         CFLAGS="${CFLAGS}$cf_new_cflags"
18087
18088 fi
18089
18090 if test -n "$cf_new_cppflags" ; then
18091
18092         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18093         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18094
18095 fi
18096
18097 if test -n "$cf_new_extra_cppflags" ; then
18098
18099         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18100         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18101
18102 fi
18103
18104                 ;;
18105         esac
18106         ;;
18107 esac
18108
18109 echo "$as_me:18109: checking if you want to perform memory-leak testing" >&5
18110 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18111
18112 # Check whether --enable-leaks or --disable-leaks was given.
18113 if test "${enable_leaks+set}" = set; then
18114   enableval="$enable_leaks"
18115   enable_leaks=$enableval
18116 else
18117   enable_leaks=yes
18118 fi;
18119 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18120 echo "$as_me:18120: result: $with_no_leaks" >&5
18121 echo "${ECHO_T}$with_no_leaks" >&6
18122
18123 if test "$enable_leaks" = no ; then
18124
18125 cat >>confdefs.h <<\EOF
18126 #define NO_LEAKS 1
18127 EOF
18128
18129 cat >>confdefs.h <<\EOF
18130 #define YY_NO_LEAKS 1
18131 EOF
18132
18133 fi
18134
18135 cat >>confdefs.h <<\EOF
18136 #define HAVE_NC_ALLOC_H 1
18137 EOF
18138
18139 ###     use option --enable-expanded to generate certain macros as functions
18140
18141 # Check whether --enable-expanded or --disable-expanded was given.
18142 if test "${enable_expanded+set}" = set; then
18143   enableval="$enable_expanded"
18144   test "x$enableval" = xyes &&
18145 cat >>confdefs.h <<\EOF
18146 #define NCURSES_EXPANDED 1
18147 EOF
18148
18149 fi;
18150
18151 ###     use option --disable-macros to suppress macros in favor of functions
18152
18153 # Check whether --enable-macros or --disable-macros was given.
18154 if test "${enable_macros+set}" = set; then
18155   enableval="$enable_macros"
18156   test "$enableval" = no &&
18157 cat >>confdefs.h <<\EOF
18158 #define NCURSES_NOMACROS 1
18159 EOF
18160
18161 fi;
18162
18163 # Normally we only add trace() to the debug-library.  Allow this to be
18164 # extended to all models of the ncurses library:
18165 cf_all_traces=no
18166 case "$CFLAGS $CPPFLAGS" in
18167 (*-DTRACE*)
18168         cf_all_traces=yes
18169         ;;
18170 esac
18171
18172 echo "$as_me:18172: checking whether to add trace feature to all models" >&5
18173 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18174
18175 # Check whether --with-trace or --without-trace was given.
18176 if test "${with_trace+set}" = set; then
18177   withval="$with_trace"
18178   cf_with_trace=$withval
18179 else
18180   cf_with_trace=$cf_all_traces
18181 fi;
18182 echo "$as_me:18182: result: $cf_with_trace" >&5
18183 echo "${ECHO_T}$cf_with_trace" >&6
18184
18185 if test "x$cf_with_trace" = xyes ; then
18186         LIB_TRACING=all
18187         ADA_TRACE=TRUE
18188
18189 cf_fix_cppflags=no
18190 cf_new_cflags=
18191 cf_new_cppflags=
18192 cf_new_extra_cppflags=
18193
18194 for cf_add_cflags in -DTRACE
18195 do
18196 case "$cf_fix_cppflags" in
18197 (no)
18198         case "$cf_add_cflags" in
18199         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18200                 case "$cf_add_cflags" in
18201                 (-D*)
18202                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18203
18204                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18205                                 && test -z "${cf_tst_cflags}" \
18206                                 && cf_fix_cppflags=yes
18207
18208                         if test "$cf_fix_cppflags" = yes ; then
18209
18210         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18211         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18212
18213                                 continue
18214                         elif test "${cf_tst_cflags}" = "\"'" ; then
18215
18216         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18217         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18218
18219                                 continue
18220                         fi
18221                         ;;
18222                 esac
18223                 case "$CPPFLAGS" in
18224                 (*$cf_add_cflags)
18225                         ;;
18226                 (*)
18227                         case "$cf_add_cflags" in
18228                         (-D*)
18229                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18230
18231 CPPFLAGS=`echo "$CPPFLAGS" | \
18232         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18233                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18234
18235                                 ;;
18236                         esac
18237
18238         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18239         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18240
18241                         ;;
18242                 esac
18243                 ;;
18244         (*)
18245
18246         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18247         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18248
18249                 ;;
18250         esac
18251         ;;
18252 (yes)
18253
18254         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18255         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18256
18257         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18258
18259         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18260                 && test -z "${cf_tst_cflags}" \
18261                 && cf_fix_cppflags=no
18262         ;;
18263 esac
18264 done
18265
18266 if test -n "$cf_new_cflags" ; then
18267
18268         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18269         CFLAGS="${CFLAGS}$cf_new_cflags"
18270
18271 fi
18272
18273 if test -n "$cf_new_cppflags" ; then
18274
18275         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18276         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18277
18278 fi
18279
18280 if test -n "$cf_new_extra_cppflags" ; then
18281
18282         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18283         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18284
18285 fi
18286
18287 cat >>confdefs.h <<\EOF
18288 #define HAVE__TRACEF 1
18289 EOF
18290
18291 else
18292         LIB_TRACING=DEBUG
18293         ADA_TRACE=FALSE
18294 fi
18295
18296 echo "$as_me:18296: checking if we want to use GNAT projects" >&5
18297 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
18298
18299 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
18300 if test "${enable_gnat_projects+set}" = set; then
18301   enableval="$enable_gnat_projects"
18302   test "$enableval" != no && enableval=yes
18303         if test "$enableval" != "yes" ; then
18304     enable_gnat_projects=no
18305         else
18306                 enable_gnat_projects=yes
18307         fi
18308 else
18309   enableval=yes
18310         enable_gnat_projects=yes
18311
18312 fi;
18313 echo "$as_me:18313: result: $enable_gnat_projects" >&5
18314 echo "${ECHO_T}$enable_gnat_projects" >&6
18315
18316 ###     Checks for libraries.
18317 case "$cf_cv_system_name" in
18318 (*mingw32*|*mingw64*)
18319         if test "x$with_exp_win32" = xyes ; then
18320         CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
18321         else
18322         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
18323         fi
18324         # Note: WINVER may be a problem with Windows 10
18325         ;;
18326 (*)
18327 echo "$as_me:18327: checking for gettimeofday" >&5
18328 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
18329 if test "${ac_cv_func_gettimeofday+set}" = set; then
18330   echo $ECHO_N "(cached) $ECHO_C" >&6
18331 else
18332   cat >"conftest.$ac_ext" <<_ACEOF
18333 #line 18333 "configure"
18334 #include "confdefs.h"
18335 #define gettimeofday autoconf_temporary
18336 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18337 #undef gettimeofday
18338
18339 #ifdef __cplusplus
18340 extern "C"
18341 #endif
18342
18343 /* We use char because int might match the return type of a gcc2
18344    builtin and then its argument prototype would still apply.  */
18345 char gettimeofday (void);
18346
18347 int
18348 main (void)
18349 {
18350
18351 /* The GNU C library defines stubs for functions which it implements
18352     to always fail with ENOSYS.  Some functions are actually named
18353     something starting with __ and the normal name is an alias.  */
18354 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
18355 #error found stub for gettimeofday
18356 #endif
18357
18358         return gettimeofday ();
18359   ;
18360   return 0;
18361 }
18362 _ACEOF
18363 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18364 if { (eval echo "$as_me:18364: \"$ac_link\"") >&5
18365   (eval $ac_link) 2>&5
18366   ac_status=$?
18367   echo "$as_me:18367: \$? = $ac_status" >&5
18368   (exit "$ac_status"); } &&
18369          { ac_try='test -s "conftest$ac_exeext"'
18370   { (eval echo "$as_me:18370: \"$ac_try\"") >&5
18371   (eval $ac_try) 2>&5
18372   ac_status=$?
18373   echo "$as_me:18373: \$? = $ac_status" >&5
18374   (exit "$ac_status"); }; }; then
18375   ac_cv_func_gettimeofday=yes
18376 else
18377   echo "$as_me: failed program was:" >&5
18378 cat "conftest.$ac_ext" >&5
18379 ac_cv_func_gettimeofday=no
18380 fi
18381 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18382 fi
18383 echo "$as_me:18383: result: $ac_cv_func_gettimeofday" >&5
18384 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
18385 if test "$ac_cv_func_gettimeofday" = yes; then
18386
18387 cat >>confdefs.h <<\EOF
18388 #define HAVE_GETTIMEOFDAY 1
18389 EOF
18390
18391 else
18392
18393 echo "$as_me:18393: checking for gettimeofday in -lbsd" >&5
18394 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
18395 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
18396   echo $ECHO_N "(cached) $ECHO_C" >&6
18397 else
18398   ac_check_lib_save_LIBS=$LIBS
18399 LIBS="-lbsd  $LIBS"
18400 cat >"conftest.$ac_ext" <<_ACEOF
18401 #line 18401 "configure"
18402 #include "confdefs.h"
18403
18404 /* Override any gcc2 internal prototype to avoid an error.  */
18405 #ifdef __cplusplus
18406 extern "C"
18407 #endif
18408 /* We use char because int might match the return type of a gcc2
18409    builtin and then its argument prototype would still apply.  */
18410 char gettimeofday ();
18411 int
18412 main (void)
18413 {
18414 gettimeofday ();
18415   ;
18416   return 0;
18417 }
18418 _ACEOF
18419 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18420 if { (eval echo "$as_me:18420: \"$ac_link\"") >&5
18421   (eval $ac_link) 2>&5
18422   ac_status=$?
18423   echo "$as_me:18423: \$? = $ac_status" >&5
18424   (exit "$ac_status"); } &&
18425          { ac_try='test -s "conftest$ac_exeext"'
18426   { (eval echo "$as_me:18426: \"$ac_try\"") >&5
18427   (eval $ac_try) 2>&5
18428   ac_status=$?
18429   echo "$as_me:18429: \$? = $ac_status" >&5
18430   (exit "$ac_status"); }; }; then
18431   ac_cv_lib_bsd_gettimeofday=yes
18432 else
18433   echo "$as_me: failed program was:" >&5
18434 cat "conftest.$ac_ext" >&5
18435 ac_cv_lib_bsd_gettimeofday=no
18436 fi
18437 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18438 LIBS=$ac_check_lib_save_LIBS
18439 fi
18440 echo "$as_me:18440: result: $ac_cv_lib_bsd_gettimeofday" >&5
18441 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
18442 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
18443
18444 cat >>confdefs.h <<\EOF
18445 #define HAVE_GETTIMEOFDAY 1
18446 EOF
18447
18448 cf_add_libs="$LIBS"
18449 # reverse order
18450 cf_add_0lib=
18451 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18452 # filter duplicates
18453 for cf_add_1lib in $cf_add_0lib; do
18454         for cf_add_2lib in $cf_add_libs; do
18455                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18456                         cf_add_1lib=
18457                         break
18458                 fi
18459         done
18460         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18461 done
18462 LIBS="$cf_add_libs"
18463
18464 fi
18465
18466 fi
18467         ;;
18468 esac
18469
18470 echo "$as_me:18470: checking if -lm needed for math functions" >&5
18471 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
18472 if test "${cf_cv_need_libm+set}" = set; then
18473   echo $ECHO_N "(cached) $ECHO_C" >&6
18474 else
18475
18476         cat >"conftest.$ac_ext" <<_ACEOF
18477 #line 18477 "configure"
18478 #include "confdefs.h"
18479
18480         #include <stdio.h>
18481         #include <stdlib.h>
18482         #include <math.h>
18483
18484 int
18485 main (void)
18486 {
18487 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
18488   ;
18489   return 0;
18490 }
18491 _ACEOF
18492 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18493 if { (eval echo "$as_me:18493: \"$ac_link\"") >&5
18494   (eval $ac_link) 2>&5
18495   ac_status=$?
18496   echo "$as_me:18496: \$? = $ac_status" >&5
18497   (exit "$ac_status"); } &&
18498          { ac_try='test -s "conftest$ac_exeext"'
18499   { (eval echo "$as_me:18499: \"$ac_try\"") >&5
18500   (eval $ac_try) 2>&5
18501   ac_status=$?
18502   echo "$as_me:18502: \$? = $ac_status" >&5
18503   (exit "$ac_status"); }; }; then
18504   cf_cv_need_libm=no
18505 else
18506   echo "$as_me: failed program was:" >&5
18507 cat "conftest.$ac_ext" >&5
18508 cf_cv_need_libm=yes
18509 fi
18510 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18511 fi
18512 echo "$as_me:18512: result: $cf_cv_need_libm" >&5
18513 echo "${ECHO_T}$cf_cv_need_libm" >&6
18514 if test "$cf_cv_need_libm" = yes
18515 then
18516 MATH_LIB=-lm
18517 fi
18518
18519 ###     Checks for header files.
18520 echo "$as_me:18520: checking for ANSI C header files" >&5
18521 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
18522 if test "${ac_cv_header_stdc+set}" = set; then
18523   echo $ECHO_N "(cached) $ECHO_C" >&6
18524 else
18525   cat >"conftest.$ac_ext" <<_ACEOF
18526 #line 18526 "configure"
18527 #include "confdefs.h"
18528 #include <stdlib.h>
18529 #include <stdarg.h>
18530 #include <string.h>
18531 #include <float.h>
18532
18533 _ACEOF
18534 if { (eval echo "$as_me:18534: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18535   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18536   ac_status=$?
18537   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18538   rm -f conftest.er1
18539   cat conftest.err >&5
18540   echo "$as_me:18540: \$? = $ac_status" >&5
18541   (exit "$ac_status"); } >/dev/null; then
18542   if test -s conftest.err; then
18543     ac_cpp_err=$ac_c_preproc_warn_flag
18544   else
18545     ac_cpp_err=
18546   fi
18547 else
18548   ac_cpp_err=yes
18549 fi
18550 if test -z "$ac_cpp_err"; then
18551   ac_cv_header_stdc=yes
18552 else
18553   echo "$as_me: failed program was:" >&5
18554   cat "conftest.$ac_ext" >&5
18555   ac_cv_header_stdc=no
18556 fi
18557 rm -f conftest.err "conftest.$ac_ext"
18558
18559 if test $ac_cv_header_stdc = yes; then
18560   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
18561   cat >"conftest.$ac_ext" <<_ACEOF
18562 #line 18562 "configure"
18563 #include "confdefs.h"
18564 #include <string.h>
18565
18566 _ACEOF
18567 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18568   $EGREP "memchr" >/dev/null 2>&1; then
18569   :
18570 else
18571   ac_cv_header_stdc=no
18572 fi
18573 rm -rf conftest*
18574
18575 fi
18576
18577 if test $ac_cv_header_stdc = yes; then
18578   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
18579   cat >"conftest.$ac_ext" <<_ACEOF
18580 #line 18580 "configure"
18581 #include "confdefs.h"
18582 #include <stdlib.h>
18583
18584 _ACEOF
18585 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18586   $EGREP "free" >/dev/null 2>&1; then
18587   :
18588 else
18589   ac_cv_header_stdc=no
18590 fi
18591 rm -rf conftest*
18592
18593 fi
18594
18595 if test $ac_cv_header_stdc = yes; then
18596   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
18597   if test "$cross_compiling" = yes; then
18598   :
18599 else
18600   cat >"conftest.$ac_ext" <<_ACEOF
18601 #line 18601 "configure"
18602 #include "confdefs.h"
18603 #include <ctype.h>
18604 #if ((' ' & 0x0FF) == 0x020)
18605 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
18606 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
18607 #else
18608 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
18609                      || ('j' <= (c) && (c) <= 'r') \
18610                      || ('s' <= (c) && (c) <= 'z'))
18611 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
18612 #endif
18613
18614 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
18615 int
18616 main (void)
18617 {
18618   int i;
18619   for (i = 0; i < 256; i++)
18620     if (XOR (islower (i), ISLOWER (i))
18621         || toupper (i) != TOUPPER (i))
18622       $ac_main_return(2);
18623   $ac_main_return (0);
18624 }
18625 _ACEOF
18626 rm -f "conftest$ac_exeext"
18627 if { (eval echo "$as_me:18627: \"$ac_link\"") >&5
18628   (eval $ac_link) 2>&5
18629   ac_status=$?
18630   echo "$as_me:18630: \$? = $ac_status" >&5
18631   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
18632   { (eval echo "$as_me:18632: \"$ac_try\"") >&5
18633   (eval $ac_try) 2>&5
18634   ac_status=$?
18635   echo "$as_me:18635: \$? = $ac_status" >&5
18636   (exit "$ac_status"); }; }; then
18637   :
18638 else
18639   echo "$as_me: program exited with status $ac_status" >&5
18640 echo "$as_me: failed program was:" >&5
18641 cat "conftest.$ac_ext" >&5
18642 ac_cv_header_stdc=no
18643 fi
18644 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
18645 fi
18646 fi
18647 fi
18648 echo "$as_me:18648: result: $ac_cv_header_stdc" >&5
18649 echo "${ECHO_T}$ac_cv_header_stdc" >&6
18650 if test $ac_cv_header_stdc = yes; then
18651
18652 cat >>confdefs.h <<\EOF
18653 #define STDC_HEADERS 1
18654 EOF
18655
18656 fi
18657
18658 ac_header_dirent=no
18659 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
18660   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
18661 echo "$as_me:18661: checking for $ac_hdr that defines DIR" >&5
18662 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
18663 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18664   echo $ECHO_N "(cached) $ECHO_C" >&6
18665 else
18666   cat >"conftest.$ac_ext" <<_ACEOF
18667 #line 18667 "configure"
18668 #include "confdefs.h"
18669 #include <sys/types.h>
18670 #include <$ac_hdr>
18671
18672 int
18673 main (void)
18674 {
18675 if ((DIR *) 0)
18676 return 0;
18677   ;
18678   return 0;
18679 }
18680 _ACEOF
18681 rm -f "conftest.$ac_objext"
18682 if { (eval echo "$as_me:18682: \"$ac_compile\"") >&5
18683   (eval $ac_compile) 2>&5
18684   ac_status=$?
18685   echo "$as_me:18685: \$? = $ac_status" >&5
18686   (exit "$ac_status"); } &&
18687          { ac_try='test -s "conftest.$ac_objext"'
18688   { (eval echo "$as_me:18688: \"$ac_try\"") >&5
18689   (eval $ac_try) 2>&5
18690   ac_status=$?
18691   echo "$as_me:18691: \$? = $ac_status" >&5
18692   (exit "$ac_status"); }; }; then
18693   eval "$as_ac_Header=yes"
18694 else
18695   echo "$as_me: failed program was:" >&5
18696 cat "conftest.$ac_ext" >&5
18697 eval "$as_ac_Header=no"
18698 fi
18699 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18700 fi
18701 echo "$as_me:18701: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18702 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18703 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18704   cat >>confdefs.h <<EOF
18705 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
18706 EOF
18707
18708 ac_header_dirent=$ac_hdr; break
18709 fi
18710
18711 done
18712 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
18713 if test $ac_header_dirent = dirent.h; then
18714   echo "$as_me:18714: checking for opendir in -ldir" >&5
18715 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
18716 if test "${ac_cv_lib_dir_opendir+set}" = set; then
18717   echo $ECHO_N "(cached) $ECHO_C" >&6
18718 else
18719   ac_check_lib_save_LIBS=$LIBS
18720 LIBS="-ldir  $LIBS"
18721 cat >"conftest.$ac_ext" <<_ACEOF
18722 #line 18722 "configure"
18723 #include "confdefs.h"
18724
18725 /* Override any gcc2 internal prototype to avoid an error.  */
18726 #ifdef __cplusplus
18727 extern "C"
18728 #endif
18729 /* We use char because int might match the return type of a gcc2
18730    builtin and then its argument prototype would still apply.  */
18731 char opendir ();
18732 int
18733 main (void)
18734 {
18735 opendir ();
18736   ;
18737   return 0;
18738 }
18739 _ACEOF
18740 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18741 if { (eval echo "$as_me:18741: \"$ac_link\"") >&5
18742   (eval $ac_link) 2>&5
18743   ac_status=$?
18744   echo "$as_me:18744: \$? = $ac_status" >&5
18745   (exit "$ac_status"); } &&
18746          { ac_try='test -s "conftest$ac_exeext"'
18747   { (eval echo "$as_me:18747: \"$ac_try\"") >&5
18748   (eval $ac_try) 2>&5
18749   ac_status=$?
18750   echo "$as_me:18750: \$? = $ac_status" >&5
18751   (exit "$ac_status"); }; }; then
18752   ac_cv_lib_dir_opendir=yes
18753 else
18754   echo "$as_me: failed program was:" >&5
18755 cat "conftest.$ac_ext" >&5
18756 ac_cv_lib_dir_opendir=no
18757 fi
18758 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18759 LIBS=$ac_check_lib_save_LIBS
18760 fi
18761 echo "$as_me:18761: result: $ac_cv_lib_dir_opendir" >&5
18762 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
18763 if test "$ac_cv_lib_dir_opendir" = yes; then
18764   LIBS="$LIBS -ldir"
18765 fi
18766
18767 else
18768   echo "$as_me:18768: checking for opendir in -lx" >&5
18769 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
18770 if test "${ac_cv_lib_x_opendir+set}" = set; then
18771   echo $ECHO_N "(cached) $ECHO_C" >&6
18772 else
18773   ac_check_lib_save_LIBS=$LIBS
18774 LIBS="-lx  $LIBS"
18775 cat >"conftest.$ac_ext" <<_ACEOF
18776 #line 18776 "configure"
18777 #include "confdefs.h"
18778
18779 /* Override any gcc2 internal prototype to avoid an error.  */
18780 #ifdef __cplusplus
18781 extern "C"
18782 #endif
18783 /* We use char because int might match the return type of a gcc2
18784    builtin and then its argument prototype would still apply.  */
18785 char opendir ();
18786 int
18787 main (void)
18788 {
18789 opendir ();
18790   ;
18791   return 0;
18792 }
18793 _ACEOF
18794 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18795 if { (eval echo "$as_me:18795: \"$ac_link\"") >&5
18796   (eval $ac_link) 2>&5
18797   ac_status=$?
18798   echo "$as_me:18798: \$? = $ac_status" >&5
18799   (exit "$ac_status"); } &&
18800          { ac_try='test -s "conftest$ac_exeext"'
18801   { (eval echo "$as_me:18801: \"$ac_try\"") >&5
18802   (eval $ac_try) 2>&5
18803   ac_status=$?
18804   echo "$as_me:18804: \$? = $ac_status" >&5
18805   (exit "$ac_status"); }; }; then
18806   ac_cv_lib_x_opendir=yes
18807 else
18808   echo "$as_me: failed program was:" >&5
18809 cat "conftest.$ac_ext" >&5
18810 ac_cv_lib_x_opendir=no
18811 fi
18812 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18813 LIBS=$ac_check_lib_save_LIBS
18814 fi
18815 echo "$as_me:18815: result: $ac_cv_lib_x_opendir" >&5
18816 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
18817 if test "$ac_cv_lib_x_opendir" = yes; then
18818   LIBS="$LIBS -lx"
18819 fi
18820
18821 fi
18822
18823 echo "$as_me:18823: checking whether time.h and sys/time.h may both be included" >&5
18824 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
18825 if test "${ac_cv_header_time+set}" = set; then
18826   echo $ECHO_N "(cached) $ECHO_C" >&6
18827 else
18828   cat >"conftest.$ac_ext" <<_ACEOF
18829 #line 18829 "configure"
18830 #include "confdefs.h"
18831 #include <sys/types.h>
18832 #include <sys/time.h>
18833 #include <time.h>
18834
18835 int
18836 main (void)
18837 {
18838 if ((struct tm *) 0)
18839 return 0;
18840   ;
18841   return 0;
18842 }
18843 _ACEOF
18844 rm -f "conftest.$ac_objext"
18845 if { (eval echo "$as_me:18845: \"$ac_compile\"") >&5
18846   (eval $ac_compile) 2>&5
18847   ac_status=$?
18848   echo "$as_me:18848: \$? = $ac_status" >&5
18849   (exit "$ac_status"); } &&
18850          { ac_try='test -s "conftest.$ac_objext"'
18851   { (eval echo "$as_me:18851: \"$ac_try\"") >&5
18852   (eval $ac_try) 2>&5
18853   ac_status=$?
18854   echo "$as_me:18854: \$? = $ac_status" >&5
18855   (exit "$ac_status"); }; }; then
18856   ac_cv_header_time=yes
18857 else
18858   echo "$as_me: failed program was:" >&5
18859 cat "conftest.$ac_ext" >&5
18860 ac_cv_header_time=no
18861 fi
18862 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18863 fi
18864 echo "$as_me:18864: result: $ac_cv_header_time" >&5
18865 echo "${ECHO_T}$ac_cv_header_time" >&6
18866 if test $ac_cv_header_time = yes; then
18867
18868 cat >>confdefs.h <<\EOF
18869 #define TIME_WITH_SYS_TIME 1
18870 EOF
18871
18872 fi
18873
18874 cf_regex_func=no
18875 cf_regex_libs=
18876 case "$host_os" in
18877 (mingw*)
18878         # -lsystre -ltre -lintl -liconv
18879         echo "$as_me:18879: checking for regcomp in -lsystre" >&5
18880 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
18881 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
18882   echo $ECHO_N "(cached) $ECHO_C" >&6
18883 else
18884   ac_check_lib_save_LIBS=$LIBS
18885 LIBS="-lsystre  $LIBS"
18886 cat >"conftest.$ac_ext" <<_ACEOF
18887 #line 18887 "configure"
18888 #include "confdefs.h"
18889
18890 /* Override any gcc2 internal prototype to avoid an error.  */
18891 #ifdef __cplusplus
18892 extern "C"
18893 #endif
18894 /* We use char because int might match the return type of a gcc2
18895    builtin and then its argument prototype would still apply.  */
18896 char regcomp ();
18897 int
18898 main (void)
18899 {
18900 regcomp ();
18901   ;
18902   return 0;
18903 }
18904 _ACEOF
18905 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18906 if { (eval echo "$as_me:18906: \"$ac_link\"") >&5
18907   (eval $ac_link) 2>&5
18908   ac_status=$?
18909   echo "$as_me:18909: \$? = $ac_status" >&5
18910   (exit "$ac_status"); } &&
18911          { ac_try='test -s "conftest$ac_exeext"'
18912   { (eval echo "$as_me:18912: \"$ac_try\"") >&5
18913   (eval $ac_try) 2>&5
18914   ac_status=$?
18915   echo "$as_me:18915: \$? = $ac_status" >&5
18916   (exit "$ac_status"); }; }; then
18917   ac_cv_lib_systre_regcomp=yes
18918 else
18919   echo "$as_me: failed program was:" >&5
18920 cat "conftest.$ac_ext" >&5
18921 ac_cv_lib_systre_regcomp=no
18922 fi
18923 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18924 LIBS=$ac_check_lib_save_LIBS
18925 fi
18926 echo "$as_me:18926: result: $ac_cv_lib_systre_regcomp" >&5
18927 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
18928 if test "$ac_cv_lib_systre_regcomp" = yes; then
18929
18930                 echo "$as_me:18930: checking for libiconv_open in -liconv" >&5
18931 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
18932 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
18933   echo $ECHO_N "(cached) $ECHO_C" >&6
18934 else
18935   ac_check_lib_save_LIBS=$LIBS
18936 LIBS="-liconv  $LIBS"
18937 cat >"conftest.$ac_ext" <<_ACEOF
18938 #line 18938 "configure"
18939 #include "confdefs.h"
18940
18941 /* Override any gcc2 internal prototype to avoid an error.  */
18942 #ifdef __cplusplus
18943 extern "C"
18944 #endif
18945 /* We use char because int might match the return type of a gcc2
18946    builtin and then its argument prototype would still apply.  */
18947 char libiconv_open ();
18948 int
18949 main (void)
18950 {
18951 libiconv_open ();
18952   ;
18953   return 0;
18954 }
18955 _ACEOF
18956 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18957 if { (eval echo "$as_me:18957: \"$ac_link\"") >&5
18958   (eval $ac_link) 2>&5
18959   ac_status=$?
18960   echo "$as_me:18960: \$? = $ac_status" >&5
18961   (exit "$ac_status"); } &&
18962          { ac_try='test -s "conftest$ac_exeext"'
18963   { (eval echo "$as_me:18963: \"$ac_try\"") >&5
18964   (eval $ac_try) 2>&5
18965   ac_status=$?
18966   echo "$as_me:18966: \$? = $ac_status" >&5
18967   (exit "$ac_status"); }; }; then
18968   ac_cv_lib_iconv_libiconv_open=yes
18969 else
18970   echo "$as_me: failed program was:" >&5
18971 cat "conftest.$ac_ext" >&5
18972 ac_cv_lib_iconv_libiconv_open=no
18973 fi
18974 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18975 LIBS=$ac_check_lib_save_LIBS
18976 fi
18977 echo "$as_me:18977: result: $ac_cv_lib_iconv_libiconv_open" >&5
18978 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
18979 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
18980
18981 cf_add_libs="$LIBS"
18982 # reverse order
18983 cf_add_0lib=
18984 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18985 # filter duplicates
18986 for cf_add_1lib in $cf_add_0lib; do
18987         for cf_add_2lib in $cf_add_libs; do
18988                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18989                         cf_add_1lib=
18990                         break
18991                 fi
18992         done
18993         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18994 done
18995 LIBS="$cf_add_libs"
18996
18997 fi
18998
18999                 echo "$as_me:18999: checking for libintl_gettext in -lintl" >&5
19000 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19001 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19002   echo $ECHO_N "(cached) $ECHO_C" >&6
19003 else
19004   ac_check_lib_save_LIBS=$LIBS
19005 LIBS="-lintl  $LIBS"
19006 cat >"conftest.$ac_ext" <<_ACEOF
19007 #line 19007 "configure"
19008 #include "confdefs.h"
19009
19010 /* Override any gcc2 internal prototype to avoid an error.  */
19011 #ifdef __cplusplus
19012 extern "C"
19013 #endif
19014 /* We use char because int might match the return type of a gcc2
19015    builtin and then its argument prototype would still apply.  */
19016 char libintl_gettext ();
19017 int
19018 main (void)
19019 {
19020 libintl_gettext ();
19021   ;
19022   return 0;
19023 }
19024 _ACEOF
19025 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19026 if { (eval echo "$as_me:19026: \"$ac_link\"") >&5
19027   (eval $ac_link) 2>&5
19028   ac_status=$?
19029   echo "$as_me:19029: \$? = $ac_status" >&5
19030   (exit "$ac_status"); } &&
19031          { ac_try='test -s "conftest$ac_exeext"'
19032   { (eval echo "$as_me:19032: \"$ac_try\"") >&5
19033   (eval $ac_try) 2>&5
19034   ac_status=$?
19035   echo "$as_me:19035: \$? = $ac_status" >&5
19036   (exit "$ac_status"); }; }; then
19037   ac_cv_lib_intl_libintl_gettext=yes
19038 else
19039   echo "$as_me: failed program was:" >&5
19040 cat "conftest.$ac_ext" >&5
19041 ac_cv_lib_intl_libintl_gettext=no
19042 fi
19043 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19044 LIBS=$ac_check_lib_save_LIBS
19045 fi
19046 echo "$as_me:19046: result: $ac_cv_lib_intl_libintl_gettext" >&5
19047 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19048 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19049
19050 cf_add_libs="$LIBS"
19051 # reverse order
19052 cf_add_0lib=
19053 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19054 # filter duplicates
19055 for cf_add_1lib in $cf_add_0lib; do
19056         for cf_add_2lib in $cf_add_libs; do
19057                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19058                         cf_add_1lib=
19059                         break
19060                 fi
19061         done
19062         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19063 done
19064 LIBS="$cf_add_libs"
19065
19066 fi
19067
19068                 echo "$as_me:19068: checking for tre_regcomp in -ltre" >&5
19069 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19070 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19071   echo $ECHO_N "(cached) $ECHO_C" >&6
19072 else
19073   ac_check_lib_save_LIBS=$LIBS
19074 LIBS="-ltre  $LIBS"
19075 cat >"conftest.$ac_ext" <<_ACEOF
19076 #line 19076 "configure"
19077 #include "confdefs.h"
19078
19079 /* Override any gcc2 internal prototype to avoid an error.  */
19080 #ifdef __cplusplus
19081 extern "C"
19082 #endif
19083 /* We use char because int might match the return type of a gcc2
19084    builtin and then its argument prototype would still apply.  */
19085 char tre_regcomp ();
19086 int
19087 main (void)
19088 {
19089 tre_regcomp ();
19090   ;
19091   return 0;
19092 }
19093 _ACEOF
19094 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19095 if { (eval echo "$as_me:19095: \"$ac_link\"") >&5
19096   (eval $ac_link) 2>&5
19097   ac_status=$?
19098   echo "$as_me:19098: \$? = $ac_status" >&5
19099   (exit "$ac_status"); } &&
19100          { ac_try='test -s "conftest$ac_exeext"'
19101   { (eval echo "$as_me:19101: \"$ac_try\"") >&5
19102   (eval $ac_try) 2>&5
19103   ac_status=$?
19104   echo "$as_me:19104: \$? = $ac_status" >&5
19105   (exit "$ac_status"); }; }; then
19106   ac_cv_lib_tre_tre_regcomp=yes
19107 else
19108   echo "$as_me: failed program was:" >&5
19109 cat "conftest.$ac_ext" >&5
19110 ac_cv_lib_tre_tre_regcomp=no
19111 fi
19112 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19113 LIBS=$ac_check_lib_save_LIBS
19114 fi
19115 echo "$as_me:19115: result: $ac_cv_lib_tre_tre_regcomp" >&5
19116 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19117 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19118
19119 cf_add_libs="$LIBS"
19120 # reverse order
19121 cf_add_0lib=
19122 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19123 # filter duplicates
19124 for cf_add_1lib in $cf_add_0lib; do
19125         for cf_add_2lib in $cf_add_libs; do
19126                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19127                         cf_add_1lib=
19128                         break
19129                 fi
19130         done
19131         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19132 done
19133 LIBS="$cf_add_libs"
19134
19135 fi
19136
19137 cf_add_libs="$LIBS"
19138 # reverse order
19139 cf_add_0lib=
19140 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19141 # filter duplicates
19142 for cf_add_1lib in $cf_add_0lib; do
19143         for cf_add_2lib in $cf_add_libs; do
19144                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19145                         cf_add_1lib=
19146                         break
19147                 fi
19148         done
19149         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19150 done
19151 LIBS="$cf_add_libs"
19152
19153                 cf_regex_func=regcomp
19154
19155 else
19156
19157                 echo "$as_me:19157: checking for regcomp in -lgnurx" >&5
19158 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19159 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19160   echo $ECHO_N "(cached) $ECHO_C" >&6
19161 else
19162   ac_check_lib_save_LIBS=$LIBS
19163 LIBS="-lgnurx  $LIBS"
19164 cat >"conftest.$ac_ext" <<_ACEOF
19165 #line 19165 "configure"
19166 #include "confdefs.h"
19167
19168 /* Override any gcc2 internal prototype to avoid an error.  */
19169 #ifdef __cplusplus
19170 extern "C"
19171 #endif
19172 /* We use char because int might match the return type of a gcc2
19173    builtin and then its argument prototype would still apply.  */
19174 char regcomp ();
19175 int
19176 main (void)
19177 {
19178 regcomp ();
19179   ;
19180   return 0;
19181 }
19182 _ACEOF
19183 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19184 if { (eval echo "$as_me:19184: \"$ac_link\"") >&5
19185   (eval $ac_link) 2>&5
19186   ac_status=$?
19187   echo "$as_me:19187: \$? = $ac_status" >&5
19188   (exit "$ac_status"); } &&
19189          { ac_try='test -s "conftest$ac_exeext"'
19190   { (eval echo "$as_me:19190: \"$ac_try\"") >&5
19191   (eval $ac_try) 2>&5
19192   ac_status=$?
19193   echo "$as_me:19193: \$? = $ac_status" >&5
19194   (exit "$ac_status"); }; }; then
19195   ac_cv_lib_gnurx_regcomp=yes
19196 else
19197   echo "$as_me: failed program was:" >&5
19198 cat "conftest.$ac_ext" >&5
19199 ac_cv_lib_gnurx_regcomp=no
19200 fi
19201 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19202 LIBS=$ac_check_lib_save_LIBS
19203 fi
19204 echo "$as_me:19204: result: $ac_cv_lib_gnurx_regcomp" >&5
19205 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19206 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19207
19208 cf_add_libs="$LIBS"
19209 # reverse order
19210 cf_add_0lib=
19211 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19212 # filter duplicates
19213 for cf_add_1lib in $cf_add_0lib; do
19214         for cf_add_2lib in $cf_add_libs; do
19215                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19216                         cf_add_1lib=
19217                         break
19218                 fi
19219         done
19220         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19221 done
19222 LIBS="$cf_add_libs"
19223
19224                         cf_regex_func=regcomp
19225 fi
19226
19227 fi
19228
19229         ;;
19230 (*)
19231         cf_regex_libs="regex re"
19232         echo "$as_me:19232: checking for regcomp" >&5
19233 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19234 if test "${ac_cv_func_regcomp+set}" = set; then
19235   echo $ECHO_N "(cached) $ECHO_C" >&6
19236 else
19237   cat >"conftest.$ac_ext" <<_ACEOF
19238 #line 19238 "configure"
19239 #include "confdefs.h"
19240 #define regcomp autoconf_temporary
19241 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19242 #undef regcomp
19243
19244 #ifdef __cplusplus
19245 extern "C"
19246 #endif
19247
19248 /* We use char because int might match the return type of a gcc2
19249    builtin and then its argument prototype would still apply.  */
19250 char regcomp (void);
19251
19252 int
19253 main (void)
19254 {
19255
19256 /* The GNU C library defines stubs for functions which it implements
19257     to always fail with ENOSYS.  Some functions are actually named
19258     something starting with __ and the normal name is an alias.  */
19259 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19260 #error found stub for regcomp
19261 #endif
19262
19263         return regcomp ();
19264   ;
19265   return 0;
19266 }
19267 _ACEOF
19268 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19269 if { (eval echo "$as_me:19269: \"$ac_link\"") >&5
19270   (eval $ac_link) 2>&5
19271   ac_status=$?
19272   echo "$as_me:19272: \$? = $ac_status" >&5
19273   (exit "$ac_status"); } &&
19274          { ac_try='test -s "conftest$ac_exeext"'
19275   { (eval echo "$as_me:19275: \"$ac_try\"") >&5
19276   (eval $ac_try) 2>&5
19277   ac_status=$?
19278   echo "$as_me:19278: \$? = $ac_status" >&5
19279   (exit "$ac_status"); }; }; then
19280   ac_cv_func_regcomp=yes
19281 else
19282   echo "$as_me: failed program was:" >&5
19283 cat "conftest.$ac_ext" >&5
19284 ac_cv_func_regcomp=no
19285 fi
19286 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19287 fi
19288 echo "$as_me:19288: result: $ac_cv_func_regcomp" >&5
19289 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19290 if test "$ac_cv_func_regcomp" = yes; then
19291   cf_regex_func=regcomp
19292 else
19293
19294                 for cf_regex_lib in $cf_regex_libs
19295                 do
19296                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19297 echo "$as_me:19297: checking for regcomp in -l$cf_regex_lib" >&5
19298 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19299 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19300   echo $ECHO_N "(cached) $ECHO_C" >&6
19301 else
19302   ac_check_lib_save_LIBS=$LIBS
19303 LIBS="-l$cf_regex_lib  $LIBS"
19304 cat >"conftest.$ac_ext" <<_ACEOF
19305 #line 19305 "configure"
19306 #include "confdefs.h"
19307
19308 /* Override any gcc2 internal prototype to avoid an error.  */
19309 #ifdef __cplusplus
19310 extern "C"
19311 #endif
19312 /* We use char because int might match the return type of a gcc2
19313    builtin and then its argument prototype would still apply.  */
19314 char regcomp ();
19315 int
19316 main (void)
19317 {
19318 regcomp ();
19319   ;
19320   return 0;
19321 }
19322 _ACEOF
19323 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19324 if { (eval echo "$as_me:19324: \"$ac_link\"") >&5
19325   (eval $ac_link) 2>&5
19326   ac_status=$?
19327   echo "$as_me:19327: \$? = $ac_status" >&5
19328   (exit "$ac_status"); } &&
19329          { ac_try='test -s "conftest$ac_exeext"'
19330   { (eval echo "$as_me:19330: \"$ac_try\"") >&5
19331   (eval $ac_try) 2>&5
19332   ac_status=$?
19333   echo "$as_me:19333: \$? = $ac_status" >&5
19334   (exit "$ac_status"); }; }; then
19335   eval "$as_ac_Lib=yes"
19336 else
19337   echo "$as_me: failed program was:" >&5
19338 cat "conftest.$ac_ext" >&5
19339 eval "$as_ac_Lib=no"
19340 fi
19341 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19342 LIBS=$ac_check_lib_save_LIBS
19343 fi
19344 echo "$as_me:19344: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19345 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19346 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19347
19348 cf_add_libs="$LIBS"
19349 # reverse order
19350 cf_add_0lib=
19351 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19352 # filter duplicates
19353 for cf_add_1lib in $cf_add_0lib; do
19354         for cf_add_2lib in $cf_add_libs; do
19355                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19356                         cf_add_1lib=
19357                         break
19358                 fi
19359         done
19360         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19361 done
19362 LIBS="$cf_add_libs"
19363
19364                                         cf_regex_func=regcomp
19365                                         break
19366 fi
19367
19368                 done
19369
19370 fi
19371
19372         ;;
19373 esac
19374
19375 if test "$cf_regex_func" = no ; then
19376         echo "$as_me:19376: checking for compile" >&5
19377 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19378 if test "${ac_cv_func_compile+set}" = set; then
19379   echo $ECHO_N "(cached) $ECHO_C" >&6
19380 else
19381   cat >"conftest.$ac_ext" <<_ACEOF
19382 #line 19382 "configure"
19383 #include "confdefs.h"
19384 #define compile autoconf_temporary
19385 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19386 #undef compile
19387
19388 #ifdef __cplusplus
19389 extern "C"
19390 #endif
19391
19392 /* We use char because int might match the return type of a gcc2
19393    builtin and then its argument prototype would still apply.  */
19394 char compile (void);
19395
19396 int
19397 main (void)
19398 {
19399
19400 /* The GNU C library defines stubs for functions which it implements
19401     to always fail with ENOSYS.  Some functions are actually named
19402     something starting with __ and the normal name is an alias.  */
19403 #if defined (__stub_compile) || defined (__stub___compile)
19404 #error found stub for compile
19405 #endif
19406
19407         return compile ();
19408   ;
19409   return 0;
19410 }
19411 _ACEOF
19412 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19413 if { (eval echo "$as_me:19413: \"$ac_link\"") >&5
19414   (eval $ac_link) 2>&5
19415   ac_status=$?
19416   echo "$as_me:19416: \$? = $ac_status" >&5
19417   (exit "$ac_status"); } &&
19418          { ac_try='test -s "conftest$ac_exeext"'
19419   { (eval echo "$as_me:19419: \"$ac_try\"") >&5
19420   (eval $ac_try) 2>&5
19421   ac_status=$?
19422   echo "$as_me:19422: \$? = $ac_status" >&5
19423   (exit "$ac_status"); }; }; then
19424   ac_cv_func_compile=yes
19425 else
19426   echo "$as_me: failed program was:" >&5
19427 cat "conftest.$ac_ext" >&5
19428 ac_cv_func_compile=no
19429 fi
19430 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19431 fi
19432 echo "$as_me:19432: result: $ac_cv_func_compile" >&5
19433 echo "${ECHO_T}$ac_cv_func_compile" >&6
19434 if test "$ac_cv_func_compile" = yes; then
19435   cf_regex_func=compile
19436 else
19437
19438                 echo "$as_me:19438: checking for compile in -lgen" >&5
19439 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19440 if test "${ac_cv_lib_gen_compile+set}" = set; then
19441   echo $ECHO_N "(cached) $ECHO_C" >&6
19442 else
19443   ac_check_lib_save_LIBS=$LIBS
19444 LIBS="-lgen  $LIBS"
19445 cat >"conftest.$ac_ext" <<_ACEOF
19446 #line 19446 "configure"
19447 #include "confdefs.h"
19448
19449 /* Override any gcc2 internal prototype to avoid an error.  */
19450 #ifdef __cplusplus
19451 extern "C"
19452 #endif
19453 /* We use char because int might match the return type of a gcc2
19454    builtin and then its argument prototype would still apply.  */
19455 char compile ();
19456 int
19457 main (void)
19458 {
19459 compile ();
19460   ;
19461   return 0;
19462 }
19463 _ACEOF
19464 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19465 if { (eval echo "$as_me:19465: \"$ac_link\"") >&5
19466   (eval $ac_link) 2>&5
19467   ac_status=$?
19468   echo "$as_me:19468: \$? = $ac_status" >&5
19469   (exit "$ac_status"); } &&
19470          { ac_try='test -s "conftest$ac_exeext"'
19471   { (eval echo "$as_me:19471: \"$ac_try\"") >&5
19472   (eval $ac_try) 2>&5
19473   ac_status=$?
19474   echo "$as_me:19474: \$? = $ac_status" >&5
19475   (exit "$ac_status"); }; }; then
19476   ac_cv_lib_gen_compile=yes
19477 else
19478   echo "$as_me: failed program was:" >&5
19479 cat "conftest.$ac_ext" >&5
19480 ac_cv_lib_gen_compile=no
19481 fi
19482 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19483 LIBS=$ac_check_lib_save_LIBS
19484 fi
19485 echo "$as_me:19485: result: $ac_cv_lib_gen_compile" >&5
19486 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
19487 if test "$ac_cv_lib_gen_compile" = yes; then
19488
19489 cf_add_libs="$LIBS"
19490 # reverse order
19491 cf_add_0lib=
19492 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19493 # filter duplicates
19494 for cf_add_1lib in $cf_add_0lib; do
19495         for cf_add_2lib in $cf_add_libs; do
19496                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19497                         cf_add_1lib=
19498                         break
19499                 fi
19500         done
19501         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19502 done
19503 LIBS="$cf_add_libs"
19504
19505                                 cf_regex_func=compile
19506 fi
19507
19508 fi
19509
19510 fi
19511
19512 if test "$cf_regex_func" = no ; then
19513         { echo "$as_me:19513: WARNING: cannot find regular expression library" >&5
19514 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
19515 fi
19516
19517 echo "$as_me:19517: checking for regular-expression headers" >&5
19518 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
19519 if test "${cf_cv_regex_hdrs+set}" = set; then
19520   echo $ECHO_N "(cached) $ECHO_C" >&6
19521 else
19522
19523 cf_cv_regex_hdrs=no
19524 case "$cf_regex_func" in
19525 (compile)
19526         for cf_regex_hdr in regexp.h regexpr.h
19527         do
19528                 cat >"conftest.$ac_ext" <<_ACEOF
19529 #line 19529 "configure"
19530 #include "confdefs.h"
19531 #include <$cf_regex_hdr>
19532 int
19533 main (void)
19534 {
19535
19536                         char *p = compile("", "", "", 0);
19537                         int x = step("", "");
19538                         (void)p;
19539                         (void)x;
19540
19541   ;
19542   return 0;
19543 }
19544 _ACEOF
19545 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19546 if { (eval echo "$as_me:19546: \"$ac_link\"") >&5
19547   (eval $ac_link) 2>&5
19548   ac_status=$?
19549   echo "$as_me:19549: \$? = $ac_status" >&5
19550   (exit "$ac_status"); } &&
19551          { ac_try='test -s "conftest$ac_exeext"'
19552   { (eval echo "$as_me:19552: \"$ac_try\"") >&5
19553   (eval $ac_try) 2>&5
19554   ac_status=$?
19555   echo "$as_me:19555: \$? = $ac_status" >&5
19556   (exit "$ac_status"); }; }; then
19557
19558                         cf_cv_regex_hdrs=$cf_regex_hdr
19559                         break
19560
19561 else
19562   echo "$as_me: failed program was:" >&5
19563 cat "conftest.$ac_ext" >&5
19564 fi
19565 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19566         done
19567         ;;
19568 (*)
19569         for cf_regex_hdr in regex.h
19570         do
19571                 cat >"conftest.$ac_ext" <<_ACEOF
19572 #line 19572 "configure"
19573 #include "confdefs.h"
19574 #include <sys/types.h>
19575 #include <$cf_regex_hdr>
19576 int
19577 main (void)
19578 {
19579
19580                         regex_t *p = 0;
19581                         int x = regcomp(p, "", 0);
19582                         int y = regexec(p, "", 0, 0, 0);
19583                         (void)x;
19584                         (void)y;
19585                         regfree(p);
19586
19587   ;
19588   return 0;
19589 }
19590 _ACEOF
19591 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19592 if { (eval echo "$as_me:19592: \"$ac_link\"") >&5
19593   (eval $ac_link) 2>&5
19594   ac_status=$?
19595   echo "$as_me:19595: \$? = $ac_status" >&5
19596   (exit "$ac_status"); } &&
19597          { ac_try='test -s "conftest$ac_exeext"'
19598   { (eval echo "$as_me:19598: \"$ac_try\"") >&5
19599   (eval $ac_try) 2>&5
19600   ac_status=$?
19601   echo "$as_me:19601: \$? = $ac_status" >&5
19602   (exit "$ac_status"); }; }; then
19603
19604                         cf_cv_regex_hdrs=$cf_regex_hdr
19605                         break
19606
19607 else
19608   echo "$as_me: failed program was:" >&5
19609 cat "conftest.$ac_ext" >&5
19610 fi
19611 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19612         done
19613         ;;
19614 esac
19615
19616 fi
19617 echo "$as_me:19617: result: $cf_cv_regex_hdrs" >&5
19618 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
19619
19620 case "$cf_cv_regex_hdrs" in
19621         (no)            { echo "$as_me:19621: WARNING: no regular expression header found" >&5
19622 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
19623         (regex.h)
19624 cat >>confdefs.h <<\EOF
19625 #define HAVE_REGEX_H_FUNCS 1
19626 EOF
19627  ;;
19628         (regexp.h)
19629 cat >>confdefs.h <<\EOF
19630 #define HAVE_REGEXP_H_FUNCS 1
19631 EOF
19632  ;;
19633         (regexpr.h)
19634 cat >>confdefs.h <<\EOF
19635 #define HAVE_REGEXPR_H_FUNCS 1
19636 EOF
19637  ;;
19638 esac
19639
19640 for ac_header in \
19641 fcntl.h \
19642 getopt.h \
19643 limits.h \
19644 locale.h \
19645 math.h \
19646 poll.h \
19647 sys/ioctl.h \
19648 sys/param.h \
19649 sys/poll.h \
19650 sys/select.h \
19651 sys/time.h \
19652 sys/times.h \
19653 ttyent.h \
19654 unistd.h \
19655 wctype.h \
19656
19657 do
19658 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19659 echo "$as_me:19659: checking for $ac_header" >&5
19660 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19661 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19662   echo $ECHO_N "(cached) $ECHO_C" >&6
19663 else
19664   cat >"conftest.$ac_ext" <<_ACEOF
19665 #line 19665 "configure"
19666 #include "confdefs.h"
19667 #include <$ac_header>
19668 _ACEOF
19669 if { (eval echo "$as_me:19669: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19670   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19671   ac_status=$?
19672   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19673   rm -f conftest.er1
19674   cat conftest.err >&5
19675   echo "$as_me:19675: \$? = $ac_status" >&5
19676   (exit "$ac_status"); } >/dev/null; then
19677   if test -s conftest.err; then
19678     ac_cpp_err=$ac_c_preproc_warn_flag
19679   else
19680     ac_cpp_err=
19681   fi
19682 else
19683   ac_cpp_err=yes
19684 fi
19685 if test -z "$ac_cpp_err"; then
19686   eval "$as_ac_Header=yes"
19687 else
19688   echo "$as_me: failed program was:" >&5
19689   cat "conftest.$ac_ext" >&5
19690   eval "$as_ac_Header=no"
19691 fi
19692 rm -f conftest.err "conftest.$ac_ext"
19693 fi
19694 echo "$as_me:19694: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19695 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19696 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19697   cat >>confdefs.h <<EOF
19698 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19699 EOF
19700
19701 fi
19702 done
19703
19704 for ac_header in unistd.h getopt.h
19705 do
19706 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19707 echo "$as_me:19707: checking for $ac_header" >&5
19708 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19709 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19710   echo $ECHO_N "(cached) $ECHO_C" >&6
19711 else
19712   cat >"conftest.$ac_ext" <<_ACEOF
19713 #line 19713 "configure"
19714 #include "confdefs.h"
19715 #include <$ac_header>
19716 _ACEOF
19717 if { (eval echo "$as_me:19717: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19718   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19719   ac_status=$?
19720   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19721   rm -f conftest.er1
19722   cat conftest.err >&5
19723   echo "$as_me:19723: \$? = $ac_status" >&5
19724   (exit "$ac_status"); } >/dev/null; then
19725   if test -s conftest.err; then
19726     ac_cpp_err=$ac_c_preproc_warn_flag
19727   else
19728     ac_cpp_err=
19729   fi
19730 else
19731   ac_cpp_err=yes
19732 fi
19733 if test -z "$ac_cpp_err"; then
19734   eval "$as_ac_Header=yes"
19735 else
19736   echo "$as_me: failed program was:" >&5
19737   cat "conftest.$ac_ext" >&5
19738   eval "$as_ac_Header=no"
19739 fi
19740 rm -f conftest.err "conftest.$ac_ext"
19741 fi
19742 echo "$as_me:19742: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19743 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19744 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19745   cat >>confdefs.h <<EOF
19746 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19747 EOF
19748
19749 fi
19750 done
19751
19752 echo "$as_me:19752: checking for header declaring getopt variables" >&5
19753 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
19754 if test "${cf_cv_getopt_header+set}" = set; then
19755   echo $ECHO_N "(cached) $ECHO_C" >&6
19756 else
19757
19758 cf_cv_getopt_header=none
19759 for cf_header in stdio.h stdlib.h unistd.h getopt.h
19760 do
19761 cat >"conftest.$ac_ext" <<_ACEOF
19762 #line 19762 "configure"
19763 #include "confdefs.h"
19764
19765 #include <$cf_header>
19766 int
19767 main (void)
19768 {
19769 int x = optind; char *y = optarg; (void)x; (void)y
19770   ;
19771   return 0;
19772 }
19773 _ACEOF
19774 rm -f "conftest.$ac_objext"
19775 if { (eval echo "$as_me:19775: \"$ac_compile\"") >&5
19776   (eval $ac_compile) 2>&5
19777   ac_status=$?
19778   echo "$as_me:19778: \$? = $ac_status" >&5
19779   (exit "$ac_status"); } &&
19780          { ac_try='test -s "conftest.$ac_objext"'
19781   { (eval echo "$as_me:19781: \"$ac_try\"") >&5
19782   (eval $ac_try) 2>&5
19783   ac_status=$?
19784   echo "$as_me:19784: \$? = $ac_status" >&5
19785   (exit "$ac_status"); }; }; then
19786   cf_cv_getopt_header=$cf_header
19787  break
19788 else
19789   echo "$as_me: failed program was:" >&5
19790 cat "conftest.$ac_ext" >&5
19791 fi
19792 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19793 done
19794
19795 fi
19796 echo "$as_me:19796: result: $cf_cv_getopt_header" >&5
19797 echo "${ECHO_T}$cf_cv_getopt_header" >&6
19798 if test "$cf_cv_getopt_header" != none ; then
19799
19800 cat >>confdefs.h <<\EOF
19801 #define HAVE_GETOPT_HEADER 1
19802 EOF
19803
19804 fi
19805 if test "$cf_cv_getopt_header" = getopt.h ; then
19806
19807 cat >>confdefs.h <<\EOF
19808 #define NEED_GETOPT_H 1
19809 EOF
19810
19811 fi
19812
19813 echo "$as_me:19813: checking if external environ is declared" >&5
19814 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
19815 if test "${cf_cv_dcl_environ+set}" = set; then
19816   echo $ECHO_N "(cached) $ECHO_C" >&6
19817 else
19818
19819     cat >"conftest.$ac_ext" <<_ACEOF
19820 #line 19820 "configure"
19821 #include "confdefs.h"
19822
19823 #ifdef HAVE_STDLIB_H
19824 #include <stdlib.h>
19825 #endif
19826 #include <unistd.h>
19827 int
19828 main (void)
19829 {
19830 int x = (int) environ
19831   ;
19832   return 0;
19833 }
19834 _ACEOF
19835 rm -f "conftest.$ac_objext"
19836 if { (eval echo "$as_me:19836: \"$ac_compile\"") >&5
19837   (eval $ac_compile) 2>&5
19838   ac_status=$?
19839   echo "$as_me:19839: \$? = $ac_status" >&5
19840   (exit "$ac_status"); } &&
19841          { ac_try='test -s "conftest.$ac_objext"'
19842   { (eval echo "$as_me:19842: \"$ac_try\"") >&5
19843   (eval $ac_try) 2>&5
19844   ac_status=$?
19845   echo "$as_me:19845: \$? = $ac_status" >&5
19846   (exit "$ac_status"); }; }; then
19847   cf_cv_dcl_environ=yes
19848 else
19849   echo "$as_me: failed program was:" >&5
19850 cat "conftest.$ac_ext" >&5
19851 cf_cv_dcl_environ=no
19852 fi
19853 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19854
19855 fi
19856 echo "$as_me:19856: result: $cf_cv_dcl_environ" >&5
19857 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
19858
19859 if test "$cf_cv_dcl_environ" = no ; then
19860
19861 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19862
19863     cat >>confdefs.h <<EOF
19864 #define $cf_result 1
19865 EOF
19866
19867 fi
19868
19869 # It's possible (for near-UNIX clones) that the data doesn't exist
19870
19871 echo "$as_me:19871: checking if external environ exists" >&5
19872 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
19873 if test "${cf_cv_have_environ+set}" = set; then
19874   echo $ECHO_N "(cached) $ECHO_C" >&6
19875 else
19876
19877         cat >"conftest.$ac_ext" <<_ACEOF
19878 #line 19878 "configure"
19879 #include "confdefs.h"
19880
19881 #undef environ
19882 extern int environ;
19883
19884 int
19885 main (void)
19886 {
19887 environ = 2
19888   ;
19889   return 0;
19890 }
19891 _ACEOF
19892 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19893 if { (eval echo "$as_me:19893: \"$ac_link\"") >&5
19894   (eval $ac_link) 2>&5
19895   ac_status=$?
19896   echo "$as_me:19896: \$? = $ac_status" >&5
19897   (exit "$ac_status"); } &&
19898          { ac_try='test -s "conftest$ac_exeext"'
19899   { (eval echo "$as_me:19899: \"$ac_try\"") >&5
19900   (eval $ac_try) 2>&5
19901   ac_status=$?
19902   echo "$as_me:19902: \$? = $ac_status" >&5
19903   (exit "$ac_status"); }; }; then
19904   cf_cv_have_environ=yes
19905 else
19906   echo "$as_me: failed program was:" >&5
19907 cat "conftest.$ac_ext" >&5
19908 cf_cv_have_environ=no
19909 fi
19910 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19911
19912 fi
19913 echo "$as_me:19913: result: $cf_cv_have_environ" >&5
19914 echo "${ECHO_T}$cf_cv_have_environ" >&6
19915
19916 if test "$cf_cv_have_environ" = yes ; then
19917
19918 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19919
19920         cat >>confdefs.h <<EOF
19921 #define $cf_result 1
19922 EOF
19923
19924 fi
19925
19926 echo "$as_me:19926: checking for getenv" >&5
19927 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
19928 if test "${ac_cv_func_getenv+set}" = set; then
19929   echo $ECHO_N "(cached) $ECHO_C" >&6
19930 else
19931   cat >"conftest.$ac_ext" <<_ACEOF
19932 #line 19932 "configure"
19933 #include "confdefs.h"
19934 #define getenv autoconf_temporary
19935 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19936 #undef getenv
19937
19938 #ifdef __cplusplus
19939 extern "C"
19940 #endif
19941
19942 /* We use char because int might match the return type of a gcc2
19943    builtin and then its argument prototype would still apply.  */
19944 char getenv (void);
19945
19946 int
19947 main (void)
19948 {
19949
19950 /* The GNU C library defines stubs for functions which it implements
19951     to always fail with ENOSYS.  Some functions are actually named
19952     something starting with __ and the normal name is an alias.  */
19953 #if defined (__stub_getenv) || defined (__stub___getenv)
19954 #error found stub for getenv
19955 #endif
19956
19957         return getenv ();
19958   ;
19959   return 0;
19960 }
19961 _ACEOF
19962 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19963 if { (eval echo "$as_me:19963: \"$ac_link\"") >&5
19964   (eval $ac_link) 2>&5
19965   ac_status=$?
19966   echo "$as_me:19966: \$? = $ac_status" >&5
19967   (exit "$ac_status"); } &&
19968          { ac_try='test -s "conftest$ac_exeext"'
19969   { (eval echo "$as_me:19969: \"$ac_try\"") >&5
19970   (eval $ac_try) 2>&5
19971   ac_status=$?
19972   echo "$as_me:19972: \$? = $ac_status" >&5
19973   (exit "$ac_status"); }; }; then
19974   ac_cv_func_getenv=yes
19975 else
19976   echo "$as_me: failed program was:" >&5
19977 cat "conftest.$ac_ext" >&5
19978 ac_cv_func_getenv=no
19979 fi
19980 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19981 fi
19982 echo "$as_me:19982: result: $ac_cv_func_getenv" >&5
19983 echo "${ECHO_T}$ac_cv_func_getenv" >&6
19984
19985 for ac_func in putenv setenv strdup
19986 do
19987 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19988 echo "$as_me:19988: checking for $ac_func" >&5
19989 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19990 if eval "test \"\${$as_ac_var+set}\" = set"; then
19991   echo $ECHO_N "(cached) $ECHO_C" >&6
19992 else
19993   cat >"conftest.$ac_ext" <<_ACEOF
19994 #line 19994 "configure"
19995 #include "confdefs.h"
19996 #define $ac_func autoconf_temporary
19997 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19998 #undef $ac_func
19999
20000 #ifdef __cplusplus
20001 extern "C"
20002 #endif
20003
20004 /* We use char because int might match the return type of a gcc2
20005    builtin and then its argument prototype would still apply.  */
20006 char $ac_func (void);
20007
20008 int
20009 main (void)
20010 {
20011
20012 /* The GNU C library defines stubs for functions which it implements
20013     to always fail with ENOSYS.  Some functions are actually named
20014     something starting with __ and the normal name is an alias.  */
20015 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20016 #error found stub for $ac_func
20017 #endif
20018
20019         return $ac_func ();
20020   ;
20021   return 0;
20022 }
20023 _ACEOF
20024 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20025 if { (eval echo "$as_me:20025: \"$ac_link\"") >&5
20026   (eval $ac_link) 2>&5
20027   ac_status=$?
20028   echo "$as_me:20028: \$? = $ac_status" >&5
20029   (exit "$ac_status"); } &&
20030          { ac_try='test -s "conftest$ac_exeext"'
20031   { (eval echo "$as_me:20031: \"$ac_try\"") >&5
20032   (eval $ac_try) 2>&5
20033   ac_status=$?
20034   echo "$as_me:20034: \$? = $ac_status" >&5
20035   (exit "$ac_status"); }; }; then
20036   eval "$as_ac_var=yes"
20037 else
20038   echo "$as_me: failed program was:" >&5
20039 cat "conftest.$ac_ext" >&5
20040 eval "$as_ac_var=no"
20041 fi
20042 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20043 fi
20044 echo "$as_me:20044: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20045 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20046 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20047   cat >>confdefs.h <<EOF
20048 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20049 EOF
20050
20051 fi
20052 done
20053
20054 echo "$as_me:20054: checking if getenv returns consistent values" >&5
20055 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20056 if test "${cf_cv_consistent_getenv+set}" = set; then
20057   echo $ECHO_N "(cached) $ECHO_C" >&6
20058 else
20059
20060 if test "$cross_compiling" = yes; then
20061   cf_cv_consistent_getenv=unknown
20062 else
20063   cat >"conftest.$ac_ext" <<_ACEOF
20064 #line 20064 "configure"
20065 #include "confdefs.h"
20066
20067 #include <stdlib.h>
20068 #include <unistd.h>
20069 #include <stdio.h>
20070 #include <string.h>
20071 #include <sys/types.h>
20072
20073 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20074 extern char **environ;  /* POSIX, but some systems are not... */
20075 #endif
20076
20077 #if defined(HAVE_STRDUP)
20078 #define str_alloc(s) strdup(s)
20079 #else
20080 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20081 #endif
20082
20083 static void set_value(const char *name, const char *value)
20084 {
20085 #if defined(HAVE_SETENV)
20086         setenv(name, value, 1);
20087 #elif defined(HAVE_PUTENV)
20088         char buffer[1024];
20089         sprintf(buffer, "%s=%s", name, value);
20090         putenv(str_alloc(buffer));
20091 #else
20092 #error neither putenv/setenv found
20093 #endif
20094 }
20095 int main(void)
20096 {
20097         int pass;
20098         size_t numenv, limit, j;
20099         char **mynames;
20100         char **myvalues;
20101         char **mypointer;
20102         char *equals;
20103         for (numenv = 0; environ[numenv]; ++numenv) ;
20104         limit = numenv + 10;
20105         mynames = (char **) calloc(limit + 1, sizeof(char *));
20106         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20107         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20108 #if defined(HAVE_ENVIRON)
20109         for (j = 0; environ[j]; ++j) {
20110                 mynames[j] = str_alloc(environ[j]);
20111                 equals = strchr(mynames[j], '=');
20112                 if (equals != 0) {
20113                         *equals++ = '\\0';
20114                         myvalues[j] = str_alloc(equals);
20115                 } else {
20116                         myvalues[j] = str_alloc("");
20117                 }
20118         }
20119 #endif
20120         for (j = numenv; j < limit; ++j) {
20121                 char name[80];
20122                 char value[80];
20123                 size_t found;
20124                 size_t k = 0;
20125                 do {
20126                         size_t jk;
20127                         found = 0;
20128                         sprintf(name, "TERM%lu", (unsigned long) k);
20129                         for (jk = 0; jk < j; ++jk) {
20130                                 if (!strcmp(name, mynames[jk])) {
20131                                         found = 1;
20132                                         ++k;
20133                                         break;
20134                                 }
20135                         }
20136                 } while (found);
20137                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20138                 set_value(name, value);
20139                 mynames[j] = str_alloc(name);
20140                 myvalues[j] = str_alloc(value);
20141         }
20142         for (pass = 0; pass < 3; ++pass) {
20143                 for (j = 0; j < limit; ++j) {
20144                         char *value = getenv(mynames[j]);
20145                         if (pass) {
20146                                 if (value == 0) {
20147                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20148                                         ${cf_cv_main_return:-return}(1);
20149                                 } else if (value != mypointer[j]) {
20150                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20151                                         ${cf_cv_main_return:-return}(1);
20152                                 } else if (strcmp(value, myvalues[j])) {
20153                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20154                                         ${cf_cv_main_return:-return}(1);
20155                                 }
20156                         } else {
20157                                 size_t k;
20158                                 mypointer[j] = value;
20159                                 for (k = 0; k < j; ++k) {
20160                                         if (mypointer[j] == mypointer[k]) {
20161                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20162                                                 ${cf_cv_main_return:-return}(1);
20163                                         }
20164                                 }
20165                         }
20166                 }
20167         }
20168         ${cf_cv_main_return:-return}(0);
20169 }
20170
20171 _ACEOF
20172 rm -f "conftest$ac_exeext"
20173 if { (eval echo "$as_me:20173: \"$ac_link\"") >&5
20174   (eval $ac_link) 2>&5
20175   ac_status=$?
20176   echo "$as_me:20176: \$? = $ac_status" >&5
20177   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20178   { (eval echo "$as_me:20178: \"$ac_try\"") >&5
20179   (eval $ac_try) 2>&5
20180   ac_status=$?
20181   echo "$as_me:20181: \$? = $ac_status" >&5
20182   (exit "$ac_status"); }; }; then
20183   cf_cv_consistent_getenv=yes
20184 else
20185   echo "$as_me: program exited with status $ac_status" >&5
20186 echo "$as_me: failed program was:" >&5
20187 cat "conftest.$ac_ext" >&5
20188 cf_cv_consistent_getenv=no
20189 fi
20190 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20191 fi
20192
20193 fi
20194 echo "$as_me:20194: result: $cf_cv_consistent_getenv" >&5
20195 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20196
20197 if test "x$cf_cv_consistent_getenv" = xno
20198 then
20199
20200 cat >>confdefs.h <<\EOF
20201 #define HAVE_CONSISTENT_GETENV 1
20202 EOF
20203
20204 fi
20205
20206 if test "x$cf_cv_consistent_getenv" = xno && \
20207         test "x$cf_with_trace" = xyes
20208 then
20209         { echo "$as_me:20209: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20210 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20211 fi
20212
20213 echo "$as_me:20213: checking if sys/time.h works with sys/select.h" >&5
20214 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20215 if test "${cf_cv_sys_time_select+set}" = set; then
20216   echo $ECHO_N "(cached) $ECHO_C" >&6
20217 else
20218
20219 cat >"conftest.$ac_ext" <<_ACEOF
20220 #line 20220 "configure"
20221 #include "confdefs.h"
20222
20223 #include <sys/types.h>
20224 #ifdef HAVE_SYS_TIME_H
20225 #include <sys/time.h>
20226 #endif
20227 #ifdef HAVE_SYS_SELECT_H
20228 #include <sys/select.h>
20229 #endif
20230
20231 int
20232 main (void)
20233 {
20234
20235   ;
20236   return 0;
20237 }
20238 _ACEOF
20239 rm -f "conftest.$ac_objext"
20240 if { (eval echo "$as_me:20240: \"$ac_compile\"") >&5
20241   (eval $ac_compile) 2>&5
20242   ac_status=$?
20243   echo "$as_me:20243: \$? = $ac_status" >&5
20244   (exit "$ac_status"); } &&
20245          { ac_try='test -s "conftest.$ac_objext"'
20246   { (eval echo "$as_me:20246: \"$ac_try\"") >&5
20247   (eval $ac_try) 2>&5
20248   ac_status=$?
20249   echo "$as_me:20249: \$? = $ac_status" >&5
20250   (exit "$ac_status"); }; }; then
20251   cf_cv_sys_time_select=yes
20252 else
20253   echo "$as_me: failed program was:" >&5
20254 cat "conftest.$ac_ext" >&5
20255 cf_cv_sys_time_select=no
20256 fi
20257 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20258
20259 fi
20260
20261 echo "$as_me:20261: result: $cf_cv_sys_time_select" >&5
20262 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20263 test "$cf_cv_sys_time_select" = yes &&
20264 cat >>confdefs.h <<\EOF
20265 #define HAVE_SYS_TIME_SELECT 1
20266 EOF
20267
20268 ###     checks for compiler characteristics
20269 ac_ext=c
20270 ac_cpp='$CPP $CPPFLAGS'
20271 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20272 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20273 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20274 ac_main_return="return"
20275
20276 echo "$as_me:20276: checking for an ANSI C-conforming const" >&5
20277 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20278 if test "${ac_cv_c_const+set}" = set; then
20279   echo $ECHO_N "(cached) $ECHO_C" >&6
20280 else
20281   cat >"conftest.$ac_ext" <<_ACEOF
20282 #line 20282 "configure"
20283 #include "confdefs.h"
20284
20285 int
20286 main (void)
20287 {
20288 /* FIXME: Include the comments suggested by Paul. */
20289 #ifndef __cplusplus
20290   /* Ultrix mips cc rejects this.  */
20291   typedef int charset[2];
20292   const charset x;
20293   /* SunOS 4.1.1 cc rejects this.  */
20294   char const *const *ccp;
20295   char **p;
20296   /* NEC SVR4.0.2 mips cc rejects this.  */
20297   struct point {int x, y;};
20298   static struct point const zero = {0,0};
20299   /* AIX XL C 1.02.0.0 rejects this.
20300      It does not let you subtract one const X* pointer from another in
20301      an arm of an if-expression whose if-part is not a constant
20302      expression */
20303   const char *g = "string";
20304   ccp = &g + (g ? g-g : 0);
20305   /* HPUX 7.0 cc rejects these. */
20306   ++ccp;
20307   p = (char**) ccp;
20308   ccp = (char const *const *) p;
20309   { /* SCO 3.2v4 cc rejects this.  */
20310     char *t;
20311     char const *s = 0 ? (char *) 0 : (char const *) 0;
20312
20313     *t++ = 0;
20314   }
20315   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20316     int x[] = {25, 17};
20317     const int *foo = &x[0];
20318     ++foo;
20319   }
20320   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20321     typedef const int *iptr;
20322     iptr p = 0;
20323     ++p;
20324   }
20325   { /* AIX XL C 1.02.0.0 rejects this saying
20326        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20327     struct s { int j; const int *ap[3]; };
20328     struct s *b; b->j = 5;
20329   }
20330   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20331     const int foo = 10;
20332   }
20333 #endif
20334
20335   ;
20336   return 0;
20337 }
20338 _ACEOF
20339 rm -f "conftest.$ac_objext"
20340 if { (eval echo "$as_me:20340: \"$ac_compile\"") >&5
20341   (eval $ac_compile) 2>&5
20342   ac_status=$?
20343   echo "$as_me:20343: \$? = $ac_status" >&5
20344   (exit "$ac_status"); } &&
20345          { ac_try='test -s "conftest.$ac_objext"'
20346   { (eval echo "$as_me:20346: \"$ac_try\"") >&5
20347   (eval $ac_try) 2>&5
20348   ac_status=$?
20349   echo "$as_me:20349: \$? = $ac_status" >&5
20350   (exit "$ac_status"); }; }; then
20351   ac_cv_c_const=yes
20352 else
20353   echo "$as_me: failed program was:" >&5
20354 cat "conftest.$ac_ext" >&5
20355 ac_cv_c_const=no
20356 fi
20357 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20358 fi
20359 echo "$as_me:20359: result: $ac_cv_c_const" >&5
20360 echo "${ECHO_T}$ac_cv_c_const" >&6
20361 if test $ac_cv_c_const = no; then
20362
20363 cat >>confdefs.h <<\EOF
20364 #define const
20365 EOF
20366
20367 fi
20368
20369 echo "$as_me:20369: checking for inline" >&5
20370 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20371 if test "${ac_cv_c_inline+set}" = set; then
20372   echo $ECHO_N "(cached) $ECHO_C" >&6
20373 else
20374   ac_cv_c_inline=no
20375 for ac_kw in inline __inline__ __inline; do
20376   cat >"conftest.$ac_ext" <<_ACEOF
20377 #line 20377 "configure"
20378 #include "confdefs.h"
20379 #ifndef __cplusplus
20380 static $ac_kw int static_foo () {return 0; }
20381 $ac_kw int foo () {return 0; }
20382 #endif
20383
20384 _ACEOF
20385 rm -f "conftest.$ac_objext"
20386 if { (eval echo "$as_me:20386: \"$ac_compile\"") >&5
20387   (eval $ac_compile) 2>&5
20388   ac_status=$?
20389   echo "$as_me:20389: \$? = $ac_status" >&5
20390   (exit "$ac_status"); } &&
20391          { ac_try='test -s "conftest.$ac_objext"'
20392   { (eval echo "$as_me:20392: \"$ac_try\"") >&5
20393   (eval $ac_try) 2>&5
20394   ac_status=$?
20395   echo "$as_me:20395: \$? = $ac_status" >&5
20396   (exit "$ac_status"); }; }; then
20397   ac_cv_c_inline=$ac_kw; break
20398 else
20399   echo "$as_me: failed program was:" >&5
20400 cat "conftest.$ac_ext" >&5
20401 fi
20402 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20403 done
20404
20405 fi
20406 echo "$as_me:20406: result: $ac_cv_c_inline" >&5
20407 echo "${ECHO_T}$ac_cv_c_inline" >&6
20408 case $ac_cv_c_inline in
20409   inline | yes) ;;
20410   no)
20411 cat >>confdefs.h <<\EOF
20412 #define inline
20413 EOF
20414  ;;
20415   *)  cat >>confdefs.h <<EOF
20416 #define inline $ac_cv_c_inline
20417 EOF
20418  ;;
20419 esac
20420
20421 NCURSES_INLINE=
20422 if test "$ac_cv_c_inline" != no ; then
20423         NCURSES_INLINE=inline
20424         if test "$INTEL_COMPILER" = yes
20425         then
20426                 :
20427         elif test "$CLANG_COMPILER" = yes
20428         then
20429                 :
20430         elif test "$GCC" = yes
20431         then
20432                 echo "$as_me:20432: checking if $CC supports options to tune inlining" >&5
20433 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20434 if test "${cf_cv_gcc_inline+set}" = set; then
20435   echo $ECHO_N "(cached) $ECHO_C" >&6
20436 else
20437
20438                 cf_save_CFLAGS=$CFLAGS
20439                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20440                 cat >"conftest.$ac_ext" <<_ACEOF
20441 #line 20441 "configure"
20442 #include "confdefs.h"
20443 inline int foo(void) { return 1; }
20444 int
20445 main (void)
20446 {
20447 ${cf_cv_main_return:-return} foo()
20448   ;
20449   return 0;
20450 }
20451 _ACEOF
20452 rm -f "conftest.$ac_objext"
20453 if { (eval echo "$as_me:20453: \"$ac_compile\"") >&5
20454   (eval $ac_compile) 2>&5
20455   ac_status=$?
20456   echo "$as_me:20456: \$? = $ac_status" >&5
20457   (exit "$ac_status"); } &&
20458          { ac_try='test -s "conftest.$ac_objext"'
20459   { (eval echo "$as_me:20459: \"$ac_try\"") >&5
20460   (eval $ac_try) 2>&5
20461   ac_status=$?
20462   echo "$as_me:20462: \$? = $ac_status" >&5
20463   (exit "$ac_status"); }; }; then
20464   cf_cv_gcc_inline=yes
20465 else
20466   echo "$as_me: failed program was:" >&5
20467 cat "conftest.$ac_ext" >&5
20468 cf_cv_gcc_inline=no
20469 fi
20470 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20471                 CFLAGS=$cf_save_CFLAGS
20472
20473 fi
20474 echo "$as_me:20474: result: $cf_cv_gcc_inline" >&5
20475 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
20476                 if test "$cf_cv_gcc_inline" = yes ; then
20477
20478 cf_fix_cppflags=no
20479 cf_new_cflags=
20480 cf_new_cppflags=
20481 cf_new_extra_cppflags=
20482
20483 for cf_add_cflags in --param max-inline-insns-single=1200
20484 do
20485 case "$cf_fix_cppflags" in
20486 (no)
20487         case "$cf_add_cflags" in
20488         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20489                 case "$cf_add_cflags" in
20490                 (-D*)
20491                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20492
20493                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20494                                 && test -z "${cf_tst_cflags}" \
20495                                 && cf_fix_cppflags=yes
20496
20497                         if test "$cf_fix_cppflags" = yes ; then
20498
20499         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20500         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20501
20502                                 continue
20503                         elif test "${cf_tst_cflags}" = "\"'" ; then
20504
20505         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20506         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20507
20508                                 continue
20509                         fi
20510                         ;;
20511                 esac
20512                 case "$CPPFLAGS" in
20513                 (*$cf_add_cflags)
20514                         ;;
20515                 (*)
20516                         case "$cf_add_cflags" in
20517                         (-D*)
20518                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20519
20520 CPPFLAGS=`echo "$CPPFLAGS" | \
20521         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20522                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20523
20524                                 ;;
20525                         esac
20526
20527         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20528         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20529
20530                         ;;
20531                 esac
20532                 ;;
20533         (*)
20534
20535         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20536         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20537
20538                 ;;
20539         esac
20540         ;;
20541 (yes)
20542
20543         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20544         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20545
20546         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20547
20548         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20549                 && test -z "${cf_tst_cflags}" \
20550                 && cf_fix_cppflags=no
20551         ;;
20552 esac
20553 done
20554
20555 if test -n "$cf_new_cflags" ; then
20556
20557         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20558         CFLAGS="${CFLAGS}$cf_new_cflags"
20559
20560 fi
20561
20562 if test -n "$cf_new_cppflags" ; then
20563
20564         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20565         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20566
20567 fi
20568
20569 if test -n "$cf_new_extra_cppflags" ; then
20570
20571         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20572         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20573
20574 fi
20575
20576                 fi
20577         fi
20578 fi
20579
20580 echo "$as_me:20580: checking for signal global datatype" >&5
20581 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
20582 if test "${cf_cv_sig_atomic_t+set}" = set; then
20583   echo $ECHO_N "(cached) $ECHO_C" >&6
20584 else
20585
20586         for cf_type in \
20587                 "volatile sig_atomic_t" \
20588                 "sig_atomic_t" \
20589                 "int"
20590         do
20591         cat >"conftest.$ac_ext" <<_ACEOF
20592 #line 20592 "configure"
20593 #include "confdefs.h"
20594
20595 #include <sys/types.h>
20596 #include <signal.h>
20597 #include <stdio.h>
20598
20599 extern $cf_type x;
20600 $cf_type x;
20601 static void handler(int sig)
20602 {
20603         (void)sig;
20604         x = 5;
20605 }
20606 int
20607 main (void)
20608 {
20609 signal(SIGINT, handler);
20610                  x = 1
20611   ;
20612   return 0;
20613 }
20614 _ACEOF
20615 rm -f "conftest.$ac_objext"
20616 if { (eval echo "$as_me:20616: \"$ac_compile\"") >&5
20617   (eval $ac_compile) 2>&5
20618   ac_status=$?
20619   echo "$as_me:20619: \$? = $ac_status" >&5
20620   (exit "$ac_status"); } &&
20621          { ac_try='test -s "conftest.$ac_objext"'
20622   { (eval echo "$as_me:20622: \"$ac_try\"") >&5
20623   (eval $ac_try) 2>&5
20624   ac_status=$?
20625   echo "$as_me:20625: \$? = $ac_status" >&5
20626   (exit "$ac_status"); }; }; then
20627   cf_cv_sig_atomic_t=$cf_type
20628 else
20629   echo "$as_me: failed program was:" >&5
20630 cat "conftest.$ac_ext" >&5
20631 cf_cv_sig_atomic_t=no
20632 fi
20633 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20634                 test "$cf_cv_sig_atomic_t" != no && break
20635         done
20636
20637 fi
20638
20639 echo "$as_me:20639: result: $cf_cv_sig_atomic_t" >&5
20640 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
20641 test "$cf_cv_sig_atomic_t" != no &&
20642 cat >>confdefs.h <<EOF
20643 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
20644 EOF
20645
20646 if test "$NCURSES_CHTYPE" = auto ; then
20647
20648 echo "$as_me:20648: checking for type of chtype" >&5
20649 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
20650 if test "${cf_cv_typeof_chtype+set}" = set; then
20651   echo $ECHO_N "(cached) $ECHO_C" >&6
20652 else
20653
20654                 if test "$cross_compiling" = yes; then
20655   cf_cv_typeof_chtype=long
20656 else
20657   cat >"conftest.$ac_ext" <<_ACEOF
20658 #line 20658 "configure"
20659 #include "confdefs.h"
20660
20661 #define WANT_BITS 31
20662 #include <stdio.h>
20663 int main(void)
20664 {
20665         FILE *fp = fopen("cf_test.out", "w");
20666         if (fp != 0) {
20667                 char *result = "long";
20668                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
20669                         int n;
20670                         unsigned int x, y;
20671                         for (n = 0; n < WANT_BITS; n++) {
20672                                 x = (1 << n);
20673                                 y = (x >> n);
20674                                 if (y != 1 || x == 0) {
20675                                         x = 0;
20676                                         break;
20677                                 }
20678                         }
20679                         /*
20680                          * If x is nonzero, an int is big enough for the bits
20681                          * that we want.
20682                          */
20683                         result = (x != 0) ? "int" : "long";
20684                 }
20685                 fputs(result, fp);
20686                 fclose(fp);
20687         }
20688         ${cf_cv_main_return:-return}(0);
20689 }
20690
20691 _ACEOF
20692 rm -f "conftest$ac_exeext"
20693 if { (eval echo "$as_me:20693: \"$ac_link\"") >&5
20694   (eval $ac_link) 2>&5
20695   ac_status=$?
20696   echo "$as_me:20696: \$? = $ac_status" >&5
20697   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20698   { (eval echo "$as_me:20698: \"$ac_try\"") >&5
20699   (eval $ac_try) 2>&5
20700   ac_status=$?
20701   echo "$as_me:20701: \$? = $ac_status" >&5
20702   (exit "$ac_status"); }; }; then
20703   cf_cv_typeof_chtype=`cat cf_test.out`
20704 else
20705   echo "$as_me: program exited with status $ac_status" >&5
20706 echo "$as_me: failed program was:" >&5
20707 cat "conftest.$ac_ext" >&5
20708 cf_cv_typeof_chtype=long
20709 fi
20710 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20711 fi
20712                 rm -f cf_test.out
20713
20714 fi
20715
20716 echo "$as_me:20716: result: $cf_cv_typeof_chtype" >&5
20717 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
20718
20719 cat >>confdefs.h <<EOF
20720 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
20721 EOF
20722
20723 else
20724         cf_cv_typeof_chtype=$NCURSES_CHTYPE
20725 fi
20726 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
20727
20728 echo "$as_me:20728: checking if unsigned literals are legal" >&5
20729 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
20730 if test "${cf_cv_unsigned_literals+set}" = set; then
20731   echo $ECHO_N "(cached) $ECHO_C" >&6
20732 else
20733
20734         cat >"conftest.$ac_ext" <<_ACEOF
20735 #line 20735 "configure"
20736 #include "confdefs.h"
20737
20738 int
20739 main (void)
20740 {
20741 long x = 1L + 1UL + 1U + 1
20742   ;
20743   return 0;
20744 }
20745 _ACEOF
20746 rm -f "conftest.$ac_objext"
20747 if { (eval echo "$as_me:20747: \"$ac_compile\"") >&5
20748   (eval $ac_compile) 2>&5
20749   ac_status=$?
20750   echo "$as_me:20750: \$? = $ac_status" >&5
20751   (exit "$ac_status"); } &&
20752          { ac_try='test -s "conftest.$ac_objext"'
20753   { (eval echo "$as_me:20753: \"$ac_try\"") >&5
20754   (eval $ac_try) 2>&5
20755   ac_status=$?
20756   echo "$as_me:20756: \$? = $ac_status" >&5
20757   (exit "$ac_status"); }; }; then
20758   cf_cv_unsigned_literals=yes
20759 else
20760   echo "$as_me: failed program was:" >&5
20761 cat "conftest.$ac_ext" >&5
20762 cf_cv_unsigned_literals=no
20763 fi
20764 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20765
20766 fi
20767
20768 echo "$as_me:20768: result: $cf_cv_unsigned_literals" >&5
20769 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
20770
20771 cf_cv_1UL="1"
20772 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
20773 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
20774
20775 if test "$NCURSES_MMASK_T" = auto ; then
20776         cf_cv_typeof_mmask_t=long
20777 else
20778         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
20779 fi
20780 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
20781
20782 ###     Checks for external-data
20783
20784 echo "$as_me:20784: checking if external errno is declared" >&5
20785 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
20786 if test "${cf_cv_dcl_errno+set}" = set; then
20787   echo $ECHO_N "(cached) $ECHO_C" >&6
20788 else
20789
20790         cat >"conftest.$ac_ext" <<_ACEOF
20791 #line 20791 "configure"
20792 #include "confdefs.h"
20793
20794 #ifdef HAVE_STDLIB_H
20795 #include <stdlib.h>
20796 #endif
20797 #include <stdio.h>
20798 #include <sys/types.h>
20799 #include <errno.h>
20800 int
20801 main (void)
20802 {
20803 int x = (int) errno; (void)x
20804   ;
20805   return 0;
20806 }
20807 _ACEOF
20808 rm -f "conftest.$ac_objext"
20809 if { (eval echo "$as_me:20809: \"$ac_compile\"") >&5
20810   (eval $ac_compile) 2>&5
20811   ac_status=$?
20812   echo "$as_me:20812: \$? = $ac_status" >&5
20813   (exit "$ac_status"); } &&
20814          { ac_try='test -s "conftest.$ac_objext"'
20815   { (eval echo "$as_me:20815: \"$ac_try\"") >&5
20816   (eval $ac_try) 2>&5
20817   ac_status=$?
20818   echo "$as_me:20818: \$? = $ac_status" >&5
20819   (exit "$ac_status"); }; }; then
20820   cf_cv_dcl_errno=yes
20821 else
20822   echo "$as_me: failed program was:" >&5
20823 cat "conftest.$ac_ext" >&5
20824 cf_cv_dcl_errno=no
20825 fi
20826 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20827
20828 fi
20829 echo "$as_me:20829: result: $cf_cv_dcl_errno" >&5
20830 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
20831
20832 if test "$cf_cv_dcl_errno" = no ; then
20833
20834 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20835
20836         cat >>confdefs.h <<EOF
20837 #define $cf_result 1
20838 EOF
20839
20840 fi
20841
20842 # It's possible (for near-UNIX clones) that the data doesn't exist
20843
20844 echo "$as_me:20844: checking if external errno exists" >&5
20845 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
20846 if test "${cf_cv_have_errno+set}" = set; then
20847   echo $ECHO_N "(cached) $ECHO_C" >&6
20848 else
20849
20850         cat >"conftest.$ac_ext" <<_ACEOF
20851 #line 20851 "configure"
20852 #include "confdefs.h"
20853
20854 #undef errno
20855 extern int errno;
20856
20857 int
20858 main (void)
20859 {
20860 errno = 2
20861   ;
20862   return 0;
20863 }
20864 _ACEOF
20865 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20866 if { (eval echo "$as_me:20866: \"$ac_link\"") >&5
20867   (eval $ac_link) 2>&5
20868   ac_status=$?
20869   echo "$as_me:20869: \$? = $ac_status" >&5
20870   (exit "$ac_status"); } &&
20871          { ac_try='test -s "conftest$ac_exeext"'
20872   { (eval echo "$as_me:20872: \"$ac_try\"") >&5
20873   (eval $ac_try) 2>&5
20874   ac_status=$?
20875   echo "$as_me:20875: \$? = $ac_status" >&5
20876   (exit "$ac_status"); }; }; then
20877   cf_cv_have_errno=yes
20878 else
20879   echo "$as_me: failed program was:" >&5
20880 cat "conftest.$ac_ext" >&5
20881 cf_cv_have_errno=no
20882 fi
20883 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20884
20885 fi
20886 echo "$as_me:20886: result: $cf_cv_have_errno" >&5
20887 echo "${ECHO_T}$cf_cv_have_errno" >&6
20888
20889 if test "$cf_cv_have_errno" = yes ; then
20890
20891 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20892
20893         cat >>confdefs.h <<EOF
20894 #define $cf_result 1
20895 EOF
20896
20897 fi
20898
20899 echo "$as_me:20899: checking if data-only library module links" >&5
20900 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
20901 if test "${cf_cv_link_dataonly+set}" = set; then
20902   echo $ECHO_N "(cached) $ECHO_C" >&6
20903 else
20904
20905         rm -f conftest.a
20906         cat >conftest.$ac_ext <<EOF
20907 #line 20907 "configure"
20908 int     testdata[3] = { 123, 456, 789 };
20909 EOF
20910         if { (eval echo "$as_me:20910: \"$ac_compile\"") >&5
20911   (eval $ac_compile) 2>&5
20912   ac_status=$?
20913   echo "$as_me:20913: \$? = $ac_status" >&5
20914   (exit "$ac_status"); } ; then
20915                 mv conftest.o data.o && \
20916                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
20917         fi
20918         rm -f conftest.$ac_ext data.o
20919         cat >conftest.$ac_ext <<EOF
20920 #line 20920 "configure"
20921 int     testfunc(void)
20922 {
20923 #if defined(NeXT)
20924         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
20925 #else
20926         extern int testdata[3];
20927         return testdata[0] == 123
20928            &&  testdata[1] == 456
20929            &&  testdata[2] == 789;
20930 #endif
20931 }
20932 EOF
20933         if { (eval echo "$as_me:20933: \"$ac_compile\"") >&5
20934   (eval $ac_compile) 2>&5
20935   ac_status=$?
20936   echo "$as_me:20936: \$? = $ac_status" >&5
20937   (exit "$ac_status"); }; then
20938                 mv conftest.o func.o && \
20939                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
20940         fi
20941         rm -f conftest.$ac_ext func.o
20942         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
20943         cf_saveLIBS="$LIBS"
20944         LIBS="conftest.a $LIBS"
20945         if test "$cross_compiling" = yes; then
20946   cf_cv_link_dataonly=unknown
20947 else
20948   cat >"conftest.$ac_ext" <<_ACEOF
20949 #line 20949 "configure"
20950 #include "confdefs.h"
20951
20952         int main(void)
20953         {
20954                 extern int testfunc();
20955                 ${cf_cv_main_return:-return} (!testfunc());
20956         }
20957
20958 _ACEOF
20959 rm -f "conftest$ac_exeext"
20960 if { (eval echo "$as_me:20960: \"$ac_link\"") >&5
20961   (eval $ac_link) 2>&5
20962   ac_status=$?
20963   echo "$as_me:20963: \$? = $ac_status" >&5
20964   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20965   { (eval echo "$as_me:20965: \"$ac_try\"") >&5
20966   (eval $ac_try) 2>&5
20967   ac_status=$?
20968   echo "$as_me:20968: \$? = $ac_status" >&5
20969   (exit "$ac_status"); }; }; then
20970   cf_cv_link_dataonly=yes
20971 else
20972   echo "$as_me: program exited with status $ac_status" >&5
20973 echo "$as_me: failed program was:" >&5
20974 cat "conftest.$ac_ext" >&5
20975 cf_cv_link_dataonly=no
20976 fi
20977 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20978 fi
20979         LIBS="$cf_saveLIBS"
20980
20981 fi
20982
20983 echo "$as_me:20983: result: $cf_cv_link_dataonly" >&5
20984 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
20985
20986 if test "$cf_cv_link_dataonly" = no ; then
20987
20988 cat >>confdefs.h <<\EOF
20989 #define BROKEN_LINKER 1
20990 EOF
20991
20992         BROKEN_LINKER=1
20993 fi
20994
20995 ###     Checks for library functions.
20996
20997 for ac_func in \
20998 getcwd \
20999 getegid \
21000 geteuid \
21001 getopt \
21002 getttynam \
21003 issetugid \
21004 localeconv \
21005 poll \
21006 putenv \
21007 remove \
21008 select \
21009 setbuf \
21010 setbuffer \
21011 setenv \
21012 setvbuf \
21013 sigaction \
21014 sigvec \
21015 snprintf \
21016 strdup \
21017 strstr \
21018 sysconf \
21019 tcgetpgrp \
21020 times \
21021 tsearch \
21022 vsnprintf \
21023
21024 do
21025 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21026 echo "$as_me:21026: checking for $ac_func" >&5
21027 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21028 if eval "test \"\${$as_ac_var+set}\" = set"; then
21029   echo $ECHO_N "(cached) $ECHO_C" >&6
21030 else
21031   cat >"conftest.$ac_ext" <<_ACEOF
21032 #line 21032 "configure"
21033 #include "confdefs.h"
21034 #define $ac_func autoconf_temporary
21035 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21036 #undef $ac_func
21037
21038 #ifdef __cplusplus
21039 extern "C"
21040 #endif
21041
21042 /* We use char because int might match the return type of a gcc2
21043    builtin and then its argument prototype would still apply.  */
21044 char $ac_func (void);
21045
21046 int
21047 main (void)
21048 {
21049
21050 /* The GNU C library defines stubs for functions which it implements
21051     to always fail with ENOSYS.  Some functions are actually named
21052     something starting with __ and the normal name is an alias.  */
21053 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21054 #error found stub for $ac_func
21055 #endif
21056
21057         return $ac_func ();
21058   ;
21059   return 0;
21060 }
21061 _ACEOF
21062 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21063 if { (eval echo "$as_me:21063: \"$ac_link\"") >&5
21064   (eval $ac_link) 2>&5
21065   ac_status=$?
21066   echo "$as_me:21066: \$? = $ac_status" >&5
21067   (exit "$ac_status"); } &&
21068          { ac_try='test -s "conftest$ac_exeext"'
21069   { (eval echo "$as_me:21069: \"$ac_try\"") >&5
21070   (eval $ac_try) 2>&5
21071   ac_status=$?
21072   echo "$as_me:21072: \$? = $ac_status" >&5
21073   (exit "$ac_status"); }; }; then
21074   eval "$as_ac_var=yes"
21075 else
21076   echo "$as_me: failed program was:" >&5
21077 cat "conftest.$ac_ext" >&5
21078 eval "$as_ac_var=no"
21079 fi
21080 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21081 fi
21082 echo "$as_me:21082: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21083 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21084 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21085   cat >>confdefs.h <<EOF
21086 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21087 EOF
21088
21089 fi
21090 done
21091
21092 if test "x$ac_cv_func_getopt" = xno && \
21093    test "x$cf_with_progs$cf_with_tests" != xnono; then
21094         { { echo "$as_me:21094: error: getopt is required for building programs" >&5
21095 echo "$as_me: error: getopt is required for building programs" >&2;}
21096    { (exit 1); exit 1; }; }
21097 fi
21098
21099 if test "x$with_safe_sprintf" = xyes
21100 then
21101         if test "x$ac_cv_func_vsnprintf" = xyes
21102         then
21103                 { echo "$as_me:21103: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
21104 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
21105         else
21106
21107 cat >>confdefs.h <<\EOF
21108 #define USE_SAFE_SPRINTF 1
21109 EOF
21110
21111         fi
21112 fi
21113
21114 if test "x$with_getcap" = "xyes" ; then
21115
21116 echo "$as_me:21116: checking for terminal-capability database functions" >&5
21117 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
21118 if test "${cf_cv_cgetent+set}" = set; then
21119   echo $ECHO_N "(cached) $ECHO_C" >&6
21120 else
21121
21122 cat >"conftest.$ac_ext" <<_ACEOF
21123 #line 21123 "configure"
21124 #include "confdefs.h"
21125
21126 #include <stdlib.h>
21127 int
21128 main (void)
21129 {
21130
21131         char temp[128];
21132         char *buf = temp;
21133         char *db_array = temp;
21134         cgetent(&buf, &db_array, "vt100");
21135         cgetcap(buf, "tc", '=');
21136         cgetmatch(buf, "tc");
21137
21138   ;
21139   return 0;
21140 }
21141 _ACEOF
21142 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21143 if { (eval echo "$as_me:21143: \"$ac_link\"") >&5
21144   (eval $ac_link) 2>&5
21145   ac_status=$?
21146   echo "$as_me:21146: \$? = $ac_status" >&5
21147   (exit "$ac_status"); } &&
21148          { ac_try='test -s "conftest$ac_exeext"'
21149   { (eval echo "$as_me:21149: \"$ac_try\"") >&5
21150   (eval $ac_try) 2>&5
21151   ac_status=$?
21152   echo "$as_me:21152: \$? = $ac_status" >&5
21153   (exit "$ac_status"); }; }; then
21154   cf_cv_cgetent=yes
21155 else
21156   echo "$as_me: failed program was:" >&5
21157 cat "conftest.$ac_ext" >&5
21158 cf_cv_cgetent=no
21159 fi
21160 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21161
21162 fi
21163 echo "$as_me:21163: result: $cf_cv_cgetent" >&5
21164 echo "${ECHO_T}$cf_cv_cgetent" >&6
21165
21166 if test "$cf_cv_cgetent" = yes
21167 then
21168
21169 cat >>confdefs.h <<\EOF
21170 #define HAVE_BSD_CGETENT 1
21171 EOF
21172
21173 echo "$as_me:21173: checking if cgetent uses const parameter" >&5
21174 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
21175 if test "${cf_cv_cgetent_const+set}" = set; then
21176   echo $ECHO_N "(cached) $ECHO_C" >&6
21177 else
21178
21179 cat >"conftest.$ac_ext" <<_ACEOF
21180 #line 21180 "configure"
21181 #include "confdefs.h"
21182
21183 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
21184 #include <stdlib.h>
21185 int
21186 main (void)
21187 {
21188
21189         char temp[128];
21190         char *buf = temp;
21191 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
21192         const char *db_array = temp;
21193         cgetent(&buf, &db_array, "vt100");
21194 #endif
21195         cgetcap(buf, "tc", '=');
21196         cgetmatch(buf, "tc");
21197
21198   ;
21199   return 0;
21200 }
21201 _ACEOF
21202 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21203 if { (eval echo "$as_me:21203: \"$ac_link\"") >&5
21204   (eval $ac_link) 2>&5
21205   ac_status=$?
21206   echo "$as_me:21206: \$? = $ac_status" >&5
21207   (exit "$ac_status"); } &&
21208          { ac_try='test -s "conftest$ac_exeext"'
21209   { (eval echo "$as_me:21209: \"$ac_try\"") >&5
21210   (eval $ac_try) 2>&5
21211   ac_status=$?
21212   echo "$as_me:21212: \$? = $ac_status" >&5
21213   (exit "$ac_status"); }; }; then
21214   cf_cv_cgetent_const=yes
21215 else
21216   echo "$as_me: failed program was:" >&5
21217 cat "conftest.$ac_ext" >&5
21218 cf_cv_cgetent_const=no
21219 fi
21220 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21221
21222 fi
21223 echo "$as_me:21223: result: $cf_cv_cgetent_const" >&5
21224 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
21225         if test "$cf_cv_cgetent_const" = yes
21226         then
21227
21228 cat >>confdefs.h <<EOF
21229 #define CGETENT_CONST const
21230 EOF
21231
21232         fi
21233 fi
21234
21235 fi
21236
21237 echo "$as_me:21237: checking for isascii" >&5
21238 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
21239 if test "${cf_cv_have_isascii+set}" = set; then
21240   echo $ECHO_N "(cached) $ECHO_C" >&6
21241 else
21242
21243         cat >"conftest.$ac_ext" <<_ACEOF
21244 #line 21244 "configure"
21245 #include "confdefs.h"
21246 #include <ctype.h>
21247 int
21248 main (void)
21249 {
21250 int x = isascii(' ')
21251   ;
21252   return 0;
21253 }
21254 _ACEOF
21255 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21256 if { (eval echo "$as_me:21256: \"$ac_link\"") >&5
21257   (eval $ac_link) 2>&5
21258   ac_status=$?
21259   echo "$as_me:21259: \$? = $ac_status" >&5
21260   (exit "$ac_status"); } &&
21261          { ac_try='test -s "conftest$ac_exeext"'
21262   { (eval echo "$as_me:21262: \"$ac_try\"") >&5
21263   (eval $ac_try) 2>&5
21264   ac_status=$?
21265   echo "$as_me:21265: \$? = $ac_status" >&5
21266   (exit "$ac_status"); }; }; then
21267   cf_cv_have_isascii=yes
21268 else
21269   echo "$as_me: failed program was:" >&5
21270 cat "conftest.$ac_ext" >&5
21271 cf_cv_have_isascii=no
21272 fi
21273 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21274
21275 fi
21276 echo "$as_me:21276: result: $cf_cv_have_isascii" >&5
21277 echo "${ECHO_T}$cf_cv_have_isascii" >&6
21278 test "$cf_cv_have_isascii" = yes &&
21279 cat >>confdefs.h <<\EOF
21280 #define HAVE_ISASCII 1
21281 EOF
21282
21283 if test "$ac_cv_func_sigaction" = yes; then
21284 echo "$as_me:21284: checking whether sigaction needs _POSIX_SOURCE" >&5
21285 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
21286 cat >"conftest.$ac_ext" <<_ACEOF
21287 #line 21287 "configure"
21288 #include "confdefs.h"
21289
21290 #include <sys/types.h>
21291 #include <signal.h>
21292 int
21293 main (void)
21294 {
21295 struct sigaction act
21296   ;
21297   return 0;
21298 }
21299 _ACEOF
21300 rm -f "conftest.$ac_objext"
21301 if { (eval echo "$as_me:21301: \"$ac_compile\"") >&5
21302   (eval $ac_compile) 2>&5
21303   ac_status=$?
21304   echo "$as_me:21304: \$? = $ac_status" >&5
21305   (exit "$ac_status"); } &&
21306          { ac_try='test -s "conftest.$ac_objext"'
21307   { (eval echo "$as_me:21307: \"$ac_try\"") >&5
21308   (eval $ac_try) 2>&5
21309   ac_status=$?
21310   echo "$as_me:21310: \$? = $ac_status" >&5
21311   (exit "$ac_status"); }; }; then
21312   sigact_bad=no
21313 else
21314   echo "$as_me: failed program was:" >&5
21315 cat "conftest.$ac_ext" >&5
21316
21317 cat >"conftest.$ac_ext" <<_ACEOF
21318 #line 21318 "configure"
21319 #include "confdefs.h"
21320
21321 #define _POSIX_SOURCE
21322 #include <sys/types.h>
21323 #include <signal.h>
21324 int
21325 main (void)
21326 {
21327 struct sigaction act
21328   ;
21329   return 0;
21330 }
21331 _ACEOF
21332 rm -f "conftest.$ac_objext"
21333 if { (eval echo "$as_me:21333: \"$ac_compile\"") >&5
21334   (eval $ac_compile) 2>&5
21335   ac_status=$?
21336   echo "$as_me:21336: \$? = $ac_status" >&5
21337   (exit "$ac_status"); } &&
21338          { ac_try='test -s "conftest.$ac_objext"'
21339   { (eval echo "$as_me:21339: \"$ac_try\"") >&5
21340   (eval $ac_try) 2>&5
21341   ac_status=$?
21342   echo "$as_me:21342: \$? = $ac_status" >&5
21343   (exit "$ac_status"); }; }; then
21344   sigact_bad=yes
21345
21346 cat >>confdefs.h <<\EOF
21347 #define _POSIX_SOURCE 1
21348 EOF
21349
21350 else
21351   echo "$as_me: failed program was:" >&5
21352 cat "conftest.$ac_ext" >&5
21353 sigact_bad=unknown
21354 fi
21355 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21356 fi
21357 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21358 echo "$as_me:21358: result: $sigact_bad" >&5
21359 echo "${ECHO_T}$sigact_bad" >&6
21360 fi
21361
21362 echo "$as_me:21362: checking if nanosleep really works" >&5
21363 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
21364 if test "${cf_cv_func_nanosleep+set}" = set; then
21365   echo $ECHO_N "(cached) $ECHO_C" >&6
21366 else
21367
21368 if test "$cross_compiling" = yes; then
21369   cf_cv_func_nanosleep=unknown
21370 else
21371   cat >"conftest.$ac_ext" <<_ACEOF
21372 #line 21372 "configure"
21373 #include "confdefs.h"
21374
21375 #include <stdio.h>
21376 #include <errno.h>
21377 #include <time.h>
21378
21379 #ifdef HAVE_SYS_TIME_H
21380 #include <sys/time.h>
21381 #endif
21382
21383 int main(void) {
21384         struct timespec ts1, ts2;
21385         int code;
21386         ts1.tv_sec  = 0;
21387         ts1.tv_nsec = 750000000;
21388         ts2.tv_sec  = 0;
21389         ts2.tv_nsec = 0;
21390         errno = 0;
21391         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
21392         ${cf_cv_main_return:-return}(code != 0);
21393 }
21394
21395 _ACEOF
21396 rm -f "conftest$ac_exeext"
21397 if { (eval echo "$as_me:21397: \"$ac_link\"") >&5
21398   (eval $ac_link) 2>&5
21399   ac_status=$?
21400   echo "$as_me:21400: \$? = $ac_status" >&5
21401   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21402   { (eval echo "$as_me:21402: \"$ac_try\"") >&5
21403   (eval $ac_try) 2>&5
21404   ac_status=$?
21405   echo "$as_me:21405: \$? = $ac_status" >&5
21406   (exit "$ac_status"); }; }; then
21407   cf_cv_func_nanosleep=yes
21408 else
21409   echo "$as_me: program exited with status $ac_status" >&5
21410 echo "$as_me: failed program was:" >&5
21411 cat "conftest.$ac_ext" >&5
21412 cf_cv_func_nanosleep=no
21413 fi
21414 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21415 fi
21416 fi
21417 echo "$as_me:21417: result: $cf_cv_func_nanosleep" >&5
21418 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
21419
21420 test "$cf_cv_func_nanosleep" = "yes" &&
21421 cat >>confdefs.h <<\EOF
21422 #define HAVE_NANOSLEEP 1
21423 EOF
21424
21425 for ac_header in \
21426 termio.h \
21427 termios.h \
21428 unistd.h \
21429 sys/ioctl.h \
21430 sys/termio.h \
21431
21432 do
21433 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21434 echo "$as_me:21434: checking for $ac_header" >&5
21435 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21436 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21437   echo $ECHO_N "(cached) $ECHO_C" >&6
21438 else
21439   cat >"conftest.$ac_ext" <<_ACEOF
21440 #line 21440 "configure"
21441 #include "confdefs.h"
21442 #include <$ac_header>
21443 _ACEOF
21444 if { (eval echo "$as_me:21444: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21445   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21446   ac_status=$?
21447   $EGREP -v '^ *\+' conftest.er1 >conftest.err
21448   rm -f conftest.er1
21449   cat conftest.err >&5
21450   echo "$as_me:21450: \$? = $ac_status" >&5
21451   (exit "$ac_status"); } >/dev/null; then
21452   if test -s conftest.err; then
21453     ac_cpp_err=$ac_c_preproc_warn_flag
21454   else
21455     ac_cpp_err=
21456   fi
21457 else
21458   ac_cpp_err=yes
21459 fi
21460 if test -z "$ac_cpp_err"; then
21461   eval "$as_ac_Header=yes"
21462 else
21463   echo "$as_me: failed program was:" >&5
21464   cat "conftest.$ac_ext" >&5
21465   eval "$as_ac_Header=no"
21466 fi
21467 rm -f conftest.err "conftest.$ac_ext"
21468 fi
21469 echo "$as_me:21469: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
21470 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
21471 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
21472   cat >>confdefs.h <<EOF
21473 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21474 EOF
21475
21476 fi
21477 done
21478
21479 if test "$ac_cv_header_termios_h" = yes ; then
21480         case "$CFLAGS $CPPFLAGS" in
21481         (*-D_POSIX_SOURCE*)
21482                 termios_bad=dunno ;;
21483         (*)     termios_bad=maybe ;;
21484         esac
21485         if test "$termios_bad" = maybe ; then
21486         echo "$as_me:21486: checking whether termios.h needs _POSIX_SOURCE" >&5
21487 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
21488         cat >"conftest.$ac_ext" <<_ACEOF
21489 #line 21489 "configure"
21490 #include "confdefs.h"
21491 #include <termios.h>
21492 int
21493 main (void)
21494 {
21495 struct termios foo; int x = foo.c_iflag = 1; (void)x
21496   ;
21497   return 0;
21498 }
21499 _ACEOF
21500 rm -f "conftest.$ac_objext"
21501 if { (eval echo "$as_me:21501: \"$ac_compile\"") >&5
21502   (eval $ac_compile) 2>&5
21503   ac_status=$?
21504   echo "$as_me:21504: \$? = $ac_status" >&5
21505   (exit "$ac_status"); } &&
21506          { ac_try='test -s "conftest.$ac_objext"'
21507   { (eval echo "$as_me:21507: \"$ac_try\"") >&5
21508   (eval $ac_try) 2>&5
21509   ac_status=$?
21510   echo "$as_me:21510: \$? = $ac_status" >&5
21511   (exit "$ac_status"); }; }; then
21512   termios_bad=no
21513 else
21514   echo "$as_me: failed program was:" >&5
21515 cat "conftest.$ac_ext" >&5
21516
21517                 cat >"conftest.$ac_ext" <<_ACEOF
21518 #line 21518 "configure"
21519 #include "confdefs.h"
21520
21521 #define _POSIX_SOURCE
21522 #include <termios.h>
21523 int
21524 main (void)
21525 {
21526 struct termios foo; int x = foo.c_iflag = 2; (void)x
21527   ;
21528   return 0;
21529 }
21530 _ACEOF
21531 rm -f "conftest.$ac_objext"
21532 if { (eval echo "$as_me:21532: \"$ac_compile\"") >&5
21533   (eval $ac_compile) 2>&5
21534   ac_status=$?
21535   echo "$as_me:21535: \$? = $ac_status" >&5
21536   (exit "$ac_status"); } &&
21537          { ac_try='test -s "conftest.$ac_objext"'
21538   { (eval echo "$as_me:21538: \"$ac_try\"") >&5
21539   (eval $ac_try) 2>&5
21540   ac_status=$?
21541   echo "$as_me:21541: \$? = $ac_status" >&5
21542   (exit "$ac_status"); }; }; then
21543   termios_bad=unknown
21544 else
21545   echo "$as_me: failed program was:" >&5
21546 cat "conftest.$ac_ext" >&5
21547 termios_bad=yes
21548 cat >>confdefs.h <<\EOF
21549 #define _POSIX_SOURCE 1
21550 EOF
21551
21552 fi
21553 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21554
21555 fi
21556 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21557         echo "$as_me:21557: result: $termios_bad" >&5
21558 echo "${ECHO_T}$termios_bad" >&6
21559         fi
21560 fi
21561
21562 echo "$as_me:21562: checking for tcgetattr" >&5
21563 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
21564 if test "${cf_cv_have_tcgetattr+set}" = set; then
21565   echo $ECHO_N "(cached) $ECHO_C" >&6
21566 else
21567
21568 cat >"conftest.$ac_ext" <<_ACEOF
21569 #line 21569 "configure"
21570 #include "confdefs.h"
21571
21572 #include <sys/types.h>
21573 #ifdef HAVE_UNISTD_H
21574 #include <unistd.h>
21575 #endif
21576 #ifdef HAVE_TERMIOS_H
21577 #include <termios.h>
21578 #define TTY struct termios
21579 #else
21580 #ifdef HAVE_TERMIO_H
21581 #include <termio.h>
21582 #define TTY struct termio
21583 #endif
21584 #endif
21585
21586 int
21587 main (void)
21588 {
21589
21590 TTY foo;
21591 tcgetattr(1, &foo);
21592   ;
21593   return 0;
21594 }
21595 _ACEOF
21596 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21597 if { (eval echo "$as_me:21597: \"$ac_link\"") >&5
21598   (eval $ac_link) 2>&5
21599   ac_status=$?
21600   echo "$as_me:21600: \$? = $ac_status" >&5
21601   (exit "$ac_status"); } &&
21602          { ac_try='test -s "conftest$ac_exeext"'
21603   { (eval echo "$as_me:21603: \"$ac_try\"") >&5
21604   (eval $ac_try) 2>&5
21605   ac_status=$?
21606   echo "$as_me:21606: \$? = $ac_status" >&5
21607   (exit "$ac_status"); }; }; then
21608   cf_cv_have_tcgetattr=yes
21609 else
21610   echo "$as_me: failed program was:" >&5
21611 cat "conftest.$ac_ext" >&5
21612 cf_cv_have_tcgetattr=no
21613 fi
21614 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21615 fi
21616 echo "$as_me:21616: result: $cf_cv_have_tcgetattr" >&5
21617 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
21618 test "$cf_cv_have_tcgetattr" = yes &&
21619 cat >>confdefs.h <<\EOF
21620 #define HAVE_TCGETATTR 1
21621 EOF
21622
21623 echo "$as_me:21623: checking for vsscanf function or workaround" >&5
21624 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
21625 if test "${cf_cv_func_vsscanf+set}" = set; then
21626   echo $ECHO_N "(cached) $ECHO_C" >&6
21627 else
21628
21629 cat >"conftest.$ac_ext" <<_ACEOF
21630 #line 21630 "configure"
21631 #include "confdefs.h"
21632
21633 #include <stdarg.h>
21634 #include <stdio.h>
21635 int
21636 main (void)
21637 {
21638
21639         va_list ap;
21640         vsscanf("from", "%d", ap)
21641   ;
21642   return 0;
21643 }
21644 _ACEOF
21645 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21646 if { (eval echo "$as_me:21646: \"$ac_link\"") >&5
21647   (eval $ac_link) 2>&5
21648   ac_status=$?
21649   echo "$as_me:21649: \$? = $ac_status" >&5
21650   (exit "$ac_status"); } &&
21651          { ac_try='test -s "conftest$ac_exeext"'
21652   { (eval echo "$as_me:21652: \"$ac_try\"") >&5
21653   (eval $ac_try) 2>&5
21654   ac_status=$?
21655   echo "$as_me:21655: \$? = $ac_status" >&5
21656   (exit "$ac_status"); }; }; then
21657   cf_cv_func_vsscanf=vsscanf
21658 else
21659   echo "$as_me: failed program was:" >&5
21660 cat "conftest.$ac_ext" >&5
21661
21662 cat >"conftest.$ac_ext" <<_ACEOF
21663 #line 21663 "configure"
21664 #include "confdefs.h"
21665
21666 #include <stdarg.h>
21667 #include <stdio.h>
21668 int
21669 main (void)
21670 {
21671
21672         FILE strbuf;
21673         char *str = "from";
21674
21675         strbuf._flag = _IOREAD;
21676         strbuf._ptr = strbuf._base = (unsigned char *) str;
21677         strbuf._cnt = strlen(str);
21678         strbuf._file = _NFILE;
21679         return (vfscanf(&strbuf, "%d", ap))
21680   ;
21681   return 0;
21682 }
21683 _ACEOF
21684 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21685 if { (eval echo "$as_me:21685: \"$ac_link\"") >&5
21686   (eval $ac_link) 2>&5
21687   ac_status=$?
21688   echo "$as_me:21688: \$? = $ac_status" >&5
21689   (exit "$ac_status"); } &&
21690          { ac_try='test -s "conftest$ac_exeext"'
21691   { (eval echo "$as_me:21691: \"$ac_try\"") >&5
21692   (eval $ac_try) 2>&5
21693   ac_status=$?
21694   echo "$as_me:21694: \$? = $ac_status" >&5
21695   (exit "$ac_status"); }; }; then
21696   cf_cv_func_vsscanf=vfscanf
21697 else
21698   echo "$as_me: failed program was:" >&5
21699 cat "conftest.$ac_ext" >&5
21700
21701 cat >"conftest.$ac_ext" <<_ACEOF
21702 #line 21702 "configure"
21703 #include "confdefs.h"
21704
21705 #include <stdarg.h>
21706 #include <stdio.h>
21707 int
21708 main (void)
21709 {
21710
21711         FILE strbuf;
21712         char *str = "from";
21713
21714         strbuf._flag = _IOREAD;
21715         strbuf._ptr = strbuf._base = (unsigned char *) str;
21716         strbuf._cnt = strlen(str);
21717         strbuf._file = _NFILE;
21718         return (_doscan(&strbuf, "%d", ap))
21719   ;
21720   return 0;
21721 }
21722 _ACEOF
21723 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21724 if { (eval echo "$as_me:21724: \"$ac_link\"") >&5
21725   (eval $ac_link) 2>&5
21726   ac_status=$?
21727   echo "$as_me:21727: \$? = $ac_status" >&5
21728   (exit "$ac_status"); } &&
21729          { ac_try='test -s "conftest$ac_exeext"'
21730   { (eval echo "$as_me:21730: \"$ac_try\"") >&5
21731   (eval $ac_try) 2>&5
21732   ac_status=$?
21733   echo "$as_me:21733: \$? = $ac_status" >&5
21734   (exit "$ac_status"); }; }; then
21735   cf_cv_func_vsscanf=_doscan
21736 else
21737   echo "$as_me: failed program was:" >&5
21738 cat "conftest.$ac_ext" >&5
21739
21740 cf_cv_func_vsscanf=no
21741 fi
21742 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21743 fi
21744 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21745 fi
21746 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21747 fi
21748 echo "$as_me:21748: result: $cf_cv_func_vsscanf" >&5
21749 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
21750
21751 case "$cf_cv_func_vsscanf" in
21752 (vsscanf)
21753 cat >>confdefs.h <<\EOF
21754 #define HAVE_VSSCANF 1
21755 EOF
21756 ;;
21757 (vfscanf)
21758 cat >>confdefs.h <<\EOF
21759 #define HAVE_VFSCANF 1
21760 EOF
21761 ;;
21762 (_doscan)
21763 cat >>confdefs.h <<\EOF
21764 #define HAVE__DOSCAN 1
21765 EOF
21766 ;;
21767 esac
21768
21769 for ac_header in \
21770 unistd.h \
21771
21772 do
21773 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21774 echo "$as_me:21774: checking for $ac_header" >&5
21775 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21776 if eval "test \"\${$as_ac_Header+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 #include <$ac_header>
21783 _ACEOF
21784 if { (eval echo "$as_me:21784: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21785   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21786   ac_status=$?
21787   $EGREP -v '^ *\+' conftest.er1 >conftest.err
21788   rm -f conftest.er1
21789   cat conftest.err >&5
21790   echo "$as_me:21790: \$? = $ac_status" >&5
21791   (exit "$ac_status"); } >/dev/null; then
21792   if test -s conftest.err; then
21793     ac_cpp_err=$ac_c_preproc_warn_flag
21794   else
21795     ac_cpp_err=
21796   fi
21797 else
21798   ac_cpp_err=yes
21799 fi
21800 if test -z "$ac_cpp_err"; then
21801   eval "$as_ac_Header=yes"
21802 else
21803   echo "$as_me: failed program was:" >&5
21804   cat "conftest.$ac_ext" >&5
21805   eval "$as_ac_Header=no"
21806 fi
21807 rm -f conftest.err "conftest.$ac_ext"
21808 fi
21809 echo "$as_me:21809: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
21810 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
21811 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
21812   cat >>confdefs.h <<EOF
21813 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21814 EOF
21815
21816 fi
21817 done
21818
21819 echo "$as_me:21819: checking for working mkstemp" >&5
21820 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
21821 if test "${cf_cv_func_mkstemp+set}" = set; then
21822   echo $ECHO_N "(cached) $ECHO_C" >&6
21823 else
21824
21825 rm -rf ./conftest*
21826 if test "$cross_compiling" = yes; then
21827   cf_cv_func_mkstemp=maybe
21828 else
21829   cat >"conftest.$ac_ext" <<_ACEOF
21830 #line 21830 "configure"
21831 #include "confdefs.h"
21832
21833 #include <sys/types.h>
21834 #ifdef HAVE_UNISTD_H
21835 #include <unistd.h>
21836 #endif
21837 #include <stdlib.h>
21838 #include <stdio.h>
21839 #include <string.h>
21840 #include <sys/stat.h>
21841 int main(void)
21842 {
21843         char *tmpl = "conftestXXXXXX";
21844         char name[2][80];
21845         int n;
21846         int result = 0;
21847         int fd;
21848         struct stat sb;
21849
21850         umask(077);
21851         for (n = 0; n < 2; ++n) {
21852                 strcpy(name[n], tmpl);
21853                 if ((fd = mkstemp(name[n])) >= 0) {
21854                         if (!strcmp(name[n], tmpl)
21855                          || stat(name[n], &sb) != 0
21856                          || (sb.st_mode & S_IFMT) != S_IFREG
21857                          || (sb.st_mode & 077) != 0) {
21858                                 result = 1;
21859                         }
21860                         close(fd);
21861                 }
21862         }
21863         if (result == 0
21864          && !strcmp(name[0], name[1]))
21865                 result = 1;
21866         ${cf_cv_main_return:-return}(result);
21867 }
21868
21869 _ACEOF
21870 rm -f "conftest$ac_exeext"
21871 if { (eval echo "$as_me:21871: \"$ac_link\"") >&5
21872   (eval $ac_link) 2>&5
21873   ac_status=$?
21874   echo "$as_me:21874: \$? = $ac_status" >&5
21875   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21876   { (eval echo "$as_me:21876: \"$ac_try\"") >&5
21877   (eval $ac_try) 2>&5
21878   ac_status=$?
21879   echo "$as_me:21879: \$? = $ac_status" >&5
21880   (exit "$ac_status"); }; }; then
21881   cf_cv_func_mkstemp=yes
21882
21883 else
21884   echo "$as_me: program exited with status $ac_status" >&5
21885 echo "$as_me: failed program was:" >&5
21886 cat "conftest.$ac_ext" >&5
21887 cf_cv_func_mkstemp=no
21888
21889 fi
21890 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21891 fi
21892
21893 fi
21894 echo "$as_me:21894: result: $cf_cv_func_mkstemp" >&5
21895 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
21896 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
21897         echo "$as_me:21897: checking for mkstemp" >&5
21898 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
21899 if test "${ac_cv_func_mkstemp+set}" = set; then
21900   echo $ECHO_N "(cached) $ECHO_C" >&6
21901 else
21902   cat >"conftest.$ac_ext" <<_ACEOF
21903 #line 21903 "configure"
21904 #include "confdefs.h"
21905 #define mkstemp autoconf_temporary
21906 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21907 #undef mkstemp
21908
21909 #ifdef __cplusplus
21910 extern "C"
21911 #endif
21912
21913 /* We use char because int might match the return type of a gcc2
21914    builtin and then its argument prototype would still apply.  */
21915 char mkstemp (void);
21916
21917 int
21918 main (void)
21919 {
21920
21921 /* The GNU C library defines stubs for functions which it implements
21922     to always fail with ENOSYS.  Some functions are actually named
21923     something starting with __ and the normal name is an alias.  */
21924 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
21925 #error found stub for mkstemp
21926 #endif
21927
21928         return mkstemp ();
21929   ;
21930   return 0;
21931 }
21932 _ACEOF
21933 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21934 if { (eval echo "$as_me:21934: \"$ac_link\"") >&5
21935   (eval $ac_link) 2>&5
21936   ac_status=$?
21937   echo "$as_me:21937: \$? = $ac_status" >&5
21938   (exit "$ac_status"); } &&
21939          { ac_try='test -s "conftest$ac_exeext"'
21940   { (eval echo "$as_me:21940: \"$ac_try\"") >&5
21941   (eval $ac_try) 2>&5
21942   ac_status=$?
21943   echo "$as_me:21943: \$? = $ac_status" >&5
21944   (exit "$ac_status"); }; }; then
21945   ac_cv_func_mkstemp=yes
21946 else
21947   echo "$as_me: failed program was:" >&5
21948 cat "conftest.$ac_ext" >&5
21949 ac_cv_func_mkstemp=no
21950 fi
21951 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21952 fi
21953 echo "$as_me:21953: result: $ac_cv_func_mkstemp" >&5
21954 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
21955
21956 fi
21957 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
21958
21959 cat >>confdefs.h <<\EOF
21960 #define HAVE_MKSTEMP 1
21961 EOF
21962
21963 fi
21964
21965 # setup for prototype of fallback for vsscanf()
21966
21967 if test "$cf_cv_func_vsscanf" = vsscanf ; then
21968         HAVE_VSSCANF=1
21969 else
21970         HAVE_VSSCANF=0
21971 fi
21972
21973 if test "x$cross_compiling" = xyes ; then
21974         { echo "$as_me:21974: WARNING: cross compiling: assume setvbuf params not reversed" >&5
21975 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
21976 else
21977         echo "$as_me:21977: checking whether setvbuf arguments are reversed" >&5
21978 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
21979 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
21980   echo $ECHO_N "(cached) $ECHO_C" >&6
21981 else
21982   if test "$cross_compiling" = yes; then
21983   { { echo "$as_me:21983: error: cannot run test program while cross compiling" >&5
21984 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21985    { (exit 1); exit 1; }; }
21986 else
21987   cat >"conftest.$ac_ext" <<_ACEOF
21988 #line 21988 "configure"
21989 #include "confdefs.h"
21990 #include <stdio.h>
21991 /* If setvbuf has the reversed format, exit 0. */
21992 int
21993 main (void)
21994 {
21995   /* This call has the arguments reversed.
21996      A reversed system may check and see that the address of main
21997      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
21998   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
21999     $ac_main_return(1);
22000   putc('\r', stdout);
22001   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22002 }
22003 _ACEOF
22004 rm -f "conftest$ac_exeext"
22005 if { (eval echo "$as_me:22005: \"$ac_link\"") >&5
22006   (eval $ac_link) 2>&5
22007   ac_status=$?
22008   echo "$as_me:22008: \$? = $ac_status" >&5
22009   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22010   { (eval echo "$as_me:22010: \"$ac_try\"") >&5
22011   (eval $ac_try) 2>&5
22012   ac_status=$?
22013   echo "$as_me:22013: \$? = $ac_status" >&5
22014   (exit "$ac_status"); }; }; then
22015   ac_cv_func_setvbuf_reversed=yes
22016 else
22017   echo "$as_me: program exited with status $ac_status" >&5
22018 echo "$as_me: failed program was:" >&5
22019 cat "conftest.$ac_ext" >&5
22020 ac_cv_func_setvbuf_reversed=no
22021 fi
22022 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22023 fi
22024 rm -f core ./core.* ./*.core
22025 fi
22026 echo "$as_me:22026: result: $ac_cv_func_setvbuf_reversed" >&5
22027 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
22028 if test $ac_cv_func_setvbuf_reversed = yes; then
22029
22030 cat >>confdefs.h <<\EOF
22031 #define SETVBUF_REVERSED 1
22032 EOF
22033
22034 fi
22035
22036 fi
22037 echo "$as_me:22037: checking for intptr_t" >&5
22038 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
22039 if test "${ac_cv_type_intptr_t+set}" = set; then
22040   echo $ECHO_N "(cached) $ECHO_C" >&6
22041 else
22042   cat >"conftest.$ac_ext" <<_ACEOF
22043 #line 22043 "configure"
22044 #include "confdefs.h"
22045 $ac_includes_default
22046 int
22047 main (void)
22048 {
22049 if ((intptr_t *) 0)
22050   return 0;
22051 if (sizeof (intptr_t))
22052   return 0;
22053   ;
22054   return 0;
22055 }
22056 _ACEOF
22057 rm -f "conftest.$ac_objext"
22058 if { (eval echo "$as_me:22058: \"$ac_compile\"") >&5
22059   (eval $ac_compile) 2>&5
22060   ac_status=$?
22061   echo "$as_me:22061: \$? = $ac_status" >&5
22062   (exit "$ac_status"); } &&
22063          { ac_try='test -s "conftest.$ac_objext"'
22064   { (eval echo "$as_me:22064: \"$ac_try\"") >&5
22065   (eval $ac_try) 2>&5
22066   ac_status=$?
22067   echo "$as_me:22067: \$? = $ac_status" >&5
22068   (exit "$ac_status"); }; }; then
22069   ac_cv_type_intptr_t=yes
22070 else
22071   echo "$as_me: failed program was:" >&5
22072 cat "conftest.$ac_ext" >&5
22073 ac_cv_type_intptr_t=no
22074 fi
22075 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22076 fi
22077 echo "$as_me:22077: result: $ac_cv_type_intptr_t" >&5
22078 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
22079 if test "$ac_cv_type_intptr_t" = yes; then
22080   :
22081 else
22082
22083 cat >>confdefs.h <<EOF
22084 #define intptr_t long
22085 EOF
22086
22087 fi
22088
22089 echo "$as_me:22089: checking for ssize_t" >&5
22090 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22091 if test "${ac_cv_type_ssize_t+set}" = set; then
22092   echo $ECHO_N "(cached) $ECHO_C" >&6
22093 else
22094   cat >"conftest.$ac_ext" <<_ACEOF
22095 #line 22095 "configure"
22096 #include "confdefs.h"
22097 $ac_includes_default
22098 int
22099 main (void)
22100 {
22101 if ((ssize_t *) 0)
22102   return 0;
22103 if (sizeof (ssize_t))
22104   return 0;
22105   ;
22106   return 0;
22107 }
22108 _ACEOF
22109 rm -f "conftest.$ac_objext"
22110 if { (eval echo "$as_me:22110: \"$ac_compile\"") >&5
22111   (eval $ac_compile) 2>&5
22112   ac_status=$?
22113   echo "$as_me:22113: \$? = $ac_status" >&5
22114   (exit "$ac_status"); } &&
22115          { ac_try='test -s "conftest.$ac_objext"'
22116   { (eval echo "$as_me:22116: \"$ac_try\"") >&5
22117   (eval $ac_try) 2>&5
22118   ac_status=$?
22119   echo "$as_me:22119: \$? = $ac_status" >&5
22120   (exit "$ac_status"); }; }; then
22121   ac_cv_type_ssize_t=yes
22122 else
22123   echo "$as_me: failed program was:" >&5
22124 cat "conftest.$ac_ext" >&5
22125 ac_cv_type_ssize_t=no
22126 fi
22127 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22128 fi
22129 echo "$as_me:22129: result: $ac_cv_type_ssize_t" >&5
22130 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
22131 if test "$ac_cv_type_ssize_t" = yes; then
22132   :
22133 else
22134
22135 cat >>confdefs.h <<EOF
22136 #define ssize_t int
22137 EOF
22138
22139 fi
22140
22141 echo "$as_me:22141: checking for type sigaction_t" >&5
22142 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
22143 if test "${cf_cv_type_sigaction+set}" = set; then
22144   echo $ECHO_N "(cached) $ECHO_C" >&6
22145 else
22146
22147         cat >"conftest.$ac_ext" <<_ACEOF
22148 #line 22148 "configure"
22149 #include "confdefs.h"
22150
22151 #include <signal.h>
22152 int
22153 main (void)
22154 {
22155 sigaction_t x
22156   ;
22157   return 0;
22158 }
22159 _ACEOF
22160 rm -f "conftest.$ac_objext"
22161 if { (eval echo "$as_me:22161: \"$ac_compile\"") >&5
22162   (eval $ac_compile) 2>&5
22163   ac_status=$?
22164   echo "$as_me:22164: \$? = $ac_status" >&5
22165   (exit "$ac_status"); } &&
22166          { ac_try='test -s "conftest.$ac_objext"'
22167   { (eval echo "$as_me:22167: \"$ac_try\"") >&5
22168   (eval $ac_try) 2>&5
22169   ac_status=$?
22170   echo "$as_me:22170: \$? = $ac_status" >&5
22171   (exit "$ac_status"); }; }; then
22172   cf_cv_type_sigaction=yes
22173 else
22174   echo "$as_me: failed program was:" >&5
22175 cat "conftest.$ac_ext" >&5
22176 cf_cv_type_sigaction=no
22177 fi
22178 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22179 fi
22180
22181 echo "$as_me:22181: result: $cf_cv_type_sigaction" >&5
22182 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
22183 test "$cf_cv_type_sigaction" = yes &&
22184 cat >>confdefs.h <<\EOF
22185 #define HAVE_TYPE_SIGACTION 1
22186 EOF
22187
22188 echo "$as_me:22188: checking declaration of size-change" >&5
22189 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
22190 if test "${cf_cv_sizechange+set}" = set; then
22191   echo $ECHO_N "(cached) $ECHO_C" >&6
22192 else
22193
22194         cf_cv_sizechange=unknown
22195         cf_save_CPPFLAGS="$CPPFLAGS"
22196
22197 for cf_opts in "" "NEED_PTEM_H"
22198 do
22199
22200         CPPFLAGS="$cf_save_CPPFLAGS"
22201         if test -n "$cf_opts"
22202         then
22203
22204         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22205         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
22206
22207         fi
22208         cat >"conftest.$ac_ext" <<_ACEOF
22209 #line 22209 "configure"
22210 #include "confdefs.h"
22211 #include <sys/types.h>
22212 #ifdef HAVE_TERMIOS_H
22213 #include <termios.h>
22214 #else
22215 #ifdef HAVE_TERMIO_H
22216 #include <termio.h>
22217 #endif
22218 #endif
22219
22220 #ifdef NEED_PTEM_H
22221 /* This is a workaround for SCO:  they neglected to define struct winsize in
22222  * termios.h -- it's only in termio.h and ptem.h
22223  */
22224 #include <sys/stream.h>
22225 #include <sys/ptem.h>
22226 #endif
22227
22228 #ifdef HAVE_SYS_IOCTL_H
22229 #include <sys/ioctl.h>
22230 #endif
22231
22232 int
22233 main (void)
22234 {
22235
22236 #ifdef TIOCGSIZE
22237         struct ttysize win;     /* SunOS 3.0... */
22238         int y = win.ts_lines = 2;
22239         int x = win.ts_cols = 1;
22240         (void)y;
22241         (void)x;
22242 #else
22243 #ifdef TIOCGWINSZ
22244         struct winsize win;     /* everything else */
22245         int y = win.ws_row = 2;
22246         int x = win.ws_col = 1;
22247         (void)y;
22248         (void)x;
22249 #else
22250         no TIOCGSIZE or TIOCGWINSZ
22251 #endif /* TIOCGWINSZ */
22252 #endif /* TIOCGSIZE */
22253
22254   ;
22255   return 0;
22256 }
22257 _ACEOF
22258 rm -f "conftest.$ac_objext"
22259 if { (eval echo "$as_me:22259: \"$ac_compile\"") >&5
22260   (eval $ac_compile) 2>&5
22261   ac_status=$?
22262   echo "$as_me:22262: \$? = $ac_status" >&5
22263   (exit "$ac_status"); } &&
22264          { ac_try='test -s "conftest.$ac_objext"'
22265   { (eval echo "$as_me:22265: \"$ac_try\"") >&5
22266   (eval $ac_try) 2>&5
22267   ac_status=$?
22268   echo "$as_me:22268: \$? = $ac_status" >&5
22269   (exit "$ac_status"); }; }; then
22270   cf_cv_sizechange=yes
22271 else
22272   echo "$as_me: failed program was:" >&5
22273 cat "conftest.$ac_ext" >&5
22274 cf_cv_sizechange=no
22275 fi
22276 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22277
22278         CPPFLAGS="$cf_save_CPPFLAGS"
22279         if test "$cf_cv_sizechange" = yes ; then
22280                 echo "size-change succeeded ($cf_opts)" >&5
22281                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
22282                 break
22283         fi
22284 done
22285
22286 fi
22287 echo "$as_me:22287: result: $cf_cv_sizechange" >&5
22288 echo "${ECHO_T}$cf_cv_sizechange" >&6
22289 if test "$cf_cv_sizechange" != no ; then
22290
22291 cat >>confdefs.h <<\EOF
22292 #define HAVE_SIZECHANGE 1
22293 EOF
22294
22295         case "$cf_cv_sizechange" in
22296         (NEED*)
22297                 cat >>confdefs.h <<EOF
22298 #define $cf_cv_sizechange  1
22299 EOF
22300
22301                 ;;
22302         esac
22303 fi
22304
22305 echo "$as_me:22305: checking for memmove" >&5
22306 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
22307 if test "${ac_cv_func_memmove+set}" = set; then
22308   echo $ECHO_N "(cached) $ECHO_C" >&6
22309 else
22310   cat >"conftest.$ac_ext" <<_ACEOF
22311 #line 22311 "configure"
22312 #include "confdefs.h"
22313 #define memmove autoconf_temporary
22314 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22315 #undef memmove
22316
22317 #ifdef __cplusplus
22318 extern "C"
22319 #endif
22320
22321 /* We use char because int might match the return type of a gcc2
22322    builtin and then its argument prototype would still apply.  */
22323 char memmove (void);
22324
22325 int
22326 main (void)
22327 {
22328
22329 /* The GNU C library defines stubs for functions which it implements
22330     to always fail with ENOSYS.  Some functions are actually named
22331     something starting with __ and the normal name is an alias.  */
22332 #if defined (__stub_memmove) || defined (__stub___memmove)
22333 #error found stub for memmove
22334 #endif
22335
22336         return memmove ();
22337   ;
22338   return 0;
22339 }
22340 _ACEOF
22341 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22342 if { (eval echo "$as_me:22342: \"$ac_link\"") >&5
22343   (eval $ac_link) 2>&5
22344   ac_status=$?
22345   echo "$as_me:22345: \$? = $ac_status" >&5
22346   (exit "$ac_status"); } &&
22347          { ac_try='test -s "conftest$ac_exeext"'
22348   { (eval echo "$as_me:22348: \"$ac_try\"") >&5
22349   (eval $ac_try) 2>&5
22350   ac_status=$?
22351   echo "$as_me:22351: \$? = $ac_status" >&5
22352   (exit "$ac_status"); }; }; then
22353   ac_cv_func_memmove=yes
22354 else
22355   echo "$as_me: failed program was:" >&5
22356 cat "conftest.$ac_ext" >&5
22357 ac_cv_func_memmove=no
22358 fi
22359 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22360 fi
22361 echo "$as_me:22361: result: $ac_cv_func_memmove" >&5
22362 echo "${ECHO_T}$ac_cv_func_memmove" >&6
22363 if test "$ac_cv_func_memmove" = yes; then
22364   :
22365 else
22366
22367 echo "$as_me:22367: checking for bcopy" >&5
22368 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
22369 if test "${ac_cv_func_bcopy+set}" = set; then
22370   echo $ECHO_N "(cached) $ECHO_C" >&6
22371 else
22372   cat >"conftest.$ac_ext" <<_ACEOF
22373 #line 22373 "configure"
22374 #include "confdefs.h"
22375 #define bcopy autoconf_temporary
22376 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22377 #undef bcopy
22378
22379 #ifdef __cplusplus
22380 extern "C"
22381 #endif
22382
22383 /* We use char because int might match the return type of a gcc2
22384    builtin and then its argument prototype would still apply.  */
22385 char bcopy (void);
22386
22387 int
22388 main (void)
22389 {
22390
22391 /* The GNU C library defines stubs for functions which it implements
22392     to always fail with ENOSYS.  Some functions are actually named
22393     something starting with __ and the normal name is an alias.  */
22394 #if defined (__stub_bcopy) || defined (__stub___bcopy)
22395 #error found stub for bcopy
22396 #endif
22397
22398         return bcopy ();
22399   ;
22400   return 0;
22401 }
22402 _ACEOF
22403 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22404 if { (eval echo "$as_me:22404: \"$ac_link\"") >&5
22405   (eval $ac_link) 2>&5
22406   ac_status=$?
22407   echo "$as_me:22407: \$? = $ac_status" >&5
22408   (exit "$ac_status"); } &&
22409          { ac_try='test -s "conftest$ac_exeext"'
22410   { (eval echo "$as_me:22410: \"$ac_try\"") >&5
22411   (eval $ac_try) 2>&5
22412   ac_status=$?
22413   echo "$as_me:22413: \$? = $ac_status" >&5
22414   (exit "$ac_status"); }; }; then
22415   ac_cv_func_bcopy=yes
22416 else
22417   echo "$as_me: failed program was:" >&5
22418 cat "conftest.$ac_ext" >&5
22419 ac_cv_func_bcopy=no
22420 fi
22421 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22422 fi
22423 echo "$as_me:22423: result: $ac_cv_func_bcopy" >&5
22424 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
22425 if test "$ac_cv_func_bcopy" = yes; then
22426
22427         echo "$as_me:22427: checking if bcopy does overlapping moves" >&5
22428 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
22429 if test "${cf_cv_good_bcopy+set}" = set; then
22430   echo $ECHO_N "(cached) $ECHO_C" >&6
22431 else
22432
22433                 if test "$cross_compiling" = yes; then
22434   cf_cv_good_bcopy=unknown
22435 else
22436   cat >"conftest.$ac_ext" <<_ACEOF
22437 #line 22437 "configure"
22438 #include "confdefs.h"
22439
22440 int main(void) {
22441         static char data[] = "abcdefghijklmnopqrstuwwxyz";
22442         char temp[40];
22443         bcopy(data, temp, sizeof(data));
22444         bcopy(temp+10, temp, 15);
22445         bcopy(temp+5, temp+15, 10);
22446         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
22447 }
22448
22449 _ACEOF
22450 rm -f "conftest$ac_exeext"
22451 if { (eval echo "$as_me:22451: \"$ac_link\"") >&5
22452   (eval $ac_link) 2>&5
22453   ac_status=$?
22454   echo "$as_me:22454: \$? = $ac_status" >&5
22455   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22456   { (eval echo "$as_me:22456: \"$ac_try\"") >&5
22457   (eval $ac_try) 2>&5
22458   ac_status=$?
22459   echo "$as_me:22459: \$? = $ac_status" >&5
22460   (exit "$ac_status"); }; }; then
22461   cf_cv_good_bcopy=yes
22462 else
22463   echo "$as_me: program exited with status $ac_status" >&5
22464 echo "$as_me: failed program was:" >&5
22465 cat "conftest.$ac_ext" >&5
22466 cf_cv_good_bcopy=no
22467 fi
22468 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22469 fi
22470
22471 fi
22472 echo "$as_me:22472: result: $cf_cv_good_bcopy" >&5
22473 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
22474
22475 else
22476   cf_cv_good_bcopy=no
22477 fi
22478
22479         if test "$cf_cv_good_bcopy" = yes ; then
22480
22481 cat >>confdefs.h <<\EOF
22482 #define USE_OK_BCOPY 1
22483 EOF
22484
22485         else
22486
22487 cat >>confdefs.h <<\EOF
22488 #define USE_MY_MEMMOVE 1
22489 EOF
22490
22491         fi
22492
22493 fi
22494
22495 tty >/dev/null 2>&1 || {
22496 for ac_func in posix_openpt
22497 do
22498 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22499 echo "$as_me:22499: checking for $ac_func" >&5
22500 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22501 if eval "test \"\${$as_ac_var+set}\" = set"; then
22502   echo $ECHO_N "(cached) $ECHO_C" >&6
22503 else
22504   cat >"conftest.$ac_ext" <<_ACEOF
22505 #line 22505 "configure"
22506 #include "confdefs.h"
22507 #define $ac_func autoconf_temporary
22508 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22509 #undef $ac_func
22510
22511 #ifdef __cplusplus
22512 extern "C"
22513 #endif
22514
22515 /* We use char because int might match the return type of a gcc2
22516    builtin and then its argument prototype would still apply.  */
22517 char $ac_func (void);
22518
22519 int
22520 main (void)
22521 {
22522
22523 /* The GNU C library defines stubs for functions which it implements
22524     to always fail with ENOSYS.  Some functions are actually named
22525     something starting with __ and the normal name is an alias.  */
22526 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22527 #error found stub for $ac_func
22528 #endif
22529
22530         return $ac_func ();
22531   ;
22532   return 0;
22533 }
22534 _ACEOF
22535 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22536 if { (eval echo "$as_me:22536: \"$ac_link\"") >&5
22537   (eval $ac_link) 2>&5
22538   ac_status=$?
22539   echo "$as_me:22539: \$? = $ac_status" >&5
22540   (exit "$ac_status"); } &&
22541          { ac_try='test -s "conftest$ac_exeext"'
22542   { (eval echo "$as_me:22542: \"$ac_try\"") >&5
22543   (eval $ac_try) 2>&5
22544   ac_status=$?
22545   echo "$as_me:22545: \$? = $ac_status" >&5
22546   (exit "$ac_status"); }; }; then
22547   eval "$as_ac_var=yes"
22548 else
22549   echo "$as_me: failed program was:" >&5
22550 cat "conftest.$ac_ext" >&5
22551 eval "$as_ac_var=no"
22552 fi
22553 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22554 fi
22555 echo "$as_me:22555: result: `eval echo '${'"$as_ac_var"'}'`" >&5
22556 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
22557 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
22558   cat >>confdefs.h <<EOF
22559 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22560 EOF
22561
22562 fi
22563 done
22564  }
22565 echo "$as_me:22565: checking if poll really works" >&5
22566 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
22567 if test "${cf_cv_working_poll+set}" = set; then
22568   echo $ECHO_N "(cached) $ECHO_C" >&6
22569 else
22570
22571 if test "$cross_compiling" = yes; then
22572   cf_cv_working_poll=unknown
22573 else
22574   cat >"conftest.$ac_ext" <<_ACEOF
22575 #line 22575 "configure"
22576 #include "confdefs.h"
22577
22578 #include <stdlib.h>
22579 #include <stdio.h>
22580 #include <unistd.h>
22581 #include <fcntl.h>
22582 #ifdef HAVE_POLL_H
22583 #include <poll.h>
22584 #else
22585 #include <sys/poll.h>
22586 #endif
22587 int main(void) {
22588         struct pollfd myfds;
22589         int ret;
22590
22591         /* check for Darwin bug with respect to "devices" */
22592         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
22593         if (myfds.fd < 0)
22594                 myfds.fd = 0;
22595         myfds.events = POLLIN;
22596         myfds.revents = 0;
22597
22598         ret = poll(&myfds, 1, 100);
22599
22600         if (ret < 0 || (myfds.revents & POLLNVAL)) {
22601                 ret = -1;
22602         } else {
22603                 int fd = 0;
22604                 if (!isatty(fd)) {
22605                         fd = open("/dev/tty", 2);       /* O_RDWR */
22606                 }
22607 #ifdef HAVE_POSIX_OPENPT
22608                 if (fd < 0) {
22609                         fd = posix_openpt(O_RDWR);
22610                 }
22611 #endif
22612
22613                 if (fd >= 0) {
22614                         /* also check with standard input */
22615                         myfds.fd = fd;
22616                         myfds.events = POLLIN;
22617                         myfds.revents = 0;
22618                         ret = poll(&myfds, 1, 100);
22619                 } else {
22620                         ret = -1;
22621                 }
22622         }
22623         ${cf_cv_main_return:-return}(ret < 0);
22624 }
22625 _ACEOF
22626 rm -f "conftest$ac_exeext"
22627 if { (eval echo "$as_me:22627: \"$ac_link\"") >&5
22628   (eval $ac_link) 2>&5
22629   ac_status=$?
22630   echo "$as_me:22630: \$? = $ac_status" >&5
22631   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22632   { (eval echo "$as_me:22632: \"$ac_try\"") >&5
22633   (eval $ac_try) 2>&5
22634   ac_status=$?
22635   echo "$as_me:22635: \$? = $ac_status" >&5
22636   (exit "$ac_status"); }; }; then
22637   cf_cv_working_poll=yes
22638 else
22639   echo "$as_me: program exited with status $ac_status" >&5
22640 echo "$as_me: failed program was:" >&5
22641 cat "conftest.$ac_ext" >&5
22642 cf_cv_working_poll=no
22643 fi
22644 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22645 fi
22646 fi
22647 echo "$as_me:22647: result: $cf_cv_working_poll" >&5
22648 echo "${ECHO_T}$cf_cv_working_poll" >&6
22649 test "$cf_cv_working_poll" = "yes" &&
22650 cat >>confdefs.h <<\EOF
22651 #define HAVE_WORKING_POLL 1
22652 EOF
22653
22654 echo "$as_me:22654: checking for va_copy" >&5
22655 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
22656 if test "${cf_cv_have_va_copy+set}" = set; then
22657   echo $ECHO_N "(cached) $ECHO_C" >&6
22658 else
22659
22660 cat >"conftest.$ac_ext" <<_ACEOF
22661 #line 22661 "configure"
22662 #include "confdefs.h"
22663
22664 #include <stdarg.h>
22665
22666 int
22667 main (void)
22668 {
22669
22670         static va_list dst;
22671         static va_list src;
22672         va_copy(dst, src)
22673   ;
22674   return 0;
22675 }
22676 _ACEOF
22677 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22678 if { (eval echo "$as_me:22678: \"$ac_link\"") >&5
22679   (eval $ac_link) 2>&5
22680   ac_status=$?
22681   echo "$as_me:22681: \$? = $ac_status" >&5
22682   (exit "$ac_status"); } &&
22683          { ac_try='test -s "conftest$ac_exeext"'
22684   { (eval echo "$as_me:22684: \"$ac_try\"") >&5
22685   (eval $ac_try) 2>&5
22686   ac_status=$?
22687   echo "$as_me:22687: \$? = $ac_status" >&5
22688   (exit "$ac_status"); }; }; then
22689   cf_cv_have_va_copy=yes
22690 else
22691   echo "$as_me: failed program was:" >&5
22692 cat "conftest.$ac_ext" >&5
22693 cf_cv_have_va_copy=no
22694 fi
22695 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22696 fi
22697 echo "$as_me:22697: result: $cf_cv_have_va_copy" >&5
22698 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
22699
22700 if test "$cf_cv_have_va_copy" = yes;
22701 then
22702
22703 cat >>confdefs.h <<\EOF
22704 #define HAVE_VA_COPY 1
22705 EOF
22706
22707 else # !cf_cv_have_va_copy
22708
22709 echo "$as_me:22709: checking for __va_copy" >&5
22710 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
22711 if test "${cf_cv_have___va_copy+set}" = set; then
22712   echo $ECHO_N "(cached) $ECHO_C" >&6
22713 else
22714
22715 cat >"conftest.$ac_ext" <<_ACEOF
22716 #line 22716 "configure"
22717 #include "confdefs.h"
22718
22719 #include <stdarg.h>
22720
22721 int
22722 main (void)
22723 {
22724
22725         static va_list dst;
22726         static va_list src;
22727         __va_copy(dst, src)
22728   ;
22729   return 0;
22730 }
22731 _ACEOF
22732 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22733 if { (eval echo "$as_me:22733: \"$ac_link\"") >&5
22734   (eval $ac_link) 2>&5
22735   ac_status=$?
22736   echo "$as_me:22736: \$? = $ac_status" >&5
22737   (exit "$ac_status"); } &&
22738          { ac_try='test -s "conftest$ac_exeext"'
22739   { (eval echo "$as_me:22739: \"$ac_try\"") >&5
22740   (eval $ac_try) 2>&5
22741   ac_status=$?
22742   echo "$as_me:22742: \$? = $ac_status" >&5
22743   (exit "$ac_status"); }; }; then
22744   cf_cv_have___va_copy=yes
22745 else
22746   echo "$as_me: failed program was:" >&5
22747 cat "conftest.$ac_ext" >&5
22748 cf_cv_have___va_copy=no
22749 fi
22750 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22751 fi
22752 echo "$as_me:22752: result: $cf_cv_have___va_copy" >&5
22753 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
22754
22755 if test "$cf_cv_have___va_copy" = yes
22756 then
22757
22758 cat >>confdefs.h <<\EOF
22759 #define HAVE___VA_COPY 1
22760 EOF
22761
22762 else # !cf_cv_have___va_copy
22763
22764 echo "$as_me:22764: checking for __builtin_va_copy" >&5
22765 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
22766 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
22767   echo $ECHO_N "(cached) $ECHO_C" >&6
22768 else
22769
22770 cat >"conftest.$ac_ext" <<_ACEOF
22771 #line 22771 "configure"
22772 #include "confdefs.h"
22773
22774 #include <stdarg.h>
22775
22776 int
22777 main (void)
22778 {
22779
22780         static va_list dst;
22781         static va_list src;
22782         __builtin_va_copy(dst, src)
22783   ;
22784   return 0;
22785 }
22786 _ACEOF
22787 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22788 if { (eval echo "$as_me:22788: \"$ac_link\"") >&5
22789   (eval $ac_link) 2>&5
22790   ac_status=$?
22791   echo "$as_me:22791: \$? = $ac_status" >&5
22792   (exit "$ac_status"); } &&
22793          { ac_try='test -s "conftest$ac_exeext"'
22794   { (eval echo "$as_me:22794: \"$ac_try\"") >&5
22795   (eval $ac_try) 2>&5
22796   ac_status=$?
22797   echo "$as_me:22797: \$? = $ac_status" >&5
22798   (exit "$ac_status"); }; }; then
22799   cf_cv_have___builtin_va_copy=yes
22800 else
22801   echo "$as_me: failed program was:" >&5
22802 cat "conftest.$ac_ext" >&5
22803 cf_cv_have___builtin_va_copy=no
22804 fi
22805 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22806 fi
22807 echo "$as_me:22807: result: $cf_cv_have___builtin_va_copy" >&5
22808 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
22809
22810 test "$cf_cv_have___builtin_va_copy" = yes &&
22811
22812 cat >>confdefs.h <<\EOF
22813 #define HAVE___BUILTIN_VA_COPY 1
22814 EOF
22815
22816 fi # cf_cv_have___va_copy
22817
22818 fi # cf_cv_have_va_copy
22819
22820 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
22821 (*yes*)
22822         ;;
22823
22824 (*)
22825         echo "$as_me:22825: checking if we can simply copy va_list" >&5
22826 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
22827 if test "${cf_cv_pointer_va_list+set}" = set; then
22828   echo $ECHO_N "(cached) $ECHO_C" >&6
22829 else
22830
22831 cat >"conftest.$ac_ext" <<_ACEOF
22832 #line 22832 "configure"
22833 #include "confdefs.h"
22834
22835 #include <stdarg.h>
22836
22837 int
22838 main (void)
22839 {
22840
22841         va_list dst;
22842         va_list src;
22843         dst = src
22844   ;
22845   return 0;
22846 }
22847 _ACEOF
22848 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22849 if { (eval echo "$as_me:22849: \"$ac_link\"") >&5
22850   (eval $ac_link) 2>&5
22851   ac_status=$?
22852   echo "$as_me:22852: \$? = $ac_status" >&5
22853   (exit "$ac_status"); } &&
22854          { ac_try='test -s "conftest$ac_exeext"'
22855   { (eval echo "$as_me:22855: \"$ac_try\"") >&5
22856   (eval $ac_try) 2>&5
22857   ac_status=$?
22858   echo "$as_me:22858: \$? = $ac_status" >&5
22859   (exit "$ac_status"); }; }; then
22860   cf_cv_pointer_va_list=yes
22861 else
22862   echo "$as_me: failed program was:" >&5
22863 cat "conftest.$ac_ext" >&5
22864 cf_cv_pointer_va_list=no
22865 fi
22866 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22867 fi
22868 echo "$as_me:22868: result: $cf_cv_pointer_va_list" >&5
22869 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
22870
22871         if test "$cf_cv_pointer_va_list" = no
22872         then
22873                 echo "$as_me:22873: checking if we can copy va_list indirectly" >&5
22874 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
22875 if test "${cf_cv_array_va_list+set}" = set; then
22876   echo $ECHO_N "(cached) $ECHO_C" >&6
22877 else
22878
22879 cat >"conftest.$ac_ext" <<_ACEOF
22880 #line 22880 "configure"
22881 #include "confdefs.h"
22882
22883 #include <stdarg.h>
22884
22885 int
22886 main (void)
22887 {
22888
22889         va_list dst;
22890         va_list src;
22891         *dst = *src
22892   ;
22893   return 0;
22894 }
22895 _ACEOF
22896 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22897 if { (eval echo "$as_me:22897: \"$ac_link\"") >&5
22898   (eval $ac_link) 2>&5
22899   ac_status=$?
22900   echo "$as_me:22900: \$? = $ac_status" >&5
22901   (exit "$ac_status"); } &&
22902          { ac_try='test -s "conftest$ac_exeext"'
22903   { (eval echo "$as_me:22903: \"$ac_try\"") >&5
22904   (eval $ac_try) 2>&5
22905   ac_status=$?
22906   echo "$as_me:22906: \$? = $ac_status" >&5
22907   (exit "$ac_status"); }; }; then
22908   cf_cv_array_va_list=yes
22909 else
22910   echo "$as_me: failed program was:" >&5
22911 cat "conftest.$ac_ext" >&5
22912 cf_cv_array_va_list=no
22913 fi
22914 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22915 fi
22916 echo "$as_me:22916: result: $cf_cv_array_va_list" >&5
22917 echo "${ECHO_T}$cf_cv_array_va_list" >&6
22918                 test "$cf_cv_array_va_list" = yes &&
22919 cat >>confdefs.h <<\EOF
22920 #define ARRAY_VA_LIST 1
22921 EOF
22922
22923         fi
22924         ;;
22925 esac
22926
22927 echo "$as_me:22927: checking for pid_t" >&5
22928 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
22929 if test "${ac_cv_type_pid_t+set}" = set; then
22930   echo $ECHO_N "(cached) $ECHO_C" >&6
22931 else
22932   cat >"conftest.$ac_ext" <<_ACEOF
22933 #line 22933 "configure"
22934 #include "confdefs.h"
22935 $ac_includes_default
22936 int
22937 main (void)
22938 {
22939 if ((pid_t *) 0)
22940   return 0;
22941 if (sizeof (pid_t))
22942   return 0;
22943   ;
22944   return 0;
22945 }
22946 _ACEOF
22947 rm -f "conftest.$ac_objext"
22948 if { (eval echo "$as_me:22948: \"$ac_compile\"") >&5
22949   (eval $ac_compile) 2>&5
22950   ac_status=$?
22951   echo "$as_me:22951: \$? = $ac_status" >&5
22952   (exit "$ac_status"); } &&
22953          { ac_try='test -s "conftest.$ac_objext"'
22954   { (eval echo "$as_me:22954: \"$ac_try\"") >&5
22955   (eval $ac_try) 2>&5
22956   ac_status=$?
22957   echo "$as_me:22957: \$? = $ac_status" >&5
22958   (exit "$ac_status"); }; }; then
22959   ac_cv_type_pid_t=yes
22960 else
22961   echo "$as_me: failed program was:" >&5
22962 cat "conftest.$ac_ext" >&5
22963 ac_cv_type_pid_t=no
22964 fi
22965 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22966 fi
22967 echo "$as_me:22967: result: $ac_cv_type_pid_t" >&5
22968 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
22969 if test "$ac_cv_type_pid_t" = yes; then
22970   :
22971 else
22972
22973 cat >>confdefs.h <<EOF
22974 #define pid_t int
22975 EOF
22976
22977 fi
22978
22979 for ac_header in unistd.h vfork.h
22980 do
22981 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22982 echo "$as_me:22982: checking for $ac_header" >&5
22983 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22984 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22985   echo $ECHO_N "(cached) $ECHO_C" >&6
22986 else
22987   cat >"conftest.$ac_ext" <<_ACEOF
22988 #line 22988 "configure"
22989 #include "confdefs.h"
22990 #include <$ac_header>
22991 _ACEOF
22992 if { (eval echo "$as_me:22992: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22993   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22994   ac_status=$?
22995   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22996   rm -f conftest.er1
22997   cat conftest.err >&5
22998   echo "$as_me:22998: \$? = $ac_status" >&5
22999   (exit "$ac_status"); } >/dev/null; then
23000   if test -s conftest.err; then
23001     ac_cpp_err=$ac_c_preproc_warn_flag
23002   else
23003     ac_cpp_err=
23004   fi
23005 else
23006   ac_cpp_err=yes
23007 fi
23008 if test -z "$ac_cpp_err"; then
23009   eval "$as_ac_Header=yes"
23010 else
23011   echo "$as_me: failed program was:" >&5
23012   cat "conftest.$ac_ext" >&5
23013   eval "$as_ac_Header=no"
23014 fi
23015 rm -f conftest.err "conftest.$ac_ext"
23016 fi
23017 echo "$as_me:23017: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23018 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23019 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23020   cat >>confdefs.h <<EOF
23021 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23022 EOF
23023
23024 fi
23025 done
23026
23027 for ac_func in fork vfork
23028 do
23029 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23030 echo "$as_me:23030: checking for $ac_func" >&5
23031 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23032 if eval "test \"\${$as_ac_var+set}\" = set"; then
23033   echo $ECHO_N "(cached) $ECHO_C" >&6
23034 else
23035   cat >"conftest.$ac_ext" <<_ACEOF
23036 #line 23036 "configure"
23037 #include "confdefs.h"
23038 #define $ac_func autoconf_temporary
23039 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23040 #undef $ac_func
23041
23042 #ifdef __cplusplus
23043 extern "C"
23044 #endif
23045
23046 /* We use char because int might match the return type of a gcc2
23047    builtin and then its argument prototype would still apply.  */
23048 char $ac_func (void);
23049
23050 int
23051 main (void)
23052 {
23053
23054 /* The GNU C library defines stubs for functions which it implements
23055     to always fail with ENOSYS.  Some functions are actually named
23056     something starting with __ and the normal name is an alias.  */
23057 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23058 #error found stub for $ac_func
23059 #endif
23060
23061         return $ac_func ();
23062   ;
23063   return 0;
23064 }
23065 _ACEOF
23066 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23067 if { (eval echo "$as_me:23067: \"$ac_link\"") >&5
23068   (eval $ac_link) 2>&5
23069   ac_status=$?
23070   echo "$as_me:23070: \$? = $ac_status" >&5
23071   (exit "$ac_status"); } &&
23072          { ac_try='test -s "conftest$ac_exeext"'
23073   { (eval echo "$as_me:23073: \"$ac_try\"") >&5
23074   (eval $ac_try) 2>&5
23075   ac_status=$?
23076   echo "$as_me:23076: \$? = $ac_status" >&5
23077   (exit "$ac_status"); }; }; then
23078   eval "$as_ac_var=yes"
23079 else
23080   echo "$as_me: failed program was:" >&5
23081 cat "conftest.$ac_ext" >&5
23082 eval "$as_ac_var=no"
23083 fi
23084 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23085 fi
23086 echo "$as_me:23086: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23087 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23088 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23089   cat >>confdefs.h <<EOF
23090 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23091 EOF
23092
23093 fi
23094 done
23095
23096 ac_cv_func_fork_works=$ac_cv_func_fork
23097 if test "x$ac_cv_func_fork" = xyes; then
23098   echo "$as_me:23098: checking for working fork" >&5
23099 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23100 if test "${ac_cv_func_fork_works+set}" = set; then
23101   echo $ECHO_N "(cached) $ECHO_C" >&6
23102 else
23103   if test "$cross_compiling" = yes; then
23104   ac_cv_func_fork_works=cross
23105 else
23106   cat >"conftest.$ac_ext" <<_ACEOF
23107 /* By Rüdiger Kuhlmann. */
23108       #include <sys/types.h>
23109       #if HAVE_UNISTD_H
23110       # include <unistd.h>
23111       #endif
23112       /* Some systems only have a dummy stub for fork() */
23113       int main (void)
23114       {
23115         if (fork() < 0)
23116           $ac_main_return (1);
23117         $ac_main_return (0);
23118       }
23119 _ACEOF
23120 rm -f "conftest$ac_exeext"
23121 if { (eval echo "$as_me:23121: \"$ac_link\"") >&5
23122   (eval $ac_link) 2>&5
23123   ac_status=$?
23124   echo "$as_me:23124: \$? = $ac_status" >&5
23125   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23126   { (eval echo "$as_me:23126: \"$ac_try\"") >&5
23127   (eval $ac_try) 2>&5
23128   ac_status=$?
23129   echo "$as_me:23129: \$? = $ac_status" >&5
23130   (exit "$ac_status"); }; }; then
23131   ac_cv_func_fork_works=yes
23132 else
23133   echo "$as_me: program exited with status $ac_status" >&5
23134 echo "$as_me: failed program was:" >&5
23135 cat "conftest.$ac_ext" >&5
23136 ac_cv_func_fork_works=no
23137 fi
23138 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23139 fi
23140 fi
23141 echo "$as_me:23141: result: $ac_cv_func_fork_works" >&5
23142 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
23143
23144 fi
23145 if test "x$ac_cv_func_fork_works" = xcross; then
23146   case $host in
23147     *-*-amigaos* | *-*-msdosdjgpp*)
23148       # Override, as these systems have only a dummy fork() stub
23149       ac_cv_func_fork_works=no
23150       ;;
23151     *)
23152       ac_cv_func_fork_works=yes
23153       ;;
23154   esac
23155   { echo "$as_me:23155: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
23156 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
23157 fi
23158 ac_cv_func_vfork_works=$ac_cv_func_vfork
23159 if test "x$ac_cv_func_vfork" = xyes; then
23160   echo "$as_me:23160: checking for working vfork" >&5
23161 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
23162 if test "${ac_cv_func_vfork_works+set}" = set; then
23163   echo $ECHO_N "(cached) $ECHO_C" >&6
23164 else
23165   if test "$cross_compiling" = yes; then
23166   ac_cv_func_vfork_works=cross
23167 else
23168   cat >"conftest.$ac_ext" <<_ACEOF
23169 #line 23169 "configure"
23170 #include "confdefs.h"
23171 /* Thanks to Paul Eggert for this test.  */
23172 #include <stdio.h>
23173 #include <sys/types.h>
23174 #include <sys/stat.h>
23175 #if HAVE_UNISTD_H
23176 # include <unistd.h>
23177 #endif
23178 #if HAVE_VFORK_H
23179 # include <vfork.h>
23180 #endif
23181 /* On some sparc systems, changes by the child to local and incoming
23182    argument registers are propagated back to the parent.  The compiler
23183    is told about this with #include <vfork.h>, but some compilers
23184    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
23185    static variable whose address is put into a register that is
23186    clobbered by the vfork.  */
23187 static
23188 #ifdef __cplusplus
23189 sparc_address_test (int arg)
23190 # else
23191 sparc_address_test (arg) int arg;
23192 #endif
23193 {
23194   static pid_t child;
23195   if (!child) {
23196     child = vfork ();
23197     if (child < 0) {
23198       perror ("vfork");
23199       _exit(2);
23200     }
23201     if (!child) {
23202       arg = getpid();
23203       write(-1, "", 0);
23204       _exit (arg);
23205     }
23206   }
23207 }
23208
23209 int
23210 main (void)
23211 {
23212   pid_t parent = getpid ();
23213   pid_t child;
23214
23215   sparc_address_test ();
23216
23217   child = vfork ();
23218
23219   if (child == 0) {
23220     /* Here is another test for sparc vfork register problems.  This
23221        test uses lots of local variables, at least as many local
23222        variables as main has allocated so far including compiler
23223        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
23224        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
23225        reuse the register of parent for one of the local variables,
23226        since it will think that parent can't possibly be used any more
23227        in this routine.  Assigning to the local variable will thus
23228        munge parent in the parent process.  */
23229     pid_t
23230       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23231       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23232     /* Convince the compiler that p..p7 are live; otherwise, it might
23233        use the same hardware register for all 8 local variables.  */
23234     if (p != p1 || p != p2 || p != p3 || p != p4
23235         || p != p5 || p != p6 || p != p7)
23236       _exit(1);
23237
23238     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23239        from child file descriptors.  If the child closes a descriptor
23240        before it execs or exits, this munges the parent's descriptor
23241        as well.  Test for this by closing stdout in the child.  */
23242     _exit(close(fileno(stdout)) != 0);
23243   } else {
23244     int status;
23245     struct stat st;
23246
23247     while (wait(&status) != child)
23248       ;
23249     $ac_main_return(
23250          /* Was there some problem with vforking?  */
23251          child < 0
23252
23253          /* Did the child fail?  (This shouldn't happen.)  */
23254          || status
23255
23256          /* Did the vfork/compiler bug occur?  */
23257          || parent != getpid()
23258
23259          /* Did the file descriptor bug occur?  */
23260          || fstat(fileno(stdout), &st) != 0
23261          );
23262   }
23263 }
23264 _ACEOF
23265 rm -f "conftest$ac_exeext"
23266 if { (eval echo "$as_me:23266: \"$ac_link\"") >&5
23267   (eval $ac_link) 2>&5
23268   ac_status=$?
23269   echo "$as_me:23269: \$? = $ac_status" >&5
23270   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23271   { (eval echo "$as_me:23271: \"$ac_try\"") >&5
23272   (eval $ac_try) 2>&5
23273   ac_status=$?
23274   echo "$as_me:23274: \$? = $ac_status" >&5
23275   (exit "$ac_status"); }; }; then
23276   ac_cv_func_vfork_works=yes
23277 else
23278   echo "$as_me: program exited with status $ac_status" >&5
23279 echo "$as_me: failed program was:" >&5
23280 cat "conftest.$ac_ext" >&5
23281 ac_cv_func_vfork_works=no
23282 fi
23283 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23284 fi
23285 fi
23286 echo "$as_me:23286: result: $ac_cv_func_vfork_works" >&5
23287 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
23288
23289 fi;
23290 if test "x$ac_cv_func_fork_works" = xcross; then
23291   ac_cv_func_vfork_works=ac_cv_func_vfork
23292   { echo "$as_me:23292: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
23293 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
23294 fi
23295
23296 if test "x$ac_cv_func_vfork_works" = xyes; then
23297
23298 cat >>confdefs.h <<\EOF
23299 #define HAVE_WORKING_VFORK 1
23300 EOF
23301
23302 else
23303
23304 cat >>confdefs.h <<\EOF
23305 #define vfork fork
23306 EOF
23307
23308 fi
23309 if test "x$ac_cv_func_fork_works" = xyes; then
23310
23311 cat >>confdefs.h <<\EOF
23312 #define HAVE_WORKING_FORK 1
23313 EOF
23314
23315 fi
23316
23317 echo "$as_me:23317: checking if fopen accepts explicit binary mode" >&5
23318 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
23319 if test "${cf_cv_fopen_bin_r+set}" = set; then
23320   echo $ECHO_N "(cached) $ECHO_C" >&6
23321 else
23322
23323         if test "$cross_compiling" = yes; then
23324   cf_cv_fopen_bin_r=unknown
23325 else
23326   cat >"conftest.$ac_ext" <<_ACEOF
23327 #line 23327 "configure"
23328 #include "confdefs.h"
23329
23330 #include <stdio.h>
23331 int main(void) {
23332         FILE *fp = fopen("conftest.tmp", "wb");
23333         int rc = 0;
23334         if (fp != 0) {
23335                 int p, q;
23336                 for (p = 0; p < 256; ++p) {
23337                         fputc(p, fp);
23338                 }
23339                 fclose(fp);
23340                 fp = fopen("conftest.tmp", "rb");
23341                 if (fp != 0) {
23342                         for (p = 0; p < 256; ++p) {
23343                                 q = fgetc(fp);
23344                                 if (q != p) {
23345                                         rc = 1;
23346                                         break;
23347                                 }
23348                         }
23349                 } else {
23350                         rc = 1;
23351                 }
23352         } else {
23353                 rc = 1;
23354         }
23355         ${cf_cv_main_return:-return} (rc);
23356 }
23357
23358 _ACEOF
23359 rm -f "conftest$ac_exeext"
23360 if { (eval echo "$as_me:23360: \"$ac_link\"") >&5
23361   (eval $ac_link) 2>&5
23362   ac_status=$?
23363   echo "$as_me:23363: \$? = $ac_status" >&5
23364   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23365   { (eval echo "$as_me:23365: \"$ac_try\"") >&5
23366   (eval $ac_try) 2>&5
23367   ac_status=$?
23368   echo "$as_me:23368: \$? = $ac_status" >&5
23369   (exit "$ac_status"); }; }; then
23370   cf_cv_fopen_bin_r=yes
23371 else
23372   echo "$as_me: program exited with status $ac_status" >&5
23373 echo "$as_me: failed program was:" >&5
23374 cat "conftest.$ac_ext" >&5
23375 cf_cv_fopen_bin_r=no
23376 fi
23377 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23378 fi
23379
23380 fi
23381 echo "$as_me:23381: result: $cf_cv_fopen_bin_r" >&5
23382 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
23383 test "x$cf_cv_fopen_bin_r" != xno &&
23384 cat >>confdefs.h <<\EOF
23385 #define USE_FOPEN_BIN_R 1
23386 EOF
23387
23388 # special check for test/ditto.c
23389
23390 echo "$as_me:23390: checking for openpty in -lutil" >&5
23391 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
23392 if test "${ac_cv_lib_util_openpty+set}" = set; then
23393   echo $ECHO_N "(cached) $ECHO_C" >&6
23394 else
23395   ac_check_lib_save_LIBS=$LIBS
23396 LIBS="-lutil  $LIBS"
23397 cat >"conftest.$ac_ext" <<_ACEOF
23398 #line 23398 "configure"
23399 #include "confdefs.h"
23400
23401 /* Override any gcc2 internal prototype to avoid an error.  */
23402 #ifdef __cplusplus
23403 extern "C"
23404 #endif
23405 /* We use char because int might match the return type of a gcc2
23406    builtin and then its argument prototype would still apply.  */
23407 char openpty ();
23408 int
23409 main (void)
23410 {
23411 openpty ();
23412   ;
23413   return 0;
23414 }
23415 _ACEOF
23416 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23417 if { (eval echo "$as_me:23417: \"$ac_link\"") >&5
23418   (eval $ac_link) 2>&5
23419   ac_status=$?
23420   echo "$as_me:23420: \$? = $ac_status" >&5
23421   (exit "$ac_status"); } &&
23422          { ac_try='test -s "conftest$ac_exeext"'
23423   { (eval echo "$as_me:23423: \"$ac_try\"") >&5
23424   (eval $ac_try) 2>&5
23425   ac_status=$?
23426   echo "$as_me:23426: \$? = $ac_status" >&5
23427   (exit "$ac_status"); }; }; then
23428   ac_cv_lib_util_openpty=yes
23429 else
23430   echo "$as_me: failed program was:" >&5
23431 cat "conftest.$ac_ext" >&5
23432 ac_cv_lib_util_openpty=no
23433 fi
23434 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23435 LIBS=$ac_check_lib_save_LIBS
23436 fi
23437 echo "$as_me:23437: result: $ac_cv_lib_util_openpty" >&5
23438 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
23439 if test "$ac_cv_lib_util_openpty" = yes; then
23440   cf_cv_lib_util=yes
23441 else
23442   cf_cv_lib_util=no
23443 fi
23444
23445 echo "$as_me:23445: checking for openpty header" >&5
23446 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
23447 if test "${cf_cv_func_openpty+set}" = set; then
23448   echo $ECHO_N "(cached) $ECHO_C" >&6
23449 else
23450
23451         cf_save_LIBS="$LIBS"
23452         test "$cf_cv_lib_util" = yes && {
23453 cf_add_libs="$LIBS"
23454 # reverse order
23455 cf_add_0lib=
23456 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23457 # filter duplicates
23458 for cf_add_1lib in $cf_add_0lib; do
23459         for cf_add_2lib in $cf_add_libs; do
23460                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23461                         cf_add_1lib=
23462                         break
23463                 fi
23464         done
23465         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23466 done
23467 LIBS="$cf_add_libs"
23468  }
23469         for cf_header in pty.h libutil.h util.h
23470         do
23471         cat >"conftest.$ac_ext" <<_ACEOF
23472 #line 23472 "configure"
23473 #include "confdefs.h"
23474
23475 #include <$cf_header>
23476
23477 int
23478 main (void)
23479 {
23480
23481         int x = openpty((int *)0, (int *)0, (char *)0,
23482                                    (struct termios *)0, (struct winsize *)0);
23483
23484   ;
23485   return 0;
23486 }
23487 _ACEOF
23488 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23489 if { (eval echo "$as_me:23489: \"$ac_link\"") >&5
23490   (eval $ac_link) 2>&5
23491   ac_status=$?
23492   echo "$as_me:23492: \$? = $ac_status" >&5
23493   (exit "$ac_status"); } &&
23494          { ac_try='test -s "conftest$ac_exeext"'
23495   { (eval echo "$as_me:23495: \"$ac_try\"") >&5
23496   (eval $ac_try) 2>&5
23497   ac_status=$?
23498   echo "$as_me:23498: \$? = $ac_status" >&5
23499   (exit "$ac_status"); }; }; then
23500
23501                 cf_cv_func_openpty=$cf_header
23502                 break
23503
23504 else
23505   echo "$as_me: failed program was:" >&5
23506 cat "conftest.$ac_ext" >&5
23507
23508                 cf_cv_func_openpty=no
23509
23510 fi
23511 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23512         done
23513         LIBS="$cf_save_LIBS"
23514
23515 fi
23516 echo "$as_me:23516: result: $cf_cv_func_openpty" >&5
23517 echo "${ECHO_T}$cf_cv_func_openpty" >&6
23518
23519 if test "$cf_cv_func_openpty" != no ; then
23520
23521 cat >>confdefs.h <<EOF
23522 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
23523 EOF
23524
23525 cat >>confdefs.h <<\EOF
23526 #define USE_XTERM_PTY 1
23527 EOF
23528
23529         if test "x$cf_cv_lib_util" = xyes ; then
23530
23531 cf_add_libs="$TEST_LIBS"
23532 # reverse order
23533 cf_add_0lib=
23534 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23535 # filter duplicates
23536 for cf_add_1lib in $cf_add_0lib; do
23537         for cf_add_2lib in $cf_add_libs; do
23538                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23539                         cf_add_1lib=
23540                         break
23541                 fi
23542         done
23543         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23544 done
23545 TEST_LIBS="$cf_add_libs"
23546
23547         fi
23548 fi
23549
23550 if test "$with_hashed_db" != no ; then
23551
23552 cat >>confdefs.h <<\EOF
23553 #define USE_HASHED_DB 1
23554 EOF
23555
23556 case $with_hashed_db in
23557 (yes|*able*)
23558         ;;
23559 (*)
23560         if test -d "$with_hashed_db" ; then
23561
23562 if test -n "$with_hashed_db/include" ; then
23563   for cf_add_incdir in $with_hashed_db/include
23564   do
23565         while test "$cf_add_incdir" != /usr/include
23566         do
23567           if test -d "$cf_add_incdir"
23568           then
23569                 cf_have_incdir=no
23570                 if test -n "$CFLAGS$CPPFLAGS" ; then
23571                   # a loop is needed to ensure we can add subdirs of existing dirs
23572                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23573                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23574                           cf_have_incdir=yes; break
23575                         fi
23576                   done
23577                 fi
23578
23579                 if test "$cf_have_incdir" = no ; then
23580                   if test "$cf_add_incdir" = /usr/local/include ; then
23581                         if test "$GCC" = yes
23582                         then
23583                           cf_save_CPPFLAGS=$CPPFLAGS
23584
23585         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23586         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23587
23588                           cat >"conftest.$ac_ext" <<_ACEOF
23589 #line 23589 "configure"
23590 #include "confdefs.h"
23591 #include <stdio.h>
23592 int
23593 main (void)
23594 {
23595 printf("Hello")
23596   ;
23597   return 0;
23598 }
23599 _ACEOF
23600 rm -f "conftest.$ac_objext"
23601 if { (eval echo "$as_me:23601: \"$ac_compile\"") >&5
23602   (eval $ac_compile) 2>&5
23603   ac_status=$?
23604   echo "$as_me:23604: \$? = $ac_status" >&5
23605   (exit "$ac_status"); } &&
23606          { ac_try='test -s "conftest.$ac_objext"'
23607   { (eval echo "$as_me:23607: \"$ac_try\"") >&5
23608   (eval $ac_try) 2>&5
23609   ac_status=$?
23610   echo "$as_me:23610: \$? = $ac_status" >&5
23611   (exit "$ac_status"); }; }; then
23612   :
23613 else
23614   echo "$as_me: failed program was:" >&5
23615 cat "conftest.$ac_ext" >&5
23616 cf_have_incdir=yes
23617 fi
23618 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23619                           CPPFLAGS=$cf_save_CPPFLAGS
23620                         fi
23621                   fi
23622                 fi
23623
23624                 if test "$cf_have_incdir" = no ; then
23625                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
23626
23627 echo "${as_me:-configure}:23627: testing adding $cf_add_incdir to include-path ..." 1>&5
23628
23629                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
23630
23631                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
23632                   test "$cf_top_incdir" = "$cf_add_incdir" && break
23633                   cf_add_incdir="$cf_top_incdir"
23634                 else
23635                   break
23636                 fi
23637           else
23638                 break
23639           fi
23640         done
23641   done
23642 fi
23643
23644 if test -n "$with_hashed_db/lib" ; then
23645         for cf_add_libdir in $with_hashed_db/lib
23646         do
23647                 if test "$cf_add_libdir" = /usr/lib ; then
23648                         :
23649                 elif test -d "$cf_add_libdir"
23650                 then
23651                         cf_have_libdir=no
23652                         if test -n "$LDFLAGS$LIBS" ; then
23653                                 # a loop is needed to ensure we can add subdirs of existing dirs
23654                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
23655                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
23656                                                 cf_have_libdir=yes; break
23657                                         fi
23658                                 done
23659                         fi
23660                         if test "$cf_have_libdir" = no ; then
23661                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
23662
23663 echo "${as_me:-configure}:23663: testing adding $cf_add_libdir to library-path ..." 1>&5
23664
23665                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
23666                         fi
23667                 fi
23668         done
23669 fi
23670
23671         else
23672                 case "$with_hashed_db" in
23673                 (./*|../*|/*)
23674                         { echo "$as_me:23674: WARNING: no such directory $with_hashed_db" >&5
23675 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
23676                         ;;
23677                 (*)
23678
23679 cf_search=
23680
23681 test "x$prefix" != "xNONE" && \
23682 test -d "$prefix" && \
23683  {
23684         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
23685         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
23686         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
23687         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
23688         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
23689         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
23690 }
23691
23692 for cf_subdir_prefix in \
23693         /usr \
23694         /usr/local \
23695         /usr/pkg \
23696         /opt \
23697         /opt/local \
23698         $HOME
23699 do
23700
23701 test "x$cf_subdir_prefix" != "x$prefix" && \
23702 test -d "$cf_subdir_prefix" && \
23703 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
23704         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
23705         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
23706         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
23707         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
23708         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
23709         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"
23710 }
23711
23712 done
23713
23714         for cf_item in $cf_search
23715         do
23716                 case "$cf_item" in
23717                 (*/$with_hashed_db)
23718
23719 if test -n "$cf_item" ; then
23720   for cf_add_incdir in $cf_item
23721   do
23722         while test "$cf_add_incdir" != /usr/include
23723         do
23724           if test -d "$cf_add_incdir"
23725           then
23726                 cf_have_incdir=no
23727                 if test -n "$CFLAGS$CPPFLAGS" ; then
23728                   # a loop is needed to ensure we can add subdirs of existing dirs
23729                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23730                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23731                           cf_have_incdir=yes; break
23732                         fi
23733                   done
23734                 fi
23735
23736                 if test "$cf_have_incdir" = no ; then
23737                   if test "$cf_add_incdir" = /usr/local/include ; then
23738                         if test "$GCC" = yes
23739                         then
23740                           cf_save_CPPFLAGS=$CPPFLAGS
23741
23742         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23743         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23744
23745                           cat >"conftest.$ac_ext" <<_ACEOF
23746 #line 23746 "configure"
23747 #include "confdefs.h"
23748 #include <stdio.h>
23749 int
23750 main (void)
23751 {
23752 printf("Hello")
23753   ;
23754   return 0;
23755 }
23756 _ACEOF
23757 rm -f "conftest.$ac_objext"
23758 if { (eval echo "$as_me:23758: \"$ac_compile\"") >&5
23759   (eval $ac_compile) 2>&5
23760   ac_status=$?
23761   echo "$as_me:23761: \$? = $ac_status" >&5
23762   (exit "$ac_status"); } &&
23763          { ac_try='test -s "conftest.$ac_objext"'
23764   { (eval echo "$as_me:23764: \"$ac_try\"") >&5
23765   (eval $ac_try) 2>&5
23766   ac_status=$?
23767   echo "$as_me:23767: \$? = $ac_status" >&5
23768   (exit "$ac_status"); }; }; then
23769   :
23770 else
23771   echo "$as_me: failed program was:" >&5
23772 cat "conftest.$ac_ext" >&5
23773 cf_have_incdir=yes
23774 fi
23775 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23776                           CPPFLAGS=$cf_save_CPPFLAGS
23777                         fi
23778                   fi
23779                 fi
23780
23781                 if test "$cf_have_incdir" = no ; then
23782                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
23783
23784 echo "${as_me:-configure}:23784: testing adding $cf_add_incdir to include-path ..." 1>&5
23785
23786                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
23787
23788                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
23789                   test "$cf_top_incdir" = "$cf_add_incdir" && break
23790                   cf_add_incdir="$cf_top_incdir"
23791                 else
23792                   break
23793                 fi
23794           else
23795                 break
23796           fi
23797         done
23798   done
23799 fi
23800
23801                         ;;
23802                 esac
23803         done
23804
23805 cf_search=
23806
23807 test "x$prefix" != "xNONE" && \
23808 test -d "$prefix" && \
23809  {
23810         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
23811         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
23812         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
23813         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
23814         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
23815         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
23816 }
23817
23818 for cf_subdir_prefix in \
23819         /usr \
23820         /usr/local \
23821         /usr/pkg \
23822         /opt \
23823         /opt/local \
23824         $HOME
23825 do
23826
23827 test "x$cf_subdir_prefix" != "x$prefix" && \
23828 test -d "$cf_subdir_prefix" && \
23829 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
23830         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
23831         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
23832         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
23833         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
23834         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
23835         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"
23836 }
23837
23838 done
23839
23840         for cf_item in $cf_search
23841         do
23842                 case "$cf_item" in
23843                 (*/$with_hashed_db)
23844
23845 if test -n "$cf_item" ; then
23846         for cf_add_libdir in $cf_item
23847         do
23848                 if test "$cf_add_libdir" = /usr/lib ; then
23849                         :
23850                 elif test -d "$cf_add_libdir"
23851                 then
23852                         cf_have_libdir=no
23853                         if test -n "$LDFLAGS$LIBS" ; then
23854                                 # a loop is needed to ensure we can add subdirs of existing dirs
23855                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
23856                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
23857                                                 cf_have_libdir=yes; break
23858                                         fi
23859                                 done
23860                         fi
23861                         if test "$cf_have_libdir" = no ; then
23862                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
23863
23864 echo "${as_me:-configure}:23864: testing adding $cf_add_libdir to library-path ..." 1>&5
23865
23866                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
23867                         fi
23868                 fi
23869         done
23870 fi
23871
23872                         ;;
23873                 esac
23874         done
23875
23876                         ;;
23877                 esac
23878         fi
23879 esac
23880
23881 echo "$as_me:23881: checking for db.h" >&5
23882 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
23883 if test "${ac_cv_header_db_h+set}" = set; then
23884   echo $ECHO_N "(cached) $ECHO_C" >&6
23885 else
23886   cat >"conftest.$ac_ext" <<_ACEOF
23887 #line 23887 "configure"
23888 #include "confdefs.h"
23889 #include <db.h>
23890 _ACEOF
23891 if { (eval echo "$as_me:23891: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23892   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23893   ac_status=$?
23894   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23895   rm -f conftest.er1
23896   cat conftest.err >&5
23897   echo "$as_me:23897: \$? = $ac_status" >&5
23898   (exit "$ac_status"); } >/dev/null; then
23899   if test -s conftest.err; then
23900     ac_cpp_err=$ac_c_preproc_warn_flag
23901   else
23902     ac_cpp_err=
23903   fi
23904 else
23905   ac_cpp_err=yes
23906 fi
23907 if test -z "$ac_cpp_err"; then
23908   ac_cv_header_db_h=yes
23909 else
23910   echo "$as_me: failed program was:" >&5
23911   cat "conftest.$ac_ext" >&5
23912   ac_cv_header_db_h=no
23913 fi
23914 rm -f conftest.err "conftest.$ac_ext"
23915 fi
23916 echo "$as_me:23916: result: $ac_cv_header_db_h" >&5
23917 echo "${ECHO_T}$ac_cv_header_db_h" >&6
23918 if test "$ac_cv_header_db_h" = yes; then
23919
23920 echo "$as_me:23920: checking for version of db" >&5
23921 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
23922 if test "${cf_cv_hashed_db_version+set}" = set; then
23923   echo $ECHO_N "(cached) $ECHO_C" >&6
23924 else
23925
23926 cf_cv_hashed_db_version=unknown
23927
23928 for cf_db_version in 1 2 3 4 5 6
23929 do
23930
23931 echo "${as_me:-configure}:23931: testing checking for db version $cf_db_version ..." 1>&5
23932
23933         cat >"conftest.$ac_ext" <<_ACEOF
23934 #line 23934 "configure"
23935 #include "confdefs.h"
23936
23937 $ac_includes_default
23938 #include <db.h>
23939
23940 #ifdef DB_VERSION_MAJOR
23941         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
23942 #if $cf_db_version == DB_VERSION_MAJOR
23943         /* ok */
23944 #else
23945         make an error
23946 #endif
23947 #else
23948 #if $cf_db_version == 1
23949         /* ok: assuming this is DB 1.8.5 */
23950 #else
23951         make an error
23952 #endif
23953 #endif
23954
23955 int
23956 main (void)
23957 {
23958 DBT *foo = 0
23959   ;
23960   return 0;
23961 }
23962 _ACEOF
23963 rm -f "conftest.$ac_objext"
23964 if { (eval echo "$as_me:23964: \"$ac_compile\"") >&5
23965   (eval $ac_compile) 2>&5
23966   ac_status=$?
23967   echo "$as_me:23967: \$? = $ac_status" >&5
23968   (exit "$ac_status"); } &&
23969          { ac_try='test -s "conftest.$ac_objext"'
23970   { (eval echo "$as_me:23970: \"$ac_try\"") >&5
23971   (eval $ac_try) 2>&5
23972   ac_status=$?
23973   echo "$as_me:23973: \$? = $ac_status" >&5
23974   (exit "$ac_status"); }; }; then
23975
23976         cf_cv_hashed_db_version=$cf_db_version
23977         break
23978
23979 else
23980   echo "$as_me: failed program was:" >&5
23981 cat "conftest.$ac_ext" >&5
23982 fi
23983 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23984 done
23985
23986 fi
23987 echo "$as_me:23987: result: $cf_cv_hashed_db_version" >&5
23988 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
23989
23990 if test "$cf_cv_hashed_db_version" = unknown ; then
23991         { { echo "$as_me:23991: error: Cannot determine version of db" >&5
23992 echo "$as_me: error: Cannot determine version of db" >&2;}
23993    { (exit 1); exit 1; }; }
23994 else
23995
23996 echo "$as_me:23996: checking for db libraries" >&5
23997 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
23998 if test "${cf_cv_hashed_db_libs+set}" = set; then
23999   echo $ECHO_N "(cached) $ECHO_C" >&6
24000 else
24001
24002 cf_cv_hashed_db_libs=unknown
24003 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
24004 do
24005         cf_save_libs="$LIBS"
24006         if test -n "$cf_db_libs"; then
24007
24008 cf_add_libs="$LIBS"
24009 # reverse order
24010 cf_add_0lib=
24011 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24012 # filter duplicates
24013 for cf_add_1lib in $cf_add_0lib; do
24014         for cf_add_2lib in $cf_add_libs; do
24015                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24016                         cf_add_1lib=
24017                         break
24018                 fi
24019         done
24020         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24021 done
24022 LIBS="$cf_add_libs"
24023
24024         fi
24025
24026 echo "${as_me:-configure}:24026: testing checking for library $cf_db_libs ..." 1>&5
24027
24028         cat >"conftest.$ac_ext" <<_ACEOF
24029 #line 24029 "configure"
24030 #include "confdefs.h"
24031
24032 $ac_includes_default
24033 #include <db.h>
24034
24035 int
24036 main (void)
24037 {
24038
24039         char *path = "/tmp/foo";
24040 #ifdef DB_VERSION_MAJOR
24041 #if DB_VERSION_MAJOR >= 4
24042         DB *result = 0;
24043         db_create(&result, NULL, 0);
24044         result->open(result,
24045                 NULL,
24046                 path,
24047                 path,
24048                 DB_HASH,
24049                 DB_CREATE,
24050                 0644);
24051 #elif DB_VERSION_MAJOR >= 3
24052         DB *result = 0;
24053         db_create(&result, NULL, 0);
24054         result->open(result,
24055                 path,
24056                 path,
24057                 DB_HASH,
24058                 DB_CREATE,
24059                 0644);
24060 #elif DB_VERSION_MAJOR >= 2
24061         DB *result = 0;
24062         db_open(path,
24063                 DB_HASH,
24064                 DB_CREATE,
24065                 0644,
24066                 (DB_ENV *) 0,
24067                 (DB_INFO *) 0,
24068                 &result);
24069 #endif /* DB_VERSION_MAJOR */
24070 #else
24071         DB *result = dbopen(path,
24072                      2,
24073                      0644,
24074                      DB_HASH,
24075                      0);
24076 #endif
24077         ${cf_cv_main_return:-return}(result != 0)
24078
24079   ;
24080   return 0;
24081 }
24082 _ACEOF
24083 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24084 if { (eval echo "$as_me:24084: \"$ac_link\"") >&5
24085   (eval $ac_link) 2>&5
24086   ac_status=$?
24087   echo "$as_me:24087: \$? = $ac_status" >&5
24088   (exit "$ac_status"); } &&
24089          { ac_try='test -s "conftest$ac_exeext"'
24090   { (eval echo "$as_me:24090: \"$ac_try\"") >&5
24091   (eval $ac_try) 2>&5
24092   ac_status=$?
24093   echo "$as_me:24093: \$? = $ac_status" >&5
24094   (exit "$ac_status"); }; }; then
24095
24096         if test -n "$cf_db_libs" ; then
24097                 cf_cv_hashed_db_libs=$cf_db_libs
24098         else
24099                 cf_cv_hashed_db_libs=default
24100         fi
24101         LIBS="$cf_save_libs"
24102         break
24103
24104 else
24105   echo "$as_me: failed program was:" >&5
24106 cat "conftest.$ac_ext" >&5
24107 fi
24108 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24109         LIBS="$cf_save_libs"
24110 done
24111
24112 fi
24113 echo "$as_me:24113: result: $cf_cv_hashed_db_libs" >&5
24114 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
24115
24116         if test "$cf_cv_hashed_db_libs" = unknown ; then
24117                 { { echo "$as_me:24117: error: Cannot determine library for db" >&5
24118 echo "$as_me: error: Cannot determine library for db" >&2;}
24119    { (exit 1); exit 1; }; }
24120         elif test "$cf_cv_hashed_db_libs" != default ; then
24121
24122 cf_add_libs="$LIBS"
24123 # reverse order
24124 cf_add_0lib=
24125 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24126 # filter duplicates
24127 for cf_add_1lib in $cf_add_0lib; do
24128         for cf_add_2lib in $cf_add_libs; do
24129                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24130                         cf_add_1lib=
24131                         break
24132                 fi
24133         done
24134         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24135 done
24136 LIBS="$cf_add_libs"
24137
24138         fi
24139 fi
24140
24141 else
24142
24143         { { echo "$as_me:24143: error: Cannot find db.h" >&5
24144 echo "$as_me: error: Cannot find db.h" >&2;}
24145    { (exit 1); exit 1; }; }
24146
24147 fi
24148
24149 fi
24150
24151 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
24152         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24153         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24154 fi
24155
24156 # Just in case, check if the C compiler has a bool type.
24157
24158 echo "$as_me:24158: checking if we should include stdbool.h" >&5
24159 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24160
24161 if test "${cf_cv_header_stdbool_h+set}" = set; then
24162   echo $ECHO_N "(cached) $ECHO_C" >&6
24163 else
24164
24165         cat >"conftest.$ac_ext" <<_ACEOF
24166 #line 24166 "configure"
24167 #include "confdefs.h"
24168
24169 int
24170 main (void)
24171 {
24172 bool foo = false
24173   ;
24174   return 0;
24175 }
24176 _ACEOF
24177 rm -f "conftest.$ac_objext"
24178 if { (eval echo "$as_me:24178: \"$ac_compile\"") >&5
24179   (eval $ac_compile) 2>&5
24180   ac_status=$?
24181   echo "$as_me:24181: \$? = $ac_status" >&5
24182   (exit "$ac_status"); } &&
24183          { ac_try='test -s "conftest.$ac_objext"'
24184   { (eval echo "$as_me:24184: \"$ac_try\"") >&5
24185   (eval $ac_try) 2>&5
24186   ac_status=$?
24187   echo "$as_me:24187: \$? = $ac_status" >&5
24188   (exit "$ac_status"); }; }; then
24189   cf_cv_header_stdbool_h=0
24190 else
24191   echo "$as_me: failed program was:" >&5
24192 cat "conftest.$ac_ext" >&5
24193 cat >"conftest.$ac_ext" <<_ACEOF
24194 #line 24194 "configure"
24195 #include "confdefs.h"
24196
24197 #ifndef __BEOS__
24198 #include <stdbool.h>
24199 #endif
24200
24201 int
24202 main (void)
24203 {
24204 bool foo = false
24205   ;
24206   return 0;
24207 }
24208 _ACEOF
24209 rm -f "conftest.$ac_objext"
24210 if { (eval echo "$as_me:24210: \"$ac_compile\"") >&5
24211   (eval $ac_compile) 2>&5
24212   ac_status=$?
24213   echo "$as_me:24213: \$? = $ac_status" >&5
24214   (exit "$ac_status"); } &&
24215          { ac_try='test -s "conftest.$ac_objext"'
24216   { (eval echo "$as_me:24216: \"$ac_try\"") >&5
24217   (eval $ac_try) 2>&5
24218   ac_status=$?
24219   echo "$as_me:24219: \$? = $ac_status" >&5
24220   (exit "$ac_status"); }; }; then
24221   cf_cv_header_stdbool_h=1
24222 else
24223   echo "$as_me: failed program was:" >&5
24224 cat "conftest.$ac_ext" >&5
24225 cf_cv_header_stdbool_h=0
24226 fi
24227 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24228 fi
24229 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24230 fi
24231
24232 if test "$cf_cv_header_stdbool_h" = 1
24233 then    echo "$as_me:24233: result: yes" >&5
24234 echo "${ECHO_T}yes" >&6
24235 else    echo "$as_me:24235: result: no" >&5
24236 echo "${ECHO_T}no" >&6
24237 fi
24238
24239 echo "$as_me:24239: checking for builtin bool type" >&5
24240 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24241
24242 if test "${cf_cv_cc_bool_type+set}" = set; then
24243   echo $ECHO_N "(cached) $ECHO_C" >&6
24244 else
24245
24246         cat >"conftest.$ac_ext" <<_ACEOF
24247 #line 24247 "configure"
24248 #include "confdefs.h"
24249
24250 #include <stdio.h>
24251 #include <sys/types.h>
24252
24253 int
24254 main (void)
24255 {
24256 bool x = false
24257   ;
24258   return 0;
24259 }
24260 _ACEOF
24261 rm -f "conftest.$ac_objext"
24262 if { (eval echo "$as_me:24262: \"$ac_compile\"") >&5
24263   (eval $ac_compile) 2>&5
24264   ac_status=$?
24265   echo "$as_me:24265: \$? = $ac_status" >&5
24266   (exit "$ac_status"); } &&
24267          { ac_try='test -s "conftest.$ac_objext"'
24268   { (eval echo "$as_me:24268: \"$ac_try\"") >&5
24269   (eval $ac_try) 2>&5
24270   ac_status=$?
24271   echo "$as_me:24271: \$? = $ac_status" >&5
24272   (exit "$ac_status"); }; }; then
24273   cf_cv_cc_bool_type=1
24274 else
24275   echo "$as_me: failed program was:" >&5
24276 cat "conftest.$ac_ext" >&5
24277 cf_cv_cc_bool_type=0
24278 fi
24279 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24280
24281 fi
24282
24283 if test "$cf_cv_cc_bool_type" = 1
24284 then    echo "$as_me:24284: result: yes" >&5
24285 echo "${ECHO_T}yes" >&6
24286 else    echo "$as_me:24286: result: no" >&5
24287 echo "${ECHO_T}no" >&6
24288 fi
24289
24290 # Check for C++ compiler characteristics (and ensure that it's there!)
24291 if test -n "$CXX" ; then
24292         ac_ext=cc
24293 ac_cpp='$CXXCPP $CPPFLAGS'
24294 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24295 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24296 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24297 ac_main_return="return"
24298
24299 if test -n "$GXX" ; then
24300
24301         cf_save="$LIBS"
24302         LIBS="$LIBS $CXXLIBS"
24303         echo "$as_me:24303: checking if we already have C++ library" >&5
24304 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
24305         cat >"conftest.$ac_ext" <<_ACEOF
24306 #line 24306 "configure"
24307 #include "confdefs.h"
24308
24309                         #include <iostream>
24310 int
24311 main (void)
24312 {
24313
24314                         std::cout << "Hello World!" << std::endl;
24315   ;
24316   return 0;
24317 }
24318 _ACEOF
24319 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24320 if { (eval echo "$as_me:24320: \"$ac_link\"") >&5
24321   (eval $ac_link) 2>&5
24322   ac_status=$?
24323   echo "$as_me:24323: \$? = $ac_status" >&5
24324   (exit "$ac_status"); } &&
24325          { ac_try='test -s "conftest$ac_exeext"'
24326   { (eval echo "$as_me:24326: \"$ac_try\"") >&5
24327   (eval $ac_try) 2>&5
24328   ac_status=$?
24329   echo "$as_me:24329: \$? = $ac_status" >&5
24330   (exit "$ac_status"); }; }; then
24331   cf_have_libstdcpp=yes
24332 else
24333   echo "$as_me: failed program was:" >&5
24334 cat "conftest.$ac_ext" >&5
24335 cf_have_libstdcpp=no
24336 fi
24337 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24338         echo "$as_me:24338: result: $cf_have_libstdcpp" >&5
24339 echo "${ECHO_T}$cf_have_libstdcpp" >&6
24340         LIBS="$cf_save"
24341
24342         if test "$cf_have_libstdcpp" != yes
24343         then
24344                 case "$cf_cv_system_name" in
24345                 (os2*)
24346                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
24347                                 cf_stdcpp_libname=stdcpp
24348                         else
24349                                 cf_stdcpp_libname=stdc++
24350                         fi
24351                         ;;
24352                 (*)
24353                         cf_stdcpp_libname=stdc++
24354                         ;;
24355                 esac
24356
24357                 echo "$as_me:24357: checking for library $cf_stdcpp_libname" >&5
24358 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
24359 if test "${cf_cv_libstdcpp+set}" = set; then
24360   echo $ECHO_N "(cached) $ECHO_C" >&6
24361 else
24362
24363                         cf_save="$LIBS"
24364                         LIBS="$LIBS $CXXLIBS"
24365
24366 cf_add_libs="$LIBS"
24367 # reverse order
24368 cf_add_0lib=
24369 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24370 # filter duplicates
24371 for cf_add_1lib in $cf_add_0lib; do
24372         for cf_add_2lib in $cf_add_libs; do
24373                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24374                         cf_add_1lib=
24375                         break
24376                 fi
24377         done
24378         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24379 done
24380 LIBS="$cf_add_libs"
24381
24382                 cat >"conftest.$ac_ext" <<_ACEOF
24383 #line 24383 "configure"
24384 #include "confdefs.h"
24385
24386                                 #include <iostream>
24387 int
24388 main (void)
24389 {
24390
24391                                 std::cout << "Hello World!" << std::endl;
24392   ;
24393   return 0;
24394 }
24395 _ACEOF
24396 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24397 if { (eval echo "$as_me:24397: \"$ac_link\"") >&5
24398   (eval $ac_link) 2>&5
24399   ac_status=$?
24400   echo "$as_me:24400: \$? = $ac_status" >&5
24401   (exit "$ac_status"); } &&
24402          { ac_try='test -s "conftest$ac_exeext"'
24403   { (eval echo "$as_me:24403: \"$ac_try\"") >&5
24404   (eval $ac_try) 2>&5
24405   ac_status=$?
24406   echo "$as_me:24406: \$? = $ac_status" >&5
24407   (exit "$ac_status"); }; }; then
24408   cf_cv_libstdcpp=yes
24409 else
24410   echo "$as_me: failed program was:" >&5
24411 cat "conftest.$ac_ext" >&5
24412 cf_cv_libstdcpp=no
24413 fi
24414 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24415                         LIBS="$cf_save"
24416
24417 fi
24418 echo "$as_me:24418: result: $cf_cv_libstdcpp" >&5
24419 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
24420                 test "$cf_cv_libstdcpp" = yes && {
24421 cf_add_libs="$CXXLIBS"
24422 # reverse order
24423 cf_add_0lib=
24424 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24425 # filter duplicates
24426 for cf_add_1lib in $cf_add_0lib; do
24427         for cf_add_2lib in $cf_add_libs; do
24428                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24429                         cf_add_1lib=
24430                         break
24431                 fi
24432         done
24433         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24434 done
24435 CXXLIBS="$cf_add_libs"
24436  }
24437         fi
24438 fi
24439
24440         echo "$as_me:24440: checking whether $CXX understands -c and -o together" >&5
24441 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
24442 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
24443   echo $ECHO_N "(cached) $ECHO_C" >&6
24444 else
24445
24446 cat > conftest.$ac_ext <<CF_EOF
24447 int main(void)
24448 {
24449         ${cf_cv_main_return:-return}(0);
24450 }
24451 CF_EOF
24452 # We do the test twice because some compilers refuse to overwrite an
24453 # existing .o file with -o, though they will create one.
24454 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
24455 if { (eval echo "$as_me:24455: \"$ac_try\"") >&5
24456   (eval $ac_try) 2>&5
24457   ac_status=$?
24458   echo "$as_me:24458: \$? = $ac_status" >&5
24459   (exit "$ac_status"); } &&
24460   test -f conftest2.$ac_objext && { (eval echo "$as_me:24460: \"$ac_try\"") >&5
24461   (eval $ac_try) 2>&5
24462   ac_status=$?
24463   echo "$as_me:24463: \$? = $ac_status" >&5
24464   (exit "$ac_status"); };
24465 then
24466   eval cf_cv_prog_CXX_c_o=yes
24467 else
24468   eval cf_cv_prog_CXX_c_o=no
24469 fi
24470 rm -rf ./conftest*
24471
24472 fi
24473 if test "$cf_cv_prog_CXX_c_o" = yes; then
24474   echo "$as_me:24474: result: yes" >&5
24475 echo "${ECHO_T}yes" >&6
24476 else
24477   echo "$as_me:24477: result: no" >&5
24478 echo "${ECHO_T}no" >&6
24479 fi
24480
24481         case "$GXX_VERSION" in
24482         (1.*|2.[0-6]*|[1-9][0-9].*)
24483                 cf_cxx_library=yes
24484                 ;;
24485         (*-2.7*|2.7*)
24486
24487 cf_cxx_library=unknown
24488 case "$cf_cv_system_name" in
24489 (os2*)
24490         cf_gpp_libname=gpp
24491         ;;
24492 (*)
24493         cf_gpp_libname=g++
24494         ;;
24495 esac
24496 if test "$GXX" = yes; then
24497         echo "$as_me:24497: checking for lib$cf_gpp_libname" >&5
24498 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
24499         cf_save="$LIBS"
24500
24501 cf_add_libs="$LIBS"
24502 # reverse order
24503 cf_add_0lib=
24504 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24505 # filter duplicates
24506 for cf_add_1lib in $cf_add_0lib; do
24507         for cf_add_2lib in $cf_add_libs; do
24508                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24509                         cf_add_1lib=
24510                         break
24511                 fi
24512         done
24513         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24514 done
24515 LIBS="$cf_add_libs"
24516
24517         cat >"conftest.$ac_ext" <<_ACEOF
24518 #line 24518 "configure"
24519 #include "confdefs.h"
24520
24521 #include <$cf_gpp_libname/builtin.h>
24522
24523 int
24524 main (void)
24525 {
24526 two_arg_error_handler_t foo2 = lib_error_handler
24527   ;
24528   return 0;
24529 }
24530 _ACEOF
24531 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24532 if { (eval echo "$as_me:24532: \"$ac_link\"") >&5
24533   (eval $ac_link) 2>&5
24534   ac_status=$?
24535   echo "$as_me:24535: \$? = $ac_status" >&5
24536   (exit "$ac_status"); } &&
24537          { ac_try='test -s "conftest$ac_exeext"'
24538   { (eval echo "$as_me:24538: \"$ac_try\"") >&5
24539   (eval $ac_try) 2>&5
24540   ac_status=$?
24541   echo "$as_me:24541: \$? = $ac_status" >&5
24542   (exit "$ac_status"); }; }; then
24543   cf_cxx_library=yes
24544
24545 cf_add_libs="$CXXLIBS"
24546 # reverse order
24547 cf_add_0lib=
24548 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24549 # filter duplicates
24550 for cf_add_1lib in $cf_add_0lib; do
24551         for cf_add_2lib in $cf_add_libs; do
24552                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24553                         cf_add_1lib=
24554                         break
24555                 fi
24556         done
24557         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24558 done
24559 CXXLIBS="$cf_add_libs"
24560
24561          if test "$cf_gpp_libname" = cpp ; then
24562
24563 cat >>confdefs.h <<\EOF
24564 #define HAVE_GPP_BUILTIN_H 1
24565 EOF
24566
24567          else
24568
24569 cat >>confdefs.h <<\EOF
24570 #define HAVE_GXX_BUILTIN_H 1
24571 EOF
24572
24573          fi
24574 else
24575   echo "$as_me: failed program was:" >&5
24576 cat "conftest.$ac_ext" >&5
24577 cat >"conftest.$ac_ext" <<_ACEOF
24578 #line 24578 "configure"
24579 #include "confdefs.h"
24580
24581 #include <builtin.h>
24582
24583 int
24584 main (void)
24585 {
24586 two_arg_error_handler_t foo2 = lib_error_handler
24587   ;
24588   return 0;
24589 }
24590 _ACEOF
24591 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24592 if { (eval echo "$as_me:24592: \"$ac_link\"") >&5
24593   (eval $ac_link) 2>&5
24594   ac_status=$?
24595   echo "$as_me:24595: \$? = $ac_status" >&5
24596   (exit "$ac_status"); } &&
24597          { ac_try='test -s "conftest$ac_exeext"'
24598   { (eval echo "$as_me:24598: \"$ac_try\"") >&5
24599   (eval $ac_try) 2>&5
24600   ac_status=$?
24601   echo "$as_me:24601: \$? = $ac_status" >&5
24602   (exit "$ac_status"); }; }; then
24603   cf_cxx_library=yes
24604
24605 cf_add_libs="$CXXLIBS"
24606 # reverse order
24607 cf_add_0lib=
24608 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24609 # filter duplicates
24610 for cf_add_1lib in $cf_add_0lib; do
24611         for cf_add_2lib in $cf_add_libs; do
24612                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24613                         cf_add_1lib=
24614                         break
24615                 fi
24616         done
24617         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24618 done
24619 CXXLIBS="$cf_add_libs"
24620
24621 cat >>confdefs.h <<\EOF
24622 #define HAVE_BUILTIN_H 1
24623 EOF
24624
24625 else
24626   echo "$as_me: failed program was:" >&5
24627 cat "conftest.$ac_ext" >&5
24628 cf_cxx_library=no
24629 fi
24630 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24631 fi
24632 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24633         LIBS="$cf_save"
24634         echo "$as_me:24634: result: $cf_cxx_library" >&5
24635 echo "${ECHO_T}$cf_cxx_library" >&6
24636 fi
24637
24638                 ;;
24639         (*)
24640                 cf_cxx_library=no
24641                 ;;
24642         esac
24643
24644         ac_ext=cc
24645 ac_cpp='$CXXCPP $CPPFLAGS'
24646 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24647 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24648 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24649 ac_main_return="return"
24650 echo "$as_me:24650: checking how to run the C++ preprocessor" >&5
24651 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
24652 if test -z "$CXXCPP"; then
24653   if test "${ac_cv_prog_CXXCPP+set}" = set; then
24654   echo $ECHO_N "(cached) $ECHO_C" >&6
24655 else
24656       # Double quotes because CXXCPP needs to be expanded
24657     for CXXCPP in "$CXX -E" "/lib/cpp"
24658     do
24659       ac_preproc_ok=false
24660 for ac_cxx_preproc_warn_flag in '' yes
24661 do
24662   # Use a header file that comes with gcc, so configuring glibc
24663   # with a fresh cross-compiler works.
24664   # On the NeXT, cc -E runs the code through the compiler's parser,
24665   # not just through cpp. "Syntax error" is here to catch this case.
24666   cat >"conftest.$ac_ext" <<_ACEOF
24667 #line 24667 "configure"
24668 #include "confdefs.h"
24669 #include <assert.h>
24670                      Syntax error
24671 _ACEOF
24672 if { (eval echo "$as_me:24672: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24673   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24674   ac_status=$?
24675   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24676   rm -f conftest.er1
24677   cat conftest.err >&5
24678   echo "$as_me:24678: \$? = $ac_status" >&5
24679   (exit "$ac_status"); } >/dev/null; then
24680   if test -s conftest.err; then
24681     ac_cpp_err=$ac_cxx_preproc_warn_flag
24682   else
24683     ac_cpp_err=
24684   fi
24685 else
24686   ac_cpp_err=yes
24687 fi
24688 if test -z "$ac_cpp_err"; then
24689   :
24690 else
24691   echo "$as_me: failed program was:" >&5
24692   cat "conftest.$ac_ext" >&5
24693   # Broken: fails on valid input.
24694 continue
24695 fi
24696 rm -f conftest.err "conftest.$ac_ext"
24697
24698   # OK, works on sane cases.  Now check whether non-existent headers
24699   # can be detected and how.
24700   cat >"conftest.$ac_ext" <<_ACEOF
24701 #line 24701 "configure"
24702 #include "confdefs.h"
24703 #include <ac_nonexistent.h>
24704 _ACEOF
24705 if { (eval echo "$as_me:24705: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24706   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24707   ac_status=$?
24708   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24709   rm -f conftest.er1
24710   cat conftest.err >&5
24711   echo "$as_me:24711: \$? = $ac_status" >&5
24712   (exit "$ac_status"); } >/dev/null; then
24713   if test -s conftest.err; then
24714     ac_cpp_err=$ac_cxx_preproc_warn_flag
24715   else
24716     ac_cpp_err=
24717   fi
24718 else
24719   ac_cpp_err=yes
24720 fi
24721 if test -z "$ac_cpp_err"; then
24722   # Broken: success on invalid input.
24723 continue
24724 else
24725   echo "$as_me: failed program was:" >&5
24726   cat "conftest.$ac_ext" >&5
24727   # Passes both tests.
24728 ac_preproc_ok=:
24729 break
24730 fi
24731 rm -f conftest.err "conftest.$ac_ext"
24732
24733 done
24734 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24735 rm -f conftest.err "conftest.$ac_ext"
24736 if $ac_preproc_ok; then
24737   break
24738 fi
24739
24740     done
24741     ac_cv_prog_CXXCPP=$CXXCPP
24742
24743 fi
24744   CXXCPP=$ac_cv_prog_CXXCPP
24745 else
24746   ac_cv_prog_CXXCPP=$CXXCPP
24747 fi
24748 echo "$as_me:24748: result: $CXXCPP" >&5
24749 echo "${ECHO_T}$CXXCPP" >&6
24750 ac_preproc_ok=false
24751 for ac_cxx_preproc_warn_flag in '' yes
24752 do
24753   # Use a header file that comes with gcc, so configuring glibc
24754   # with a fresh cross-compiler works.
24755   # On the NeXT, cc -E runs the code through the compiler's parser,
24756   # not just through cpp. "Syntax error" is here to catch this case.
24757   cat >"conftest.$ac_ext" <<_ACEOF
24758 #line 24758 "configure"
24759 #include "confdefs.h"
24760 #include <assert.h>
24761                      Syntax error
24762 _ACEOF
24763 if { (eval echo "$as_me:24763: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24764   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24765   ac_status=$?
24766   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24767   rm -f conftest.er1
24768   cat conftest.err >&5
24769   echo "$as_me:24769: \$? = $ac_status" >&5
24770   (exit "$ac_status"); } >/dev/null; then
24771   if test -s conftest.err; then
24772     ac_cpp_err=$ac_cxx_preproc_warn_flag
24773   else
24774     ac_cpp_err=
24775   fi
24776 else
24777   ac_cpp_err=yes
24778 fi
24779 if test -z "$ac_cpp_err"; then
24780   :
24781 else
24782   echo "$as_me: failed program was:" >&5
24783   cat "conftest.$ac_ext" >&5
24784   # Broken: fails on valid input.
24785 continue
24786 fi
24787 rm -f conftest.err "conftest.$ac_ext"
24788
24789   # OK, works on sane cases.  Now check whether non-existent headers
24790   # can be detected and how.
24791   cat >"conftest.$ac_ext" <<_ACEOF
24792 #line 24792 "configure"
24793 #include "confdefs.h"
24794 #include <ac_nonexistent.h>
24795 _ACEOF
24796 if { (eval echo "$as_me:24796: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24797   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24798   ac_status=$?
24799   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24800   rm -f conftest.er1
24801   cat conftest.err >&5
24802   echo "$as_me:24802: \$? = $ac_status" >&5
24803   (exit "$ac_status"); } >/dev/null; then
24804   if test -s conftest.err; then
24805     ac_cpp_err=$ac_cxx_preproc_warn_flag
24806   else
24807     ac_cpp_err=
24808   fi
24809 else
24810   ac_cpp_err=yes
24811 fi
24812 if test -z "$ac_cpp_err"; then
24813   # Broken: success on invalid input.
24814 continue
24815 else
24816   echo "$as_me: failed program was:" >&5
24817   cat "conftest.$ac_ext" >&5
24818   # Passes both tests.
24819 ac_preproc_ok=:
24820 break
24821 fi
24822 rm -f conftest.err "conftest.$ac_ext"
24823
24824 done
24825 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24826 rm -f conftest.err "conftest.$ac_ext"
24827 if $ac_preproc_ok; then
24828   :
24829 else
24830   { { echo "$as_me:24830: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
24831 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
24832    { (exit 1); exit 1; }; }
24833 fi
24834
24835 ac_ext=cc
24836 ac_cpp='$CXXCPP $CPPFLAGS'
24837 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24838 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24839 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24840 ac_main_return="return"
24841
24842 for ac_header in typeinfo
24843 do
24844 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24845 echo "$as_me:24845: checking for $ac_header" >&5
24846 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24847 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24848   echo $ECHO_N "(cached) $ECHO_C" >&6
24849 else
24850   cat >"conftest.$ac_ext" <<_ACEOF
24851 #line 24851 "configure"
24852 #include "confdefs.h"
24853 #include <$ac_header>
24854 _ACEOF
24855 if { (eval echo "$as_me:24855: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24856   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24857   ac_status=$?
24858   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24859   rm -f conftest.er1
24860   cat conftest.err >&5
24861   echo "$as_me:24861: \$? = $ac_status" >&5
24862   (exit "$ac_status"); } >/dev/null; then
24863   if test -s conftest.err; then
24864     ac_cpp_err=$ac_cxx_preproc_warn_flag
24865   else
24866     ac_cpp_err=
24867   fi
24868 else
24869   ac_cpp_err=yes
24870 fi
24871 if test -z "$ac_cpp_err"; then
24872   eval "$as_ac_Header=yes"
24873 else
24874   echo "$as_me: failed program was:" >&5
24875   cat "conftest.$ac_ext" >&5
24876   eval "$as_ac_Header=no"
24877 fi
24878 rm -f conftest.err "conftest.$ac_ext"
24879 fi
24880 echo "$as_me:24880: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
24881 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
24882 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
24883   cat >>confdefs.h <<EOF
24884 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24885 EOF
24886
24887 fi
24888 done
24889
24890 for ac_header in iostream
24891 do
24892 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24893 echo "$as_me:24893: checking for $ac_header" >&5
24894 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24895 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24896   echo $ECHO_N "(cached) $ECHO_C" >&6
24897 else
24898   cat >"conftest.$ac_ext" <<_ACEOF
24899 #line 24899 "configure"
24900 #include "confdefs.h"
24901 #include <$ac_header>
24902 _ACEOF
24903 if { (eval echo "$as_me:24903: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24904   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24905   ac_status=$?
24906   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24907   rm -f conftest.er1
24908   cat conftest.err >&5
24909   echo "$as_me:24909: \$? = $ac_status" >&5
24910   (exit "$ac_status"); } >/dev/null; then
24911   if test -s conftest.err; then
24912     ac_cpp_err=$ac_cxx_preproc_warn_flag
24913   else
24914     ac_cpp_err=
24915   fi
24916 else
24917   ac_cpp_err=yes
24918 fi
24919 if test -z "$ac_cpp_err"; then
24920   eval "$as_ac_Header=yes"
24921 else
24922   echo "$as_me: failed program was:" >&5
24923   cat "conftest.$ac_ext" >&5
24924   eval "$as_ac_Header=no"
24925 fi
24926 rm -f conftest.err "conftest.$ac_ext"
24927 fi
24928 echo "$as_me:24928: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
24929 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
24930 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
24931   cat >>confdefs.h <<EOF
24932 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24933 EOF
24934
24935 fi
24936 done
24937
24938 if test x"$ac_cv_header_iostream" = xyes ; then
24939         echo "$as_me:24939: checking if iostream uses std-namespace" >&5
24940 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
24941         cat >"conftest.$ac_ext" <<_ACEOF
24942 #line 24942 "configure"
24943 #include "confdefs.h"
24944
24945 #include <iostream>
24946 using std::endl;
24947 using std::cerr;
24948 int
24949 main (void)
24950 {
24951
24952 cerr << "testing" << endl;
24953
24954   ;
24955   return 0;
24956 }
24957 _ACEOF
24958 rm -f "conftest.$ac_objext"
24959 if { (eval echo "$as_me:24959: \"$ac_compile\"") >&5
24960   (eval $ac_compile) 2>&5
24961   ac_status=$?
24962   echo "$as_me:24962: \$? = $ac_status" >&5
24963   (exit "$ac_status"); } &&
24964          { ac_try='test -s "conftest.$ac_objext"'
24965   { (eval echo "$as_me:24965: \"$ac_try\"") >&5
24966   (eval $ac_try) 2>&5
24967   ac_status=$?
24968   echo "$as_me:24968: \$? = $ac_status" >&5
24969   (exit "$ac_status"); }; }; then
24970   cf_iostream_namespace=yes
24971 else
24972   echo "$as_me: failed program was:" >&5
24973 cat "conftest.$ac_ext" >&5
24974 cf_iostream_namespace=no
24975 fi
24976 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24977         echo "$as_me:24977: result: $cf_iostream_namespace" >&5
24978 echo "${ECHO_T}$cf_iostream_namespace" >&6
24979         if test "$cf_iostream_namespace" = yes ; then
24980
24981 cat >>confdefs.h <<\EOF
24982 #define IOSTREAM_NAMESPACE 1
24983 EOF
24984
24985         fi
24986 fi
24987
24988 echo "$as_me:24988: checking if we should include stdbool.h" >&5
24989 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24990
24991 if test "${cf_cv_header_stdbool_h+set}" = set; then
24992   echo $ECHO_N "(cached) $ECHO_C" >&6
24993 else
24994
24995         cat >"conftest.$ac_ext" <<_ACEOF
24996 #line 24996 "configure"
24997 #include "confdefs.h"
24998
24999 int
25000 main (void)
25001 {
25002 bool foo = false
25003   ;
25004   return 0;
25005 }
25006 _ACEOF
25007 rm -f "conftest.$ac_objext"
25008 if { (eval echo "$as_me:25008: \"$ac_compile\"") >&5
25009   (eval $ac_compile) 2>&5
25010   ac_status=$?
25011   echo "$as_me:25011: \$? = $ac_status" >&5
25012   (exit "$ac_status"); } &&
25013          { ac_try='test -s "conftest.$ac_objext"'
25014   { (eval echo "$as_me:25014: \"$ac_try\"") >&5
25015   (eval $ac_try) 2>&5
25016   ac_status=$?
25017   echo "$as_me:25017: \$? = $ac_status" >&5
25018   (exit "$ac_status"); }; }; then
25019   cf_cv_header_stdbool_h=0
25020 else
25021   echo "$as_me: failed program was:" >&5
25022 cat "conftest.$ac_ext" >&5
25023 cat >"conftest.$ac_ext" <<_ACEOF
25024 #line 25024 "configure"
25025 #include "confdefs.h"
25026
25027 #ifndef __BEOS__
25028 #include <stdbool.h>
25029 #endif
25030
25031 int
25032 main (void)
25033 {
25034 bool foo = false
25035   ;
25036   return 0;
25037 }
25038 _ACEOF
25039 rm -f "conftest.$ac_objext"
25040 if { (eval echo "$as_me:25040: \"$ac_compile\"") >&5
25041   (eval $ac_compile) 2>&5
25042   ac_status=$?
25043   echo "$as_me:25043: \$? = $ac_status" >&5
25044   (exit "$ac_status"); } &&
25045          { ac_try='test -s "conftest.$ac_objext"'
25046   { (eval echo "$as_me:25046: \"$ac_try\"") >&5
25047   (eval $ac_try) 2>&5
25048   ac_status=$?
25049   echo "$as_me:25049: \$? = $ac_status" >&5
25050   (exit "$ac_status"); }; }; then
25051   cf_cv_header_stdbool_h=1
25052 else
25053   echo "$as_me: failed program was:" >&5
25054 cat "conftest.$ac_ext" >&5
25055 cf_cv_header_stdbool_h=0
25056 fi
25057 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25058 fi
25059 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25060 fi
25061
25062 if test "$cf_cv_header_stdbool_h" = 1
25063 then    echo "$as_me:25063: result: yes" >&5
25064 echo "${ECHO_T}yes" >&6
25065 else    echo "$as_me:25065: result: no" >&5
25066 echo "${ECHO_T}no" >&6
25067 fi
25068
25069 echo "$as_me:25069: checking for builtin bool type" >&5
25070 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25071
25072 if test "${cf_cv_builtin_bool+set}" = set; then
25073   echo $ECHO_N "(cached) $ECHO_C" >&6
25074 else
25075
25076         cat >"conftest.$ac_ext" <<_ACEOF
25077 #line 25077 "configure"
25078 #include "confdefs.h"
25079
25080 #include <stdio.h>
25081 #include <sys/types.h>
25082
25083 int
25084 main (void)
25085 {
25086 bool x = false
25087   ;
25088   return 0;
25089 }
25090 _ACEOF
25091 rm -f "conftest.$ac_objext"
25092 if { (eval echo "$as_me:25092: \"$ac_compile\"") >&5
25093   (eval $ac_compile) 2>&5
25094   ac_status=$?
25095   echo "$as_me:25095: \$? = $ac_status" >&5
25096   (exit "$ac_status"); } &&
25097          { ac_try='test -s "conftest.$ac_objext"'
25098   { (eval echo "$as_me:25098: \"$ac_try\"") >&5
25099   (eval $ac_try) 2>&5
25100   ac_status=$?
25101   echo "$as_me:25101: \$? = $ac_status" >&5
25102   (exit "$ac_status"); }; }; then
25103   cf_cv_builtin_bool=1
25104 else
25105   echo "$as_me: failed program was:" >&5
25106 cat "conftest.$ac_ext" >&5
25107 cf_cv_builtin_bool=0
25108 fi
25109 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25110
25111 fi
25112
25113 if test "$cf_cv_builtin_bool" = 1
25114 then    echo "$as_me:25114: result: yes" >&5
25115 echo "${ECHO_T}yes" >&6
25116 else    echo "$as_me:25116: result: no" >&5
25117 echo "${ECHO_T}no" >&6
25118 fi
25119
25120 echo "$as_me:25120: checking for bool" >&5
25121 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25122 if test "${ac_cv_type_bool+set}" = set; then
25123   echo $ECHO_N "(cached) $ECHO_C" >&6
25124 else
25125   cat >"conftest.$ac_ext" <<_ACEOF
25126 #line 25126 "configure"
25127 #include "confdefs.h"
25128
25129 #include <stdlib.h>
25130 #include <stdio.h>
25131
25132 #if defined(__cplusplus)
25133
25134 #ifdef HAVE_GXX_BUILTIN_H
25135 #include <g++/builtin.h>
25136 #elif HAVE_GPP_BUILTIN_H
25137 #include <gpp/builtin.h>
25138 #elif HAVE_BUILTIN_H
25139 #include <builtin.h>
25140 #endif
25141
25142 #else
25143
25144 #if $cf_cv_header_stdbool_h
25145 #include <stdbool.h>
25146 #endif
25147
25148 #endif
25149
25150 int
25151 main (void)
25152 {
25153 if ((bool *) 0)
25154   return 0;
25155 if (sizeof (bool))
25156   return 0;
25157   ;
25158   return 0;
25159 }
25160 _ACEOF
25161 rm -f "conftest.$ac_objext"
25162 if { (eval echo "$as_me:25162: \"$ac_compile\"") >&5
25163   (eval $ac_compile) 2>&5
25164   ac_status=$?
25165   echo "$as_me:25165: \$? = $ac_status" >&5
25166   (exit "$ac_status"); } &&
25167          { ac_try='test -s "conftest.$ac_objext"'
25168   { (eval echo "$as_me:25168: \"$ac_try\"") >&5
25169   (eval $ac_try) 2>&5
25170   ac_status=$?
25171   echo "$as_me:25171: \$? = $ac_status" >&5
25172   (exit "$ac_status"); }; }; then
25173   ac_cv_type_bool=yes
25174 else
25175   echo "$as_me: failed program was:" >&5
25176 cat "conftest.$ac_ext" >&5
25177 ac_cv_type_bool=no
25178 fi
25179 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25180 fi
25181 echo "$as_me:25181: result: $ac_cv_type_bool" >&5
25182 echo "${ECHO_T}$ac_cv_type_bool" >&6
25183
25184 echo "$as_me:25184: checking size of bool" >&5
25185 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25186 if test "${ac_cv_sizeof_bool+set}" = set; then
25187   echo $ECHO_N "(cached) $ECHO_C" >&6
25188 else
25189   if test "$ac_cv_type_bool" = yes; then
25190   if test "$cross_compiling" = yes; then
25191   # Depending upon the size, compute the lo and hi bounds.
25192 cat >"conftest.$ac_ext" <<_ACEOF
25193 #line 25193 "configure"
25194 #include "confdefs.h"
25195
25196 #include <stdlib.h>
25197 #include <stdio.h>
25198
25199 #if defined(__cplusplus)
25200
25201 #ifdef HAVE_GXX_BUILTIN_H
25202 #include <g++/builtin.h>
25203 #elif HAVE_GPP_BUILTIN_H
25204 #include <gpp/builtin.h>
25205 #elif HAVE_BUILTIN_H
25206 #include <builtin.h>
25207 #endif
25208
25209 #else
25210
25211 #if $cf_cv_header_stdbool_h
25212 #include <stdbool.h>
25213 #endif
25214
25215 #endif
25216
25217 int
25218 main (void)
25219 {
25220 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25221   ;
25222   return 0;
25223 }
25224 _ACEOF
25225 rm -f "conftest.$ac_objext"
25226 if { (eval echo "$as_me:25226: \"$ac_compile\"") >&5
25227   (eval $ac_compile) 2>&5
25228   ac_status=$?
25229   echo "$as_me:25229: \$? = $ac_status" >&5
25230   (exit "$ac_status"); } &&
25231          { ac_try='test -s "conftest.$ac_objext"'
25232   { (eval echo "$as_me:25232: \"$ac_try\"") >&5
25233   (eval $ac_try) 2>&5
25234   ac_status=$?
25235   echo "$as_me:25235: \$? = $ac_status" >&5
25236   (exit "$ac_status"); }; }; then
25237   ac_lo=0 ac_mid=0
25238   while :; do
25239     cat >"conftest.$ac_ext" <<_ACEOF
25240 #line 25240 "configure"
25241 #include "confdefs.h"
25242
25243 #include <stdlib.h>
25244 #include <stdio.h>
25245
25246 #if defined(__cplusplus)
25247
25248 #ifdef HAVE_GXX_BUILTIN_H
25249 #include <g++/builtin.h>
25250 #elif HAVE_GPP_BUILTIN_H
25251 #include <gpp/builtin.h>
25252 #elif HAVE_BUILTIN_H
25253 #include <builtin.h>
25254 #endif
25255
25256 #else
25257
25258 #if $cf_cv_header_stdbool_h
25259 #include <stdbool.h>
25260 #endif
25261
25262 #endif
25263
25264 int
25265 main (void)
25266 {
25267 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25268   ;
25269   return 0;
25270 }
25271 _ACEOF
25272 rm -f "conftest.$ac_objext"
25273 if { (eval echo "$as_me:25273: \"$ac_compile\"") >&5
25274   (eval $ac_compile) 2>&5
25275   ac_status=$?
25276   echo "$as_me:25276: \$? = $ac_status" >&5
25277   (exit "$ac_status"); } &&
25278          { ac_try='test -s "conftest.$ac_objext"'
25279   { (eval echo "$as_me:25279: \"$ac_try\"") >&5
25280   (eval $ac_try) 2>&5
25281   ac_status=$?
25282   echo "$as_me:25282: \$? = $ac_status" >&5
25283   (exit "$ac_status"); }; }; then
25284   ac_hi=$ac_mid; break
25285 else
25286   echo "$as_me: failed program was:" >&5
25287 cat "conftest.$ac_ext" >&5
25288 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
25289 fi
25290 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25291   done
25292 else
25293   echo "$as_me: failed program was:" >&5
25294 cat "conftest.$ac_ext" >&5
25295 ac_hi=-1 ac_mid=-1
25296   while :; do
25297     cat >"conftest.$ac_ext" <<_ACEOF
25298 #line 25298 "configure"
25299 #include "confdefs.h"
25300
25301 #include <stdlib.h>
25302 #include <stdio.h>
25303
25304 #if defined(__cplusplus)
25305
25306 #ifdef HAVE_GXX_BUILTIN_H
25307 #include <g++/builtin.h>
25308 #elif HAVE_GPP_BUILTIN_H
25309 #include <gpp/builtin.h>
25310 #elif HAVE_BUILTIN_H
25311 #include <builtin.h>
25312 #endif
25313
25314 #else
25315
25316 #if $cf_cv_header_stdbool_h
25317 #include <stdbool.h>
25318 #endif
25319
25320 #endif
25321
25322 int
25323 main (void)
25324 {
25325 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
25326   ;
25327   return 0;
25328 }
25329 _ACEOF
25330 rm -f "conftest.$ac_objext"
25331 if { (eval echo "$as_me:25331: \"$ac_compile\"") >&5
25332   (eval $ac_compile) 2>&5
25333   ac_status=$?
25334   echo "$as_me:25334: \$? = $ac_status" >&5
25335   (exit "$ac_status"); } &&
25336          { ac_try='test -s "conftest.$ac_objext"'
25337   { (eval echo "$as_me:25337: \"$ac_try\"") >&5
25338   (eval $ac_try) 2>&5
25339   ac_status=$?
25340   echo "$as_me:25340: \$? = $ac_status" >&5
25341   (exit "$ac_status"); }; }; then
25342   ac_lo=$ac_mid; break
25343 else
25344   echo "$as_me: failed program was:" >&5
25345 cat "conftest.$ac_ext" >&5
25346 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
25347 fi
25348 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25349   done
25350 fi
25351 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25352 # Binary search between lo and hi bounds.
25353 while test "x$ac_lo" != "x$ac_hi"; do
25354   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
25355   cat >"conftest.$ac_ext" <<_ACEOF
25356 #line 25356 "configure"
25357 #include "confdefs.h"
25358
25359 #include <stdlib.h>
25360 #include <stdio.h>
25361
25362 #if defined(__cplusplus)
25363
25364 #ifdef HAVE_GXX_BUILTIN_H
25365 #include <g++/builtin.h>
25366 #elif HAVE_GPP_BUILTIN_H
25367 #include <gpp/builtin.h>
25368 #elif HAVE_BUILTIN_H
25369 #include <builtin.h>
25370 #endif
25371
25372 #else
25373
25374 #if $cf_cv_header_stdbool_h
25375 #include <stdbool.h>
25376 #endif
25377
25378 #endif
25379
25380 int
25381 main (void)
25382 {
25383 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25384   ;
25385   return 0;
25386 }
25387 _ACEOF
25388 rm -f "conftest.$ac_objext"
25389 if { (eval echo "$as_me:25389: \"$ac_compile\"") >&5
25390   (eval $ac_compile) 2>&5
25391   ac_status=$?
25392   echo "$as_me:25392: \$? = $ac_status" >&5
25393   (exit "$ac_status"); } &&
25394          { ac_try='test -s "conftest.$ac_objext"'
25395   { (eval echo "$as_me:25395: \"$ac_try\"") >&5
25396   (eval $ac_try) 2>&5
25397   ac_status=$?
25398   echo "$as_me:25398: \$? = $ac_status" >&5
25399   (exit "$ac_status"); }; }; then
25400   ac_hi=$ac_mid
25401 else
25402   echo "$as_me: failed program was:" >&5
25403 cat "conftest.$ac_ext" >&5
25404 ac_lo=`expr "$ac_mid" + 1`
25405 fi
25406 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25407 done
25408 ac_cv_sizeof_bool=$ac_lo
25409 else
25410   if test "$cross_compiling" = yes; then
25411   { { echo "$as_me:25411: error: cannot run test program while cross compiling" >&5
25412 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25413    { (exit 1); exit 1; }; }
25414 else
25415   cat >"conftest.$ac_ext" <<_ACEOF
25416 #line 25416 "configure"
25417 #include "confdefs.h"
25418
25419 #include <stdlib.h>
25420 #include <stdio.h>
25421
25422 #if defined(__cplusplus)
25423
25424 #ifdef HAVE_GXX_BUILTIN_H
25425 #include <g++/builtin.h>
25426 #elif HAVE_GPP_BUILTIN_H
25427 #include <gpp/builtin.h>
25428 #elif HAVE_BUILTIN_H
25429 #include <builtin.h>
25430 #endif
25431
25432 #else
25433
25434 #if $cf_cv_header_stdbool_h
25435 #include <stdbool.h>
25436 #endif
25437
25438 #endif
25439
25440 int
25441 main (void)
25442 {
25443 FILE *f = fopen ("conftest.val", "w");
25444 if (!f)
25445   $ac_main_return (1);
25446 fprintf (f, "%ld", (long)(sizeof (bool)));
25447 fclose (f);
25448   ;
25449   return 0;
25450 }
25451 _ACEOF
25452 rm -f "conftest$ac_exeext"
25453 if { (eval echo "$as_me:25453: \"$ac_link\"") >&5
25454   (eval $ac_link) 2>&5
25455   ac_status=$?
25456   echo "$as_me:25456: \$? = $ac_status" >&5
25457   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25458   { (eval echo "$as_me:25458: \"$ac_try\"") >&5
25459   (eval $ac_try) 2>&5
25460   ac_status=$?
25461   echo "$as_me:25461: \$? = $ac_status" >&5
25462   (exit "$ac_status"); }; }; then
25463   ac_cv_sizeof_bool=`cat conftest.val`
25464 else
25465   echo "$as_me: program exited with status $ac_status" >&5
25466 echo "$as_me: failed program was:" >&5
25467 cat "conftest.$ac_ext" >&5
25468 fi
25469 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25470 fi
25471 fi
25472 rm -f conftest.val
25473 else
25474   ac_cv_sizeof_bool=0
25475 fi
25476 fi
25477 echo "$as_me:25477: result: $ac_cv_sizeof_bool" >&5
25478 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
25479 cat >>confdefs.h <<EOF
25480 #define SIZEOF_BOOL $ac_cv_sizeof_bool
25481 EOF
25482
25483 echo "$as_me:25483: checking for type of bool" >&5
25484 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
25485 if test "${cf_cv_type_of_bool+set}" = set; then
25486   echo $ECHO_N "(cached) $ECHO_C" >&6
25487 else
25488
25489         rm -f cf_test.out
25490         if test "$cross_compiling" = yes; then
25491
25492                 case x$ac_cv_sizeof_bool in
25493                 (x1) cf_cv_type_of_bool="unsigned char";;
25494                 (x2) cf_cv_type_of_bool="unsigned short";;
25495                 (x4) cf_cv_type_of_bool="unsigned int";;
25496                 (x8) cf_cv_type_of_bool="unsigned long";;
25497                 (*)  cf_cv_type_of_bool=unknown;;
25498                 esac
25499
25500 else
25501   cat >"conftest.$ac_ext" <<_ACEOF
25502 #line 25502 "configure"
25503 #include "confdefs.h"
25504
25505 #include <stdlib.h>
25506 #include <stdio.h>
25507
25508 #if defined(__cplusplus)
25509
25510 #ifdef HAVE_GXX_BUILTIN_H
25511 #include <g++/builtin.h>
25512 #elif HAVE_GPP_BUILTIN_H
25513 #include <gpp/builtin.h>
25514 #elif HAVE_BUILTIN_H
25515 #include <builtin.h>
25516 #endif
25517
25518 #else
25519
25520 #if $cf_cv_header_stdbool_h
25521 #include <stdbool.h>
25522 #endif
25523
25524 #endif
25525
25526 int main(void)
25527 {
25528         FILE *fp = fopen("cf_test.out", "w");
25529         if (fp != 0) {
25530                 bool x = true;
25531                 if ((bool)(-x) >= 0)
25532                         fputs("unsigned ", fp);
25533                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
25534                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
25535                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
25536                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
25537                 fclose(fp);
25538         }
25539         ${cf_cv_main_return:-return}(0);
25540 }
25541
25542 _ACEOF
25543 rm -f "conftest$ac_exeext"
25544 if { (eval echo "$as_me:25544: \"$ac_link\"") >&5
25545   (eval $ac_link) 2>&5
25546   ac_status=$?
25547   echo "$as_me:25547: \$? = $ac_status" >&5
25548   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25549   { (eval echo "$as_me:25549: \"$ac_try\"") >&5
25550   (eval $ac_try) 2>&5
25551   ac_status=$?
25552   echo "$as_me:25552: \$? = $ac_status" >&5
25553   (exit "$ac_status"); }; }; then
25554   cf_cv_type_of_bool=`cat cf_test.out`
25555                  if test -z "$cf_cv_type_of_bool"; then
25556                    cf_cv_type_of_bool=unknown
25557                  fi
25558 else
25559   echo "$as_me: program exited with status $ac_status" >&5
25560 echo "$as_me: failed program was:" >&5
25561 cat "conftest.$ac_ext" >&5
25562 cf_cv_type_of_bool=unknown
25563 fi
25564 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25565 fi
25566         rm -f cf_test.out
25567
25568 fi
25569 echo "$as_me:25569: result: $cf_cv_type_of_bool" >&5
25570 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
25571
25572 if test "$cf_cv_type_of_bool" = unknown ; then
25573         case .$NCURSES_BOOL in
25574         (.auto|.) NCURSES_BOOL=unsigned;;
25575         esac
25576         { echo "$as_me:25576: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
25577 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
25578         cf_cv_type_of_bool=$NCURSES_BOOL
25579 fi
25580
25581 echo "$as_me:25581: checking for special defines needed for etip.h" >&5
25582 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
25583 cf_save_CXXFLAGS="$CXXFLAGS"
25584 cf_result="none"
25585
25586 # etip.h includes ncurses.h which includes ncurses_dll.h
25587 # But ncurses_dll.h is generated - fix here.
25588 test -d include || mkdir include
25589 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
25590
25591 for cf_math in "" MATH_H
25592 do
25593 for cf_excp in "" MATH_EXCEPTION
25594 do
25595         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
25596         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
25597         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
25598 cat >"conftest.$ac_ext" <<_ACEOF
25599 #line 25599 "configure"
25600 #include "confdefs.h"
25601
25602 #include <etip.h.in>
25603
25604 int
25605 main (void)
25606 {
25607
25608   ;
25609   return 0;
25610 }
25611 _ACEOF
25612 rm -f "conftest.$ac_objext"
25613 if { (eval echo "$as_me:25613: \"$ac_compile\"") >&5
25614   (eval $ac_compile) 2>&5
25615   ac_status=$?
25616   echo "$as_me:25616: \$? = $ac_status" >&5
25617   (exit "$ac_status"); } &&
25618          { ac_try='test -s "conftest.$ac_objext"'
25619   { (eval echo "$as_me:25619: \"$ac_try\"") >&5
25620   (eval $ac_try) 2>&5
25621   ac_status=$?
25622   echo "$as_me:25622: \$? = $ac_status" >&5
25623   (exit "$ac_status"); }; }; then
25624
25625         test -n "$cf_math" && cat >>confdefs.h <<EOF
25626 #define ETIP_NEEDS_${cf_math} 1
25627 EOF
25628
25629         test -n "$cf_excp" && cat >>confdefs.h <<EOF
25630 #define ETIP_NEEDS_${cf_excp} 1
25631 EOF
25632
25633         cf_result="$cf_math $cf_excp"
25634         break 2
25635
25636 else
25637   echo "$as_me: failed program was:" >&5
25638 cat "conftest.$ac_ext" >&5
25639 fi
25640 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25641 done
25642 done
25643 echo "$as_me:25643: result: $cf_result" >&5
25644 echo "${ECHO_T}$cf_result" >&6
25645 CXXFLAGS="$cf_save_CXXFLAGS"
25646
25647 if test -n "$CXX"; then
25648 echo "$as_me:25648: checking if $CXX accepts parameter initialization" >&5
25649 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
25650 if test "${cf_cv_cpp_param_init+set}" = set; then
25651   echo $ECHO_N "(cached) $ECHO_C" >&6
25652 else
25653
25654         ac_ext=cc
25655 ac_cpp='$CXXCPP $CPPFLAGS'
25656 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25657 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25658 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25659 ac_main_return="return"
25660
25661         if test "$cross_compiling" = yes; then
25662   cf_cv_cpp_param_init=unknown
25663 else
25664   cat >"conftest.$ac_ext" <<_ACEOF
25665 #line 25665 "configure"
25666 #include "confdefs.h"
25667
25668 class TEST {
25669 private:
25670         int value;
25671 public:
25672         TEST(int x = 1);
25673         ~TEST();
25674 };
25675
25676 TEST::TEST(int x = 1)   // some compilers do not like second initializer
25677 {
25678         value = x;
25679 }
25680 int main(void) { }
25681
25682 _ACEOF
25683 rm -f "conftest$ac_exeext"
25684 if { (eval echo "$as_me:25684: \"$ac_link\"") >&5
25685   (eval $ac_link) 2>&5
25686   ac_status=$?
25687   echo "$as_me:25687: \$? = $ac_status" >&5
25688   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25689   { (eval echo "$as_me:25689: \"$ac_try\"") >&5
25690   (eval $ac_try) 2>&5
25691   ac_status=$?
25692   echo "$as_me:25692: \$? = $ac_status" >&5
25693   (exit "$ac_status"); }; }; then
25694   cf_cv_cpp_param_init=yes
25695 else
25696   echo "$as_me: program exited with status $ac_status" >&5
25697 echo "$as_me: failed program was:" >&5
25698 cat "conftest.$ac_ext" >&5
25699 cf_cv_cpp_param_init=no
25700 fi
25701 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25702 fi
25703         ac_ext=cc
25704 ac_cpp='$CXXCPP $CPPFLAGS'
25705 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25706 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25707 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25708 ac_main_return="return"
25709
25710 fi
25711 echo "$as_me:25711: result: $cf_cv_cpp_param_init" >&5
25712 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
25713 fi
25714 test "$cf_cv_cpp_param_init" = yes &&
25715 cat >>confdefs.h <<\EOF
25716 #define CPP_HAS_PARAM_INIT 1
25717 EOF
25718
25719 if test -n "$CXX"; then
25720
25721 echo "$as_me:25721: checking if $CXX accepts static_cast" >&5
25722 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
25723 if test "${cf_cv_cpp_static_cast+set}" = set; then
25724   echo $ECHO_N "(cached) $ECHO_C" >&6
25725 else
25726
25727         ac_ext=cc
25728 ac_cpp='$CXXCPP $CPPFLAGS'
25729 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25730 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25731 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25732 ac_main_return="return"
25733
25734         cat >"conftest.$ac_ext" <<_ACEOF
25735 #line 25735 "configure"
25736 #include "confdefs.h"
25737
25738 class NCursesPanel
25739 {
25740 public:
25741   NCursesPanel(int nlines,
25742                int ncols,
25743                int begin_y = 0,
25744                int begin_x = 0)
25745   {
25746   }
25747   NCursesPanel();
25748   ~NCursesPanel();
25749 };
25750
25751 template<class T> class NCursesUserPanel : public NCursesPanel
25752 {
25753 public:
25754   NCursesUserPanel (int nlines,
25755                     int ncols,
25756                     int begin_y = 0,
25757                     int begin_x = 0,
25758                     const T* p_UserData = static_cast<T*>(0))
25759     : NCursesPanel (nlines, ncols, begin_y, begin_x)
25760   {
25761   };
25762   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
25763   {
25764   };
25765
25766   virtual ~NCursesUserPanel() {};
25767 };
25768
25769 int
25770 main (void)
25771 {
25772
25773         const char* p_UserData = static_cast<char*>(0)
25774   ;
25775   return 0;
25776 }
25777 _ACEOF
25778 rm -f "conftest.$ac_objext"
25779 if { (eval echo "$as_me:25779: \"$ac_compile\"") >&5
25780   (eval $ac_compile) 2>&5
25781   ac_status=$?
25782   echo "$as_me:25782: \$? = $ac_status" >&5
25783   (exit "$ac_status"); } &&
25784          { ac_try='test -s "conftest.$ac_objext"'
25785   { (eval echo "$as_me:25785: \"$ac_try\"") >&5
25786   (eval $ac_try) 2>&5
25787   ac_status=$?
25788   echo "$as_me:25788: \$? = $ac_status" >&5
25789   (exit "$ac_status"); }; }; then
25790   cf_cv_cpp_static_cast=yes
25791 else
25792   echo "$as_me: failed program was:" >&5
25793 cat "conftest.$ac_ext" >&5
25794 cf_cv_cpp_static_cast=no
25795 fi
25796 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25797
25798         ac_ext=cc
25799 ac_cpp='$CXXCPP $CPPFLAGS'
25800 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25801 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25802 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25803 ac_main_return="return"
25804
25805 fi
25806 echo "$as_me:25806: result: $cf_cv_cpp_static_cast" >&5
25807 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
25808
25809 fi
25810
25811 test "$cf_cv_cpp_static_cast" = yes &&
25812 cat >>confdefs.h <<\EOF
25813 #define CPP_HAS_STATIC_CAST 1
25814 EOF
25815
25816         CXX_AR='$(AR)'
25817         CXX_ARFLAGS='$(ARFLAGS)'
25818         case "$cf_cv_system_name" in
25819         (irix*)
25820             if test "$GXX" != yes ; then
25821                 CXX_AR='$(CXX)'
25822                 CXX_ARFLAGS='-ar -o'
25823             fi
25824             ;;
25825         (sco3.2v5*)
25826             CXXLDFLAGS="-u main"
25827             ;;
25828         (solaris2*)
25829             if test "$GXX" != yes ; then
25830                 CXX_AR='$(CXX)'
25831                 CXX_ARFLAGS='-xar -o'
25832             fi
25833             ;;
25834         esac
25835
25836 else
25837         cf_cxx_library=no
25838         cf_cv_builtin_bool=1
25839
25840         # Just because we are not configuring against C++ right now does not
25841         # mean that a user will not want to use C++.  Some distributors disable
25842         # the C++ portion of this configuration as a shortcut (or just to avoid
25843         # compiling the demo in the c++ directory).  So we need a reasonable
25844         # default for the 'bool' type.
25845         #
25846         # Caveat: since the storage of the bool type is not standardized, it
25847         # may change.
25848
25849         if test "$NCURSES_BOOL" != auto ; then
25850                 cf_cv_type_of_bool=$NCURSES_BOOL
25851                 cf_cv_header_stdbool_h=0
25852         else
25853                 if test "$cf_cv_header_stdbool_h" = 1 ; then
25854
25855 echo "$as_me:25855: checking for bool" >&5
25856 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25857 if test "${ac_cv_type_bool+set}" = set; then
25858   echo $ECHO_N "(cached) $ECHO_C" >&6
25859 else
25860   cat >"conftest.$ac_ext" <<_ACEOF
25861 #line 25861 "configure"
25862 #include "confdefs.h"
25863
25864 #include <stdlib.h>
25865 #include <stdio.h>
25866
25867 #if defined(__cplusplus)
25868
25869 #ifdef HAVE_GXX_BUILTIN_H
25870 #include <g++/builtin.h>
25871 #elif HAVE_GPP_BUILTIN_H
25872 #include <gpp/builtin.h>
25873 #elif HAVE_BUILTIN_H
25874 #include <builtin.h>
25875 #endif
25876
25877 #else
25878
25879 #if $cf_cv_header_stdbool_h
25880 #include <stdbool.h>
25881 #endif
25882
25883 #endif
25884
25885 int
25886 main (void)
25887 {
25888 if ((bool *) 0)
25889   return 0;
25890 if (sizeof (bool))
25891   return 0;
25892   ;
25893   return 0;
25894 }
25895 _ACEOF
25896 rm -f "conftest.$ac_objext"
25897 if { (eval echo "$as_me:25897: \"$ac_compile\"") >&5
25898   (eval $ac_compile) 2>&5
25899   ac_status=$?
25900   echo "$as_me:25900: \$? = $ac_status" >&5
25901   (exit "$ac_status"); } &&
25902          { ac_try='test -s "conftest.$ac_objext"'
25903   { (eval echo "$as_me:25903: \"$ac_try\"") >&5
25904   (eval $ac_try) 2>&5
25905   ac_status=$?
25906   echo "$as_me:25906: \$? = $ac_status" >&5
25907   (exit "$ac_status"); }; }; then
25908   ac_cv_type_bool=yes
25909 else
25910   echo "$as_me: failed program was:" >&5
25911 cat "conftest.$ac_ext" >&5
25912 ac_cv_type_bool=no
25913 fi
25914 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25915 fi
25916 echo "$as_me:25916: result: $ac_cv_type_bool" >&5
25917 echo "${ECHO_T}$ac_cv_type_bool" >&6
25918
25919 echo "$as_me:25919: checking size of bool" >&5
25920 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25921 if test "${ac_cv_sizeof_bool+set}" = set; then
25922   echo $ECHO_N "(cached) $ECHO_C" >&6
25923 else
25924   if test "$ac_cv_type_bool" = yes; then
25925   if test "$cross_compiling" = yes; then
25926   # Depending upon the size, compute the lo and hi bounds.
25927 cat >"conftest.$ac_ext" <<_ACEOF
25928 #line 25928 "configure"
25929 #include "confdefs.h"
25930
25931 #include <stdlib.h>
25932 #include <stdio.h>
25933
25934 #if defined(__cplusplus)
25935
25936 #ifdef HAVE_GXX_BUILTIN_H
25937 #include <g++/builtin.h>
25938 #elif HAVE_GPP_BUILTIN_H
25939 #include <gpp/builtin.h>
25940 #elif HAVE_BUILTIN_H
25941 #include <builtin.h>
25942 #endif
25943
25944 #else
25945
25946 #if $cf_cv_header_stdbool_h
25947 #include <stdbool.h>
25948 #endif
25949
25950 #endif
25951
25952 int
25953 main (void)
25954 {
25955 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25956   ;
25957   return 0;
25958 }
25959 _ACEOF
25960 rm -f "conftest.$ac_objext"
25961 if { (eval echo "$as_me:25961: \"$ac_compile\"") >&5
25962   (eval $ac_compile) 2>&5
25963   ac_status=$?
25964   echo "$as_me:25964: \$? = $ac_status" >&5
25965   (exit "$ac_status"); } &&
25966          { ac_try='test -s "conftest.$ac_objext"'
25967   { (eval echo "$as_me:25967: \"$ac_try\"") >&5
25968   (eval $ac_try) 2>&5
25969   ac_status=$?
25970   echo "$as_me:25970: \$? = $ac_status" >&5
25971   (exit "$ac_status"); }; }; then
25972   ac_lo=0 ac_mid=0
25973   while :; do
25974     cat >"conftest.$ac_ext" <<_ACEOF
25975 #line 25975 "configure"
25976 #include "confdefs.h"
25977
25978 #include <stdlib.h>
25979 #include <stdio.h>
25980
25981 #if defined(__cplusplus)
25982
25983 #ifdef HAVE_GXX_BUILTIN_H
25984 #include <g++/builtin.h>
25985 #elif HAVE_GPP_BUILTIN_H
25986 #include <gpp/builtin.h>
25987 #elif HAVE_BUILTIN_H
25988 #include <builtin.h>
25989 #endif
25990
25991 #else
25992
25993 #if $cf_cv_header_stdbool_h
25994 #include <stdbool.h>
25995 #endif
25996
25997 #endif
25998
25999 int
26000 main (void)
26001 {
26002 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26003   ;
26004   return 0;
26005 }
26006 _ACEOF
26007 rm -f "conftest.$ac_objext"
26008 if { (eval echo "$as_me:26008: \"$ac_compile\"") >&5
26009   (eval $ac_compile) 2>&5
26010   ac_status=$?
26011   echo "$as_me:26011: \$? = $ac_status" >&5
26012   (exit "$ac_status"); } &&
26013          { ac_try='test -s "conftest.$ac_objext"'
26014   { (eval echo "$as_me:26014: \"$ac_try\"") >&5
26015   (eval $ac_try) 2>&5
26016   ac_status=$?
26017   echo "$as_me:26017: \$? = $ac_status" >&5
26018   (exit "$ac_status"); }; }; then
26019   ac_hi=$ac_mid; break
26020 else
26021   echo "$as_me: failed program was:" >&5
26022 cat "conftest.$ac_ext" >&5
26023 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26024 fi
26025 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26026   done
26027 else
26028   echo "$as_me: failed program was:" >&5
26029 cat "conftest.$ac_ext" >&5
26030 ac_hi=-1 ac_mid=-1
26031   while :; do
26032     cat >"conftest.$ac_ext" <<_ACEOF
26033 #line 26033 "configure"
26034 #include "confdefs.h"
26035
26036 #include <stdlib.h>
26037 #include <stdio.h>
26038
26039 #if defined(__cplusplus)
26040
26041 #ifdef HAVE_GXX_BUILTIN_H
26042 #include <g++/builtin.h>
26043 #elif HAVE_GPP_BUILTIN_H
26044 #include <gpp/builtin.h>
26045 #elif HAVE_BUILTIN_H
26046 #include <builtin.h>
26047 #endif
26048
26049 #else
26050
26051 #if $cf_cv_header_stdbool_h
26052 #include <stdbool.h>
26053 #endif
26054
26055 #endif
26056
26057 int
26058 main (void)
26059 {
26060 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26061   ;
26062   return 0;
26063 }
26064 _ACEOF
26065 rm -f "conftest.$ac_objext"
26066 if { (eval echo "$as_me:26066: \"$ac_compile\"") >&5
26067   (eval $ac_compile) 2>&5
26068   ac_status=$?
26069   echo "$as_me:26069: \$? = $ac_status" >&5
26070   (exit "$ac_status"); } &&
26071          { ac_try='test -s "conftest.$ac_objext"'
26072   { (eval echo "$as_me:26072: \"$ac_try\"") >&5
26073   (eval $ac_try) 2>&5
26074   ac_status=$?
26075   echo "$as_me:26075: \$? = $ac_status" >&5
26076   (exit "$ac_status"); }; }; then
26077   ac_lo=$ac_mid; break
26078 else
26079   echo "$as_me: failed program was:" >&5
26080 cat "conftest.$ac_ext" >&5
26081 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26082 fi
26083 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26084   done
26085 fi
26086 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26087 # Binary search between lo and hi bounds.
26088 while test "x$ac_lo" != "x$ac_hi"; do
26089   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26090   cat >"conftest.$ac_ext" <<_ACEOF
26091 #line 26091 "configure"
26092 #include "confdefs.h"
26093
26094 #include <stdlib.h>
26095 #include <stdio.h>
26096
26097 #if defined(__cplusplus)
26098
26099 #ifdef HAVE_GXX_BUILTIN_H
26100 #include <g++/builtin.h>
26101 #elif HAVE_GPP_BUILTIN_H
26102 #include <gpp/builtin.h>
26103 #elif HAVE_BUILTIN_H
26104 #include <builtin.h>
26105 #endif
26106
26107 #else
26108
26109 #if $cf_cv_header_stdbool_h
26110 #include <stdbool.h>
26111 #endif
26112
26113 #endif
26114
26115 int
26116 main (void)
26117 {
26118 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26119   ;
26120   return 0;
26121 }
26122 _ACEOF
26123 rm -f "conftest.$ac_objext"
26124 if { (eval echo "$as_me:26124: \"$ac_compile\"") >&5
26125   (eval $ac_compile) 2>&5
26126   ac_status=$?
26127   echo "$as_me:26127: \$? = $ac_status" >&5
26128   (exit "$ac_status"); } &&
26129          { ac_try='test -s "conftest.$ac_objext"'
26130   { (eval echo "$as_me:26130: \"$ac_try\"") >&5
26131   (eval $ac_try) 2>&5
26132   ac_status=$?
26133   echo "$as_me:26133: \$? = $ac_status" >&5
26134   (exit "$ac_status"); }; }; then
26135   ac_hi=$ac_mid
26136 else
26137   echo "$as_me: failed program was:" >&5
26138 cat "conftest.$ac_ext" >&5
26139 ac_lo=`expr "$ac_mid" + 1`
26140 fi
26141 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26142 done
26143 ac_cv_sizeof_bool=$ac_lo
26144 else
26145   if test "$cross_compiling" = yes; then
26146   { { echo "$as_me:26146: error: cannot run test program while cross compiling" >&5
26147 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26148    { (exit 1); exit 1; }; }
26149 else
26150   cat >"conftest.$ac_ext" <<_ACEOF
26151 #line 26151 "configure"
26152 #include "confdefs.h"
26153
26154 #include <stdlib.h>
26155 #include <stdio.h>
26156
26157 #if defined(__cplusplus)
26158
26159 #ifdef HAVE_GXX_BUILTIN_H
26160 #include <g++/builtin.h>
26161 #elif HAVE_GPP_BUILTIN_H
26162 #include <gpp/builtin.h>
26163 #elif HAVE_BUILTIN_H
26164 #include <builtin.h>
26165 #endif
26166
26167 #else
26168
26169 #if $cf_cv_header_stdbool_h
26170 #include <stdbool.h>
26171 #endif
26172
26173 #endif
26174
26175 int
26176 main (void)
26177 {
26178 FILE *f = fopen ("conftest.val", "w");
26179 if (!f)
26180   $ac_main_return (1);
26181 fprintf (f, "%ld", (long)(sizeof (bool)));
26182 fclose (f);
26183   ;
26184   return 0;
26185 }
26186 _ACEOF
26187 rm -f "conftest$ac_exeext"
26188 if { (eval echo "$as_me:26188: \"$ac_link\"") >&5
26189   (eval $ac_link) 2>&5
26190   ac_status=$?
26191   echo "$as_me:26191: \$? = $ac_status" >&5
26192   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26193   { (eval echo "$as_me:26193: \"$ac_try\"") >&5
26194   (eval $ac_try) 2>&5
26195   ac_status=$?
26196   echo "$as_me:26196: \$? = $ac_status" >&5
26197   (exit "$ac_status"); }; }; then
26198   ac_cv_sizeof_bool=`cat conftest.val`
26199 else
26200   echo "$as_me: program exited with status $ac_status" >&5
26201 echo "$as_me: failed program was:" >&5
26202 cat "conftest.$ac_ext" >&5
26203 fi
26204 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26205 fi
26206 fi
26207 rm -f conftest.val
26208 else
26209   ac_cv_sizeof_bool=0
26210 fi
26211 fi
26212 echo "$as_me:26212: result: $ac_cv_sizeof_bool" >&5
26213 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26214 cat >>confdefs.h <<EOF
26215 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26216 EOF
26217
26218 echo "$as_me:26218: checking for type of bool" >&5
26219 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26220 if test "${cf_cv_type_of_bool+set}" = set; then
26221   echo $ECHO_N "(cached) $ECHO_C" >&6
26222 else
26223
26224         rm -f cf_test.out
26225         if test "$cross_compiling" = yes; then
26226
26227                 case x$ac_cv_sizeof_bool in
26228                 (x1) cf_cv_type_of_bool="unsigned char";;
26229                 (x2) cf_cv_type_of_bool="unsigned short";;
26230                 (x4) cf_cv_type_of_bool="unsigned int";;
26231                 (x8) cf_cv_type_of_bool="unsigned long";;
26232                 (*)  cf_cv_type_of_bool=unknown;;
26233                 esac
26234
26235 else
26236   cat >"conftest.$ac_ext" <<_ACEOF
26237 #line 26237 "configure"
26238 #include "confdefs.h"
26239
26240 #include <stdlib.h>
26241 #include <stdio.h>
26242
26243 #if defined(__cplusplus)
26244
26245 #ifdef HAVE_GXX_BUILTIN_H
26246 #include <g++/builtin.h>
26247 #elif HAVE_GPP_BUILTIN_H
26248 #include <gpp/builtin.h>
26249 #elif HAVE_BUILTIN_H
26250 #include <builtin.h>
26251 #endif
26252
26253 #else
26254
26255 #if $cf_cv_header_stdbool_h
26256 #include <stdbool.h>
26257 #endif
26258
26259 #endif
26260
26261 int main(void)
26262 {
26263         FILE *fp = fopen("cf_test.out", "w");
26264         if (fp != 0) {
26265                 bool x = true;
26266                 if ((bool)(-x) >= 0)
26267                         fputs("unsigned ", fp);
26268                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26269                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26270                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26271                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26272                 fclose(fp);
26273         }
26274         ${cf_cv_main_return:-return}(0);
26275 }
26276
26277 _ACEOF
26278 rm -f "conftest$ac_exeext"
26279 if { (eval echo "$as_me:26279: \"$ac_link\"") >&5
26280   (eval $ac_link) 2>&5
26281   ac_status=$?
26282   echo "$as_me:26282: \$? = $ac_status" >&5
26283   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26284   { (eval echo "$as_me:26284: \"$ac_try\"") >&5
26285   (eval $ac_try) 2>&5
26286   ac_status=$?
26287   echo "$as_me:26287: \$? = $ac_status" >&5
26288   (exit "$ac_status"); }; }; then
26289   cf_cv_type_of_bool=`cat cf_test.out`
26290                  if test -z "$cf_cv_type_of_bool"; then
26291                    cf_cv_type_of_bool=unknown
26292                  fi
26293 else
26294   echo "$as_me: program exited with status $ac_status" >&5
26295 echo "$as_me: failed program was:" >&5
26296 cat "conftest.$ac_ext" >&5
26297 cf_cv_type_of_bool=unknown
26298 fi
26299 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26300 fi
26301         rm -f cf_test.out
26302
26303 fi
26304 echo "$as_me:26304: result: $cf_cv_type_of_bool" >&5
26305 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26306
26307 if test "$cf_cv_type_of_bool" = unknown ; then
26308         case .$NCURSES_BOOL in
26309         (.auto|.) NCURSES_BOOL=unsigned;;
26310         esac
26311         { echo "$as_me:26311: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26312 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26313         cf_cv_type_of_bool=$NCURSES_BOOL
26314 fi
26315
26316                 else
26317                         echo "$as_me:26317: checking for fallback type of bool" >&5
26318 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
26319                         case "$host_cpu" in
26320                         (i?86)  cf_cv_type_of_bool=char ;;
26321                         (*)     cf_cv_type_of_bool=int  ;;
26322                         esac
26323                         echo "$as_me:26323: result: $cf_cv_type_of_bool" >&5
26324 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26325                 fi
26326         fi
26327 fi
26328
26329 # If the C compiler did not declare bool, and we did not determine that the C++
26330 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
26331 # ncurses library use the same type as C++ bool.  Note that this allows one to
26332 # specify the type of bool in a configure-script option and postpone
26333 # integration with the C++ compiler provided that the types are compatible.
26334 USE_CXX_BOOL=1
26335 if test "$cf_cv_cc_bool_type" = 1
26336 then
26337         # oops: C has a bool.  Unlikely, but C++ could differ.
26338         USE_CXX_BOOL=0
26339 elif test "$cf_cv_builtin_bool" = 0
26340 then
26341         # C++ has no bool
26342         USE_CXX_BOOL=0
26343 else
26344         # this is the normal case
26345         USE_CXX_BOOL='defined(__cplusplus)'
26346 fi
26347
26348 if test -f "${srcdir}/Ada95/Makefile.in" ; then
26349
26350         if test "$cf_with_ada" != "no" ; then
26351                 if test "$with_libtool" != "no"; then
26352                         { echo "$as_me:26352: WARNING: libtool does not support Ada - disabling feature" >&5
26353 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
26354                         cf_with_ada=no
26355                 fi
26356         fi
26357
26358         if test "$cf_with_ada" != "no" ; then
26359
26360 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
26361 do
26362
26363 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26364
26365         unset ac_cv_path_cf_TEMP_gnat
26366         unset cf_TEMP_gnat
26367         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
26368 set dummy $cf_prog_gnat; ac_word=$2
26369 echo "$as_me:26369: checking for $ac_word" >&5
26370 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26371 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
26372   echo $ECHO_N "(cached) $ECHO_C" >&6
26373 else
26374   case $cf_TEMP_gnat in
26375   [\\/]* | ?:[\\/]*)
26376   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
26377   ;;
26378   *)
26379   ac_save_IFS=$IFS; IFS=$ac_path_separator
26380 ac_dummy="$PATH"
26381 for ac_dir in $ac_dummy; do
26382   IFS=$ac_save_IFS
26383   test -z "$ac_dir" && ac_dir=.
26384   if $as_executable_p "$ac_dir/$ac_word"; then
26385    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
26386    echo "$as_me:26386: found $ac_dir/$ac_word" >&5
26387    break
26388 fi
26389 done
26390
26391   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
26392   ;;
26393 esac
26394 fi
26395 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
26396
26397 if test -n "$cf_TEMP_gnat"; then
26398   echo "$as_me:26398: result: $cf_TEMP_gnat" >&5
26399 echo "${ECHO_T}$cf_TEMP_gnat" >&6
26400 else
26401   echo "$as_me:26401: result: no" >&5
26402 echo "${ECHO_T}no" >&6
26403 fi
26404
26405         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
26406
26407         if test "x$cf_TEMP_gnat" != xno; then
26408                 unset cf_cv_gnat_version
26409                 unset cf_TEMP_gnat
26410
26411 echo "$as_me:26411: checking for $cf_prog_gnat version" >&5
26412 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
26413 if test "${cf_cv_gnat_version+set}" = set; then
26414   echo $ECHO_N "(cached) $ECHO_C" >&6
26415 else
26416
26417 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
26418         grep '[0-9].[0-9][0-9]*' |\
26419         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26420
26421 fi
26422 echo "$as_me:26422: result: $cf_cv_gnat_version" >&5
26423 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26424 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26425 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
26426
26427         fi
26428         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
26429
26430         unset cf_TEMP_gnat
26431         unset cf_cv_gnat_version
26432         unset ac_cv_path_cf_TEMP_gnat
26433 done
26434
26435 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
26436         cf_ada_make=
26437         cf_cv_prog_gnat_correct=no
26438 else
26439         cf_ada_make=gnatmake
26440         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
26441                 # gprconfig is newer than gnatmake; we can continue...
26442                 cf_ada_config="##"
26443         else
26444                 rm -rf ./conftest* ./*~conftest*
26445                 if mkdir conftest.src
26446                 then
26447                         cf_ada_config=""
26448                         cd conftest.src
26449                         for cf_gprconfig in Ada C
26450                         do
26451                                 echo "$as_me:26451: checking for gprconfig name for $cf_gprconfig" >&5
26452 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
26453                                 if test "$cf_gprconfig" = C
26454                                 then
26455                                         for cf_gprconfig_param in \
26456                                                 "$cf_gprconfig,,,,GNATGCC" \
26457                                                 "$cf_gprconfig,,,,GCC" \
26458                                                 "$cf_gprconfig"
26459                                         do
26460                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26461                                                 test -n "$cf_gprconfig_value" && break
26462                                         done
26463                                 else
26464                                         cf_gprconfig_param=$cf_gprconfig
26465                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26466                                 fi
26467                                 if test -n "$cf_gprconfig_value"
26468                                 then
26469                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
26470                                         echo "$as_me:26470: result: $cf_gprconfig_value" >&5
26471 echo "${ECHO_T}$cf_gprconfig_value" >&6
26472                                 else
26473                                         echo "$as_me:26473: result: missing" >&5
26474 echo "${ECHO_T}missing" >&6
26475                                         cf_ada_config="#"
26476                                         break
26477                                 fi
26478                         done
26479                         cd ..
26480                         rm -rf ./conftest* ./*~conftest*
26481                 fi
26482         fi
26483         if test "x$cf_ada_config" != "x#"
26484         then
26485
26486 echo "$as_me:26486: checking for gnat version" >&5
26487 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
26488 if test "${cf_cv_gnat_version+set}" = set; then
26489   echo $ECHO_N "(cached) $ECHO_C" >&6
26490 else
26491
26492 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
26493         grep '[0-9].[0-9][0-9]*' |\
26494         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26495
26496 fi
26497 echo "$as_me:26497: result: $cf_cv_gnat_version" >&5
26498 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26499 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26500
26501 case "$cf_cv_gnat_version" in
26502 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26503         cf_cv_prog_gnat_correct=yes
26504         ;;
26505 (*)
26506         { echo "$as_me:26506: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
26507 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
26508         cf_cv_prog_gnat_correct=no
26509         ;;
26510 esac
26511
26512                 # Extract the first word of "m4", so it can be a program name with args.
26513 set dummy m4; ac_word=$2
26514 echo "$as_me:26514: checking for $ac_word" >&5
26515 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26516 if test "${ac_cv_prog_M4_exists+set}" = set; then
26517   echo $ECHO_N "(cached) $ECHO_C" >&6
26518 else
26519   if test -n "$M4_exists"; then
26520   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
26521 else
26522   ac_save_IFS=$IFS; IFS=$ac_path_separator
26523 ac_dummy="$PATH"
26524 for ac_dir in $ac_dummy; do
26525   IFS=$ac_save_IFS
26526   test -z "$ac_dir" && ac_dir=.
26527   $as_executable_p "$ac_dir/$ac_word" || continue
26528 ac_cv_prog_M4_exists="yes"
26529 echo "$as_me:26529: found $ac_dir/$ac_word" >&5
26530 break
26531 done
26532
26533   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
26534 fi
26535 fi
26536 M4_exists=$ac_cv_prog_M4_exists
26537 if test -n "$M4_exists"; then
26538   echo "$as_me:26538: result: $M4_exists" >&5
26539 echo "${ECHO_T}$M4_exists" >&6
26540 else
26541   echo "$as_me:26541: result: no" >&5
26542 echo "${ECHO_T}no" >&6
26543 fi
26544
26545                 if test "$ac_cv_prog_M4_exists" = no; then
26546                         cf_cv_prog_gnat_correct=no
26547                         { echo "$as_me:26547: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
26548 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
26549                 fi
26550                 if test "$cf_cv_prog_gnat_correct" = yes; then
26551                         echo "$as_me:26551: checking if GNAT works" >&5
26552 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
26553
26554 rm -rf ./conftest* ./*~conftest*
26555 cat >>conftest.ads <<CF_EOF
26556 procedure conftest;
26557 CF_EOF
26558 cat >>conftest.adb <<CF_EOF
26559 with Text_IO;
26560 with GNAT.OS_Lib;
26561 procedure conftest is
26562 begin
26563    Text_IO.Put ("Hello World");
26564    Text_IO.New_Line;
26565    GNAT.OS_Lib.OS_Exit (0);
26566 end conftest;
26567 CF_EOF
26568 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26569    if ( ./conftest 1>&5 2>&1 ) ; then
26570       cf_cv_prog_gnat_correct=yes
26571    else
26572       cf_cv_prog_gnat_correct=no
26573    fi
26574 else
26575    cf_cv_prog_gnat_correct=no
26576 fi
26577 rm -rf ./conftest* ./*~conftest*
26578
26579                         echo "$as_me:26579: result: $cf_cv_prog_gnat_correct" >&5
26580 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
26581                 fi
26582         else
26583                 cf_cv_prog_gnat_correct=no
26584         fi
26585 fi
26586
26587                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
26588
26589         ADAFLAGS="$ADAFLAGS -gnatpn"
26590
26591         echo "$as_me:26591: checking optimization options for ADAFLAGS" >&5
26592 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
26593         case "$CFLAGS" in
26594         (*-g*)
26595
26596         ADAFLAGS="$ADAFLAGS -g"
26597
26598                 ;;
26599         esac
26600         case "$CFLAGS" in
26601         (*-O*)
26602                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
26603
26604         ADAFLAGS="$ADAFLAGS $cf_O_flag"
26605
26606                 ;;
26607         esac
26608         echo "$as_me:26608: result: $ADAFLAGS" >&5
26609 echo "${ECHO_T}$ADAFLAGS" >&6
26610
26611 echo "$as_me:26611: checking if GNATPREP supports -T option" >&5
26612 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
26613 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
26614   echo $ECHO_N "(cached) $ECHO_C" >&6
26615 else
26616
26617 cf_cv_gnatprep_opt_t=no
26618 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
26619
26620 fi
26621 echo "$as_me:26621: result: $cf_cv_gnatprep_opt_t" >&5
26622 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
26623 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
26624
26625 echo "$as_me:26625: checking if GNAT supports generics" >&5
26626 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
26627 case "$cf_cv_gnat_version" in
26628 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26629         cf_gnat_generics=yes
26630         ;;
26631 (*)
26632         cf_gnat_generics=no
26633         ;;
26634 esac
26635 echo "$as_me:26635: result: $cf_gnat_generics" >&5
26636 echo "${ECHO_T}$cf_gnat_generics" >&6
26637
26638 if test "$cf_gnat_generics" = yes
26639 then
26640         cf_compile_generics=generics
26641         cf_generic_objects="\${GENOBJS}"
26642 else
26643         cf_compile_generics=
26644         cf_generic_objects=
26645 fi
26646
26647 echo "$as_me:26647: checking if GNAT supports SIGINT" >&5
26648 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
26649 if test "${cf_cv_gnat_sigint+set}" = set; then
26650   echo $ECHO_N "(cached) $ECHO_C" >&6
26651 else
26652
26653 rm -rf ./conftest* ./*~conftest*
26654 cat >>conftest.ads <<CF_EOF
26655 with Ada.Interrupts.Names;
26656
26657 package ConfTest is
26658
26659    pragma Warnings (Off);  --  the next pragma exists since 3.11p
26660    pragma Unreserve_All_Interrupts;
26661    pragma Warnings (On);
26662
26663    protected Process is
26664       procedure Stop;
26665       function Continue return Boolean;
26666       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
26667    private
26668       Done : Boolean := False;
26669    end Process;
26670
26671 end ConfTest;
26672 CF_EOF
26673 cat >>conftest.adb <<CF_EOF
26674 package body ConfTest is
26675    protected body Process is
26676       procedure Stop is
26677       begin
26678          Done := True;
26679       end Stop;
26680       function Continue return Boolean is
26681       begin
26682          return not Done;
26683       end Continue;
26684    end Process;
26685 end ConfTest;
26686 CF_EOF
26687 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26688       cf_cv_gnat_sigint=yes
26689 else
26690    cf_cv_gnat_sigint=no
26691 fi
26692 rm -rf ./conftest* ./*~conftest*
26693
26694 fi
26695 echo "$as_me:26695: result: $cf_cv_gnat_sigint" >&5
26696 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
26697
26698 if test "$cf_cv_gnat_sigint" = yes ; then
26699         USE_GNAT_SIGINT=""
26700 else
26701         USE_GNAT_SIGINT="#"
26702 fi
26703
26704 cf_gnat_libraries=no
26705 cf_gnat_projects=no
26706
26707 if test "$enable_gnat_projects" != no ; then
26708 echo "$as_me:26708: checking if GNAT supports project files" >&5
26709 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
26710 case "$cf_cv_gnat_version" in
26711 (3.[0-9]*)
26712         ;;
26713 (*)
26714         case "$cf_cv_system_name" in
26715         (cygwin*|msys*)
26716                 ;;
26717         (*)
26718                 rm -rf ./conftest* ./*~conftest*
26719                 if mkdir conftest.src conftest.bin conftest.lib
26720                 then
26721                         cd conftest.src
26722                         rm -rf ./conftest* ./*~conftest*
26723                         cat >>library.gpr <<CF_EOF
26724 project Library is
26725   Kind := External ("LIB_KIND");
26726   for Library_Name use "ConfTest";
26727   for Object_Dir use ".";
26728   for Library_ALI_Dir use External("LIBRARY_DIR");
26729   for Library_Version use External ("SONAME");
26730   for Library_Kind use Kind;
26731   for Library_Dir use External("BUILD_DIR");
26732   Source_Dir := External ("SOURCE_DIR");
26733   for Source_Dirs use (Source_Dir);
26734 end Library;
26735 CF_EOF
26736                         cat >>confpackage.ads <<CF_EOF
26737 package ConfPackage is
26738    procedure conftest;
26739 end ConfPackage;
26740 CF_EOF
26741                         cat >>confpackage.adb <<CF_EOF
26742 with Text_IO;
26743 package body ConfPackage is
26744    procedure conftest is
26745    begin
26746       Text_IO.Put ("Hello World");
26747       Text_IO.New_Line;
26748    end conftest;
26749 end ConfPackage;
26750 CF_EOF
26751                         if ( "$cf_ada_make" $ADAFLAGS \
26752                                         -Plibrary.gpr \
26753                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
26754                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
26755                                         -XSOURCE_DIR="`pwd`" \
26756                                         -XSONAME=libConfTest.so.1 \
26757                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
26758                                 cf_gnat_projects=yes
26759                         fi
26760                         cd ..
26761                 fi
26762                 if test -f conftest.lib/confpackage.ali
26763                 then
26764                         cf_gnat_libraries=yes
26765                 fi
26766                 rm -rf ./conftest* ./*~conftest*
26767                 ;;
26768         esac
26769         ;;
26770 esac
26771 echo "$as_me:26771: result: $cf_gnat_projects" >&5
26772 echo "${ECHO_T}$cf_gnat_projects" >&6
26773 fi # enable_gnat_projects
26774
26775 if test "$cf_gnat_projects" = yes
26776 then
26777         echo "$as_me:26777: checking if GNAT supports libraries" >&5
26778 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
26779         echo "$as_me:26779: result: $cf_gnat_libraries" >&5
26780 echo "${ECHO_T}$cf_gnat_libraries" >&6
26781 fi
26782
26783 USE_OLD_MAKERULES=""
26784 USE_GNAT_PROJECTS="#"
26785 USE_GNAT_MAKE_GPR="#"
26786 USE_GNAT_GPRBUILD="#"
26787
26788 if test "$cf_gnat_projects" = yes
26789 then
26790         USE_OLD_MAKERULES="#"
26791         USE_GNAT_PROJECTS=""
26792         if test "$cf_cv_VERSION_GPRBUILD" != no
26793         then
26794                 USE_GNAT_GPRBUILD=""
26795         elif test "$cf_cv_VERSION_GNATMAKE" != no
26796         then
26797                 USE_GNAT_MAKE_GPR=""
26798         else
26799                 { echo "$as_me:26799: WARNING: use old makefile rules since tools are missing" >&5
26800 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
26801         fi
26802 fi
26803
26804 if test "$cf_gnat_libraries" = yes
26805 then
26806         USE_GNAT_LIBRARIES=""
26807 else
26808         USE_GNAT_LIBRARIES="#"
26809 fi
26810
26811 echo "$as_me:26811: checking for ada-compiler" >&5
26812 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
26813
26814 # Check whether --with-ada-compiler or --without-ada-compiler was given.
26815 if test "${with_ada_compiler+set}" = set; then
26816   withval="$with_ada_compiler"
26817   cf_ada_compiler=$withval
26818 else
26819   cf_ada_compiler=gnatmake
26820 fi;
26821
26822 echo "$as_me:26822: result: $cf_ada_compiler" >&5
26823 echo "${ECHO_T}$cf_ada_compiler" >&6
26824
26825                         cf_ada_package=terminal_interface
26826
26827 echo "$as_me:26827: checking for ada-include" >&5
26828 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
26829
26830 # Check whether --with-ada-include or --without-ada-include was given.
26831 if test "${with_ada_include+set}" = set; then
26832   withval="$with_ada_include"
26833
26834 else
26835   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
26836 fi; if test -n "$prefix/share/ada/adainclude" ; then
26837
26838 if test "x$prefix" != xNONE; then
26839         cf_path_syntax="$prefix"
26840 else
26841         cf_path_syntax="$ac_default_prefix"
26842 fi
26843
26844 case ".$withval" in
26845 (.\$\(*\)*|.\'*\'*)
26846         ;;
26847 (..|./*|.\\*)
26848         ;;
26849 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
26850         ;;
26851 (.\$\{*prefix\}*|.\$\{*dir\}*)
26852         eval withval="$withval"
26853         case ".$withval" in
26854         (.NONE/*)
26855                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26856                 ;;
26857         esac
26858         ;;
26859 (.no|.NONE/*)
26860         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26861         ;;
26862 (*)
26863         { { echo "$as_me:26863: error: expected a pathname, not \"$withval\"" >&5
26864 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
26865    { (exit 1); exit 1; }; }
26866         ;;
26867 esac
26868
26869 fi
26870 eval ADA_INCLUDE="$withval"
26871
26872 echo "$as_me:26872: result: $ADA_INCLUDE" >&5
26873 echo "${ECHO_T}$ADA_INCLUDE" >&6
26874
26875 echo "$as_me:26875: checking for ada-objects" >&5
26876 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
26877
26878 # Check whether --with-ada-objects or --without-ada-objects was given.
26879 if test "${with_ada_objects+set}" = set; then
26880   withval="$with_ada_objects"
26881
26882 else
26883   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
26884 fi; if test -n "$prefix/lib/ada/adalib" ; then
26885
26886 if test "x$prefix" != xNONE; then
26887         cf_path_syntax="$prefix"
26888 else
26889         cf_path_syntax="$ac_default_prefix"
26890 fi
26891
26892 case ".$withval" in
26893 (.\$\(*\)*|.\'*\'*)
26894         ;;
26895 (..|./*|.\\*)
26896         ;;
26897 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
26898         ;;
26899 (.\$\{*prefix\}*|.\$\{*dir\}*)
26900         eval withval="$withval"
26901         case ".$withval" in
26902         (.NONE/*)
26903                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26904                 ;;
26905         esac
26906         ;;
26907 (.no|.NONE/*)
26908         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
26909         ;;
26910 (*)
26911         { { echo "$as_me:26911: error: expected a pathname, not \"$withval\"" >&5
26912 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
26913    { (exit 1); exit 1; }; }
26914         ;;
26915 esac
26916
26917 fi
26918 eval ADA_OBJECTS="$withval"
26919
26920 echo "$as_me:26920: result: $ADA_OBJECTS" >&5
26921 echo "${ECHO_T}$ADA_OBJECTS" >&6
26922
26923 echo "$as_me:26923: checking if an Ada95 shared-library should be built" >&5
26924 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
26925
26926 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
26927 if test "${with_ada_sharedlib+set}" = set; then
26928   withval="$with_ada_sharedlib"
26929   with_ada_sharedlib=$withval
26930 else
26931   with_ada_sharedlib=no
26932 fi;
26933 echo "$as_me:26933: result: $with_ada_sharedlib" >&5
26934 echo "${ECHO_T}$with_ada_sharedlib" >&6
26935
26936 if test "x$with_ada_sharedlib" != xno
26937 then
26938         if test "x$cf_gnat_projects" != xyes
26939         then
26940                 { echo "$as_me:26940: WARNING: disabling shared-library since GNAT projects are not supported" >&5
26941 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
26942                 with_ada_sharedlib=no
26943         fi
26944 fi
26945
26946 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
26947 MAKE_ADA_SHAREDLIB="#"
26948
26949 if test "x$with_ada_sharedlib" != xno
26950 then
26951         MAKE_ADA_SHAREDLIB=
26952         if test "x$with_ada_sharedlib" != xyes
26953         then
26954                 ADA_SHAREDLIB="$with_ada_sharedlib"
26955         fi
26956 fi
26957
26958                         # allow the Ada binding to be renamed
26959
26960 echo "$as_me:26960: checking for ada-libname" >&5
26961 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
26962
26963 # Check whether --with-ada-libname or --without-ada-libname was given.
26964 if test "${with_ada_libname+set}" = set; then
26965   withval="$with_ada_libname"
26966   ADA_LIBNAME=$withval
26967 else
26968   ADA_LIBNAME=AdaCurses
26969 fi;
26970 case "x$ADA_LIBNAME" in
26971 (x|xyes|xno)
26972         ADA_LIBNAME=AdaCurses
26973         ;;
26974 esac
26975
26976 echo "$as_me:26976: result: $ADA_LIBNAME" >&5
26977 echo "${ECHO_T}$ADA_LIBNAME" >&6
26978
26979                 fi
26980         fi
26981 else
26982         cf_with_ada=no
26983 fi
26984
26985 # do this "late" to avoid conflict with header-checks
26986 if test "x$with_widec" = xyes ; then
26987         echo "$as_me:26987: checking for wchar_t" >&5
26988 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
26989 if test "${ac_cv_type_wchar_t+set}" = set; then
26990   echo $ECHO_N "(cached) $ECHO_C" >&6
26991 else
26992   cat >"conftest.$ac_ext" <<_ACEOF
26993 #line 26993 "configure"
26994 #include "confdefs.h"
26995 $ac_includes_default
26996 int
26997 main (void)
26998 {
26999 if ((wchar_t *) 0)
27000   return 0;
27001 if (sizeof (wchar_t))
27002   return 0;
27003   ;
27004   return 0;
27005 }
27006 _ACEOF
27007 rm -f "conftest.$ac_objext"
27008 if { (eval echo "$as_me:27008: \"$ac_compile\"") >&5
27009   (eval $ac_compile) 2>&5
27010   ac_status=$?
27011   echo "$as_me:27011: \$? = $ac_status" >&5
27012   (exit "$ac_status"); } &&
27013          { ac_try='test -s "conftest.$ac_objext"'
27014   { (eval echo "$as_me:27014: \"$ac_try\"") >&5
27015   (eval $ac_try) 2>&5
27016   ac_status=$?
27017   echo "$as_me:27017: \$? = $ac_status" >&5
27018   (exit "$ac_status"); }; }; then
27019   ac_cv_type_wchar_t=yes
27020 else
27021   echo "$as_me: failed program was:" >&5
27022 cat "conftest.$ac_ext" >&5
27023 ac_cv_type_wchar_t=no
27024 fi
27025 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27026 fi
27027 echo "$as_me:27027: result: $ac_cv_type_wchar_t" >&5
27028 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
27029
27030 echo "$as_me:27030: checking size of wchar_t" >&5
27031 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
27032 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
27033   echo $ECHO_N "(cached) $ECHO_C" >&6
27034 else
27035   if test "$ac_cv_type_wchar_t" = yes; then
27036   if test "$cross_compiling" = yes; then
27037   # Depending upon the size, compute the lo and hi bounds.
27038 cat >"conftest.$ac_ext" <<_ACEOF
27039 #line 27039 "configure"
27040 #include "confdefs.h"
27041 $ac_includes_default
27042 int
27043 main (void)
27044 {
27045 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
27046   ;
27047   return 0;
27048 }
27049 _ACEOF
27050 rm -f "conftest.$ac_objext"
27051 if { (eval echo "$as_me:27051: \"$ac_compile\"") >&5
27052   (eval $ac_compile) 2>&5
27053   ac_status=$?
27054   echo "$as_me:27054: \$? = $ac_status" >&5
27055   (exit "$ac_status"); } &&
27056          { ac_try='test -s "conftest.$ac_objext"'
27057   { (eval echo "$as_me:27057: \"$ac_try\"") >&5
27058   (eval $ac_try) 2>&5
27059   ac_status=$?
27060   echo "$as_me:27060: \$? = $ac_status" >&5
27061   (exit "$ac_status"); }; }; then
27062   ac_lo=0 ac_mid=0
27063   while :; do
27064     cat >"conftest.$ac_ext" <<_ACEOF
27065 #line 27065 "configure"
27066 #include "confdefs.h"
27067 $ac_includes_default
27068 int
27069 main (void)
27070 {
27071 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27072   ;
27073   return 0;
27074 }
27075 _ACEOF
27076 rm -f "conftest.$ac_objext"
27077 if { (eval echo "$as_me:27077: \"$ac_compile\"") >&5
27078   (eval $ac_compile) 2>&5
27079   ac_status=$?
27080   echo "$as_me:27080: \$? = $ac_status" >&5
27081   (exit "$ac_status"); } &&
27082          { ac_try='test -s "conftest.$ac_objext"'
27083   { (eval echo "$as_me:27083: \"$ac_try\"") >&5
27084   (eval $ac_try) 2>&5
27085   ac_status=$?
27086   echo "$as_me:27086: \$? = $ac_status" >&5
27087   (exit "$ac_status"); }; }; then
27088   ac_hi=$ac_mid; break
27089 else
27090   echo "$as_me: failed program was:" >&5
27091 cat "conftest.$ac_ext" >&5
27092 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27093 fi
27094 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27095   done
27096 else
27097   echo "$as_me: failed program was:" >&5
27098 cat "conftest.$ac_ext" >&5
27099 ac_hi=-1 ac_mid=-1
27100   while :; do
27101     cat >"conftest.$ac_ext" <<_ACEOF
27102 #line 27102 "configure"
27103 #include "confdefs.h"
27104 $ac_includes_default
27105 int
27106 main (void)
27107 {
27108 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
27109   ;
27110   return 0;
27111 }
27112 _ACEOF
27113 rm -f "conftest.$ac_objext"
27114 if { (eval echo "$as_me:27114: \"$ac_compile\"") >&5
27115   (eval $ac_compile) 2>&5
27116   ac_status=$?
27117   echo "$as_me:27117: \$? = $ac_status" >&5
27118   (exit "$ac_status"); } &&
27119          { ac_try='test -s "conftest.$ac_objext"'
27120   { (eval echo "$as_me:27120: \"$ac_try\"") >&5
27121   (eval $ac_try) 2>&5
27122   ac_status=$?
27123   echo "$as_me:27123: \$? = $ac_status" >&5
27124   (exit "$ac_status"); }; }; then
27125   ac_lo=$ac_mid; break
27126 else
27127   echo "$as_me: failed program was:" >&5
27128 cat "conftest.$ac_ext" >&5
27129 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27130 fi
27131 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27132   done
27133 fi
27134 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27135 # Binary search between lo and hi bounds.
27136 while test "x$ac_lo" != "x$ac_hi"; do
27137   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27138   cat >"conftest.$ac_ext" <<_ACEOF
27139 #line 27139 "configure"
27140 #include "confdefs.h"
27141 $ac_includes_default
27142 int
27143 main (void)
27144 {
27145 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27146   ;
27147   return 0;
27148 }
27149 _ACEOF
27150 rm -f "conftest.$ac_objext"
27151 if { (eval echo "$as_me:27151: \"$ac_compile\"") >&5
27152   (eval $ac_compile) 2>&5
27153   ac_status=$?
27154   echo "$as_me:27154: \$? = $ac_status" >&5
27155   (exit "$ac_status"); } &&
27156          { ac_try='test -s "conftest.$ac_objext"'
27157   { (eval echo "$as_me:27157: \"$ac_try\"") >&5
27158   (eval $ac_try) 2>&5
27159   ac_status=$?
27160   echo "$as_me:27160: \$? = $ac_status" >&5
27161   (exit "$ac_status"); }; }; then
27162   ac_hi=$ac_mid
27163 else
27164   echo "$as_me: failed program was:" >&5
27165 cat "conftest.$ac_ext" >&5
27166 ac_lo=`expr "$ac_mid" + 1`
27167 fi
27168 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27169 done
27170 ac_cv_sizeof_wchar_t=$ac_lo
27171 else
27172   if test "$cross_compiling" = yes; then
27173   { { echo "$as_me:27173: error: cannot run test program while cross compiling" >&5
27174 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27175    { (exit 1); exit 1; }; }
27176 else
27177   cat >"conftest.$ac_ext" <<_ACEOF
27178 #line 27178 "configure"
27179 #include "confdefs.h"
27180 $ac_includes_default
27181 int
27182 main (void)
27183 {
27184 FILE *f = fopen ("conftest.val", "w");
27185 if (!f)
27186   $ac_main_return (1);
27187 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
27188 fclose (f);
27189   ;
27190   return 0;
27191 }
27192 _ACEOF
27193 rm -f "conftest$ac_exeext"
27194 if { (eval echo "$as_me:27194: \"$ac_link\"") >&5
27195   (eval $ac_link) 2>&5
27196   ac_status=$?
27197   echo "$as_me:27197: \$? = $ac_status" >&5
27198   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27199   { (eval echo "$as_me:27199: \"$ac_try\"") >&5
27200   (eval $ac_try) 2>&5
27201   ac_status=$?
27202   echo "$as_me:27202: \$? = $ac_status" >&5
27203   (exit "$ac_status"); }; }; then
27204   ac_cv_sizeof_wchar_t=`cat conftest.val`
27205 else
27206   echo "$as_me: program exited with status $ac_status" >&5
27207 echo "$as_me: failed program was:" >&5
27208 cat "conftest.$ac_ext" >&5
27209 fi
27210 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27211 fi
27212 fi
27213 rm -f conftest.val
27214 else
27215   ac_cv_sizeof_wchar_t=0
27216 fi
27217 fi
27218 echo "$as_me:27218: result: $ac_cv_sizeof_wchar_t" >&5
27219 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
27220 cat >>confdefs.h <<EOF
27221 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
27222 EOF
27223
27224         # cross-compiling to mingw can run into the problem that attempting to
27225         # link with the regex library fails, causing the test to not set this to
27226         # a number.  "recent" autoconf does not address this problem either -TD
27227         if test -z "$ac_cv_sizeof_wchar_t"
27228         then
27229                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
27230
27231 echo "${as_me:-configure}:27231: testing test failed (assume 2) ..." 1>&5
27232
27233                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
27234                 mv confdefs.tmp confdefs.h
27235                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
27236         fi
27237 fi
27238
27239 ### Construct the ncurses library-subsets, if any, from this set of keywords:
27240 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
27241 ###
27242 ### ticlib modules may be a separate library, otherwise contained in termlib.
27243 ### termlib modules may be a separate library, otherwise contained in ncurses.
27244 ###
27245 ### The of "+" or " " between the tokens controls the way the script
27246 ### chooses to split module lists into libraries.
27247 ###
27248 ### (see CF_LIB_RULES).
27249 echo "$as_me:27249: checking for library subsets" >&5
27250 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
27251 LIB_SUBSETS=
27252
27253 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
27254         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
27255         if test "$with_ticlib" != no ; then
27256                 LIB_SUBSETS="${LIB_SUBSETS} "
27257         else
27258                 LIB_SUBSETS="${LIB_SUBSETS}+"
27259         fi
27260 fi
27261
27262 LIB_SUBSETS="${LIB_SUBSETS}termlib"
27263 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
27264
27265 if test "$with_termlib" != no ; then
27266         LIB_SUBSETS="${LIB_SUBSETS} "
27267 else
27268         LIB_SUBSETS="${LIB_SUBSETS}+"
27269 fi
27270
27271 LIB_SUBSETS="${LIB_SUBSETS}base"
27272
27273 # Most term-driver calls are to tinfo, but some like init_pair are to the
27274 # base library (so it resides in base).
27275 if test "$with_term_driver" != no ; then
27276         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
27277         case "$cf_cv_system_name" in
27278         (*mingw32*|*mingw64*)
27279                 if test "x$with_exp_win32" = xyes ; then
27280                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
27281                 else
27282                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
27283                 fi
27284                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
27285                 ;;
27286         (*)
27287                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
27288                 ;;
27289         esac
27290 elif test "x$with_exp_win32" = xyes ; then
27291         case "$cf_cv_system_name" in
27292         (*mingw32*|*mingw64*)
27293                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
27294                 ;;
27295         (*)
27296                 ;;
27297         esac
27298 fi
27299
27300 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
27301 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
27302
27303 echo "$as_me:27303: result: $LIB_SUBSETS" >&5
27304 echo "${ECHO_T}$LIB_SUBSETS" >&6
27305
27306 ### Construct the list of include-directories to be generated
27307
27308 if test "$srcdir" != "."; then
27309         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
27310 fi
27311 CPPFLAGS="-I../include $CPPFLAGS"
27312 if test "$srcdir" != "."; then
27313         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
27314 fi
27315 CPPFLAGS="-I. $CPPFLAGS"
27316
27317 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
27318 if test "$srcdir" != "."; then
27319         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
27320 fi
27321 if test "$GCC" != yes; then
27322         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27323 elif test "$includedir" != "/usr/include"; then
27324         if test "$includedir" = '${prefix}/include' ; then
27325                 if test x$prefix != x/usr ; then
27326                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27327                 fi
27328         else
27329                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27330         fi
27331 fi
27332
27333 ### Build up pieces for makefile rules
27334 echo "$as_me:27334: checking default library suffix" >&5
27335 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
27336
27337         case $DFT_LWR_MODEL in
27338         (libtool) DFT_ARG_SUFFIX=''   ;;
27339         (normal)  DFT_ARG_SUFFIX=''   ;;
27340         (debug)   DFT_ARG_SUFFIX='_g' ;;
27341         (profile) DFT_ARG_SUFFIX='_p' ;;
27342         (shared)  DFT_ARG_SUFFIX=''   ;;
27343         esac
27344         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
27345 echo "$as_me:27345: result: $DFT_ARG_SUFFIX" >&5
27346 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
27347
27348 echo "$as_me:27348: checking default library-dependency suffix" >&5
27349 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
27350
27351         case X$DFT_LWR_MODEL in
27352         (Xlibtool)
27353                 DFT_LIB_SUFFIX='.la'
27354                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27355                 ;;
27356         (Xdebug)
27357                 case "$cf_cv_system_name" in
27358                 (*-msvc*)
27359                         DFT_LIB_SUFFIX='_g.lib'
27360                         ;;
27361                 (*)
27362                         DFT_LIB_SUFFIX='_g.a'
27363                         ;;
27364                 esac
27365                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27366                 ;;
27367         (Xprofile)
27368                 case "$cf_cv_system_name" in
27369                 (*-msvc*)
27370                         DFT_LIB_SUFFIX='_p.lib'
27371                         ;;
27372                 (*)
27373                         DFT_LIB_SUFFIX='_p.a'
27374                         ;;
27375                 esac
27376                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27377                 ;;
27378         (Xshared)
27379                 case "$cf_cv_system_name" in
27380                 (aix[5-7]*)
27381                         DFT_LIB_SUFFIX='.so'
27382                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27383                         ;;
27384                 (*-msvc*)
27385                         DFT_LIB_SUFFIX='.dll'
27386                         DFT_DEP_SUFFIX='.dll.lib'
27387                         ;;
27388                 (cygwin*|msys*|mingw*)
27389                         DFT_LIB_SUFFIX='.dll'
27390                         DFT_DEP_SUFFIX='.dll.a'
27391                         ;;
27392                 (darwin*)
27393                         DFT_LIB_SUFFIX='.dylib'
27394                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27395                         ;;
27396                 (hpux*)
27397                         case "$target" in
27398                         (ia64*)
27399                                 DFT_LIB_SUFFIX='.so'
27400                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27401                                 ;;
27402                         (*)
27403                                 DFT_LIB_SUFFIX='.sl'
27404                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27405                                 ;;
27406                         esac
27407                         ;;
27408                 (*)
27409                         DFT_LIB_SUFFIX='.so'
27410                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27411                         ;;
27412                 esac
27413                 ;;
27414         (*)
27415                 case "$target" in
27416                 (*-msvc*)
27417                         DFT_LIB_SUFFIX='.lib'
27418                         ;;
27419                 (*)
27420                         DFT_LIB_SUFFIX='.a'
27421                         ;;
27422                 esac
27423                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27424                 ;;
27425         esac
27426         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27427         then
27428                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
27429                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
27430         fi
27431 echo "$as_me:27431: result: $DFT_DEP_SUFFIX" >&5
27432 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
27433
27434 echo "$as_me:27434: checking default object directory" >&5
27435 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
27436
27437         case $DFT_LWR_MODEL in
27438         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
27439         (normal)  DFT_OBJ_SUBDIR='objects' ;;
27440         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
27441         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
27442         (shared)
27443                 case "$cf_cv_system_name" in
27444                 (cygwin|msys)
27445                         DFT_OBJ_SUBDIR='objects' ;;
27446                 (*)
27447                         DFT_OBJ_SUBDIR='obj_s' ;;
27448                 esac
27449         esac
27450 echo "$as_me:27450: result: $DFT_OBJ_SUBDIR" >&5
27451 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
27452
27453 if test "x$cf_with_cxx" = xyes ; then
27454 echo "$as_me:27454: checking c++ library-dependency suffix" >&5
27455 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
27456 if test "$with_libtool" != "no"; then
27457         # libtool thinks it can make c++ shared libraries (perhaps only g++)
27458         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27459 elif test "$with_shared_cxx" != "no"; then
27460         # also for g++ users...
27461         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27462 else
27463         # we normally make a static library because C/C++ library rules differ
27464
27465         case Xnormal in
27466         (Xlibtool)
27467                 CXX_LIB_SUFFIX='.la'
27468                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27469                 ;;
27470         (Xdebug)
27471                 case "$cf_cv_system_name" in
27472                 (*-msvc*)
27473                         CXX_LIB_SUFFIX='_g.lib'
27474                         ;;
27475                 (*)
27476                         CXX_LIB_SUFFIX='_g.a'
27477                         ;;
27478                 esac
27479                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27480                 ;;
27481         (Xprofile)
27482                 case "$cf_cv_system_name" in
27483                 (*-msvc*)
27484                         CXX_LIB_SUFFIX='_p.lib'
27485                         ;;
27486                 (*)
27487                         CXX_LIB_SUFFIX='_p.a'
27488                         ;;
27489                 esac
27490                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27491                 ;;
27492         (Xshared)
27493                 case "$cf_cv_system_name" in
27494                 (aix[5-7]*)
27495                         CXX_LIB_SUFFIX='.so'
27496                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27497                         ;;
27498                 (*-msvc*)
27499                         CXX_LIB_SUFFIX='.dll'
27500                         CXX_DEP_SUFFIX='.dll.lib'
27501                         ;;
27502                 (cygwin*|msys*|mingw*)
27503                         CXX_LIB_SUFFIX='.dll'
27504                         CXX_DEP_SUFFIX='.dll.a'
27505                         ;;
27506                 (darwin*)
27507                         CXX_LIB_SUFFIX='.dylib'
27508                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27509                         ;;
27510                 (hpux*)
27511                         case "$target" in
27512                         (ia64*)
27513                                 CXX_LIB_SUFFIX='.so'
27514                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27515                                 ;;
27516                         (*)
27517                                 CXX_LIB_SUFFIX='.sl'
27518                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27519                                 ;;
27520                         esac
27521                         ;;
27522                 (*)
27523                         CXX_LIB_SUFFIX='.so'
27524                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27525                         ;;
27526                 esac
27527                 ;;
27528         (*)
27529                 case "$target" in
27530                 (*-msvc*)
27531                         CXX_LIB_SUFFIX='.lib'
27532                         ;;
27533                 (*)
27534                         CXX_LIB_SUFFIX='.a'
27535                         ;;
27536                 esac
27537                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27538                 ;;
27539         esac
27540         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27541         then
27542                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
27543                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
27544         fi
27545
27546 fi
27547 echo "$as_me:27547: result: $CXX_LIB_SUFFIX" >&5
27548 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
27549
27550 fi
27551
27552 # do not want -ldl in build except as needed for -lncurses dependency
27553 if test "x$with_dlsym" = xyes ; then
27554 if test "$DFT_LWR_MODEL" = shared || \
27555    test "$DFT_LWR_MODEL" = libtool ; then
27556
27557 # remove dl library from $LIBS
27558 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
27559
27560 fi
27561 fi
27562 ### Set up low-level terminfo dependencies for makefiles.
27563
27564 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
27565 # do not need libdl
27566 TICS_LIST=
27567 if test "x$with_dlsym" = xyes ; then
27568
27569 # remove dl library from $SHLIB_LIST
27570 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
27571
27572 fi
27573
27574 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
27575 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
27576 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
27577 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
27578 then
27579         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
27580 fi
27581
27582 if test "$with_ticlib" != no ; then
27583
27584         if test "x$with_ticlib" != xyes ; then
27585                 TICS_NAME=$with_ticlib
27586                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
27587                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27588                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27589                 TICS_LIB_SUFFIX="${with_ticlib}"
27590         else
27591                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
27592                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
27593                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
27594                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
27595         fi
27596         TICS_LDFLAGS="-L${LIB_DIR}"
27597         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
27598 else
27599         TICS_SUFFIX=${DFT_LIB_SUFFIX}
27600         TICS_LDFLAGS="-L${LIB_DIR}"
27601         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27602 fi
27603
27604 if test "$with_termlib" != no ; then
27605
27606         if test "x$with_termlib" != xyes ; then
27607                 TINFO_NAME=$with_termlib
27608                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
27609                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27610                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27611                 TINFO_LIB_SUFFIX="${with_termlib}"
27612         else
27613                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27614                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
27615                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
27616                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
27617         fi
27618
27619         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
27620         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
27621         if test "$DFT_LWR_MODEL" = "libtool"; then
27622                 TEST_ARGS="${TEST_DEPS}"
27623                 TEST_ARG2="${TEST_DEP2}"
27624                 TINFO_LDFLAGS="-L${LIB_DIR}"
27625                 TINFO_LIBS="$TEST_ARGS"
27626                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
27627                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
27628         else
27629                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
27630                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
27631                 if test "x$with_term_driver" != xno ; then
27632                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
27633                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
27634                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
27635                 else
27636                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
27637                         TINFO_LIBS="$TEST_ARGS"
27638                 fi
27639                 TINFO_LDFLAGS="-L${LIB_DIR}"
27640                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
27641         fi
27642 else
27643         # the next lines are needed for linking libtic over libncurses
27644         TINFO_NAME=${LIB_NAME}
27645         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27646         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
27647         if test "x$with_tic_depends" = xyes ; then
27648                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
27649         else
27650                 TICS_LIST="$SHLIB_LIST"
27651         fi
27652
27653         TINFO_LDFLAGS="-L${LIB_DIR}"
27654         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27655 fi
27656
27657 if test "$DFT_LWR_MODEL" = shared ; then
27658         case "$cf_cv_system_name" in
27659         (cygwin*|msys*)
27660                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
27661                 TINFO_SUFFIX=.dll
27662                 ;;
27663         esac
27664 fi
27665
27666 if test "x$with_dlsym" = xyes ; then
27667
27668 # remove dl library from $TICS_LIST
27669 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
27670
27671 fi
27672
27673 if test "$DFT_LWR_MODEL" = "libtool"; then
27674         OBJEXT=lo
27675 fi
27676
27677 # needed for Ada95
27678 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
27679
27680 case "$DFT_LWR_MODEL" in
27681 (normal|debug|profile)
27682
27683 if test "$GCC" = yes ; then
27684         case "$cf_cv_system_name" in
27685         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
27686                 LDFLAGS_STATIC=
27687                 LDFLAGS_SHARED=
27688                 ;;
27689         (*)     # normally, except when broken
27690                 LDFLAGS_STATIC=-static
27691                 LDFLAGS_SHARED=-dynamic
27692                 ;;
27693         esac
27694 else
27695         case "$cf_cv_system_name" in
27696         (aix[4-7]*)     # from ld manpage
27697                 LDFLAGS_STATIC=-bstatic
27698                 LDFLAGS_SHARED=-bdynamic
27699                 ;;
27700         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
27701                 # We could also use just "archive" and "shared".
27702                 LDFLAGS_STATIC=-Wl,-a,archive_shared
27703                 LDFLAGS_SHARED=-Wl,-a,shared_archive
27704                 ;;
27705         (irix*)         # from ld manpage IRIX64
27706                 LDFLAGS_STATIC=-Bstatic
27707                 LDFLAGS_SHARED=-Bdynamic
27708                 ;;
27709         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
27710                 # alternative "-oldstyle_liblookup" (not in cc manpage)
27711                 LDFLAGS_STATIC=-noso
27712                 LDFLAGS_SHARED=-so_archive
27713                 ;;
27714         (solaris2*)
27715                 LDFLAGS_STATIC=-Bstatic
27716                 LDFLAGS_SHARED=-Bdynamic
27717                 ;;
27718         esac
27719 fi
27720
27721 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
27722 then
27723         echo "$as_me:27723: checking if linker supports switching between static/dynamic" >&5
27724 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
27725
27726         rm -f libconftest.a
27727         cat >conftest.$ac_ext <<EOF
27728 #line 27728 "configure"
27729 #include <stdio.h>
27730 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
27731 EOF
27732         if { (eval echo "$as_me:27732: \"$ac_compile\"") >&5
27733   (eval $ac_compile) 2>&5
27734   ac_status=$?
27735   echo "$as_me:27735: \$? = $ac_status" >&5
27736   (exit "$ac_status"); } ; then
27737                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
27738                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
27739         fi
27740         rm -f conftest.*
27741
27742         cf_save_LIBS="$LIBS"
27743
27744         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
27745         cat >"conftest.$ac_ext" <<_ACEOF
27746 #line 27746 "configure"
27747 #include "confdefs.h"
27748
27749 #line 27749 "configure"
27750 #include <stdio.h>
27751 int cf_ldflags_static(FILE *fp);
27752
27753 int
27754 main (void)
27755 {
27756
27757         return cf_ldflags_static(stdin);
27758
27759   ;
27760   return 0;
27761 }
27762 _ACEOF
27763 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
27764 if { (eval echo "$as_me:27764: \"$ac_link\"") >&5
27765   (eval $ac_link) 2>&5
27766   ac_status=$?
27767   echo "$as_me:27767: \$? = $ac_status" >&5
27768   (exit "$ac_status"); } &&
27769          { ac_try='test -s "conftest$ac_exeext"'
27770   { (eval echo "$as_me:27770: \"$ac_try\"") >&5
27771   (eval $ac_try) 2>&5
27772   ac_status=$?
27773   echo "$as_me:27773: \$? = $ac_status" >&5
27774   (exit "$ac_status"); }; }; then
27775
27776         # some linkers simply ignore the -dynamic
27777         case x`file "conftest$ac_exeext" 2>/dev/null` in
27778         (*static*)
27779                 cf_ldflags_static=no
27780                 ;;
27781         (*)
27782                 cf_ldflags_static=yes
27783                 ;;
27784         esac
27785
27786 else
27787   echo "$as_me: failed program was:" >&5
27788 cat "conftest.$ac_ext" >&5
27789 cf_ldflags_static=no
27790 fi
27791 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
27792
27793         rm -f libconftest.*
27794         LIBS="$cf_save_LIBS"
27795
27796         echo "$as_me:27796: result: $cf_ldflags_static" >&5
27797 echo "${ECHO_T}$cf_ldflags_static" >&6
27798
27799         if test "$cf_ldflags_static" != yes
27800         then
27801                 LDFLAGS_STATIC=
27802                 LDFLAGS_SHARED=
27803         fi
27804 else
27805         LDFLAGS_STATIC=
27806         LDFLAGS_SHARED=
27807 fi
27808
27809         ;;
27810 esac
27811
27812 echo "$as_me:27812: checking where we will install curses.h" >&5
27813 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
27814
27815 includesubdir=
27816 if test "$with_overwrite" = no && \
27817  { test "x$includedir" = 'x${prefix}/include' || \
27818    test "x$includedir" = "x${prefix}/include"; }
27819 then
27820         includesubdir="/ncurses${USE_LIB_SUFFIX}"
27821 fi
27822 echo "$as_me:27822: result: ${includedir}${includesubdir}" >&5
27823 echo "${ECHO_T}${includedir}${includesubdir}" >&6
27824
27825 ### Resolve a conflict between normal and wide-curses by forcing applications
27826 ### that will need libutf8 to add it to their configure script.
27827 if test "$with_overwrite" != no ; then
27828 if test "$NCURSES_LIBUTF8" = 1 ; then
27829         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
27830         { echo "$as_me:27830: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
27831 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
27832 fi
27833 fi
27834 WITH_OVERWRITE=$with_overwrite
27835
27836 ### At least on MinGW a shared library build without libtool
27837 ### requires adding the additional libs to the link list.
27838 case "$cf_cv_system_name" in
27839 (*mingw32*|*mingw64*)
27840         if test "$DFT_LWR_MODEL" != "libtool"; then
27841            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
27842         fi
27843         ;;
27844 *)      ;;
27845 esac
27846
27847 # used to separate tack out of the tree
27848 NCURSES_TREE=
27849
27850 ### predefined stuff for the test programs
27851
27852 cat >>confdefs.h <<\EOF
27853 #define HAVE_SLK_COLOR 1
27854 EOF
27855
27856 # pkgsrc uses these
27857
27858 echo "$as_me:27858: checking for desired basename for form library" >&5
27859 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
27860
27861 # Check whether --with-form-libname or --without-form-libname was given.
27862 if test "${with_form_libname+set}" = set; then
27863   withval="$with_form_libname"
27864   with_lib_basename=$withval
27865 else
27866   with_lib_basename=form
27867 fi;
27868 FORM_NAME="$with_lib_basename"
27869
27870 case "x$FORM_NAME" in
27871 (x|xno|xnone|xyes)
27872         FORM_NAME=form
27873         ;;
27874 (*)
27875         ;;
27876 esac
27877
27878 echo "$as_me:27878: result: $FORM_NAME" >&5
27879 echo "${ECHO_T}$FORM_NAME" >&6
27880
27881 echo "$as_me:27881: checking for desired basename for menu library" >&5
27882 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
27883
27884 # Check whether --with-menu-libname or --without-menu-libname was given.
27885 if test "${with_menu_libname+set}" = set; then
27886   withval="$with_menu_libname"
27887   with_lib_basename=$withval
27888 else
27889   with_lib_basename=menu
27890 fi;
27891 MENU_NAME="$with_lib_basename"
27892
27893 case "x$MENU_NAME" in
27894 (x|xno|xnone|xyes)
27895         MENU_NAME=menu
27896         ;;
27897 (*)
27898         ;;
27899 esac
27900
27901 echo "$as_me:27901: result: $MENU_NAME" >&5
27902 echo "${ECHO_T}$MENU_NAME" >&6
27903
27904 echo "$as_me:27904: checking for desired basename for panel library" >&5
27905 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
27906
27907 # Check whether --with-panel-libname or --without-panel-libname was given.
27908 if test "${with_panel_libname+set}" = set; then
27909   withval="$with_panel_libname"
27910   with_lib_basename=$withval
27911 else
27912   with_lib_basename=panel
27913 fi;
27914 PANEL_NAME="$with_lib_basename"
27915
27916 case "x$PANEL_NAME" in
27917 (x|xno|xnone|xyes)
27918         PANEL_NAME=panel
27919         ;;
27920 (*)
27921         ;;
27922 esac
27923
27924 echo "$as_me:27924: result: $PANEL_NAME" >&5
27925 echo "${ECHO_T}$PANEL_NAME" >&6
27926
27927 echo "$as_me:27927: checking for desired basename for cxx library" >&5
27928 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
27929
27930 # Check whether --with-cxx-libname or --without-cxx-libname was given.
27931 if test "${with_cxx_libname+set}" = set; then
27932   withval="$with_cxx_libname"
27933   with_lib_basename=$withval
27934 else
27935   with_lib_basename=ncurses++
27936 fi;
27937 CXX_NAME="$with_lib_basename"
27938
27939 case "x$CXX_NAME" in
27940 (x|xno|xnone|xyes)
27941         CXX_NAME=ncurses++
27942         ;;
27943 (*)
27944         ;;
27945 esac
27946
27947 echo "$as_me:27947: result: $CXX_NAME" >&5
27948 echo "${ECHO_T}$CXX_NAME" >&6
27949
27950 ### Construct the list of subdirectories for which we'll customize makefiles
27951 ### with the appropriate compile-rules.
27952
27953 echo "$as_me:27953: checking for src modules" >&5
27954 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
27955
27956 # dependencies and linker-arguments for test-programs
27957 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
27958 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
27959 if test "$DFT_LWR_MODEL" = "libtool"; then
27960         TEST_ARGS="${TEST_DEPS}"
27961         TEST_ARG2="${TEST_DEP2}"
27962 else
27963         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
27964         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
27965 fi
27966
27967 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
27968 cf_cv_src_modules=
27969 for cf_dir in $modules_to_build
27970 do
27971         if test -f "$srcdir/$cf_dir/modules" ; then
27972
27973                 # We may/may not have tack in the distribution, though the
27974                 # makefile is.
27975                 if test "$cf_dir" = tack ; then
27976                         if test "x$cf_with_tack" != "xyes"; then
27977                                 continue
27978                         fi
27979                 fi
27980
27981                 if test -z "$cf_cv_src_modules"; then
27982                         cf_cv_src_modules=$cf_dir
27983                 else
27984                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
27985                 fi
27986
27987                 # Make the ncurses_cfg.h file record the library interface files as
27988                 # well.  These are header files that are the same name as their
27989                 # directory.  Ncurses is the only library that does not follow
27990                 # that pattern.
27991                 if test "$cf_dir" = tack ; then
27992                         continue
27993                 elif test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
27994
27995 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27996
27997                         cat >>confdefs.h <<EOF
27998 #define HAVE_${cf_have_include}_H 1
27999 EOF
28000
28001                         cat >>confdefs.h <<EOF
28002 #define HAVE_LIB${cf_have_include} 1
28003 EOF
28004
28005 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28006
28007 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28008
28009                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28010                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
28011                         if test "$DFT_LWR_MODEL" = "libtool"; then
28012                                 TEST_ARGS="${TEST_DEPS}"
28013                                 TEST_ARG2="${TEST_DEP2}"
28014                         else
28015                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
28016                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
28017                         fi
28018                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
28019                 fi
28020         fi
28021 done
28022 echo "$as_me:28022: result: $cf_cv_src_modules" >&5
28023 echo "${ECHO_T}$cf_cv_src_modules" >&6
28024
28025 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
28026 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
28027
28028 SRC_SUBDIRS=
28029 if test "x$cf_with_manpages" != xno ; then
28030         SRC_SUBDIRS="$SRC_SUBDIRS man"
28031 fi
28032 SRC_SUBDIRS="$SRC_SUBDIRS include"
28033 for cf_dir in $cf_cv_src_modules
28034 do
28035         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
28036 done
28037 if test "x$cf_with_tests" != "xno" ; then
28038         SRC_SUBDIRS="$SRC_SUBDIRS test"
28039 fi
28040 # always make this, to install the ncurses-config script
28041 SRC_SUBDIRS="$SRC_SUBDIRS misc"
28042 if test "$cf_with_cxx_binding" != no; then
28043         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
28044         SRC_SUBDIRS="$SRC_SUBDIRS c++"
28045 fi
28046
28047 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
28048 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
28049
28050 ADA_SUBDIRS=
28051 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
28052         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
28053         ADA_SUBDIRS="gen src"
28054         if test "x$cf_with_tests" != "xno" ; then
28055                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
28056         fi
28057 fi
28058
28059 SUB_MAKEFILES=
28060 for cf_dir in $SRC_SUBDIRS
28061 do
28062         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
28063 done
28064
28065 if test -n "$ADA_SUBDIRS"; then
28066         for cf_dir in $ADA_SUBDIRS
28067         do
28068                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
28069         done
28070
28071 fi
28072
28073 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28074    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
28075    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
28076    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
28077 fi
28078
28079 DIRS_TO_MAKE="lib"
28080 for cf_item in $cf_list_models
28081 do
28082
28083         case $cf_item in
28084         (libtool) cf_subdir='obj_lo'  ;;
28085         (normal)  cf_subdir='objects' ;;
28086         (debug)   cf_subdir='obj_g' ;;
28087         (profile) cf_subdir='obj_p' ;;
28088         (shared)
28089                 case "$cf_cv_system_name" in
28090                 (cygwin|msys)
28091                         cf_subdir='objects' ;;
28092                 (*)
28093                         cf_subdir='obj_s' ;;
28094                 esac
28095         esac
28096
28097         for cf_item2 in $DIRS_TO_MAKE
28098         do
28099                 test "$cf_item2" = "$cf_subdir" && break
28100         done
28101         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
28102 done
28103 for cf_dir in $DIRS_TO_MAKE
28104 do
28105         test ! -d "$cf_dir" && mkdir "$cf_dir"
28106 done
28107
28108 # symbols that differ when compiling Ada95 by itself.
28109 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
28110
28111 # values to use as strings
28112
28113 cat >>confdefs.h <<EOF
28114 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
28115 EOF
28116
28117 cat >>confdefs.h <<EOF
28118 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
28119 EOF
28120
28121 ### Define substitutions for header files to avoid name-pollution
28122
28123 if test "x$cf_cv_have_tcgetattr" = xyes ; then
28124         HAVE_TCGETATTR=1
28125 else
28126         HAVE_TCGETATTR=0
28127 fi
28128
28129 if test "x$ac_cv_header_stdint_h" = xyes ; then
28130         HAVE_STDINT_H=1
28131 else
28132         HAVE_STDINT_H=0
28133 fi
28134
28135 if test "x$ac_cv_header_termio_h" = xyes ; then
28136         HAVE_TERMIO_H=1
28137 else
28138         HAVE_TERMIO_H=0
28139 fi
28140
28141 if test "x$ac_cv_header_termios_h" = xyes ; then
28142         HAVE_TERMIOS_H=1
28143 else
28144         HAVE_TERMIOS_H=0
28145 fi
28146
28147 ################################################################################
28148 test "x$use_database" = xyes && \
28149 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
28150
28151 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
28152 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
28153
28154 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
28155 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
28156 fi
28157
28158 if test "x$cf_with_tests" != xno ; then
28159         MAKE_TESTS=
28160 else
28161         MAKE_TESTS="#"
28162 fi
28163
28164 ADAHTML_DIR=../../doc/html/ada
28165
28166 # workaround for OS/2 (20151017)
28167 case "$cf_cv_system_name" in
28168 (os2*)
28169         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
28170         ;;
28171 (*)
28172         LIBTOOL_OPTS_CXX=
28173         ;;
28174 esac
28175
28176 # workaround for g++ versus Solaris (20131116)
28177 case "$cf_cv_system_name" in
28178 (solaris2*)
28179         case "x$CPPFLAGS" in
28180         (*-D_XOPEN_SOURCE_EXTENDED*)
28181                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
28182
28183 echo "${as_me:-configure}:28183: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
28184
28185                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
28186                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
28187                 ;;
28188         esac
28189         ;;
28190 esac
28191
28192 # Help to automatically enable the extended curses features when using either
28193 # the *-config or the ".pc" files by adding defines.
28194 echo "$as_me:28194: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
28195 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
28196 PKG_CFLAGS=
28197 for cf_loop1 in $CPPFLAGS_after_XOPEN
28198 do
28199         cf_found=no
28200         for cf_loop2 in $CPPFLAGS_before_XOPEN
28201         do
28202                 if test "x$cf_loop1" = "x$cf_loop2"
28203                 then
28204                         cf_found=yes
28205                         break
28206                 fi
28207         done
28208         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
28209 done
28210 echo "$as_me:28210: result: $PKG_CFLAGS" >&5
28211 echo "${ECHO_T}$PKG_CFLAGS" >&6
28212
28213 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
28214 case "x$NCURSES_OSPEED" in
28215 (*short*)
28216         cf_compatible=1
28217         ;;
28218 (*)
28219         cf_compatible=0
28220         ;;
28221 esac
28222
28223 cat >>confdefs.h <<EOF
28224 #define NCURSES_OSPEED_COMPAT $cf_compatible
28225 EOF
28226
28227 case "x$cf_cv_typeof_chtype" in
28228 (xshort|xint|xlong)
28229         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
28230         ;;
28231 esac
28232
28233 case "x$cf_cv_typeof_mmask_t" in
28234 (xshort|xint|xlong)
28235         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
28236         ;;
28237 esac
28238
28239 # substitute into misc/Makefile to suppress
28240 # (un)install.data from the
28241 # (un)install rules.
28242 if test "x$cf_with_db_install" = "xno"; then
28243         MISC_INSTALL_DATA=
28244         MISC_UNINSTALL_DATA=
28245 else
28246         MISC_INSTALL_DATA=install.data
28247         MISC_UNINSTALL_DATA=uninstall.data
28248 fi
28249
28250 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
28251         MAKE_DATABASE="#"
28252 else
28253         MAKE_DATABASE="$MAKE_TERMINFO"
28254 fi
28255
28256 if test -n "$PACKAGE"
28257 then
28258         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
28259         export PACKAGE
28260         echo "package: $PACKAGE"
28261 fi
28262
28263 UNALTERED_SYMS=
28264 cf_filter_syms=no
28265
28266 if test -n "$RESULTING_SYMS"
28267 then
28268         cf_filter_syms=$cf_dft_filter_syms
28269         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
28270
28271 echo "${as_me:-configure}:28271: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
28272
28273 fi
28274
28275 if test "x$WILDCARD_SYMS" = xno
28276 then
28277         cf_filter_syms=yes
28278 fi
28279
28280 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
28281
28282 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
28283 if test "$cf_filter_syms" = yes
28284 then
28285         RESULTING_SYMS=resulting.map
28286 fi
28287
28288 if test "x$cross_compiling" = xyes ; then
28289         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
28290         CHECK_BUILD="#"
28291 else
28292         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
28293         CHECK_BUILD=
28294 fi
28295
28296 # This is used for the *-config script and *.pc data files.
28297
28298 echo "$as_me:28298: checking for linker search path" >&5
28299 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
28300 if test "${cf_cv_ld_searchpath+set}" = set; then
28301   echo $ECHO_N "(cached) $ECHO_C" >&6
28302 else
28303
28304 if test "$cross_compiling" != yes ; then
28305
28306 # GNU binutils' ld does not involve permissions which may stop ldconfig.
28307 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
28308
28309 # The -NX options tell newer versions of Linux ldconfig to not attempt to
28310 # update the cache, which makes it run faster.
28311 test -z "$cf_pathlist" && \
28312         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
28313
28314 test -z "$cf_pathlist" &&
28315         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
28316
28317 # This works with OpenBSD 6.5, which lists only filenames
28318 test -z "$cf_pathlist" &&
28319         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
28320
28321 if test -z "$cf_pathlist"
28322 then
28323         # dyld default path with MacOS
28324         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
28325         then
28326                 # do this to bypass check
28327                 cf_cv_ld_searchpath='$HOME/lib'
28328                 cf_pathlist="/usr/local/lib /lib /usr/lib"
28329         fi
28330 fi
28331
28332 if test -z "$cf_pathlist"
28333 then
28334         # Solaris is "SunOS"
28335         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
28336         then
28337                 case x`(isainfo -b)` in
28338                 (x64)
28339                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
28340                         ;;
28341                 (x32)
28342                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
28343                         cf_pathlist="$cf_pathlist /lib /usr/lib"
28344                         ;;
28345                 (*)
28346                         { echo "$as_me:28346: WARNING: problem with Solaris architecture" >&5
28347 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
28348                         ;;
28349                 esac
28350         fi
28351 fi
28352
28353 if test -z "$cf_pathlist"
28354 then
28355         # HP-UX
28356         if test x"`uname -s`" = xHP-UX
28357         then
28358                 case x`getconf LONG_BIT` in
28359                 (x64)
28360                         cf_pathlist="/usr/lib/hpux64"
28361                         ;;
28362                 (x*)
28363                         cf_pathlist="/usr/lib/hpux32"
28364                         ;;
28365                 esac
28366         fi
28367 fi
28368
28369 fi
28370
28371 # If nothing else, assume it is conventional
28372 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
28373
28374 # Finally, check that this is only directories
28375 for cf_path in $0 $cf_pathlist
28376 do
28377         if test -d "$cf_path"; then
28378                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
28379                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
28380         fi
28381 done
28382
28383 # Ensure that it is nonempty
28384 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
28385
28386 fi
28387 echo "$as_me:28387: result: $cf_cv_ld_searchpath" >&5
28388 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
28389
28390 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
28391
28392 cat >>confdefs.h <<\EOF
28393 #define HAVE_CURSES_DATA_BOOLNAMES 1
28394 EOF
28395
28396 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"
28397 ac_config_commands="$ac_config_commands default"
28398 cat >confcache <<\_ACEOF
28399 # This file is a shell script that caches the results of configure
28400 # tests run on this system so they can be shared between configure
28401 # scripts and configure runs, see configure's option --config-cache.
28402 # It is not useful on other systems.  If it contains results you don't
28403 # want to keep, you may remove or edit it.
28404 #
28405 # config.status only pays attention to the cache file if you give it
28406 # the --recheck option to rerun configure.
28407 #
28408 # `ac_cv_env_foo' variables (set or unset) will be overriden when
28409 # loading this file, other *unset* `ac_cv_foo' will be assigned the
28410 # following values.
28411
28412 _ACEOF
28413
28414 # The following way of writing the cache mishandles newlines in values,
28415 # but we know of no workaround that is simple, portable, and efficient.
28416 # So, don't put newlines in cache variables' values.
28417 # Ultrix sh set writes to stderr and can't be redirected directly,
28418 # and sets the high bit in the cache file unless we assign to the vars.
28419 {
28420   (set) 2>&1 |
28421     case `(ac_space=' '; set | grep ac_space) 2>&1` in
28422     *ac_space=\ *)
28423       # `set' does not quote correctly, so add quotes (double-quote
28424       # substitution turns \\\\ into \\, and sed turns \\ into \).
28425       sed -n \
28426         "s/'/'\\\\''/g;
28427           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
28428       ;;
28429     *)
28430       # `set' quotes correctly as required by POSIX, so do not add quotes.
28431       sed -n \
28432         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
28433       ;;
28434     esac;
28435 } |
28436   sed '
28437      t clear
28438      : clear
28439      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
28440      t end
28441      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
28442      : end' >>confcache
28443 if cmp -s $cache_file confcache; then :; else
28444   if test -w $cache_file; then
28445     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
28446     cat confcache >$cache_file
28447   else
28448     echo "not updating unwritable cache $cache_file"
28449   fi
28450 fi
28451 rm -f confcache
28452
28453 test "x$prefix" = xNONE && prefix=$ac_default_prefix
28454 # Let make expand exec_prefix.
28455 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
28456
28457 # VPATH may cause trouble with some makes, so we remove $(srcdir),
28458 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28459 # trailing colons and then remove the whole line if VPATH becomes empty
28460 # (actually we leave an empty line to preserve line numbers).
28461 if test "x$srcdir" = x.; then
28462   ac_vpsub='/^[         ]*VPATH[        ]*=/{
28463 s/:*\$(srcdir):*/:/;
28464 s/:*\${srcdir}:*/:/;
28465 s/:*@srcdir@:*/:/;
28466 s/^\([^=]*=[    ]*\):*/\1/;
28467 s/:*$//;
28468 s/^[^=]*=[      ]*$//;
28469 }'
28470 fi
28471
28472 DEFS=-DHAVE_CONFIG_H
28473
28474 : "${CONFIG_STATUS=./config.status}"
28475 ac_clean_files_save=$ac_clean_files
28476 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
28477 { echo "$as_me:28477: creating $CONFIG_STATUS" >&5
28478 echo "$as_me: creating $CONFIG_STATUS" >&6;}
28479 cat >"$CONFIG_STATUS" <<_ACEOF
28480 #! $SHELL
28481 # Generated automatically by configure.
28482 # Run this file to recreate the current configuration.
28483 # Compiler output produced by configure, useful for debugging
28484 # configure, is in config.log if it exists.
28485
28486 debug=false
28487 SHELL=\${CONFIG_SHELL-$SHELL}
28488 ac_cs_invocation="\$0 \$@"
28489
28490 CLICOLOR_FORCE= GREP_OPTIONS=
28491 unset CLICOLOR_FORCE GREP_OPTIONS
28492 _ACEOF
28493
28494 cat >>"$CONFIG_STATUS" <<\_ACEOF
28495 # Be Bourne compatible
28496 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
28497   emulate sh
28498   NULLCMD=:
28499 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28500   set -o posix
28501 fi
28502
28503 # Name of the executable.
28504 as_me=`echo "$0" |sed 's,.*[\\/],,'`
28505
28506 if expr a : '\(a\)' >/dev/null 2>&1; then
28507   as_expr=expr
28508 else
28509   as_expr=false
28510 fi
28511
28512 rm -f conf$$ conf$$.exe conf$$.file
28513 echo >conf$$.file
28514 if ln -s conf$$.file conf$$ 2>/dev/null; then
28515   # We could just check for DJGPP; but this test a) works b) is more generic
28516   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
28517   if test -f conf$$.exe; then
28518     # Don't use ln at all; we don't have any links
28519     as_ln_s='cp -p'
28520   else
28521     as_ln_s='ln -s'
28522   fi
28523 elif ln conf$$.file conf$$ 2>/dev/null; then
28524   as_ln_s=ln
28525 else
28526   as_ln_s='cp -p'
28527 fi
28528 rm -f conf$$ conf$$.exe conf$$.file
28529
28530 as_executable_p="test -f"
28531
28532 # Support unset when possible.
28533 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
28534   as_unset="unset"
28535 else
28536   as_unset="false"
28537 fi
28538
28539 # NLS nuisances.
28540 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
28541 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
28542 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
28543 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
28544 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
28545 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
28546 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
28547 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
28548
28549 # IFS
28550 # We need space, tab and new line, in precisely that order.
28551 as_nl='
28552 '
28553 IFS="   $as_nl"
28554
28555 # CDPATH.
28556 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
28557
28558 exec 6>&1
28559
28560 _ACEOF
28561
28562 # Files that config.status was made for.
28563 if test -n "$ac_config_files"; then
28564   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
28565 fi
28566
28567 if test -n "$ac_config_headers"; then
28568   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
28569 fi
28570
28571 if test -n "$ac_config_links"; then
28572   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
28573 fi
28574
28575 if test -n "$ac_config_commands"; then
28576   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
28577 fi
28578
28579 cat >>"$CONFIG_STATUS" <<\EOF
28580
28581 ac_cs_usage="\
28582 \`$as_me' instantiates files from templates according to the
28583 current configuration.
28584
28585 Usage: $0 [OPTIONS] [FILE]...
28586
28587   -h, --help       print this help, then exit
28588   -V, --version    print version number, then exit
28589   -d, --debug      don't remove temporary files
28590       --recheck    update $as_me by reconfiguring in the same conditions
28591   --file=FILE[:TEMPLATE]
28592                    instantiate the configuration file FILE
28593   --header=FILE[:TEMPLATE]
28594                    instantiate the configuration header FILE
28595
28596 Configuration files:
28597 $config_files
28598
28599 Configuration headers:
28600 $config_headers
28601
28602 Configuration commands:
28603 $config_commands
28604
28605 Report bugs to <dickey@invisible-island.net>."
28606 EOF
28607
28608 cat >>"$CONFIG_STATUS" <<EOF
28609 ac_cs_version="\\
28610 config.status
28611 configured by $0, generated by GNU Autoconf 2.52.20210509,
28612   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
28613
28614 Copyright 2003-2020,2021        Thomas E. Dickey
28615 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
28616 Free Software Foundation, Inc.
28617 This config.status script is free software; the Free Software Foundation
28618 gives unlimited permission to copy, distribute and modify it."
28619 srcdir="$srcdir"
28620 INSTALL="$INSTALL"
28621 EOF
28622
28623 cat >>"$CONFIG_STATUS" <<\EOF
28624 # If no file are specified by the user, then we need to provide default
28625 # value.  By we need to know if files were specified by the user.
28626 ac_need_defaults=:
28627 while test $# != 0
28628 do
28629   case $1 in
28630   --*=*)
28631     ac_option=`expr "x$1" : 'x\([^=]*\)='`
28632     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
28633     shift
28634     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
28635     shift
28636     ;;
28637   -*);;
28638   *) # This is not an option, so the user has probably given explicit
28639      # arguments.
28640      ac_need_defaults=false;;
28641   esac
28642
28643   case $1 in
28644   # Handling of the options.
28645 EOF
28646 cat >>"$CONFIG_STATUS" <<EOF
28647   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28648     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
28649     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
28650 EOF
28651 cat >>"$CONFIG_STATUS" <<\EOF
28652   --version | --vers* | -V )
28653     echo "$ac_cs_version"; exit 0 ;;
28654   --he | --h)
28655     # Conflict between --help and --header
28656     { { echo "$as_me:28656: error: ambiguous option: $1
28657 Try \`$0 --help' for more information." >&5
28658 echo "$as_me: error: ambiguous option: $1
28659 Try \`$0 --help' for more information." >&2;}
28660    { (exit 1); exit 1; }; };;
28661   --help | --hel | -h )
28662     echo "$ac_cs_usage"; exit 0 ;;
28663   --debug | --d* | -d )
28664     debug=: ;;
28665   --file | --fil | --fi | --f )
28666     shift
28667     CONFIG_FILES="$CONFIG_FILES $1"
28668     ac_need_defaults=false;;
28669   --header | --heade | --head | --hea )
28670     shift
28671     CONFIG_HEADERS="$CONFIG_HEADERS $1"
28672     ac_need_defaults=false;;
28673
28674   # This is an error.
28675   -*) { { echo "$as_me:28675: error: unrecognized option: $1
28676 Try \`$0 --help' for more information." >&5
28677 echo "$as_me: error: unrecognized option: $1
28678 Try \`$0 --help' for more information." >&2;}
28679    { (exit 1); exit 1; }; } ;;
28680
28681   *) ac_config_targets="$ac_config_targets $1" ;;
28682
28683   esac
28684   shift
28685 done
28686
28687 exec 5>>config.log
28688 cat >&5 << _ACEOF
28689
28690 ## ----------------------- ##
28691 ## Running config.status.  ##
28692 ## ----------------------- ##
28693
28694 This file was extended by $as_me 2.52.20210509, executed with
28695   CONFIG_FILES    = $CONFIG_FILES
28696   CONFIG_HEADERS  = $CONFIG_HEADERS
28697   CONFIG_LINKS    = $CONFIG_LINKS
28698   CONFIG_COMMANDS = $CONFIG_COMMANDS
28699   > "$ac_cs_invocation"
28700 on `(hostname || uname -n) 2>/dev/null | sed 1q`
28701
28702 _ACEOF
28703 EOF
28704
28705 cat >>"$CONFIG_STATUS" <<EOF
28706 #
28707 # INIT-COMMANDS section.
28708 #
28709
28710 ### Special initialization commands, used to pass information from the
28711 ### configuration-run into config.status
28712
28713 ALTERNATE_SYMS="$ALTERNATE_SYMS"
28714 AWK="$AWK"
28715 CXX_NAME="$CXX_NAME"
28716 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
28717 DFT_LWR_MODEL="$DFT_LWR_MODEL"
28718 ECHO_LD="$ECHO_LD"
28719 EXTRA_SUFFIX="$EXTRA_SUFFIX"
28720 FORM_NAME="$FORM_NAME"
28721 LDCONFIG="$LDCONFIG"
28722 LIBTOOL_VERSION="$LIBTOOL_VERSION"
28723 LIB_NAME="$LIB_NAME"
28724 LIB_PREFIX="$LIB_PREFIX"
28725 LIB_SUBSETS="$LIB_SUBSETS"
28726 LIB_SUFFIX="$LIB_SUFFIX"
28727 LIB_TRACING="$LIB_TRACING"
28728 LN_S="$LN_S"
28729 MAKE_TERMINFO="$MAKE_TERMINFO"
28730 MENU_NAME="$MENU_NAME"
28731 NCURSES_MAJOR="$NCURSES_MAJOR"
28732 NCURSES_MINOR="$NCURSES_MINOR"
28733 NCURSES_OSPEED="$NCURSES_OSPEED"
28734 NCURSES_PATCH="$NCURSES_PATCH"
28735 PANEL_NAME="$PANEL_NAME"
28736 SRC_SUBDIRS="$SRC_SUBDIRS"
28737 TERMINFO="$TERMINFO"
28738 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
28739 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
28740 TICS_NAME="$TICS_NAME"
28741 TICS_SUFFIX="$TICS_SUFFIX"
28742 TIC_PATH="$TIC_PATH"
28743 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
28744 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
28745 TINFO_NAME="$TINFO_NAME"
28746 TINFO_SUFFIX="$TINFO_SUFFIX"
28747 UNALTERED_SYMS="$UNALTERED_SYMS"
28748 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
28749 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
28750 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
28751 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
28752 WILDCARD_SYMS="$WILDCARD_SYMS"
28753 WITH_CURSES_H="$with_curses_h"
28754 WITH_ECHO="${enable_echo:=yes}"
28755 WITH_OVERWRITE="$with_overwrite"
28756 cf_LIST_MODELS="$cf_list_models"
28757 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
28758 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
28759 cf_cv_abi_version="$cf_cv_abi_version"
28760 cf_cv_do_relink="$cf_cv_do_relink"
28761 cf_cv_do_reranlib="$cf_cv_do_reranlib"
28762 cf_cv_do_symlinks="$cf_cv_do_symlinks"
28763 cf_cv_enable_lp64="$cf_cv_enable_lp64"
28764 cf_cv_enable_opaque="$cf_cv_enable_opaque"
28765 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
28766 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
28767 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
28768 cf_cv_rel_version="$cf_cv_rel_version"
28769 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
28770 cf_cv_shared_soname='$cf_cv_shared_soname'
28771 cf_cv_shlib_version="$cf_cv_shlib_version"
28772 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
28773 cf_cv_system_name="$cf_cv_system_name"
28774 cf_cv_term_driver="$with_term_driver"
28775 cf_with_ada="$cf_with_ada"
28776 cf_with_cxx_binding="$cf_with_cxx_binding"
28777 cf_with_db_install="$cf_with_db_install"
28778 cf_with_manpages="$cf_with_manpages"
28779 cf_with_tests="$cf_with_tests"
28780 host="$host"
28781 target="$target"
28782 with_shared_cxx="$with_shared_cxx"
28783
28784 EOF
28785
28786 cat >>"$CONFIG_STATUS" <<\EOF
28787 for ac_config_target in $ac_config_targets
28788 do
28789   case "$ac_config_target" in
28790   # Handling of arguments.
28791   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
28792   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
28793   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
28794   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
28795   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
28796   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
28797   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
28798   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
28799   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
28800   *) { { echo "$as_me:28800: error: invalid argument: $ac_config_target" >&5
28801 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
28802    { (exit 1); exit 1; }; };;
28803   esac
28804 done
28805
28806 # If the user did not use the arguments to specify the items to instantiate,
28807 # then the envvar interface is used.  Set only those that are not.
28808 # We use the long form for the default assignment because of an extremely
28809 # bizarre bug on SunOS 4.1.3.
28810 if "$ac_need_defaults"; then
28811   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
28812   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28813   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
28814 fi
28815
28816 # Create a temporary directory, and hook for its removal unless debugging.
28817 $debug ||
28818 {
28819   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
28820   trap '{ (exit 1); exit 1; }' 1 2 13 15
28821 }
28822
28823 # Create a (secure) tmp directory for tmp files.
28824 : ${TMPDIR=/tmp}
28825 {
28826   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
28827   test -n "$tmp" && test -d "$tmp"
28828 }  ||
28829 {
28830   tmp=$TMPDIR/cs$$-$RANDOM
28831   (umask 077 && mkdir $tmp)
28832 } ||
28833 {
28834    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
28835    { (exit 1); exit 1; }
28836 }
28837
28838 EOF
28839
28840 cat >>"$CONFIG_STATUS" <<EOF
28841
28842 #
28843 # CONFIG_FILES section.
28844 #
28845
28846 # No need to generate the scripts if there are no CONFIG_FILES.
28847 # This happens for instance when ./config.status config.h
28848 if test -n "\$CONFIG_FILES"; then
28849   # Protect against being on the right side of a sed subst in config.status.
28850   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
28851    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
28852 s,@SHELL@,$SHELL,;t t
28853 s,@exec_prefix@,$exec_prefix,;t t
28854 s,@prefix@,$prefix,;t t
28855 s,@program_transform_name@,$program_transform_name,;t t
28856 s,@bindir@,$bindir,;t t
28857 s,@sbindir@,$sbindir,;t t
28858 s,@libexecdir@,$libexecdir,;t t
28859 s,@datarootdir@,$datarootdir,;t t
28860 s,@datadir@,$datadir,;t t
28861 s,@sysconfdir@,$sysconfdir,;t t
28862 s,@sharedstatedir@,$sharedstatedir,;t t
28863 s,@localstatedir@,$localstatedir,;t t
28864 s,@runstatedir@,$runstatedir,;t t
28865 s,@libdir@,$libdir,;t t
28866 s,@includedir@,$includedir,;t t
28867 s,@oldincludedir@,$oldincludedir,;t t
28868 s,@infodir@,$infodir,;t t
28869 s,@mandir@,$mandir,;t t
28870 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
28871 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
28872 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
28873 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
28874 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
28875 s,@build_alias@,$build_alias,;t t
28876 s,@host_alias@,$host_alias,;t t
28877 s,@target_alias@,$target_alias,;t t
28878 s,@ECHO_C@,$ECHO_C,;t t
28879 s,@ECHO_N@,$ECHO_N,;t t
28880 s,@ECHO_T@,$ECHO_T,;t t
28881 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
28882 s,@DEFS@,$DEFS,;t t
28883 s,@LIBS@,$LIBS,;t t
28884 s,@top_builddir@,$top_builddir,;t t
28885 s,@GREP@,$GREP,;t t
28886 s,@EGREP@,$EGREP,;t t
28887 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
28888 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
28889 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
28890 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
28891 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
28892 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
28893 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
28894 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
28895 s,@VERSION@,$VERSION,;t t
28896 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
28897 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
28898 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
28899 s,@PACKAGE@,$PACKAGE,;t t
28900 s,@build@,$build,;t t
28901 s,@build_cpu@,$build_cpu,;t t
28902 s,@build_vendor@,$build_vendor,;t t
28903 s,@build_os@,$build_os,;t t
28904 s,@host@,$host,;t t
28905 s,@host_cpu@,$host_cpu,;t t
28906 s,@host_vendor@,$host_vendor,;t t
28907 s,@host_os@,$host_os,;t t
28908 s,@target@,$target,;t t
28909 s,@target_cpu@,$target_cpu,;t t
28910 s,@target_vendor@,$target_vendor,;t t
28911 s,@target_os@,$target_os,;t t
28912 s,@FGREP@,$FGREP,;t t
28913 s,@CC@,$CC,;t t
28914 s,@CFLAGS@,$CFLAGS,;t t
28915 s,@LDFLAGS@,$LDFLAGS,;t t
28916 s,@CPPFLAGS@,$CPPFLAGS,;t t
28917 s,@ac_ct_CC@,$ac_ct_CC,;t t
28918 s,@EXEEXT@,$EXEEXT,;t t
28919 s,@OBJEXT@,$OBJEXT,;t t
28920 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
28921 s,@CPP@,$CPP,;t t
28922 s,@LDCONFIG@,$LDCONFIG,;t t
28923 s,@CXX@,$CXX,;t t
28924 s,@CXXFLAGS@,$CXXFLAGS,;t t
28925 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
28926 s,@AWK@,$AWK,;t t
28927 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
28928 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
28929 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
28930 s,@LINT@,$LINT,;t t
28931 s,@LINT_OPTS@,$LINT_OPTS,;t t
28932 s,@LN_S@,$LN_S,;t t
28933 s,@cf_config_suffix@,$cf_config_suffix,;t t
28934 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
28935 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
28936 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
28937 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
28938 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
28939 s,@SET_MAKE@,$SET_MAKE,;t t
28940 s,@CTAGS@,$CTAGS,;t t
28941 s,@ETAGS@,$ETAGS,;t t
28942 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
28943 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
28944 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
28945 s,@RANLIB@,$RANLIB,;t t
28946 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
28947 s,@LD@,$LD,;t t
28948 s,@ac_ct_LD@,$ac_ct_LD,;t t
28949 s,@AR@,$AR,;t t
28950 s,@ac_ct_AR@,$ac_ct_AR,;t t
28951 s,@NM@,$NM,;t t
28952 s,@ac_ct_NM@,$ac_ct_NM,;t t
28953 s,@ARFLAGS@,$ARFLAGS,;t t
28954 s,@DESTDIR@,$DESTDIR,;t t
28955 s,@BUILD_CC@,$BUILD_CC,;t t
28956 s,@BUILD_CPP@,$BUILD_CPP,;t t
28957 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
28958 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
28959 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
28960 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
28961 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
28962 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
28963 s,@cf_list_models@,$cf_list_models,;t t
28964 s,@ABI_VERSION@,$ABI_VERSION,;t t
28965 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
28966 s,@LIBTOOL@,$LIBTOOL,;t t
28967 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
28968 s,@LT_UNDEF@,$LT_UNDEF,;t t
28969 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
28970 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
28971 s,@LIB_CREATE@,$LIB_CREATE,;t t
28972 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
28973 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
28974 s,@LIB_PREP@,$LIB_PREP,;t t
28975 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
28976 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
28977 s,@LIB_LINK@,$LIB_LINK,;t t
28978 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
28979 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
28980 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
28981 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
28982 s,@TICS_NAME@,$TICS_NAME,;t t
28983 s,@TINFO_NAME@,$TINFO_NAME,;t t
28984 s,@LIB_NAME@,$LIB_NAME,;t t
28985 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
28986 s,@CC_G_OPT@,$CC_G_OPT,;t t
28987 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
28988 s,@LD_MODEL@,$LD_MODEL,;t t
28989 s,@shlibdir@,$shlibdir,;t t
28990 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
28991 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
28992 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
28993 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
28994 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
28995 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
28996 s,@LINK_PROGS@,$LINK_PROGS,;t t
28997 s,@LINK_TESTS@,$LINK_TESTS,;t t
28998 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
28999 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
29000 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
29001 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
29002 s,@RPATH_LIST@,$RPATH_LIST,;t t
29003 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
29004 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
29005 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
29006 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
29007 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
29008 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
29009 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
29010 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
29011 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
29012 s,@TIC@,$TIC,;t t
29013 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
29014 s,@INFOCMP@,$INFOCMP,;t t
29015 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
29016 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
29017 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
29018 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
29019 s,@XTERM_KBS@,$XTERM_KBS,;t t
29020 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
29021 s,@TERMINFO@,$TERMINFO,;t t
29022 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
29023 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
29024 s,@TERMPATH@,$TERMPATH,;t t
29025 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
29026 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
29027 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
29028 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
29029 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
29030 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
29031 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
29032 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
29033 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
29034 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
29035 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
29036 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
29037 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
29038 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
29039 s,@RGB_PATH@,$RGB_PATH,;t t
29040 s,@no_x11_rgb@,$no_x11_rgb,;t t
29041 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
29042 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
29043 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
29044 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
29045 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
29046 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
29047 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
29048 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
29049 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
29050 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
29051 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
29052 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
29053 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
29054 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
29055 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
29056 s,@PTHREAD@,$PTHREAD,;t t
29057 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
29058 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
29059 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
29060 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
29061 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
29062 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
29063 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
29064 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
29065 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
29066 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
29067 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
29068 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
29069 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
29070 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
29071 s,@ECHO_LT@,$ECHO_LT,;t t
29072 s,@ECHO_LD@,$ECHO_LD,;t t
29073 s,@RULE_CC@,$RULE_CC,;t t
29074 s,@SHOW_CC@,$SHOW_CC,;t t
29075 s,@ECHO_CC@,$ECHO_CC,;t t
29076 s,@ECHO_LINK@,$ECHO_LINK,;t t
29077 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
29078 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
29079 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
29080 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
29081 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
29082 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
29083 s,@ADAFLAGS@,$ADAFLAGS,;t t
29084 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
29085 s,@ADA_TRACE@,$ADA_TRACE,;t t
29086 s,@MATH_LIB@,$MATH_LIB,;t t
29087 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
29088 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
29089 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
29090 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
29091 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
29092 s,@TEST_LIBS@,$TEST_LIBS,;t t
29093 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
29094 s,@CXXCPP@,$CXXCPP,;t t
29095 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
29096 s,@CXX_AR@,$CXX_AR,;t t
29097 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
29098 s,@CXXLIBS@,$CXXLIBS,;t t
29099 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
29100 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
29101 s,@M4_exists@,$M4_exists,;t t
29102 s,@cf_ada_make@,$cf_ada_make,;t t
29103 s,@cf_ada_config@,$cf_ada_config,;t t
29104 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
29105 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
29106 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
29107 s,@cf_compile_generics@,$cf_compile_generics,;t t
29108 s,@cf_generic_objects@,$cf_generic_objects,;t t
29109 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
29110 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
29111 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
29112 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
29113 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
29114 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
29115 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
29116 s,@cf_ada_package@,$cf_ada_package,;t t
29117 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
29118 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
29119 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
29120 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
29121 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
29122 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
29123 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
29124 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
29125 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
29126 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
29127 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
29128 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
29129 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
29130 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
29131 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
29132 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
29133 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
29134 s,@TICS_LIBS@,$TICS_LIBS,;t t
29135 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
29136 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
29137 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
29138 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
29139 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
29140 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
29141 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
29142 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
29143 s,@includesubdir@,$includesubdir,;t t
29144 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
29145 s,@TICS_LIST@,$TICS_LIST,;t t
29146 s,@TINFO_LIST@,$TINFO_LIST,;t t
29147 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
29148 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
29149 s,@FORM_NAME@,$FORM_NAME,;t t
29150 s,@MENU_NAME@,$MENU_NAME,;t t
29151 s,@PANEL_NAME@,$PANEL_NAME,;t t
29152 s,@CXX_NAME@,$CXX_NAME,;t t
29153 s,@TEST_ARGS@,$TEST_ARGS,;t t
29154 s,@TEST_DEPS@,$TEST_DEPS,;t t
29155 s,@TEST_ARG2@,$TEST_ARG2,;t t
29156 s,@TEST_DEP2@,$TEST_DEP2,;t t
29157 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
29158 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
29159 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
29160 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
29161 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
29162 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
29163 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
29164 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
29165 s,@cross_compiling@,$cross_compiling,;t t
29166 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
29167 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
29168 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
29169 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
29170 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
29171 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
29172 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
29173 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
29174 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
29175 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
29176 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
29177 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
29178 CEOF
29179
29180 EOF
29181
29182   cat >>"$CONFIG_STATUS" <<\EOF
29183   # Split the substitutions into bite-sized pieces for seds with
29184   # small command number limits, like on Digital OSF/1 and HP-UX.
29185   ac_max_sed_lines=48
29186   ac_sed_frag=1 # Number of current file.
29187   ac_beg=1 # First line for current file.
29188   ac_end=$ac_max_sed_lines # Line after last line for current file.
29189   ac_more_lines=:
29190   ac_sed_cmds=
29191   while "$ac_more_lines"; do
29192     if test "$ac_beg" -gt 1; then
29193       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29194     else
29195       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29196     fi
29197     if test ! -s $tmp/subs.frag; then
29198       ac_more_lines=false
29199     else
29200       # The purpose of the label and of the branching condition is to
29201       # speed up the sed processing (if there are no `@' at all, there
29202       # is no need to browse any of the substitutions).
29203       # These are the two extra sed commands mentioned above.
29204       (echo ':t
29205   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
29206       # It is possible to make a multiline substitution using escaped newlines.
29207       # Ensure that we do not split the substitution between script fragments.
29208       ac_BEG=$ac_end
29209       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
29210       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
29211       if test -s $tmp/subs.next; then
29212         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
29213         if test ! -s $tmp/subs.edit; then
29214           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
29215           if test ! -s $tmp/subs.edit; then
29216             if test "$ac_beg" -gt 1; then
29217               ac_end=`expr "$ac_end" - 1`
29218               continue
29219             fi
29220           fi
29221         fi
29222       fi
29223
29224       if test -z "$ac_sed_cmds"; then
29225         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
29226       else
29227         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
29228       fi
29229       ac_sed_frag=`expr "$ac_sed_frag" + 1`
29230       ac_beg=$ac_end
29231       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
29232     fi
29233   done
29234   if test -z "$ac_sed_cmds"; then
29235     ac_sed_cmds=cat
29236   fi
29237 fi # test -n "$CONFIG_FILES"
29238
29239 EOF
29240 cat >>"$CONFIG_STATUS" <<\EOF
29241 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
29242   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29243   case "$ac_file" in
29244   - | *:- | *:-:* ) # input from stdin
29245         cat >$tmp/stdin
29246         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29247         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29248   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29249         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29250   * )   ac_file_in=$ac_file.in ;;
29251   esac
29252
29253   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
29254   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29255          X"$ac_file" : 'X\(//\)[^/]' \| \
29256          X"$ac_file" : 'X\(//\)$' \| \
29257          X"$ac_file" : 'X\(/\)' \| \
29258          .     : '\(.\)' 2>/dev/null ||
29259 echo X"$ac_file" |
29260     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29261           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29262           /^X\(\/\/\)$/{ s//\1/; q; }
29263           /^X\(\/\).*/{ s//\1/; q; }
29264           s/.*/./; q'`
29265   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29266     { case "$ac_dir" in
29267   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29268   *)                      as_incr_dir=.;;
29269 esac
29270 as_dummy="$ac_dir"
29271 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29272   case $as_mkdir_dir in
29273     # Skip DOS drivespec
29274     ?:) as_incr_dir=$as_mkdir_dir ;;
29275     *)
29276       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29277       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29278     ;;
29279   esac
29280 done; }
29281
29282     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
29283     # A "../" for each directory in $ac_dir_suffix.
29284     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
29285   else
29286     ac_dir_suffix= ac_dots=
29287   fi
29288
29289   case "$srcdir" in
29290   .)  ac_srcdir=.
29291       if test -z "$ac_dots"; then
29292          ac_top_srcdir=.
29293       else
29294          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
29295       fi ;;
29296   [\\/]* | ?:[\\/]* )
29297       ac_srcdir="$srcdir$ac_dir_suffix";
29298       ac_top_srcdir="$srcdir" ;;
29299   *) # Relative path.
29300     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
29301     ac_top_srcdir="$ac_dots$srcdir" ;;
29302   esac
29303
29304   case $INSTALL in
29305   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
29306   *) ac_INSTALL=$ac_dots$INSTALL ;;
29307   esac
29308
29309   if test x"$ac_file" != x-; then
29310     { echo "$as_me:29310: creating $ac_file" >&5
29311 echo "$as_me: creating $ac_file" >&6;}
29312     rm -f "$ac_file"
29313   fi
29314   # Let's still pretend it is `configure' which instantiates (i.e., don't
29315   # use $as_me), people would be surprised to read:
29316   #    /* config.h.  Generated automatically by config.status.  */
29317   configure_input="Generated automatically from `echo $ac_file_in |
29318                                                  sed 's,.*/,,'` by configure."
29319
29320   # First look for the input files in the build tree, otherwise in the
29321   # src tree.
29322   ac_file_inputs=`IFS=:
29323     for f in $ac_file_in; do
29324       case $f in
29325       -) echo $tmp/stdin ;;
29326       [\\/$]*)
29327          # Absolute (can't be DOS-style, as IFS=:)
29328          test -f "$f" || { { echo "$as_me:29328: error: cannot find input file: $f" >&5
29329 echo "$as_me: error: cannot find input file: $f" >&2;}
29330    { (exit 1); exit 1; }; }
29331          echo $f;;
29332       *) # Relative
29333          if test -f "$f"; then
29334            # Build tree
29335            echo $f
29336          elif test -f "$srcdir/$f"; then
29337            # Source tree
29338            echo "$srcdir/$f"
29339          else
29340            # /dev/null tree
29341            { { echo "$as_me:29341: error: cannot find input file: $f" >&5
29342 echo "$as_me: error: cannot find input file: $f" >&2;}
29343    { (exit 1); exit 1; }; }
29344          fi;;
29345       esac
29346     done` || { (exit 1); exit 1; }
29347 EOF
29348 cat >>"$CONFIG_STATUS" <<\EOF
29349   ac_warn_datarootdir=no
29350   if test x"$ac_file" != x-; then
29351     for ac_item in $ac_file_inputs
29352     do
29353       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
29354       if test -n "$ac_seen"; then
29355         ac_used=`grep '@datarootdir@' "$ac_item"`
29356         if test -z "$ac_used"; then
29357           { echo "$as_me:29357: WARNING: datarootdir was used implicitly but not set:
29358 $ac_seen" >&5
29359 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
29360 $ac_seen" >&2;}
29361           ac_warn_datarootdir=yes
29362         fi
29363       fi
29364       ac_seen=`grep '${datarootdir}' "$ac_item"`
29365       if test -n "$ac_seen"; then
29366         { echo "$as_me:29366: WARNING: datarootdir was used explicitly but not set:
29367 $ac_seen" >&5
29368 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
29369 $ac_seen" >&2;}
29370         ac_warn_datarootdir=yes
29371       fi
29372     done
29373   fi
29374
29375 if test "x$ac_warn_datarootdir" = xyes; then
29376   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
29377 fi
29378
29379 EOF
29380 cat >>"$CONFIG_STATUS" <<EOF
29381   sed "$ac_vpsub
29382 $extrasub
29383 EOF
29384 cat >>"$CONFIG_STATUS" <<\EOF
29385 :t
29386 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
29387 s,@configure_input@,$configure_input,;t t
29388 s,@srcdir@,$ac_srcdir,;t t
29389 s,@top_srcdir@,$ac_top_srcdir,;t t
29390 s,@INSTALL@,$ac_INSTALL,;t t
29391 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
29392   rm -f $tmp/stdin
29393   if test x"$ac_file" != x-; then
29394     cp "$tmp/out" "$ac_file"
29395
29396     for ac_name in prefix exec_prefix datarootdir
29397     do
29398         ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
29399         if test -n "$ac_seen"; then
29400             ac_init=`${EGREP-egrep} '[  ]*'$ac_name'[   ]*=' "$ac_file"`
29401             if test -z "$ac_init"; then
29402               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
29403               { echo "$as_me:29403: WARNING: Variable $ac_name is used but was not set:
29404 $ac_seen" >&5
29405 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
29406 $ac_seen" >&2;}
29407             fi
29408         fi
29409     done
29410     ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
29411     ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
29412     if test -s $tmp/out; then
29413       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
29414       { echo "$as_me:29414: WARNING: Some variables may not be substituted:
29415 $ac_seen" >&5
29416 echo "$as_me: WARNING: Some variables may not be substituted:
29417 $ac_seen" >&2;}
29418     fi
29419   else
29420     cat $tmp/out
29421   fi
29422   rm -f $tmp/out
29423
29424 done
29425 EOF
29426 cat >>"$CONFIG_STATUS" <<\EOF
29427
29428 #
29429 # CONFIG_HEADER section.
29430 #
29431
29432 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
29433 # NAME is the cpp macro being defined and VALUE is the value it is being given.
29434 #
29435 # ac_d sets the value in "#define NAME VALUE" lines.
29436 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
29437 ac_dB='[        ].*$,\1#\2'
29438 ac_dC=' '
29439 ac_dD=',;t'
29440 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
29441 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29442 ac_iB='\([      ]\),\1#\2define\3'
29443 ac_iC=' '
29444 ac_iD='\4,;t'
29445 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
29446 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29447 ac_uB='$,\1#\2define\3'
29448 ac_uC=' '
29449 ac_uD=',;t'
29450
29451 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
29452   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29453   case "$ac_file" in
29454   - | *:- | *:-:* ) # input from stdin
29455         cat >$tmp/stdin
29456         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29457         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29458   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29459         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29460   * )   ac_file_in=$ac_file.in ;;
29461   esac
29462
29463   test x"$ac_file" != x- && { echo "$as_me:29463: creating $ac_file" >&5
29464 echo "$as_me: creating $ac_file" >&6;}
29465
29466   # First look for the input files in the build tree, otherwise in the
29467   # src tree.
29468   ac_file_inputs=`IFS=:
29469     for f in $ac_file_in; do
29470       case $f in
29471       -) echo $tmp/stdin ;;
29472       [\\/$]*)
29473          # Absolute (can't be DOS-style, as IFS=:)
29474          test -f "$f" || { { echo "$as_me:29474: error: cannot find input file: $f" >&5
29475 echo "$as_me: error: cannot find input file: $f" >&2;}
29476    { (exit 1); exit 1; }; }
29477          echo $f;;
29478       *) # Relative
29479          if test -f "$f"; then
29480            # Build tree
29481            echo $f
29482          elif test -f "$srcdir/$f"; then
29483            # Source tree
29484            echo "$srcdir/$f"
29485          else
29486            # /dev/null tree
29487            { { echo "$as_me:29487: error: cannot find input file: $f" >&5
29488 echo "$as_me: error: cannot find input file: $f" >&2;}
29489    { (exit 1); exit 1; }; }
29490          fi;;
29491       esac
29492     done` || { (exit 1); exit 1; }
29493   # Remove the trailing spaces.
29494   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
29495
29496 EOF
29497
29498 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
29499 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
29500 # be either 'cat' or 'sort'.
29501 cat confdefs.h | uniq >conftest.vals
29502
29503 # Break up conftest.vals because some shells have a limit on
29504 # the size of here documents, and old seds have small limits too.
29505
29506 rm -f conftest.tail
29507 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
29508 while grep . conftest.vals >/dev/null
29509 do
29510   # Write chunks of a limited-size here document to conftest.frag.
29511   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
29512   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
29513   echo 'CEOF' >> "$CONFIG_STATUS"
29514   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
29515   rm -f conftest.vals
29516   mv conftest.tail conftest.vals
29517 done
29518 rm -f conftest.vals
29519
29520 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
29521 # marker @DEFS@.
29522 echo '  cat >> conftest.edit <<CEOF
29523 /@DEFS@/r conftest.frag
29524 /@DEFS@/d
29525 CEOF
29526 sed -f conftest.edit $tmp/in > $tmp/out
29527 rm -f $tmp/in
29528 mv $tmp/out $tmp/in
29529 rm -f conftest.edit conftest.frag
29530 ' >> "$CONFIG_STATUS"
29531
29532 cat >>"$CONFIG_STATUS" <<\EOF
29533   # Let's still pretend it is `configure' which instantiates (i.e., don't
29534   # use $as_me), people would be surprised to read:
29535   #    /* config.h.  Generated automatically by config.status.  */
29536   if test x"$ac_file" = x-; then
29537     echo "/* Generated automatically by configure.  */" >$tmp/config.h
29538   else
29539     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
29540   fi
29541   cat $tmp/in >>$tmp/config.h
29542   rm -f $tmp/in
29543   if test x"$ac_file" != x-; then
29544     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
29545       { echo "$as_me:29545: $ac_file is unchanged" >&5
29546 echo "$as_me: $ac_file is unchanged" >&6;}
29547     else
29548       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29549          X"$ac_file" : 'X\(//\)[^/]' \| \
29550          X"$ac_file" : 'X\(//\)$' \| \
29551          X"$ac_file" : 'X\(/\)' \| \
29552          .     : '\(.\)' 2>/dev/null ||
29553 echo X"$ac_file" |
29554     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29555           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29556           /^X\(\/\/\)$/{ s//\1/; q; }
29557           /^X\(\/\).*/{ s//\1/; q; }
29558           s/.*/./; q'`
29559       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29560         { case "$ac_dir" in
29561   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29562   *)                      as_incr_dir=.;;
29563 esac
29564 as_dummy="$ac_dir"
29565 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29566   case $as_mkdir_dir in
29567     # Skip DOS drivespec
29568     ?:) as_incr_dir=$as_mkdir_dir ;;
29569     *)
29570       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29571       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29572     ;;
29573   esac
29574 done; }
29575
29576       fi
29577       rm -f "$ac_file"
29578       mv "$tmp/config.h" "$ac_file"
29579     fi
29580   else
29581     cat $tmp/config.h
29582     rm -f $tmp/config.h
29583   fi
29584 done
29585 EOF
29586 cat >>"$CONFIG_STATUS" <<\EOF
29587 #
29588 # CONFIG_COMMANDS section.
29589 #
29590 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
29591   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
29592   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
29593
29594   case "$ac_dest" in
29595     default )
29596 if test "x$cf_with_tests" != xno ; then
29597
29598 for cf_dir in test
29599 do
29600         if test ! -d "$srcdir/$cf_dir" ; then
29601                 continue
29602         elif test -f "$srcdir/$cf_dir/programs" ; then
29603                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
29604         fi
29605 done
29606
29607 fi
29608
29609 cf_prefix=$LIB_PREFIX
29610
29611 case "$cf_cv_shlib_version" in
29612 (cygdll|msysdll|mingw|msvcdll)
29613         TINFO_NAME=$TINFO_ARG_SUFFIX
29614         TINFO_SUFFIX=.dll
29615         ;;
29616 esac
29617
29618 if test -n "$TINFO_SUFFIX" ; then
29619         case "$TINFO_SUFFIX" in
29620         (tw*)
29621                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
29622                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
29623                 ;;
29624         (t*)
29625                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
29626                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
29627                 ;;
29628         (w*)
29629                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
29630                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
29631                 ;;
29632         esac
29633 fi
29634
29635 for cf_dir in $SRC_SUBDIRS
29636 do
29637         if test ! -d "$srcdir/$cf_dir" ; then
29638                 continue
29639         elif test -f "$srcdir/$cf_dir/modules" ; then
29640
29641                 SHARED_LIB=
29642                 Libs_To_Make=
29643                 cf_awk_program=
29644                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
29645                 then
29646                         cf_awk_program="$cf_awk_program\
29647 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
29648 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
29649 "
29650                 fi
29651
29652                 if test "x$WILDCARD_SYMS" = xno
29653                 then
29654                         cf_awk_program="$cf_awk_program\
29655 /[      ]_\\*;/ { skip=1; next; }\
29656 "
29657                 fi
29658
29659                 if test "x$cf_awk_program" != "x"
29660                 then
29661                         cat >>$cf_dir/Makefile <<CF_EOF
29662
29663 # Generated by CF_LIB_RULES
29664 resulting.map: $UNALTERED_SYMS
29665         $AWK 'BEGIN { skip = 1; last=""; } \
29666 $cf_awk_program \
29667 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
29668  skip = 0; last = \$\$0; } \
29669 END { print last; }' < "$UNALTERED_SYMS" >\$@
29670
29671 distclean::
29672         rm -f resulting.map
29673 CF_EOF
29674                 fi
29675
29676                 for cf_item in $cf_LIST_MODELS
29677                 do
29678
29679         case X$cf_item in
29680         (Xlibtool)
29681                 cf_suffix='.la'
29682                 cf_depsuf=$cf_suffix
29683                 ;;
29684         (Xdebug)
29685                 case "$cf_cv_system_name" in
29686                 (*-msvc*)
29687                         cf_suffix='_g.lib'
29688                         ;;
29689                 (*)
29690                         cf_suffix='_g.a'
29691                         ;;
29692                 esac
29693                 cf_depsuf=$cf_suffix
29694                 ;;
29695         (Xprofile)
29696                 case "$cf_cv_system_name" in
29697                 (*-msvc*)
29698                         cf_suffix='_p.lib'
29699                         ;;
29700                 (*)
29701                         cf_suffix='_p.a'
29702                         ;;
29703                 esac
29704                 cf_depsuf=$cf_suffix
29705                 ;;
29706         (Xshared)
29707                 case "$cf_cv_system_name" in
29708                 (aix[5-7]*)
29709                         cf_suffix='.so'
29710                         cf_depsuf=$cf_suffix
29711                         ;;
29712                 (*-msvc*)
29713                         cf_suffix='.dll'
29714                         cf_depsuf='.dll.lib'
29715                         ;;
29716                 (cygwin*|msys*|mingw*)
29717                         cf_suffix='.dll'
29718                         cf_depsuf='.dll.a'
29719                         ;;
29720                 (darwin*)
29721                         cf_suffix='.dylib'
29722                         cf_depsuf=$cf_suffix
29723                         ;;
29724                 (hpux*)
29725                         case "$target" in
29726                         (ia64*)
29727                                 cf_suffix='.so'
29728                                 cf_depsuf=$cf_suffix
29729                                 ;;
29730                         (*)
29731                                 cf_suffix='.sl'
29732                                 cf_depsuf=$cf_suffix
29733                                 ;;
29734                         esac
29735                         ;;
29736                 (*)
29737                         cf_suffix='.so'
29738                         cf_depsuf=$cf_suffix
29739                         ;;
29740                 esac
29741                 ;;
29742         (*)
29743                 case "$target" in
29744                 (*-msvc*)
29745                         cf_suffix='.lib'
29746                         ;;
29747                 (*)
29748                         cf_suffix='.a'
29749                         ;;
29750                 esac
29751                 cf_depsuf=$cf_suffix
29752                 ;;
29753         esac
29754         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
29755         then
29756                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
29757                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
29758         fi
29759
29760                         if test "$cf_dir" = "c++"
29761                         then
29762
29763 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29764
29765 eval cf_libname="\$${cf_map_lib_basename}_NAME"
29766
29767                         else
29768
29769 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29770
29771 eval cf_libname="\$${cf_map_lib_basename}_NAME"
29772
29773                         fi
29774                         test -z "$cf_libname" && cf_libname="$cf_dir"
29775                         if test "$cf_item" = shared ; then
29776                                 if test -n "${LIB_SUFFIX}"
29777                                 then
29778                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
29779                                 else
29780                                         cf_shared_suffix="$cf_suffix"
29781                                 fi
29782                                 if test "$cf_cv_do_symlinks" = yes ; then
29783                                         cf_version_name=
29784
29785                                         case "$cf_cv_shlib_version" in
29786                                         (rel)
29787                                                 cf_version_name=REL_VERSION
29788                                                 ;;
29789                                         (abi)
29790                                                 cf_version_name=ABI_VERSION
29791                                                 ;;
29792                                         esac
29793
29794                                         if test -n "$cf_version_name"
29795                                         then
29796                                                 case "$cf_cv_system_name" in
29797                                                 (darwin*)
29798                                                         # "w", etc?
29799                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
29800                                                         ;;
29801                                                 (*)
29802                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
29803                                                         ;;
29804                                                 esac
29805                                         fi
29806                                         if test -n "${USE_LIB_SUFFIX}"
29807                                         then
29808                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
29809                                         else
29810                                                 cf_shared_suffix="$cf_suffix"
29811                                         fi
29812                                 fi
29813                                 # cygwin needs import library, and has unique naming convention
29814                                 # use autodetected ${cf_prefix} for import lib and static lib, but
29815                                 # use 'cyg' prefix for shared lib.
29816                                 case "$cf_cv_shlib_version" in
29817                                 (cygdll)
29818                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29819                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
29820                                         ;;
29821                                 (msysdll)
29822                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29823                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
29824                                         ;;
29825                                 (mingw)
29826                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29827                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
29828                                         ;;
29829                                 (msvcdll)
29830                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29831                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
29832                                         ;;
29833                                 (*)
29834                                         cf_add_lib=
29835                                         ;;
29836                                 esac
29837                                 if test -n "$cf_add_lib"
29838                                 then
29839                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
29840                                         continue
29841                                 fi
29842                         fi
29843                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
29844                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
29845                 done
29846
29847                 if test "$cf_dir" = ncurses ; then
29848                         cf_subsets="$LIB_SUBSETS"
29849                         cf_r_parts="$cf_subsets"
29850                         cf_liblist="$Libs_To_Make"
29851
29852                         while test -n "$cf_r_parts"
29853                         do
29854                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
29855                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
29856                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
29857                                         cf_add_lib=
29858                                         case "$cf_l_parts" in
29859                                         (*termlib*)
29860                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
29861                                                 ;;
29862                                         (*ticlib*)
29863                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
29864                                                 ;;
29865                                         (*)
29866                                                 break
29867                                                 ;;
29868                                         esac
29869                                         if test -n "$cf_add_lib"; then
29870                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
29871                                         fi
29872                                 else
29873                                         break
29874                                 fi
29875                         done
29876                 else
29877                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
29878                 fi
29879
29880                 if test "$cf_dir" = c++; then
29881                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
29882                                 cf_list=
29883                                 for cf_item in $Libs_To_Make
29884                                 do
29885                                         case "$cf_item" in
29886                                         (*.a)
29887                                                 ;;
29888                                         (*)
29889                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
29890                                                 ;;
29891                                         esac
29892                                         for cf_test in $cf_list
29893                                         do
29894                                                 if test "$cf_test" = "$cf_item"
29895                                                 then
29896                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
29897                                                         cf_item=
29898                                                         break
29899                                                 fi
29900                                         done
29901                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
29902                                 done
29903                                 Libs_To_Make="$cf_list"
29904                         fi
29905                 fi
29906
29907                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
29908                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
29909                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
29910                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
29911
29912                 $AWK -f "$srcdir/mk-0th.awk" \
29913                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
29914                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
29915
29916                 for cf_subset in $cf_subsets
29917                 do
29918                         cf_subdirs=
29919                         for cf_item in $cf_LIST_MODELS
29920                         do
29921
29922                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
29923
29924 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29925
29926                         CXX_MODEL=$cf_ITEM
29927                         if test "$CXX_MODEL" = SHARED; then
29928                                 case "$cf_cv_shlib_version" in
29929                                 (cygdll|msysdll|mingw|msvcdll)
29930                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
29931
29932 echo "${as_me:-configure}:29932: testing overriding CXX_MODEL to SHARED ..." 1>&5
29933
29934                                         with_shared_cxx=yes
29935                                         ;;
29936                                 (*)
29937                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
29938                                         ;;
29939                                 esac
29940                         fi
29941
29942         case X$cf_item in
29943         (Xlibtool)
29944                 cf_suffix='.la'
29945                 cf_depsuf=$cf_suffix
29946                 ;;
29947         (Xdebug)
29948                 case "$cf_cv_system_name" in
29949                 (*-msvc*)
29950                         cf_suffix='_g.lib'
29951                         ;;
29952                 (*)
29953                         cf_suffix='_g.a'
29954                         ;;
29955                 esac
29956                 cf_depsuf=$cf_suffix
29957                 ;;
29958         (Xprofile)
29959                 case "$cf_cv_system_name" in
29960                 (*-msvc*)
29961                         cf_suffix='_p.lib'
29962                         ;;
29963                 (*)
29964                         cf_suffix='_p.a'
29965                         ;;
29966                 esac
29967                 cf_depsuf=$cf_suffix
29968                 ;;
29969         (Xshared)
29970                 case "$cf_cv_system_name" in
29971                 (aix[5-7]*)
29972                         cf_suffix='.so'
29973                         cf_depsuf=$cf_suffix
29974                         ;;
29975                 (*-msvc*)
29976                         cf_suffix='.dll'
29977                         cf_depsuf='.dll.lib'
29978                         ;;
29979                 (cygwin*|msys*|mingw*)
29980                         cf_suffix='.dll'
29981                         cf_depsuf='.dll.a'
29982                         ;;
29983                 (darwin*)
29984                         cf_suffix='.dylib'
29985                         cf_depsuf=$cf_suffix
29986                         ;;
29987                 (hpux*)
29988                         case "$target" in
29989                         (ia64*)
29990                                 cf_suffix='.so'
29991                                 cf_depsuf=$cf_suffix
29992                                 ;;
29993                         (*)
29994                                 cf_suffix='.sl'
29995                                 cf_depsuf=$cf_suffix
29996                                 ;;
29997                         esac
29998                         ;;
29999                 (*)
30000                         cf_suffix='.so'
30001                         cf_depsuf=$cf_suffix
30002                         ;;
30003                 esac
30004                 ;;
30005         (*)
30006                 case "$target" in
30007                 (*-msvc*)
30008                         cf_suffix='.lib'
30009                         ;;
30010                 (*)
30011                         cf_suffix='.a'
30012                         ;;
30013                 esac
30014                 cf_depsuf=$cf_suffix
30015                 ;;
30016         esac
30017         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30018         then
30019                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30020                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30021         fi
30022
30023         case $cf_item in
30024         (libtool) cf_subdir='obj_lo'  ;;
30025         (normal)  cf_subdir='objects' ;;
30026         (debug)   cf_subdir='obj_g' ;;
30027         (profile) cf_subdir='obj_p' ;;
30028         (shared)
30029                 case "$cf_cv_system_name" in
30030                 (cygwin|msys)
30031                         cf_subdir='objects' ;;
30032                 (*)
30033                         cf_subdir='obj_s' ;;
30034                 esac
30035         esac
30036
30037                         # Test for case where we build libtinfo with a different name.
30038                         cf_libname=$cf_dir
30039                         if test "$cf_dir" = ncurses ; then
30040                                 case "$cf_subset" in
30041                                 (*base*)
30042                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
30043                                         ;;
30044                                 (*termlib*)
30045                                         cf_libname=$TINFO_LIB_SUFFIX
30046                                         ;;
30047                                 (ticlib*)
30048                                         cf_libname=$TICS_LIB_SUFFIX
30049                                         ;;
30050                                 esac
30051                         elif test "$cf_dir" = c++ ; then
30052
30053 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30054
30055 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30056
30057                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30058                         else
30059
30060 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30061
30062 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30063
30064                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30065                         fi
30066                         if test -n "${USE_ARG_SUFFIX}" ; then
30067                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
30068                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
30069                         fi
30070
30071                         # These dependencies really are for development, not
30072                         # builds, but they are useful in porting, too.
30073                         cf_depend="../include/ncurses_cfg.h"
30074                         if test "$srcdir" = "."; then
30075                                 cf_reldir="."
30076                         else
30077                                 cf_reldir="\${srcdir}"
30078                         fi
30079
30080                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
30081                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
30082                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
30083                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
30084                         fi
30085
30086                         cf_dir_suffix=
30087                         old_cf_suffix="$cf_suffix"
30088                         if test "$cf_cv_shlib_version_infix" = yes ; then
30089                         if test -n "$USE_LIB_SUFFIX" ; then
30090                                 case "$USE_LIB_SUFFIX" in
30091                                 (tw*)
30092                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
30093                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30094                                         cf_dir_suffix=tw$EXTRA_SUFFIX
30095                                         ;;
30096                                 (t*)
30097                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
30098                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
30099                                         cf_dir_suffix=t$EXTRA_SUFFIX
30100                                         ;;
30101                                 (w*)
30102                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
30103                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
30104                                         cf_dir_suffix=w$EXTRA_SUFFIX
30105                                         ;;
30106                                 (*)
30107                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
30108                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
30109                                         cf_dir_suffix=$EXTRA_SUFFIX
30110                                         ;;
30111                                 esac
30112                         fi
30113                         fi
30114
30115                         $AWK -f "$srcdir/mk-1st.awk" \
30116                                 name=${cf_libname}${cf_dir_suffix} \
30117                                 traces=$LIB_TRACING \
30118                                 MODEL=$cf_ITEM \
30119                                 CXX_MODEL=$CXX_MODEL \
30120                                 model=$cf_subdir \
30121                                 prefix=$cf_prefix \
30122                                 suffix=$cf_suffix \
30123                                 subset=$cf_subset \
30124                                 driver=$cf_cv_term_driver \
30125                                 SymLink="$LN_S" \
30126                                 TermlibRoot=$TINFO_NAME \
30127                                 TermlibSuffix=$TINFO_SUFFIX \
30128                                 ShlibVer=$cf_cv_shlib_version \
30129                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
30130                                 ReLink=${cf_cv_do_relink:-no} \
30131                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
30132                                 DoLinks=$cf_cv_do_symlinks \
30133                                 rmSoLocs=$cf_cv_rm_so_locs \
30134                                 ldconfig="$LDCONFIG" \
30135                                 overwrite=$WITH_OVERWRITE \
30136                                 depend="$cf_depend" \
30137                                 host="$host" \
30138                                 libtool_version="$LIBTOOL_VERSION" \
30139                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30140
30141                         cf_suffix="$old_cf_suffix"
30142
30143                         for cf_subdir2 in $cf_subdirs lib
30144                         do
30145                                 test "$cf_subdir" = "$cf_subdir2" && break
30146                         done
30147                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
30148                         $AWK -f "$srcdir/mk-2nd.awk" \
30149                                 name=$cf_dir \
30150                                 traces=$LIB_TRACING \
30151                                 MODEL=$cf_ITEM \
30152                                 model=$cf_subdir \
30153                                 subset=$cf_subset \
30154                                 srcdir=$srcdir \
30155                                 echo=$WITH_ECHO \
30156                                 crenames=$cf_cv_prog_CC_c_o \
30157                                 cxxrenames=$cf_cv_prog_CXX_c_o \
30158                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30159                         cf_subdirs="$cf_subdirs $cf_subdir"
30160                         done
30161                 done
30162         fi
30163
30164         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
30165 done
30166
30167 for cf_dir in $SRC_SUBDIRS
30168 do
30169         if test ! -d "$srcdir/$cf_dir" ; then
30170                 continue
30171         fi
30172
30173         if test -f "$cf_dir/Makefile" ; then
30174                 case "$cf_dir" in
30175                 (Ada95)
30176                         echo 'libs \' >> Makefile
30177                         echo 'install.libs \' >> Makefile
30178                         echo 'uninstall.libs ::' >> Makefile
30179                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
30180                         ;;
30181                 esac
30182         fi
30183
30184         if test -f "$srcdir/$cf_dir/modules" ; then
30185                 echo >> Makefile
30186                 if test -f "$srcdir/$cf_dir/headers" ; then
30187 cat >> Makefile <<CF_EOF
30188 install.includes \\
30189 uninstall.includes \\
30190 CF_EOF
30191                 fi
30192
30193 echo 'lint \' >> Makefile
30194
30195 cat >> Makefile <<CF_EOF
30196 libs \\
30197 lintlib \\
30198 install.libs \\
30199 uninstall.libs \\
30200 install.$cf_dir \\
30201 uninstall.$cf_dir ::
30202         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30203 CF_EOF
30204         elif test -f "$srcdir/$cf_dir/headers" ; then
30205 cat >> Makefile <<CF_EOF
30206
30207 libs \\
30208 install.libs \\
30209 uninstall.libs \\
30210 install.includes \\
30211 uninstall.includes ::
30212         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30213 CF_EOF
30214 fi
30215 done
30216
30217 if test "x$cf_with_db_install" = xyes; then
30218 cat >> Makefile <<CF_EOF
30219
30220 install.libs uninstall.libs \\
30221 install.data uninstall.data ::
30222 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30223 CF_EOF
30224 else
30225 cat >> Makefile <<CF_EOF
30226
30227 install.libs uninstall.libs ::
30228         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30229 CF_EOF
30230 fi
30231
30232 if test "x$cf_with_manpages" = xyes; then
30233 cat >> Makefile <<CF_EOF
30234
30235 install.man \\
30236 uninstall.man ::
30237         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
30238 CF_EOF
30239 fi
30240
30241 cat >> Makefile <<CF_EOF
30242
30243 distclean ::
30244         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
30245         rm -f headers.sh headers.sed mk_shared_lib.sh
30246         rm -f edit_man.* man_alias.*
30247         rm -rf \${DIRS_TO_MAKE}
30248 CF_EOF
30249
30250 # Special case: tack's manpage lives in its own directory.
30251 if test "x$cf_with_manpages" = xyes; then
30252 if test "x$cf_with_tack" = "xyes"; then
30253 cat >> Makefile <<CF_EOF
30254
30255 install.man \\
30256 uninstall.man ::
30257         ( cd tack && \${MAKE} \${TOP_MFLAGS} \$@ )
30258 CF_EOF
30259 fi
30260 fi
30261
30262 rm -f headers.sed headers.sh
30263
30264 echo creating headers.sh
30265 cat >headers.sh <<CF_EOF
30266 #! $SHELL
30267 # This shell script is generated by the 'configure' script.  It is invoked in a
30268 # subdirectory of the build tree.  It generates a sed-script in the parent
30269 # directory that is used to adjust includes for header files that reside in a
30270 # subdirectory of /usr/include, etc.
30271 PRG=""
30272 while test \$# != 3
30273 do
30274 PRG="\$PRG \$1"; shift
30275 done
30276 DST=\$1
30277 REF=\$2
30278 SRC=\$3
30279 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
30280 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
30281 echo installing \$SRC in \$DST
30282 CF_EOF
30283
30284 if test "$WITH_CURSES_H" = yes; then
30285         cat >>headers.sh <<CF_EOF
30286 case \$DST in
30287 (/*/include/*)
30288         END=\`basename \$DST\`
30289         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30290         do
30291                 NAME=\`basename \$i\`
30292                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30293         done
30294         ;;
30295 (*)
30296         echo "" >> \$TMPSED
30297         ;;
30298 esac
30299 CF_EOF
30300
30301 else
30302         cat >>headers.sh <<CF_EOF
30303 case \$DST in
30304 (/*/include/*)
30305         END=\`basename \$DST\`
30306         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30307         do
30308                 NAME=\`basename \$i\`
30309                 if test "\$NAME" = "curses.h"
30310                 then
30311                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30312                         NAME=ncurses.h
30313                 fi
30314                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30315         done
30316         ;;
30317 (*)
30318         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30319         ;;
30320 esac
30321 CF_EOF
30322 fi
30323 cat >>headers.sh <<CF_EOF
30324 rm -f \$TMPSRC
30325 sed -f \$TMPSED \$SRC > \$TMPSRC
30326 NAME=\`basename \$SRC\`
30327 CF_EOF
30328 if test "$WITH_CURSES_H" != yes; then
30329         cat >>headers.sh <<CF_EOF
30330 test "\$NAME" = "curses.h" && NAME=ncurses.h
30331 CF_EOF
30332 fi
30333 cat >>headers.sh <<CF_EOF
30334 # Just in case someone gzip'd manpages, remove the conflicting copy.
30335 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
30336
30337 eval \$PRG \$TMPSRC \$DST/\$NAME
30338 rm -f \$TMPSRC \$TMPSED
30339 CF_EOF
30340
30341 chmod 0755 headers.sh
30342
30343 for cf_dir in $SRC_SUBDIRS
30344 do
30345         if test ! -d "$srcdir/$cf_dir" ; then
30346                 continue
30347         fi
30348
30349         if test -f "$srcdir/$cf_dir/headers" ; then
30350                 $AWK -f "$srcdir/mk-hdr.awk" \
30351                         subset="$LIB_SUBSETS" \
30352                         compat="$WITH_CURSES_H" \
30353                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
30354         fi
30355
30356         if test -f "$srcdir/$cf_dir/modules" ; then
30357                 if test "$cf_dir" != "c++" ; then
30358                         cat >>$cf_dir/Makefile <<"CF_EOF"
30359 depend : ${AUTO_SRC}
30360         makedepend -- ${CPPFLAGS} -- ${C_SRC}
30361
30362 # DO NOT DELETE THIS LINE -- make depend depends on it.
30363 CF_EOF
30364                 fi
30365         fi
30366 done
30367
30368 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
30369 if test -z "$USE_OLD_MAKERULES" ; then
30370         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
30371 fi
30372 fi
30373  ;;
30374   esac
30375 done
30376 EOF
30377
30378 cat >>"$CONFIG_STATUS" <<\EOF
30379
30380 { (exit 0); exit 0; }
30381 EOF
30382 chmod +x "$CONFIG_STATUS"
30383 ac_clean_files=$ac_clean_files_save
30384
30385 # configure is writing to config.log, and then calls config.status.
30386 # config.status does its own redirection, appending to config.log.
30387 # Unfortunately, on DOS this fails, as config.log is still kept open
30388 # by configure, so config.status won't be able to write to it; its
30389 # output is simply discarded.  So we exec the FD to /dev/null,
30390 # effectively closing config.log, so it can be properly (re)opened and
30391 # appended to by config.status.  When coming back to configure, we
30392 # need to make the FD available again.
30393 if test "$no_create" != yes; then
30394   ac_cs_success=:
30395   exec 5>/dev/null
30396   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
30397   exec 5>>config.log
30398   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30399   # would make configure fail if this is the last instruction.
30400   "$ac_cs_success" || { (exit 1); exit 1; }
30401 fi
30402 ${MAKE:-make} preinstall