]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.4 - patch 20230128
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.755 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20230114.
5 #
6 # Copyright 2003-2022,2023      Thomas E. Dickey
7 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
8 # Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11
12 # Avoid depending upon Character Ranges.
13 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16 as_cr_digits='0123456789'
17 as_cr_alnum=$as_cr_Letters$as_cr_digits
18
19 # Sed expression to map a string onto a valid variable name.
20 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
21
22 # Sed expression to map a string onto a valid CPP name.
23 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
24
25 # Be Bourne compatible
26 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27   emulate sh
28   NULLCMD=:
29 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
30   set -o posix
31 fi
32
33 # Name of the executable.
34 as_me=`echo "$0" |sed 's,.*[\\/],,'`
35
36 if expr a : '\(a\)' >/dev/null 2>&1; then
37   as_expr="expr"
38 else
39   as_expr="false"
40 fi
41
42 rm -f conf$$ conf$$.exe conf$$.file
43 echo >conf$$.file
44 if ln -s conf$$.file conf$$ 2>/dev/null; then
45   # We could just check for DJGPP; but this test a) works b) is more generic
46   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
47   if test -f conf$$.exe; then
48     # Don't use ln at all; we don't have any links
49     as_ln_s='cp -p'
50   else
51     as_ln_s='ln -s'
52   fi
53 elif ln conf$$.file conf$$ 2>/dev/null; then
54   as_ln_s='ln'
55 else
56   as_ln_s='cp -p'
57 fi
58 rm -f conf$$ conf$$.exe conf$$.file
59
60 as_executable_p="test -f"
61
62 # Support unset when possible.
63 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
64   as_unset="unset"
65 else
66   as_unset="false"
67 fi
68
69 # NLS nuisances.
70 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
71 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
72 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
73 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
74 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
75 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
76 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
77 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
78
79 # IFS
80 # We need space, tab and new line, in precisely that order.
81 as_nl='
82 '
83 IFS="   $as_nl"
84
85 # CDPATH.
86 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
87
88 # Name of the host.
89 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
90 # so uname gets run too.
91 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
92
93 exec 6>&1
94
95 #
96 # Initializations.
97 #
98 ac_default_prefix=/usr/local
99 cross_compiling=no
100 subdirs=
101 MFLAGS=
102 MAKEFLAGS=
103 SHELL=${CONFIG_SHELL-/bin/sh}
104
105 # Maximum number of lines to put in a shell here document.
106 # This variable seems obsolete.  It should probably be removed, and
107 # only ac_max_sed_lines should be used.
108 : "${ac_max_here_lines=38}"
109
110 ac_unique_file="ncurses/base/lib_initscr.c"
111 # Factoring default headers for most tests.
112 ac_includes_default="\
113 #include <stdio.h>
114 #if HAVE_SYS_TYPES_H
115 # include <sys/types.h>
116 #endif
117 #if HAVE_SYS_STAT_H
118 # include <sys/stat.h>
119 #endif
120 #if STDC_HEADERS
121 # include <stdlib.h>
122 # include <stddef.h>
123 #else
124 # if HAVE_STDLIB_H
125 #  include <stdlib.h>
126 # endif
127 #endif
128 #if HAVE_STRING_H
129 # if !STDC_HEADERS && HAVE_MEMORY_H
130 #  include <memory.h>
131 # endif
132 # include <string.h>
133 #endif
134 #if HAVE_STRINGS_H
135 # include <strings.h>
136 #endif
137 #if HAVE_INTTYPES_H
138 # include <inttypes.h>
139 #else
140 # if HAVE_STDINT_H
141 #  include <stdint.h>
142 # endif
143 #endif
144 #if HAVE_UNISTD_H
145 # include <unistd.h>
146 #endif"
147
148 # Initialize some variables set by options.
149 ac_init_help=
150 ac_init_version=false
151 # The variables have the same names as the options, with
152 # dashes changed to underlines.
153 cache_file=/dev/null
154 exec_prefix=NONE
155 no_create=
156 no_recursion=
157 prefix=NONE
158 program_prefix=NONE
159 program_suffix=NONE
160 program_transform_name=s,x,x,
161 silent=
162 site=
163 srcdir=
164 verbose=
165 x_includes=NONE
166 x_libraries=NONE
167
168 # Installation directory options.
169 # These are left unexpanded so users can "make install exec_prefix=/foo"
170 # and all the variables that are supposed to be based on exec_prefix
171 # by default will actually change.
172 # Use braces instead of parens because sh, perl, etc. also accept them.
173 bindir='${exec_prefix}/bin'
174 sbindir='${exec_prefix}/sbin'
175 libexecdir='${exec_prefix}/libexec'
176 datarootdir='${prefix}/share'
177 datadir='${datarootdir}'
178 sysconfdir='${prefix}/etc'
179 sharedstatedir='${prefix}/com'
180 localstatedir='${prefix}/var'
181 runstatedir='${localstatedir}/run'
182 libdir='${exec_prefix}/lib'
183 includedir='${prefix}/include'
184 oldincludedir='/usr/include'
185 infodir='${datarootdir}/info'
186 mandir='${datarootdir}/man'
187
188 # Identity of this package.
189 PACKAGE_NAME=
190 PACKAGE_TARNAME=
191 PACKAGE_VERSION=
192 PACKAGE_STRING=
193 PACKAGE_BUGREPORT=
194
195 ac_prev=
196 for ac_option
197 do
198   # If the previous option needs an argument, assign it.
199   if test -n "$ac_prev"; then
200     eval "$ac_prev=\$ac_option"
201     ac_prev=
202     continue
203   fi
204
205   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
206
207   # Accept the important Cygnus configure options, so we can diagnose typos.
208
209   case "$ac_option" in
210
211   -bindir | --bindir | --bindi | --bind | --bin | --bi)
212     ac_prev=bindir ;;
213   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
214     bindir=$ac_optarg ;;
215
216   -build | --build | --buil | --bui | --bu)
217     ac_prev=build_alias ;;
218   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
219     build_alias=$ac_optarg ;;
220
221   -cache-file | --cache-file | --cache-fil | --cache-fi \
222   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
223     ac_prev=cache_file ;;
224   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
225   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
226     cache_file=$ac_optarg ;;
227
228   --config-cache | -C)
229     cache_file=config.cache ;;
230
231   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
232     ac_prev=datadir ;;
233   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
234   | --da=*)
235     datadir=$ac_optarg ;;
236
237   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
238   | --dataroo | --dataro | --datar)
239     ac_prev=datarootdir ;;
240   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
241   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
242     datarootdir=$ac_optarg ;;
243
244   -disable-* | --disable-*)
245     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
246     # Reject names that are not valid shell variable names.
247     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
248       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
249    { (exit 1); exit 1; }; }
250     ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
251     eval "enable_$ac_feature=no" ;;
252
253   -enable-* | --enable-*)
254     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
255     # Reject names that are not valid shell variable names.
256     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
257       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
258    { (exit 1); exit 1; }; }
259     ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
260     case "$ac_option" in
261       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
262       *) ac_optarg=yes ;;
263     esac
264     eval "enable_$ac_feature='$ac_optarg'" ;;
265
266   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
267   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
268   | --exec | --exe | --ex)
269     ac_prev=exec_prefix ;;
270   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
271   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
272   | --exec=* | --exe=* | --ex=*)
273     exec_prefix=$ac_optarg ;;
274
275   -gas | --gas | --ga | --g)
276     # Obsolete; use --with-gas.
277     with_gas=yes ;;
278
279   -help | --help | --hel | --he | -h)
280     ac_init_help=long ;;
281   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
282     ac_init_help=recursive ;;
283   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
284     ac_init_help=short ;;
285
286   -host | --host | --hos | --ho)
287     ac_prev=host_alias ;;
288   -host=* | --host=* | --hos=* | --ho=*)
289     host_alias=$ac_optarg ;;
290
291   -includedir | --includedir | --includedi | --included | --include \
292   | --includ | --inclu | --incl | --inc)
293     ac_prev=includedir ;;
294   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
295   | --includ=* | --inclu=* | --incl=* | --inc=*)
296     includedir=$ac_optarg ;;
297
298   -infodir | --infodir | --infodi | --infod | --info | --inf)
299     ac_prev=infodir ;;
300   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
301     infodir=$ac_optarg ;;
302
303   -libdir | --libdir | --libdi | --libd)
304     ac_prev=libdir ;;
305   -libdir=* | --libdir=* | --libdi=* | --libd=*)
306     libdir=$ac_optarg ;;
307
308   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
309   | --libexe | --libex | --libe)
310     ac_prev=libexecdir ;;
311   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
312   | --libexe=* | --libex=* | --libe=*)
313     libexecdir=$ac_optarg ;;
314
315   -localstatedir | --localstatedir | --localstatedi | --localstated \
316   | --localstate | --localstat | --localsta | --localst \
317   | --locals | --local | --loca | --loc | --lo)
318     ac_prev=localstatedir ;;
319   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
320   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
321   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
322     localstatedir=$ac_optarg ;;
323
324   -runstatedir | --runstatedir | --runstatedi | --runstated \
325   | --runstate | --runstat | --runsta | --runst \
326   | --runs | --run | --ru)
327     ac_prev=runstatedir ;;
328   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
329   | --runstate=* | --runstat=* | --runsta=* | --runst=* \
330   | --runs=* | --run=* | --ru=*)
331     runstatedir=$ac_optarg ;;
332
333   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
334     ac_prev=mandir ;;
335   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
336     mandir=$ac_optarg ;;
337
338   -nfp | --nfp | --nf)
339     # Obsolete; use --without-fp.
340     with_fp=no ;;
341
342   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
343   | --no-cr | --no-c)
344     no_create=yes ;;
345
346   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
347   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
348     no_recursion=yes ;;
349
350   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
351   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
352   | --oldin | --oldi | --old | --ol | --o)
353     ac_prev=oldincludedir ;;
354   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
355   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
356   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
357     oldincludedir=$ac_optarg ;;
358
359   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
360     ac_prev=prefix ;;
361   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
362     prefix=$ac_optarg ;;
363
364   -program-prefix | --program-prefix | --program-prefi | --program-pref \
365   | --program-pre | --program-pr | --program-p)
366     ac_prev=program_prefix ;;
367   -program-prefix=* | --program-prefix=* | --program-prefi=* \
368   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
369     program_prefix=$ac_optarg ;;
370
371   -program-suffix | --program-suffix | --program-suffi | --program-suff \
372   | --program-suf | --program-su | --program-s)
373     ac_prev=program_suffix ;;
374   -program-suffix=* | --program-suffix=* | --program-suffi=* \
375   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
376     program_suffix=$ac_optarg ;;
377
378   -program-transform-name | --program-transform-name \
379   | --program-transform-nam | --program-transform-na \
380   | --program-transform-n | --program-transform- \
381   | --program-transform | --program-transfor \
382   | --program-transfo | --program-transf \
383   | --program-trans | --program-tran \
384   | --progr-tra | --program-tr | --program-t)
385     ac_prev=program_transform_name ;;
386   -program-transform-name=* | --program-transform-name=* \
387   | --program-transform-nam=* | --program-transform-na=* \
388   | --program-transform-n=* | --program-transform-=* \
389   | --program-transform=* | --program-transfor=* \
390   | --program-transfo=* | --program-transf=* \
391   | --program-trans=* | --program-tran=* \
392   | --progr-tra=* | --program-tr=* | --program-t=*)
393     program_transform_name=$ac_optarg ;;
394
395   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
396   | -silent | --silent | --silen | --sile | --sil)
397     silent=yes ;;
398
399   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
400     ac_prev=sbindir ;;
401   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
402   | --sbi=* | --sb=*)
403     sbindir=$ac_optarg ;;
404
405   -sharedstatedir | --sharedstatedir | --sharedstatedi \
406   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
407   | --sharedst | --shareds | --shared | --share | --shar \
408   | --sha | --sh)
409     ac_prev=sharedstatedir ;;
410   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
411   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
412   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
413   | --sha=* | --sh=*)
414     sharedstatedir=$ac_optarg ;;
415
416   -site | --site | --sit)
417     ac_prev=site ;;
418   -site=* | --site=* | --sit=*)
419     site=$ac_optarg ;;
420
421   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
422     ac_prev=srcdir ;;
423   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
424     srcdir=$ac_optarg ;;
425
426   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
427   | --syscon | --sysco | --sysc | --sys | --sy)
428     ac_prev=sysconfdir ;;
429   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
430   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
431     sysconfdir=$ac_optarg ;;
432
433   -target | --target | --targe | --targ | --tar | --ta | --t)
434     ac_prev=target_alias ;;
435   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
436     target_alias=$ac_optarg ;;
437
438   -v | -verbose | --verbose | --verbos | --verbo | --verb)
439     verbose=yes ;;
440
441   -version | --version | --versio | --versi | --vers | -V)
442     ac_init_version=: ;;
443
444   -with-* | --with-*)
445     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
446     # Reject names that are not valid shell variable names.
447     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
448       { echo "$as_me: error: invalid package name: $ac_package" >&2
449    { (exit 1); exit 1; }; }
450     ac_package=`echo "$ac_package" | sed 's/-/_/g'`
451     case "$ac_option" in
452       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
453       *) ac_optarg=yes ;;
454     esac
455     eval "with_$ac_package='$ac_optarg'" ;;
456
457   -without-* | --without-*)
458     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
459     # Reject names that are not valid shell variable names.
460     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
461       { echo "$as_me: error: invalid package name: $ac_package" >&2
462    { (exit 1); exit 1; }; }
463     ac_package=`echo "$ac_package" | sed 's/-/_/g'`
464     eval "with_$ac_package=no" ;;
465
466   --x)
467     # Obsolete; use --with-x.
468     with_x=yes ;;
469
470   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
471   | --x-incl | --x-inc | --x-in | --x-i)
472     ac_prev=x_includes ;;
473   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
474   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
475     x_includes=$ac_optarg ;;
476
477   -x-libraries | --x-libraries | --x-librarie | --x-librari \
478   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
479     ac_prev=x_libraries ;;
480   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
481   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
482     x_libraries=$ac_optarg ;;
483
484   -*) { echo "$as_me: error: unrecognized option: $ac_option
485 Try \`$0 --help' for more information." >&2
486    { (exit 1); exit 1; }; }
487     ;;
488
489   *=*)
490     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
491     # Reject names that are not valid shell variable names.
492     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
493       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
494    { (exit 1); exit 1; }; }
495     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
496     eval "$ac_envvar='$ac_optarg'"
497     export "$ac_envvar" ;;
498
499   *)
500     # FIXME: should be removed in autoconf 3.0.
501     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
502     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
504     : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
505     ;;
506
507   esac
508 done
509
510 if test -n "$ac_prev"; then
511   ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
512   { echo "$as_me: error: missing argument to $ac_option" >&2
513    { (exit 1); exit 1; }; }
514 fi
515
516 # Be sure to have absolute paths.
517 for ac_var in exec_prefix prefix
518 do
519   eval ac_val=$`echo "$ac_var"`
520   case "$ac_val" in
521     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # Be sure to have absolute paths.
528 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
529               localstatedir libdir includedir oldincludedir infodir mandir
530 do
531   eval ac_val=$`echo "$ac_var"`
532   case "$ac_val" in
533     [\\/$]* | ?:[\\/]* ) ;;
534     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
535    { (exit 1); exit 1; }; };;
536   esac
537 done
538
539 # There might be people who depend on the old broken behavior: `$host'
540 # used to hold the argument of --host etc.
541 build=$build_alias
542 host=$host_alias
543 target=$target_alias
544
545 # FIXME: should be removed in autoconf 3.0.
546 if test "x$host_alias" != x; then
547   if test "x$build_alias" = x; then
548     cross_compiling=maybe
549     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
550     If a cross compiler is detected then cross compile mode will be used." >&2
551   elif test "x$build_alias" != "x$host_alias"; then
552     cross_compiling=yes
553   fi
554 fi
555
556 ac_tool_prefix=
557 test -n "$host_alias" && ac_tool_prefix=$host_alias-
558
559 test "$silent" = yes && exec 6>/dev/null
560
561 # Find the source files, if location was not specified.
562 if test -z "$srcdir"; then
563   ac_srcdir_defaulted=yes
564   # Try the directory containing this script, then its parent.
565   ac_prog=$0
566   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
567   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
568   srcdir=$ac_confdir
569   if test ! -r "$srcdir/$ac_unique_file"; then
570     srcdir=..
571   fi
572 else
573   ac_srcdir_defaulted=no
574 fi
575 if test ! -r "$srcdir/$ac_unique_file"; then
576   if test "$ac_srcdir_defaulted" = yes; then
577     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
578    { (exit 1); exit 1; }; }
579   else
580     { echo "$as_me: error: cannot find sources in $srcdir" >&2
581    { (exit 1); exit 1; }; }
582   fi
583 fi
584 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
585 ac_env_build_alias_set=${build_alias+set}
586 ac_env_build_alias_value=$build_alias
587 ac_cv_env_build_alias_set=${build_alias+set}
588 ac_cv_env_build_alias_value=$build_alias
589 ac_env_host_alias_set=${host_alias+set}
590 ac_env_host_alias_value=$host_alias
591 ac_cv_env_host_alias_set=${host_alias+set}
592 ac_cv_env_host_alias_value=$host_alias
593 ac_env_target_alias_set=${target_alias+set}
594 ac_env_target_alias_value=$target_alias
595 ac_cv_env_target_alias_set=${target_alias+set}
596 ac_cv_env_target_alias_value=$target_alias
597 ac_env_CC_set=${CC+set}
598 ac_env_CC_value=$CC
599 ac_cv_env_CC_set=${CC+set}
600 ac_cv_env_CC_value=$CC
601 ac_env_CFLAGS_set=${CFLAGS+set}
602 ac_env_CFLAGS_value=$CFLAGS
603 ac_cv_env_CFLAGS_set=${CFLAGS+set}
604 ac_cv_env_CFLAGS_value=$CFLAGS
605 ac_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_env_LDFLAGS_value=$LDFLAGS
607 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
608 ac_cv_env_LDFLAGS_value=$LDFLAGS
609 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_env_CPPFLAGS_value=$CPPFLAGS
611 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
612 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
613 ac_env_CPP_set=${CPP+set}
614 ac_env_CPP_value=$CPP
615 ac_cv_env_CPP_set=${CPP+set}
616 ac_cv_env_CPP_value=$CPP
617 ac_env_CXX_set=${CXX+set}
618 ac_env_CXX_value=$CXX
619 ac_cv_env_CXX_set=${CXX+set}
620 ac_cv_env_CXX_value=$CXX
621 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
622 ac_env_CXXFLAGS_value=$CXXFLAGS
623 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
624 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
625 ac_env_CXXCPP_set=${CXXCPP+set}
626 ac_env_CXXCPP_value=$CXXCPP
627 ac_cv_env_CXXCPP_set=${CXXCPP+set}
628 ac_cv_env_CXXCPP_value=$CXXCPP
629
630 #
631 # Report the --help message.
632 #
633 if test "$ac_init_help" = "long"; then
634   # Omit some internal or obsolete options to make the list less imposing.
635   # This message is too long to be a string in the A/UX 3.1 sh.
636   cat <<EOF
637 \`configure' configures this package to adapt to many kinds of systems.
638
639 Usage: $0 [OPTION]... [VAR=VALUE]...
640
641 To assign environment variables (e.g., CC, CFLAGS...), specify them as
642 VAR=VALUE.  See below for descriptions of some of the useful variables.
643
644 Defaults for the options are specified in brackets.
645
646 Configuration:
647   -h, --help              display this help and exit
648       --help=short        display options specific to this package
649       --help=recursive    display the short help of all the included packages
650   -V, --version           display version information and exit
651   -q, --quiet, --silent   do not print \`checking...' messages
652       --cache-file=FILE   cache test results in FILE [disabled]
653   -C, --config-cache      alias for \`--cache-file=config.cache'
654   -n, --no-create         do not create output files
655       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
656
657 EOF
658
659   cat <<EOF
660 Installation directories:
661   --prefix=PREFIX         install architecture-independent files in PREFIX
662                           [$ac_default_prefix]
663   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
664                           [PREFIX]
665
666 By default, \`make install' will install all the files in
667 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
668 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
669 for instance \`--prefix=\$HOME'.
670
671 For better control, use the options below.
672
673 Fine tuning of the installation directories:
674   --bindir=DIR            user executables [EPREFIX/bin]
675   --sbindir=DIR           system admin executables [EPREFIX/sbin]
676   --libexecdir=DIR        program executables [EPREFIX/libexec]
677   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
678   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
679   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
680   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
681   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
682   --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
683   --libdir=DIR            object code libraries [EPREFIX/lib]
684   --includedir=DIR        C header files [PREFIX/include]
685   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
686   --infodir=DIR           info documentation [DATAROOTDIR/info]
687   --mandir=DIR            man documentation [DATAROOTDIR/man]
688 EOF
689
690   cat <<\EOF
691
692 Program names:
693   --program-prefix=PREFIX            prepend PREFIX to installed program names
694   --program-suffix=SUFFIX            append SUFFIX to installed program names
695   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
696
697 System types:
698   --build=BUILD           configure for building on BUILD [guessed]
699   --host=HOST       build programs to run on HOST [BUILD]
700   --target=TARGET   configure for building compilers for TARGET [HOST]
701 EOF
702 fi
703
704 if test -n "$ac_init_help"; then
705
706   cat <<\EOF
707
708 Optional Packages:
709   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
710   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
711
712 Optional Features:
713   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
714   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
715
716   --with-rel-version=XXX  override derived release version
717   --with-abi-version=XXX  override derived ABI version
718   --with-system-type=XXX  test: override derived host system-type
719   --with-abi-altered=XXX  override visible ABI version, for packaging
720   --without-ada           suppress check for Ada compiler, don't build demo
721   --without-cxx           do not adjust ncurses bool to match C++
722   --without-cxx-binding   do not build C++ binding and demo
723   --disable-db-install    suppress install of terminal database
724   --without-manpages      suppress install of manpages
725   --without-progs         suppress build/install with programs (e.g., tic)
726   --without-tack          suppress build/install with tack program
727   --without-tests         suppress build/install with test-programs
728   --without-curses-h      install curses.h as ncurses.h only
729   --with-config-suffix=X  suffixes ncursesXX-config file
730   --with-pkg-config{=path} enable/disable use of pkg-config
731   --with-pkg-config-libdir=XXX use given directory for installing pc-files
732   --enable-pc-files       generate and install .pc files for pkg-config
733   --with-pc-suffix        suffixes pc-files
734   --enable-mixed-case     tic should assume mixed-case filenames
735   --with-install-prefix   prefixes actual install-location ($DESTDIR)
736 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
737   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
738   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
739   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
740   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
741   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
742   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
743 Options to Specify the Libraries Built/Used:
744   --disable-libtool-version  enable to use libtool's incompatible naming scheme
745   --with-libtool          generate libraries with libtool
746   --with-shared           generate shared-libraries
747   --with-normal           generate normal-libraries (default)
748   --with-debug            generate debug-libraries (default)
749   --with-profile          generate profile-libraries
750   --with-cxx-shared       generate C++ shared-libraries
751   --with-lib-prefix       override library-prefix
752   --with-termlib          generate separate terminfo library
753   --with-ticlib           generate separate tic library
754   --enable-rpath          use rpath option when generating shared libraries
755   --disable-relink        relink shared libraries during install
756   --with-shlib-version=X  Specify rel or abi version for shared libs
757   --with-libtool-opts=XXX specify additional libtool options
758   --with-export-syms=XXX  limit exported symbols using libtool
759   --with-versioned-syms=X markup versioned symbols using ld
760   --with-gpm              use Alessandro Rubini's GPM library
761   --without-dlsym         do not use dlsym() to load GPM dynamically
762   --with-pcre2            use PCRE2 for regular-expressions
763   --with-sysmouse         use sysmouse (FreeBSD console)
764   --disable-lib-suffixes  disable library suffixes
765   --disable-rpath-hack    don't add rpath options for additional libraries
766   --disable-pkg-ldflags   disable extra LDFLAGS for package-scripts
767 Fine-Tuning Your Configuration:
768   --with-extra-suffix=X   append extra suffix to header/library paths
769   --disable-overwrite     put headers in subdir, omit link to -lcurses
770   --disable-database      do not use terminfo, only fallbacks/termcap
771   --with-database=XXX     specify terminfo source to install
772   --with-hashed-db        specify hashed-database library
773   --with-fallbacks=XXX    specify list of fallback terminal descriptions
774   --with-tic-path=XXX     specify path of tic for fallbacks
775   --with-infocmp-path=XXX     specify path of infocmp for fallbacks
776   --without-xterm-new     specify if xterm terminfo should be old version
777   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
778   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
779   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
780   --disable-big-core      assume machine has little memory
781   --disable-big-strings   assume compiler has only standard-size strings
782   --enable-termcap        compile in termcap fallback support
783   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
784   --enable-getcap         fast termcap load, no xrefs to terminfo
785   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
786   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
787   --disable-root-environ  restrict root use of ncurses environment variables
788   --disable-root-access   restrict file-access when running setuid
789   --enable-symlinks       make tic use symbolic links not hard links
790   --enable-broken_linker  compile with broken-linker support code
791   --enable-bsdpad         recognize BSD-style prefix padding
792   --enable-widec          compile with wide-char/UTF-8 code
793   --disable-lp64          allow chtype to be long (ignore _LP64)
794   --disable-largefile     omit support for large files
795   --disable-tparm-varargs compile tparm() without varargs interface
796   --disable-tic-depends   link tic library without explicit dependency on ncurses library
797   --enable-wattr-macros   enable wattr* macros
798   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
799   --with-bool=TYPE        override fallback type of bool variable
800   --with-caps=alt         compile with alternate Caps file
801   --with-chtype=TYPE      override type of chtype
802   --with-ospeed=TYPE      override type of ospeed variable
803   --with-mmask-t=TYPE     override type of mmask_t
804   --with-ccharw-max=XXX   override size CCHARW_MAX
805   --enable-signed-char    compile using signed Boolean's in term.h
806   --with-tparm-arg=TYPE   override parameter type of tparm
807   --with-rcs-ids          compile-in RCS identifiers
808 Options to Specify How Manpages are Installed:
809   --with-manpage-format   specify manpage-format: gzip/compress/bzip2/xz,
810                           BSDI/normal and optionally formatted/catonly,
811                           e.g., gzip,formatted
812   --with-manpage-renames  specify manpage-renaming
813   --with-manpage-aliases  specify manpage-aliases using .so
814   --with-manpage-symlinks specify manpage-aliases using symlinks
815   --with-manpage-tbl      specify manpage processing with tbl
816 Extensions:
817   --disable-ext-funcs     disable function-extensions
818   --enable-sp-funcs       enable SCREEN-extensions
819   --enable-term-driver    enable terminal-driver
820   --enable-const          compile with extra/non-standard const
821   --enable-ext-colors     compile for 256-color support
822   --enable-ext-mouse      compile for extended mouse-encoding
823   --enable-ext-putwin     compile with extended putwin/screendump
824   --enable-no-padding     compile with $NCURSES_NO_PADDING code
825   --enable-sigwinch       compile with SIGWINCH handler
826   --enable-tcap-names     compile with user-definable terminal capabilities
827 Reentrant Code:
828   --with-pthread          use POSIX thread library
829   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
830   --enable-weak-symbols   enable weak-symbols for pthreads
831   --enable-reentrant      compile with reentrant code
832   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
833   --enable-opaque-form    make form-library structures "opaque"
834   --enable-opaque-menu    make menu-library structures "opaque"
835   --enable-opaque-panel   make panel-library structures "opaque"
836   --with-wrap-prefix=XXX  override prefix used for public variables
837 Development Code:
838   --without-develop       disable development options
839   --enable-hard-tabs      compile with hard-tabs code
840   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
841 Experimental Code:
842   --disable-assumed-color do not assume anything about default-colors
843   --disable-hashmap       compile without hashmap scrolling-optimization
844   --enable-colorfgbg      compile-in experimental $COLORFGBG code
845   --enable-fvisibility    compile with -fvisibility=hidden
846   --enable-interop        compile-in interop bindings
847   --enable-safe-sprintf   compile with experimental safe-sprintf code
848   --disable-scroll-hints  compile without scroll-hints code
849   --enable-wgetch-events  compile with wgetch-events code
850   --enable-exp-win32      compile with experimental-Windows driver
851 Testing/development Options:
852   --disable-echo          do not display "compiling" commands
853   --disable-stripping     do not strip (debug info) installed executables
854   --enable-warnings       test: turn on gcc compiler warnings
855   --enable-stdnoreturn    enable C11 _Noreturn feature for diagnostics
856   --enable-string-hacks   work around bogus compiler/loader warnings
857   --enable-assertions     test: turn on generation of assertion code
858   --with-dmalloc          test: use Gray Watson's dmalloc library
859   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
860   --with-valgrind         test: use valgrind
861   --disable-leaks         test: free permanent memory, analyze leaks
862   --enable-expanded       test: generate functions for certain macros
863   --disable-macros        test: use functions rather than macros
864   --with-trace            test: add trace() function to all models of ncurses
865   --disable-gnat-projects test: disable GNAT projects even if usable
866 Ada Binding Options:
867   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
868   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
869   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
870   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
871   --with-ada-libname=XXX  override default Ada library-name
872   --with-form-libname=XXX override form basename of library
873   --with-menu-libname=XXX override menu basename of library
874   --with-panel-libname=XXX override panel basename of library
875   --with-cxx-libname=XXX override ncurses++ basename of library
876
877 Some influential environment variables:
878   CC          C compiler command
879   CFLAGS      C compiler flags
880   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
881               nonstandard directory <lib dir>
882   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
883               headers in a nonstandard directory <include dir>
884   CPP         C preprocessor
885   CXX         C++ compiler command
886   CXXFLAGS    C++ compiler flags
887   CXXCPP      C++ preprocessor
888
889 Use these variables to override the choices made by `configure' or to help
890 it to find libraries and programs with nonstandard names/locations.
891
892 EOF
893 fi
894
895 if test "$ac_init_help" = "recursive"; then
896   # If there are subdirs, report their specific --help.
897   ac_popdir=`pwd`
898   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
899     cd "$ac_subdir"
900     # A "../" for each directory in /$ac_subdir.
901     ac_dots=`echo "$ac_subdir" |
902              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
903
904     case "$srcdir" in
905     .) # No --srcdir option.  We are building in place.
906       ac_sub_srcdir="$srcdir" ;;
907     [\\/]* | ?:[\\/]* ) # Absolute path.
908       ac_sub_srcdir="$srcdir/$ac_subdir" ;;
909     *) # Relative path.
910       ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
911     esac
912
913     # Check for guested configure; otherwise get Cygnus style configure.
914     if test -f "$ac_sub_srcdir/configure.gnu"; then
915       echo
916       $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
917     elif test -f "$ac_sub_srcdir/configure"; then
918       echo
919       $SHELL "$ac_sub_srcdir/configure" --help=recursive
920     elif test -f "$ac_sub_srcdir/configure.ac" ||
921            test -f "$ac_sub_srcdir/configure.in"; then
922       echo
923       "$ac_configure" --help
924     else
925       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
926     fi
927     cd "$ac_popdir"
928   done
929 fi
930
931 test -n "$ac_init_help" && exit 0
932 if "$ac_init_version"; then
933   cat <<\EOF
934
935 Copyright 2003-2022,2023        Thomas E. Dickey
936 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
937 Free Software Foundation, Inc.
938 This configure script is free software; the Free Software Foundation
939 gives unlimited permission to copy, distribute and modify it.
940 EOF
941   exit 0
942 fi
943 exec 5>config.log
944 cat >&5 <<EOF
945 This file contains any messages produced by compilers while
946 running configure, to aid debugging if configure makes a mistake.
947
948 It was created by $as_me, which was
949 generated by GNU Autoconf 2.52.20230114.  Invocation command line was
950
951   $ $0 $@
952
953 EOF
954 {
955 cat <<_ASUNAME
956 ## ---------- ##
957 ## Platform.  ##
958 ## ---------- ##
959
960 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
961 uname -m = `(uname -m) 2>/dev/null || echo unknown`
962 uname -r = `(uname -r) 2>/dev/null || echo unknown`
963 uname -s = `(uname -s) 2>/dev/null || echo unknown`
964 uname -v = `(uname -v) 2>/dev/null || echo unknown`
965
966 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
967 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
968
969 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
970 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
971 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
972 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
973 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
974 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
975 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
976
977 PATH = $PATH
978
979 _ASUNAME
980 } >&5
981
982 cat >&5 <<EOF
983 ## ------------ ##
984 ## Core tests.  ##
985 ## ------------ ##
986
987 EOF
988
989 # Keep a trace of the command line.
990 # Strip out --no-create and --no-recursion so they do not pile up.
991 # Also quote any args containing shell meta-characters.
992 ac_configure_args=
993 ac_sep=
994 for ac_arg
995 do
996   case "$ac_arg" in
997   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
998   | --no-cr | --no-c) ;;
999   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1000   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
1001   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1002     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
1003     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1004     ac_sep=" " ;;
1005   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
1006      ac_sep=" " ;;
1007   esac
1008   # Get rid of the leading space.
1009 done
1010
1011 # When interrupted or exit'd, cleanup temporary files, and complete
1012 # config.log.  We remove comments because anyway the quotes in there
1013 # would cause problems or look ugly.
1014 trap 'exit_status=$?
1015   # Save into config.log some information that might help in debugging.
1016   echo >&5
1017   echo "## ----------------- ##" >&5
1018   echo "## Cache variables.  ##" >&5
1019   echo "## ----------------- ##" >&5
1020   echo >&5
1021   # The following way of writing the cache mishandles newlines in values,
1022 {
1023   (set) 2>&1 |
1024     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1025     *ac_space=\ *)
1026       sed -n \
1027         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1028           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1029       ;;
1030     *)
1031       sed -n \
1032         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1033       ;;
1034     esac;
1035 } >&5
1036   sed "/^$/d" confdefs.h >conftest.log
1037   if test -s conftest.log; then
1038     echo >&5
1039     echo "## ------------ ##" >&5
1040     echo "## confdefs.h.  ##" >&5
1041     echo "## ------------ ##" >&5
1042     echo >&5
1043     cat conftest.log >&5
1044   fi
1045   (echo; echo) >&5
1046   test "$ac_signal" != 0 &&
1047     echo "$as_me: caught signal $ac_signal" >&5
1048   echo "$as_me: exit $exit_status" >&5
1049   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1050     exit $exit_status
1051      ' 0
1052 for ac_signal in 1 2 13 15; do
1053   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1054 done
1055 ac_signal=0
1056
1057 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1058 rm -rf conftest* confdefs.h
1059 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1060 echo >confdefs.h
1061
1062 # Let the site file select an alternate cache file if it wants to.
1063 # Prefer explicitly selected file to automatically selected ones.
1064 if test -z "$CONFIG_SITE"; then
1065   if test "x$prefix" != xNONE; then
1066     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1067   else
1068     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1069   fi
1070 fi
1071 for ac_site_file in $CONFIG_SITE; do
1072   if test -r "$ac_site_file"; then
1073     { echo "$as_me:1073: loading site script $ac_site_file" >&5
1074 echo "$as_me: loading site script $ac_site_file" >&6;}
1075     cat "$ac_site_file" >&5
1076     . "$ac_site_file"
1077   fi
1078 done
1079
1080 if test -r "$cache_file"; then
1081   # Some versions of bash will fail to source /dev/null (special
1082   # files actually), so we avoid doing that.
1083   if test -f "$cache_file"; then
1084     { echo "$as_me:1084: loading cache $cache_file" >&5
1085 echo "$as_me: loading cache $cache_file" >&6;}
1086     case $cache_file in
1087       [\\/]* | ?:[\\/]* ) . $cache_file;;
1088       *)                      . ./$cache_file;;
1089     esac
1090   fi
1091 else
1092   { echo "$as_me:1092: creating cache $cache_file" >&5
1093 echo "$as_me: creating cache $cache_file" >&6;}
1094   >$cache_file
1095 fi
1096
1097 # Check that the precious variables saved in the cache have kept the same
1098 # value.
1099 ac_cache_corrupted=false
1100 for ac_var in `(set) 2>&1 |
1101                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1102   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1103   eval ac_new_set=\$ac_env_${ac_var}_set
1104   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1105   eval ac_new_val="\$ac_env_${ac_var}_value"
1106   case "$ac_old_set,$ac_new_set" in
1107     set,)
1108       { echo "$as_me:1108: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1109 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1110       ac_cache_corrupted=: ;;
1111     ,set)
1112       { echo "$as_me:1112: error: \`$ac_var' was not set in the previous run" >&5
1113 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1114       ac_cache_corrupted=: ;;
1115     ,);;
1116     *)
1117       if test "x$ac_old_val" != "x$ac_new_val"; then
1118         { echo "$as_me:1118: error: \`$ac_var' has changed since the previous run:" >&5
1119 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1120         { echo "$as_me:1120:   former value:  $ac_old_val" >&5
1121 echo "$as_me:   former value:  $ac_old_val" >&2;}
1122         { echo "$as_me:1122:   current value: $ac_new_val" >&5
1123 echo "$as_me:   current value: $ac_new_val" >&2;}
1124         ac_cache_corrupted=:
1125       fi;;
1126   esac
1127   # Pass precious variables to config.status.  It doesn't matter if
1128   # we pass some twice (in addition to the command line arguments).
1129   if test "$ac_new_set" = set; then
1130     case "$ac_new_val" in
1131     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1132       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1133       ac_configure_args="$ac_configure_args '$ac_arg'"
1134       ;;
1135     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1136        ;;
1137     esac
1138   fi
1139 done
1140 if "$ac_cache_corrupted"; then
1141   { echo "$as_me:1141: error: changes in the environment can compromise the build" >&5
1142 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1143   { { echo "$as_me:1143: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1144 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1145    { (exit 1); exit 1; }; }
1146 fi
1147
1148 ac_ext=c
1149 ac_cpp='$CPP $CPPFLAGS'
1150 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1151 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1152 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1153 ac_main_return="return"
1154
1155 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1156   *c*,-n*) ECHO_N=
1157            ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1158            ECHO_T='     '
1159            ;;
1160   *c*,*  ) ECHO_N=-n
1161            ECHO_C=
1162            ECHO_T=
1163            ;;
1164   *)       ECHO_N=
1165            ECHO_C='\c'
1166            ECHO_T=
1167            ;;
1168 esac
1169 echo "#! $SHELL" >conftest.sh
1170 echo  "exit 0"   >>conftest.sh
1171 chmod +x conftest.sh
1172 if { (echo "$as_me:1172: PATH=\".;.\"; conftest.sh") >&5
1173   (PATH=".;."; conftest.sh) 2>&5
1174   ac_status=$?
1175   echo "$as_me:1175: \$? = $ac_status" >&5
1176   (exit "$ac_status"); }; then
1177   ac_path_separator=';'
1178 else
1179   ac_path_separator=:
1180 fi
1181 PATH_SEPARATOR="$ac_path_separator"
1182 rm -f conftest.sh
1183
1184 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1185
1186 top_builddir=`pwd`
1187
1188 for ac_prog in ggrep grep
1189 do
1190   # Extract the first word of "$ac_prog", so it can be a program name with args.
1191 set dummy $ac_prog; ac_word=$2
1192 echo "$as_me:1192: checking for $ac_word" >&5
1193 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1194 if test "${ac_cv_prog_GREP+set}" = set; then
1195   echo $ECHO_N "(cached) $ECHO_C" >&6
1196 else
1197   if test -n "$GREP"; then
1198   ac_cv_prog_GREP="$GREP" # Let the user override the test.
1199 else
1200   ac_save_IFS=$IFS; IFS=$ac_path_separator
1201 ac_dummy="$PATH"
1202 for ac_dir in $ac_dummy; do
1203   IFS=$ac_save_IFS
1204   test -z "$ac_dir" && ac_dir=.
1205   $as_executable_p "$ac_dir/$ac_word" || continue
1206 ac_cv_prog_GREP="$ac_prog"
1207 echo "$as_me:1207: found $ac_dir/$ac_word" >&5
1208 break
1209 done
1210
1211 fi
1212 fi
1213 GREP=$ac_cv_prog_GREP
1214 if test -n "$GREP"; then
1215   echo "$as_me:1215: result: $GREP" >&5
1216 echo "${ECHO_T}$GREP" >&6
1217 else
1218   echo "$as_me:1218: result: no" >&5
1219 echo "${ECHO_T}no" >&6
1220 fi
1221
1222   test -n "$GREP" && break
1223 done
1224 test -n "$GREP" || GREP=": "
1225
1226 echo "$as_me:1226: checking for egrep" >&5
1227 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1228 if test "${ac_cv_path_EGREP+set}" = set; then
1229   echo $ECHO_N "(cached) $ECHO_C" >&6
1230 else
1231   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
1232    then ac_cv_path_EGREP="$GREP -E"
1233    else
1234      for ac_prog in gegrep egrep
1235 do
1236   # Extract the first word of "$ac_prog", so it can be a program name with args.
1237 set dummy $ac_prog; ac_word=$2
1238 echo "$as_me:1238: checking for $ac_word" >&5
1239 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1240 if test "${ac_cv_path_EGREP+set}" = set; then
1241   echo $ECHO_N "(cached) $ECHO_C" >&6
1242 else
1243   case $EGREP in
1244   [\\/]* | ?:[\\/]*)
1245   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
1246   ;;
1247   *)
1248   ac_save_IFS=$IFS; IFS=$ac_path_separator
1249 ac_dummy="$PATH"
1250 for ac_dir in $ac_dummy; do
1251   IFS=$ac_save_IFS
1252   test -z "$ac_dir" && ac_dir=.
1253   if $as_executable_p "$ac_dir/$ac_word"; then
1254    ac_cv_path_EGREP="$ac_dir/$ac_word"
1255    echo "$as_me:1255: found $ac_dir/$ac_word" >&5
1256    break
1257 fi
1258 done
1259
1260   ;;
1261 esac
1262 fi
1263 EGREP=$ac_cv_path_EGREP
1264
1265 if test -n "$EGREP"; then
1266   echo "$as_me:1266: result: $EGREP" >&5
1267 echo "${ECHO_T}$EGREP" >&6
1268 else
1269   echo "$as_me:1269: result: no" >&5
1270 echo "${ECHO_T}no" >&6
1271 fi
1272
1273   test -n "$EGREP" && break
1274 done
1275 test -n "$EGREP" || EGREP=": "
1276
1277      test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:1277: error: cannot find workable egrep" >&5
1278 echo "$as_me: error: cannot find workable egrep" >&2;}
1279    { (exit 1); exit 1; }; }
1280    fi
1281 fi
1282 echo "$as_me:1282: result: $ac_cv_path_EGREP" >&5
1283 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
1284  EGREP="$ac_cv_path_EGREP"
1285
1286 NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1287 NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1288 NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1289 cf_cv_abi_version=${NCURSES_MAJOR}
1290 cf_cv_abi_default=${NCURSES_MAJOR}
1291 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1292 cf_cv_timestamp=`date`
1293 echo "$as_me:1293: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_default ($cf_cv_timestamp)" >&5
1294 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_default ($cf_cv_timestamp)" >&6
1295
1296 if test -f "$srcdir/VERSION" ; then
1297         echo "$as_me:1297: checking for package version" >&5
1298 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1299
1300         # if there are not enough fields, cut returns the last one...
1301         cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
1302         cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
1303         cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
1304
1305         # this is how CF_BUNDLED_INTL uses $VERSION:
1306         VERSION="$cf_field1"
1307
1308         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1309         test -z "$VERSION_MAJOR" && { { echo "$as_me:1309: error: missing major-version" >&5
1310 echo "$as_me: error: missing major-version" >&2;}
1311    { (exit 1); exit 1; }; }
1312
1313         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1314         test -z "$VERSION_MINOR" && { { echo "$as_me:1314: error: missing minor-version" >&5
1315 echo "$as_me: error: missing minor-version" >&2;}
1316    { (exit 1); exit 1; }; }
1317
1318         echo "$as_me:1318: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1319 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1320
1321         echo "$as_me:1321: checking for package patch date" >&5
1322 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1323         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1324         case .$VERSION_PATCH in
1325         (.)
1326                 { { echo "$as_me:1326: error: missing patch-date $VERSION_PATCH" >&5
1327 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1328    { (exit 1); exit 1; }; }
1329                 ;;
1330         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1331                 ;;
1332         (*)
1333                 { { echo "$as_me:1333: error: illegal patch-date $VERSION_PATCH" >&5
1334 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1335    { (exit 1); exit 1; }; }
1336                 ;;
1337         esac
1338         echo "$as_me:1338: result: $VERSION_PATCH" >&5
1339 echo "${ECHO_T}$VERSION_PATCH" >&6
1340 else
1341         { { echo "$as_me:1341: error: did not find $srcdir/VERSION" >&5
1342 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1343    { (exit 1); exit 1; }; }
1344 fi
1345
1346 # show the actual data that we have for versions:
1347 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1348
1349 echo "${as_me:-configure}:1349: testing ABI VERSION $VERSION ..." 1>&5
1350
1351 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1352
1353 echo "${as_me:-configure}:1353: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1354
1355 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1356
1357 echo "${as_me:-configure}:1357: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1358
1359 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1360
1361 echo "${as_me:-configure}:1361: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1362
1363         cf_PACKAGE=NCURSES
1364         PACKAGE=ncurses
1365
1366 cat >>confdefs.h <<EOF
1367 #define PACKAGE "$PACKAGE"
1368 EOF
1369
1370 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1371
1372         cat >>confdefs.h <<EOF
1373 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1374 EOF
1375
1376         cat >>confdefs.h <<EOF
1377 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1378 EOF
1379
1380 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1381
1382 # Check whether --with-rel-version or --without-rel-version was given.
1383 if test "${with_rel_version+set}" = set; then
1384   withval="$with_rel_version"
1385   { echo "$as_me:1385: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1386 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1387  cf_cv_rel_version=$withval
1388 fi;
1389
1390  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1391  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1392
1393 if test -n "$NCURSES_MAJOR" ; then
1394   case $NCURSES_MAJOR in
1395   ([0-9]*)
1396         ;;
1397   (*)
1398         { { echo "$as_me:1398: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1399 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1400    { (exit 1); exit 1; }; }
1401         ;;
1402   esac
1403 else
1404   { { echo "$as_me:1404: error: Release major-version value is empty" >&5
1405 echo "$as_me: error: Release major-version value is empty" >&2;}
1406    { (exit 1); exit 1; }; }
1407 fi
1408
1409 if test -n "$NCURSES_MINOR" ; then
1410   case $NCURSES_MINOR in
1411   ([0-9]*)
1412         ;;
1413   (*)
1414         { { echo "$as_me:1414: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1415 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1416    { (exit 1); exit 1; }; }
1417         ;;
1418   esac
1419 else
1420   { { echo "$as_me:1420: error: Release minor-version value is empty" >&5
1421 echo "$as_me: error: Release minor-version value is empty" >&2;}
1422    { (exit 1); exit 1; }; }
1423 fi
1424
1425 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1426
1427 # Check whether --with-abi-version or --without-abi-version was given.
1428 if test "${with_abi_version+set}" = set; then
1429   withval="$with_abi_version"
1430
1431         if test "x$cf_cv_abi_version" != "x$withval"
1432         then
1433                 { echo "$as_me:1433: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1434 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1435                 case "$cf_cv_rel_version" in
1436                 (5.*)
1437                         cf_cv_rel_version=$withval.0
1438                         ;;
1439                 (6.*)
1440                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1441                         ;;
1442                 esac
1443         fi
1444         cf_cv_abi_version=$withval
1445 fi;
1446
1447 if test -n "$cf_cv_abi_version" ; then
1448   case $cf_cv_abi_version in
1449   ([0-9]*)
1450         ;;
1451   (*)
1452         { { echo "$as_me:1452: error: ABI version is not a number: $cf_cv_abi_version" >&5
1453 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1454    { (exit 1); exit 1; }; }
1455         ;;
1456   esac
1457 else
1458   { { echo "$as_me:1458: error: ABI version value is empty" >&5
1459 echo "$as_me: error: ABI version value is empty" >&2;}
1460    { (exit 1); exit 1; }; }
1461 fi
1462
1463 cf_cv_abi_default=$cf_cv_abi_version
1464
1465 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1466 then
1467         case "$cf_cv_rel_version" in
1468         (5.*)
1469                 cf_cv_rel_version=$with_abi_version.0
1470                 ;;
1471         esac
1472 fi
1473
1474 ac_aux_dir=
1475 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1476   if test -f "$ac_dir/install-sh"; then
1477     ac_aux_dir=$ac_dir
1478     ac_install_sh="$ac_aux_dir/install-sh -c"
1479     break
1480   elif test -f "$ac_dir/install.sh"; then
1481     ac_aux_dir=$ac_dir
1482     ac_install_sh="$ac_aux_dir/install.sh -c"
1483     break
1484   elif test -f "$ac_dir/shtool"; then
1485     ac_aux_dir=$ac_dir
1486     ac_install_sh="$ac_aux_dir/shtool install -c"
1487     break
1488   fi
1489 done
1490 if test -z "$ac_aux_dir"; then
1491   { { echo "$as_me:1491: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1492 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1493    { (exit 1); exit 1; }; }
1494 fi
1495 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1496 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1497 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1498
1499 # Make sure we can run config.sub.
1500 $ac_config_sub sun4 >/dev/null 2>&1 ||
1501   { { echo "$as_me:1501: error: cannot run $ac_config_sub" >&5
1502 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1503    { (exit 1); exit 1; }; }
1504
1505 echo "$as_me:1505: checking build system type" >&5
1506 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1507 if test "${ac_cv_build+set}" = set; then
1508   echo $ECHO_N "(cached) $ECHO_C" >&6
1509 else
1510   ac_cv_build_alias=$build_alias
1511 test -z "$ac_cv_build_alias" &&
1512   ac_cv_build_alias=`$ac_config_guess`
1513 test -z "$ac_cv_build_alias" &&
1514   { { echo "$as_me:1514: error: cannot guess build type; you must specify one" >&5
1515 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1516    { (exit 1); exit 1; }; }
1517 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1518   { { echo "$as_me:1518: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1519 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1520    { (exit 1); exit 1; }; }
1521
1522 fi
1523 echo "$as_me:1523: result: $ac_cv_build" >&5
1524 echo "${ECHO_T}$ac_cv_build" >&6
1525 build=$ac_cv_build
1526 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1527 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1528 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1529
1530 echo "$as_me:1530: checking host system type" >&5
1531 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1532 if test "${ac_cv_host+set}" = set; then
1533   echo $ECHO_N "(cached) $ECHO_C" >&6
1534 else
1535   ac_cv_host_alias=$host_alias
1536 test -z "$ac_cv_host_alias" &&
1537   ac_cv_host_alias=$ac_cv_build_alias
1538 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1539   { { echo "$as_me:1539: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1540 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1541    { (exit 1); exit 1; }; }
1542
1543 fi
1544 echo "$as_me:1544: result: $ac_cv_host" >&5
1545 echo "${ECHO_T}$ac_cv_host" >&6
1546 host=$ac_cv_host
1547 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1548 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1549 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1550
1551 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1552         echo "$as_me:1552: checking target system type" >&5
1553 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1554 if test "${ac_cv_target+set}" = set; then
1555   echo $ECHO_N "(cached) $ECHO_C" >&6
1556 else
1557   ac_cv_target_alias=$target_alias
1558 test "x$ac_cv_target_alias" = "x" &&
1559   ac_cv_target_alias=$ac_cv_host_alias
1560 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1561   { { echo "$as_me:1561: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1562 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1563    { (exit 1); exit 1; }; }
1564
1565 fi
1566 echo "$as_me:1566: result: $ac_cv_target" >&5
1567 echo "${ECHO_T}$ac_cv_target" >&6
1568 target=$ac_cv_target
1569 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1570 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1571 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1572
1573 # The aliases save the names the user supplied, while $host etc.
1574 # will get canonicalized.
1575 test -n "$target_alias" &&
1576   test "$program_prefix$program_suffix$program_transform_name" = \
1577     NONENONEs,x,x, &&
1578   program_prefix=${target_alias}-
1579         system_name="$host_os"
1580 else
1581         system_name="`(uname -s -r) 2>/dev/null`"
1582         if test -z "$system_name" ; then
1583                 system_name="`(hostname) 2>/dev/null`"
1584         fi
1585 fi
1586 test -n "$system_name" &&
1587 cat >>confdefs.h <<EOF
1588 #define SYSTEM_NAME "$system_name"
1589 EOF
1590
1591 if test "${cf_cv_system_name+set}" = set; then
1592   echo $ECHO_N "(cached) $ECHO_C" >&6
1593 else
1594   cf_cv_system_name="$system_name"
1595 fi
1596
1597 test -z "$system_name" && system_name="$cf_cv_system_name"
1598 test -n "$cf_cv_system_name" && echo "$as_me:1598: result: Configuring for $cf_cv_system_name" >&5
1599 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1600
1601 if test ".$system_name" != ".$cf_cv_system_name" ; then
1602         echo "$as_me:1602: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1603 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1604         { { echo "$as_me:1604: error: \"Please remove config.cache and try again.\"" >&5
1605 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1606    { (exit 1); exit 1; }; }
1607 fi
1608
1609 # Check whether --with-system-type or --without-system-type was given.
1610 if test "${with_system_type+set}" = set; then
1611   withval="$with_system_type"
1612   { echo "$as_me:1612: WARNING: overriding system type to $withval" >&5
1613 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1614         cf_cv_system_name=$withval
1615         host_os=$withval
1616
1617 fi;
1618
1619 ###     Save the given $CFLAGS to allow user-override.
1620 cf_user_CFLAGS="$CFLAGS"
1621
1622 ###     Default install-location
1623 echo "$as_me:1623: checking for fgrep" >&5
1624 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1625 if test "${ac_cv_path_FGREP+set}" = set; then
1626   echo $ECHO_N "(cached) $ECHO_C" >&6
1627 else
1628   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1629    then ac_cv_path_FGREP="$GREP -F"
1630    else
1631      for ac_prog in gfgrep fgrep
1632 do
1633   # Extract the first word of "$ac_prog", so it can be a program name with args.
1634 set dummy $ac_prog; ac_word=$2
1635 echo "$as_me:1635: checking for $ac_word" >&5
1636 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1637 if test "${ac_cv_path_FGREP+set}" = set; then
1638   echo $ECHO_N "(cached) $ECHO_C" >&6
1639 else
1640   case $FGREP in
1641   [\\/]* | ?:[\\/]*)
1642   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1643   ;;
1644   *)
1645   ac_save_IFS=$IFS; IFS=$ac_path_separator
1646 ac_dummy="$PATH"
1647 for ac_dir in $ac_dummy; do
1648   IFS=$ac_save_IFS
1649   test -z "$ac_dir" && ac_dir=.
1650   if $as_executable_p "$ac_dir/$ac_word"; then
1651    ac_cv_path_FGREP="$ac_dir/$ac_word"
1652    echo "$as_me:1652: found $ac_dir/$ac_word" >&5
1653    break
1654 fi
1655 done
1656
1657   ;;
1658 esac
1659 fi
1660 FGREP=$ac_cv_path_FGREP
1661
1662 if test -n "$FGREP"; then
1663   echo "$as_me:1663: result: $FGREP" >&5
1664 echo "${ECHO_T}$FGREP" >&6
1665 else
1666   echo "$as_me:1666: result: no" >&5
1667 echo "${ECHO_T}no" >&6
1668 fi
1669
1670   test -n "$FGREP" && break
1671 done
1672 test -n "$FGREP" || FGREP=": "
1673
1674      test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1674: error: cannot find workable fgrep" >&5
1675 echo "$as_me: error: cannot find workable fgrep" >&2;}
1676    { (exit 1); exit 1; }; }
1677    fi
1678 fi
1679 echo "$as_me:1679: result: $ac_cv_path_FGREP" >&5
1680 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1681  FGREP="$ac_cv_path_FGREP"
1682
1683 echo "$as_me:1683: checking for prefix" >&5
1684 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1685 if test "x$prefix" = "xNONE" ; then
1686         case "$cf_cv_system_name" in
1687                 # non-vendor systems don't have a conflict
1688         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1689                 prefix=/usr
1690                 ;;
1691         (*)     prefix=$ac_default_prefix
1692                 ;;
1693         esac
1694 fi
1695 echo "$as_me:1695: result: $prefix" >&5
1696 echo "${ECHO_T}$prefix" >&6
1697
1698 if test "x$prefix" = "xNONE" ; then
1699 echo "$as_me:1699: checking for default include-directory" >&5
1700 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1701 test -n "$verbose" && echo 1>&6
1702 for cf_symbol in \
1703         "$includedir" \
1704         "$includedir/ncurses" \
1705         "$prefix/include" \
1706         "$prefix/include/ncurses" \
1707         /usr/local/include \
1708         /usr/local/include/ncurses \
1709         /usr/include \
1710         /usr/include/ncurses
1711 do
1712         cf_dir=`eval echo "$cf_symbol"`
1713         if test -f "$cf_dir/curses.h" ; then
1714         if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1715                 includedir="$cf_symbol"
1716                 test -n "$verbose"  && echo $ECHO_N "   found " 1>&6
1717                 break
1718         fi
1719         fi
1720         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1721 done
1722 echo "$as_me:1722: result: $includedir" >&5
1723 echo "${ECHO_T}$includedir" >&6
1724 fi
1725
1726 ### Defaults for ncurses ABI
1727
1728 # ABI 5 defaults:
1729 cf_dft_ccharw_max=5
1730 cf_dft_chtype=auto
1731 cf_dft_ext_colors=no
1732 cf_dft_ext_const=no
1733 cf_dft_ext_mouse=no
1734 cf_dft_ext_putwin=no
1735 cf_dft_ext_spfuncs=no
1736 cf_dft_filter_syms=no
1737 cf_dft_interop=no
1738 cf_dft_mmask_t=auto
1739 cf_dft_opaque_curses=no
1740 cf_dft_ordinate_type=short
1741 cf_dft_signed_char=no
1742 cf_dft_tparm_arg=long
1743 cf_dft_with_lp64=no
1744
1745 # ABI 6 defaults:
1746 case x$cf_cv_abi_default in
1747 (x[6789])
1748         cf_dft_chtype=uint32_t
1749         cf_dft_ext_colors=yes
1750         cf_dft_ext_const=yes
1751         cf_dft_ext_mouse=yes
1752         cf_dft_ext_putwin=yes
1753         cf_dft_ext_spfuncs=yes
1754         cf_dft_filter_syms=yes
1755         cf_dft_interop=yes
1756         cf_dft_mmask_t=uint32_t
1757         cf_dft_tparm_arg=intptr_t
1758         cf_dft_with_lp64=yes
1759         ;;
1760 esac
1761
1762 # ABI 7 defaults:
1763 case x$cf_cv_abi_default in
1764 (x[789])
1765         cf_dft_ccharw_max=6
1766         cf_dft_mmask_t=uint64_t
1767         cf_dft_opaque_curses=yes
1768         cf_dft_ordinate_type=int
1769         cf_dft_signed_char=yes
1770         # also: remove the wgetch-events feature in ABI 7
1771         ;;
1772 esac
1773
1774 ### override ABI version, e.g., packagers
1775
1776 # Check whether --with-abi-altered or --without-abi-altered was given.
1777 if test "${with_abi_altered+set}" = set; then
1778   withval="$with_abi_altered"
1779
1780 if test -n "$withval" ; then
1781   case $withval in
1782   ([0-9]*)
1783         ;;
1784   (*)
1785         { { echo "$as_me:1785: error: ABI altered is not a number: $withval" >&5
1786 echo "$as_me: error: ABI altered is not a number: $withval" >&2;}
1787    { (exit 1); exit 1; }; }
1788         ;;
1789   esac
1790 else
1791   { { echo "$as_me:1791: error: ABI altered value is empty" >&5
1792 echo "$as_me: error: ABI altered value is empty" >&2;}
1793    { (exit 1); exit 1; }; }
1794 fi
1795
1796         if test "$cf_cv_abi_version" != "$withval"
1797         then
1798                 { echo "$as_me:1798: WARNING: altering visible ABI from $cf_cv_abi_version to $withval" >&5
1799 echo "$as_me: WARNING: altering visible ABI from $cf_cv_abi_version to $withval" >&2;}
1800                 cf_cv_abi_version=$withval
1801         fi
1802
1803 fi;
1804
1805 ###     Checks for programs.
1806
1807 # Check whether --with-ada or --without-ada was given.
1808 if test "${with_ada+set}" = set; then
1809   withval="$with_ada"
1810   cf_with_ada=$withval
1811 else
1812   cf_with_ada=yes
1813 fi;
1814
1815 if test "x$cf_with_ada" = xyes
1816 then
1817         cf_prog_cc="gnatgcc gcc cc"
1818 else
1819         cf_prog_cc="gcc cc"
1820 fi
1821
1822 ac_ext=c
1823 ac_cpp='$CPP $CPPFLAGS'
1824 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1825 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1826 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1827 ac_main_return="return"
1828 if test -n "$ac_tool_prefix"; then
1829   for ac_prog in $cf_prog_cc
1830   do
1831     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1832 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1833 echo "$as_me:1833: checking for $ac_word" >&5
1834 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1835 if test "${ac_cv_prog_CC+set}" = set; then
1836   echo $ECHO_N "(cached) $ECHO_C" >&6
1837 else
1838   if test -n "$CC"; then
1839   ac_cv_prog_CC="$CC" # Let the user override the test.
1840 else
1841   ac_save_IFS=$IFS; IFS=$ac_path_separator
1842 ac_dummy="$PATH"
1843 for ac_dir in $ac_dummy; do
1844   IFS=$ac_save_IFS
1845   test -z "$ac_dir" && ac_dir=.
1846   $as_executable_p "$ac_dir/$ac_word" || continue
1847 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1848 echo "$as_me:1848: found $ac_dir/$ac_word" >&5
1849 break
1850 done
1851
1852 fi
1853 fi
1854 CC=$ac_cv_prog_CC
1855 if test -n "$CC"; then
1856   echo "$as_me:1856: result: $CC" >&5
1857 echo "${ECHO_T}$CC" >&6
1858 else
1859   echo "$as_me:1859: result: no" >&5
1860 echo "${ECHO_T}no" >&6
1861 fi
1862
1863     test -n "$CC" && break
1864   done
1865 fi
1866 if test -z "$CC"; then
1867   ac_ct_CC=$CC
1868   for ac_prog in $cf_prog_cc
1869 do
1870   # Extract the first word of "$ac_prog", so it can be a program name with args.
1871 set dummy $ac_prog; ac_word=$2
1872 echo "$as_me:1872: checking for $ac_word" >&5
1873 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1874 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1875   echo $ECHO_N "(cached) $ECHO_C" >&6
1876 else
1877   if test -n "$ac_ct_CC"; then
1878   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1879 else
1880   ac_save_IFS=$IFS; IFS=$ac_path_separator
1881 ac_dummy="$PATH"
1882 for ac_dir in $ac_dummy; do
1883   IFS=$ac_save_IFS
1884   test -z "$ac_dir" && ac_dir=.
1885   $as_executable_p "$ac_dir/$ac_word" || continue
1886 ac_cv_prog_ac_ct_CC="$ac_prog"
1887 echo "$as_me:1887: found $ac_dir/$ac_word" >&5
1888 break
1889 done
1890
1891 fi
1892 fi
1893 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1894 if test -n "$ac_ct_CC"; then
1895   echo "$as_me:1895: result: $ac_ct_CC" >&5
1896 echo "${ECHO_T}$ac_ct_CC" >&6
1897 else
1898   echo "$as_me:1898: result: no" >&5
1899 echo "${ECHO_T}no" >&6
1900 fi
1901
1902   test -n "$ac_ct_CC" && break
1903 done
1904
1905   CC=$ac_ct_CC
1906 fi
1907
1908 test -z "$CC" && { { echo "$as_me:1908: error: no acceptable cc found in \$PATH" >&5
1909 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1910    { (exit 1); exit 1; }; }
1911
1912 # Provide some information about the compiler.
1913 echo "$as_me:1913:" \
1914      "checking for C compiler version" >&5
1915 ac_compiler=`set X $ac_compile; echo "$2"`
1916 { (eval echo "$as_me:1916: \"$ac_compiler --version </dev/null >&5\"") >&5
1917   (eval $ac_compiler --version </dev/null >&5) 2>&5
1918   ac_status=$?
1919   echo "$as_me:1919: \$? = $ac_status" >&5
1920   (exit "$ac_status"); }
1921 { (eval echo "$as_me:1921: \"$ac_compiler -v </dev/null >&5\"") >&5
1922   (eval $ac_compiler -v </dev/null >&5) 2>&5
1923   ac_status=$?
1924   echo "$as_me:1924: \$? = $ac_status" >&5
1925   (exit "$ac_status"); }
1926 { (eval echo "$as_me:1926: \"$ac_compiler -V </dev/null >&5\"") >&5
1927   (eval $ac_compiler -V </dev/null >&5) 2>&5
1928   ac_status=$?
1929   echo "$as_me:1929: \$? = $ac_status" >&5
1930   (exit "$ac_status"); }
1931
1932 cat >"conftest.$ac_ext" <<_ACEOF
1933 #line 1933 "configure"
1934 #include "confdefs.h"
1935
1936 int
1937 main (void)
1938 {
1939
1940   ;
1941   return 0;
1942 }
1943 _ACEOF
1944 ac_clean_files_save=$ac_clean_files
1945 ac_clean_files="$ac_clean_files a.out a.exe"
1946 # Try to create an executable without -o first, disregard a.out.
1947 # It will help us diagnose broken compilers, and finding out an intuition
1948 # of exeext.
1949 echo "$as_me:1949: checking for C compiler default output" >&5
1950 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1951 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1952 if { (eval echo "$as_me:1952: \"$ac_link_default\"") >&5
1953   (eval $ac_link_default) 2>&5
1954   ac_status=$?
1955   echo "$as_me:1955: \$? = $ac_status" >&5
1956   (exit "$ac_status"); }; then
1957   # Find the output, starting from the most likely.  This scheme is
1958 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1959 # resort.
1960 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1961                 ls a.out conftest 2>/dev/null;
1962                 ls a.* conftest.* 2>/dev/null`; do
1963   case $ac_file in
1964     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1965     a.out ) # We found the default executable, but exeext='' is most
1966             # certainly right.
1967             break;;
1968     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1969           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1970           export ac_cv_exeext
1971           break;;
1972     * ) break;;
1973   esac
1974 done
1975 else
1976   echo "$as_me: failed program was:" >&5
1977 cat "conftest.$ac_ext" >&5
1978 { { echo "$as_me:1978: error: C compiler cannot create executables" >&5
1979 echo "$as_me: error: C compiler cannot create executables" >&2;}
1980    { (exit 77); exit 77; }; }
1981 fi
1982
1983 ac_exeext=$ac_cv_exeext
1984 echo "$as_me:1984: result: $ac_file" >&5
1985 echo "${ECHO_T}$ac_file" >&6
1986
1987 # Check the compiler produces executables we can run.  If not, either
1988 # the compiler is broken, or we cross compile.
1989 echo "$as_me:1989: checking whether the C compiler works" >&5
1990 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1991 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1992 # If not cross compiling, check that we can run a simple program.
1993 if test "$cross_compiling" != yes; then
1994   if { ac_try='./$ac_file'
1995   { (eval echo "$as_me:1995: \"$ac_try\"") >&5
1996   (eval $ac_try) 2>&5
1997   ac_status=$?
1998   echo "$as_me:1998: \$? = $ac_status" >&5
1999   (exit "$ac_status"); }; }; then
2000     cross_compiling=no
2001   else
2002     if test "$cross_compiling" = maybe; then
2003         cross_compiling=yes
2004     else
2005         { { echo "$as_me:2005: error: cannot run C compiled programs.
2006 If you meant to cross compile, use \`--host'." >&5
2007 echo "$as_me: error: cannot run C compiled programs.
2008 If you meant to cross compile, use \`--host'." >&2;}
2009    { (exit 1); exit 1; }; }
2010     fi
2011   fi
2012 fi
2013 echo "$as_me:2013: result: yes" >&5
2014 echo "${ECHO_T}yes" >&6
2015
2016 rm -f a.out a.exe "conftest$ac_cv_exeext"
2017 ac_clean_files=$ac_clean_files_save
2018 # Check the compiler produces executables we can run.  If not, either
2019 # the compiler is broken, or we cross compile.
2020 echo "$as_me:2020: checking whether we are cross compiling" >&5
2021 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2022 echo "$as_me:2022: result: $cross_compiling" >&5
2023 echo "${ECHO_T}$cross_compiling" >&6
2024
2025 echo "$as_me:2025: checking for executable suffix" >&5
2026 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
2027 if { (eval echo "$as_me:2027: \"$ac_link\"") >&5
2028   (eval $ac_link) 2>&5
2029   ac_status=$?
2030   echo "$as_me:2030: \$? = $ac_status" >&5
2031   (exit "$ac_status"); }; then
2032   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2033 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2034 # work properly (i.e., refer to `conftest.exe'), while it won't with
2035 # `rm'.
2036 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2037   case $ac_file in
2038     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2039     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2040           export ac_cv_exeext
2041           break;;
2042     * ) break;;
2043   esac
2044 done
2045 else
2046   { { echo "$as_me:2046: error: cannot compute EXEEXT: cannot compile and link" >&5
2047 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
2048    { (exit 1); exit 1; }; }
2049 fi
2050
2051 rm -f "conftest$ac_cv_exeext"
2052 echo "$as_me:2052: result: $ac_cv_exeext" >&5
2053 echo "${ECHO_T}$ac_cv_exeext" >&6
2054
2055 rm -f "conftest.$ac_ext"
2056 EXEEXT=$ac_cv_exeext
2057 ac_exeext=$EXEEXT
2058 echo "$as_me:2058: checking for object suffix" >&5
2059 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2060 if test "${ac_cv_objext+set}" = set; then
2061   echo $ECHO_N "(cached) $ECHO_C" >&6
2062 else
2063   cat >"conftest.$ac_ext" <<_ACEOF
2064 #line 2064 "configure"
2065 #include "confdefs.h"
2066
2067 int
2068 main (void)
2069 {
2070
2071   ;
2072   return 0;
2073 }
2074 _ACEOF
2075 rm -f conftest.o conftest.obj
2076 if { (eval echo "$as_me:2076: \"$ac_compile\"") >&5
2077   (eval $ac_compile) 2>&5
2078   ac_status=$?
2079   echo "$as_me:2079: \$? = $ac_status" >&5
2080   (exit "$ac_status"); }; then
2081   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2082   case $ac_file in
2083     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
2084     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2085        break;;
2086   esac
2087 done
2088 else
2089   echo "$as_me: failed program was:" >&5
2090 cat "conftest.$ac_ext" >&5
2091 { { echo "$as_me:2091: error: cannot compute OBJEXT: cannot compile" >&5
2092 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2093    { (exit 1); exit 1; }; }
2094 fi
2095
2096 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
2097 fi
2098 echo "$as_me:2098: result: $ac_cv_objext" >&5
2099 echo "${ECHO_T}$ac_cv_objext" >&6
2100 OBJEXT=$ac_cv_objext
2101 ac_objext=$OBJEXT
2102 echo "$as_me:2102: checking whether we are using the GNU C compiler" >&5
2103 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2104 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2105   echo $ECHO_N "(cached) $ECHO_C" >&6
2106 else
2107   cat >"conftest.$ac_ext" <<_ACEOF
2108 #line 2108 "configure"
2109 #include "confdefs.h"
2110
2111 int
2112 main (void)
2113 {
2114 #ifndef __GNUC__
2115        choke me
2116 #endif
2117
2118   ;
2119   return 0;
2120 }
2121 _ACEOF
2122 rm -f "conftest.$ac_objext"
2123 if { (eval echo "$as_me:2123: \"$ac_compile\"") >&5
2124   (eval $ac_compile) 2>&5
2125   ac_status=$?
2126   echo "$as_me:2126: \$? = $ac_status" >&5
2127   (exit "$ac_status"); } &&
2128          { ac_try='test -s "conftest.$ac_objext"'
2129   { (eval echo "$as_me:2129: \"$ac_try\"") >&5
2130   (eval $ac_try) 2>&5
2131   ac_status=$?
2132   echo "$as_me:2132: \$? = $ac_status" >&5
2133   (exit "$ac_status"); }; }; then
2134   ac_compiler_gnu=yes
2135 else
2136   echo "$as_me: failed program was:" >&5
2137 cat "conftest.$ac_ext" >&5
2138 ac_compiler_gnu=no
2139 fi
2140 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2141 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2142
2143 fi
2144 echo "$as_me:2144: result: $ac_cv_c_compiler_gnu" >&5
2145 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2146 GCC=`test $ac_compiler_gnu = yes && echo yes`
2147 ac_test_CFLAGS=${CFLAGS+set}
2148 ac_save_CFLAGS=$CFLAGS
2149 CFLAGS="-g"
2150 echo "$as_me:2150: checking whether $CC accepts -g" >&5
2151 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2152 if test "${ac_cv_prog_cc_g+set}" = set; then
2153   echo $ECHO_N "(cached) $ECHO_C" >&6
2154 else
2155   cat >"conftest.$ac_ext" <<_ACEOF
2156 #line 2156 "configure"
2157 #include "confdefs.h"
2158
2159 int
2160 main (void)
2161 {
2162
2163   ;
2164   return 0;
2165 }
2166 _ACEOF
2167 rm -f "conftest.$ac_objext"
2168 if { (eval echo "$as_me:2168: \"$ac_compile\"") >&5
2169   (eval $ac_compile) 2>&5
2170   ac_status=$?
2171   echo "$as_me:2171: \$? = $ac_status" >&5
2172   (exit "$ac_status"); } &&
2173          { ac_try='test -s "conftest.$ac_objext"'
2174   { (eval echo "$as_me:2174: \"$ac_try\"") >&5
2175   (eval $ac_try) 2>&5
2176   ac_status=$?
2177   echo "$as_me:2177: \$? = $ac_status" >&5
2178   (exit "$ac_status"); }; }; then
2179   ac_cv_prog_cc_g=yes
2180 else
2181   echo "$as_me: failed program was:" >&5
2182 cat "conftest.$ac_ext" >&5
2183 ac_cv_prog_cc_g=no
2184 fi
2185 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2186 fi
2187 echo "$as_me:2187: result: $ac_cv_prog_cc_g" >&5
2188 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2189 if test "$ac_test_CFLAGS" = set; then
2190   CFLAGS=$ac_save_CFLAGS
2191 elif test $ac_cv_prog_cc_g = yes; then
2192   if test "$GCC" = yes; then
2193     CFLAGS="-g -O2"
2194   else
2195     CFLAGS="-g"
2196   fi
2197 else
2198   if test "$GCC" = yes; then
2199     CFLAGS="-O2"
2200   else
2201     CFLAGS=
2202   fi
2203 fi
2204 # Some people use a C++ compiler to compile C.  Since we use `exit',
2205 # in C++ we need to declare it.  In case someone uses the same compiler
2206 # for both compiling C and C++ we need to have the C++ compiler decide
2207 # the declaration of exit, since it's the most demanding environment.
2208 cat >"conftest.$ac_ext" <<_ACEOF
2209 #ifndef __cplusplus
2210   choke me
2211 #endif
2212 _ACEOF
2213 rm -f "conftest.$ac_objext"
2214 if { (eval echo "$as_me:2214: \"$ac_compile\"") >&5
2215   (eval $ac_compile) 2>&5
2216   ac_status=$?
2217   echo "$as_me:2217: \$? = $ac_status" >&5
2218   (exit "$ac_status"); } &&
2219          { ac_try='test -s "conftest.$ac_objext"'
2220   { (eval echo "$as_me:2220: \"$ac_try\"") >&5
2221   (eval $ac_try) 2>&5
2222   ac_status=$?
2223   echo "$as_me:2223: \$? = $ac_status" >&5
2224   (exit "$ac_status"); }; }; then
2225   for ac_declaration in \
2226    ''\
2227    '#include <stdlib.h>' \
2228    'extern "C" void std::exit (int) throw (); using std::exit;' \
2229    'extern "C" void std::exit (int); using std::exit;' \
2230    'extern "C" void exit (int) throw ();' \
2231    'extern "C" void exit (int);' \
2232    'void exit (int);'
2233 do
2234   cat >"conftest.$ac_ext" <<_ACEOF
2235 #line 2235 "configure"
2236 #include "confdefs.h"
2237 #include <stdlib.h>
2238 $ac_declaration
2239 int
2240 main (void)
2241 {
2242 exit (42);
2243   ;
2244   return 0;
2245 }
2246 _ACEOF
2247 rm -f "conftest.$ac_objext"
2248 if { (eval echo "$as_me:2248: \"$ac_compile\"") >&5
2249   (eval $ac_compile) 2>&5
2250   ac_status=$?
2251   echo "$as_me:2251: \$? = $ac_status" >&5
2252   (exit "$ac_status"); } &&
2253          { ac_try='test -s "conftest.$ac_objext"'
2254   { (eval echo "$as_me:2254: \"$ac_try\"") >&5
2255   (eval $ac_try) 2>&5
2256   ac_status=$?
2257   echo "$as_me:2257: \$? = $ac_status" >&5
2258   (exit "$ac_status"); }; }; then
2259   :
2260 else
2261   echo "$as_me: failed program was:" >&5
2262 cat "conftest.$ac_ext" >&5
2263 continue
2264 fi
2265 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2266   cat >"conftest.$ac_ext" <<_ACEOF
2267 #line 2267 "configure"
2268 #include "confdefs.h"
2269 $ac_declaration
2270 int
2271 main (void)
2272 {
2273 exit (42);
2274   ;
2275   return 0;
2276 }
2277 _ACEOF
2278 rm -f "conftest.$ac_objext"
2279 if { (eval echo "$as_me:2279: \"$ac_compile\"") >&5
2280   (eval $ac_compile) 2>&5
2281   ac_status=$?
2282   echo "$as_me:2282: \$? = $ac_status" >&5
2283   (exit "$ac_status"); } &&
2284          { ac_try='test -s "conftest.$ac_objext"'
2285   { (eval echo "$as_me:2285: \"$ac_try\"") >&5
2286   (eval $ac_try) 2>&5
2287   ac_status=$?
2288   echo "$as_me:2288: \$? = $ac_status" >&5
2289   (exit "$ac_status"); }; }; then
2290   break
2291 else
2292   echo "$as_me: failed program was:" >&5
2293 cat "conftest.$ac_ext" >&5
2294 fi
2295 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2296 done
2297 rm -rf conftest*
2298 if test -n "$ac_declaration"; then
2299   echo '#ifdef __cplusplus' >>confdefs.h
2300   echo "$ac_declaration"    >>confdefs.h
2301   echo '#endif'             >>confdefs.h
2302 fi
2303
2304 else
2305   echo "$as_me: failed program was:" >&5
2306 cat "conftest.$ac_ext" >&5
2307 fi
2308 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2309 ac_ext=c
2310 ac_cpp='$CPP $CPPFLAGS'
2311 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2312 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2313 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2314 ac_main_return="return"
2315
2316 GCC_VERSION=none
2317 if test "$GCC" = yes ; then
2318         echo "$as_me:2318: checking version of $CC" >&5
2319 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2320         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.].*//'`"
2321         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2322         echo "$as_me:2322: result: $GCC_VERSION" >&5
2323 echo "${ECHO_T}$GCC_VERSION" >&6
2324 fi
2325
2326 INTEL_COMPILER=no
2327
2328 if test "$GCC" = yes ; then
2329         case "$host_os" in
2330         (linux*|gnu*)
2331                 echo "$as_me:2331: checking if this is really Intel C compiler" >&5
2332 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2333                 cf_save_CFLAGS="$CFLAGS"
2334                 CFLAGS="$CFLAGS -no-gcc"
2335                 cat >"conftest.$ac_ext" <<_ACEOF
2336 #line 2336 "configure"
2337 #include "confdefs.h"
2338
2339 int
2340 main (void)
2341 {
2342
2343 #ifdef __INTEL_COMPILER
2344 #else
2345 make an error
2346 #endif
2347
2348   ;
2349   return 0;
2350 }
2351 _ACEOF
2352 rm -f "conftest.$ac_objext"
2353 if { (eval echo "$as_me:2353: \"$ac_compile\"") >&5
2354   (eval $ac_compile) 2>&5
2355   ac_status=$?
2356   echo "$as_me:2356: \$? = $ac_status" >&5
2357   (exit "$ac_status"); } &&
2358          { ac_try='test -s "conftest.$ac_objext"'
2359   { (eval echo "$as_me:2359: \"$ac_try\"") >&5
2360   (eval $ac_try) 2>&5
2361   ac_status=$?
2362   echo "$as_me:2362: \$? = $ac_status" >&5
2363   (exit "$ac_status"); }; }; then
2364   INTEL_COMPILER=yes
2365 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2366
2367 else
2368   echo "$as_me: failed program was:" >&5
2369 cat "conftest.$ac_ext" >&5
2370 fi
2371 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2372                 CFLAGS="$cf_save_CFLAGS"
2373                 echo "$as_me:2373: result: $INTEL_COMPILER" >&5
2374 echo "${ECHO_T}$INTEL_COMPILER" >&6
2375                 ;;
2376         esac
2377 fi
2378
2379 CLANG_COMPILER=no
2380
2381 if test "$GCC" = yes ; then
2382         echo "$as_me:2382: checking if this is really Clang C compiler" >&5
2383 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2384         cf_save_CFLAGS="$CFLAGS"
2385         cat >"conftest.$ac_ext" <<_ACEOF
2386 #line 2386 "configure"
2387 #include "confdefs.h"
2388
2389 int
2390 main (void)
2391 {
2392
2393 #ifdef __clang__
2394 #else
2395 make an error
2396 #endif
2397
2398   ;
2399   return 0;
2400 }
2401 _ACEOF
2402 rm -f "conftest.$ac_objext"
2403 if { (eval echo "$as_me:2403: \"$ac_compile\"") >&5
2404   (eval $ac_compile) 2>&5
2405   ac_status=$?
2406   echo "$as_me:2406: \$? = $ac_status" >&5
2407   (exit "$ac_status"); } &&
2408          { ac_try='test -s "conftest.$ac_objext"'
2409   { (eval echo "$as_me:2409: \"$ac_try\"") >&5
2410   (eval $ac_try) 2>&5
2411   ac_status=$?
2412   echo "$as_me:2412: \$? = $ac_status" >&5
2413   (exit "$ac_status"); }; }; then
2414   CLANG_COMPILER=yes
2415
2416 else
2417   echo "$as_me: failed program was:" >&5
2418 cat "conftest.$ac_ext" >&5
2419 fi
2420 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2421         CFLAGS="$cf_save_CFLAGS"
2422         echo "$as_me:2422: result: $CLANG_COMPILER" >&5
2423 echo "${ECHO_T}$CLANG_COMPILER" >&6
2424 fi
2425
2426 CLANG_VERSION=none
2427
2428 if test "x$CLANG_COMPILER" = "xyes" ; then
2429         case "$CC" in
2430         (c[1-9][0-9]|*/c[1-9][0-9])
2431                 { echo "$as_me:2431: WARNING: replacing broken compiler alias $CC" >&5
2432 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2433                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2434                 CC=clang
2435                 ;;
2436         esac
2437
2438         echo "$as_me:2438: checking version of $CC" >&5
2439 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2440         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.].*//'`"
2441         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2442         echo "$as_me:2442: result: $CLANG_VERSION" >&5
2443 echo "${ECHO_T}$CLANG_VERSION" >&6
2444
2445         for cf_clang_opt in \
2446                 -Qunused-arguments \
2447                 -Wno-error=implicit-function-declaration
2448         do
2449                 echo "$as_me:2449: checking if option $cf_clang_opt works" >&5
2450 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2451                 cf_save_CFLAGS="$CFLAGS"
2452                 CFLAGS="$CFLAGS $cf_clang_opt"
2453                 cat >"conftest.$ac_ext" <<_ACEOF
2454 #line 2454 "configure"
2455 #include "confdefs.h"
2456
2457                         #include <stdio.h>
2458 int
2459 main (void)
2460 {
2461
2462                         printf("hello!\\n");
2463   ;
2464   return 0;
2465 }
2466 _ACEOF
2467 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2468 if { (eval echo "$as_me:2468: \"$ac_link\"") >&5
2469   (eval $ac_link) 2>&5
2470   ac_status=$?
2471   echo "$as_me:2471: \$? = $ac_status" >&5
2472   (exit "$ac_status"); } &&
2473          { ac_try='test -s "conftest$ac_exeext"'
2474   { (eval echo "$as_me:2474: \"$ac_try\"") >&5
2475   (eval $ac_try) 2>&5
2476   ac_status=$?
2477   echo "$as_me:2477: \$? = $ac_status" >&5
2478   (exit "$ac_status"); }; }; then
2479
2480                         cf_clang_optok=yes
2481 else
2482   echo "$as_me: failed program was:" >&5
2483 cat "conftest.$ac_ext" >&5
2484
2485                         cf_clang_optok=no
2486 fi
2487 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2488                 echo "$as_me:2488: result: $cf_clang_optok" >&5
2489 echo "${ECHO_T}$cf_clang_optok" >&6
2490                 CFLAGS="$cf_save_CFLAGS"
2491                 if test "$cf_clang_optok" = yes; then
2492                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2493
2494 echo "${as_me:-configure}:2494: testing adding option $cf_clang_opt ..." 1>&5
2495
2496         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2497         CFLAGS="${CFLAGS}$cf_clang_opt"
2498
2499                 fi
2500         done
2501 fi
2502
2503 echo "$as_me:2503: checking for $CC option to accept ANSI C" >&5
2504 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2505 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2506   echo $ECHO_N "(cached) $ECHO_C" >&6
2507 else
2508   ac_cv_prog_cc_stdc=no
2509 ac_save_CC=$CC
2510 cat >"conftest.$ac_ext" <<_ACEOF
2511 #line 2511 "configure"
2512 #include "confdefs.h"
2513 #include <stdarg.h>
2514 #include <stdio.h>
2515 #include <sys/types.h>
2516 #include <sys/stat.h>
2517 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2518 struct buf { int x; };
2519 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2520 static char *e (char **p, int i)
2521 {
2522   return p[i];
2523 }
2524 static char *f (char * (*g) (char **, int), char **p, ...)
2525 {
2526   char *s;
2527   va_list v;
2528   va_start (v,p);
2529   s = g (p, va_arg (v,int));
2530   va_end (v);
2531   return s;
2532 }
2533 int test (int i, double x);
2534 struct s1 {int (*f) (int a);};
2535 struct s2 {int (*f) (double a);};
2536 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2537 int argc;
2538 char **argv;
2539 int
2540 main (void)
2541 {
2542 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2543   ;
2544   return 0;
2545 }
2546 _ACEOF
2547 # Don't try gcc -ansi; that turns off useful extensions and
2548 # breaks some systems' header files.
2549 # AIX                   -qlanglvl=ansi
2550 # Ultrix and OSF/1      -std1
2551 # HP-UX 10.20 and later -Ae
2552 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2553 # SVR4                  -Xc -D__EXTENSIONS__
2554 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2555 do
2556   CC="$ac_save_CC $ac_arg"
2557   rm -f "conftest.$ac_objext"
2558 if { (eval echo "$as_me:2558: \"$ac_compile\"") >&5
2559   (eval $ac_compile) 2>&5
2560   ac_status=$?
2561   echo "$as_me:2561: \$? = $ac_status" >&5
2562   (exit "$ac_status"); } &&
2563          { ac_try='test -s "conftest.$ac_objext"'
2564   { (eval echo "$as_me:2564: \"$ac_try\"") >&5
2565   (eval $ac_try) 2>&5
2566   ac_status=$?
2567   echo "$as_me:2567: \$? = $ac_status" >&5
2568   (exit "$ac_status"); }; }; then
2569   ac_cv_prog_cc_stdc=$ac_arg
2570 break
2571 else
2572   echo "$as_me: failed program was:" >&5
2573 cat "conftest.$ac_ext" >&5
2574 fi
2575 rm -f "conftest.$ac_objext"
2576 done
2577 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2578 CC=$ac_save_CC
2579
2580 fi
2581
2582 case "x$ac_cv_prog_cc_stdc" in
2583   x|xno)
2584     echo "$as_me:2584: result: none needed" >&5
2585 echo "${ECHO_T}none needed" >&6 ;;
2586   *)
2587     echo "$as_me:2587: result: $ac_cv_prog_cc_stdc" >&5
2588 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2589     CC="$CC $ac_cv_prog_cc_stdc" ;;
2590 esac
2591
2592 # This should have been defined by AC_PROG_CC
2593 : "${CC:=cc}"
2594
2595 echo "$as_me:2595: checking \$CFLAGS variable" >&5
2596 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2597 case "x$CFLAGS" in
2598 (*-[IUD]*)
2599         echo "$as_me:2599: result: broken" >&5
2600 echo "${ECHO_T}broken" >&6
2601         { echo "$as_me:2601: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2602 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2603         cf_flags="$CFLAGS"
2604         CFLAGS=
2605         for cf_arg in $cf_flags
2606         do
2607
2608 cf_fix_cppflags=no
2609 cf_new_cflags=
2610 cf_new_cppflags=
2611 cf_new_extra_cppflags=
2612
2613 for cf_add_cflags in $cf_arg
2614 do
2615 case "$cf_fix_cppflags" in
2616 (no)
2617         case "$cf_add_cflags" in
2618         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2619                 case "$cf_add_cflags" in
2620                 (-D*)
2621                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2622
2623                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2624                                 && test -z "${cf_tst_cflags}" \
2625                                 && cf_fix_cppflags=yes
2626
2627                         if test "$cf_fix_cppflags" = yes ; then
2628
2629         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2630         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2631
2632                                 continue
2633                         elif test "${cf_tst_cflags}" = "\"'" ; then
2634
2635         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2636         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2637
2638                                 continue
2639                         fi
2640                         ;;
2641                 esac
2642                 case "$CPPFLAGS" in
2643                 (*$cf_add_cflags)
2644                         ;;
2645                 (*)
2646                         case "$cf_add_cflags" in
2647                         (-D*)
2648                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2649
2650 CPPFLAGS=`echo "$CPPFLAGS" | \
2651         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2652                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2653
2654                                 ;;
2655                         esac
2656
2657         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2658         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2659
2660                         ;;
2661                 esac
2662                 ;;
2663         (*)
2664
2665         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2666         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2667
2668                 ;;
2669         esac
2670         ;;
2671 (yes)
2672
2673         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2674         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2675
2676         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2677
2678         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2679                 && test -z "${cf_tst_cflags}" \
2680                 && cf_fix_cppflags=no
2681         ;;
2682 esac
2683 done
2684
2685 if test -n "$cf_new_cflags" ; then
2686
2687         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2688         CFLAGS="${CFLAGS}$cf_new_cflags"
2689
2690 fi
2691
2692 if test -n "$cf_new_cppflags" ; then
2693
2694         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2695         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2696
2697 fi
2698
2699 if test -n "$cf_new_extra_cppflags" ; then
2700
2701         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2702         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2703
2704 fi
2705
2706         done
2707         ;;
2708 (*)
2709         echo "$as_me:2709: result: ok" >&5
2710 echo "${ECHO_T}ok" >&6
2711         ;;
2712 esac
2713
2714 echo "$as_me:2714: checking \$CC variable" >&5
2715 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2716 case "$CC" in
2717 (*[\ \  ]-*)
2718         echo "$as_me:2718: result: broken" >&5
2719 echo "${ECHO_T}broken" >&6
2720         { echo "$as_me:2720: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2721 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2722         # humor him...
2723         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2724         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2725         CC="$cf_prog"
2726         for cf_arg in $cf_flags
2727         do
2728                 case "x$cf_arg" in
2729                 (x-[IUDfgOW]*)
2730
2731 cf_fix_cppflags=no
2732 cf_new_cflags=
2733 cf_new_cppflags=
2734 cf_new_extra_cppflags=
2735
2736 for cf_add_cflags in $cf_arg
2737 do
2738 case "$cf_fix_cppflags" in
2739 (no)
2740         case "$cf_add_cflags" in
2741         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2742                 case "$cf_add_cflags" in
2743                 (-D*)
2744                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2745
2746                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2747                                 && test -z "${cf_tst_cflags}" \
2748                                 && cf_fix_cppflags=yes
2749
2750                         if test "$cf_fix_cppflags" = yes ; then
2751
2752         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2753         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2754
2755                                 continue
2756                         elif test "${cf_tst_cflags}" = "\"'" ; then
2757
2758         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2759         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2760
2761                                 continue
2762                         fi
2763                         ;;
2764                 esac
2765                 case "$CPPFLAGS" in
2766                 (*$cf_add_cflags)
2767                         ;;
2768                 (*)
2769                         case "$cf_add_cflags" in
2770                         (-D*)
2771                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2772
2773 CPPFLAGS=`echo "$CPPFLAGS" | \
2774         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2775                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2776
2777                                 ;;
2778                         esac
2779
2780         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2781         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2782
2783                         ;;
2784                 esac
2785                 ;;
2786         (*)
2787
2788         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2789         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2790
2791                 ;;
2792         esac
2793         ;;
2794 (yes)
2795
2796         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2797         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2798
2799         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2800
2801         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2802                 && test -z "${cf_tst_cflags}" \
2803                 && cf_fix_cppflags=no
2804         ;;
2805 esac
2806 done
2807
2808 if test -n "$cf_new_cflags" ; then
2809
2810         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2811         CFLAGS="${CFLAGS}$cf_new_cflags"
2812
2813 fi
2814
2815 if test -n "$cf_new_cppflags" ; then
2816
2817         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2818         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2819
2820 fi
2821
2822 if test -n "$cf_new_extra_cppflags" ; then
2823
2824         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2825         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2826
2827 fi
2828
2829                         ;;
2830                 (*)
2831                         CC="$CC $cf_arg"
2832                         ;;
2833                 esac
2834         done
2835         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2836
2837 echo "${as_me:-configure}:2837: testing resulting CC: '$CC' ..." 1>&5
2838
2839         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2840
2841 echo "${as_me:-configure}:2841: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2842
2843         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2844
2845 echo "${as_me:-configure}:2845: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2846
2847         ;;
2848 (*)
2849         echo "$as_me:2849: result: ok" >&5
2850 echo "${ECHO_T}ok" >&6
2851         ;;
2852 esac
2853
2854 ac_ext=c
2855 ac_cpp='$CPP $CPPFLAGS'
2856 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2857 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2858 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2859 ac_main_return="return"
2860 echo "$as_me:2860: checking how to run the C preprocessor" >&5
2861 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2862 # On Suns, sometimes $CPP names a directory.
2863 if test -n "$CPP" && test -d "$CPP"; then
2864   CPP=
2865 fi
2866 if test -z "$CPP"; then
2867   if test "${ac_cv_prog_CPP+set}" = set; then
2868   echo $ECHO_N "(cached) $ECHO_C" >&6
2869 else
2870       # Double quotes because CPP needs to be expanded
2871     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2872     do
2873       ac_preproc_ok=false
2874 for ac_c_preproc_warn_flag in '' yes
2875 do
2876   # Use a header file that comes with gcc, so configuring glibc
2877   # with a fresh cross-compiler works.
2878   # On the NeXT, cc -E runs the code through the compiler's parser,
2879   # not just through cpp. "Syntax error" is here to catch this case.
2880   cat >"conftest.$ac_ext" <<_ACEOF
2881 #line 2881 "configure"
2882 #include "confdefs.h"
2883 #include <assert.h>
2884                      Syntax error
2885 _ACEOF
2886 if { (eval echo "$as_me:2886: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2887   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2888   ac_status=$?
2889   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2890   rm -f conftest.er1
2891   cat conftest.err >&5
2892   echo "$as_me:2892: \$? = $ac_status" >&5
2893   (exit "$ac_status"); } >/dev/null; then
2894   if test -s conftest.err; then
2895     ac_cpp_err=$ac_c_preproc_warn_flag
2896   else
2897     ac_cpp_err=
2898   fi
2899 else
2900   ac_cpp_err=yes
2901 fi
2902 if test -z "$ac_cpp_err"; then
2903   :
2904 else
2905   echo "$as_me: failed program was:" >&5
2906   cat "conftest.$ac_ext" >&5
2907   # Broken: fails on valid input.
2908 continue
2909 fi
2910 rm -f conftest.err "conftest.$ac_ext"
2911
2912   # OK, works on sane cases.  Now check whether non-existent headers
2913   # can be detected and how.
2914   cat >"conftest.$ac_ext" <<_ACEOF
2915 #line 2915 "configure"
2916 #include "confdefs.h"
2917 #include <ac_nonexistent.h>
2918 _ACEOF
2919 if { (eval echo "$as_me:2919: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2920   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2921   ac_status=$?
2922   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2923   rm -f conftest.er1
2924   cat conftest.err >&5
2925   echo "$as_me:2925: \$? = $ac_status" >&5
2926   (exit "$ac_status"); } >/dev/null; then
2927   if test -s conftest.err; then
2928     ac_cpp_err=$ac_c_preproc_warn_flag
2929   else
2930     ac_cpp_err=
2931   fi
2932 else
2933   ac_cpp_err=yes
2934 fi
2935 if test -z "$ac_cpp_err"; then
2936   # Broken: success on invalid input.
2937 continue
2938 else
2939   echo "$as_me: failed program was:" >&5
2940   cat "conftest.$ac_ext" >&5
2941   # Passes both tests.
2942 ac_preproc_ok=:
2943 break
2944 fi
2945 rm -f conftest.err "conftest.$ac_ext"
2946
2947 done
2948 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2949 rm -f conftest.err "conftest.$ac_ext"
2950 if $ac_preproc_ok; then
2951   break
2952 fi
2953
2954     done
2955     ac_cv_prog_CPP=$CPP
2956
2957 fi
2958   CPP=$ac_cv_prog_CPP
2959 else
2960   ac_cv_prog_CPP=$CPP
2961 fi
2962 echo "$as_me:2962: result: $CPP" >&5
2963 echo "${ECHO_T}$CPP" >&6
2964 ac_preproc_ok=false
2965 for ac_c_preproc_warn_flag in '' yes
2966 do
2967   # Use a header file that comes with gcc, so configuring glibc
2968   # with a fresh cross-compiler works.
2969   # On the NeXT, cc -E runs the code through the compiler's parser,
2970   # not just through cpp. "Syntax error" is here to catch this case.
2971   cat >"conftest.$ac_ext" <<_ACEOF
2972 #line 2972 "configure"
2973 #include "confdefs.h"
2974 #include <assert.h>
2975                      Syntax error
2976 _ACEOF
2977 if { (eval echo "$as_me:2977: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2978   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2979   ac_status=$?
2980   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2981   rm -f conftest.er1
2982   cat conftest.err >&5
2983   echo "$as_me:2983: \$? = $ac_status" >&5
2984   (exit "$ac_status"); } >/dev/null; then
2985   if test -s conftest.err; then
2986     ac_cpp_err=$ac_c_preproc_warn_flag
2987   else
2988     ac_cpp_err=
2989   fi
2990 else
2991   ac_cpp_err=yes
2992 fi
2993 if test -z "$ac_cpp_err"; then
2994   :
2995 else
2996   echo "$as_me: failed program was:" >&5
2997   cat "conftest.$ac_ext" >&5
2998   # Broken: fails on valid input.
2999 continue
3000 fi
3001 rm -f conftest.err "conftest.$ac_ext"
3002
3003   # OK, works on sane cases.  Now check whether non-existent headers
3004   # can be detected and how.
3005   cat >"conftest.$ac_ext" <<_ACEOF
3006 #line 3006 "configure"
3007 #include "confdefs.h"
3008 #include <ac_nonexistent.h>
3009 _ACEOF
3010 if { (eval echo "$as_me:3010: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3011   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3012   ac_status=$?
3013   $EGREP -v '^ *\+' conftest.er1 >conftest.err
3014   rm -f conftest.er1
3015   cat conftest.err >&5
3016   echo "$as_me:3016: \$? = $ac_status" >&5
3017   (exit "$ac_status"); } >/dev/null; then
3018   if test -s conftest.err; then
3019     ac_cpp_err=$ac_c_preproc_warn_flag
3020   else
3021     ac_cpp_err=
3022   fi
3023 else
3024   ac_cpp_err=yes
3025 fi
3026 if test -z "$ac_cpp_err"; then
3027   # Broken: success on invalid input.
3028 continue
3029 else
3030   echo "$as_me: failed program was:" >&5
3031   cat "conftest.$ac_ext" >&5
3032   # Passes both tests.
3033 ac_preproc_ok=:
3034 break
3035 fi
3036 rm -f conftest.err "conftest.$ac_ext"
3037
3038 done
3039 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3040 rm -f conftest.err "conftest.$ac_ext"
3041 if $ac_preproc_ok; then
3042   :
3043 else
3044   { { echo "$as_me:3044: error: C preprocessor \"$CPP\" fails sanity check" >&5
3045 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
3046    { (exit 1); exit 1; }; }
3047 fi
3048
3049 ac_ext=c
3050 ac_cpp='$CPP $CPPFLAGS'
3051 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3052 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3053 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3054 ac_main_return="return"
3055
3056 if test $ac_cv_c_compiler_gnu = yes; then
3057     echo "$as_me:3057: checking whether $CC needs -traditional" >&5
3058 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
3059 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
3060   echo $ECHO_N "(cached) $ECHO_C" >&6
3061 else
3062     ac_pattern="Autoconf.*'x'"
3063   cat >"conftest.$ac_ext" <<_ACEOF
3064 #line 3064 "configure"
3065 #include "confdefs.h"
3066 #include <sgtty.h>
3067 int Autoconf = TIOCGETP;
3068 _ACEOF
3069 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3070   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3071   ac_cv_prog_gcc_traditional=yes
3072 else
3073   ac_cv_prog_gcc_traditional=no
3074 fi
3075 rm -rf conftest*
3076
3077   if test $ac_cv_prog_gcc_traditional = no; then
3078     cat >"conftest.$ac_ext" <<_ACEOF
3079 #line 3079 "configure"
3080 #include "confdefs.h"
3081 #include <termio.h>
3082 int Autoconf = TCGETA;
3083 _ACEOF
3084 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3085   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3086   ac_cv_prog_gcc_traditional=yes
3087 fi
3088 rm -rf conftest*
3089
3090   fi
3091 fi
3092 echo "$as_me:3092: result: $ac_cv_prog_gcc_traditional" >&5
3093 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3094   if test $ac_cv_prog_gcc_traditional = yes; then
3095     CC="$CC -traditional"
3096   fi
3097 fi
3098
3099 echo "$as_me:3099: checking whether $CC understands -c and -o together" >&5
3100 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3101 if test "${cf_cv_prog_CC_c_o+set}" = set; then
3102   echo $ECHO_N "(cached) $ECHO_C" >&6
3103 else
3104
3105 cat > conftest.$ac_ext <<CF_EOF
3106 int main(void)
3107 {
3108         ${cf_cv_main_return:-return}(0);
3109 }
3110 CF_EOF
3111 # We do the test twice because some compilers refuse to overwrite an
3112 # existing .o file with -o, though they will create one.
3113 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3114 if { (eval echo "$as_me:3114: \"$ac_try\"") >&5
3115   (eval $ac_try) 2>&5
3116   ac_status=$?
3117   echo "$as_me:3117: \$? = $ac_status" >&5
3118   (exit "$ac_status"); } &&
3119   test -f conftest2.$ac_objext && { (eval echo "$as_me:3119: \"$ac_try\"") >&5
3120   (eval $ac_try) 2>&5
3121   ac_status=$?
3122   echo "$as_me:3122: \$? = $ac_status" >&5
3123   (exit "$ac_status"); };
3124 then
3125   eval cf_cv_prog_CC_c_o=yes
3126 else
3127   eval cf_cv_prog_CC_c_o=no
3128 fi
3129 rm -rf ./conftest*
3130
3131 fi
3132 if test "$cf_cv_prog_CC_c_o" = yes; then
3133   echo "$as_me:3133: result: yes" >&5
3134 echo "${ECHO_T}yes" >&6
3135 else
3136   echo "$as_me:3136: result: no" >&5
3137 echo "${ECHO_T}no" >&6
3138 fi
3139
3140 if test "$cross_compiling" = yes ; then
3141         LDCONFIG=:
3142 else
3143         case "$cf_cv_system_name" in
3144         (dragonfly*|mirbsd*|freebsd*)
3145                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
3146                 ;;
3147         (*) LDPATH=$PATH:/sbin:/usr/sbin
3148                 # Extract the first word of "ldconfig", so it can be a program name with args.
3149 set dummy ldconfig; ac_word=$2
3150 echo "$as_me:3150: checking for $ac_word" >&5
3151 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3152 if test "${ac_cv_path_LDCONFIG+set}" = set; then
3153   echo $ECHO_N "(cached) $ECHO_C" >&6
3154 else
3155   case $LDCONFIG in
3156   [\\/]* | ?:[\\/]*)
3157   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
3158   ;;
3159   *)
3160   ac_save_IFS=$IFS; IFS=$ac_path_separator
3161 ac_dummy="$LDPATH"
3162 for ac_dir in $ac_dummy; do
3163   IFS=$ac_save_IFS
3164   test -z "$ac_dir" && ac_dir=.
3165   if $as_executable_p "$ac_dir/$ac_word"; then
3166    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
3167    echo "$as_me:3167: found $ac_dir/$ac_word" >&5
3168    break
3169 fi
3170 done
3171
3172   ;;
3173 esac
3174 fi
3175 LDCONFIG=$ac_cv_path_LDCONFIG
3176
3177 if test -n "$LDCONFIG"; then
3178   echo "$as_me:3178: result: $LDCONFIG" >&5
3179 echo "${ECHO_T}$LDCONFIG" >&6
3180 else
3181   echo "$as_me:3181: result: no" >&5
3182 echo "${ECHO_T}no" >&6
3183 fi
3184
3185                 ;;
3186         esac
3187 fi
3188
3189 echo "$as_me:3189: checking if you want to ensure bool is consistent with C++" >&5
3190 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
3191
3192 # Check whether --with-cxx or --without-cxx was given.
3193 if test "${with_cxx+set}" = set; then
3194   withval="$with_cxx"
3195   cf_with_cxx=$withval
3196 else
3197   cf_with_cxx=yes
3198 fi;
3199 echo "$as_me:3199: result: $cf_with_cxx" >&5
3200 echo "${ECHO_T}$cf_with_cxx" >&6
3201 if test "X$cf_with_cxx" = Xno ; then
3202         CXX=""
3203         GXX=""
3204 else
3205         # with autoconf 2.13, we can change the error to a warning:
3206                 ac_ext=cc
3207 ac_cpp='$CXXCPP $CPPFLAGS'
3208 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3209 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3210 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3211 ac_main_return="return"
3212 if test -n "$ac_tool_prefix"; then
3213   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3214   do
3215     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3216 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3217 echo "$as_me:3217: checking for $ac_word" >&5
3218 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3219 if test "${ac_cv_prog_CXX+set}" = set; then
3220   echo $ECHO_N "(cached) $ECHO_C" >&6
3221 else
3222   if test -n "$CXX"; then
3223   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3224 else
3225   ac_save_IFS=$IFS; IFS=$ac_path_separator
3226 ac_dummy="$PATH"
3227 for ac_dir in $ac_dummy; do
3228   IFS=$ac_save_IFS
3229   test -z "$ac_dir" && ac_dir=.
3230   $as_executable_p "$ac_dir/$ac_word" || continue
3231 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3232 echo "$as_me:3232: found $ac_dir/$ac_word" >&5
3233 break
3234 done
3235
3236 fi
3237 fi
3238 CXX=$ac_cv_prog_CXX
3239 if test -n "$CXX"; then
3240   echo "$as_me:3240: result: $CXX" >&5
3241 echo "${ECHO_T}$CXX" >&6
3242 else
3243   echo "$as_me:3243: result: no" >&5
3244 echo "${ECHO_T}no" >&6
3245 fi
3246
3247     test -n "$CXX" && break
3248   done
3249 fi
3250 if test -z "$CXX"; then
3251   ac_ct_CXX=$CXX
3252   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3253 do
3254   # Extract the first word of "$ac_prog", so it can be a program name with args.
3255 set dummy $ac_prog; ac_word=$2
3256 echo "$as_me:3256: checking for $ac_word" >&5
3257 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3258 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3259   echo $ECHO_N "(cached) $ECHO_C" >&6
3260 else
3261   if test -n "$ac_ct_CXX"; then
3262   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3263 else
3264   ac_save_IFS=$IFS; IFS=$ac_path_separator
3265 ac_dummy="$PATH"
3266 for ac_dir in $ac_dummy; do
3267   IFS=$ac_save_IFS
3268   test -z "$ac_dir" && ac_dir=.
3269   $as_executable_p "$ac_dir/$ac_word" || continue
3270 ac_cv_prog_ac_ct_CXX="$ac_prog"
3271 echo "$as_me:3271: found $ac_dir/$ac_word" >&5
3272 break
3273 done
3274
3275 fi
3276 fi
3277 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3278 if test -n "$ac_ct_CXX"; then
3279   echo "$as_me:3279: result: $ac_ct_CXX" >&5
3280 echo "${ECHO_T}$ac_ct_CXX" >&6
3281 else
3282   echo "$as_me:3282: result: no" >&5
3283 echo "${ECHO_T}no" >&6
3284 fi
3285
3286   test -n "$ac_ct_CXX" && break
3287 done
3288 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3289
3290   CXX=$ac_ct_CXX
3291 fi
3292
3293 # Provide some information about the compiler.
3294 echo "$as_me:3294:" \
3295      "checking for C++ compiler version" >&5
3296 ac_compiler=`set X $ac_compile; echo $2`
3297 { (eval echo "$as_me:3297: \"$ac_compiler --version </dev/null >&5\"") >&5
3298   (eval $ac_compiler --version </dev/null >&5) 2>&5
3299   ac_status=$?
3300   echo "$as_me:3300: \$? = $ac_status" >&5
3301   (exit "$ac_status"); }
3302 { (eval echo "$as_me:3302: \"$ac_compiler -v </dev/null >&5\"") >&5
3303   (eval $ac_compiler -v </dev/null >&5) 2>&5
3304   ac_status=$?
3305   echo "$as_me:3305: \$? = $ac_status" >&5
3306   (exit "$ac_status"); }
3307 { (eval echo "$as_me:3307: \"$ac_compiler -V </dev/null >&5\"") >&5
3308   (eval $ac_compiler -V </dev/null >&5) 2>&5
3309   ac_status=$?
3310   echo "$as_me:3310: \$? = $ac_status" >&5
3311   (exit "$ac_status"); }
3312
3313 echo "$as_me:3313: checking whether we are using the GNU C++ compiler" >&5
3314 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3315 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3316   echo $ECHO_N "(cached) $ECHO_C" >&6
3317 else
3318   cat >"conftest.$ac_ext" <<_ACEOF
3319 #line 3319 "configure"
3320 #include "confdefs.h"
3321
3322 int
3323 main (void)
3324 {
3325 #ifndef __GNUC__
3326        choke me
3327 #endif
3328
3329   ;
3330   return 0;
3331 }
3332 _ACEOF
3333 rm -f "conftest.$ac_objext"
3334 if { (eval echo "$as_me:3334: \"$ac_compile\"") >&5
3335   (eval $ac_compile) 2>&5
3336   ac_status=$?
3337   echo "$as_me:3337: \$? = $ac_status" >&5
3338   (exit "$ac_status"); } &&
3339          { ac_try='test -s "conftest.$ac_objext"'
3340   { (eval echo "$as_me:3340: \"$ac_try\"") >&5
3341   (eval $ac_try) 2>&5
3342   ac_status=$?
3343   echo "$as_me:3343: \$? = $ac_status" >&5
3344   (exit "$ac_status"); }; }; then
3345   ac_compiler_gnu=yes
3346 else
3347   echo "$as_me: failed program was:" >&5
3348 cat "conftest.$ac_ext" >&5
3349 ac_compiler_gnu=no
3350 fi
3351 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3352 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3353
3354 fi
3355 echo "$as_me:3355: result: $ac_cv_cxx_compiler_gnu" >&5
3356 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3357 GXX=`test $ac_compiler_gnu = yes && echo yes`
3358 ac_test_CXXFLAGS=${CXXFLAGS+set}
3359 ac_save_CXXFLAGS=$CXXFLAGS
3360 CXXFLAGS="-g"
3361 echo "$as_me:3361: checking whether $CXX accepts -g" >&5
3362 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3363 if test "${ac_cv_prog_cxx_g+set}" = set; then
3364   echo $ECHO_N "(cached) $ECHO_C" >&6
3365 else
3366   cat >"conftest.$ac_ext" <<_ACEOF
3367 #line 3367 "configure"
3368 #include "confdefs.h"
3369
3370 int
3371 main (void)
3372 {
3373
3374   ;
3375   return 0;
3376 }
3377 _ACEOF
3378 rm -f "conftest.$ac_objext"
3379 if { (eval echo "$as_me:3379: \"$ac_compile\"") >&5
3380   (eval $ac_compile) 2>&5
3381   ac_status=$?
3382   echo "$as_me:3382: \$? = $ac_status" >&5
3383   (exit "$ac_status"); } &&
3384          { ac_try='test -s "conftest.$ac_objext"'
3385   { (eval echo "$as_me:3385: \"$ac_try\"") >&5
3386   (eval $ac_try) 2>&5
3387   ac_status=$?
3388   echo "$as_me:3388: \$? = $ac_status" >&5
3389   (exit "$ac_status"); }; }; then
3390   ac_cv_prog_cxx_g=yes
3391 else
3392   echo "$as_me: failed program was:" >&5
3393 cat "conftest.$ac_ext" >&5
3394 ac_cv_prog_cxx_g=no
3395 fi
3396 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3397 fi
3398 echo "$as_me:3398: result: $ac_cv_prog_cxx_g" >&5
3399 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3400 if test "$ac_test_CXXFLAGS" = set; then
3401   CXXFLAGS=$ac_save_CXXFLAGS
3402 elif test $ac_cv_prog_cxx_g = yes; then
3403   if test "$GXX" = yes; then
3404     CXXFLAGS="-g -O2"
3405   else
3406     CXXFLAGS="-g"
3407   fi
3408 else
3409   if test "$GXX" = yes; then
3410     CXXFLAGS="-O2"
3411   else
3412     CXXFLAGS=
3413   fi
3414 fi
3415 for ac_declaration in \
3416    ''\
3417    '#include <stdlib.h>' \
3418    'extern "C" void std::exit (int) throw (); using std::exit;' \
3419    'extern "C" void std::exit (int); using std::exit;' \
3420    'extern "C" void exit (int) throw ();' \
3421    'extern "C" void exit (int);' \
3422    'void exit (int);'
3423 do
3424   cat >"conftest.$ac_ext" <<_ACEOF
3425 #line 3425 "configure"
3426 #include "confdefs.h"
3427 #include <stdlib.h>
3428 $ac_declaration
3429 int
3430 main (void)
3431 {
3432 exit (42);
3433   ;
3434   return 0;
3435 }
3436 _ACEOF
3437 rm -f "conftest.$ac_objext"
3438 if { (eval echo "$as_me:3438: \"$ac_compile\"") >&5
3439   (eval $ac_compile) 2>&5
3440   ac_status=$?
3441   echo "$as_me:3441: \$? = $ac_status" >&5
3442   (exit "$ac_status"); } &&
3443          { ac_try='test -s "conftest.$ac_objext"'
3444   { (eval echo "$as_me:3444: \"$ac_try\"") >&5
3445   (eval $ac_try) 2>&5
3446   ac_status=$?
3447   echo "$as_me:3447: \$? = $ac_status" >&5
3448   (exit "$ac_status"); }; }; then
3449   :
3450 else
3451   echo "$as_me: failed program was:" >&5
3452 cat "conftest.$ac_ext" >&5
3453 continue
3454 fi
3455 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3456   cat >"conftest.$ac_ext" <<_ACEOF
3457 #line 3457 "configure"
3458 #include "confdefs.h"
3459 $ac_declaration
3460 int
3461 main (void)
3462 {
3463 exit (42);
3464   ;
3465   return 0;
3466 }
3467 _ACEOF
3468 rm -f "conftest.$ac_objext"
3469 if { (eval echo "$as_me:3469: \"$ac_compile\"") >&5
3470   (eval $ac_compile) 2>&5
3471   ac_status=$?
3472   echo "$as_me:3472: \$? = $ac_status" >&5
3473   (exit "$ac_status"); } &&
3474          { ac_try='test -s "conftest.$ac_objext"'
3475   { (eval echo "$as_me:3475: \"$ac_try\"") >&5
3476   (eval $ac_try) 2>&5
3477   ac_status=$?
3478   echo "$as_me:3478: \$? = $ac_status" >&5
3479   (exit "$ac_status"); }; }; then
3480   break
3481 else
3482   echo "$as_me: failed program was:" >&5
3483 cat "conftest.$ac_ext" >&5
3484 fi
3485 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3486 done
3487 rm -rf conftest*
3488 if test -n "$ac_declaration"; then
3489   echo '#ifdef __cplusplus' >>confdefs.h
3490   echo "$ac_declaration"    >>confdefs.h
3491   echo '#endif'             >>confdefs.h
3492 fi
3493
3494 ac_ext=c
3495 ac_cpp='$CPP $CPPFLAGS'
3496 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3497 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3498 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3499 ac_main_return="return"
3500
3501         ac_ext=cc
3502 ac_cpp='$CXXCPP $CPPFLAGS'
3503 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3504 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3505 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3506 ac_main_return="return"
3507
3508         if test "x$cf_with_cxx" != xno
3509         then
3510                 # Several of the C++ configurations do not work, particularly when
3511                 # cross-compiling (20140913 -TD)
3512                 echo "$as_me:3512: checking if $CXX works" >&5
3513 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3514
3515                 save_CPPFLAGS="$CPPFLAGS"
3516                 eval cf_includedir=${includedir}
3517                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3518
3519 cat >"conftest.$ac_ext" <<_ACEOF
3520 #line 3520 "configure"
3521 #include "confdefs.h"
3522
3523 #include <stdlib.h>
3524 #include <stdio.h>
3525
3526 int
3527 main (void)
3528 {
3529
3530                 printf("Hello world!\n")
3531
3532   ;
3533   return 0;
3534 }
3535 _ACEOF
3536 rm -f "conftest.$ac_objext"
3537 if { (eval echo "$as_me:3537: \"$ac_compile\"") >&5
3538   (eval $ac_compile) 2>&5
3539   ac_status=$?
3540   echo "$as_me:3540: \$? = $ac_status" >&5
3541   (exit "$ac_status"); } &&
3542          { ac_try='test -s "conftest.$ac_objext"'
3543   { (eval echo "$as_me:3543: \"$ac_try\"") >&5
3544   (eval $ac_try) 2>&5
3545   ac_status=$?
3546   echo "$as_me:3546: \$? = $ac_status" >&5
3547   (exit "$ac_status"); }; }; then
3548   cf_cxx_works=yes
3549 else
3550   echo "$as_me: failed program was:" >&5
3551 cat "conftest.$ac_ext" >&5
3552 cf_cxx_works=no
3553 fi
3554 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3555                 CPPFLAGS="$save_CPPFLAGS"
3556
3557                 echo "$as_me:3557: result: $cf_cxx_works" >&5
3558 echo "${ECHO_T}$cf_cxx_works" >&6
3559                 if test "x$cf_cxx_works" = xno
3560                 then
3561                         { echo "$as_me:3561: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3562 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3563                         cf_with_cxx=no; CXX=""; GXX="";
3564                 fi
3565         fi
3566         ac_ext=c
3567 ac_cpp='$CPP $CPPFLAGS'
3568 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3569 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3570 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3571 ac_main_return="return"
3572
3573         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3574         if test "$CXX" = "g++" ; then
3575                 # Extract the first word of "g++", so it can be a program name with args.
3576 set dummy g++; ac_word=$2
3577 echo "$as_me:3577: checking for $ac_word" >&5
3578 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3579 if test "${ac_cv_path_CXX+set}" = set; then
3580   echo $ECHO_N "(cached) $ECHO_C" >&6
3581 else
3582   case $CXX in
3583   [\\/]* | ?:[\\/]*)
3584   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3585   ;;
3586   *)
3587   ac_save_IFS=$IFS; IFS=$ac_path_separator
3588 ac_dummy="$PATH"
3589 for ac_dir in $ac_dummy; do
3590   IFS=$ac_save_IFS
3591   test -z "$ac_dir" && ac_dir=.
3592   if $as_executable_p "$ac_dir/$ac_word"; then
3593    ac_cv_path_CXX="$ac_dir/$ac_word"
3594    echo "$as_me:3594: found $ac_dir/$ac_word" >&5
3595    break
3596 fi
3597 done
3598
3599   ;;
3600 esac
3601 fi
3602 CXX=$ac_cv_path_CXX
3603
3604 if test -n "$CXX"; then
3605   echo "$as_me:3605: result: $CXX" >&5
3606 echo "${ECHO_T}$CXX" >&6
3607 else
3608   echo "$as_me:3608: result: no" >&5
3609 echo "${ECHO_T}no" >&6
3610 fi
3611
3612         fi
3613         case "x$CXX" in
3614         (x|xg++)
3615                 { echo "$as_me:3615: WARNING: You don't have any C++ compiler, too bad" >&5
3616 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3617                 cf_with_cxx=no; CXX=""; GXX="";
3618                 ;;
3619         esac
3620 fi
3621
3622 GXX_VERSION=none
3623 if test "$GXX" = yes; then
3624         echo "$as_me:3624: checking version of ${CXX:-g++}" >&5
3625 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3626         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3627         if test -z "$GXX_VERSION"
3628         then
3629                 GXX_VERSION=unknown
3630                 GXX=no
3631         fi
3632         echo "$as_me:3632: result: $GXX_VERSION" >&5
3633 echo "${ECHO_T}$GXX_VERSION" >&6
3634 fi
3635
3636 case "$GXX_VERSION" in
3637 ([1-9][0-9].*)
3638         ;;
3639 (1.*|2.[0-6]*)
3640         { echo "$as_me:3640: WARNING: templates do not work" >&5
3641 echo "$as_me: WARNING: templates do not work" >&2;}
3642         ;;
3643 esac
3644
3645 echo "$as_me:3645: checking if you want to build C++ binding and demo" >&5
3646 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3647
3648 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3649 if test "${with_cxx_binding+set}" = set; then
3650   withval="$with_cxx_binding"
3651   cf_with_cxx_binding=$withval
3652 else
3653   cf_with_cxx_binding=$cf_with_cxx
3654 fi;
3655 echo "$as_me:3655: result: $cf_with_cxx_binding" >&5
3656 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3657
3658 echo "$as_me:3658: checking if you want to build with Ada" >&5
3659 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3660 echo "$as_me:3660: result: $cf_with_ada" >&5
3661 echo "${ECHO_T}$cf_with_ada" >&6
3662
3663 echo "$as_me:3663: checking if you want to install terminal database" >&5
3664 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3665
3666 # Check whether --enable-db-install or --disable-db-install was given.
3667 if test "${enable_db_install+set}" = set; then
3668   enableval="$enable_db_install"
3669   cf_with_db_install=$enableval
3670 else
3671   cf_with_db_install=yes
3672 fi;
3673 echo "$as_me:3673: result: $cf_with_db_install" >&5
3674 echo "${ECHO_T}$cf_with_db_install" >&6
3675
3676 echo "$as_me:3676: checking if you want to install manpages" >&5
3677 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3678
3679 # Check whether --with-manpages or --without-manpages was given.
3680 if test "${with_manpages+set}" = set; then
3681   withval="$with_manpages"
3682   cf_with_manpages=$withval
3683 else
3684   cf_with_manpages=yes
3685 fi;
3686 echo "$as_me:3686: result: $cf_with_manpages" >&5
3687 echo "${ECHO_T}$cf_with_manpages" >&6
3688
3689 echo "$as_me:3689: checking if you want to build programs such as tic" >&5
3690 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3691
3692 # Check whether --with-progs or --without-progs was given.
3693 if test "${with_progs+set}" = set; then
3694   withval="$with_progs"
3695   cf_with_progs=$withval
3696 else
3697   cf_with_progs=yes
3698 fi;
3699 echo "$as_me:3699: result: $cf_with_progs" >&5
3700 echo "${ECHO_T}$cf_with_progs" >&6
3701
3702 if test -f "$srcdir/tack/tack.h" ; then
3703         if test "x$cross_compiling" = xyes ; then
3704                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3705
3706 echo "${as_me:-configure}:3706: testing ignoring tack because we are cross-compiling ..." 1>&5
3707
3708                 cf_with_tack=no
3709         else
3710                 echo "$as_me:3710: checking if you want to build the tack program" >&5
3711 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3712
3713 # Check whether --with-tack or --without-tack was given.
3714 if test "${with_tack+set}" = set; then
3715   withval="$with_tack"
3716   cf_with_tack=$withval
3717 else
3718   cf_with_tack=$cf_with_progs
3719 fi;
3720                 echo "$as_me:3720: result: $cf_with_tack" >&5
3721 echo "${ECHO_T}$cf_with_tack" >&6
3722         fi
3723 else
3724         cf_with_tack=no
3725 fi
3726
3727 echo "$as_me:3727: checking if you want to build test-programs" >&5
3728 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3729
3730 # Check whether --with-tests or --without-tests was given.
3731 if test "${with_tests+set}" = set; then
3732   withval="$with_tests"
3733   cf_with_tests=$withval
3734 else
3735   cf_with_tests=yes
3736 fi;
3737 echo "$as_me:3737: result: $cf_with_tests" >&5
3738 echo "${ECHO_T}$cf_with_tests" >&6
3739
3740 echo "$as_me:3740: checking if you wish to install curses.h" >&5
3741 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3742
3743 # Check whether --with-curses-h or --without-curses-h was given.
3744 if test "${with_curses_h+set}" = set; then
3745   withval="$with_curses_h"
3746   with_curses_h=$withval
3747 else
3748   with_curses_h=yes
3749 fi;
3750 echo "$as_me:3750: result: $with_curses_h" >&5
3751 echo "${ECHO_T}$with_curses_h" >&6
3752
3753 modules_to_build="ncurses"
3754 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3755 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3756 modules_to_build="$modules_to_build panel menu form"
3757
3758 test "$program_prefix" != NONE &&
3759   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3760 # Use a double $ so make ignores it.
3761 test "$program_suffix" != NONE &&
3762   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3763 # Double any \ or $.  echo might interpret backslashes.
3764 # By default was `s,x,x', remove it if useless.
3765 cat <<\_ACEOF >conftest.sed
3766 s/[\\$]/&&/g;s/;s,x,x,$//
3767 _ACEOF
3768 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3769 rm conftest.sed
3770
3771 for ac_prog in mawk gawk nawk awk
3772 do
3773   # Extract the first word of "$ac_prog", so it can be a program name with args.
3774 set dummy $ac_prog; ac_word=$2
3775 echo "$as_me:3775: checking for $ac_word" >&5
3776 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3777 if test "${ac_cv_prog_AWK+set}" = set; then
3778   echo $ECHO_N "(cached) $ECHO_C" >&6
3779 else
3780   if test -n "$AWK"; then
3781   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3782 else
3783   ac_save_IFS=$IFS; IFS=$ac_path_separator
3784 ac_dummy="$PATH"
3785 for ac_dir in $ac_dummy; do
3786   IFS=$ac_save_IFS
3787   test -z "$ac_dir" && ac_dir=.
3788   $as_executable_p "$ac_dir/$ac_word" || continue
3789 ac_cv_prog_AWK="$ac_prog"
3790 echo "$as_me:3790: found $ac_dir/$ac_word" >&5
3791 break
3792 done
3793
3794 fi
3795 fi
3796 AWK=$ac_cv_prog_AWK
3797 if test -n "$AWK"; then
3798   echo "$as_me:3798: result: $AWK" >&5
3799 echo "${ECHO_T}$AWK" >&6
3800 else
3801   echo "$as_me:3801: result: no" >&5
3802 echo "${ECHO_T}no" >&6
3803 fi
3804
3805   test -n "$AWK" && break
3806 done
3807
3808 test -z "$AWK" && { { echo "$as_me:3808: error: No awk program found" >&5
3809 echo "$as_me: error: No awk program found" >&2;}
3810    { (exit 1); exit 1; }; }
3811
3812 # Find a good install program.  We prefer a C program (faster),
3813 # so one script is as good as another.  But avoid the broken or
3814 # incompatible versions:
3815 # SysV /etc/install, /usr/sbin/install
3816 # SunOS /usr/etc/install
3817 # IRIX /sbin/install
3818 # AIX /bin/install
3819 # AmigaOS /C/install, which installs bootblocks on floppy discs
3820 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3821 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3822 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3823 # ./install, which can be erroneously created by make from ./install.sh.
3824 echo "$as_me:3824: checking for a BSD compatible install" >&5
3825 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3826 if test -z "$INSTALL"; then
3827 if test "${ac_cv_path_install+set}" = set; then
3828   echo $ECHO_N "(cached) $ECHO_C" >&6
3829 else
3830     ac_save_IFS=$IFS; IFS=$ac_path_separator
3831   for ac_dir in $PATH; do
3832     IFS=$ac_save_IFS
3833     # Account for people who put trailing slashes in PATH elements.
3834     case $ac_dir/ in
3835     / | ./ | .// | /cC/* \
3836     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3837     | /usr/ucb/* ) ;;
3838     *)
3839       # OSF1 and SCO ODT 3.0 have their own names for install.
3840       # Don't use installbsd from OSF since it installs stuff as root
3841       # by default.
3842       for ac_prog in ginstall scoinst install; do
3843         if $as_executable_p "$ac_dir/$ac_prog"; then
3844           if test $ac_prog = install &&
3845             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3846             # AIX install.  It has an incompatible calling convention.
3847             :
3848           elif test $ac_prog = install &&
3849             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3850             # program-specific install script used by HP pwplus--don't use.
3851             :
3852           else
3853             ac_cv_path_install="$ac_dir/$ac_prog -c"
3854             break 2
3855           fi
3856         fi
3857       done
3858       ;;
3859     esac
3860   done
3861
3862 fi
3863   if test "${ac_cv_path_install+set}" = set; then
3864     INSTALL=$ac_cv_path_install
3865   else
3866     # As a last resort, use the slow shell script.  We don't cache a
3867     # path for INSTALL within a source directory, because that will
3868     # break other packages using the cache if that directory is
3869     # removed, or if the path is relative.
3870     INSTALL=$ac_install_sh
3871   fi
3872 fi
3873 echo "$as_me:3873: result: $INSTALL" >&5
3874 echo "${ECHO_T}$INSTALL" >&6
3875
3876 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3877 # It thinks the first close brace ends the variable substitution.
3878 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3879
3880 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3881
3882 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3883
3884 case $INSTALL in
3885 (/*)
3886         ;;
3887 (*)
3888         cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
3889         test -z "$cf_dir" && cf_dir=.
3890         INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
3891         ;;
3892 esac
3893
3894 for ac_prog in lint cppcheck splint
3895 do
3896   # Extract the first word of "$ac_prog", so it can be a program name with args.
3897 set dummy $ac_prog; ac_word=$2
3898 echo "$as_me:3898: checking for $ac_word" >&5
3899 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3900 if test "${ac_cv_prog_LINT+set}" = set; then
3901   echo $ECHO_N "(cached) $ECHO_C" >&6
3902 else
3903   if test -n "$LINT"; then
3904   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3905 else
3906   ac_save_IFS=$IFS; IFS=$ac_path_separator
3907 ac_dummy="$PATH"
3908 for ac_dir in $ac_dummy; do
3909   IFS=$ac_save_IFS
3910   test -z "$ac_dir" && ac_dir=.
3911   $as_executable_p "$ac_dir/$ac_word" || continue
3912 ac_cv_prog_LINT="$ac_prog"
3913 echo "$as_me:3913: found $ac_dir/$ac_word" >&5
3914 break
3915 done
3916
3917 fi
3918 fi
3919 LINT=$ac_cv_prog_LINT
3920 if test -n "$LINT"; then
3921   echo "$as_me:3921: result: $LINT" >&5
3922 echo "${ECHO_T}$LINT" >&6
3923 else
3924   echo "$as_me:3924: result: no" >&5
3925 echo "${ECHO_T}no" >&6
3926 fi
3927
3928   test -n "$LINT" && break
3929 done
3930
3931 case "x$LINT" in
3932 (xcppcheck|x*/cppcheck)
3933         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3934         ;;
3935 esac
3936
3937 echo "$as_me:3937: checking whether ln -s works" >&5
3938 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3939 LN_S=$as_ln_s
3940 if test "$LN_S" = "ln -s"; then
3941   echo "$as_me:3941: result: yes" >&5
3942 echo "${ECHO_T}yes" >&6
3943 else
3944   echo "$as_me:3944: result: no, using $LN_S" >&5
3945 echo "${ECHO_T}no, using $LN_S" >&6
3946 fi
3947
3948 echo "$as_me:3948: checking if $LN_S -f options work" >&5
3949 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3950
3951 rm -f conf$$.src conf$$dst
3952 echo >conf$$.dst
3953 echo first >conf$$.src
3954 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3955         cf_prog_ln_sf=yes
3956 else
3957         cf_prog_ln_sf=no
3958 fi
3959 rm -f conf$$.dst conf$$src
3960 echo "$as_me:3960: result: $cf_prog_ln_sf" >&5
3961 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3962
3963 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3964
3965 echo "$as_me:3965: checking for long file names" >&5
3966 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3967 if test "${ac_cv_sys_long_file_names+set}" = set; then
3968   echo $ECHO_N "(cached) $ECHO_C" >&6
3969 else
3970   ac_cv_sys_long_file_names=yes
3971 # Test for long file names in all the places we know might matter:
3972 #      .                the current directory, where building will happen
3973 #      $prefix/lib      where we will be installing things
3974 #      $exec_prefix/lib likewise
3975 # eval it to expand exec_prefix.
3976 #      $TMPDIR          if set, where it might want to write temporary files
3977 # if $TMPDIR is not set:
3978 #      /tmp             where it might want to write temporary files
3979 #      /var/tmp         likewise
3980 #      /usr/tmp         likewise
3981 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3982   ac_tmpdirs=$TMPDIR
3983 else
3984   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3985 fi
3986 for ac_dir in  . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3987   test -d "$ac_dir" || continue
3988   test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3989   ac_xdir=$ac_dir/cf$$
3990   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3991   ac_tf1=$ac_xdir/conftest9012345
3992   ac_tf2=$ac_xdir/conftest9012346
3993   (echo 1 >"$ac_tf1") 2>/dev/null
3994   (echo 2 >"$ac_tf2") 2>/dev/null
3995   ac_val=`cat "$ac_tf1" 2>/dev/null`
3996   if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3997     ac_cv_sys_long_file_names=no
3998     rm -rf "$ac_xdir" 2>/dev/null
3999     break
4000   fi
4001   rm -rf "$ac_xdir" 2>/dev/null
4002 done
4003 fi
4004 echo "$as_me:4004: result: $ac_cv_sys_long_file_names" >&5
4005 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
4006 if test "$ac_cv_sys_long_file_names" = yes; then
4007
4008 cat >>confdefs.h <<\EOF
4009 #define HAVE_LONG_FILE_NAMES 1
4010 EOF
4011
4012 fi
4013
4014 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
4015 # of package conflict.
4016 cf_config_suffix=
4017
4018 # Check whether --with-config-suffix or --without-config-suffix was given.
4019 if test "${with_config_suffix+set}" = set; then
4020   withval="$with_config_suffix"
4021   case "x$withval" in
4022         (xyes|xno)
4023                 { echo "$as_me:4023: WARNING: expected a value for config-suffix option" >&5
4024 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
4025                 ;;
4026         (*)     cf_config_suffix="$withval"
4027                 ;;
4028         esac
4029 fi;
4030
4031 # If we find pkg-config, check if we should install the ".pc" files.
4032
4033 echo "$as_me:4033: checking if you want to use pkg-config" >&5
4034 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4035
4036 # Check whether --with-pkg-config or --without-pkg-config was given.
4037 if test "${with_pkg_config+set}" = set; then
4038   withval="$with_pkg_config"
4039   cf_pkg_config=$withval
4040 else
4041   cf_pkg_config=yes
4042 fi;
4043 echo "$as_me:4043: result: $cf_pkg_config" >&5
4044 echo "${ECHO_T}$cf_pkg_config" >&6
4045
4046 case "$cf_pkg_config" in
4047 (no)
4048         PKG_CONFIG=none
4049         ;;
4050 (yes)
4051
4052 if test -n "$ac_tool_prefix"; then
4053   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4054 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4055 echo "$as_me:4055: checking for $ac_word" >&5
4056 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4057 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4058   echo $ECHO_N "(cached) $ECHO_C" >&6
4059 else
4060   case $PKG_CONFIG in
4061   [\\/]* | ?:[\\/]*)
4062   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4063   ;;
4064   *)
4065   ac_save_IFS=$IFS; IFS=$ac_path_separator
4066 ac_dummy="$PATH"
4067 for ac_dir in $ac_dummy; do
4068   IFS=$ac_save_IFS
4069   test -z "$ac_dir" && ac_dir=.
4070   if $as_executable_p "$ac_dir/$ac_word"; then
4071    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4072    echo "$as_me:4072: found $ac_dir/$ac_word" >&5
4073    break
4074 fi
4075 done
4076
4077   ;;
4078 esac
4079 fi
4080 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4081
4082 if test -n "$PKG_CONFIG"; then
4083   echo "$as_me:4083: result: $PKG_CONFIG" >&5
4084 echo "${ECHO_T}$PKG_CONFIG" >&6
4085 else
4086   echo "$as_me:4086: result: no" >&5
4087 echo "${ECHO_T}no" >&6
4088 fi
4089
4090 fi
4091 if test -z "$ac_cv_path_PKG_CONFIG"; then
4092   ac_pt_PKG_CONFIG=$PKG_CONFIG
4093   # Extract the first word of "pkg-config", so it can be a program name with args.
4094 set dummy pkg-config; ac_word=$2
4095 echo "$as_me:4095: checking for $ac_word" >&5
4096 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4097 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4098   echo $ECHO_N "(cached) $ECHO_C" >&6
4099 else
4100   case $ac_pt_PKG_CONFIG in
4101   [\\/]* | ?:[\\/]*)
4102   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4103   ;;
4104   *)
4105   ac_save_IFS=$IFS; IFS=$ac_path_separator
4106 ac_dummy="$PATH"
4107 for ac_dir in $ac_dummy; do
4108   IFS=$ac_save_IFS
4109   test -z "$ac_dir" && ac_dir=.
4110   if $as_executable_p "$ac_dir/$ac_word"; then
4111    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4112    echo "$as_me:4112: found $ac_dir/$ac_word" >&5
4113    break
4114 fi
4115 done
4116
4117   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4118   ;;
4119 esac
4120 fi
4121 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4122
4123 if test -n "$ac_pt_PKG_CONFIG"; then
4124   echo "$as_me:4124: result: $ac_pt_PKG_CONFIG" >&5
4125 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4126 else
4127   echo "$as_me:4127: result: no" >&5
4128 echo "${ECHO_T}no" >&6
4129 fi
4130
4131   PKG_CONFIG=$ac_pt_PKG_CONFIG
4132 else
4133   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4134 fi
4135
4136         ;;
4137 (*)
4138         PKG_CONFIG=$withval
4139         ;;
4140 esac
4141
4142 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4143 if test "$PKG_CONFIG" != none ; then
4144
4145 if test "x$prefix" != xNONE; then
4146         cf_path_syntax="$prefix"
4147 else
4148         cf_path_syntax="$ac_default_prefix"
4149 fi
4150
4151 case ".$PKG_CONFIG" in
4152 (.\$\(*\)*|.\'*\'*)
4153         ;;
4154 (..|./*|.\\*)
4155         ;;
4156 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4157         ;;
4158 (.\$\{*prefix\}*|.\$\{*dir\}*)
4159         eval PKG_CONFIG="$PKG_CONFIG"
4160         case ".$PKG_CONFIG" in
4161         (.NONE/*)
4162                 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4163                 ;;
4164         esac
4165         ;;
4166 (.no|.NONE/*)
4167         PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4168         ;;
4169 (*)
4170         { { echo "$as_me:4170: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4171 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4172    { (exit 1); exit 1; }; }
4173         ;;
4174 esac
4175
4176 elif test "x$cf_pkg_config" != xno ; then
4177         { echo "$as_me:4177: WARNING: pkg-config is not installed" >&5
4178 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4179 fi
4180
4181 case "$PKG_CONFIG" in
4182 (no|none|yes)
4183         echo "$as_me:4183: checking for pkg-config library directory" >&5
4184 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4185         ;;
4186 (*)
4187         echo "$as_me:4187: checking for $PKG_CONFIG library directory" >&5
4188 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
4189         ;;
4190 esac
4191
4192 # if $PKG_CONFIG_LIBDIR is set, try to use that
4193 if test -n "$PKG_CONFIG_PATH"; then
4194         cf_search_path=`echo "$PKG_CONFIG_PATH" | sed -e 's/:/ /g' -e 's,^[     ]*,,' -e 's,[   ]*$,,'`
4195 elif test -n "$PKG_CONFIG_LIBDIR"; then
4196         cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[   ]*,,' -e 's,[   ]*$,,'`
4197 else
4198         cf_search_path=auto
4199 fi
4200
4201 # if the option is used, let that override.  otherwise default to "libdir"
4202
4203 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4204 if test "${with_pkg_config_libdir+set}" = set; then
4205   withval="$with_pkg_config_libdir"
4206   cf_search_path=$withval
4207 else
4208   test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir
4209 fi;
4210
4211 case "x$cf_search_path" in
4212 (xlibdir)
4213         PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
4214         echo "$as_me:4214: result: $PKG_CONFIG_LIBDIR" >&5
4215 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4216         cf_search_path=
4217         ;;
4218 (x)
4219         ;;
4220 (x/*\ *)
4221         PKG_CONFIG_LIBDIR=
4222         ;;
4223 (x/*)
4224         PKG_CONFIG_LIBDIR="$cf_search_path"
4225         echo "$as_me:4225: result: $PKG_CONFIG_LIBDIR" >&5
4226 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4227         cf_search_path=
4228         ;;
4229 (xyes|xauto)
4230         echo "$as_me:4230: result: auto" >&5
4231 echo "${ECHO_T}auto" >&6
4232         cf_search_path=
4233         # Look for the library directory using the same prefix as the executable
4234         echo "$as_me:4234: checking for search-list" >&5
4235 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
4236         if test "x$PKG_CONFIG" != xnone
4237         then
4238                 # works for pkg-config since version 0.24 (2009)
4239                 # works for pkgconf since version 0.8.3 (2012)
4240                 for cf_pkg_program in \
4241                         `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
4242                         pkg-config \
4243                         pkgconf
4244                 do
4245                         cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
4246                         test -n "$cf_search_path" && break
4247                 done
4248
4249                 # works for pkg-config since import in 2005 of original 2001 HP code.
4250                 test -z "$cf_search_path" && \
4251                 cf_search_path=`
4252                 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
4253 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
4254         sub(\"^[^']*'\",\"\"); \
4255         sub(\"'.*\",\"\"); \
4256         printf \" %s\", \\$0; } \
4257 { next; } \
4258 "`
4259         fi
4260
4261         echo "$as_me:4261: result: $cf_search_path" >&5
4262 echo "${ECHO_T}$cf_search_path" >&6
4263         ;;
4264 (*)
4265         { { echo "$as_me:4265: error: Unexpected option value: $cf_search_path" >&5
4266 echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
4267    { (exit 1); exit 1; }; }
4268         ;;
4269 esac
4270
4271 if test -n "$cf_search_path"
4272 then
4273         echo "$as_me:4273: checking for first directory" >&5
4274 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
4275         cf_pkg_config_path=none
4276         for cf_config in $cf_search_path
4277         do
4278                 if test -d "$cf_config"
4279                 then
4280                         cf_pkg_config_path=$cf_config
4281                         break
4282                 fi
4283         done
4284         echo "$as_me:4284: result: $cf_pkg_config_path" >&5
4285 echo "${ECHO_T}$cf_pkg_config_path" >&6
4286
4287         if test "x$cf_pkg_config_path" != xnone ; then
4288                 # limit this to the first directory found
4289                 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
4290         fi
4291
4292         if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
4293         then
4294                 echo "$as_me:4294: checking for workaround" >&5
4295 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
4296                 if test "$prefix" = "NONE" ; then
4297                         cf_prefix="$ac_default_prefix"
4298                 else
4299                         cf_prefix="$prefix"
4300                 fi
4301                 eval cf_libdir=$libdir
4302                 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
4303                 cf_backup=
4304                 for cf_config in $cf_search_path
4305                 do
4306                         case $cf_config in
4307                         $cf_libdir/pkgconfig)
4308                                 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
4309                                 break
4310                                 ;;
4311                         *)
4312                                 test -z "$cf_backup" && cf_backup=$cf_config
4313                                 ;;
4314                         esac
4315                 done
4316                 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
4317                 echo "$as_me:4317: result: $PKG_CONFIG_LIBDIR" >&5
4318 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4319         fi
4320 fi
4321
4322 if test "x$PKG_CONFIG" != xnone
4323 then
4324         echo "$as_me:4324: checking if we should install .pc files for $PKG_CONFIG" >&5
4325 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4326 else
4327         echo "$as_me:4327: checking if we should install .pc files" >&5
4328 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4329 fi
4330
4331 # Check whether --enable-pc-files or --disable-pc-files was given.
4332 if test "${enable_pc_files+set}" = set; then
4333   enableval="$enable_pc_files"
4334   enable_pc_files=$enableval
4335 else
4336   enable_pc_files=no
4337 fi;
4338 echo "$as_me:4338: result: $enable_pc_files" >&5
4339 echo "${ECHO_T}$enable_pc_files" >&6
4340
4341 if test "x$enable_pc_files" != xno
4342 then
4343         MAKE_PC_FILES=
4344         case "x$PKG_CONFIG_LIBDIR" in
4345         (xno|xnone|xyes|x)
4346                 { echo "$as_me:4346: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4347 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4348                 ;;
4349         (*)
4350                 cf_pkg_config_libdir="$PKG_CONFIG_LIBDIR"
4351
4352 if test "x$prefix" != xNONE; then
4353         cf_path_syntax="$prefix"
4354 else
4355         cf_path_syntax="$ac_default_prefix"
4356 fi
4357
4358 case ".$cf_pkg_config_libdir" in
4359 (.\$\(*\)*|.\'*\'*)
4360         ;;
4361 (..|./*|.\\*)
4362         ;;
4363 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4364         ;;
4365 (.\$\{*prefix\}*|.\$\{*dir\}*)
4366         eval cf_pkg_config_libdir="$cf_pkg_config_libdir"
4367         case ".$cf_pkg_config_libdir" in
4368         (.NONE/*)
4369                 cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4370                 ;;
4371         esac
4372         ;;
4373 (.no|.NONE/*)
4374         cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4375         ;;
4376 (*)
4377         { { echo "$as_me:4377: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&5
4378 echo "$as_me: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&2;}
4379    { (exit 1); exit 1; }; }
4380         ;;
4381 esac
4382
4383                 ;;
4384         esac
4385 else
4386         MAKE_PC_FILES="#"
4387 fi
4388
4389 if test -z "$MAKE_PC_FILES"
4390 then
4391         echo "$as_me:4391: checking for suffix to add to pc-files" >&5
4392 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4393
4394 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4395 if test "${with_pc_suffix+set}" = set; then
4396   withval="$with_pc_suffix"
4397   case "x$withval" in
4398         (xyes|xno)
4399                 PC_MODULE_SUFFIX=
4400                 ;;
4401         (*)     PC_MODULE_SUFFIX="$withval"
4402                 ;;
4403         esac
4404 fi;
4405         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4406         echo "$as_me:4406: result: $PC_MODULE_SUFFIX" >&5
4407 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4408         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4409
4410 fi
4411
4412 echo "$as_me:4412: checking if we should assume mixed-case filenames" >&5
4413 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4414
4415 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4416 if test "${enable_mixed_case+set}" = set; then
4417   enableval="$enable_mixed_case"
4418   enable_mixedcase=$enableval
4419 else
4420   enable_mixedcase=auto
4421 fi;
4422 echo "$as_me:4422: result: $enable_mixedcase" >&5
4423 echo "${ECHO_T}$enable_mixedcase" >&6
4424 if test "$enable_mixedcase" = "auto" ; then
4425
4426 echo "$as_me:4426: checking if filesystem supports mixed-case filenames" >&5
4427 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4428 if test "${cf_cv_mixedcase+set}" = set; then
4429   echo $ECHO_N "(cached) $ECHO_C" >&6
4430 else
4431
4432 if test "$cross_compiling" = yes ; then
4433         case "$target_alias" in
4434         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4435                 cf_cv_mixedcase=no
4436                 ;;
4437         (*)
4438                 cf_cv_mixedcase=yes
4439                 ;;
4440         esac
4441 else
4442         rm -f conftest CONFTEST
4443         echo test >conftest
4444         if test -f CONFTEST ; then
4445                 cf_cv_mixedcase=no
4446         else
4447                 cf_cv_mixedcase=yes
4448         fi
4449         rm -f conftest CONFTEST
4450 fi
4451
4452 fi
4453 echo "$as_me:4453: result: $cf_cv_mixedcase" >&5
4454 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4455 test "$cf_cv_mixedcase" = yes &&
4456 cat >>confdefs.h <<\EOF
4457 #define MIXEDCASE_FILENAMES 1
4458 EOF
4459
4460 else
4461         cf_cv_mixedcase=$enable_mixedcase
4462         if test "x$enable_mixedcase" = "xyes" ; then
4463
4464 cat >>confdefs.h <<\EOF
4465 #define MIXEDCASE_FILENAMES 1
4466 EOF
4467
4468         fi
4469 fi
4470
4471 # do this after mixed-case option (tags/TAGS is not as important as tic).
4472 echo "$as_me:4472: checking whether ${MAKE-make} sets \${MAKE}" >&5
4473 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4474 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4475 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4476   echo $ECHO_N "(cached) $ECHO_C" >&6
4477 else
4478   cat >conftest.make <<\EOF
4479 all:
4480         @echo 'ac_maketemp="${MAKE}"'
4481 EOF
4482 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4483 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4484 if test -n "$ac_maketemp"; then
4485   eval ac_cv_prog_make_${ac_make}_set=yes
4486 else
4487   eval ac_cv_prog_make_${ac_make}_set=no
4488 fi
4489 rm -f conftest.make
4490 fi
4491 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4492   echo "$as_me:4492: result: yes" >&5
4493 echo "${ECHO_T}yes" >&6
4494   SET_MAKE=
4495 else
4496   echo "$as_me:4496: result: no" >&5
4497 echo "${ECHO_T}no" >&6
4498   SET_MAKE="MAKE=${MAKE-make}"
4499 fi
4500
4501 echo "$as_me:4501: checking for \".PHONY\" make-support" >&5
4502 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
4503 if test "${cf_cv_make_PHONY+set}" = set; then
4504   echo $ECHO_N "(cached) $ECHO_C" >&6
4505 else
4506
4507         rm -rf conftest*
4508         (
4509                 mkdir conftest || exit 1
4510                 cd conftest
4511                 cat >makefile <<'CF_EOF'
4512 .PHONY: always
4513 DATA=0
4514 always: always.out
4515         @echo "** making $@ $(DATA)"
4516 once: once.out
4517         @echo "** making $@ $(DATA)"
4518 always.out:
4519         @echo "** making $@ $(DATA)"
4520         echo $(DATA) > $@
4521 once.out:
4522         @echo "** making $@ $(DATA)"
4523         echo $(DATA) > $@
4524 CF_EOF
4525                 for cf_data in 1 2 3
4526                 do
4527                         ${MAKE:-make} always DATA=$cf_data
4528                         ${MAKE:-make} once   DATA=$cf_data
4529                         ${MAKE:-make} -t always once
4530                         if test -f always ; then
4531                                 echo "no (case 1)" > ../conftest.tmp
4532                         elif test ! -f always.out ; then
4533                                 echo "no (case 2)" > ../conftest.tmp
4534                         elif test ! -f once.out ; then
4535                                 echo "no (case 3)" > ../conftest.tmp
4536                         elif ! cmp -s always.out once.out ; then
4537                                 echo "no (case 4)" > ../conftest.tmp
4538                                 diff always.out once.out
4539                         else
4540                                 cf_check="`cat always.out`"
4541                                 if test "x$cf_check" != "x$cf_data" ; then
4542                                         echo "no (case 5)" > ../conftest.tmp
4543                                 else
4544                                         echo yes > ../conftest.tmp
4545                                         rm -f ./*.out
4546                                         continue
4547                                 fi
4548                         fi
4549                         break
4550                 done
4551         ) >&5 2>&1
4552         cf_cv_make_PHONY="`cat conftest.tmp`"
4553         rm -rf conftest*
4554
4555 fi
4556 echo "$as_me:4556: result: $cf_cv_make_PHONY" >&5
4557 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
4558 MAKE_NO_PHONY="#"
4559 MAKE_PHONY="#"
4560 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
4561 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
4562
4563 for ac_prog in exctags ctags
4564 do
4565   # Extract the first word of "$ac_prog", so it can be a program name with args.
4566 set dummy $ac_prog; ac_word=$2
4567 echo "$as_me:4567: checking for $ac_word" >&5
4568 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4569 if test "${ac_cv_prog_CTAGS+set}" = set; then
4570   echo $ECHO_N "(cached) $ECHO_C" >&6
4571 else
4572   if test -n "$CTAGS"; then
4573   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4574 else
4575   ac_save_IFS=$IFS; IFS=$ac_path_separator
4576 ac_dummy="$PATH"
4577 for ac_dir in $ac_dummy; do
4578   IFS=$ac_save_IFS
4579   test -z "$ac_dir" && ac_dir=.
4580   $as_executable_p "$ac_dir/$ac_word" || continue
4581 ac_cv_prog_CTAGS="$ac_prog"
4582 echo "$as_me:4582: found $ac_dir/$ac_word" >&5
4583 break
4584 done
4585
4586 fi
4587 fi
4588 CTAGS=$ac_cv_prog_CTAGS
4589 if test -n "$CTAGS"; then
4590   echo "$as_me:4590: result: $CTAGS" >&5
4591 echo "${ECHO_T}$CTAGS" >&6
4592 else
4593   echo "$as_me:4593: result: no" >&5
4594 echo "${ECHO_T}no" >&6
4595 fi
4596
4597   test -n "$CTAGS" && break
4598 done
4599
4600 for ac_prog in exetags etags
4601 do
4602   # Extract the first word of "$ac_prog", so it can be a program name with args.
4603 set dummy $ac_prog; ac_word=$2
4604 echo "$as_me:4604: checking for $ac_word" >&5
4605 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4606 if test "${ac_cv_prog_ETAGS+set}" = set; then
4607   echo $ECHO_N "(cached) $ECHO_C" >&6
4608 else
4609   if test -n "$ETAGS"; then
4610   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4611 else
4612   ac_save_IFS=$IFS; IFS=$ac_path_separator
4613 ac_dummy="$PATH"
4614 for ac_dir in $ac_dummy; do
4615   IFS=$ac_save_IFS
4616   test -z "$ac_dir" && ac_dir=.
4617   $as_executable_p "$ac_dir/$ac_word" || continue
4618 ac_cv_prog_ETAGS="$ac_prog"
4619 echo "$as_me:4619: found $ac_dir/$ac_word" >&5
4620 break
4621 done
4622
4623 fi
4624 fi
4625 ETAGS=$ac_cv_prog_ETAGS
4626 if test -n "$ETAGS"; then
4627   echo "$as_me:4627: result: $ETAGS" >&5
4628 echo "${ECHO_T}$ETAGS" >&6
4629 else
4630   echo "$as_me:4630: result: no" >&5
4631 echo "${ECHO_T}no" >&6
4632 fi
4633
4634   test -n "$ETAGS" && break
4635 done
4636
4637 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4638 set dummy ${CTAGS:-ctags}; ac_word=$2
4639 echo "$as_me:4639: checking for $ac_word" >&5
4640 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4641 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4642   echo $ECHO_N "(cached) $ECHO_C" >&6
4643 else
4644   if test -n "$MAKE_LOWER_TAGS"; then
4645   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4646 else
4647   ac_save_IFS=$IFS; IFS=$ac_path_separator
4648 ac_dummy="$PATH"
4649 for ac_dir in $ac_dummy; do
4650   IFS=$ac_save_IFS
4651   test -z "$ac_dir" && ac_dir=.
4652   $as_executable_p "$ac_dir/$ac_word" || continue
4653 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4654 echo "$as_me:4654: found $ac_dir/$ac_word" >&5
4655 break
4656 done
4657
4658   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4659 fi
4660 fi
4661 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4662 if test -n "$MAKE_LOWER_TAGS"; then
4663   echo "$as_me:4663: result: $MAKE_LOWER_TAGS" >&5
4664 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4665 else
4666   echo "$as_me:4666: result: no" >&5
4667 echo "${ECHO_T}no" >&6
4668 fi
4669
4670 if test "$cf_cv_mixedcase" = yes ; then
4671         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4672 set dummy ${ETAGS:-etags}; ac_word=$2
4673 echo "$as_me:4673: checking for $ac_word" >&5
4674 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4675 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4676   echo $ECHO_N "(cached) $ECHO_C" >&6
4677 else
4678   if test -n "$MAKE_UPPER_TAGS"; then
4679   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4680 else
4681   ac_save_IFS=$IFS; IFS=$ac_path_separator
4682 ac_dummy="$PATH"
4683 for ac_dir in $ac_dummy; do
4684   IFS=$ac_save_IFS
4685   test -z "$ac_dir" && ac_dir=.
4686   $as_executable_p "$ac_dir/$ac_word" || continue
4687 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4688 echo "$as_me:4688: found $ac_dir/$ac_word" >&5
4689 break
4690 done
4691
4692   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4693 fi
4694 fi
4695 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4696 if test -n "$MAKE_UPPER_TAGS"; then
4697   echo "$as_me:4697: result: $MAKE_UPPER_TAGS" >&5
4698 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4699 else
4700   echo "$as_me:4700: result: no" >&5
4701 echo "${ECHO_T}no" >&6
4702 fi
4703
4704 else
4705         MAKE_UPPER_TAGS=no
4706 fi
4707
4708 if test "$MAKE_UPPER_TAGS" = yes ; then
4709         MAKE_UPPER_TAGS=
4710 else
4711         MAKE_UPPER_TAGS="#"
4712 fi
4713
4714 if test "$MAKE_LOWER_TAGS" = yes ; then
4715         MAKE_LOWER_TAGS=
4716 else
4717         MAKE_LOWER_TAGS="#"
4718 fi
4719
4720 echo "$as_me:4720: checking for makeflags variable" >&5
4721 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4722 if test "${cf_cv_makeflags+set}" = set; then
4723   echo $ECHO_N "(cached) $ECHO_C" >&6
4724 else
4725
4726         cf_cv_makeflags=''
4727         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4728         do
4729                 cat >cf_makeflags.tmp <<CF_EOF
4730 SHELL = $SHELL
4731 all :
4732         @ echo '.$cf_option'
4733 CF_EOF
4734                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4735                 case "$cf_result" in
4736                 (.*k|.*kw)
4737                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4738                         case "$cf_result" in
4739                         (.*CC=*)        cf_cv_makeflags=
4740                                 ;;
4741                         (*)     cf_cv_makeflags=$cf_option
4742                                 ;;
4743                         esac
4744                         break
4745                         ;;
4746                 (.-)
4747                         ;;
4748                 (*)
4749
4750 echo "${as_me:-configure}:4750: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4751
4752                         ;;
4753                 esac
4754         done
4755         rm -f cf_makeflags.tmp
4756
4757 fi
4758 echo "$as_me:4758: result: $cf_cv_makeflags" >&5
4759 echo "${ECHO_T}$cf_cv_makeflags" >&6
4760
4761 if test -n "$ac_tool_prefix"; then
4762   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4763 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4764 echo "$as_me:4764: checking for $ac_word" >&5
4765 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4766 if test "${ac_cv_prog_RANLIB+set}" = set; then
4767   echo $ECHO_N "(cached) $ECHO_C" >&6
4768 else
4769   if test -n "$RANLIB"; then
4770   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4771 else
4772   ac_save_IFS=$IFS; IFS=$ac_path_separator
4773 ac_dummy="$PATH"
4774 for ac_dir in $ac_dummy; do
4775   IFS=$ac_save_IFS
4776   test -z "$ac_dir" && ac_dir=.
4777   $as_executable_p "$ac_dir/$ac_word" || continue
4778 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4779 echo "$as_me:4779: found $ac_dir/$ac_word" >&5
4780 break
4781 done
4782
4783 fi
4784 fi
4785 RANLIB=$ac_cv_prog_RANLIB
4786 if test -n "$RANLIB"; then
4787   echo "$as_me:4787: result: $RANLIB" >&5
4788 echo "${ECHO_T}$RANLIB" >&6
4789 else
4790   echo "$as_me:4790: result: no" >&5
4791 echo "${ECHO_T}no" >&6
4792 fi
4793
4794 fi
4795 if test -z "$ac_cv_prog_RANLIB"; then
4796   ac_ct_RANLIB=$RANLIB
4797   # Extract the first word of "ranlib", so it can be a program name with args.
4798 set dummy ranlib; ac_word=$2
4799 echo "$as_me:4799: checking for $ac_word" >&5
4800 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4801 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4802   echo $ECHO_N "(cached) $ECHO_C" >&6
4803 else
4804   if test -n "$ac_ct_RANLIB"; then
4805   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4806 else
4807   ac_save_IFS=$IFS; IFS=$ac_path_separator
4808 ac_dummy="$PATH"
4809 for ac_dir in $ac_dummy; do
4810   IFS=$ac_save_IFS
4811   test -z "$ac_dir" && ac_dir=.
4812   $as_executable_p "$ac_dir/$ac_word" || continue
4813 ac_cv_prog_ac_ct_RANLIB="ranlib"
4814 echo "$as_me:4814: found $ac_dir/$ac_word" >&5
4815 break
4816 done
4817
4818   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4819 fi
4820 fi
4821 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4822 if test -n "$ac_ct_RANLIB"; then
4823   echo "$as_me:4823: result: $ac_ct_RANLIB" >&5
4824 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4825 else
4826   echo "$as_me:4826: result: no" >&5
4827 echo "${ECHO_T}no" >&6
4828 fi
4829
4830   RANLIB=$ac_ct_RANLIB
4831 else
4832   RANLIB="$ac_cv_prog_RANLIB"
4833 fi
4834
4835 if test -n "$ac_tool_prefix"; then
4836   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4837 set dummy ${ac_tool_prefix}ld; ac_word=$2
4838 echo "$as_me:4838: checking for $ac_word" >&5
4839 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4840 if test "${ac_cv_prog_LD+set}" = set; then
4841   echo $ECHO_N "(cached) $ECHO_C" >&6
4842 else
4843   if test -n "$LD"; then
4844   ac_cv_prog_LD="$LD" # Let the user override the test.
4845 else
4846   ac_save_IFS=$IFS; IFS=$ac_path_separator
4847 ac_dummy="$PATH"
4848 for ac_dir in $ac_dummy; do
4849   IFS=$ac_save_IFS
4850   test -z "$ac_dir" && ac_dir=.
4851   $as_executable_p "$ac_dir/$ac_word" || continue
4852 ac_cv_prog_LD="${ac_tool_prefix}ld"
4853 echo "$as_me:4853: found $ac_dir/$ac_word" >&5
4854 break
4855 done
4856
4857 fi
4858 fi
4859 LD=$ac_cv_prog_LD
4860 if test -n "$LD"; then
4861   echo "$as_me:4861: result: $LD" >&5
4862 echo "${ECHO_T}$LD" >&6
4863 else
4864   echo "$as_me:4864: result: no" >&5
4865 echo "${ECHO_T}no" >&6
4866 fi
4867
4868 fi
4869 if test -z "$ac_cv_prog_LD"; then
4870   ac_ct_LD=$LD
4871   # Extract the first word of "ld", so it can be a program name with args.
4872 set dummy ld; ac_word=$2
4873 echo "$as_me:4873: checking for $ac_word" >&5
4874 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4875 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4876   echo $ECHO_N "(cached) $ECHO_C" >&6
4877 else
4878   if test -n "$ac_ct_LD"; then
4879   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4880 else
4881   ac_save_IFS=$IFS; IFS=$ac_path_separator
4882 ac_dummy="$PATH"
4883 for ac_dir in $ac_dummy; do
4884   IFS=$ac_save_IFS
4885   test -z "$ac_dir" && ac_dir=.
4886   $as_executable_p "$ac_dir/$ac_word" || continue
4887 ac_cv_prog_ac_ct_LD="ld"
4888 echo "$as_me:4888: found $ac_dir/$ac_word" >&5
4889 break
4890 done
4891
4892   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4893 fi
4894 fi
4895 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4896 if test -n "$ac_ct_LD"; then
4897   echo "$as_me:4897: result: $ac_ct_LD" >&5
4898 echo "${ECHO_T}$ac_ct_LD" >&6
4899 else
4900   echo "$as_me:4900: result: no" >&5
4901 echo "${ECHO_T}no" >&6
4902 fi
4903
4904   LD=$ac_ct_LD
4905 else
4906   LD="$ac_cv_prog_LD"
4907 fi
4908
4909 if test -n "$ac_tool_prefix"; then
4910   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4911 set dummy ${ac_tool_prefix}ar; ac_word=$2
4912 echo "$as_me:4912: checking for $ac_word" >&5
4913 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4914 if test "${ac_cv_prog_AR+set}" = set; then
4915   echo $ECHO_N "(cached) $ECHO_C" >&6
4916 else
4917   if test -n "$AR"; then
4918   ac_cv_prog_AR="$AR" # Let the user override the test.
4919 else
4920   ac_save_IFS=$IFS; IFS=$ac_path_separator
4921 ac_dummy="$PATH"
4922 for ac_dir in $ac_dummy; do
4923   IFS=$ac_save_IFS
4924   test -z "$ac_dir" && ac_dir=.
4925   $as_executable_p "$ac_dir/$ac_word" || continue
4926 ac_cv_prog_AR="${ac_tool_prefix}ar"
4927 echo "$as_me:4927: found $ac_dir/$ac_word" >&5
4928 break
4929 done
4930
4931 fi
4932 fi
4933 AR=$ac_cv_prog_AR
4934 if test -n "$AR"; then
4935   echo "$as_me:4935: result: $AR" >&5
4936 echo "${ECHO_T}$AR" >&6
4937 else
4938   echo "$as_me:4938: result: no" >&5
4939 echo "${ECHO_T}no" >&6
4940 fi
4941
4942 fi
4943 if test -z "$ac_cv_prog_AR"; then
4944   ac_ct_AR=$AR
4945   # Extract the first word of "ar", so it can be a program name with args.
4946 set dummy ar; ac_word=$2
4947 echo "$as_me:4947: checking for $ac_word" >&5
4948 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4949 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4950   echo $ECHO_N "(cached) $ECHO_C" >&6
4951 else
4952   if test -n "$ac_ct_AR"; then
4953   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4954 else
4955   ac_save_IFS=$IFS; IFS=$ac_path_separator
4956 ac_dummy="$PATH"
4957 for ac_dir in $ac_dummy; do
4958   IFS=$ac_save_IFS
4959   test -z "$ac_dir" && ac_dir=.
4960   $as_executable_p "$ac_dir/$ac_word" || continue
4961 ac_cv_prog_ac_ct_AR="ar"
4962 echo "$as_me:4962: found $ac_dir/$ac_word" >&5
4963 break
4964 done
4965
4966   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4967 fi
4968 fi
4969 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4970 if test -n "$ac_ct_AR"; then
4971   echo "$as_me:4971: result: $ac_ct_AR" >&5
4972 echo "${ECHO_T}$ac_ct_AR" >&6
4973 else
4974   echo "$as_me:4974: result: no" >&5
4975 echo "${ECHO_T}no" >&6
4976 fi
4977
4978   AR=$ac_ct_AR
4979 else
4980   AR="$ac_cv_prog_AR"
4981 fi
4982
4983 if test -n "$ac_tool_prefix"; then
4984   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4985 set dummy ${ac_tool_prefix}nm; ac_word=$2
4986 echo "$as_me:4986: checking for $ac_word" >&5
4987 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4988 if test "${ac_cv_prog_NM+set}" = set; then
4989   echo $ECHO_N "(cached) $ECHO_C" >&6
4990 else
4991   if test -n "$NM"; then
4992   ac_cv_prog_NM="$NM" # Let the user override the test.
4993 else
4994   ac_save_IFS=$IFS; IFS=$ac_path_separator
4995 ac_dummy="$PATH"
4996 for ac_dir in $ac_dummy; do
4997   IFS=$ac_save_IFS
4998   test -z "$ac_dir" && ac_dir=.
4999   $as_executable_p "$ac_dir/$ac_word" || continue
5000 ac_cv_prog_NM="${ac_tool_prefix}nm"
5001 echo "$as_me:5001: found $ac_dir/$ac_word" >&5
5002 break
5003 done
5004
5005 fi
5006 fi
5007 NM=$ac_cv_prog_NM
5008 if test -n "$NM"; then
5009   echo "$as_me:5009: result: $NM" >&5
5010 echo "${ECHO_T}$NM" >&6
5011 else
5012   echo "$as_me:5012: result: no" >&5
5013 echo "${ECHO_T}no" >&6
5014 fi
5015
5016 fi
5017 if test -z "$ac_cv_prog_NM"; then
5018   ac_ct_NM=$NM
5019   # Extract the first word of "nm", so it can be a program name with args.
5020 set dummy nm; ac_word=$2
5021 echo "$as_me:5021: checking for $ac_word" >&5
5022 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5023 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
5024   echo $ECHO_N "(cached) $ECHO_C" >&6
5025 else
5026   if test -n "$ac_ct_NM"; then
5027   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
5028 else
5029   ac_save_IFS=$IFS; IFS=$ac_path_separator
5030 ac_dummy="$PATH"
5031 for ac_dir in $ac_dummy; do
5032   IFS=$ac_save_IFS
5033   test -z "$ac_dir" && ac_dir=.
5034   $as_executable_p "$ac_dir/$ac_word" || continue
5035 ac_cv_prog_ac_ct_NM="nm"
5036 echo "$as_me:5036: found $ac_dir/$ac_word" >&5
5037 break
5038 done
5039
5040   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
5041 fi
5042 fi
5043 ac_ct_NM=$ac_cv_prog_ac_ct_NM
5044 if test -n "$ac_ct_NM"; then
5045   echo "$as_me:5045: result: $ac_ct_NM" >&5
5046 echo "${ECHO_T}$ac_ct_NM" >&6
5047 else
5048   echo "$as_me:5048: result: no" >&5
5049 echo "${ECHO_T}no" >&6
5050 fi
5051
5052   NM=$ac_ct_NM
5053 else
5054   NM="$ac_cv_prog_NM"
5055 fi
5056
5057 if test -n "$ac_tool_prefix"; then
5058   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5059 set dummy ${ac_tool_prefix}ar; ac_word=$2
5060 echo "$as_me:5060: checking for $ac_word" >&5
5061 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5062 if test "${ac_cv_prog_AR+set}" = set; then
5063   echo $ECHO_N "(cached) $ECHO_C" >&6
5064 else
5065   if test -n "$AR"; then
5066   ac_cv_prog_AR="$AR" # Let the user override the test.
5067 else
5068   ac_save_IFS=$IFS; IFS=$ac_path_separator
5069 ac_dummy="$PATH"
5070 for ac_dir in $ac_dummy; do
5071   IFS=$ac_save_IFS
5072   test -z "$ac_dir" && ac_dir=.
5073   $as_executable_p "$ac_dir/$ac_word" || continue
5074 ac_cv_prog_AR="${ac_tool_prefix}ar"
5075 echo "$as_me:5075: found $ac_dir/$ac_word" >&5
5076 break
5077 done
5078
5079 fi
5080 fi
5081 AR=$ac_cv_prog_AR
5082 if test -n "$AR"; then
5083   echo "$as_me:5083: result: $AR" >&5
5084 echo "${ECHO_T}$AR" >&6
5085 else
5086   echo "$as_me:5086: result: no" >&5
5087 echo "${ECHO_T}no" >&6
5088 fi
5089
5090 fi
5091 if test -z "$ac_cv_prog_AR"; then
5092   ac_ct_AR=$AR
5093   # Extract the first word of "ar", so it can be a program name with args.
5094 set dummy ar; ac_word=$2
5095 echo "$as_me:5095: checking for $ac_word" >&5
5096 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5097 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
5098   echo $ECHO_N "(cached) $ECHO_C" >&6
5099 else
5100   if test -n "$ac_ct_AR"; then
5101   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5102 else
5103   ac_save_IFS=$IFS; IFS=$ac_path_separator
5104 ac_dummy="$PATH"
5105 for ac_dir in $ac_dummy; do
5106   IFS=$ac_save_IFS
5107   test -z "$ac_dir" && ac_dir=.
5108   $as_executable_p "$ac_dir/$ac_word" || continue
5109 ac_cv_prog_ac_ct_AR="ar"
5110 echo "$as_me:5110: found $ac_dir/$ac_word" >&5
5111 break
5112 done
5113
5114   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5115 fi
5116 fi
5117 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5118 if test -n "$ac_ct_AR"; then
5119   echo "$as_me:5119: result: $ac_ct_AR" >&5
5120 echo "${ECHO_T}$ac_ct_AR" >&6
5121 else
5122   echo "$as_me:5122: result: no" >&5
5123 echo "${ECHO_T}no" >&6
5124 fi
5125
5126   AR=$ac_ct_AR
5127 else
5128   AR="$ac_cv_prog_AR"
5129 fi
5130
5131 echo "$as_me:5131: checking for options to update archives" >&5
5132 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
5133 if test "${cf_cv_ar_flags+set}" = set; then
5134   echo $ECHO_N "(cached) $ECHO_C" >&6
5135 else
5136
5137         case "$cf_cv_system_name" in
5138         (*-msvc*)
5139                 cf_cv_ar_flags=''
5140                 cat >mk_static_lib.sh <<-EOF
5141                 #!$SHELL
5142                 MSVC_BIN="$AR"
5143                 out="\$1"
5144                 shift
5145                 exec \$MSVC_BIN -out:"\$out" \$@
5146                 EOF
5147                 chmod +x mk_static_lib.sh
5148                 AR=`pwd`/mk_static_lib.sh
5149                 ;;
5150         (*)
5151                 cf_cv_ar_flags=unknown
5152                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
5153                 do
5154
5155                         # check if $ARFLAGS already contains this choice
5156                         if test "x$ARFLAGS" != "x" ; then
5157                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
5158                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
5159                                         cf_cv_ar_flags=
5160                                         break
5161                                 fi
5162                         fi
5163
5164                         rm -f "conftest.$ac_cv_objext"
5165                         rm -f conftest.a
5166
5167                         cat >"conftest.$ac_ext" <<EOF
5168 #line 5168 "configure"
5169 int     testdata[3] = { 123, 456, 789 };
5170 EOF
5171                         if { (eval echo "$as_me:5171: \"$ac_compile\"") >&5
5172   (eval $ac_compile) 2>&5
5173   ac_status=$?
5174   echo "$as_me:5174: \$? = $ac_status" >&5
5175   (exit "$ac_status"); } ; then
5176                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5177                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5178                                 if test -f conftest.a ; then
5179                                         cf_cv_ar_flags="$cf_ar_flags"
5180                                         break
5181                                 fi
5182                         else
5183                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5184
5185 echo "${as_me:-configure}:5185: testing cannot compile test-program ..." 1>&5
5186
5187                                 break
5188                         fi
5189                 done
5190                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5191                 ;;
5192         esac
5193
5194 fi
5195 echo "$as_me:5195: result: $cf_cv_ar_flags" >&5
5196 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5197
5198 if test -n "$ARFLAGS" ; then
5199         if test -n "$cf_cv_ar_flags" ; then
5200                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5201         fi
5202 else
5203         ARFLAGS=$cf_cv_ar_flags
5204 fi
5205
5206 echo "$as_me:5206: checking if you have specified an install-prefix" >&5
5207 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
5208
5209 # Check whether --with-install-prefix or --without-install-prefix was given.
5210 if test "${with_install_prefix+set}" = set; then
5211   withval="$with_install_prefix"
5212   case "x$withval" in
5213         (xyes|xno)
5214                 ;;
5215         (*)     DESTDIR="$withval"
5216                 ;;
5217         esac
5218 fi;
5219 echo "$as_me:5219: result: $DESTDIR" >&5
5220 echo "${ECHO_T}$DESTDIR" >&6
5221
5222 ###############################################################################
5223
5224 # If we're cross-compiling, allow the user to override the tools and their
5225 # options.  The configure script is oriented toward identifying the host
5226 # compiler, etc., but we need a build compiler to generate parts of the source.
5227
5228 case "$cf_cv_system_name" in
5229 (*-msvc*)
5230         LDFLAGS="$LDFLAGS user32.lib"
5231         export LDFLAGS
5232         ;;
5233 esac
5234
5235 if test "$cross_compiling" = yes ; then
5236
5237         # defaults that we might want to override
5238         : ${BUILD_CFLAGS:=''}
5239         : ${BUILD_CPPFLAGS:=''}
5240         : ${BUILD_LDFLAGS:=''}
5241         : ${BUILD_LIBS:=''}
5242         : ${BUILD_EXEEXT:='$x'}
5243         : ${BUILD_OBJEXT:='o'}
5244
5245 # Check whether --with-build-cc or --without-build-cc was given.
5246 if test "${with_build_cc+set}" = set; then
5247   withval="$with_build_cc"
5248   BUILD_CC="$withval"
5249 else
5250   for ac_prog in gcc clang c99 c89 cc cl
5251 do
5252   # Extract the first word of "$ac_prog", so it can be a program name with args.
5253 set dummy $ac_prog; ac_word=$2
5254 echo "$as_me:5254: checking for $ac_word" >&5
5255 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5256 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5257   echo $ECHO_N "(cached) $ECHO_C" >&6
5258 else
5259   if test -n "$BUILD_CC"; then
5260   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5261 else
5262   ac_save_IFS=$IFS; IFS=$ac_path_separator
5263 ac_dummy="$PATH"
5264 for ac_dir in $ac_dummy; do
5265   IFS=$ac_save_IFS
5266   test -z "$ac_dir" && ac_dir=.
5267   $as_executable_p "$ac_dir/$ac_word" || continue
5268 ac_cv_prog_BUILD_CC="$ac_prog"
5269 echo "$as_me:5269: found $ac_dir/$ac_word" >&5
5270 break
5271 done
5272
5273 fi
5274 fi
5275 BUILD_CC=$ac_cv_prog_BUILD_CC
5276 if test -n "$BUILD_CC"; then
5277   echo "$as_me:5277: result: $BUILD_CC" >&5
5278 echo "${ECHO_T}$BUILD_CC" >&6
5279 else
5280   echo "$as_me:5280: result: no" >&5
5281 echo "${ECHO_T}no" >&6
5282 fi
5283
5284   test -n "$BUILD_CC" && break
5285 done
5286 test -n "$BUILD_CC" || BUILD_CC="none"
5287
5288 fi;
5289         echo "$as_me:5289: checking for native build C compiler" >&5
5290 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5291         echo "$as_me:5291: result: $BUILD_CC" >&5
5292 echo "${ECHO_T}$BUILD_CC" >&6
5293
5294         echo "$as_me:5294: checking for native build C preprocessor" >&5
5295 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5296
5297 # Check whether --with-build-cpp or --without-build-cpp was given.
5298 if test "${with_build_cpp+set}" = set; then
5299   withval="$with_build_cpp"
5300   BUILD_CPP="$withval"
5301 else
5302   BUILD_CPP='${BUILD_CC} -E'
5303 fi;
5304         echo "$as_me:5304: result: $BUILD_CPP" >&5
5305 echo "${ECHO_T}$BUILD_CPP" >&6
5306
5307         echo "$as_me:5307: checking for native build C flags" >&5
5308 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5309
5310 # Check whether --with-build-cflags or --without-build-cflags was given.
5311 if test "${with_build_cflags+set}" = set; then
5312   withval="$with_build_cflags"
5313   BUILD_CFLAGS="$withval"
5314 fi;
5315         echo "$as_me:5315: result: $BUILD_CFLAGS" >&5
5316 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5317
5318         echo "$as_me:5318: checking for native build C preprocessor-flags" >&5
5319 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5320
5321 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5322 if test "${with_build_cppflags+set}" = set; then
5323   withval="$with_build_cppflags"
5324   BUILD_CPPFLAGS="$withval"
5325 fi;
5326         echo "$as_me:5326: result: $BUILD_CPPFLAGS" >&5
5327 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5328
5329         echo "$as_me:5329: checking for native build linker-flags" >&5
5330 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5331
5332 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5333 if test "${with_build_ldflags+set}" = set; then
5334   withval="$with_build_ldflags"
5335   BUILD_LDFLAGS="$withval"
5336 fi;
5337         echo "$as_me:5337: result: $BUILD_LDFLAGS" >&5
5338 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5339
5340         echo "$as_me:5340: checking for native build linker-libraries" >&5
5341 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5342
5343 # Check whether --with-build-libs or --without-build-libs was given.
5344 if test "${with_build_libs+set}" = set; then
5345   withval="$with_build_libs"
5346   BUILD_LIBS="$withval"
5347 fi;
5348         echo "$as_me:5348: result: $BUILD_LIBS" >&5
5349 echo "${ECHO_T}$BUILD_LIBS" >&6
5350
5351         # this assumes we're on Unix.
5352         BUILD_EXEEXT=
5353         BUILD_OBJEXT=o
5354
5355         : ${BUILD_CC:='${CC}'}
5356
5357         echo "$as_me:5357: checking if the build-compiler \"$BUILD_CC\" works" >&5
5358 echo $ECHO_N "checking if the build-compiler \"$BUILD_CC\" works... $ECHO_C" >&6
5359
5360         cf_save_crossed=$cross_compiling
5361         cf_save_ac_link=$ac_link
5362         cross_compiling=no
5363         cf_build_cppflags=$BUILD_CPPFLAGS
5364         test "$cf_build_cppflags" = "#" && cf_build_cppflags=
5365         ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $cf_build_cppflags $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&5'
5366
5367         if test "$cross_compiling" = yes; then
5368   cf_ok_build_cc=unknown
5369 else
5370   cat >"conftest.$ac_ext" <<_ACEOF
5371 #line 5371 "configure"
5372 #include "confdefs.h"
5373 #include <stdio.h>
5374                 int main(int argc, char *argv[])
5375                 {
5376                         ${cf_cv_main_return:-return}(argc < 0 || argv == 0 || argv[0] == 0);
5377                 }
5378
5379 _ACEOF
5380 rm -f "conftest$ac_exeext"
5381 if { (eval echo "$as_me:5381: \"$ac_link\"") >&5
5382   (eval $ac_link) 2>&5
5383   ac_status=$?
5384   echo "$as_me:5384: \$? = $ac_status" >&5
5385   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
5386   { (eval echo "$as_me:5386: \"$ac_try\"") >&5
5387   (eval $ac_try) 2>&5
5388   ac_status=$?
5389   echo "$as_me:5389: \$? = $ac_status" >&5
5390   (exit "$ac_status"); }; }; then
5391   cf_ok_build_cc=yes
5392 else
5393   echo "$as_me: program exited with status $ac_status" >&5
5394 echo "$as_me: failed program was:" >&5
5395 cat "conftest.$ac_ext" >&5
5396 cf_ok_build_cc=no
5397 fi
5398 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
5399 fi
5400
5401         cross_compiling=$cf_save_crossed
5402         ac_link=$cf_save_ac_link
5403
5404         echo "$as_me:5404: result: $cf_ok_build_cc" >&5
5405 echo "${ECHO_T}$cf_ok_build_cc" >&6
5406
5407         if test "$cf_ok_build_cc" != yes
5408         then
5409                 { { echo "$as_me:5409: error: Cross-build requires two compilers.
5410 Use --with-build-cc to specify the native compiler." >&5
5411 echo "$as_me: error: Cross-build requires two compilers.
5412 Use --with-build-cc to specify the native compiler." >&2;}
5413    { (exit 1); exit 1; }; }
5414         fi
5415
5416 else
5417         : ${BUILD_CC:='${CC}'}
5418         : ${BUILD_CPP:='${CPP}'}
5419         : ${BUILD_CFLAGS:='${CFLAGS}'}
5420         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5421         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5422         : ${BUILD_LIBS:='${LIBS}'}
5423         : ${BUILD_EXEEXT:='$x'}
5424         : ${BUILD_OBJEXT:='o'}
5425 fi
5426
5427 ###############################################################################
5428
5429 ### Options to allow the user to specify the set of libraries which are used.
5430 ### Use "--without-normal --with-shared" to allow the default model to be
5431 ### shared, for example.
5432 cf_list_models=""
5433
5434 echo "$as_me:5434: checking if libtool -version-number should be used" >&5
5435 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5436
5437 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5438 if test "${enable_libtool_version+set}" = set; then
5439   enableval="$enable_libtool_version"
5440   test "$enableval" != no && enableval=yes
5441         if test "$enableval" != "yes" ; then
5442     cf_libtool_version=no
5443         else
5444                 cf_libtool_version=yes
5445         fi
5446 else
5447   enableval=yes
5448         cf_libtool_version=yes
5449
5450 fi;
5451 echo "$as_me:5451: result: $cf_libtool_version" >&5
5452 echo "${ECHO_T}$cf_libtool_version" >&6
5453
5454 if test "$cf_libtool_version" = yes ; then
5455         LIBTOOL_VERSION="-version-number"
5456 else
5457         LIBTOOL_VERSION="-version-info"
5458         case "x$VERSION" in
5459         (x)
5460                 { echo "$as_me:5460: WARNING: VERSION was not set" >&5
5461 echo "$as_me: WARNING: VERSION was not set" >&2;}
5462                 ;;
5463         (x*.*.*)
5464                 ABI_VERSION="$VERSION"
5465                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5466
5467 echo "${as_me:-configure}:5467: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5468
5469                 ;;
5470         (x*:*:*)
5471                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5472                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5473
5474 echo "${as_me:-configure}:5474: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5475
5476                 ;;
5477         (*)
5478                 { echo "$as_me:5478: WARNING: unexpected VERSION value: $VERSION" >&5
5479 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5480                 ;;
5481         esac
5482 fi
5483
5484 LIBTOOL=
5485
5486 # common library maintenance symbols that are convenient for libtool scripts:
5487 LIB_CREATE='${AR} -cr'
5488 LIB_OBJECT='${OBJECTS}'
5489 LIB_SUFFIX=.a
5490 LIB_PREP="$RANLIB"
5491
5492 # symbols used to prop libtool up to enable it to determine what it should be
5493 # doing:
5494 LIB_CLEAN=
5495 LIB_COMPILE=
5496 LIB_LINK='${CC}'
5497 LIB_INSTALL=
5498 LIB_UNINSTALL=
5499
5500 echo "$as_me:5500: checking if you want to build libraries with libtool" >&5
5501 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5502
5503 # Check whether --with-libtool or --without-libtool was given.
5504 if test "${with_libtool+set}" = set; then
5505   withval="$with_libtool"
5506   with_libtool=$withval
5507 else
5508   with_libtool=no
5509 fi;
5510 echo "$as_me:5510: result: $with_libtool" >&5
5511 echo "${ECHO_T}$with_libtool" >&6
5512 if test "$with_libtool" != "no"; then
5513
5514         if test "$with_libtool" != "yes" ; then
5515
5516 if test "x$prefix" != xNONE; then
5517         cf_path_syntax="$prefix"
5518 else
5519         cf_path_syntax="$ac_default_prefix"
5520 fi
5521
5522 case ".$with_libtool" in
5523 (.\$\(*\)*|.\'*\'*)
5524         ;;
5525 (..|./*|.\\*)
5526         ;;
5527 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5528         ;;
5529 (.\$\{*prefix\}*|.\$\{*dir\}*)
5530         eval with_libtool="$with_libtool"
5531         case ".$with_libtool" in
5532         (.NONE/*)
5533                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5534                 ;;
5535         esac
5536         ;;
5537 (.no|.NONE/*)
5538         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5539         ;;
5540 (*)
5541         { { echo "$as_me:5541: error: expected a pathname, not \"$with_libtool\"" >&5
5542 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5543    { (exit 1); exit 1; }; }
5544         ;;
5545 esac
5546
5547                 LIBTOOL=$with_libtool
5548         else
5549                 if test -n "$ac_tool_prefix"; then
5550   for ac_prog in libtool glibtool
5551   do
5552     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5553 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5554 echo "$as_me:5554: checking for $ac_word" >&5
5555 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5556 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5557   echo $ECHO_N "(cached) $ECHO_C" >&6
5558 else
5559   if test -n "$LIBTOOL"; then
5560   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5561 else
5562   ac_save_IFS=$IFS; IFS=$ac_path_separator
5563 ac_dummy="$PATH"
5564 for ac_dir in $ac_dummy; do
5565   IFS=$ac_save_IFS
5566   test -z "$ac_dir" && ac_dir=.
5567   $as_executable_p "$ac_dir/$ac_word" || continue
5568 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5569 echo "$as_me:5569: found $ac_dir/$ac_word" >&5
5570 break
5571 done
5572
5573 fi
5574 fi
5575 LIBTOOL=$ac_cv_prog_LIBTOOL
5576 if test -n "$LIBTOOL"; then
5577   echo "$as_me:5577: result: $LIBTOOL" >&5
5578 echo "${ECHO_T}$LIBTOOL" >&6
5579 else
5580   echo "$as_me:5580: result: no" >&5
5581 echo "${ECHO_T}no" >&6
5582 fi
5583
5584     test -n "$LIBTOOL" && break
5585   done
5586 fi
5587 if test -z "$LIBTOOL"; then
5588   ac_ct_LIBTOOL=$LIBTOOL
5589   for ac_prog in libtool glibtool
5590 do
5591   # Extract the first word of "$ac_prog", so it can be a program name with args.
5592 set dummy $ac_prog; ac_word=$2
5593 echo "$as_me:5593: checking for $ac_word" >&5
5594 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5595 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5596   echo $ECHO_N "(cached) $ECHO_C" >&6
5597 else
5598   if test -n "$ac_ct_LIBTOOL"; then
5599   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5600 else
5601   ac_save_IFS=$IFS; IFS=$ac_path_separator
5602 ac_dummy="$PATH"
5603 for ac_dir in $ac_dummy; do
5604   IFS=$ac_save_IFS
5605   test -z "$ac_dir" && ac_dir=.
5606   $as_executable_p "$ac_dir/$ac_word" || continue
5607 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5608 echo "$as_me:5608: found $ac_dir/$ac_word" >&5
5609 break
5610 done
5611
5612 fi
5613 fi
5614 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5615 if test -n "$ac_ct_LIBTOOL"; then
5616   echo "$as_me:5616: result: $ac_ct_LIBTOOL" >&5
5617 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5618 else
5619   echo "$as_me:5619: result: no" >&5
5620 echo "${ECHO_T}no" >&6
5621 fi
5622
5623   test -n "$ac_ct_LIBTOOL" && break
5624 done
5625 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5626
5627   LIBTOOL=$ac_ct_LIBTOOL
5628 fi
5629
5630 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5631 then
5632         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.].*//'`
5633 else
5634         cf_cv_libtool_version=
5635 fi
5636 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5637
5638                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5639                 then
5640
5641 unset ac_cv_prog_ac_ct_LIBTOOL
5642 unset ac_ct_LIBTOOL
5643 unset LIBTOOL
5644
5645                         if test -n "$ac_tool_prefix"; then
5646   for ac_prog in glibtool
5647   do
5648     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5649 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5650 echo "$as_me:5650: checking for $ac_word" >&5
5651 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5652 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5653   echo $ECHO_N "(cached) $ECHO_C" >&6
5654 else
5655   if test -n "$LIBTOOL"; then
5656   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5657 else
5658   ac_save_IFS=$IFS; IFS=$ac_path_separator
5659 ac_dummy="$PATH"
5660 for ac_dir in $ac_dummy; do
5661   IFS=$ac_save_IFS
5662   test -z "$ac_dir" && ac_dir=.
5663   $as_executable_p "$ac_dir/$ac_word" || continue
5664 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5665 echo "$as_me:5665: found $ac_dir/$ac_word" >&5
5666 break
5667 done
5668
5669 fi
5670 fi
5671 LIBTOOL=$ac_cv_prog_LIBTOOL
5672 if test -n "$LIBTOOL"; then
5673   echo "$as_me:5673: result: $LIBTOOL" >&5
5674 echo "${ECHO_T}$LIBTOOL" >&6
5675 else
5676   echo "$as_me:5676: result: no" >&5
5677 echo "${ECHO_T}no" >&6
5678 fi
5679
5680     test -n "$LIBTOOL" && break
5681   done
5682 fi
5683 if test -z "$LIBTOOL"; then
5684   ac_ct_LIBTOOL=$LIBTOOL
5685   for ac_prog in glibtool
5686 do
5687   # Extract the first word of "$ac_prog", so it can be a program name with args.
5688 set dummy $ac_prog; ac_word=$2
5689 echo "$as_me:5689: checking for $ac_word" >&5
5690 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5691 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5692   echo $ECHO_N "(cached) $ECHO_C" >&6
5693 else
5694   if test -n "$ac_ct_LIBTOOL"; then
5695   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5696 else
5697   ac_save_IFS=$IFS; IFS=$ac_path_separator
5698 ac_dummy="$PATH"
5699 for ac_dir in $ac_dummy; do
5700   IFS=$ac_save_IFS
5701   test -z "$ac_dir" && ac_dir=.
5702   $as_executable_p "$ac_dir/$ac_word" || continue
5703 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5704 echo "$as_me:5704: found $ac_dir/$ac_word" >&5
5705 break
5706 done
5707
5708 fi
5709 fi
5710 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5711 if test -n "$ac_ct_LIBTOOL"; then
5712   echo "$as_me:5712: result: $ac_ct_LIBTOOL" >&5
5713 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5714 else
5715   echo "$as_me:5715: result: no" >&5
5716 echo "${ECHO_T}no" >&6
5717 fi
5718
5719   test -n "$ac_ct_LIBTOOL" && break
5720 done
5721 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5722
5723   LIBTOOL=$ac_ct_LIBTOOL
5724 fi
5725
5726 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5727 then
5728         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.].*//'`
5729 else
5730         cf_cv_libtool_version=
5731 fi
5732 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5733
5734                 fi
5735         fi
5736         if test -z "$LIBTOOL" ; then
5737                 { { echo "$as_me:5737: error: Cannot find libtool" >&5
5738 echo "$as_me: error: Cannot find libtool" >&2;}
5739    { (exit 1); exit 1; }; }
5740         fi
5741         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5742         LIB_OBJECT='${OBJECTS:.o=.lo}'
5743         LIB_SUFFIX=.la
5744         LIB_CLEAN='${LIBTOOL} --mode=clean'
5745         LIB_COMPILE='${LIBTOOL} --mode=compile'
5746         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5747         LIB_INSTALL='${LIBTOOL} --mode=install'
5748         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5749         LIB_PREP=:
5750
5751 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5752 then
5753         echo "$as_me:5753: checking version of $LIBTOOL" >&5
5754 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5755
5756 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5757 then
5758         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.].*//'`
5759 else
5760         cf_cv_libtool_version=
5761 fi
5762 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5763
5764         echo "$as_me:5764: result: $cf_cv_libtool_version" >&5
5765 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5766         if test -n "$cf_cv_libtool_version"
5767         then
5768                 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
5769                 case "x$cf_check_libtool_version" in
5770                 (*...GNU-libtool...*)
5771                         ;;
5772                 (*)
5773                         { { echo "$as_me:5773: error: This is not GNU libtool" >&5
5774 echo "$as_me: error: This is not GNU libtool" >&2;}
5775    { (exit 1); exit 1; }; }
5776                         ;;
5777                 esac
5778         else
5779                 { { echo "$as_me:5779: error: No version found for $LIBTOOL" >&5
5780 echo "$as_me: error: No version found for $LIBTOOL" >&2;}
5781    { (exit 1); exit 1; }; }
5782         fi
5783 else
5784         { { echo "$as_me:5784: error: GNU libtool has not been found" >&5
5785 echo "$as_me: error: GNU libtool has not been found" >&2;}
5786    { (exit 1); exit 1; }; }
5787 fi
5788
5789         # special hack to add -no-undefined (which libtool should do for itself)
5790         LT_UNDEF=
5791         case "$cf_cv_system_name" in
5792         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5793                 LT_UNDEF=-no-undefined
5794                 ;;
5795         esac
5796
5797         # special hack to add --tag option for C++ compiler
5798         case "$cf_cv_libtool_version" in
5799         (1.[5-9]*|[2-9].[0-9.a-z]*)
5800                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5801                 LIBTOOL="$LIBTOOL --tag=CC"
5802                 ;;
5803         (*)
5804                 LIBTOOL_CXX="$LIBTOOL"
5805                 ;;
5806         esac
5807 else
5808         LIBTOOL=""
5809         LIBTOOL_CXX=""
5810 fi
5811
5812 test -z "$LIBTOOL" && ECHO_LT=
5813
5814 if test "$with_libtool" != "no" ; then
5815
5816 cf_list_models="$cf_list_models libtool"
5817
5818 else
5819
5820 echo "$as_me:5820: checking if you want to build shared libraries" >&5
5821 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5822
5823 # Check whether --with-shared or --without-shared was given.
5824 if test "${with_shared+set}" = set; then
5825   withval="$with_shared"
5826   with_shared=$withval
5827 else
5828   with_shared=no
5829 fi;
5830 echo "$as_me:5830: result: $with_shared" >&5
5831 echo "${ECHO_T}$with_shared" >&6
5832 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5833
5834 echo "$as_me:5834: checking if you want to build static libraries" >&5
5835 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5836
5837 # Check whether --with-normal or --without-normal was given.
5838 if test "${with_normal+set}" = set; then
5839   withval="$with_normal"
5840   with_normal=$withval
5841 else
5842   with_normal=yes
5843 fi;
5844 echo "$as_me:5844: result: $with_normal" >&5
5845 echo "${ECHO_T}$with_normal" >&6
5846 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5847
5848 echo "$as_me:5848: checking if you want to build debug libraries" >&5
5849 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5850
5851 # Check whether --with-debug or --without-debug was given.
5852 if test "${with_debug+set}" = set; then
5853   withval="$with_debug"
5854   with_debug=$withval
5855 else
5856   with_debug=yes
5857 fi;
5858 echo "$as_me:5858: result: $with_debug" >&5
5859 echo "${ECHO_T}$with_debug" >&6
5860 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5861
5862 echo "$as_me:5862: checking if you want to build profiling libraries" >&5
5863 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5864
5865 # Check whether --with-profile or --without-profile was given.
5866 if test "${with_profile+set}" = set; then
5867   withval="$with_profile"
5868   with_profile=$withval
5869 else
5870   with_profile=no
5871 fi;
5872 echo "$as_me:5872: result: $with_profile" >&5
5873 echo "${ECHO_T}$with_profile" >&6
5874 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5875
5876 fi
5877
5878 if test "X$cf_with_cxx_binding" != Xno; then
5879 if test "x$with_shared" = "xyes"; then
5880 echo "$as_me:5880: checking if you want to build C++ shared libraries" >&5
5881 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5882
5883 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5884 if test "${with_cxx_shared+set}" = set; then
5885   withval="$with_cxx_shared"
5886   with_shared_cxx=$withval
5887 else
5888   with_shared_cxx=no
5889 fi;
5890 echo "$as_me:5890: result: $with_shared_cxx" >&5
5891 echo "${ECHO_T}$with_shared_cxx" >&6
5892 fi
5893 fi
5894
5895 ###############################################################################
5896
5897 echo "$as_me:5897: checking for specified models" >&5
5898 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5899 test -z "$cf_list_models" && cf_list_models=normal
5900 test "$with_libtool" != "no" && cf_list_models=libtool
5901 echo "$as_me:5901: result: $cf_list_models" >&5
5902 echo "${ECHO_T}$cf_list_models" >&6
5903
5904 ### Use the first model as the default, and save its suffix for use in building
5905 ### up test-applications.
5906 echo "$as_me:5906: checking for default model" >&5
5907 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5908 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5909 echo "$as_me:5909: result: $DFT_LWR_MODEL" >&5
5910 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5911
5912 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5913
5914 TICS_NAME=tic
5915
5916 TINFO_NAME=tinfo
5917
5918 LIB_NAME=ncurses
5919
5920 LIB_DIR=../lib
5921 LIB_2ND=../../lib
5922
5923 echo "$as_me:5923: checking if you want to have a library-prefix" >&5
5924 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5925
5926 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5927 if test "${with_lib_prefix+set}" = set; then
5928   withval="$with_lib_prefix"
5929   with_lib_prefix=$withval
5930 else
5931   with_lib_prefix=auto
5932 fi;
5933 echo "$as_me:5933: result: $with_lib_prefix" >&5
5934 echo "${ECHO_T}$with_lib_prefix" >&6
5935
5936 if test "$with_lib_prefix" = auto
5937 then
5938
5939         case "$cf_cv_system_name" in
5940         (OS/2*|os2*)
5941                 if test "$DFT_LWR_MODEL" = libtool; then
5942                         LIB_PREFIX='lib'
5943                 else
5944                         LIB_PREFIX=''
5945                 fi
5946                 ;;
5947         (*-msvc*)
5948                 LIB_PREFIX=''
5949                 ;;
5950         (*)     LIB_PREFIX='lib'
5951                 ;;
5952         esac
5953 cf_prefix=$LIB_PREFIX
5954
5955 elif test "$with_lib_prefix" = no
5956 then
5957         LIB_PREFIX=
5958 else
5959         LIB_PREFIX=$with_lib_prefix
5960 fi
5961
5962 LIB_SUFFIX=
5963
5964         echo "$as_me:5964: checking for PATH separator" >&5
5965 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5966         case "$cf_cv_system_name" in
5967         (os2*)  PATH_SEPARATOR=';'  ;;
5968         (*)     ${PATH_SEPARATOR:=':'}  ;;
5969         esac
5970
5971         echo "$as_me:5971: result: $PATH_SEPARATOR" >&5
5972 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5973
5974 # headers needed for checks...
5975 echo "$as_me:5975: checking for ANSI C header files" >&5
5976 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5977 if test "${ac_cv_header_stdc+set}" = set; then
5978   echo $ECHO_N "(cached) $ECHO_C" >&6
5979 else
5980   cat >"conftest.$ac_ext" <<_ACEOF
5981 #line 5981 "configure"
5982 #include "confdefs.h"
5983 #include <stdlib.h>
5984 #include <stdarg.h>
5985 #include <string.h>
5986 #include <float.h>
5987
5988 _ACEOF
5989 if { (eval echo "$as_me:5989: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5990   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5991   ac_status=$?
5992   $EGREP -v '^ *\+' conftest.er1 >conftest.err
5993   rm -f conftest.er1
5994   cat conftest.err >&5
5995   echo "$as_me:5995: \$? = $ac_status" >&5
5996   (exit "$ac_status"); } >/dev/null; then
5997   if test -s conftest.err; then
5998     ac_cpp_err=$ac_c_preproc_warn_flag
5999   else
6000     ac_cpp_err=
6001   fi
6002 else
6003   ac_cpp_err=yes
6004 fi
6005 if test -z "$ac_cpp_err"; then
6006   ac_cv_header_stdc=yes
6007 else
6008   echo "$as_me: failed program was:" >&5
6009   cat "conftest.$ac_ext" >&5
6010   ac_cv_header_stdc=no
6011 fi
6012 rm -f conftest.err "conftest.$ac_ext"
6013
6014 if test $ac_cv_header_stdc = yes; then
6015   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6016   cat >"conftest.$ac_ext" <<_ACEOF
6017 #line 6017 "configure"
6018 #include "confdefs.h"
6019 #include <string.h>
6020
6021 _ACEOF
6022 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6023   $EGREP "memchr" >/dev/null 2>&1; then
6024   :
6025 else
6026   ac_cv_header_stdc=no
6027 fi
6028 rm -rf conftest*
6029
6030 fi
6031
6032 if test $ac_cv_header_stdc = yes; then
6033   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6034   cat >"conftest.$ac_ext" <<_ACEOF
6035 #line 6035 "configure"
6036 #include "confdefs.h"
6037 #include <stdlib.h>
6038
6039 _ACEOF
6040 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6041   $EGREP "free" >/dev/null 2>&1; then
6042   :
6043 else
6044   ac_cv_header_stdc=no
6045 fi
6046 rm -rf conftest*
6047
6048 fi
6049
6050 if test $ac_cv_header_stdc = yes; then
6051   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6052   if test "$cross_compiling" = yes; then
6053   :
6054 else
6055   cat >"conftest.$ac_ext" <<_ACEOF
6056 #line 6056 "configure"
6057 #include "confdefs.h"
6058 #include <ctype.h>
6059 #if ((' ' & 0x0FF) == 0x020)
6060 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6061 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6062 #else
6063 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
6064                      || ('j' <= (c) && (c) <= 'r') \
6065                      || ('s' <= (c) && (c) <= 'z'))
6066 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6067 #endif
6068
6069 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6070 int
6071 main (void)
6072 {
6073   int i;
6074   for (i = 0; i < 256; i++)
6075     if (XOR (islower (i), ISLOWER (i))
6076         || toupper (i) != TOUPPER (i))
6077       $ac_main_return(2);
6078   $ac_main_return (0);
6079 }
6080 _ACEOF
6081 rm -f "conftest$ac_exeext"
6082 if { (eval echo "$as_me:6082: \"$ac_link\"") >&5
6083   (eval $ac_link) 2>&5
6084   ac_status=$?
6085   echo "$as_me:6085: \$? = $ac_status" >&5
6086   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6087   { (eval echo "$as_me:6087: \"$ac_try\"") >&5
6088   (eval $ac_try) 2>&5
6089   ac_status=$?
6090   echo "$as_me:6090: \$? = $ac_status" >&5
6091   (exit "$ac_status"); }; }; then
6092   :
6093 else
6094   echo "$as_me: program exited with status $ac_status" >&5
6095 echo "$as_me: failed program was:" >&5
6096 cat "conftest.$ac_ext" >&5
6097 ac_cv_header_stdc=no
6098 fi
6099 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6100 fi
6101 fi
6102 fi
6103 echo "$as_me:6103: result: $ac_cv_header_stdc" >&5
6104 echo "${ECHO_T}$ac_cv_header_stdc" >&6
6105 if test $ac_cv_header_stdc = yes; then
6106
6107 cat >>confdefs.h <<\EOF
6108 #define STDC_HEADERS 1
6109 EOF
6110
6111 fi
6112
6113 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6114
6115 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6116                   inttypes.h stdint.h unistd.h
6117 do
6118 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6119 echo "$as_me:6119: checking for $ac_header" >&5
6120 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6121 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6122   echo $ECHO_N "(cached) $ECHO_C" >&6
6123 else
6124   cat >"conftest.$ac_ext" <<_ACEOF
6125 #line 6125 "configure"
6126 #include "confdefs.h"
6127 $ac_includes_default
6128 #include <$ac_header>
6129 _ACEOF
6130 rm -f "conftest.$ac_objext"
6131 if { (eval echo "$as_me:6131: \"$ac_compile\"") >&5
6132   (eval $ac_compile) 2>&5
6133   ac_status=$?
6134   echo "$as_me:6134: \$? = $ac_status" >&5
6135   (exit "$ac_status"); } &&
6136          { ac_try='test -s "conftest.$ac_objext"'
6137   { (eval echo "$as_me:6137: \"$ac_try\"") >&5
6138   (eval $ac_try) 2>&5
6139   ac_status=$?
6140   echo "$as_me:6140: \$? = $ac_status" >&5
6141   (exit "$ac_status"); }; }; then
6142   eval "$as_ac_Header=yes"
6143 else
6144   echo "$as_me: failed program was:" >&5
6145 cat "conftest.$ac_ext" >&5
6146 eval "$as_ac_Header=no"
6147 fi
6148 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6149 fi
6150 echo "$as_me:6150: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6151 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6152 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6153   cat >>confdefs.h <<EOF
6154 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6155 EOF
6156
6157 fi
6158 done
6159
6160 echo "$as_me:6160: checking whether exit is declared" >&5
6161 echo $ECHO_N "checking whether exit is declared... $ECHO_C" >&6
6162 if test "${ac_cv_have_decl_exit+set}" = set; then
6163   echo $ECHO_N "(cached) $ECHO_C" >&6
6164 else
6165   cat >"conftest.$ac_ext" <<_ACEOF
6166 #line 6166 "configure"
6167 #include "confdefs.h"
6168 $ac_includes_default
6169 int
6170 main (void)
6171 {
6172 #ifndef exit
6173   char *p = (char *) exit; (void) p;
6174 #endif
6175
6176   ;
6177   return 0;
6178 }
6179 _ACEOF
6180 rm -f "conftest.$ac_objext"
6181 if { (eval echo "$as_me:6181: \"$ac_compile\"") >&5
6182   (eval $ac_compile) 2>&5
6183   ac_status=$?
6184   echo "$as_me:6184: \$? = $ac_status" >&5
6185   (exit "$ac_status"); } &&
6186          { ac_try='test -s "conftest.$ac_objext"'
6187   { (eval echo "$as_me:6187: \"$ac_try\"") >&5
6188   (eval $ac_try) 2>&5
6189   ac_status=$?
6190   echo "$as_me:6190: \$? = $ac_status" >&5
6191   (exit "$ac_status"); }; }; then
6192   ac_cv_have_decl_exit=yes
6193 else
6194   echo "$as_me: failed program was:" >&5
6195 cat "conftest.$ac_ext" >&5
6196 ac_cv_have_decl_exit=no
6197 fi
6198 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6199 fi
6200 echo "$as_me:6200: result: $ac_cv_have_decl_exit" >&5
6201 echo "${ECHO_T}$ac_cv_have_decl_exit" >&6
6202
6203 ac_header_dirent=no
6204 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
6205   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6206 echo "$as_me:6206: checking for $ac_hdr that defines DIR" >&5
6207 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
6208 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6209   echo $ECHO_N "(cached) $ECHO_C" >&6
6210 else
6211   cat >"conftest.$ac_ext" <<_ACEOF
6212 #line 6212 "configure"
6213 #include "confdefs.h"
6214 #include <sys/types.h>
6215 #include <$ac_hdr>
6216
6217 int
6218 main (void)
6219 {
6220 if ((DIR *) 0)
6221 return 0;
6222   ;
6223   return 0;
6224 }
6225 _ACEOF
6226 rm -f "conftest.$ac_objext"
6227 if { (eval echo "$as_me:6227: \"$ac_compile\"") >&5
6228   (eval $ac_compile) 2>&5
6229   ac_status=$?
6230   echo "$as_me:6230: \$? = $ac_status" >&5
6231   (exit "$ac_status"); } &&
6232          { ac_try='test -s "conftest.$ac_objext"'
6233   { (eval echo "$as_me:6233: \"$ac_try\"") >&5
6234   (eval $ac_try) 2>&5
6235   ac_status=$?
6236   echo "$as_me:6236: \$? = $ac_status" >&5
6237   (exit "$ac_status"); }; }; then
6238   eval "$as_ac_Header=yes"
6239 else
6240   echo "$as_me: failed program was:" >&5
6241 cat "conftest.$ac_ext" >&5
6242 eval "$as_ac_Header=no"
6243 fi
6244 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6245 fi
6246 echo "$as_me:6246: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6247 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6248 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6249   cat >>confdefs.h <<EOF
6250 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
6251 EOF
6252
6253 ac_header_dirent=$ac_hdr; break
6254 fi
6255
6256 done
6257 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6258 if test $ac_header_dirent = dirent.h; then
6259   echo "$as_me:6259: checking for opendir in -ldir" >&5
6260 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
6261 if test "${ac_cv_lib_dir_opendir+set}" = set; then
6262   echo $ECHO_N "(cached) $ECHO_C" >&6
6263 else
6264   ac_check_lib_save_LIBS=$LIBS
6265 LIBS="-ldir  $LIBS"
6266 cat >"conftest.$ac_ext" <<_ACEOF
6267 #line 6267 "configure"
6268 #include "confdefs.h"
6269
6270 /* Override any gcc2 internal prototype to avoid an error.  */
6271 #ifdef __cplusplus
6272 extern "C"
6273 #endif
6274 /* We use char because int might match the return type of a gcc2
6275    builtin and then its argument prototype would still apply.  */
6276 char opendir ();
6277 int
6278 main (void)
6279 {
6280 opendir ();
6281   ;
6282   return 0;
6283 }
6284 _ACEOF
6285 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6286 if { (eval echo "$as_me:6286: \"$ac_link\"") >&5
6287   (eval $ac_link) 2>&5
6288   ac_status=$?
6289   echo "$as_me:6289: \$? = $ac_status" >&5
6290   (exit "$ac_status"); } &&
6291          { ac_try='test -s "conftest$ac_exeext"'
6292   { (eval echo "$as_me:6292: \"$ac_try\"") >&5
6293   (eval $ac_try) 2>&5
6294   ac_status=$?
6295   echo "$as_me:6295: \$? = $ac_status" >&5
6296   (exit "$ac_status"); }; }; then
6297   ac_cv_lib_dir_opendir=yes
6298 else
6299   echo "$as_me: failed program was:" >&5
6300 cat "conftest.$ac_ext" >&5
6301 ac_cv_lib_dir_opendir=no
6302 fi
6303 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6304 LIBS=$ac_check_lib_save_LIBS
6305 fi
6306 echo "$as_me:6306: result: $ac_cv_lib_dir_opendir" >&5
6307 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
6308 if test "$ac_cv_lib_dir_opendir" = yes; then
6309   LIBS="$LIBS -ldir"
6310 fi
6311
6312 else
6313   echo "$as_me:6313: checking for opendir in -lx" >&5
6314 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
6315 if test "${ac_cv_lib_x_opendir+set}" = set; then
6316   echo $ECHO_N "(cached) $ECHO_C" >&6
6317 else
6318   ac_check_lib_save_LIBS=$LIBS
6319 LIBS="-lx  $LIBS"
6320 cat >"conftest.$ac_ext" <<_ACEOF
6321 #line 6321 "configure"
6322 #include "confdefs.h"
6323
6324 /* Override any gcc2 internal prototype to avoid an error.  */
6325 #ifdef __cplusplus
6326 extern "C"
6327 #endif
6328 /* We use char because int might match the return type of a gcc2
6329    builtin and then its argument prototype would still apply.  */
6330 char opendir ();
6331 int
6332 main (void)
6333 {
6334 opendir ();
6335   ;
6336   return 0;
6337 }
6338 _ACEOF
6339 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6340 if { (eval echo "$as_me:6340: \"$ac_link\"") >&5
6341   (eval $ac_link) 2>&5
6342   ac_status=$?
6343   echo "$as_me:6343: \$? = $ac_status" >&5
6344   (exit "$ac_status"); } &&
6345          { ac_try='test -s "conftest$ac_exeext"'
6346   { (eval echo "$as_me:6346: \"$ac_try\"") >&5
6347   (eval $ac_try) 2>&5
6348   ac_status=$?
6349   echo "$as_me:6349: \$? = $ac_status" >&5
6350   (exit "$ac_status"); }; }; then
6351   ac_cv_lib_x_opendir=yes
6352 else
6353   echo "$as_me: failed program was:" >&5
6354 cat "conftest.$ac_ext" >&5
6355 ac_cv_lib_x_opendir=no
6356 fi
6357 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6358 LIBS=$ac_check_lib_save_LIBS
6359 fi
6360 echo "$as_me:6360: result: $ac_cv_lib_x_opendir" >&5
6361 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
6362 if test "$ac_cv_lib_x_opendir" = yes; then
6363   LIBS="$LIBS -lx"
6364 fi
6365
6366 fi
6367
6368 ###############################################################################
6369
6370 echo "$as_me:6370: checking if you want to build a separate terminfo library" >&5
6371 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
6372
6373 # Check whether --with-termlib or --without-termlib was given.
6374 if test "${with_termlib+set}" = set; then
6375   withval="$with_termlib"
6376   with_termlib=$withval
6377 else
6378   with_termlib=no
6379 fi;
6380 echo "$as_me:6380: result: $with_termlib" >&5
6381 echo "${ECHO_T}$with_termlib" >&6
6382
6383 echo "$as_me:6383: checking if you want to build a separate tic library" >&5
6384 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
6385
6386 # Check whether --with-ticlib or --without-ticlib was given.
6387 if test "${with_ticlib+set}" = set; then
6388   withval="$with_ticlib"
6389   with_ticlib=$withval
6390 else
6391   with_ticlib=no
6392 fi;
6393 echo "$as_me:6393: result: $with_ticlib" >&5
6394 echo "${ECHO_T}$with_ticlib" >&6
6395
6396 if test X"$CC_G_OPT" = X"" ; then
6397         CC_G_OPT='-g'
6398         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
6399 fi
6400
6401 if test X"$CXX_G_OPT" = X"" ; then
6402         CXX_G_OPT='-g'
6403         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
6404 fi
6405
6406 echo "$as_me:6406: checking for default loader flags" >&5
6407 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
6408 case "$DFT_LWR_MODEL" in
6409 (libtool) LD_MODEL=''   ;;
6410 (normal)  LD_MODEL=''   ;;
6411 (debug)   LD_MODEL=$CC_G_OPT ;;
6412 (profile) LD_MODEL='-pg';;
6413 (shared)  LD_MODEL=''   ;;
6414 esac
6415 echo "$as_me:6415: result: $LD_MODEL" >&5
6416 echo "${ECHO_T}$LD_MODEL" >&6
6417
6418 case "$DFT_LWR_MODEL" in
6419 (shared)
6420
6421 echo "$as_me:6421: checking if rpath option should be used" >&5
6422 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
6423
6424 # Check whether --enable-rpath or --disable-rpath was given.
6425 if test "${enable_rpath+set}" = set; then
6426   enableval="$enable_rpath"
6427   cf_cv_enable_rpath=$enableval
6428 else
6429   cf_cv_enable_rpath=no
6430 fi;
6431 echo "$as_me:6431: result: $cf_cv_enable_rpath" >&5
6432 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
6433
6434 echo "$as_me:6434: checking if shared libraries should be relinked during install" >&5
6435 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
6436
6437 # Check whether --enable-relink or --disable-relink was given.
6438 if test "${enable_relink+set}" = set; then
6439   enableval="$enable_relink"
6440   cf_cv_do_relink=$enableval
6441 else
6442   cf_cv_do_relink=yes
6443 fi;
6444 echo "$as_me:6444: result: $cf_cv_do_relink" >&5
6445 echo "${ECHO_T}$cf_cv_do_relink" >&6
6446         ;;
6447 esac
6448
6449 # we will build libraries one-level down.
6450 rel_builddir=..
6451
6452 LD_RPATH_OPT=
6453 if test "x$cf_cv_enable_rpath" != xno
6454 then
6455         echo "$as_me:6455: checking for an rpath option" >&5
6456 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
6457         case "$cf_cv_system_name" in
6458         (irix*)
6459                 if test "$GCC" = yes; then
6460                         LD_RPATH_OPT="-Wl,-rpath,"
6461                 else
6462                         LD_RPATH_OPT="-rpath "
6463                 fi
6464                 ;;
6465         (linux*|gnu*|k*bsd*-gnu|freebsd*)
6466                 LD_RPATH_OPT="-Wl,-rpath,"
6467                 ;;
6468         (openbsd[2-9].*|mirbsd*)
6469                 LD_RPATH_OPT="-Wl,-rpath,"
6470                 ;;
6471         (dragonfly*)
6472                 LD_RPATH_OPT="-rpath "
6473                 ;;
6474         (netbsd*)
6475                 LD_RPATH_OPT="-Wl,-rpath,"
6476                 ;;
6477         (osf*|mls+*)
6478                 LD_RPATH_OPT="-rpath "
6479                 ;;
6480         (solaris2*)
6481                 LD_RPATH_OPT="-R"
6482                 ;;
6483         (*)
6484                 ;;
6485         esac
6486         echo "$as_me:6486: result: $LD_RPATH_OPT" >&5
6487 echo "${ECHO_T}$LD_RPATH_OPT" >&6
6488
6489         case "x$LD_RPATH_OPT" in
6490         (x-R*)
6491                 echo "$as_me:6491: checking if we need a space after rpath option" >&5
6492 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
6493                 cf_save_LIBS="$LIBS"
6494
6495 cf_add_libs="$LIBS"
6496 # reverse order
6497 cf_add_0lib=
6498 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6499 # filter duplicates
6500 for cf_add_1lib in $cf_add_0lib; do
6501         for cf_add_2lib in $cf_add_libs; do
6502                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6503                         cf_add_1lib=
6504                         break
6505                 fi
6506         done
6507         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6508 done
6509 LIBS="$cf_add_libs"
6510
6511                 cat >"conftest.$ac_ext" <<_ACEOF
6512 #line 6512 "configure"
6513 #include "confdefs.h"
6514
6515 int
6516 main (void)
6517 {
6518
6519   ;
6520   return 0;
6521 }
6522 _ACEOF
6523 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6524 if { (eval echo "$as_me:6524: \"$ac_link\"") >&5
6525   (eval $ac_link) 2>&5
6526   ac_status=$?
6527   echo "$as_me:6527: \$? = $ac_status" >&5
6528   (exit "$ac_status"); } &&
6529          { ac_try='test -s "conftest$ac_exeext"'
6530   { (eval echo "$as_me:6530: \"$ac_try\"") >&5
6531   (eval $ac_try) 2>&5
6532   ac_status=$?
6533   echo "$as_me:6533: \$? = $ac_status" >&5
6534   (exit "$ac_status"); }; }; then
6535   cf_rpath_space=no
6536 else
6537   echo "$as_me: failed program was:" >&5
6538 cat "conftest.$ac_ext" >&5
6539 cf_rpath_space=yes
6540 fi
6541 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6542                 LIBS="$cf_save_LIBS"
6543                 echo "$as_me:6543: result: $cf_rpath_space" >&5
6544 echo "${ECHO_T}$cf_rpath_space" >&6
6545                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6546                 ;;
6547         esac
6548 fi
6549
6550         RM_SHARED_OPTS=
6551         LOCAL_LDFLAGS=
6552         LOCAL_LDFLAGS2=
6553         LD_SHARED_OPTS=
6554         INSTALL_LIB="-m 644"
6555         : ${rel_builddir:=.}
6556
6557         shlibdir=$libdir
6558
6559         MAKE_DLLS="#"
6560
6561         cf_cv_do_symlinks=no
6562         cf_ld_rpath_opt=
6563         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6564
6565         echo "$as_me:6565: checking if release/abi version should be used for shared libs" >&5
6566 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6567
6568 # Check whether --with-shlib-version or --without-shlib-version was given.
6569 if test "${with_shlib_version+set}" = set; then
6570   withval="$with_shlib_version"
6571   test -z "$withval" && withval=auto
6572         case "$withval" in
6573         (yes)
6574                 cf_cv_shlib_version=auto
6575                 ;;
6576         (rel|abi|auto)
6577                 cf_cv_shlib_version=$withval
6578                 ;;
6579         (*)
6580                 echo "$as_me:6580: result: $withval" >&5
6581 echo "${ECHO_T}$withval" >&6
6582                 { { echo "$as_me:6582: error: option value must be one of: rel, abi, or auto" >&5
6583 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6584    { (exit 1); exit 1; }; }
6585                 ;;
6586         esac
6587
6588 else
6589   cf_cv_shlib_version=auto
6590 fi;
6591         echo "$as_me:6591: result: $cf_cv_shlib_version" >&5
6592 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6593
6594         cf_cv_rm_so_locs=no
6595         cf_try_cflags=
6596
6597         # Some less-capable ports of gcc support only -fpic
6598         CC_SHARED_OPTS=
6599
6600         cf_try_fPIC=no
6601         if test "$GCC" = yes
6602         then
6603                 cf_try_fPIC=yes
6604         else
6605                 case "$cf_cv_system_name" in
6606                 (*linux*)       # e.g., PGI compiler
6607                         cf_try_fPIC=yes
6608                         ;;
6609                 esac
6610         fi
6611
6612         if test "$cf_try_fPIC" = yes
6613         then
6614                 echo "$as_me:6614: checking which $CC option to use" >&5
6615 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6616                 cf_save_CFLAGS="$CFLAGS"
6617                 for CC_SHARED_OPTS in -fPIC -fpic ''
6618                 do
6619                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6620                         cat >"conftest.$ac_ext" <<_ACEOF
6621 #line 6621 "configure"
6622 #include "confdefs.h"
6623 #include <stdio.h>
6624 int
6625 main (void)
6626 {
6627 int x = 1
6628   ;
6629   return 0;
6630 }
6631 _ACEOF
6632 rm -f "conftest.$ac_objext"
6633 if { (eval echo "$as_me:6633: \"$ac_compile\"") >&5
6634   (eval $ac_compile) 2>&5
6635   ac_status=$?
6636   echo "$as_me:6636: \$? = $ac_status" >&5
6637   (exit "$ac_status"); } &&
6638          { ac_try='test -s "conftest.$ac_objext"'
6639   { (eval echo "$as_me:6639: \"$ac_try\"") >&5
6640   (eval $ac_try) 2>&5
6641   ac_status=$?
6642   echo "$as_me:6642: \$? = $ac_status" >&5
6643   (exit "$ac_status"); }; }; then
6644   break
6645 else
6646   echo "$as_me: failed program was:" >&5
6647 cat "conftest.$ac_ext" >&5
6648 fi
6649 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6650                 done
6651                 echo "$as_me:6651: result: $CC_SHARED_OPTS" >&5
6652 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6653                 CFLAGS="$cf_save_CFLAGS"
6654         fi
6655
6656         cf_cv_shlib_version_infix=no
6657
6658         case "$cf_cv_system_name" in
6659         (aix4.3-9*|aix[5-7]*)
6660                 if test "$GCC" = yes; then
6661                         CC_SHARED_OPTS='-Wl,-brtl'
6662                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6663                 else
6664                         CC_SHARED_OPTS='-brtl'
6665                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6666                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6667                 fi
6668                 ;;
6669         (beos*)
6670                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6671                 ;;
6672         (cygwin*)
6673                 CC_SHARED_OPTS=
6674                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6675                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6676                 cf_cv_shlib_version=cygdll
6677                 cf_cv_shlib_version_infix=cygdll
6678                 shlibdir=$bindir
6679                 MAKE_DLLS=
6680                 cat >mk_shared_lib.sh <<-CF_EOF
6681                 #!$SHELL
6682                 SHARED_LIB=\$1
6683                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6684                 shift
6685                 cat <<-EOF
6686                 Linking shared library
6687                 ** SHARED_LIB \$SHARED_LIB
6688                 ** IMPORT_LIB \$IMPORT_LIB
6689 EOF
6690                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6691 CF_EOF
6692                 chmod +x mk_shared_lib.sh
6693                 ;;
6694         (msys*)
6695                 CC_SHARED_OPTS=
6696                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6697                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6698                 cf_cv_shlib_version=msysdll
6699                 cf_cv_shlib_version_infix=msysdll
6700                 shlibdir=$bindir
6701                 MAKE_DLLS=
6702                 cat >mk_shared_lib.sh <<-CF_EOF
6703                 #!$SHELL
6704                 SHARED_LIB=\$1
6705                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6706                 shift
6707                 cat <<-EOF
6708                 Linking shared library
6709                 ** SHARED_LIB \$SHARED_LIB
6710                 ** IMPORT_LIB \$IMPORT_LIB
6711 EOF
6712                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6713 CF_EOF
6714                 chmod +x mk_shared_lib.sh
6715                 ;;
6716         (darwin*)
6717                 cf_try_cflags="no-cpp-precomp"
6718                 CC_SHARED_OPTS="-dynamic"
6719                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6720                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6721                 cf_cv_shlib_version_infix=yes
6722                 echo "$as_me:6722: checking if ld -search_paths_first works" >&5
6723 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6724 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6725   echo $ECHO_N "(cached) $ECHO_C" >&6
6726 else
6727
6728                         cf_save_LDFLAGS=$LDFLAGS
6729                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6730                         cat >"conftest.$ac_ext" <<_ACEOF
6731 #line 6731 "configure"
6732 #include "confdefs.h"
6733
6734 int
6735 main (void)
6736 {
6737 int i;
6738   ;
6739   return 0;
6740 }
6741 _ACEOF
6742 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6743 if { (eval echo "$as_me:6743: \"$ac_link\"") >&5
6744   (eval $ac_link) 2>&5
6745   ac_status=$?
6746   echo "$as_me:6746: \$? = $ac_status" >&5
6747   (exit "$ac_status"); } &&
6748          { ac_try='test -s "conftest$ac_exeext"'
6749   { (eval echo "$as_me:6749: \"$ac_try\"") >&5
6750   (eval $ac_try) 2>&5
6751   ac_status=$?
6752   echo "$as_me:6752: \$? = $ac_status" >&5
6753   (exit "$ac_status"); }; }; then
6754   cf_cv_ldflags_search_paths_first=yes
6755 else
6756   echo "$as_me: failed program was:" >&5
6757 cat "conftest.$ac_ext" >&5
6758 cf_cv_ldflags_search_paths_first=no
6759 fi
6760 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6761                                 LDFLAGS=$cf_save_LDFLAGS
6762 fi
6763 echo "$as_me:6763: result: $cf_cv_ldflags_search_paths_first" >&5
6764 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6765                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6766                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6767                 fi
6768                 ;;
6769         (haiku*)
6770
6771         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6772         if test "$cf_cv_shlib_version" = rel; then
6773                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6774         else
6775                 cf_cv_shared_soname='`basename $@`'
6776         fi
6777
6778                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6779                 ;;
6780         (hpux[7-8]*)
6781                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6782                 if test "$GCC" != yes; then
6783                         CC_SHARED_OPTS='+Z'
6784                 fi
6785                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6786                 INSTALL_LIB="-m 555"
6787                 ;;
6788         (hpux*)
6789                 # (tested with gcc 2.7.2 -- I don't have c89)
6790                 if test "$GCC" = yes; then
6791                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6792                 else
6793                         CC_SHARED_OPTS='+Z'
6794                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6795                 fi
6796                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6797                 # HP-UX shared libraries must be executable, and should be
6798                 # readonly to exploit a quirk in the memory manager.
6799                 INSTALL_LIB="-m 555"
6800                 ;;
6801         (interix*)
6802                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6803                 if test "$cf_cv_shlib_version" = rel; then
6804                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6805                 else
6806                         cf_shared_soname='`basename $@`'
6807                 fi
6808                 CC_SHARED_OPTS=
6809                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6810                 ;;
6811         (irix*)
6812                 if test "$cf_cv_enable_rpath" = yes ; then
6813                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6814                 fi
6815                 # tested with IRIX 5.2 and 'cc'.
6816                 if test "$GCC" != yes; then
6817                         CC_SHARED_OPTS='-KPIC'
6818                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6819                 else
6820                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6821                 fi
6822                 cf_cv_rm_so_locs=yes
6823                 ;;
6824         (linux*|gnu*|k*bsd*-gnu)
6825                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6826                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6827                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6828                 fi
6829                 if test "$cf_cv_enable_rpath" = yes ; then
6830                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6831                 fi
6832
6833         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6834         if test "$cf_cv_shlib_version" = rel; then
6835                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6836         else
6837                 cf_cv_shared_soname='`basename $@`'
6838         fi
6839
6840                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6841                 ;;
6842         (mingw*msvc*)
6843                 cf_cv_shlib_version=msvcdll
6844                 cf_cv_shlib_version_infix=msvcdll
6845                 shlibdir=$bindir
6846                 MAKE_DLLS=
6847                 if test "$DFT_LWR_MODEL" = "shared" ; then
6848                         LOCAL_LDFLAGS="-link -dll"
6849                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6850                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6851                 fi
6852                 CC_SHARED_OPTS=
6853                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6854                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6855                 cat >mk_shared_lib.sh <<-CF_EOF
6856                 #!$SHELL
6857                 SHARED_LIB=\$1
6858                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6859                 shift
6860                 my_ld=\$1
6861                 shift
6862                 cat <<-EOF
6863                 Linking shared library
6864                 ** SHARED LIB \$SHARED_LIB
6865                 ** IMPORT_LIB \$IMPORT_LIB
6866 EOF
6867                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6868                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6869                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6870 CF_EOF
6871                 chmod +x mk_shared_lib.sh
6872                 cat >mk_prog.sh <<-CF_EOF
6873                 #!$SHELL
6874                 shift
6875                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6876                 LD="$LD"
6877                 clopts=()
6878                 ldopts=("/subsystem:console")
6879                 libs=()
6880                 isdll=0
6881                 while test \$# -gt 0; do
6882                         case "\$1" in
6883                                 -link)
6884                                         # ignore -link argument
6885                                         ;;
6886                                 -M[TD] | -M[TD]d)
6887                                         # ignore runtime-library option
6888                                         ;;
6889                                 -dll)
6890                                         isdll=1
6891                                         ;;
6892                                 -W* | -w*)
6893                                         # ignore warnings
6894                                         ;;
6895                                 -D*)
6896                                         clopts+=("\$1")
6897                                         ;;
6898                                 -I*)
6899                                         clopts+=("\$1")
6900                                         ;;
6901                                 -l*)
6902                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6903                                         ;;
6904                                 -L*)
6905                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6906                                         ;;
6907                                 *.obj | *.o)
6908                                         ldopts+=("\$1")
6909                                         ;;
6910                                 -Wl,*)
6911                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6912                                                 ldopts+=("\${linkarg}")
6913                                         done
6914                                         ;;
6915                                 *.lib)
6916                                         ldopts+=("\$1")
6917                                         ;;
6918                                 -o)
6919                                         shift
6920                                         ldopts+=("-out:\$1")
6921                                         ;;
6922                                 *)
6923                                         clopts+=("\$1")
6924                                         ldopts+=("\$1")
6925                                         ;;
6926                         esac
6927                         shift
6928                 done
6929                 if [ "\$isdll" -ne 0 ]; then
6930                         for lib in \${libs[*]}; do
6931                                 ldopts+=("\$lib.dll.lib")
6932                         done
6933                 else
6934                         for lib in \${libs[*]}; do
6935                                 ldopts+=("\$lib.lib")
6936                         done
6937                 fi
6938                 cat <<-EOF
6939                 Creating program
6940                 ** ld options:   "\${ldopts[@]}"
6941 EOF
6942                 exec \$LD \${ldopts[@]}
6943 CF_EOF
6944                 chmod +x mk_prog.sh
6945                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6946                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6947                 ;;
6948         (mingw*)
6949                 cf_cv_shlib_version=mingw
6950                 cf_cv_shlib_version_infix=mingw
6951                 shlibdir=$bindir
6952                 MAKE_DLLS=
6953                 if test "$DFT_LWR_MODEL" = "shared" ; then
6954                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6955                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6956                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6957                 fi
6958                 CC_SHARED_OPTS=
6959                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6960                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6961                 cat >mk_shared_lib.sh <<-CF_EOF
6962                 #!$SHELL
6963                 SHARED_LIB=\$1
6964                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6965                 shift
6966                 cat <<-EOF
6967                 Linking shared library
6968                 ** SHARED_LIB \$SHARED_LIB
6969                 ** IMPORT_LIB \$IMPORT_LIB
6970 EOF
6971                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6972 CF_EOF
6973                 chmod +x mk_shared_lib.sh
6974                 ;;
6975         (openbsd[2-9].*|mirbsd*)
6976                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6977                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6978                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6979                 fi
6980                 if test "$cf_cv_enable_rpath" = yes ; then
6981                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6982                 fi
6983                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6984
6985         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6986         if test "$cf_cv_shlib_version" = rel; then
6987                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6988         else
6989                 cf_cv_shared_soname='`basename $@`'
6990         fi
6991
6992                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6993                 ;;
6994         (nskJ*)
6995                 CC_SHARED_OPTS=
6996                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6997                 ;;
6998         (nskL*)
6999                 CC_SHARED_OPTS=
7000                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
7001                 ;;
7002         (nto-qnx*|openbsd*|freebsd[12].*)
7003                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7004                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
7005                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7006                 ;;
7007         (dragonfly*|freebsd*)
7008                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7009                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7010                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7011                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
7012                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7013                 fi
7014
7015         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7016         if test "$cf_cv_shlib_version" = rel; then
7017                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7018         else
7019                 cf_cv_shared_soname='`basename $@`'
7020         fi
7021
7022                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7023                 ;;
7024         (netbsd*)
7025                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7026                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7027                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7028                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7029                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7030                         if test "$cf_cv_shlib_version" = auto; then
7031                         if test -f /usr/libexec/ld.elf_so; then
7032                                 cf_cv_shlib_version=abi
7033                         else
7034                                 cf_cv_shlib_version=rel
7035                         fi
7036                         fi
7037
7038         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7039         if test "$cf_cv_shlib_version" = rel; then
7040                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7041         else
7042                 cf_cv_shared_soname='`basename $@`'
7043         fi
7044
7045                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
7046                 else
7047                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
7048                 fi
7049                 ;;
7050         (osf*|mls+*)
7051                 # tested with OSF/1 V3.2 and 'cc'
7052                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
7053                 # link with shared libs).
7054                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
7055                 case "$host_os" in
7056                 (osf4*)
7057                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
7058                         ;;
7059                 esac
7060                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
7061                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
7062                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7063                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7064                 fi
7065                 cf_cv_rm_so_locs=yes
7066                 ;;
7067         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
7068                 # tested with osr5.0.5
7069                 if test "$GCC" != yes; then
7070                         CC_SHARED_OPTS='-belf -KPIC'
7071                 fi
7072                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
7073                 if test "$cf_cv_enable_rpath" = yes ; then
7074                         # only way is to set LD_RUN_PATH but no switch for it
7075                         RUN_PATH=$libdir
7076                 fi
7077                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7078                 LINK_PROGS='LD_RUN_PATH=${libdir}'
7079                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
7080                 ;;
7081         (sunos4*)
7082                 # tested with SunOS 4.1.1 and gcc 2.7.0
7083                 if test "$GCC" != yes; then
7084                         CC_SHARED_OPTS='-KPIC'
7085                 fi
7086                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
7087                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7088                 ;;
7089         (solaris2*)
7090                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
7091                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
7092                 if test "$DFT_LWR_MODEL" = "shared" ; then
7093                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
7094                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7095                 fi
7096                 if test "$cf_cv_enable_rpath" = yes ; then
7097                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
7098                 fi
7099
7100         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7101         if test "$cf_cv_shlib_version" = rel; then
7102                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7103         else
7104                 cf_cv_shared_soname='`basename $@`'
7105         fi
7106
7107                 if test "$GCC" != yes; then
7108                         cf_save_CFLAGS="$CFLAGS"
7109                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
7110                         do
7111                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
7112                                 cat >"conftest.$ac_ext" <<_ACEOF
7113 #line 7113 "configure"
7114 #include "confdefs.h"
7115 #include <stdio.h>
7116 int
7117 main (void)
7118 {
7119 printf("Hello\\n");
7120   ;
7121   return 0;
7122 }
7123 _ACEOF
7124 rm -f "conftest.$ac_objext"
7125 if { (eval echo "$as_me:7125: \"$ac_compile\"") >&5
7126   (eval $ac_compile) 2>&5
7127   ac_status=$?
7128   echo "$as_me:7128: \$? = $ac_status" >&5
7129   (exit "$ac_status"); } &&
7130          { ac_try='test -s "conftest.$ac_objext"'
7131   { (eval echo "$as_me:7131: \"$ac_try\"") >&5
7132   (eval $ac_try) 2>&5
7133   ac_status=$?
7134   echo "$as_me:7134: \$? = $ac_status" >&5
7135   (exit "$ac_status"); }; }; then
7136   break
7137 else
7138   echo "$as_me: failed program was:" >&5
7139 cat "conftest.$ac_ext" >&5
7140 fi
7141 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7142                         done
7143                         CFLAGS="$cf_save_CFLAGS"
7144                         CC_SHARED_OPTS=$cf_shared_opts
7145                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
7146                 else
7147                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
7148                 fi
7149                 ;;
7150         (sysv5uw7*|unix_sv*)
7151                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
7152                 if test "$GCC" != yes; then
7153                         CC_SHARED_OPTS='-KPIC'
7154                 fi
7155                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
7156                 ;;
7157         (*)
7158                 CC_SHARED_OPTS='unknown'
7159                 MK_SHARED_LIB='echo unknown'
7160                 ;;
7161         esac
7162
7163         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
7164         case "$cf_cv_shlib_version" in
7165         (rel|abi)
7166                 case "$MK_SHARED_LIB" in
7167                 (*'-o $@')
7168                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
7169                         ;;
7170                 (*)
7171                         { echo "$as_me:7171: WARNING: ignored --with-shlib-version" >&5
7172 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
7173                         ;;
7174                 esac
7175                 ;;
7176         esac
7177
7178         if test -n "$cf_try_cflags"
7179         then
7180 cat > conftest.$ac_ext <<EOF
7181 #line 7181 "${as_me:-configure}"
7182 #include <stdio.h>
7183 int main(int argc, char *argv[])
7184 {
7185         printf("hello\\n");
7186         return (argv[argc-1] == 0) ;
7187 }
7188 EOF
7189                 cf_save_CFLAGS="$CFLAGS"
7190                 for cf_opt in $cf_try_cflags
7191                 do
7192                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
7193                         echo "$as_me:7193: checking if CFLAGS option -$cf_opt works" >&5
7194 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
7195                         if { (eval echo "$as_me:7195: \"$ac_compile\"") >&5
7196   (eval $ac_compile) 2>&5
7197   ac_status=$?
7198   echo "$as_me:7198: \$? = $ac_status" >&5
7199   (exit "$ac_status"); }; then
7200                                 echo "$as_me:7200: result: yes" >&5
7201 echo "${ECHO_T}yes" >&6
7202                                 cf_save_CFLAGS="$CFLAGS"
7203                         else
7204                                 echo "$as_me:7204: result: no" >&5
7205 echo "${ECHO_T}no" >&6
7206                         fi
7207                 done
7208                 CFLAGS="$cf_save_CFLAGS"
7209         fi
7210
7211         # RPATH_LIST is a colon-separated list of directories
7212         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
7213         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
7214
7215         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
7216
7217         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
7218
7219 echo "${as_me:-configure}:7219: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
7220
7221         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7222
7223 echo "${as_me:-configure}:7223: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7224
7225 for model in $cf_list_models ; do
7226         case "$model" in
7227         (libtool)
7228
7229 echo "$as_me:7229: checking for additional libtool options" >&5
7230 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
7231
7232 # Check whether --with-libtool-opts or --without-libtool-opts was given.
7233 if test "${with_libtool_opts+set}" = set; then
7234   withval="$with_libtool_opts"
7235   with_libtool_opts=$withval
7236 else
7237   with_libtool_opts=no
7238 fi;
7239 echo "$as_me:7239: result: $with_libtool_opts" >&5
7240 echo "${ECHO_T}$with_libtool_opts" >&6
7241
7242 case .$with_libtool_opts in
7243 (.yes|.no|.)
7244         ;;
7245 (*)
7246         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
7247         ;;
7248 esac
7249
7250 echo "$as_me:7250: checking if exported-symbols file should be used" >&5
7251 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
7252
7253 # Check whether --with-export-syms or --without-export-syms was given.
7254 if test "${with_export_syms+set}" = set; then
7255   withval="$with_export_syms"
7256   with_export_syms=$withval
7257 else
7258   with_export_syms=no
7259 fi;
7260 if test "x$with_export_syms" = xyes
7261 then
7262         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
7263
7264 fi
7265 echo "$as_me:7265: result: $with_export_syms" >&5
7266 echo "${ECHO_T}$with_export_syms" >&6
7267 if test "x$with_export_syms" != xno
7268 then
7269         EXPORT_SYMS="-export-symbols $with_export_syms"
7270
7271 fi
7272
7273                 ;;
7274         (shared)
7275                 if test "$CC_SHARED_OPTS" = "unknown"; then
7276                         { { echo "$as_me:7276: error: Shared libraries are not supported in this version" >&5
7277 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
7278    { (exit 1); exit 1; }; }
7279                 fi
7280                 # workaround for inept transition to PIE vs PIC...
7281                 echo "$as_me:7281: checking if current CFLAGS link properly" >&5
7282 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
7283                 cat >"conftest.$ac_ext" <<_ACEOF
7284 #line 7284 "configure"
7285 #include "confdefs.h"
7286 #include <stdio.h>
7287 int
7288 main (void)
7289 {
7290 printf("Hello work\\n");
7291   ;
7292   return 0;
7293 }
7294 _ACEOF
7295 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7296 if { (eval echo "$as_me:7296: \"$ac_link\"") >&5
7297   (eval $ac_link) 2>&5
7298   ac_status=$?
7299   echo "$as_me:7299: \$? = $ac_status" >&5
7300   (exit "$ac_status"); } &&
7301          { ac_try='test -s "conftest$ac_exeext"'
7302   { (eval echo "$as_me:7302: \"$ac_try\"") >&5
7303   (eval $ac_try) 2>&5
7304   ac_status=$?
7305   echo "$as_me:7305: \$? = $ac_status" >&5
7306   (exit "$ac_status"); }; }; then
7307   cf_cflags_work=yes
7308 else
7309   echo "$as_me: failed program was:" >&5
7310 cat "conftest.$ac_ext" >&5
7311 cf_cflags_work=no
7312 fi
7313 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7314                 echo "$as_me:7314: result: $cf_cflags_work" >&5
7315 echo "${ECHO_T}$cf_cflags_work" >&6
7316                 if test "$cf_cflags_work" = no
7317                 then
7318                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
7319
7320 echo "${as_me:-configure}:7320: testing try to work around by appending shared-options ..." 1>&5
7321
7322                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
7323                 fi
7324
7325 echo "$as_me:7325: checking if versioned-symbols file should be used" >&5
7326 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
7327
7328 # Check whether --with-versioned-syms or --without-versioned-syms was given.
7329 if test "${with_versioned_syms+set}" = set; then
7330   withval="$with_versioned_syms"
7331   with_versioned_syms=$withval
7332 else
7333   with_versioned_syms=no
7334 fi;
7335 case "x$with_versioned_syms" in
7336 (xyes)
7337         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
7338
7339         ;;
7340 (xno)
7341         ;;
7342 (x/*)
7343         test -f "$with_versioned_syms" || { { echo "$as_me:7343: error: expected a filename: $with_versioned_syms" >&5
7344 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
7345    { (exit 1); exit 1; }; }
7346         ;;
7347 (*)
7348         test -f "$with_versioned_syms" || { { echo "$as_me:7348: error: expected a filename: $with_versioned_syms" >&5
7349 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
7350    { (exit 1); exit 1; }; }
7351         with_versioned_syms=`pwd`/"$with_versioned_syms"
7352         ;;
7353 esac
7354 echo "$as_me:7354: result: $with_versioned_syms" >&5
7355 echo "${ECHO_T}$with_versioned_syms" >&6
7356
7357 RESULTING_SYMS=
7358 VERSIONED_SYMS=
7359 WILDCARD_SYMS=
7360
7361 if test "x$with_versioned_syms" != xno
7362 then
7363         RESULTING_SYMS=$with_versioned_syms
7364         case "x$MK_SHARED_LIB" in
7365         (*-Wl,*)
7366                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
7367                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
7368                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7369
7370 echo "${as_me:-configure}:7370: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7371
7372                 ;;
7373         (*-dy\ *)
7374                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
7375                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
7376                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7377
7378 echo "${as_me:-configure}:7378: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7379
7380                 ;;
7381         (*)
7382                 { echo "$as_me:7382: WARNING: this system does not support versioned-symbols" >&5
7383 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
7384                 ;;
7385         esac
7386
7387         # Linux ld can selectively override scope, e.g., of symbols beginning with
7388         # "_" by first declaring some as global, and then using a wildcard to
7389         # declare the others as local.  Some other loaders cannot do this.  Check
7390         # by constructing a (very) simple shared library and inspecting its
7391         # symbols.
7392         if test "x$VERSIONED_SYMS" != "x"
7393         then
7394                 echo "$as_me:7394: checking if wildcards can be used to selectively omit symbols" >&5
7395 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
7396                 WILDCARD_SYMS=no
7397
7398                 # make sources
7399                 rm -f conftest.*
7400
7401                 cat >conftest.ver <<EOF
7402 module_1.0 {
7403 global:
7404         globalf1;
7405 local:
7406         localf1;
7407 };
7408 module_2.0 {
7409 global:
7410         globalf2;
7411 local:
7412         localf2;
7413         _*;
7414 } module_1.0;
7415 submodule_1.0 {
7416 global:
7417         subglobalf1;
7418         _ismissing;
7419 local:
7420         sublocalf1;
7421 };
7422 submodule_2.0 {
7423 global:
7424         subglobalf2;
7425 local:
7426         sublocalf2;
7427         _*;
7428 } submodule_1.0;
7429 EOF
7430                 cat >conftest.$ac_ext <<EOF
7431 #line 7431 "configure"
7432 int     _ismissing(void) { return 1; }
7433 int     _localf1(void) { return 1; }
7434 int     _localf2(void) { return 2; }
7435 int     globalf1(void) { return 1; }
7436 int     globalf2(void) { return 2; }
7437 int     _sublocalf1(void) { return 1; }
7438 int     _sublocalf2(void) { return 2; }
7439 int     subglobalf1(void) { return 1; }
7440 int     subglobalf2(void) { return 2; }
7441 EOF
7442                 cat >conftest.mk <<EOF
7443 CC=${CC}
7444 CFLAGS=${CFLAGS}
7445 CPPFLAGS=${CPPFLAGS}
7446 LDFLAGS=${LDFLAGS}
7447 LIBS=${LIBS}
7448 VERSIONED_SYMS=${VERSIONED_SYMS}
7449 RESULTING_SYMS=conftest.ver
7450 MK_SHARED_LIB=${MK_SHARED_LIB}
7451 conftest.so: conftest.$ac_cv_objext
7452                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
7453 EOF
7454
7455                 # compile source, make library
7456                 if make -f conftest.mk 2>&5 >/dev/null
7457                 then
7458                         # test for missing symbol in either Data or Text section
7459                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
7460                         test -n "$cf_missing" && WILDCARD_SYMS=yes
7461                 fi
7462                 echo "$as_me:7462: result: $WILDCARD_SYMS" >&5
7463 echo "${ECHO_T}$WILDCARD_SYMS" >&6
7464                 rm -f conftest.*
7465         fi
7466 fi
7467
7468                 ;;
7469         esac
7470 done
7471
7472 ### Checks for special libraries, must be done up-front.
7473 SHLIB_LIST=""
7474
7475 echo "$as_me:7475: checking if you want to link with the GPM mouse library" >&5
7476 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
7477
7478 # Check whether --with-gpm or --without-gpm was given.
7479 if test "${with_gpm+set}" = set; then
7480   withval="$with_gpm"
7481   with_gpm=$withval
7482 else
7483   with_gpm=maybe
7484 fi;
7485 echo "$as_me:7485: result: $with_gpm" >&5
7486 echo "${ECHO_T}$with_gpm" >&6
7487
7488 if test "$with_gpm" != no ; then
7489         echo "$as_me:7489: checking for gpm.h" >&5
7490 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
7491 if test "${ac_cv_header_gpm_h+set}" = set; then
7492   echo $ECHO_N "(cached) $ECHO_C" >&6
7493 else
7494   cat >"conftest.$ac_ext" <<_ACEOF
7495 #line 7495 "configure"
7496 #include "confdefs.h"
7497 #include <gpm.h>
7498 _ACEOF
7499 if { (eval echo "$as_me:7499: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7500   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7501   ac_status=$?
7502   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7503   rm -f conftest.er1
7504   cat conftest.err >&5
7505   echo "$as_me:7505: \$? = $ac_status" >&5
7506   (exit "$ac_status"); } >/dev/null; then
7507   if test -s conftest.err; then
7508     ac_cpp_err=$ac_c_preproc_warn_flag
7509   else
7510     ac_cpp_err=
7511   fi
7512 else
7513   ac_cpp_err=yes
7514 fi
7515 if test -z "$ac_cpp_err"; then
7516   ac_cv_header_gpm_h=yes
7517 else
7518   echo "$as_me: failed program was:" >&5
7519   cat "conftest.$ac_ext" >&5
7520   ac_cv_header_gpm_h=no
7521 fi
7522 rm -f conftest.err "conftest.$ac_ext"
7523 fi
7524 echo "$as_me:7524: result: $ac_cv_header_gpm_h" >&5
7525 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
7526 if test "$ac_cv_header_gpm_h" = yes; then
7527
7528 cat >>confdefs.h <<\EOF
7529 #define HAVE_GPM_H 1
7530 EOF
7531
7532                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
7533                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
7534
7535 echo "${as_me:-configure}:7535: testing assuming we really have GPM library ..." 1>&5
7536
7537 cat >>confdefs.h <<\EOF
7538 #define HAVE_LIBGPM 1
7539 EOF
7540
7541                         with_gpm=yes
7542                 else
7543                         echo "$as_me:7543: checking for Gpm_Open in -lgpm" >&5
7544 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7545 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7546   echo $ECHO_N "(cached) $ECHO_C" >&6
7547 else
7548   ac_check_lib_save_LIBS=$LIBS
7549 LIBS="-lgpm  $LIBS"
7550 cat >"conftest.$ac_ext" <<_ACEOF
7551 #line 7551 "configure"
7552 #include "confdefs.h"
7553
7554 /* Override any gcc2 internal prototype to avoid an error.  */
7555 #ifdef __cplusplus
7556 extern "C"
7557 #endif
7558 /* We use char because int might match the return type of a gcc2
7559    builtin and then its argument prototype would still apply.  */
7560 char Gpm_Open ();
7561 int
7562 main (void)
7563 {
7564 Gpm_Open ();
7565   ;
7566   return 0;
7567 }
7568 _ACEOF
7569 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7570 if { (eval echo "$as_me:7570: \"$ac_link\"") >&5
7571   (eval $ac_link) 2>&5
7572   ac_status=$?
7573   echo "$as_me:7573: \$? = $ac_status" >&5
7574   (exit "$ac_status"); } &&
7575          { ac_try='test -s "conftest$ac_exeext"'
7576   { (eval echo "$as_me:7576: \"$ac_try\"") >&5
7577   (eval $ac_try) 2>&5
7578   ac_status=$?
7579   echo "$as_me:7579: \$? = $ac_status" >&5
7580   (exit "$ac_status"); }; }; then
7581   ac_cv_lib_gpm_Gpm_Open=yes
7582 else
7583   echo "$as_me: failed program was:" >&5
7584 cat "conftest.$ac_ext" >&5
7585 ac_cv_lib_gpm_Gpm_Open=no
7586 fi
7587 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7588 LIBS=$ac_check_lib_save_LIBS
7589 fi
7590 echo "$as_me:7590: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7591 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7592 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
7593   with_gpm=yes
7594 else
7595
7596                                 if test "$with_gpm" = maybe; then
7597                                         { echo "$as_me:7597: WARNING: Cannot link with GPM library" >&5
7598 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
7599                                         with_gpm=no
7600                                 else
7601                                         { { echo "$as_me:7601: error: Cannot link with GPM library" >&5
7602 echo "$as_me: error: Cannot link with GPM library" >&2;}
7603    { (exit 1); exit 1; }; }
7604                                 fi
7605
7606 fi
7607
7608                 fi
7609
7610 else
7611
7612                 test "$with_gpm" != maybe && { echo "$as_me:7612: WARNING: Cannot find GPM header" >&5
7613 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
7614                 with_gpm=no
7615
7616 fi
7617
7618 fi
7619
7620 if test "$with_gpm" != no ; then
7621         echo "$as_me:7621: checking if you want to load GPM dynamically" >&5
7622 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
7623
7624 # Check whether --with-dlsym or --without-dlsym was given.
7625 if test "${with_dlsym+set}" = set; then
7626   withval="$with_dlsym"
7627   with_dlsym=$withval
7628 else
7629   with_dlsym=yes
7630 fi;
7631         echo "$as_me:7631: result: $with_dlsym" >&5
7632 echo "${ECHO_T}$with_dlsym" >&6
7633         if test "x$with_dlsym" = xyes ; then
7634
7635 cf_have_dlsym=no
7636 echo "$as_me:7636: checking for dlsym" >&5
7637 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7638 if test "${ac_cv_func_dlsym+set}" = set; then
7639   echo $ECHO_N "(cached) $ECHO_C" >&6
7640 else
7641   cat >"conftest.$ac_ext" <<_ACEOF
7642 #line 7642 "configure"
7643 #include "confdefs.h"
7644 #define dlsym autoconf_temporary
7645 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7646 #undef dlsym
7647
7648 #ifdef __cplusplus
7649 extern "C"
7650 #endif
7651
7652 /* We use char because int might match the return type of a gcc2
7653    builtin and then its argument prototype would still apply.  */
7654 char dlsym (void);
7655
7656 int
7657 main (void)
7658 {
7659
7660 /* The GNU C library defines stubs for functions which it implements
7661     to always fail with ENOSYS.  Some functions are actually named
7662     something starting with __ and the normal name is an alias.  */
7663 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7664 #error found stub for dlsym
7665 #endif
7666
7667         return dlsym ();
7668   ;
7669   return 0;
7670 }
7671 _ACEOF
7672 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7673 if { (eval echo "$as_me:7673: \"$ac_link\"") >&5
7674   (eval $ac_link) 2>&5
7675   ac_status=$?
7676   echo "$as_me:7676: \$? = $ac_status" >&5
7677   (exit "$ac_status"); } &&
7678          { ac_try='test -s "conftest$ac_exeext"'
7679   { (eval echo "$as_me:7679: \"$ac_try\"") >&5
7680   (eval $ac_try) 2>&5
7681   ac_status=$?
7682   echo "$as_me:7682: \$? = $ac_status" >&5
7683   (exit "$ac_status"); }; }; then
7684   ac_cv_func_dlsym=yes
7685 else
7686   echo "$as_me: failed program was:" >&5
7687 cat "conftest.$ac_ext" >&5
7688 ac_cv_func_dlsym=no
7689 fi
7690 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7691 fi
7692 echo "$as_me:7692: result: $ac_cv_func_dlsym" >&5
7693 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7694 if test "$ac_cv_func_dlsym" = yes; then
7695   cf_have_dlsym=yes
7696 else
7697
7698 cf_have_libdl=no
7699 echo "$as_me:7699: checking for dlsym in -ldl" >&5
7700 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7701 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7702   echo $ECHO_N "(cached) $ECHO_C" >&6
7703 else
7704   ac_check_lib_save_LIBS=$LIBS
7705 LIBS="-ldl  $LIBS"
7706 cat >"conftest.$ac_ext" <<_ACEOF
7707 #line 7707 "configure"
7708 #include "confdefs.h"
7709
7710 /* Override any gcc2 internal prototype to avoid an error.  */
7711 #ifdef __cplusplus
7712 extern "C"
7713 #endif
7714 /* We use char because int might match the return type of a gcc2
7715    builtin and then its argument prototype would still apply.  */
7716 char dlsym ();
7717 int
7718 main (void)
7719 {
7720 dlsym ();
7721   ;
7722   return 0;
7723 }
7724 _ACEOF
7725 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7726 if { (eval echo "$as_me:7726: \"$ac_link\"") >&5
7727   (eval $ac_link) 2>&5
7728   ac_status=$?
7729   echo "$as_me:7729: \$? = $ac_status" >&5
7730   (exit "$ac_status"); } &&
7731          { ac_try='test -s "conftest$ac_exeext"'
7732   { (eval echo "$as_me:7732: \"$ac_try\"") >&5
7733   (eval $ac_try) 2>&5
7734   ac_status=$?
7735   echo "$as_me:7735: \$? = $ac_status" >&5
7736   (exit "$ac_status"); }; }; then
7737   ac_cv_lib_dl_dlsym=yes
7738 else
7739   echo "$as_me: failed program was:" >&5
7740 cat "conftest.$ac_ext" >&5
7741 ac_cv_lib_dl_dlsym=no
7742 fi
7743 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7744 LIBS=$ac_check_lib_save_LIBS
7745 fi
7746 echo "$as_me:7746: result: $ac_cv_lib_dl_dlsym" >&5
7747 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7748 if test "$ac_cv_lib_dl_dlsym" = yes; then
7749
7750         cf_have_dlsym=yes
7751         cf_have_libdl=yes
7752 fi
7753
7754 fi
7755
7756 if test "$cf_have_dlsym" = yes ; then
7757         test "$cf_have_libdl" = yes && {
7758 cf_add_libs="$LIBS"
7759 # reverse order
7760 cf_add_0lib=
7761 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7762 # filter duplicates
7763 for cf_add_1lib in $cf_add_0lib; do
7764         for cf_add_2lib in $cf_add_libs; do
7765                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7766                         cf_add_1lib=
7767                         break
7768                 fi
7769         done
7770         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7771 done
7772 LIBS="$cf_add_libs"
7773  }
7774
7775         echo "$as_me:7775: checking whether able to link to dl*() functions" >&5
7776 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7777         cat >"conftest.$ac_ext" <<_ACEOF
7778 #line 7778 "configure"
7779 #include "confdefs.h"
7780 #include <dlfcn.h>
7781 int
7782 main (void)
7783 {
7784
7785                 void *obj;
7786                 if ((obj = dlopen("filename", 0)) != 0) {
7787                         if (dlsym(obj, "symbolname") == 0) {
7788                         dlclose(obj);
7789                         }
7790                 }
7791   ;
7792   return 0;
7793 }
7794 _ACEOF
7795 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7796 if { (eval echo "$as_me:7796: \"$ac_link\"") >&5
7797   (eval $ac_link) 2>&5
7798   ac_status=$?
7799   echo "$as_me:7799: \$? = $ac_status" >&5
7800   (exit "$ac_status"); } &&
7801          { ac_try='test -s "conftest$ac_exeext"'
7802   { (eval echo "$as_me:7802: \"$ac_try\"") >&5
7803   (eval $ac_try) 2>&5
7804   ac_status=$?
7805   echo "$as_me:7805: \$? = $ac_status" >&5
7806   (exit "$ac_status"); }; }; then
7807
7808 cat >>confdefs.h <<\EOF
7809 #define HAVE_LIBDL 1
7810 EOF
7811
7812 else
7813   echo "$as_me: failed program was:" >&5
7814 cat "conftest.$ac_ext" >&5
7815
7816                 { { echo "$as_me:7816: error: Cannot link test program for libdl" >&5
7817 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7818    { (exit 1); exit 1; }; }
7819 fi
7820 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7821         echo "$as_me:7821: result: ok" >&5
7822 echo "${ECHO_T}ok" >&6
7823 else
7824         { { echo "$as_me:7824: error: Cannot find dlsym function" >&5
7825 echo "$as_me: error: Cannot find dlsym function" >&2;}
7826    { (exit 1); exit 1; }; }
7827 fi
7828
7829                 if test "x$with_gpm" != xyes ; then
7830                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7831
7832 echo "${as_me:-configure}:7832: testing assuming soname for gpm is $with_gpm ..." 1>&5
7833
7834                         cf_cv_gpm_soname="$with_gpm"
7835                 else
7836
7837 echo "$as_me:7837: checking for soname of gpm library" >&5
7838 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7839 if test "${cf_cv_gpm_soname+set}" = set; then
7840   echo $ECHO_N "(cached) $ECHO_C" >&6
7841 else
7842
7843 cf_cv_gpm_soname=unknown
7844 if test "$cross_compiling" != yes ; then
7845 cat >conftest.$ac_ext <<CF_EOF
7846 #include <gpm.h>
7847 int main(void)
7848 {
7849 if (Gpm_Open(0,0)) Gpm_Close();
7850         ${cf_cv_main_return:-return}(0);
7851 }
7852 CF_EOF
7853 cf_save_LIBS="$LIBS"
7854
7855 cf_add_libs="$LIBS"
7856 # reverse order
7857 cf_add_0lib=
7858 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7859 # filter duplicates
7860 for cf_add_1lib in $cf_add_0lib; do
7861         for cf_add_2lib in $cf_add_libs; do
7862                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7863                         cf_add_1lib=
7864                         break
7865                 fi
7866         done
7867         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7868 done
7869 LIBS="$cf_add_libs"
7870
7871         if { (eval echo "$as_me:7871: \"$ac_compile\"") >&5
7872   (eval $ac_compile) 2>&5
7873   ac_status=$?
7874   echo "$as_me:7874: \$? = $ac_status" >&5
7875   (exit "$ac_status"); } ; then
7876                 if { (eval echo "$as_me:7876: \"$ac_link\"") >&5
7877   (eval $ac_link) 2>&5
7878   ac_status=$?
7879   echo "$as_me:7879: \$? = $ac_status" >&5
7880   (exit "$ac_status"); } ; then
7881                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7882                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7883                 fi
7884         fi
7885 rm -rf ./conftest*
7886 LIBS="$cf_save_LIBS"
7887 fi
7888
7889 fi
7890 echo "$as_me:7890: result: $cf_cv_gpm_soname" >&5
7891 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7892
7893                 fi
7894                 test "$cf_cv_gpm_soname" != "unknown" &&
7895 cat >>confdefs.h <<EOF
7896 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7897 EOF
7898
7899                 SHLIB_LIST="-ldl $SHLIB_LIST"
7900
7901 cf_add_libs="$PRIVATE_LIBS"
7902 # reverse order
7903 cf_add_0lib=
7904 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7905 # filter duplicates
7906 for cf_add_1lib in $cf_add_0lib; do
7907         for cf_add_2lib in $cf_add_libs; do
7908                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7909                         cf_add_1lib=
7910                         break
7911                 fi
7912         done
7913         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7914 done
7915 PRIVATE_LIBS="$cf_add_libs"
7916
7917         else
7918                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7919
7920 cf_add_libs="$TEST_LIBS"
7921 # reverse order
7922 cf_add_0lib=
7923 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7924 # filter duplicates
7925 for cf_add_1lib in $cf_add_0lib; do
7926         for cf_add_2lib in $cf_add_libs; do
7927                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7928                         cf_add_1lib=
7929                         break
7930                 fi
7931         done
7932         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7933 done
7934 TEST_LIBS="$cf_add_libs"
7935
7936 cf_add_libs="$PRIVATE_LIBS"
7937 # reverse order
7938 cf_add_0lib=
7939 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7940 # filter duplicates
7941 for cf_add_1lib in $cf_add_0lib; do
7942         for cf_add_2lib in $cf_add_libs; do
7943                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7944                         cf_add_1lib=
7945                         break
7946                 fi
7947         done
7948         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7949 done
7950 PRIVATE_LIBS="$cf_add_libs"
7951
7952         fi
7953
7954 cat >>confdefs.h <<\EOF
7955 #define HAVE_LIBGPM 1
7956 EOF
7957
7958 echo "$as_me:7958: checking for Gpm_Wgetch in -lgpm" >&5
7959 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7960 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7961   echo $ECHO_N "(cached) $ECHO_C" >&6
7962 else
7963   ac_check_lib_save_LIBS=$LIBS
7964 LIBS="-lgpm  $LIBS"
7965 cat >"conftest.$ac_ext" <<_ACEOF
7966 #line 7966 "configure"
7967 #include "confdefs.h"
7968
7969 /* Override any gcc2 internal prototype to avoid an error.  */
7970 #ifdef __cplusplus
7971 extern "C"
7972 #endif
7973 /* We use char because int might match the return type of a gcc2
7974    builtin and then its argument prototype would still apply.  */
7975 char Gpm_Wgetch ();
7976 int
7977 main (void)
7978 {
7979 Gpm_Wgetch ();
7980   ;
7981   return 0;
7982 }
7983 _ACEOF
7984 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7985 if { (eval echo "$as_me:7985: \"$ac_link\"") >&5
7986   (eval $ac_link) 2>&5
7987   ac_status=$?
7988   echo "$as_me:7988: \$? = $ac_status" >&5
7989   (exit "$ac_status"); } &&
7990          { ac_try='test -s "conftest$ac_exeext"'
7991   { (eval echo "$as_me:7991: \"$ac_try\"") >&5
7992   (eval $ac_try) 2>&5
7993   ac_status=$?
7994   echo "$as_me:7994: \$? = $ac_status" >&5
7995   (exit "$ac_status"); }; }; then
7996   ac_cv_lib_gpm_Gpm_Wgetch=yes
7997 else
7998   echo "$as_me: failed program was:" >&5
7999 cat "conftest.$ac_ext" >&5
8000 ac_cv_lib_gpm_Gpm_Wgetch=no
8001 fi
8002 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8003 LIBS=$ac_check_lib_save_LIBS
8004 fi
8005 echo "$as_me:8005: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
8006 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
8007 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
8008
8009 echo "$as_me:8009: checking if GPM is weakly bound to curses library" >&5
8010 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
8011 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
8012   echo $ECHO_N "(cached) $ECHO_C" >&6
8013 else
8014
8015 cf_cv_check_gpm_wgetch=unknown
8016 if test "$cross_compiling" != yes ; then
8017
8018 cat >conftest.$ac_ext <<CF_EOF
8019 #include <gpm.h>
8020 int main(void)
8021 {
8022         Gpm_Wgetch();
8023         ${cf_cv_main_return:-return}(0);
8024 }
8025 CF_EOF
8026
8027         cf_save_LIBS="$LIBS"
8028         # This only works if we can look at the symbol table.  If a shared
8029         # library is stripped for install, we cannot use that.  So we're forced
8030         # to rely on the static library, noting that some packagers may not
8031         # include it.
8032         LIBS="-static -lgpm -dynamic $LIBS"
8033         if { (eval echo "$as_me:8033: \"$ac_compile\"") >&5
8034   (eval $ac_compile) 2>&5
8035   ac_status=$?
8036   echo "$as_me:8036: \$? = $ac_status" >&5
8037   (exit "$ac_status"); } ; then
8038                 if { (eval echo "$as_me:8038: \"$ac_link\"") >&5
8039   (eval $ac_link) 2>&5
8040   ac_status=$?
8041   echo "$as_me:8041: \$? = $ac_status" >&5
8042   (exit "$ac_status"); } ; then
8043                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
8044                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
8045                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
8046                 fi
8047         fi
8048         rm -rf ./conftest*
8049         LIBS="$cf_save_LIBS"
8050 fi
8051
8052 fi
8053 echo "$as_me:8053: result: $cf_cv_check_gpm_wgetch" >&5
8054 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
8055
8056 if test "$cf_cv_check_gpm_wgetch" != yes ; then
8057         { echo "$as_me:8057: WARNING: GPM library is already linked with curses - read the FAQ" >&5
8058 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
8059 fi
8060
8061 fi
8062
8063 fi
8064
8065 echo "$as_me:8065: checking if you want to use PCRE2 for regular-expressions" >&5
8066 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
8067
8068 # Check whether --with-pcre2 or --without-pcre2 was given.
8069 if test "${with_pcre2+set}" = set; then
8070   withval="$with_pcre2"
8071
8072 fi;
8073 test -z "$with_pcre2" && with_pcre2=no
8074 echo "$as_me:8074: result: $with_pcre2" >&5
8075 echo "${ECHO_T}$with_pcre2" >&6
8076
8077 if test "x$with_pcre2" != xno ; then
8078         cf_with_pcre2_ok=no
8079         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
8080         do
8081
8082 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
8083         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
8084
8085 echo "${as_me:-configure}:8085: testing found package $cf_with_pcre2 ..." 1>&5
8086
8087         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
8088         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
8089         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
8090
8091 echo "${as_me:-configure}:8091: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
8092
8093         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
8094
8095 echo "${as_me:-configure}:8095: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
8096
8097 cf_fix_cppflags=no
8098 cf_new_cflags=
8099 cf_new_cppflags=
8100 cf_new_extra_cppflags=
8101
8102 for cf_add_cflags in $cf_pkgconfig_incs
8103 do
8104 case "$cf_fix_cppflags" in
8105 (no)
8106         case "$cf_add_cflags" in
8107         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8108                 case "$cf_add_cflags" in
8109                 (-D*)
8110                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8111
8112                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8113                                 && test -z "${cf_tst_cflags}" \
8114                                 && cf_fix_cppflags=yes
8115
8116                         if test "$cf_fix_cppflags" = yes ; then
8117
8118         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8119         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8120
8121                                 continue
8122                         elif test "${cf_tst_cflags}" = "\"'" ; then
8123
8124         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8125         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8126
8127                                 continue
8128                         fi
8129                         ;;
8130                 esac
8131                 case "$CPPFLAGS" in
8132                 (*$cf_add_cflags)
8133                         ;;
8134                 (*)
8135                         case "$cf_add_cflags" in
8136                         (-D*)
8137                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8138
8139 CPPFLAGS=`echo "$CPPFLAGS" | \
8140         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8141                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8142
8143                                 ;;
8144                         esac
8145
8146         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8147         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8148
8149                         ;;
8150                 esac
8151                 ;;
8152         (*)
8153
8154         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8155         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8156
8157                 ;;
8158         esac
8159         ;;
8160 (yes)
8161
8162         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8163         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8164
8165         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8166
8167         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8168                 && test -z "${cf_tst_cflags}" \
8169                 && cf_fix_cppflags=no
8170         ;;
8171 esac
8172 done
8173
8174 if test -n "$cf_new_cflags" ; then
8175
8176         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8177         CFLAGS="${CFLAGS}$cf_new_cflags"
8178
8179 fi
8180
8181 if test -n "$cf_new_cppflags" ; then
8182
8183         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8184         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8185
8186 fi
8187
8188 if test -n "$cf_new_extra_cppflags" ; then
8189
8190         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8191         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8192
8193 fi
8194
8195 cf_add_libs="$LIBS"
8196 # reverse order
8197 cf_add_0lib=
8198 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8199 # filter duplicates
8200 for cf_add_1lib in $cf_add_0lib; do
8201         for cf_add_2lib in $cf_add_libs; do
8202                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8203                         cf_add_1lib=
8204                         break
8205                 fi
8206         done
8207         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8208 done
8209 LIBS="$cf_add_libs"
8210
8211         cf_with_pcre2_ok=yes; break
8212 else
8213         cf_pkgconfig_incs=
8214         cf_pkgconfig_libs=
8215         :
8216 fi
8217
8218         done
8219         cf_with_pcre2_ok=yes || { { echo "$as_me:8219: error: Cannot find PCRE2 library" >&5
8220 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
8221    { (exit 1); exit 1; }; }
8222
8223 cat >>confdefs.h <<\EOF
8224 #define HAVE_LIB_PCRE2 1
8225 EOF
8226
8227         # if pkgconfig gave no results, look for the libraries directly
8228         case "$LIBS" in
8229         (*pcre2-posix*|*pcreposix*)
8230                 ;;
8231         (*)
8232                 echo "$as_me:8232: checking for regcomp in -lpcre2-posix" >&5
8233 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
8234 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
8235   echo $ECHO_N "(cached) $ECHO_C" >&6
8236 else
8237   ac_check_lib_save_LIBS=$LIBS
8238 LIBS="-lpcre2-posix  $LIBS"
8239 cat >"conftest.$ac_ext" <<_ACEOF
8240 #line 8240 "configure"
8241 #include "confdefs.h"
8242
8243 /* Override any gcc2 internal prototype to avoid an error.  */
8244 #ifdef __cplusplus
8245 extern "C"
8246 #endif
8247 /* We use char because int might match the return type of a gcc2
8248    builtin and then its argument prototype would still apply.  */
8249 char regcomp ();
8250 int
8251 main (void)
8252 {
8253 regcomp ();
8254   ;
8255   return 0;
8256 }
8257 _ACEOF
8258 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8259 if { (eval echo "$as_me:8259: \"$ac_link\"") >&5
8260   (eval $ac_link) 2>&5
8261   ac_status=$?
8262   echo "$as_me:8262: \$? = $ac_status" >&5
8263   (exit "$ac_status"); } &&
8264          { ac_try='test -s "conftest$ac_exeext"'
8265   { (eval echo "$as_me:8265: \"$ac_try\"") >&5
8266   (eval $ac_try) 2>&5
8267   ac_status=$?
8268   echo "$as_me:8268: \$? = $ac_status" >&5
8269   (exit "$ac_status"); }; }; then
8270   ac_cv_lib_pcre2_posix_regcomp=yes
8271 else
8272   echo "$as_me: failed program was:" >&5
8273 cat "conftest.$ac_ext" >&5
8274 ac_cv_lib_pcre2_posix_regcomp=no
8275 fi
8276 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8277 LIBS=$ac_check_lib_save_LIBS
8278 fi
8279 echo "$as_me:8279: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
8280 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
8281 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
8282
8283 cf_add_libs="$LIBS"
8284 # reverse order
8285 cf_add_0lib=
8286 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8287 # filter duplicates
8288 for cf_add_1lib in $cf_add_0lib; do
8289         for cf_add_2lib in $cf_add_libs; do
8290                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8291                         cf_add_1lib=
8292                         break
8293                 fi
8294         done
8295         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8296 done
8297 LIBS="$cf_add_libs"
8298
8299 else
8300   echo "$as_me:8300: checking for regcomp in -lpcreposix" >&5
8301 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
8302 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
8303   echo $ECHO_N "(cached) $ECHO_C" >&6
8304 else
8305   ac_check_lib_save_LIBS=$LIBS
8306 LIBS="-lpcreposix  $LIBS"
8307 cat >"conftest.$ac_ext" <<_ACEOF
8308 #line 8308 "configure"
8309 #include "confdefs.h"
8310
8311 /* Override any gcc2 internal prototype to avoid an error.  */
8312 #ifdef __cplusplus
8313 extern "C"
8314 #endif
8315 /* We use char because int might match the return type of a gcc2
8316    builtin and then its argument prototype would still apply.  */
8317 char regcomp ();
8318 int
8319 main (void)
8320 {
8321 regcomp ();
8322   ;
8323   return 0;
8324 }
8325 _ACEOF
8326 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8327 if { (eval echo "$as_me:8327: \"$ac_link\"") >&5
8328   (eval $ac_link) 2>&5
8329   ac_status=$?
8330   echo "$as_me:8330: \$? = $ac_status" >&5
8331   (exit "$ac_status"); } &&
8332          { ac_try='test -s "conftest$ac_exeext"'
8333   { (eval echo "$as_me:8333: \"$ac_try\"") >&5
8334   (eval $ac_try) 2>&5
8335   ac_status=$?
8336   echo "$as_me:8336: \$? = $ac_status" >&5
8337   (exit "$ac_status"); }; }; then
8338   ac_cv_lib_pcreposix_regcomp=yes
8339 else
8340   echo "$as_me: failed program was:" >&5
8341 cat "conftest.$ac_ext" >&5
8342 ac_cv_lib_pcreposix_regcomp=no
8343 fi
8344 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8345 LIBS=$ac_check_lib_save_LIBS
8346 fi
8347 echo "$as_me:8347: result: $ac_cv_lib_pcreposix_regcomp" >&5
8348 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
8349 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
8350
8351 cf_add_libs="$LIBS"
8352 # reverse order
8353 cf_add_0lib=
8354 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8355 # filter duplicates
8356 for cf_add_1lib in $cf_add_0lib; do
8357         for cf_add_2lib in $cf_add_libs; do
8358                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8359                         cf_add_1lib=
8360                         break
8361                 fi
8362         done
8363         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8364 done
8365 LIBS="$cf_add_libs"
8366
8367 else
8368   { { echo "$as_me:8368: error: Cannot find PCRE2 POSIX library" >&5
8369 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
8370    { (exit 1); exit 1; }; }
8371 fi
8372
8373 fi
8374
8375                 ;;
8376         esac
8377
8378         # either way, check for the library header files
8379
8380 for ac_header in pcre2posix.h pcreposix.h
8381 do
8382 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8383 echo "$as_me:8383: checking for $ac_header" >&5
8384 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8385 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8386   echo $ECHO_N "(cached) $ECHO_C" >&6
8387 else
8388   cat >"conftest.$ac_ext" <<_ACEOF
8389 #line 8389 "configure"
8390 #include "confdefs.h"
8391 #include <$ac_header>
8392 _ACEOF
8393 if { (eval echo "$as_me:8393: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8394   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8395   ac_status=$?
8396   $EGREP -v '^ *\+' conftest.er1 >conftest.err
8397   rm -f conftest.er1
8398   cat conftest.err >&5
8399   echo "$as_me:8399: \$? = $ac_status" >&5
8400   (exit "$ac_status"); } >/dev/null; then
8401   if test -s conftest.err; then
8402     ac_cpp_err=$ac_c_preproc_warn_flag
8403   else
8404     ac_cpp_err=
8405   fi
8406 else
8407   ac_cpp_err=yes
8408 fi
8409 if test -z "$ac_cpp_err"; then
8410   eval "$as_ac_Header=yes"
8411 else
8412   echo "$as_me: failed program was:" >&5
8413   cat "conftest.$ac_ext" >&5
8414   eval "$as_ac_Header=no"
8415 fi
8416 rm -f conftest.err "conftest.$ac_ext"
8417 fi
8418 echo "$as_me:8418: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8419 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8420 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8421   cat >>confdefs.h <<EOF
8422 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8423 EOF
8424
8425 fi
8426 done
8427
8428 for ac_func in PCRE2regcomp
8429 do
8430 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8431 echo "$as_me:8431: checking for $ac_func" >&5
8432 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8433 if eval "test \"\${$as_ac_var+set}\" = set"; then
8434   echo $ECHO_N "(cached) $ECHO_C" >&6
8435 else
8436   cat >"conftest.$ac_ext" <<_ACEOF
8437 #line 8437 "configure"
8438 #include "confdefs.h"
8439 #define $ac_func autoconf_temporary
8440 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8441 #undef $ac_func
8442
8443 #ifdef __cplusplus
8444 extern "C"
8445 #endif
8446
8447 /* We use char because int might match the return type of a gcc2
8448    builtin and then its argument prototype would still apply.  */
8449 char $ac_func (void);
8450
8451 int
8452 main (void)
8453 {
8454
8455 /* The GNU C library defines stubs for functions which it implements
8456     to always fail with ENOSYS.  Some functions are actually named
8457     something starting with __ and the normal name is an alias.  */
8458 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8459 #error found stub for $ac_func
8460 #endif
8461
8462         return $ac_func ();
8463   ;
8464   return 0;
8465 }
8466 _ACEOF
8467 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8468 if { (eval echo "$as_me:8468: \"$ac_link\"") >&5
8469   (eval $ac_link) 2>&5
8470   ac_status=$?
8471   echo "$as_me:8471: \$? = $ac_status" >&5
8472   (exit "$ac_status"); } &&
8473          { ac_try='test -s "conftest$ac_exeext"'
8474   { (eval echo "$as_me:8474: \"$ac_try\"") >&5
8475   (eval $ac_try) 2>&5
8476   ac_status=$?
8477   echo "$as_me:8477: \$? = $ac_status" >&5
8478   (exit "$ac_status"); }; }; then
8479   eval "$as_ac_var=yes"
8480 else
8481   echo "$as_me: failed program was:" >&5
8482 cat "conftest.$ac_ext" >&5
8483 eval "$as_ac_var=no"
8484 fi
8485 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8486 fi
8487 echo "$as_me:8487: result: `eval echo '${'"$as_ac_var"'}'`" >&5
8488 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
8489 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
8490   cat >>confdefs.h <<EOF
8491 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8492 EOF
8493
8494 fi
8495 done
8496
8497 fi
8498
8499 # not everyone has "test -c"
8500 if test -c /dev/sysmouse 2>/dev/null ; then
8501 echo "$as_me:8501: checking if you want to use sysmouse" >&5
8502 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
8503
8504 # Check whether --with-sysmouse or --without-sysmouse was given.
8505 if test "${with_sysmouse+set}" = set; then
8506   withval="$with_sysmouse"
8507   cf_with_sysmouse=$withval
8508 else
8509   cf_with_sysmouse=maybe
8510 fi;
8511         if test "$cf_with_sysmouse" != no ; then
8512         cat >"conftest.$ac_ext" <<_ACEOF
8513 #line 8513 "configure"
8514 #include "confdefs.h"
8515
8516 #include <osreldate.h>
8517 #if (__FreeBSD_version >= 400017)
8518 #include <sys/consio.h>
8519 #include <sys/fbio.h>
8520 #else
8521 #include <machine/console.h>
8522 #endif
8523
8524 int
8525 main (void)
8526 {
8527
8528         struct mouse_info the_mouse;
8529         ioctl(0, CONS_MOUSECTL, &the_mouse);
8530
8531   ;
8532   return 0;
8533 }
8534 _ACEOF
8535 rm -f "conftest.$ac_objext"
8536 if { (eval echo "$as_me:8536: \"$ac_compile\"") >&5
8537   (eval $ac_compile) 2>&5
8538   ac_status=$?
8539   echo "$as_me:8539: \$? = $ac_status" >&5
8540   (exit "$ac_status"); } &&
8541          { ac_try='test -s "conftest.$ac_objext"'
8542   { (eval echo "$as_me:8542: \"$ac_try\"") >&5
8543   (eval $ac_try) 2>&5
8544   ac_status=$?
8545   echo "$as_me:8545: \$? = $ac_status" >&5
8546   (exit "$ac_status"); }; }; then
8547   cf_with_sysmouse=yes
8548 else
8549   echo "$as_me: failed program was:" >&5
8550 cat "conftest.$ac_ext" >&5
8551 cf_with_sysmouse=no
8552 fi
8553 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8554         fi
8555 echo "$as_me:8555: result: $cf_with_sysmouse" >&5
8556 echo "${ECHO_T}$cf_with_sysmouse" >&6
8557 test "$cf_with_sysmouse" = yes &&
8558 cat >>confdefs.h <<\EOF
8559 #define USE_SYSMOUSE 1
8560 EOF
8561
8562 fi
8563
8564 # pretend that ncurses==ncursesw==ncursest
8565 echo "$as_me:8565: checking if you want to disable library suffixes" >&5
8566 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
8567
8568 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
8569 if test "${enable_lib_suffixes+set}" = set; then
8570   enableval="$enable_lib_suffixes"
8571   test "$enableval" != no && enableval=yes
8572         if test "$enableval" != "yes" ; then
8573     disable_lib_suffixes=yes
8574         else
8575                 disable_lib_suffixes=no
8576         fi
8577 else
8578   enableval=yes
8579         disable_lib_suffixes=no
8580
8581 fi;
8582 echo "$as_me:8582: result: $disable_lib_suffixes" >&5
8583 echo "${ECHO_T}$disable_lib_suffixes" >&6
8584
8585 ### If we're building with rpath, try to link non-standard libs that way too.
8586 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
8587
8588 echo "$as_me:8588: checking if rpath-hack should be disabled" >&5
8589 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
8590
8591 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
8592 if test "${enable_rpath_hack+set}" = set; then
8593   enableval="$enable_rpath_hack"
8594   test "$enableval" != no && enableval=yes
8595         if test "$enableval" != "yes" ; then
8596     enable_rpath_hack=no
8597         else
8598                 enable_rpath_hack=yes
8599         fi
8600 else
8601   enableval=yes
8602         enable_rpath_hack=yes
8603
8604 fi;
8605 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
8606 echo "$as_me:8606: result: $cf_disable_rpath_hack" >&5
8607 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
8608
8609 if test "$enable_rpath_hack" = yes ; then
8610
8611 echo "$as_me:8611: checking for updated LDFLAGS" >&5
8612 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
8613 if test -n "$LD_RPATH_OPT" ; then
8614         echo "$as_me:8614: result: maybe" >&5
8615 echo "${ECHO_T}maybe" >&6
8616
8617         for ac_prog in ldd
8618 do
8619   # Extract the first word of "$ac_prog", so it can be a program name with args.
8620 set dummy $ac_prog; ac_word=$2
8621 echo "$as_me:8621: checking for $ac_word" >&5
8622 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8623 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
8624   echo $ECHO_N "(cached) $ECHO_C" >&6
8625 else
8626   if test -n "$cf_ldd_prog"; then
8627   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
8628 else
8629   ac_save_IFS=$IFS; IFS=$ac_path_separator
8630 ac_dummy="$PATH"
8631 for ac_dir in $ac_dummy; do
8632   IFS=$ac_save_IFS
8633   test -z "$ac_dir" && ac_dir=.
8634   $as_executable_p "$ac_dir/$ac_word" || continue
8635 ac_cv_prog_cf_ldd_prog="$ac_prog"
8636 echo "$as_me:8636: found $ac_dir/$ac_word" >&5
8637 break
8638 done
8639
8640 fi
8641 fi
8642 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
8643 if test -n "$cf_ldd_prog"; then
8644   echo "$as_me:8644: result: $cf_ldd_prog" >&5
8645 echo "${ECHO_T}$cf_ldd_prog" >&6
8646 else
8647   echo "$as_me:8647: result: no" >&5
8648 echo "${ECHO_T}no" >&6
8649 fi
8650
8651   test -n "$cf_ldd_prog" && break
8652 done
8653 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
8654
8655         cf_rpath_list="/usr/lib /lib"
8656         if test "$cf_ldd_prog" != no
8657         then
8658                 cf_rpath_oops=
8659
8660 cat >"conftest.$ac_ext" <<_ACEOF
8661 #line 8661 "configure"
8662 #include "confdefs.h"
8663 #include <stdio.h>
8664 int
8665 main (void)
8666 {
8667 printf("Hello");
8668   ;
8669   return 0;
8670 }
8671 _ACEOF
8672 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8673 if { (eval echo "$as_me:8673: \"$ac_link\"") >&5
8674   (eval $ac_link) 2>&5
8675   ac_status=$?
8676   echo "$as_me:8676: \$? = $ac_status" >&5
8677   (exit "$ac_status"); } &&
8678          { ac_try='test -s "conftest$ac_exeext"'
8679   { (eval echo "$as_me:8679: \"$ac_try\"") >&5
8680   (eval $ac_try) 2>&5
8681   ac_status=$?
8682   echo "$as_me:8682: \$? = $ac_status" >&5
8683   (exit "$ac_status"); }; }; then
8684   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
8685                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
8686 else
8687   echo "$as_me: failed program was:" >&5
8688 cat "conftest.$ac_ext" >&5
8689 fi
8690 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8691
8692                 # If we passed the link-test, but get a "not found" on a given library,
8693                 # this could be due to inept reconfiguration of gcc to make it only
8694                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
8695                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
8696                 # /usr/local libraries.
8697                 if test -n "$cf_rpath_oops"
8698                 then
8699                         for cf_rpath_src in $cf_rpath_oops
8700                         do
8701                                 for cf_rpath_dir in \
8702                                         /usr/local \
8703                                         /usr/pkg \
8704                                         /opt/sfw
8705                                 do
8706                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8707                                         then
8708                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8709
8710 echo "${as_me:-configure}:8710: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8711
8712                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8713                                                 break
8714                                         fi
8715                                 done
8716                         done
8717                 fi
8718         fi
8719
8720         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8721
8722 echo "${as_me:-configure}:8722: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8723
8724 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8725
8726 echo "${as_me:-configure}:8726: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8727
8728 cf_rpath_dst=
8729 for cf_rpath_src in $LDFLAGS
8730 do
8731         case "$cf_rpath_src" in
8732         (-L*)
8733
8734                 # check if this refers to a directory which we will ignore
8735                 cf_rpath_skip=no
8736                 if test -n "$cf_rpath_list"
8737                 then
8738                         for cf_rpath_item in $cf_rpath_list
8739                         do
8740                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8741                                 then
8742                                         cf_rpath_skip=yes
8743                                         break
8744                                 fi
8745                         done
8746                 fi
8747
8748                 if test "$cf_rpath_skip" = no
8749                 then
8750                         # transform the option
8751                         if test "$LD_RPATH_OPT" = "-R " ; then
8752                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8753                         else
8754                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8755                         fi
8756
8757                         # if we have not already added this, add it now
8758                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8759                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8760                         then
8761                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8762
8763 echo "${as_me:-configure}:8763: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8764
8765                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8766                         fi
8767                 fi
8768                 ;;
8769         esac
8770         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8771 done
8772 LDFLAGS=$cf_rpath_dst
8773
8774 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8775
8776 echo "${as_me:-configure}:8776: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8777
8778 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8779
8780 echo "${as_me:-configure}:8780: testing ...checking LIBS $LIBS ..." 1>&5
8781
8782 cf_rpath_dst=
8783 for cf_rpath_src in $LIBS
8784 do
8785         case "$cf_rpath_src" in
8786         (-L*)
8787
8788                 # check if this refers to a directory which we will ignore
8789                 cf_rpath_skip=no
8790                 if test -n "$cf_rpath_list"
8791                 then
8792                         for cf_rpath_item in $cf_rpath_list
8793                         do
8794                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8795                                 then
8796                                         cf_rpath_skip=yes
8797                                         break
8798                                 fi
8799                         done
8800                 fi
8801
8802                 if test "$cf_rpath_skip" = no
8803                 then
8804                         # transform the option
8805                         if test "$LD_RPATH_OPT" = "-R " ; then
8806                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8807                         else
8808                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8809                         fi
8810
8811                         # if we have not already added this, add it now
8812                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8813                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8814                         then
8815                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8816
8817 echo "${as_me:-configure}:8817: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8818
8819                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8820                         fi
8821                 fi
8822                 ;;
8823         esac
8824         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8825 done
8826 LIBS=$cf_rpath_dst
8827
8828 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8829
8830 echo "${as_me:-configure}:8830: testing ...checked LIBS $LIBS ..." 1>&5
8831
8832         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8833
8834 echo "${as_me:-configure}:8834: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8835
8836 else
8837         echo "$as_me:8837: result: no" >&5
8838 echo "${ECHO_T}no" >&6
8839 fi
8840
8841 fi
8842
8843 fi
8844
8845 ### Depending on the system, someone may use rpath to build ncurses but not
8846 # want users of the package to rely upon that feature.  Give those people an
8847 # option to suppress that detail from EXTRA_LDFLAGS.
8848 EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
8849 if test -n "$EXTRA_PKG_LDFLAGS"
8850 then
8851         echo "$as_me:8851: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8852 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8853
8854 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8855 if test "${enable_pkg_ldflags+set}" = set; then
8856   enableval="$enable_pkg_ldflags"
8857   test "$enableval" != no && enableval=yes
8858         if test "$enableval" != "yes" ; then
8859     disable_pkg_ldflags=yes
8860         else
8861                 disable_pkg_ldflags=no
8862         fi
8863 else
8864   enableval=yes
8865         disable_pkg_ldflags=no
8866
8867 fi;
8868         echo "$as_me:8868: result: $disable_pkg_ldflags" >&5
8869 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8870         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8871 fi
8872
8873 ###############################################################################
8874
8875 ###     use option --with-extra-suffix to append suffix to headers and libraries
8876 echo "$as_me:8876: checking if you wish to append extra suffix to header/library paths" >&5
8877 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8878 EXTRA_SUFFIX=
8879
8880 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8881 if test "${with_extra_suffix+set}" = set; then
8882   withval="$with_extra_suffix"
8883   case x$withval in
8884         (xno)
8885                 ;;
8886         (xyes|x)
8887                 EXTRA_SUFFIX=$cf_cv_abi_version
8888                 ;;
8889         (*)
8890                 EXTRA_SUFFIX=$withval
8891                 ;;
8892         esac
8893
8894 fi;
8895 echo "$as_me:8895: result: $EXTRA_SUFFIX" >&5
8896 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8897
8898 ###     use option --disable-overwrite to leave out the link to -lcurses
8899 echo "$as_me:8899: checking if you wish to install ncurses overwriting curses" >&5
8900 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8901
8902 # Check whether --enable-overwrite or --disable-overwrite was given.
8903 if test "${enable_overwrite+set}" = set; then
8904   enableval="$enable_overwrite"
8905   with_overwrite=$enableval
8906 else
8907   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8908 fi;
8909 echo "$as_me:8909: result: $with_overwrite" >&5
8910 echo "${ECHO_T}$with_overwrite" >&6
8911
8912 echo "$as_me:8912: checking if external terminfo-database is used" >&5
8913 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8914
8915 # Check whether --enable-database or --disable-database was given.
8916 if test "${enable_database+set}" = set; then
8917   enableval="$enable_database"
8918   use_database=$enableval
8919 else
8920   use_database=yes
8921 fi;
8922 echo "$as_me:8922: result: $use_database" >&5
8923 echo "${ECHO_T}$use_database" >&6
8924
8925 case "$host_os" in
8926 (os2*)
8927         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8928         ;;
8929 (*)
8930         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8931         ;;
8932 esac
8933
8934 NCURSES_USE_DATABASE=0
8935 if test "$use_database" != no ; then
8936         NCURSES_USE_DATABASE=1
8937
8938         echo "$as_me:8938: checking which terminfo source-file will be installed" >&5
8939 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8940
8941 # Check whether --with-database or --without-database was given.
8942 if test "${with_database+set}" = set; then
8943   withval="$with_database"
8944   TERMINFO_SRC=$withval
8945 fi;
8946         echo "$as_me:8946: result: $TERMINFO_SRC" >&5
8947 echo "${ECHO_T}$TERMINFO_SRC" >&6
8948
8949         echo "$as_me:8949: checking whether to use hashed database instead of directory/tree" >&5
8950 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8951
8952 # Check whether --with-hashed-db or --without-hashed-db was given.
8953 if test "${with_hashed_db+set}" = set; then
8954   withval="$with_hashed_db"
8955
8956 else
8957   with_hashed_db=no
8958 fi;
8959         echo "$as_me:8959: result: $with_hashed_db" >&5
8960 echo "${ECHO_T}$with_hashed_db" >&6
8961 else
8962         with_hashed_db=no
8963 fi
8964
8965 echo "$as_me:8965: checking for list of fallback descriptions" >&5
8966 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8967
8968 # Check whether --with-fallbacks or --without-fallbacks was given.
8969 if test "${with_fallbacks+set}" = set; then
8970   withval="$with_fallbacks"
8971   with_fallback=$withval
8972 else
8973   with_fallback=
8974 fi;
8975 echo "$as_me:8975: result: $with_fallback" >&5
8976 echo "${ECHO_T}$with_fallback" >&6
8977
8978 case ".$with_fallback" in
8979 (.|.no)
8980         FALLBACK_LIST=
8981         ;;
8982 (.yes)
8983         { echo "$as_me:8983: WARNING: expected a list of terminal descriptions" >&5
8984 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8985         ;;
8986 (*)
8987         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8988         ;;
8989 esac
8990
8991 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8992 # tree for generating the terminal descriptions that will be compiled into the
8993 # library.  If your toolchain is old, it may not handle current terminal
8994 # databases.  Use configure-options to point to the tools which will be used,
8995 # rather than the first ones found on the $PATH.
8996 if test -n "$ac_tool_prefix"; then
8997   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8998 set dummy ${ac_tool_prefix}tic; ac_word=$2
8999 echo "$as_me:8999: checking for $ac_word" >&5
9000 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9001 if test "${ac_cv_prog_TIC+set}" = set; then
9002   echo $ECHO_N "(cached) $ECHO_C" >&6
9003 else
9004   if test -n "$TIC"; then
9005   ac_cv_prog_TIC="$TIC" # Let the user override the test.
9006 else
9007   ac_save_IFS=$IFS; IFS=$ac_path_separator
9008 ac_dummy="$PATH"
9009 for ac_dir in $ac_dummy; do
9010   IFS=$ac_save_IFS
9011   test -z "$ac_dir" && ac_dir=.
9012   $as_executable_p "$ac_dir/$ac_word" || continue
9013 ac_cv_prog_TIC="${ac_tool_prefix}tic"
9014 echo "$as_me:9014: found $ac_dir/$ac_word" >&5
9015 break
9016 done
9017
9018 fi
9019 fi
9020 TIC=$ac_cv_prog_TIC
9021 if test -n "$TIC"; then
9022   echo "$as_me:9022: result: $TIC" >&5
9023 echo "${ECHO_T}$TIC" >&6
9024 else
9025   echo "$as_me:9025: result: no" >&5
9026 echo "${ECHO_T}no" >&6
9027 fi
9028
9029 fi
9030 if test -z "$ac_cv_prog_TIC"; then
9031   ac_ct_TIC=$TIC
9032   # Extract the first word of "tic", so it can be a program name with args.
9033 set dummy tic; ac_word=$2
9034 echo "$as_me:9034: checking for $ac_word" >&5
9035 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9036 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
9037   echo $ECHO_N "(cached) $ECHO_C" >&6
9038 else
9039   if test -n "$ac_ct_TIC"; then
9040   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
9041 else
9042   ac_save_IFS=$IFS; IFS=$ac_path_separator
9043 ac_dummy="$PATH"
9044 for ac_dir in $ac_dummy; do
9045   IFS=$ac_save_IFS
9046   test -z "$ac_dir" && ac_dir=.
9047   $as_executable_p "$ac_dir/$ac_word" || continue
9048 ac_cv_prog_ac_ct_TIC="tic"
9049 echo "$as_me:9049: found $ac_dir/$ac_word" >&5
9050 break
9051 done
9052
9053 fi
9054 fi
9055 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
9056 if test -n "$ac_ct_TIC"; then
9057   echo "$as_me:9057: result: $ac_ct_TIC" >&5
9058 echo "${ECHO_T}$ac_ct_TIC" >&6
9059 else
9060   echo "$as_me:9060: result: no" >&5
9061 echo "${ECHO_T}no" >&6
9062 fi
9063
9064   TIC=$ac_ct_TIC
9065 else
9066   TIC="$ac_cv_prog_TIC"
9067 fi
9068
9069 if test -n "$ac_tool_prefix"; then
9070   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
9071 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
9072 echo "$as_me:9072: checking for $ac_word" >&5
9073 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9074 if test "${ac_cv_prog_INFOCMP+set}" = set; then
9075   echo $ECHO_N "(cached) $ECHO_C" >&6
9076 else
9077   if test -n "$INFOCMP"; then
9078   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
9079 else
9080   ac_save_IFS=$IFS; IFS=$ac_path_separator
9081 ac_dummy="$PATH"
9082 for ac_dir in $ac_dummy; do
9083   IFS=$ac_save_IFS
9084   test -z "$ac_dir" && ac_dir=.
9085   $as_executable_p "$ac_dir/$ac_word" || continue
9086 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
9087 echo "$as_me:9087: found $ac_dir/$ac_word" >&5
9088 break
9089 done
9090
9091 fi
9092 fi
9093 INFOCMP=$ac_cv_prog_INFOCMP
9094 if test -n "$INFOCMP"; then
9095   echo "$as_me:9095: result: $INFOCMP" >&5
9096 echo "${ECHO_T}$INFOCMP" >&6
9097 else
9098   echo "$as_me:9098: result: no" >&5
9099 echo "${ECHO_T}no" >&6
9100 fi
9101
9102 fi
9103 if test -z "$ac_cv_prog_INFOCMP"; then
9104   ac_ct_INFOCMP=$INFOCMP
9105   # Extract the first word of "infocmp", so it can be a program name with args.
9106 set dummy infocmp; ac_word=$2
9107 echo "$as_me:9107: checking for $ac_word" >&5
9108 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9109 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
9110   echo $ECHO_N "(cached) $ECHO_C" >&6
9111 else
9112   if test -n "$ac_ct_INFOCMP"; then
9113   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
9114 else
9115   ac_save_IFS=$IFS; IFS=$ac_path_separator
9116 ac_dummy="$PATH"
9117 for ac_dir in $ac_dummy; do
9118   IFS=$ac_save_IFS
9119   test -z "$ac_dir" && ac_dir=.
9120   $as_executable_p "$ac_dir/$ac_word" || continue
9121 ac_cv_prog_ac_ct_INFOCMP="infocmp"
9122 echo "$as_me:9122: found $ac_dir/$ac_word" >&5
9123 break
9124 done
9125
9126 fi
9127 fi
9128 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
9129 if test -n "$ac_ct_INFOCMP"; then
9130   echo "$as_me:9130: result: $ac_ct_INFOCMP" >&5
9131 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
9132 else
9133   echo "$as_me:9133: result: no" >&5
9134 echo "${ECHO_T}no" >&6
9135 fi
9136
9137   INFOCMP=$ac_ct_INFOCMP
9138 else
9139   INFOCMP="$ac_cv_prog_INFOCMP"
9140 fi
9141
9142 if test -n "$FALLBACK_LIST"
9143 then
9144
9145 # Check whether --with-tic-path or --without-tic-path was given.
9146 if test "${with_tic_path+set}" = set; then
9147   withval="$with_tic_path"
9148   echo "$as_me:9148: checking for tic program for fallbacks" >&5
9149 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
9150                 TIC=$withval
9151                 echo "$as_me:9151: result: $TIC" >&5
9152 echo "${ECHO_T}$TIC" >&6
9153
9154 if test "x$prefix" != xNONE; then
9155         cf_path_syntax="$prefix"
9156 else
9157         cf_path_syntax="$ac_default_prefix"
9158 fi
9159
9160 case ".$TIC" in
9161 (.\$\(*\)*|.\'*\'*)
9162         ;;
9163 (..|./*|.\\*)
9164         ;;
9165 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9166         ;;
9167 (.\$\{*prefix\}*|.\$\{*dir\}*)
9168         eval TIC="$TIC"
9169         case ".$TIC" in
9170         (.NONE/*)
9171                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
9172                 ;;
9173         esac
9174         ;;
9175 (.no|.NONE/*)
9176         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
9177         ;;
9178 (*)
9179         { { echo "$as_me:9179: error: expected a pathname, not \"$TIC\"" >&5
9180 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
9181    { (exit 1); exit 1; }; }
9182         ;;
9183 esac
9184
9185 else
9186
9187 test -z "$TIC" && TIC="tic"
9188 for ac_prog in $TIC tic
9189 do
9190   # Extract the first word of "$ac_prog", so it can be a program name with args.
9191 set dummy $ac_prog; ac_word=$2
9192 echo "$as_me:9192: checking for $ac_word" >&5
9193 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9194 if test "${ac_cv_path_TIC+set}" = set; then
9195   echo $ECHO_N "(cached) $ECHO_C" >&6
9196 else
9197   case $TIC in
9198   [\\/]* | ?:[\\/]*)
9199   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
9200   ;;
9201   *)
9202   ac_save_IFS=$IFS; IFS=$ac_path_separator
9203 ac_dummy="$PATH:/usr/local/ncurses/bin"
9204 for ac_dir in $ac_dummy; do
9205   IFS=$ac_save_IFS
9206   test -z "$ac_dir" && ac_dir=.
9207   if $as_executable_p "$ac_dir/$ac_word"; then
9208    ac_cv_path_TIC="$ac_dir/$ac_word"
9209    echo "$as_me:9209: found $ac_dir/$ac_word" >&5
9210    break
9211 fi
9212 done
9213
9214   ;;
9215 esac
9216 fi
9217 TIC=$ac_cv_path_TIC
9218
9219 if test -n "$TIC"; then
9220   echo "$as_me:9220: result: $TIC" >&5
9221 echo "${ECHO_T}$TIC" >&6
9222 else
9223   echo "$as_me:9223: result: no" >&5
9224 echo "${ECHO_T}no" >&6
9225 fi
9226
9227   test -n "$TIC" && break
9228 done
9229 test -n "$TIC" || TIC="$TIC"
9230
9231 cf_path_prog=""
9232 cf_path_args=""
9233 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
9234 for cf_temp in $ac_cv_path_TIC
9235 do
9236         if test -z "$cf_path_prog" ; then
9237                 if test "$with_full_paths" = yes ; then
9238
9239 if test "x$prefix" != xNONE; then
9240         cf_path_syntax="$prefix"
9241 else
9242         cf_path_syntax="$ac_default_prefix"
9243 fi
9244
9245 case ".$cf_temp" in
9246 (.\$\(*\)*|.\'*\'*)
9247         ;;
9248 (..|./*|.\\*)
9249         ;;
9250 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9251         ;;
9252 (.\$\{*prefix\}*|.\$\{*dir\}*)
9253         eval cf_temp="$cf_temp"
9254         case ".$cf_temp" in
9255         (.NONE/*)
9256                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9257                 ;;
9258         esac
9259         ;;
9260 (.no|.NONE/*)
9261         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9262         ;;
9263 (*)
9264         break
9265         ;;
9266 esac
9267
9268                         cf_path_prog="$cf_temp"
9269                 else
9270                         cf_path_prog="`basename "$cf_temp"`"
9271                 fi
9272         elif test -z "$cf_path_args" ; then
9273                 cf_path_args="$cf_temp"
9274         else
9275                 cf_path_args="$cf_path_args $cf_temp"
9276         fi
9277 done
9278 IFS="$cf_save_ifs"
9279
9280 if test -n "$cf_path_prog" ; then
9281
9282 echo "${as_me:-configure}:9282: testing defining path for ${cf_path_prog} ..." 1>&5
9283
9284 cat >>confdefs.h <<EOF
9285 #define TIC_PATH "$cf_path_prog"
9286 EOF
9287
9288         test -n "$cf_path_args" &&
9289 cat >>confdefs.h <<EOF
9290 #define TIC_ARGS "$cf_path_args"
9291 EOF
9292
9293 fi
9294
9295                 if test -z "$TIC"
9296                 then
9297                         { echo "$as_me:9297: WARNING: no tic program found for fallbacks" >&5
9298 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
9299                 fi
9300
9301 fi;
9302
9303 # Check whether --with-infocmp-path or --without-infocmp-path was given.
9304 if test "${with_infocmp_path+set}" = set; then
9305   withval="$with_infocmp_path"
9306   echo "$as_me:9306: checking for infocmp program for fallbacks" >&5
9307 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
9308                 INFOCMP=$withval
9309                 echo "$as_me:9309: result: $INFOCMP" >&5
9310 echo "${ECHO_T}$INFOCMP" >&6
9311
9312 if test "x$prefix" != xNONE; then
9313         cf_path_syntax="$prefix"
9314 else
9315         cf_path_syntax="$ac_default_prefix"
9316 fi
9317
9318 case ".$INFOCMP" in
9319 (.\$\(*\)*|.\'*\'*)
9320         ;;
9321 (..|./*|.\\*)
9322         ;;
9323 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9324         ;;
9325 (.\$\{*prefix\}*|.\$\{*dir\}*)
9326         eval INFOCMP="$INFOCMP"
9327         case ".$INFOCMP" in
9328         (.NONE/*)
9329                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
9330                 ;;
9331         esac
9332         ;;
9333 (.no|.NONE/*)
9334         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
9335         ;;
9336 (*)
9337         { { echo "$as_me:9337: error: expected a pathname, not \"$INFOCMP\"" >&5
9338 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
9339    { (exit 1); exit 1; }; }
9340         ;;
9341 esac
9342
9343 else
9344
9345 test -z "$INFOCMP" && INFOCMP="infocmp"
9346 for ac_prog in $INFOCMP infocmp
9347 do
9348   # Extract the first word of "$ac_prog", so it can be a program name with args.
9349 set dummy $ac_prog; ac_word=$2
9350 echo "$as_me:9350: checking for $ac_word" >&5
9351 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9352 if test "${ac_cv_path_INFOCMP+set}" = set; then
9353   echo $ECHO_N "(cached) $ECHO_C" >&6
9354 else
9355   case $INFOCMP in
9356   [\\/]* | ?:[\\/]*)
9357   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
9358   ;;
9359   *)
9360   ac_save_IFS=$IFS; IFS=$ac_path_separator
9361 ac_dummy="$PATH:/usr/local/ncurses/bin"
9362 for ac_dir in $ac_dummy; do
9363   IFS=$ac_save_IFS
9364   test -z "$ac_dir" && ac_dir=.
9365   if $as_executable_p "$ac_dir/$ac_word"; then
9366    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
9367    echo "$as_me:9367: found $ac_dir/$ac_word" >&5
9368    break
9369 fi
9370 done
9371
9372   ;;
9373 esac
9374 fi
9375 INFOCMP=$ac_cv_path_INFOCMP
9376
9377 if test -n "$INFOCMP"; then
9378   echo "$as_me:9378: result: $INFOCMP" >&5
9379 echo "${ECHO_T}$INFOCMP" >&6
9380 else
9381   echo "$as_me:9381: result: no" >&5
9382 echo "${ECHO_T}no" >&6
9383 fi
9384
9385   test -n "$INFOCMP" && break
9386 done
9387 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
9388
9389 cf_path_prog=""
9390 cf_path_args=""
9391 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
9392 for cf_temp in $ac_cv_path_INFOCMP
9393 do
9394         if test -z "$cf_path_prog" ; then
9395                 if test "$with_full_paths" = yes ; then
9396
9397 if test "x$prefix" != xNONE; then
9398         cf_path_syntax="$prefix"
9399 else
9400         cf_path_syntax="$ac_default_prefix"
9401 fi
9402
9403 case ".$cf_temp" in
9404 (.\$\(*\)*|.\'*\'*)
9405         ;;
9406 (..|./*|.\\*)
9407         ;;
9408 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9409         ;;
9410 (.\$\{*prefix\}*|.\$\{*dir\}*)
9411         eval cf_temp="$cf_temp"
9412         case ".$cf_temp" in
9413         (.NONE/*)
9414                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9415                 ;;
9416         esac
9417         ;;
9418 (.no|.NONE/*)
9419         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9420         ;;
9421 (*)
9422         break
9423         ;;
9424 esac
9425
9426                         cf_path_prog="$cf_temp"
9427                 else
9428                         cf_path_prog="`basename "$cf_temp"`"
9429                 fi
9430         elif test -z "$cf_path_args" ; then
9431                 cf_path_args="$cf_temp"
9432         else
9433                 cf_path_args="$cf_path_args $cf_temp"
9434         fi
9435 done
9436 IFS="$cf_save_ifs"
9437
9438 if test -n "$cf_path_prog" ; then
9439
9440 echo "${as_me:-configure}:9440: testing defining path for ${cf_path_prog} ..." 1>&5
9441
9442 cat >>confdefs.h <<EOF
9443 #define INFOCMP_PATH "$cf_path_prog"
9444 EOF
9445
9446         test -n "$cf_path_args" &&
9447 cat >>confdefs.h <<EOF
9448 #define INFOCMP_ARGS "$cf_path_args"
9449 EOF
9450
9451 fi
9452
9453                 if test -z "$INFOCMP"
9454                 then
9455                         { echo "$as_me:9455: WARNING: no infocmp program found for fallbacks" >&5
9456 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
9457                 fi
9458
9459 fi;
9460
9461         test -z "$TIC" && FALLBACK_LIST=
9462         test -z "$INFOCMP" && FALLBACK_LIST=
9463         if test -z "$FALLBACK_LIST"
9464         then
9465                 { echo "$as_me:9465: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
9466 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
9467         fi
9468 fi
9469
9470 USE_FALLBACKS=
9471 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
9472
9473 echo "$as_me:9473: checking if you want modern xterm or antique" >&5
9474 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
9475
9476 # Check whether --with-xterm-new or --without-xterm-new was given.
9477 if test "${with_xterm_new+set}" = set; then
9478   withval="$with_xterm_new"
9479   with_xterm_new=$withval
9480 else
9481   with_xterm_new=yes
9482 fi;
9483 case "$with_xterm_new" in
9484 (no) with_xterm_new=xterm-old;;
9485 (*)      with_xterm_new=xterm-new;;
9486 esac
9487 echo "$as_me:9487: result: $with_xterm_new" >&5
9488 echo "${ECHO_T}$with_xterm_new" >&6
9489 WHICH_XTERM=$with_xterm_new
9490
9491 case $host_os in
9492 (*linux-gnu|*cygwin|*mingw32|*msys)
9493         want_xterm_kbs=DEL
9494         ;;
9495 (*)
9496         want_xterm_kbs=BS
9497         ;;
9498 esac
9499
9500 echo "$as_me:9500: checking if xterm backspace sends BS or DEL" >&5
9501 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
9502
9503 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
9504 if test "${with_xterm_kbs+set}" = set; then
9505   withval="$with_xterm_kbs"
9506   with_xterm_kbs=$withval
9507 else
9508   with_xterm_kbs=BS
9509 fi;
9510 case x$with_xterm_kbs in
9511 (xyes|xno|xBS|xbs|x8)
9512         with_xterm_kbs=BS
9513         ;;
9514 (xDEL|xdel|x127)
9515         with_xterm_kbs=DEL
9516         ;;
9517 (*)
9518         with_xterm_kbs=$withval
9519         ;;
9520 esac
9521 echo "$as_me:9521: result: $with_xterm_kbs" >&5
9522 echo "${ECHO_T}$with_xterm_kbs" >&6
9523 XTERM_KBS=$with_xterm_kbs
9524
9525 if test "x$with_xterm_kbs" != "x$want_xterm_kbs"
9526 then
9527         { echo "$as_me:9527: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os" >&5
9528 echo "$as_me: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os" >&2;}
9529 fi
9530
9531 MAKE_TERMINFO=
9532 if test "$use_database" = no ; then
9533         TERMINFO="${datadir}/terminfo"
9534         MAKE_TERMINFO="#"
9535 else
9536
9537 echo "$as_me:9537: checking for list of terminfo directories" >&5
9538 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
9539
9540 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
9541 if test "${with_terminfo_dirs+set}" = set; then
9542   withval="$with_terminfo_dirs"
9543
9544 else
9545   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
9546 fi;
9547 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9548 cf_dst_path=
9549 for cf_src_path in $withval
9550 do
9551
9552 if test "x$prefix" != xNONE; then
9553         cf_path_syntax="$prefix"
9554 else
9555         cf_path_syntax="$ac_default_prefix"
9556 fi
9557
9558 case ".$cf_src_path" in
9559 (.\$\(*\)*|.\'*\'*)
9560         ;;
9561 (..|./*|.\\*)
9562         ;;
9563 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9564         ;;
9565 (.\$\{*prefix\}*|.\$\{*dir\}*)
9566         eval cf_src_path="$cf_src_path"
9567         case ".$cf_src_path" in
9568         (.NONE/*)
9569                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9570                 ;;
9571         esac
9572         ;;
9573 (.no|.NONE/*)
9574         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9575         ;;
9576 (*)
9577         { { echo "$as_me:9577: error: expected a pathname, not \"$cf_src_path\"" >&5
9578 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9579    { (exit 1); exit 1; }; }
9580         ;;
9581 esac
9582
9583   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9584   cf_dst_path="${cf_dst_path}${cf_src_path}"
9585 done
9586 IFS="$ac_save_ifs"
9587
9588 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9589 # so we have to check/work around.  We do prefer the result of "eval"...
9590 eval cf_dst_eval="$cf_dst_path"
9591 case "x$cf_dst_eval" in
9592 (xNONE*)
9593         TERMINFO_DIRS=$cf_dst_path
9594         ;;
9595 (*)
9596         TERMINFO_DIRS="$cf_dst_eval"
9597         ;;
9598 esac
9599
9600 echo "$as_me:9600: result: $TERMINFO_DIRS" >&5
9601 echo "${ECHO_T}$TERMINFO_DIRS" >&6
9602 test -n "$TERMINFO_DIRS" &&
9603 cat >>confdefs.h <<EOF
9604 #define TERMINFO_DIRS "$TERMINFO_DIRS"
9605 EOF
9606
9607 case "x$TERMINFO" in
9608 x???:*)
9609         { echo "$as_me:9609: WARNING: ignoring non-directory/file TERMINFO value" >&5
9610 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
9611         unset TERMINFO
9612         ;;
9613 esac
9614
9615 echo "$as_me:9615: checking for default terminfo directory" >&5
9616 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
9617
9618 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
9619 if test "${with_default_terminfo_dir+set}" = set; then
9620   withval="$with_default_terminfo_dir"
9621
9622 else
9623   withval="${TERMINFO:-${datadir}/terminfo}"
9624 fi; if test -n "${datadir}/terminfo" ; then
9625
9626 if test "x$prefix" != xNONE; then
9627         cf_path_syntax="$prefix"
9628 else
9629         cf_path_syntax="$ac_default_prefix"
9630 fi
9631
9632 case ".$withval" in
9633 (.\$\(*\)*|.\'*\'*)
9634         ;;
9635 (..|./*|.\\*)
9636         ;;
9637 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9638         ;;
9639 (.\$\{*prefix\}*|.\$\{*dir\}*)
9640         eval withval="$withval"
9641         case ".$withval" in
9642         (.NONE/*)
9643                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9644                 ;;
9645         esac
9646         ;;
9647 (.no|.NONE/*)
9648         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9649         ;;
9650 (*)
9651         { { echo "$as_me:9651: error: expected a pathname, not \"$withval\"" >&5
9652 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9653    { (exit 1); exit 1; }; }
9654         ;;
9655 esac
9656
9657 fi
9658 eval TERMINFO="$withval"
9659
9660 echo "$as_me:9660: result: $TERMINFO" >&5
9661 echo "${ECHO_T}$TERMINFO" >&6
9662
9663 cat >>confdefs.h <<EOF
9664 #define TERMINFO "$TERMINFO"
9665 EOF
9666
9667 fi
9668
9669 ###     use option --disable-big-core to make tic run on small machines
9670 ###     We need 4Mb, check if we can allocate 50% more than that.
9671 echo "$as_me:9671: checking if big-core option selected" >&5
9672 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9673
9674 # Check whether --enable-big-core or --disable-big-core was given.
9675 if test "${enable_big_core+set}" = set; then
9676   enableval="$enable_big_core"
9677   with_big_core=$enableval
9678 else
9679   if test "$cross_compiling" = yes; then
9680   with_big_core=no
9681 else
9682   cat >"conftest.$ac_ext" <<_ACEOF
9683 #line 9683 "configure"
9684 #include "confdefs.h"
9685
9686 #include <stdlib.h>
9687 #include <string.h>
9688 int main() {
9689         unsigned long n = 6000000L;
9690         char *s = malloc(n);
9691         if (s != 0)
9692                 s[0] = s[n-1] = 0;
9693         ${cf_cv_main_return:-return}(s == 0);
9694 }
9695 _ACEOF
9696 rm -f "conftest$ac_exeext"
9697 if { (eval echo "$as_me:9697: \"$ac_link\"") >&5
9698   (eval $ac_link) 2>&5
9699   ac_status=$?
9700   echo "$as_me:9700: \$? = $ac_status" >&5
9701   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9702   { (eval echo "$as_me:9702: \"$ac_try\"") >&5
9703   (eval $ac_try) 2>&5
9704   ac_status=$?
9705   echo "$as_me:9705: \$? = $ac_status" >&5
9706   (exit "$ac_status"); }; }; then
9707   with_big_core=yes
9708 else
9709   echo "$as_me: program exited with status $ac_status" >&5
9710 echo "$as_me: failed program was:" >&5
9711 cat "conftest.$ac_ext" >&5
9712 with_big_core=no
9713 fi
9714 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9715 fi
9716 fi;
9717 echo "$as_me:9717: result: $with_big_core" >&5
9718 echo "${ECHO_T}$with_big_core" >&6
9719 test "x$with_big_core" = "xyes" &&
9720 cat >>confdefs.h <<\EOF
9721 #define HAVE_BIG_CORE 1
9722 EOF
9723
9724 ### ISO C only guarantees 512-char strings, we have tables which load faster
9725 ### when constructed using "big" strings.  More than the C compiler, the awk
9726 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9727 echo "$as_me:9727: checking if big-strings option selected" >&5
9728 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9729
9730 # Check whether --enable-big-strings or --disable-big-strings was given.
9731 if test "${enable_big_strings+set}" = set; then
9732   enableval="$enable_big_strings"
9733   with_big_strings=$enableval
9734 else
9735
9736         case x$AWK in
9737         (x)
9738                 eval with_big_strings=no
9739                 ;;
9740         (*)
9741                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9742                         | $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
9743                         eval with_big_strings=yes
9744                 else
9745                         eval with_big_strings=no
9746                 fi
9747                 ;;
9748         esac
9749
9750 fi;
9751 echo "$as_me:9751: result: $with_big_strings" >&5
9752 echo "${ECHO_T}$with_big_strings" >&6
9753
9754 USE_BIG_STRINGS=0
9755 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9756
9757 ###     use option --enable-termcap to compile in the termcap fallback support
9758 echo "$as_me:9758: checking if you want termcap-fallback support" >&5
9759 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9760
9761 # Check whether --enable-termcap or --disable-termcap was given.
9762 if test "${enable_termcap+set}" = set; then
9763   enableval="$enable_termcap"
9764   with_termcap=$enableval
9765 else
9766   with_termcap=no
9767 fi;
9768 echo "$as_me:9768: result: $with_termcap" >&5
9769 echo "${ECHO_T}$with_termcap" >&6
9770
9771 NCURSES_USE_TERMCAP=0
9772 if test "x$with_termcap" != "xyes" ; then
9773         if test "$use_database" = no ; then
9774                 if test -z "$with_fallback" ; then
9775                         { { echo "$as_me:9775: error: You have disabled the database w/o specifying fallbacks" >&5
9776 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9777    { (exit 1); exit 1; }; }
9778                 fi
9779         fi
9780
9781 cat >>confdefs.h <<\EOF
9782 #define PURE_TERMINFO 1
9783 EOF
9784
9785 else
9786
9787         if test "$with_ticlib" != no ; then
9788                 { { echo "$as_me:9788: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9789 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9790    { (exit 1); exit 1; }; }
9791         fi
9792
9793         NCURSES_USE_TERMCAP=1
9794         echo "$as_me:9794: checking for list of termcap files" >&5
9795 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9796
9797 # Check whether --with-termpath or --without-termpath was given.
9798 if test "${with_termpath+set}" = set; then
9799   withval="$with_termpath"
9800
9801 else
9802   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9803 fi;
9804 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9805 cf_dst_path=
9806 for cf_src_path in $withval
9807 do
9808
9809 if test "x$prefix" != xNONE; then
9810         cf_path_syntax="$prefix"
9811 else
9812         cf_path_syntax="$ac_default_prefix"
9813 fi
9814
9815 case ".$cf_src_path" in
9816 (.\$\(*\)*|.\'*\'*)
9817         ;;
9818 (..|./*|.\\*)
9819         ;;
9820 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9821         ;;
9822 (.\$\{*prefix\}*|.\$\{*dir\}*)
9823         eval cf_src_path="$cf_src_path"
9824         case ".$cf_src_path" in
9825         (.NONE/*)
9826                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9827                 ;;
9828         esac
9829         ;;
9830 (.no|.NONE/*)
9831         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9832         ;;
9833 (*)
9834         { { echo "$as_me:9834: error: expected a pathname, not \"$cf_src_path\"" >&5
9835 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9836    { (exit 1); exit 1; }; }
9837         ;;
9838 esac
9839
9840   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9841   cf_dst_path="${cf_dst_path}${cf_src_path}"
9842 done
9843 IFS="$ac_save_ifs"
9844
9845 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9846 # so we have to check/work around.  We do prefer the result of "eval"...
9847 eval cf_dst_eval="$cf_dst_path"
9848 case "x$cf_dst_eval" in
9849 (xNONE*)
9850         TERMPATH=$cf_dst_path
9851         ;;
9852 (*)
9853         TERMPATH="$cf_dst_eval"
9854         ;;
9855 esac
9856
9857         echo "$as_me:9857: result: $TERMPATH" >&5
9858 echo "${ECHO_T}$TERMPATH" >&6
9859         test -n "$TERMPATH" &&
9860 cat >>confdefs.h <<EOF
9861 #define TERMPATH "$TERMPATH"
9862 EOF
9863
9864         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9865         echo "$as_me:9865: checking if fast termcap-loader is needed" >&5
9866 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9867
9868 # Check whether --enable-getcap or --disable-getcap was given.
9869 if test "${enable_getcap+set}" = set; then
9870   enableval="$enable_getcap"
9871   with_getcap=$enableval
9872 else
9873   with_getcap=no
9874 fi;
9875         echo "$as_me:9875: result: $with_getcap" >&5
9876 echo "${ECHO_T}$with_getcap" >&6
9877         test "x$with_getcap" = "xyes" &&
9878 cat >>confdefs.h <<\EOF
9879 #define USE_GETCAP 1
9880 EOF
9881
9882         echo "$as_me:9882: checking if translated termcaps will be cached in ~/.terminfo" >&5
9883 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9884
9885 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9886 if test "${enable_getcap_cache+set}" = set; then
9887   enableval="$enable_getcap_cache"
9888   with_getcap_cache=$enableval
9889 else
9890   with_getcap_cache=no
9891 fi;
9892         echo "$as_me:9892: result: $with_getcap_cache" >&5
9893 echo "${ECHO_T}$with_getcap_cache" >&6
9894         test "x$with_getcap_cache" = "xyes" &&
9895 cat >>confdefs.h <<\EOF
9896 #define USE_GETCAP_CACHE 1
9897 EOF
9898
9899 fi
9900
9901 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9902 echo "$as_me:9902: checking if ~/.terminfo is wanted" >&5
9903 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9904
9905 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9906 if test "${enable_home_terminfo+set}" = set; then
9907   enableval="$enable_home_terminfo"
9908   with_home_terminfo=$enableval
9909 else
9910   with_home_terminfo=yes
9911 fi;
9912 echo "$as_me:9912: result: $with_home_terminfo" >&5
9913 echo "${ECHO_T}$with_home_terminfo" >&6
9914 test "x$with_home_terminfo" = "xyes" &&
9915 cat >>confdefs.h <<\EOF
9916 #define USE_HOME_TERMINFO 1
9917 EOF
9918
9919 echo "$as_me:9919: checking if you want to permit root to use ncurses environment variables" >&5
9920 echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
9921
9922 # Check whether --enable-root-environ or --disable-root-environ was given.
9923 if test "${enable_root_environ+set}" = set; then
9924   enableval="$enable_root_environ"
9925   with_root_environ=$enableval
9926 else
9927   with_root_environ=yes
9928 fi;
9929 echo "$as_me:9929: result: $with_root_environ" >&5
9930 echo "${ECHO_T}$with_root_environ" >&6
9931 test "x$with_root_environ" = xyes &&
9932 cat >>confdefs.h <<\EOF
9933 #define USE_ROOT_ENVIRON 1
9934 EOF
9935
9936 echo "$as_me:9936: checking if you want to permit setuid programs to access all files" >&5
9937 echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
9938
9939 # Check whether --enable-root-environ or --disable-root-environ was given.
9940 if test "${enable_root_environ+set}" = set; then
9941   enableval="$enable_root_environ"
9942   with_root_access=$enableval
9943 else
9944   with_root_access=yes
9945 fi;
9946 echo "$as_me:9946: result: $with_root_access" >&5
9947 echo "${ECHO_T}$with_root_access" >&6
9948 test "x$with_root_access" = xyes &&
9949 cat >>confdefs.h <<\EOF
9950 #define USE_ROOT_ACCESS 1
9951 EOF
9952
9953 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9954 ###   to reduce storage requirements for the terminfo database.
9955
9956 for ac_header in \
9957 unistd.h \
9958
9959 do
9960 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9961 echo "$as_me:9961: checking for $ac_header" >&5
9962 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9963 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9964   echo $ECHO_N "(cached) $ECHO_C" >&6
9965 else
9966   cat >"conftest.$ac_ext" <<_ACEOF
9967 #line 9967 "configure"
9968 #include "confdefs.h"
9969 #include <$ac_header>
9970 _ACEOF
9971 if { (eval echo "$as_me:9971: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9972   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9973   ac_status=$?
9974   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9975   rm -f conftest.er1
9976   cat conftest.err >&5
9977   echo "$as_me:9977: \$? = $ac_status" >&5
9978   (exit "$ac_status"); } >/dev/null; then
9979   if test -s conftest.err; then
9980     ac_cpp_err=$ac_c_preproc_warn_flag
9981   else
9982     ac_cpp_err=
9983   fi
9984 else
9985   ac_cpp_err=yes
9986 fi
9987 if test -z "$ac_cpp_err"; then
9988   eval "$as_ac_Header=yes"
9989 else
9990   echo "$as_me: failed program was:" >&5
9991   cat "conftest.$ac_ext" >&5
9992   eval "$as_ac_Header=no"
9993 fi
9994 rm -f conftest.err "conftest.$ac_ext"
9995 fi
9996 echo "$as_me:9996: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9997 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9998 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9999   cat >>confdefs.h <<EOF
10000 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10001 EOF
10002
10003 fi
10004 done
10005
10006 for ac_func in \
10007         remove \
10008         unlink
10009 do
10010 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10011 echo "$as_me:10011: checking for $ac_func" >&5
10012 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10013 if eval "test \"\${$as_ac_var+set}\" = set"; then
10014   echo $ECHO_N "(cached) $ECHO_C" >&6
10015 else
10016   cat >"conftest.$ac_ext" <<_ACEOF
10017 #line 10017 "configure"
10018 #include "confdefs.h"
10019 #define $ac_func autoconf_temporary
10020 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
10021 #undef $ac_func
10022
10023 #ifdef __cplusplus
10024 extern "C"
10025 #endif
10026
10027 /* We use char because int might match the return type of a gcc2
10028    builtin and then its argument prototype would still apply.  */
10029 char $ac_func (void);
10030
10031 int
10032 main (void)
10033 {
10034
10035 /* The GNU C library defines stubs for functions which it implements
10036     to always fail with ENOSYS.  Some functions are actually named
10037     something starting with __ and the normal name is an alias.  */
10038 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10039 #error found stub for $ac_func
10040 #endif
10041
10042         return $ac_func ();
10043   ;
10044   return 0;
10045 }
10046 _ACEOF
10047 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10048 if { (eval echo "$as_me:10048: \"$ac_link\"") >&5
10049   (eval $ac_link) 2>&5
10050   ac_status=$?
10051   echo "$as_me:10051: \$? = $ac_status" >&5
10052   (exit "$ac_status"); } &&
10053          { ac_try='test -s "conftest$ac_exeext"'
10054   { (eval echo "$as_me:10054: \"$ac_try\"") >&5
10055   (eval $ac_try) 2>&5
10056   ac_status=$?
10057   echo "$as_me:10057: \$? = $ac_status" >&5
10058   (exit "$ac_status"); }; }; then
10059   eval "$as_ac_var=yes"
10060 else
10061   echo "$as_me: failed program was:" >&5
10062 cat "conftest.$ac_ext" >&5
10063 eval "$as_ac_var=no"
10064 fi
10065 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10066 fi
10067 echo "$as_me:10067: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10068 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10069 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
10070   cat >>confdefs.h <<EOF
10071 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10072 EOF
10073
10074 fi
10075 done
10076
10077 if test "$cross_compiling" = yes ; then
10078
10079 for ac_func in \
10080                 link \
10081                 symlink
10082 do
10083 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10084 echo "$as_me:10084: checking for $ac_func" >&5
10085 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10086 if eval "test \"\${$as_ac_var+set}\" = set"; then
10087   echo $ECHO_N "(cached) $ECHO_C" >&6
10088 else
10089   cat >"conftest.$ac_ext" <<_ACEOF
10090 #line 10090 "configure"
10091 #include "confdefs.h"
10092 #define $ac_func autoconf_temporary
10093 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
10094 #undef $ac_func
10095
10096 #ifdef __cplusplus
10097 extern "C"
10098 #endif
10099
10100 /* We use char because int might match the return type of a gcc2
10101    builtin and then its argument prototype would still apply.  */
10102 char $ac_func (void);
10103
10104 int
10105 main (void)
10106 {
10107
10108 /* The GNU C library defines stubs for functions which it implements
10109     to always fail with ENOSYS.  Some functions are actually named
10110     something starting with __ and the normal name is an alias.  */
10111 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10112 #error found stub for $ac_func
10113 #endif
10114
10115         return $ac_func ();
10116   ;
10117   return 0;
10118 }
10119 _ACEOF
10120 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10121 if { (eval echo "$as_me:10121: \"$ac_link\"") >&5
10122   (eval $ac_link) 2>&5
10123   ac_status=$?
10124   echo "$as_me:10124: \$? = $ac_status" >&5
10125   (exit "$ac_status"); } &&
10126          { ac_try='test -s "conftest$ac_exeext"'
10127   { (eval echo "$as_me:10127: \"$ac_try\"") >&5
10128   (eval $ac_try) 2>&5
10129   ac_status=$?
10130   echo "$as_me:10130: \$? = $ac_status" >&5
10131   (exit "$ac_status"); }; }; then
10132   eval "$as_ac_var=yes"
10133 else
10134   echo "$as_me: failed program was:" >&5
10135 cat "conftest.$ac_ext" >&5
10136 eval "$as_ac_var=no"
10137 fi
10138 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10139 fi
10140 echo "$as_me:10140: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10141 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10142 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
10143   cat >>confdefs.h <<EOF
10144 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10145 EOF
10146
10147 fi
10148 done
10149
10150 else
10151         echo "$as_me:10151: checking if link/symlink functions work" >&5
10152 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
10153 if test "${cf_cv_link_funcs+set}" = set; then
10154   echo $ECHO_N "(cached) $ECHO_C" >&6
10155 else
10156
10157                 cf_cv_link_funcs=
10158                 for cf_func in link symlink ; do
10159                         if test "$cross_compiling" = yes; then
10160
10161                         eval 'ac_cv_func_'$cf_func'=error'
10162 else
10163   cat >"conftest.$ac_ext" <<_ACEOF
10164 #line 10164 "configure"
10165 #include "confdefs.h"
10166
10167 $ac_includes_default
10168
10169 int main(void)
10170 {
10171         int fail = 0;
10172         char *src = "conftest.tmp";
10173         char *dst = "conftest.chk";
10174         struct stat src_sb, dst_sb;
10175         FILE *fp = fopen(src, "w");
10176         if (fp == 0) { fail = 3; } else {
10177                 fclose(fp); stat(src, &src_sb);
10178                 if ($cf_func(src, dst) < 0) {
10179                         fail = 1;
10180                 } else if (stat(dst, &dst_sb) < 0) {
10181                         fail = 2;
10182                 } else {
10183                         long diff = (dst_sb.st_mtime - src_sb.st_mtime);
10184                         if (diff < 0) diff = -diff;
10185                         if (diff > 2) fail = 3;
10186                 }
10187         }
10188 #ifdef HAVE_UNLINK
10189         unlink(dst); unlink(src);
10190 #else
10191         remove(dst); remove(src);
10192 #endif
10193         ${cf_cv_main_return:-return} (fail);
10194 }
10195
10196 _ACEOF
10197 rm -f "conftest$ac_exeext"
10198 if { (eval echo "$as_me:10198: \"$ac_link\"") >&5
10199   (eval $ac_link) 2>&5
10200   ac_status=$?
10201   echo "$as_me:10201: \$? = $ac_status" >&5
10202   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10203   { (eval echo "$as_me:10203: \"$ac_try\"") >&5
10204   (eval $ac_try) 2>&5
10205   ac_status=$?
10206   echo "$as_me:10206: \$? = $ac_status" >&5
10207   (exit "$ac_status"); }; }; then
10208
10209                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
10210                         eval 'ac_cv_func_'$cf_func'=yes'
10211 else
10212   echo "$as_me: program exited with status $ac_status" >&5
10213 echo "$as_me: failed program was:" >&5
10214 cat "conftest.$ac_ext" >&5
10215
10216                         eval 'ac_cv_func_'$cf_func'=no'
10217 fi
10218 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10219 fi
10220                 done
10221                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
10222
10223 fi
10224 echo "$as_me:10224: result: $cf_cv_link_funcs" >&5
10225 echo "${ECHO_T}$cf_cv_link_funcs" >&6
10226         test "$ac_cv_func_link"    = yes &&
10227 cat >>confdefs.h <<\EOF
10228 #define HAVE_LINK 1
10229 EOF
10230
10231         test "$ac_cv_func_symlink" = yes &&
10232 cat >>confdefs.h <<\EOF
10233 #define HAVE_SYMLINK 1
10234 EOF
10235
10236 fi
10237
10238 with_links=no
10239 with_symlinks=no
10240
10241 # soft links (symbolic links) are useful for some systems where hard links do
10242 # not work, or to make it simpler to copy terminfo trees around.
10243 if test "x$ac_cv_func_symlink" = xyes ; then
10244         echo "$as_me:10244: checking if tic should use symbolic links" >&5
10245 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
10246
10247 # Check whether --enable-symlinks or --disable-symlinks was given.
10248 if test "${enable_symlinks+set}" = set; then
10249   enableval="$enable_symlinks"
10250   with_symlinks=$enableval
10251 else
10252   with_symlinks=no
10253 fi;
10254         echo "$as_me:10254: result: $with_symlinks" >&5
10255 echo "${ECHO_T}$with_symlinks" >&6
10256 fi
10257
10258 # If we have hard links and did not choose to use soft links instead, there is
10259 # no reason to make this choice optional - use the hard links.
10260 if test "$with_symlinks" = no ; then
10261         echo "$as_me:10261: checking if tic should use hard links" >&5
10262 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
10263         if test "x$ac_cv_func_link" = xyes ; then
10264                 with_links=yes
10265         else
10266                 with_links=no
10267         fi
10268         echo "$as_me:10268: result: $with_links" >&5
10269 echo "${ECHO_T}$with_links" >&6
10270 fi
10271
10272 test "x$with_links" = xyes &&
10273 cat >>confdefs.h <<\EOF
10274 #define USE_LINKS 1
10275 EOF
10276
10277 test "x$with_symlinks" = xyes &&
10278 cat >>confdefs.h <<\EOF
10279 #define USE_SYMLINKS 1
10280 EOF
10281
10282 ###   use option --enable-broken-linker to force on use of broken-linker support
10283
10284 echo "$as_me:10284: checking if you want broken-linker support code" >&5
10285 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
10286
10287 # Check whether --enable-broken_linker or --disable-broken_linker was given.
10288 if test "${enable_broken_linker+set}" = set; then
10289   enableval="$enable_broken_linker"
10290   with_broken_linker=$enableval
10291 else
10292   with_broken_linker=no
10293 fi;
10294 echo "$as_me:10294: result: $with_broken_linker" >&5
10295 echo "${ECHO_T}$with_broken_linker" >&6
10296
10297 : "${BROKEN_LINKER:=0}"
10298 if test "x$with_broken_linker" = xyes ; then
10299
10300 cat >>confdefs.h <<\EOF
10301 #define BROKEN_LINKER 1
10302 EOF
10303
10304         BROKEN_LINKER=1
10305 fi
10306
10307 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
10308 echo "$as_me:10308: checking if tputs should process BSD-style prefix padding" >&5
10309 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
10310
10311 # Check whether --enable-bsdpad or --disable-bsdpad was given.
10312 if test "${enable_bsdpad+set}" = set; then
10313   enableval="$enable_bsdpad"
10314   with_bsdpad=$enableval
10315 else
10316   with_bsdpad=no
10317 fi;
10318 echo "$as_me:10318: result: $with_bsdpad" >&5
10319 echo "${ECHO_T}$with_bsdpad" >&6
10320 test "x$with_bsdpad" = xyes &&
10321 cat >>confdefs.h <<\EOF
10322 #define BSD_TPUTS 1
10323 EOF
10324
10325 ###   use option --enable-widec to turn on use of wide-character support
10326 NCURSES_CH_T=chtype
10327 NCURSES_LIBUTF8=0
10328
10329 NEED_WCHAR_H=0
10330 NCURSES_MBSTATE_T=0
10331 NCURSES_WCHAR_T=0
10332 NCURSES_WINT_T=0
10333
10334 # Check to define _XOPEN_SOURCE "automatically"
10335 CPPFLAGS_before_XOPEN="$CPPFLAGS"
10336
10337 echo "$as_me:10337: checking if the POSIX test-macros are already defined" >&5
10338 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
10339 if test "${cf_cv_posix_visible+set}" = set; then
10340   echo $ECHO_N "(cached) $ECHO_C" >&6
10341 else
10342
10343 cat >"conftest.$ac_ext" <<_ACEOF
10344 #line 10344 "configure"
10345 #include "confdefs.h"
10346 #include <stdio.h>
10347 int
10348 main (void)
10349 {
10350
10351 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
10352         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
10353         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
10354         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
10355 #error conflicting symbols found
10356 #endif
10357
10358   ;
10359   return 0;
10360 }
10361 _ACEOF
10362 rm -f "conftest.$ac_objext"
10363 if { (eval echo "$as_me:10363: \"$ac_compile\"") >&5
10364   (eval $ac_compile) 2>&5
10365   ac_status=$?
10366   echo "$as_me:10366: \$? = $ac_status" >&5
10367   (exit "$ac_status"); } &&
10368          { ac_try='test -s "conftest.$ac_objext"'
10369   { (eval echo "$as_me:10369: \"$ac_try\"") >&5
10370   (eval $ac_try) 2>&5
10371   ac_status=$?
10372   echo "$as_me:10372: \$? = $ac_status" >&5
10373   (exit "$ac_status"); }; }; then
10374   cf_cv_posix_visible=no
10375 else
10376   echo "$as_me: failed program was:" >&5
10377 cat "conftest.$ac_ext" >&5
10378 cf_cv_posix_visible=yes
10379 fi
10380 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10381
10382 fi
10383 echo "$as_me:10383: result: $cf_cv_posix_visible" >&5
10384 echo "${ECHO_T}$cf_cv_posix_visible" >&6
10385
10386 if test "$cf_cv_posix_visible" = no; then
10387
10388 cf_XOPEN_SOURCE=600
10389 cf_POSIX_C_SOURCE=199506L
10390 cf_xopen_source=
10391
10392 case "$host_os" in
10393 (aix[4-7]*)
10394         cf_xopen_source="-D_ALL_SOURCE"
10395         ;;
10396 (msys)
10397         cf_XOPEN_SOURCE=600
10398         ;;
10399 (darwin[0-8].*)
10400         cf_xopen_source="-D_APPLE_C_SOURCE"
10401         ;;
10402 (darwin*)
10403         cf_xopen_source="-D_DARWIN_C_SOURCE"
10404         cf_XOPEN_SOURCE=
10405         ;;
10406 (freebsd*|dragonfly*|midnightbsd*)
10407         # 5.x headers associate
10408         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
10409         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
10410         cf_POSIX_C_SOURCE=200112L
10411         cf_XOPEN_SOURCE=600
10412         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10413         ;;
10414 (hpux11*)
10415         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
10416         ;;
10417 (hpux*)
10418         cf_xopen_source="-D_HPUX_SOURCE"
10419         ;;
10420 (irix[56].*)
10421         cf_xopen_source="-D_SGI_SOURCE"
10422         cf_XOPEN_SOURCE=
10423         ;;
10424 (linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
10425
10426 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
10427
10428 echo "$as_me:10428: checking if this is the GNU C library" >&5
10429 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
10430 if test "${cf_cv_gnu_library+set}" = set; then
10431   echo $ECHO_N "(cached) $ECHO_C" >&6
10432 else
10433
10434 cat >"conftest.$ac_ext" <<_ACEOF
10435 #line 10435 "configure"
10436 #include "confdefs.h"
10437 #include <sys/types.h>
10438 int
10439 main (void)
10440 {
10441
10442         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
10443                 return 0;
10444         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
10445                 return 0;
10446         #else
10447         #       error not GNU C library
10448         #endif
10449   ;
10450   return 0;
10451 }
10452 _ACEOF
10453 rm -f "conftest.$ac_objext"
10454 if { (eval echo "$as_me:10454: \"$ac_compile\"") >&5
10455   (eval $ac_compile) 2>&5
10456   ac_status=$?
10457   echo "$as_me:10457: \$? = $ac_status" >&5
10458   (exit "$ac_status"); } &&
10459          { ac_try='test -s "conftest.$ac_objext"'
10460   { (eval echo "$as_me:10460: \"$ac_try\"") >&5
10461   (eval $ac_try) 2>&5
10462   ac_status=$?
10463   echo "$as_me:10463: \$? = $ac_status" >&5
10464   (exit "$ac_status"); }; }; then
10465   cf_cv_gnu_library=yes
10466 else
10467   echo "$as_me: failed program was:" >&5
10468 cat "conftest.$ac_ext" >&5
10469 cf_cv_gnu_library=no
10470 fi
10471 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10472
10473 fi
10474 echo "$as_me:10474: result: $cf_cv_gnu_library" >&5
10475 echo "${ECHO_T}$cf_cv_gnu_library" >&6
10476
10477 if test x$cf_cv_gnu_library = xyes; then
10478
10479         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
10480         # was changed to help a little.  newlib incorporated the change about 4
10481         # years later.
10482         echo "$as_me:10482: checking if _DEFAULT_SOURCE can be used as a basis" >&5
10483 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
10484 if test "${cf_cv_gnu_library_219+set}" = set; then
10485   echo $ECHO_N "(cached) $ECHO_C" >&6
10486 else
10487
10488                 cf_save="$CPPFLAGS"
10489
10490         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10491         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10492
10493                 cat >"conftest.$ac_ext" <<_ACEOF
10494 #line 10494 "configure"
10495 #include "confdefs.h"
10496 #include <sys/types.h>
10497 int
10498 main (void)
10499 {
10500
10501                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
10502                                 return 0;
10503                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
10504                                 return 0;
10505                         #else
10506                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
10507                         #endif
10508   ;
10509   return 0;
10510 }
10511 _ACEOF
10512 rm -f "conftest.$ac_objext"
10513 if { (eval echo "$as_me:10513: \"$ac_compile\"") >&5
10514   (eval $ac_compile) 2>&5
10515   ac_status=$?
10516   echo "$as_me:10516: \$? = $ac_status" >&5
10517   (exit "$ac_status"); } &&
10518          { ac_try='test -s "conftest.$ac_objext"'
10519   { (eval echo "$as_me:10519: \"$ac_try\"") >&5
10520   (eval $ac_try) 2>&5
10521   ac_status=$?
10522   echo "$as_me:10522: \$? = $ac_status" >&5
10523   (exit "$ac_status"); }; }; then
10524   cf_cv_gnu_library_219=yes
10525 else
10526   echo "$as_me: failed program was:" >&5
10527 cat "conftest.$ac_ext" >&5
10528 cf_cv_gnu_library_219=no
10529 fi
10530 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10531                 CPPFLAGS="$cf_save"
10532
10533 fi
10534 echo "$as_me:10534: result: $cf_cv_gnu_library_219" >&5
10535 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
10536
10537         if test "x$cf_cv_gnu_library_219" = xyes; then
10538                 cf_save="$CPPFLAGS"
10539                 echo "$as_me:10539: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
10540 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
10541 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
10542   echo $ECHO_N "(cached) $ECHO_C" >&6
10543 else
10544
10545 cf_fix_cppflags=no
10546 cf_new_cflags=
10547 cf_new_cppflags=
10548 cf_new_extra_cppflags=
10549
10550 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
10551 do
10552 case "$cf_fix_cppflags" in
10553 (no)
10554         case "$cf_add_cflags" in
10555         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10556                 case "$cf_add_cflags" in
10557                 (-D*)
10558                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10559
10560                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10561                                 && test -z "${cf_tst_cflags}" \
10562                                 && cf_fix_cppflags=yes
10563
10564                         if test "$cf_fix_cppflags" = yes ; then
10565
10566         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10567         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10568
10569                                 continue
10570                         elif test "${cf_tst_cflags}" = "\"'" ; then
10571
10572         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10573         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10574
10575                                 continue
10576                         fi
10577                         ;;
10578                 esac
10579                 case "$CPPFLAGS" in
10580                 (*$cf_add_cflags)
10581                         ;;
10582                 (*)
10583                         case "$cf_add_cflags" in
10584                         (-D*)
10585                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10586
10587 CPPFLAGS=`echo "$CPPFLAGS" | \
10588         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10589                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10590
10591                                 ;;
10592                         esac
10593
10594         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10595         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10596
10597                         ;;
10598                 esac
10599                 ;;
10600         (*)
10601
10602         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10603         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10604
10605                 ;;
10606         esac
10607         ;;
10608 (yes)
10609
10610         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10611         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10612
10613         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10614
10615         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10616                 && test -z "${cf_tst_cflags}" \
10617                 && cf_fix_cppflags=no
10618         ;;
10619 esac
10620 done
10621
10622 if test -n "$cf_new_cflags" ; then
10623
10624         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10625         CFLAGS="${CFLAGS}$cf_new_cflags"
10626
10627 fi
10628
10629 if test -n "$cf_new_cppflags" ; then
10630
10631         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10632         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10633
10634 fi
10635
10636 if test -n "$cf_new_extra_cppflags" ; then
10637
10638         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10639         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10640
10641 fi
10642
10643                         cat >"conftest.$ac_ext" <<_ACEOF
10644 #line 10644 "configure"
10645 #include "confdefs.h"
10646
10647                                 #include <limits.h>
10648                                 #include <sys/types.h>
10649
10650 int
10651 main (void)
10652 {
10653
10654                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
10655                                         return 0;
10656                                 #else
10657                                 #       error GNU C library is too old
10658                                 #endif
10659   ;
10660   return 0;
10661 }
10662 _ACEOF
10663 rm -f "conftest.$ac_objext"
10664 if { (eval echo "$as_me:10664: \"$ac_compile\"") >&5
10665   (eval $ac_compile) 2>&5
10666   ac_status=$?
10667   echo "$as_me:10667: \$? = $ac_status" >&5
10668   (exit "$ac_status"); } &&
10669          { ac_try='test -s "conftest.$ac_objext"'
10670   { (eval echo "$as_me:10670: \"$ac_try\"") >&5
10671   (eval $ac_try) 2>&5
10672   ac_status=$?
10673   echo "$as_me:10673: \$? = $ac_status" >&5
10674   (exit "$ac_status"); }; }; then
10675   cf_cv_gnu_dftsrc_219=yes
10676 else
10677   echo "$as_me: failed program was:" >&5
10678 cat "conftest.$ac_ext" >&5
10679 cf_cv_gnu_dftsrc_219=no
10680 fi
10681 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10682
10683 fi
10684 echo "$as_me:10684: result: $cf_cv_gnu_dftsrc_219" >&5
10685 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
10686                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
10687         else
10688                 cf_cv_gnu_dftsrc_219=maybe
10689         fi
10690
10691         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
10692
10693                 echo "$as_me:10693: checking if we must define _GNU_SOURCE" >&5
10694 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10695 if test "${cf_cv_gnu_source+set}" = set; then
10696   echo $ECHO_N "(cached) $ECHO_C" >&6
10697 else
10698
10699                 cat >"conftest.$ac_ext" <<_ACEOF
10700 #line 10700 "configure"
10701 #include "confdefs.h"
10702 #include <sys/types.h>
10703 int
10704 main (void)
10705 {
10706
10707                         #ifndef _XOPEN_SOURCE
10708                         #error  expected _XOPEN_SOURCE to be defined
10709                         #endif
10710   ;
10711   return 0;
10712 }
10713 _ACEOF
10714 rm -f "conftest.$ac_objext"
10715 if { (eval echo "$as_me:10715: \"$ac_compile\"") >&5
10716   (eval $ac_compile) 2>&5
10717   ac_status=$?
10718   echo "$as_me:10718: \$? = $ac_status" >&5
10719   (exit "$ac_status"); } &&
10720          { ac_try='test -s "conftest.$ac_objext"'
10721   { (eval echo "$as_me:10721: \"$ac_try\"") >&5
10722   (eval $ac_try) 2>&5
10723   ac_status=$?
10724   echo "$as_me:10724: \$? = $ac_status" >&5
10725   (exit "$ac_status"); }; }; then
10726   cf_cv_gnu_source=no
10727 else
10728   echo "$as_me: failed program was:" >&5
10729 cat "conftest.$ac_ext" >&5
10730 cf_save="$CPPFLAGS"
10731
10732 cf_fix_cppflags=no
10733 cf_new_cflags=
10734 cf_new_cppflags=
10735 cf_new_extra_cppflags=
10736
10737 for cf_add_cflags in -D_GNU_SOURCE
10738 do
10739 case "$cf_fix_cppflags" in
10740 (no)
10741         case "$cf_add_cflags" in
10742         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10743                 case "$cf_add_cflags" in
10744                 (-D*)
10745                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10746
10747                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10748                                 && test -z "${cf_tst_cflags}" \
10749                                 && cf_fix_cppflags=yes
10750
10751                         if test "$cf_fix_cppflags" = yes ; then
10752
10753         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10754         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10755
10756                                 continue
10757                         elif test "${cf_tst_cflags}" = "\"'" ; then
10758
10759         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10760         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10761
10762                                 continue
10763                         fi
10764                         ;;
10765                 esac
10766                 case "$CPPFLAGS" in
10767                 (*$cf_add_cflags)
10768                         ;;
10769                 (*)
10770                         case "$cf_add_cflags" in
10771                         (-D*)
10772                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10773
10774 CPPFLAGS=`echo "$CPPFLAGS" | \
10775         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10776                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10777
10778                                 ;;
10779                         esac
10780
10781         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10782         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10783
10784                         ;;
10785                 esac
10786                 ;;
10787         (*)
10788
10789         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10790         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10791
10792                 ;;
10793         esac
10794         ;;
10795 (yes)
10796
10797         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10798         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10799
10800         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10801
10802         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10803                 && test -z "${cf_tst_cflags}" \
10804                 && cf_fix_cppflags=no
10805         ;;
10806 esac
10807 done
10808
10809 if test -n "$cf_new_cflags" ; then
10810
10811         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10812         CFLAGS="${CFLAGS}$cf_new_cflags"
10813
10814 fi
10815
10816 if test -n "$cf_new_cppflags" ; then
10817
10818         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10819         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10820
10821 fi
10822
10823 if test -n "$cf_new_extra_cppflags" ; then
10824
10825         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10826         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10827
10828 fi
10829
10830                          cat >"conftest.$ac_ext" <<_ACEOF
10831 #line 10831 "configure"
10832 #include "confdefs.h"
10833 #include <sys/types.h>
10834 int
10835 main (void)
10836 {
10837
10838                                 #ifdef _XOPEN_SOURCE
10839                                 #error  expected _XOPEN_SOURCE to be undefined
10840                                 #endif
10841   ;
10842   return 0;
10843 }
10844 _ACEOF
10845 rm -f "conftest.$ac_objext"
10846 if { (eval echo "$as_me:10846: \"$ac_compile\"") >&5
10847   (eval $ac_compile) 2>&5
10848   ac_status=$?
10849   echo "$as_me:10849: \$? = $ac_status" >&5
10850   (exit "$ac_status"); } &&
10851          { ac_try='test -s "conftest.$ac_objext"'
10852   { (eval echo "$as_me:10852: \"$ac_try\"") >&5
10853   (eval $ac_try) 2>&5
10854   ac_status=$?
10855   echo "$as_me:10855: \$? = $ac_status" >&5
10856   (exit "$ac_status"); }; }; then
10857   cf_cv_gnu_source=no
10858 else
10859   echo "$as_me: failed program was:" >&5
10860 cat "conftest.$ac_ext" >&5
10861 cf_cv_gnu_source=yes
10862 fi
10863 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10864                         CPPFLAGS="$cf_save"
10865
10866 fi
10867 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10868
10869 fi
10870 echo "$as_me:10870: result: $cf_cv_gnu_source" >&5
10871 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10872
10873                 if test "$cf_cv_gnu_source" = yes
10874                 then
10875                 echo "$as_me:10875: checking if we should also define _DEFAULT_SOURCE" >&5
10876 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10877 if test "${cf_cv_default_source+set}" = set; then
10878   echo $ECHO_N "(cached) $ECHO_C" >&6
10879 else
10880
10881         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10882         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10883
10884                         cat >"conftest.$ac_ext" <<_ACEOF
10885 #line 10885 "configure"
10886 #include "confdefs.h"
10887 #include <sys/types.h>
10888 int
10889 main (void)
10890 {
10891
10892                                 #ifdef _DEFAULT_SOURCE
10893                                 #error  expected _DEFAULT_SOURCE to be undefined
10894                                 #endif
10895   ;
10896   return 0;
10897 }
10898 _ACEOF
10899 rm -f "conftest.$ac_objext"
10900 if { (eval echo "$as_me:10900: \"$ac_compile\"") >&5
10901   (eval $ac_compile) 2>&5
10902   ac_status=$?
10903   echo "$as_me:10903: \$? = $ac_status" >&5
10904   (exit "$ac_status"); } &&
10905          { ac_try='test -s "conftest.$ac_objext"'
10906   { (eval echo "$as_me:10906: \"$ac_try\"") >&5
10907   (eval $ac_try) 2>&5
10908   ac_status=$?
10909   echo "$as_me:10909: \$? = $ac_status" >&5
10910   (exit "$ac_status"); }; }; then
10911   cf_cv_default_source=no
10912 else
10913   echo "$as_me: failed program was:" >&5
10914 cat "conftest.$ac_ext" >&5
10915 cf_cv_default_source=yes
10916 fi
10917 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10918
10919 fi
10920 echo "$as_me:10920: result: $cf_cv_default_source" >&5
10921 echo "${ECHO_T}$cf_cv_default_source" >&6
10922                         if test "$cf_cv_default_source" = yes
10923                         then
10924
10925         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10926         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10927
10928                         fi
10929                 fi
10930         fi
10931
10932 fi
10933
10934         ;;
10935 (minix*)
10936         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10937         ;;
10938 (mirbsd*)
10939         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10940         cf_XOPEN_SOURCE=
10941
10942 if test "$cf_cv_posix_visible" = no; then
10943
10944 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10945
10946 cf_save_CFLAGS="$CFLAGS"
10947 cf_save_CPPFLAGS="$CPPFLAGS"
10948
10949 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10950         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10951                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10952
10953 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10954         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10955                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10956
10957 echo "$as_me:10957: checking if we should define _POSIX_C_SOURCE" >&5
10958 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10959 if test "${cf_cv_posix_c_source+set}" = set; then
10960   echo $ECHO_N "(cached) $ECHO_C" >&6
10961 else
10962
10963 echo "${as_me:-configure}:10963: testing if the symbol is already defined go no further ..." 1>&5
10964
10965         cat >"conftest.$ac_ext" <<_ACEOF
10966 #line 10966 "configure"
10967 #include "confdefs.h"
10968 #include <sys/types.h>
10969 int
10970 main (void)
10971 {
10972
10973 #ifndef _POSIX_C_SOURCE
10974 make an error
10975 #endif
10976   ;
10977   return 0;
10978 }
10979 _ACEOF
10980 rm -f "conftest.$ac_objext"
10981 if { (eval echo "$as_me:10981: \"$ac_compile\"") >&5
10982   (eval $ac_compile) 2>&5
10983   ac_status=$?
10984   echo "$as_me:10984: \$? = $ac_status" >&5
10985   (exit "$ac_status"); } &&
10986          { ac_try='test -s "conftest.$ac_objext"'
10987   { (eval echo "$as_me:10987: \"$ac_try\"") >&5
10988   (eval $ac_try) 2>&5
10989   ac_status=$?
10990   echo "$as_me:10990: \$? = $ac_status" >&5
10991   (exit "$ac_status"); }; }; then
10992   cf_cv_posix_c_source=no
10993 else
10994   echo "$as_me: failed program was:" >&5
10995 cat "conftest.$ac_ext" >&5
10996 cf_want_posix_source=no
10997          case .$cf_POSIX_C_SOURCE in
10998          (.[12]??*)
10999                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11000                 ;;
11001          (.2)
11002                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11003                 cf_want_posix_source=yes
11004                 ;;
11005          (.*)
11006                 cf_want_posix_source=yes
11007                 ;;
11008          esac
11009          if test "$cf_want_posix_source" = yes ; then
11010                 cat >"conftest.$ac_ext" <<_ACEOF
11011 #line 11011 "configure"
11012 #include "confdefs.h"
11013 #include <sys/types.h>
11014 int
11015 main (void)
11016 {
11017
11018 #ifdef _POSIX_SOURCE
11019 make an error
11020 #endif
11021   ;
11022   return 0;
11023 }
11024 _ACEOF
11025 rm -f "conftest.$ac_objext"
11026 if { (eval echo "$as_me:11026: \"$ac_compile\"") >&5
11027   (eval $ac_compile) 2>&5
11028   ac_status=$?
11029   echo "$as_me:11029: \$? = $ac_status" >&5
11030   (exit "$ac_status"); } &&
11031          { ac_try='test -s "conftest.$ac_objext"'
11032   { (eval echo "$as_me:11032: \"$ac_try\"") >&5
11033   (eval $ac_try) 2>&5
11034   ac_status=$?
11035   echo "$as_me:11035: \$? = $ac_status" >&5
11036   (exit "$ac_status"); }; }; then
11037   :
11038 else
11039   echo "$as_me: failed program was:" >&5
11040 cat "conftest.$ac_ext" >&5
11041 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11042 fi
11043 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11044          fi
11045
11046 echo "${as_me:-configure}:11046: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11047
11048          CFLAGS="$cf_trim_CFLAGS"
11049          CPPFLAGS="$cf_trim_CPPFLAGS"
11050
11051         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11052         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11053
11054 echo "${as_me:-configure}:11054: testing if the second compile does not leave our definition intact error ..." 1>&5
11055
11056          cat >"conftest.$ac_ext" <<_ACEOF
11057 #line 11057 "configure"
11058 #include "confdefs.h"
11059 #include <sys/types.h>
11060 int
11061 main (void)
11062 {
11063
11064 #ifndef _POSIX_C_SOURCE
11065 make an error
11066 #endif
11067   ;
11068   return 0;
11069 }
11070 _ACEOF
11071 rm -f "conftest.$ac_objext"
11072 if { (eval echo "$as_me:11072: \"$ac_compile\"") >&5
11073   (eval $ac_compile) 2>&5
11074   ac_status=$?
11075   echo "$as_me:11075: \$? = $ac_status" >&5
11076   (exit "$ac_status"); } &&
11077          { ac_try='test -s "conftest.$ac_objext"'
11078   { (eval echo "$as_me:11078: \"$ac_try\"") >&5
11079   (eval $ac_try) 2>&5
11080   ac_status=$?
11081   echo "$as_me:11081: \$? = $ac_status" >&5
11082   (exit "$ac_status"); }; }; then
11083   :
11084 else
11085   echo "$as_me: failed program was:" >&5
11086 cat "conftest.$ac_ext" >&5
11087 cf_cv_posix_c_source=no
11088 fi
11089 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11090          CFLAGS="$cf_save_CFLAGS"
11091          CPPFLAGS="$cf_save_CPPFLAGS"
11092
11093 fi
11094 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11095
11096 fi
11097 echo "$as_me:11097: result: $cf_cv_posix_c_source" >&5
11098 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11099
11100 if test "$cf_cv_posix_c_source" != no ; then
11101         CFLAGS="$cf_trim_CFLAGS"
11102         CPPFLAGS="$cf_trim_CPPFLAGS"
11103
11104 cf_fix_cppflags=no
11105 cf_new_cflags=
11106 cf_new_cppflags=
11107 cf_new_extra_cppflags=
11108
11109 for cf_add_cflags in $cf_cv_posix_c_source
11110 do
11111 case "$cf_fix_cppflags" in
11112 (no)
11113         case "$cf_add_cflags" in
11114         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11115                 case "$cf_add_cflags" in
11116                 (-D*)
11117                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11118
11119                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11120                                 && test -z "${cf_tst_cflags}" \
11121                                 && cf_fix_cppflags=yes
11122
11123                         if test "$cf_fix_cppflags" = yes ; then
11124
11125         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11126         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11127
11128                                 continue
11129                         elif test "${cf_tst_cflags}" = "\"'" ; then
11130
11131         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11132         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11133
11134                                 continue
11135                         fi
11136                         ;;
11137                 esac
11138                 case "$CPPFLAGS" in
11139                 (*$cf_add_cflags)
11140                         ;;
11141                 (*)
11142                         case "$cf_add_cflags" in
11143                         (-D*)
11144                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11145
11146 CPPFLAGS=`echo "$CPPFLAGS" | \
11147         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11148                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11149
11150                                 ;;
11151                         esac
11152
11153         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11154         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11155
11156                         ;;
11157                 esac
11158                 ;;
11159         (*)
11160
11161         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11162         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11163
11164                 ;;
11165         esac
11166         ;;
11167 (yes)
11168
11169         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11170         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11171
11172         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11173
11174         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11175                 && test -z "${cf_tst_cflags}" \
11176                 && cf_fix_cppflags=no
11177         ;;
11178 esac
11179 done
11180
11181 if test -n "$cf_new_cflags" ; then
11182
11183         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11184         CFLAGS="${CFLAGS}$cf_new_cflags"
11185
11186 fi
11187
11188 if test -n "$cf_new_cppflags" ; then
11189
11190         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11191         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11192
11193 fi
11194
11195 if test -n "$cf_new_extra_cppflags" ; then
11196
11197         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11198         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11199
11200 fi
11201
11202 fi
11203
11204 fi # cf_cv_posix_visible
11205
11206         ;;
11207 (netbsd*)
11208         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
11209         ;;
11210 (openbsd[6-9]*)
11211         # OpenBSD 6.x has broken locale support, both compile-time and runtime.
11212         # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
11213         # Abusing the conformance level is a workaround.
11214         { echo "$as_me:11214: WARNING: this system does not provide usable locale support" >&5
11215 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
11216         cf_xopen_source="-D_BSD_SOURCE"
11217         cf_XOPEN_SOURCE=700
11218         ;;
11219 (openbsd[4-5]*)
11220         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
11221         cf_xopen_source="-D_BSD_SOURCE"
11222         cf_XOPEN_SOURCE=600
11223         ;;
11224 (openbsd*)
11225         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
11226         ;;
11227 (osf[45]*)
11228         cf_xopen_source="-D_OSF_SOURCE"
11229         ;;
11230 (nto-qnx*)
11231         cf_xopen_source="-D_QNX_SOURCE"
11232         ;;
11233 (sco*)
11234         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
11235         ;;
11236 (solaris2.*)
11237         cf_xopen_source="-D__EXTENSIONS__"
11238         cf_cv_xopen_source=broken
11239         ;;
11240 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
11241         cf_XOPEN_SOURCE=
11242         cf_POSIX_C_SOURCE=
11243         ;;
11244 (*)
11245
11246 echo "$as_me:11246: checking if we should define _XOPEN_SOURCE" >&5
11247 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11248 if test "${cf_cv_xopen_source+set}" = set; then
11249   echo $ECHO_N "(cached) $ECHO_C" >&6
11250 else
11251
11252         cat >"conftest.$ac_ext" <<_ACEOF
11253 #line 11253 "configure"
11254 #include "confdefs.h"
11255
11256 #include <stdlib.h>
11257 #include <string.h>
11258 #include <sys/types.h>
11259
11260 int
11261 main (void)
11262 {
11263
11264 #ifndef _XOPEN_SOURCE
11265 make an error
11266 #endif
11267
11268   ;
11269   return 0;
11270 }
11271 _ACEOF
11272 rm -f "conftest.$ac_objext"
11273 if { (eval echo "$as_me:11273: \"$ac_compile\"") >&5
11274   (eval $ac_compile) 2>&5
11275   ac_status=$?
11276   echo "$as_me:11276: \$? = $ac_status" >&5
11277   (exit "$ac_status"); } &&
11278          { ac_try='test -s "conftest.$ac_objext"'
11279   { (eval echo "$as_me:11279: \"$ac_try\"") >&5
11280   (eval $ac_try) 2>&5
11281   ac_status=$?
11282   echo "$as_me:11282: \$? = $ac_status" >&5
11283   (exit "$ac_status"); }; }; then
11284   cf_cv_xopen_source=no
11285 else
11286   echo "$as_me: failed program was:" >&5
11287 cat "conftest.$ac_ext" >&5
11288 cf_save="$CPPFLAGS"
11289
11290         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11291         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11292
11293          cat >"conftest.$ac_ext" <<_ACEOF
11294 #line 11294 "configure"
11295 #include "confdefs.h"
11296
11297 #include <stdlib.h>
11298 #include <string.h>
11299 #include <sys/types.h>
11300
11301 int
11302 main (void)
11303 {
11304
11305 #ifndef _XOPEN_SOURCE
11306 make an error
11307 #endif
11308
11309   ;
11310   return 0;
11311 }
11312 _ACEOF
11313 rm -f "conftest.$ac_objext"
11314 if { (eval echo "$as_me:11314: \"$ac_compile\"") >&5
11315   (eval $ac_compile) 2>&5
11316   ac_status=$?
11317   echo "$as_me:11317: \$? = $ac_status" >&5
11318   (exit "$ac_status"); } &&
11319          { ac_try='test -s "conftest.$ac_objext"'
11320   { (eval echo "$as_me:11320: \"$ac_try\"") >&5
11321   (eval $ac_try) 2>&5
11322   ac_status=$?
11323   echo "$as_me:11323: \$? = $ac_status" >&5
11324   (exit "$ac_status"); }; }; then
11325   cf_cv_xopen_source=no
11326 else
11327   echo "$as_me: failed program was:" >&5
11328 cat "conftest.$ac_ext" >&5
11329 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11330 fi
11331 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11332                 CPPFLAGS="$cf_save"
11333
11334 fi
11335 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11336
11337 fi
11338 echo "$as_me:11338: result: $cf_cv_xopen_source" >&5
11339 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11340
11341 if test "$cf_cv_xopen_source" != no ; then
11342
11343 CFLAGS=`echo "$CFLAGS" | \
11344         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11345                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11346
11347 CPPFLAGS=`echo "$CPPFLAGS" | \
11348         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11349                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11350
11351         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11352
11353 for cf_add_cflags in $cf_temp_xopen_source
11354 do
11355         case "x$cf_add_cflags" in
11356         (x-[DU]*)
11357
11358 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11359 while true
11360 do
11361         cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[         ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11362         test "$CFLAGS" != "$cf_old_cflag" || break
11363
11364         CFLAGS="$cf_old_cflag"
11365 done
11366
11367 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11368 while true
11369 do
11370         cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[       ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11371         test "$CPPFLAGS" != "$cf_old_cflag" || break
11372
11373         CPPFLAGS="$cf_old_cflag"
11374 done
11375
11376                 ;;
11377         esac
11378
11379 cf_fix_cppflags=no
11380 cf_new_cflags=
11381 cf_new_cppflags=
11382 cf_new_extra_cppflags=
11383
11384 for cf_add_cflags in $cf_add_cflags
11385 do
11386 case "$cf_fix_cppflags" in
11387 (no)
11388         case "$cf_add_cflags" in
11389         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11390                 case "$cf_add_cflags" in
11391                 (-D*)
11392                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11393
11394                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11395                                 && test -z "${cf_tst_cflags}" \
11396                                 && cf_fix_cppflags=yes
11397
11398                         if test "$cf_fix_cppflags" = yes ; then
11399
11400         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11401         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11402
11403                                 continue
11404                         elif test "${cf_tst_cflags}" = "\"'" ; then
11405
11406         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11407         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11408
11409                                 continue
11410                         fi
11411                         ;;
11412                 esac
11413                 case "$CPPFLAGS" in
11414                 (*$cf_add_cflags)
11415                         ;;
11416                 (*)
11417                         case "$cf_add_cflags" in
11418                         (-D*)
11419                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11420
11421 CPPFLAGS=`echo "$CPPFLAGS" | \
11422         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11423                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11424
11425                                 ;;
11426                         esac
11427
11428         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11429         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11430
11431                         ;;
11432                 esac
11433                 ;;
11434         (*)
11435
11436         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11437         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11438
11439                 ;;
11440         esac
11441         ;;
11442 (yes)
11443
11444         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11445         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11446
11447         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11448
11449         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11450                 && test -z "${cf_tst_cflags}" \
11451                 && cf_fix_cppflags=no
11452         ;;
11453 esac
11454 done
11455
11456 if test -n "$cf_new_cflags" ; then
11457
11458         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11459         CFLAGS="${CFLAGS}$cf_new_cflags"
11460
11461 fi
11462
11463 if test -n "$cf_new_cppflags" ; then
11464
11465         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11466         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11467
11468 fi
11469
11470 if test -n "$cf_new_extra_cppflags" ; then
11471
11472         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11473         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11474
11475 fi
11476
11477 done
11478
11479 fi
11480
11481         cf_save_xopen_cppflags="$CPPFLAGS"
11482
11483 if test "$cf_cv_posix_visible" = no; then
11484
11485 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
11486
11487 cf_save_CFLAGS="$CFLAGS"
11488 cf_save_CPPFLAGS="$CPPFLAGS"
11489
11490 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
11491         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11492                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11493
11494 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
11495         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11496                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11497
11498 echo "$as_me:11498: checking if we should define _POSIX_C_SOURCE" >&5
11499 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11500 if test "${cf_cv_posix_c_source+set}" = set; then
11501   echo $ECHO_N "(cached) $ECHO_C" >&6
11502 else
11503
11504 echo "${as_me:-configure}:11504: testing if the symbol is already defined go no further ..." 1>&5
11505
11506         cat >"conftest.$ac_ext" <<_ACEOF
11507 #line 11507 "configure"
11508 #include "confdefs.h"
11509 #include <sys/types.h>
11510 int
11511 main (void)
11512 {
11513
11514 #ifndef _POSIX_C_SOURCE
11515 make an error
11516 #endif
11517   ;
11518   return 0;
11519 }
11520 _ACEOF
11521 rm -f "conftest.$ac_objext"
11522 if { (eval echo "$as_me:11522: \"$ac_compile\"") >&5
11523   (eval $ac_compile) 2>&5
11524   ac_status=$?
11525   echo "$as_me:11525: \$? = $ac_status" >&5
11526   (exit "$ac_status"); } &&
11527          { ac_try='test -s "conftest.$ac_objext"'
11528   { (eval echo "$as_me:11528: \"$ac_try\"") >&5
11529   (eval $ac_try) 2>&5
11530   ac_status=$?
11531   echo "$as_me:11531: \$? = $ac_status" >&5
11532   (exit "$ac_status"); }; }; then
11533   cf_cv_posix_c_source=no
11534 else
11535   echo "$as_me: failed program was:" >&5
11536 cat "conftest.$ac_ext" >&5
11537 cf_want_posix_source=no
11538          case .$cf_POSIX_C_SOURCE in
11539          (.[12]??*)
11540                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11541                 ;;
11542          (.2)
11543                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11544                 cf_want_posix_source=yes
11545                 ;;
11546          (.*)
11547                 cf_want_posix_source=yes
11548                 ;;
11549          esac
11550          if test "$cf_want_posix_source" = yes ; then
11551                 cat >"conftest.$ac_ext" <<_ACEOF
11552 #line 11552 "configure"
11553 #include "confdefs.h"
11554 #include <sys/types.h>
11555 int
11556 main (void)
11557 {
11558
11559 #ifdef _POSIX_SOURCE
11560 make an error
11561 #endif
11562   ;
11563   return 0;
11564 }
11565 _ACEOF
11566 rm -f "conftest.$ac_objext"
11567 if { (eval echo "$as_me:11567: \"$ac_compile\"") >&5
11568   (eval $ac_compile) 2>&5
11569   ac_status=$?
11570   echo "$as_me:11570: \$? = $ac_status" >&5
11571   (exit "$ac_status"); } &&
11572          { ac_try='test -s "conftest.$ac_objext"'
11573   { (eval echo "$as_me:11573: \"$ac_try\"") >&5
11574   (eval $ac_try) 2>&5
11575   ac_status=$?
11576   echo "$as_me:11576: \$? = $ac_status" >&5
11577   (exit "$ac_status"); }; }; then
11578   :
11579 else
11580   echo "$as_me: failed program was:" >&5
11581 cat "conftest.$ac_ext" >&5
11582 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11583 fi
11584 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11585          fi
11586
11587 echo "${as_me:-configure}:11587: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11588
11589          CFLAGS="$cf_trim_CFLAGS"
11590          CPPFLAGS="$cf_trim_CPPFLAGS"
11591
11592         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11593         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11594
11595 echo "${as_me:-configure}:11595: testing if the second compile does not leave our definition intact error ..." 1>&5
11596
11597          cat >"conftest.$ac_ext" <<_ACEOF
11598 #line 11598 "configure"
11599 #include "confdefs.h"
11600 #include <sys/types.h>
11601 int
11602 main (void)
11603 {
11604
11605 #ifndef _POSIX_C_SOURCE
11606 make an error
11607 #endif
11608   ;
11609   return 0;
11610 }
11611 _ACEOF
11612 rm -f "conftest.$ac_objext"
11613 if { (eval echo "$as_me:11613: \"$ac_compile\"") >&5
11614   (eval $ac_compile) 2>&5
11615   ac_status=$?
11616   echo "$as_me:11616: \$? = $ac_status" >&5
11617   (exit "$ac_status"); } &&
11618          { ac_try='test -s "conftest.$ac_objext"'
11619   { (eval echo "$as_me:11619: \"$ac_try\"") >&5
11620   (eval $ac_try) 2>&5
11621   ac_status=$?
11622   echo "$as_me:11622: \$? = $ac_status" >&5
11623   (exit "$ac_status"); }; }; then
11624   :
11625 else
11626   echo "$as_me: failed program was:" >&5
11627 cat "conftest.$ac_ext" >&5
11628 cf_cv_posix_c_source=no
11629 fi
11630 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11631          CFLAGS="$cf_save_CFLAGS"
11632          CPPFLAGS="$cf_save_CPPFLAGS"
11633
11634 fi
11635 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11636
11637 fi
11638 echo "$as_me:11638: result: $cf_cv_posix_c_source" >&5
11639 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11640
11641 if test "$cf_cv_posix_c_source" != no ; then
11642         CFLAGS="$cf_trim_CFLAGS"
11643         CPPFLAGS="$cf_trim_CPPFLAGS"
11644
11645 cf_fix_cppflags=no
11646 cf_new_cflags=
11647 cf_new_cppflags=
11648 cf_new_extra_cppflags=
11649
11650 for cf_add_cflags in $cf_cv_posix_c_source
11651 do
11652 case "$cf_fix_cppflags" in
11653 (no)
11654         case "$cf_add_cflags" in
11655         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11656                 case "$cf_add_cflags" in
11657                 (-D*)
11658                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11659
11660                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11661                                 && test -z "${cf_tst_cflags}" \
11662                                 && cf_fix_cppflags=yes
11663
11664                         if test "$cf_fix_cppflags" = yes ; then
11665
11666         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11667         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11668
11669                                 continue
11670                         elif test "${cf_tst_cflags}" = "\"'" ; then
11671
11672         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11673         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11674
11675                                 continue
11676                         fi
11677                         ;;
11678                 esac
11679                 case "$CPPFLAGS" in
11680                 (*$cf_add_cflags)
11681                         ;;
11682                 (*)
11683                         case "$cf_add_cflags" in
11684                         (-D*)
11685                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11686
11687 CPPFLAGS=`echo "$CPPFLAGS" | \
11688         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11689                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11690
11691                                 ;;
11692                         esac
11693
11694         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11695         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11696
11697                         ;;
11698                 esac
11699                 ;;
11700         (*)
11701
11702         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11703         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11704
11705                 ;;
11706         esac
11707         ;;
11708 (yes)
11709
11710         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11711         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11712
11713         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11714
11715         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11716                 && test -z "${cf_tst_cflags}" \
11717                 && cf_fix_cppflags=no
11718         ;;
11719 esac
11720 done
11721
11722 if test -n "$cf_new_cflags" ; then
11723
11724         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11725         CFLAGS="${CFLAGS}$cf_new_cflags"
11726
11727 fi
11728
11729 if test -n "$cf_new_cppflags" ; then
11730
11731         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11732         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11733
11734 fi
11735
11736 if test -n "$cf_new_extra_cppflags" ; then
11737
11738         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11739         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11740
11741 fi
11742
11743 fi
11744
11745 fi # cf_cv_posix_visible
11746
11747         # Some of these niche implementations use copy/paste, double-check...
11748         if test "$cf_cv_xopen_source" != no ; then
11749                 test -n "$verbose" && echo "    checking if _POSIX_C_SOURCE inteferes" 1>&6
11750
11751 echo "${as_me:-configure}:11751: testing checking if _POSIX_C_SOURCE inteferes ..." 1>&5
11752
11753                 cat >"conftest.$ac_ext" <<_ACEOF
11754 #line 11754 "configure"
11755 #include "confdefs.h"
11756
11757 #include <stdlib.h>
11758 #include <string.h>
11759 #include <sys/types.h>
11760
11761 int
11762 main (void)
11763 {
11764
11765 #ifndef _XOPEN_SOURCE
11766 make an error
11767 #endif
11768
11769   ;
11770   return 0;
11771 }
11772 _ACEOF
11773 rm -f "conftest.$ac_objext"
11774 if { (eval echo "$as_me:11774: \"$ac_compile\"") >&5
11775   (eval $ac_compile) 2>&5
11776   ac_status=$?
11777   echo "$as_me:11777: \$? = $ac_status" >&5
11778   (exit "$ac_status"); } &&
11779          { ac_try='test -s "conftest.$ac_objext"'
11780   { (eval echo "$as_me:11780: \"$ac_try\"") >&5
11781   (eval $ac_try) 2>&5
11782   ac_status=$?
11783   echo "$as_me:11783: \$? = $ac_status" >&5
11784   (exit "$ac_status"); }; }; then
11785   :
11786 else
11787   echo "$as_me: failed program was:" >&5
11788 cat "conftest.$ac_ext" >&5
11789
11790                         { echo "$as_me:11790: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
11791 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
11792                         CPPFLAGS="$cf_save_xopen_cppflags"
11793 fi
11794 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11795         fi
11796         ;;
11797 esac
11798
11799 if test -n "$cf_xopen_source" ; then
11800
11801 for cf_add_cflags in $cf_xopen_source
11802 do
11803         case "x$cf_add_cflags" in
11804         (x-[DU]*)
11805
11806 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11807 while true
11808 do
11809         cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[         ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11810         test "$CFLAGS" != "$cf_old_cflag" || break
11811         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CFLAGS" 1>&6
11812
11813 echo "${as_me:-configure}:11813: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
11814
11815         CFLAGS="$cf_old_cflag"
11816 done
11817
11818 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11819 while true
11820 do
11821         cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[       ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11822         test "$CPPFLAGS" != "$cf_old_cflag" || break
11823         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CPPFLAGS" 1>&6
11824
11825 echo "${as_me:-configure}:11825: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
11826
11827         CPPFLAGS="$cf_old_cflag"
11828 done
11829
11830                 ;;
11831         esac
11832
11833 cf_fix_cppflags=no
11834 cf_new_cflags=
11835 cf_new_cppflags=
11836 cf_new_extra_cppflags=
11837
11838 for cf_add_cflags in $cf_add_cflags
11839 do
11840 case "$cf_fix_cppflags" in
11841 (no)
11842         case "$cf_add_cflags" in
11843         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11844                 case "$cf_add_cflags" in
11845                 (-D*)
11846                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11847
11848                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11849                                 && test -z "${cf_tst_cflags}" \
11850                                 && cf_fix_cppflags=yes
11851
11852                         if test "$cf_fix_cppflags" = yes ; then
11853
11854         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11855         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11856
11857                                 continue
11858                         elif test "${cf_tst_cflags}" = "\"'" ; then
11859
11860         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11861         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11862
11863                                 continue
11864                         fi
11865                         ;;
11866                 esac
11867                 case "$CPPFLAGS" in
11868                 (*$cf_add_cflags)
11869                         ;;
11870                 (*)
11871                         case "$cf_add_cflags" in
11872                         (-D*)
11873                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11874
11875 CPPFLAGS=`echo "$CPPFLAGS" | \
11876         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11877                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11878
11879                                 ;;
11880                         esac
11881
11882         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11883         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11884
11885                         ;;
11886                 esac
11887                 ;;
11888         (*)
11889
11890         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11891         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11892
11893                 ;;
11894         esac
11895         ;;
11896 (yes)
11897
11898         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11899         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11900
11901         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11902
11903         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11904                 && test -z "${cf_tst_cflags}" \
11905                 && cf_fix_cppflags=no
11906         ;;
11907 esac
11908 done
11909
11910 if test -n "$cf_new_cflags" ; then
11911         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11912
11913 echo "${as_me:-configure}:11913: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11914
11915         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11916         CFLAGS="${CFLAGS}$cf_new_cflags"
11917
11918 fi
11919
11920 if test -n "$cf_new_cppflags" ; then
11921         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11922
11923 echo "${as_me:-configure}:11923: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11924
11925         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11926         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11927
11928 fi
11929
11930 if test -n "$cf_new_extra_cppflags" ; then
11931         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11932
11933 echo "${as_me:-configure}:11933: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11934
11935         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11936         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11937
11938 fi
11939
11940 done
11941
11942 fi
11943
11944 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11945         echo "$as_me:11945: checking if _XOPEN_SOURCE really is set" >&5
11946 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11947         cat >"conftest.$ac_ext" <<_ACEOF
11948 #line 11948 "configure"
11949 #include "confdefs.h"
11950 #include <stdlib.h>
11951 int
11952 main (void)
11953 {
11954
11955 #ifndef _XOPEN_SOURCE
11956 make an error
11957 #endif
11958   ;
11959   return 0;
11960 }
11961 _ACEOF
11962 rm -f "conftest.$ac_objext"
11963 if { (eval echo "$as_me:11963: \"$ac_compile\"") >&5
11964   (eval $ac_compile) 2>&5
11965   ac_status=$?
11966   echo "$as_me:11966: \$? = $ac_status" >&5
11967   (exit "$ac_status"); } &&
11968          { ac_try='test -s "conftest.$ac_objext"'
11969   { (eval echo "$as_me:11969: \"$ac_try\"") >&5
11970   (eval $ac_try) 2>&5
11971   ac_status=$?
11972   echo "$as_me:11972: \$? = $ac_status" >&5
11973   (exit "$ac_status"); }; }; then
11974   cf_XOPEN_SOURCE_set=yes
11975 else
11976   echo "$as_me: failed program was:" >&5
11977 cat "conftest.$ac_ext" >&5
11978 cf_XOPEN_SOURCE_set=no
11979 fi
11980 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11981         echo "$as_me:11981: result: $cf_XOPEN_SOURCE_set" >&5
11982 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11983         if test "$cf_XOPEN_SOURCE_set" = yes
11984         then
11985                 cat >"conftest.$ac_ext" <<_ACEOF
11986 #line 11986 "configure"
11987 #include "confdefs.h"
11988 #include <stdlib.h>
11989 int
11990 main (void)
11991 {
11992
11993 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11994 make an error
11995 #endif
11996   ;
11997   return 0;
11998 }
11999 _ACEOF
12000 rm -f "conftest.$ac_objext"
12001 if { (eval echo "$as_me:12001: \"$ac_compile\"") >&5
12002   (eval $ac_compile) 2>&5
12003   ac_status=$?
12004   echo "$as_me:12004: \$? = $ac_status" >&5
12005   (exit "$ac_status"); } &&
12006          { ac_try='test -s "conftest.$ac_objext"'
12007   { (eval echo "$as_me:12007: \"$ac_try\"") >&5
12008   (eval $ac_try) 2>&5
12009   ac_status=$?
12010   echo "$as_me:12010: \$? = $ac_status" >&5
12011   (exit "$ac_status"); }; }; then
12012   cf_XOPEN_SOURCE_set_ok=yes
12013 else
12014   echo "$as_me: failed program was:" >&5
12015 cat "conftest.$ac_ext" >&5
12016 cf_XOPEN_SOURCE_set_ok=no
12017 fi
12018 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12019                 if test "$cf_XOPEN_SOURCE_set_ok" = no
12020                 then
12021                         { echo "$as_me:12021: WARNING: _XOPEN_SOURCE is lower than requested" >&5
12022 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
12023                 fi
12024         else
12025
12026 echo "$as_me:12026: checking if we should define _XOPEN_SOURCE" >&5
12027 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
12028 if test "${cf_cv_xopen_source+set}" = set; then
12029   echo $ECHO_N "(cached) $ECHO_C" >&6
12030 else
12031
12032         cat >"conftest.$ac_ext" <<_ACEOF
12033 #line 12033 "configure"
12034 #include "confdefs.h"
12035
12036 #include <stdlib.h>
12037 #include <string.h>
12038 #include <sys/types.h>
12039
12040 int
12041 main (void)
12042 {
12043
12044 #ifndef _XOPEN_SOURCE
12045 make an error
12046 #endif
12047
12048   ;
12049   return 0;
12050 }
12051 _ACEOF
12052 rm -f "conftest.$ac_objext"
12053 if { (eval echo "$as_me:12053: \"$ac_compile\"") >&5
12054   (eval $ac_compile) 2>&5
12055   ac_status=$?
12056   echo "$as_me:12056: \$? = $ac_status" >&5
12057   (exit "$ac_status"); } &&
12058          { ac_try='test -s "conftest.$ac_objext"'
12059   { (eval echo "$as_me:12059: \"$ac_try\"") >&5
12060   (eval $ac_try) 2>&5
12061   ac_status=$?
12062   echo "$as_me:12062: \$? = $ac_status" >&5
12063   (exit "$ac_status"); }; }; then
12064   cf_cv_xopen_source=no
12065 else
12066   echo "$as_me: failed program was:" >&5
12067 cat "conftest.$ac_ext" >&5
12068 cf_save="$CPPFLAGS"
12069
12070         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12071         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12072
12073          cat >"conftest.$ac_ext" <<_ACEOF
12074 #line 12074 "configure"
12075 #include "confdefs.h"
12076
12077 #include <stdlib.h>
12078 #include <string.h>
12079 #include <sys/types.h>
12080
12081 int
12082 main (void)
12083 {
12084
12085 #ifndef _XOPEN_SOURCE
12086 make an error
12087 #endif
12088
12089   ;
12090   return 0;
12091 }
12092 _ACEOF
12093 rm -f "conftest.$ac_objext"
12094 if { (eval echo "$as_me:12094: \"$ac_compile\"") >&5
12095   (eval $ac_compile) 2>&5
12096   ac_status=$?
12097   echo "$as_me:12097: \$? = $ac_status" >&5
12098   (exit "$ac_status"); } &&
12099          { ac_try='test -s "conftest.$ac_objext"'
12100   { (eval echo "$as_me:12100: \"$ac_try\"") >&5
12101   (eval $ac_try) 2>&5
12102   ac_status=$?
12103   echo "$as_me:12103: \$? = $ac_status" >&5
12104   (exit "$ac_status"); }; }; then
12105   cf_cv_xopen_source=no
12106 else
12107   echo "$as_me: failed program was:" >&5
12108 cat "conftest.$ac_ext" >&5
12109 cf_cv_xopen_source=$cf_XOPEN_SOURCE
12110 fi
12111 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12112                 CPPFLAGS="$cf_save"
12113
12114 fi
12115 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12116
12117 fi
12118 echo "$as_me:12118: result: $cf_cv_xopen_source" >&5
12119 echo "${ECHO_T}$cf_cv_xopen_source" >&6
12120
12121 if test "$cf_cv_xopen_source" != no ; then
12122
12123 CFLAGS=`echo "$CFLAGS" | \
12124         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
12125                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
12126
12127 CPPFLAGS=`echo "$CPPFLAGS" | \
12128         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
12129                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
12130
12131         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
12132
12133 for cf_add_cflags in $cf_temp_xopen_source
12134 do
12135         case "x$cf_add_cflags" in
12136         (x-[DU]*)
12137
12138 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12139 while true
12140 do
12141         cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[         ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
12142         test "$CFLAGS" != "$cf_old_cflag" || break
12143
12144         CFLAGS="$cf_old_cflag"
12145 done
12146
12147 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12148 while true
12149 do
12150         cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[       ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
12151         test "$CPPFLAGS" != "$cf_old_cflag" || break
12152
12153         CPPFLAGS="$cf_old_cflag"
12154 done
12155
12156                 ;;
12157         esac
12158
12159 cf_fix_cppflags=no
12160 cf_new_cflags=
12161 cf_new_cppflags=
12162 cf_new_extra_cppflags=
12163
12164 for cf_add_cflags in $cf_add_cflags
12165 do
12166 case "$cf_fix_cppflags" in
12167 (no)
12168         case "$cf_add_cflags" in
12169         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12170                 case "$cf_add_cflags" in
12171                 (-D*)
12172                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12173
12174                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12175                                 && test -z "${cf_tst_cflags}" \
12176                                 && cf_fix_cppflags=yes
12177
12178                         if test "$cf_fix_cppflags" = yes ; then
12179
12180         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12181         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12182
12183                                 continue
12184                         elif test "${cf_tst_cflags}" = "\"'" ; then
12185
12186         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12187         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12188
12189                                 continue
12190                         fi
12191                         ;;
12192                 esac
12193                 case "$CPPFLAGS" in
12194                 (*$cf_add_cflags)
12195                         ;;
12196                 (*)
12197                         case "$cf_add_cflags" in
12198                         (-D*)
12199                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12200
12201 CPPFLAGS=`echo "$CPPFLAGS" | \
12202         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12203                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12204
12205                                 ;;
12206                         esac
12207
12208         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12209         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12210
12211                         ;;
12212                 esac
12213                 ;;
12214         (*)
12215
12216         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12217         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12218
12219                 ;;
12220         esac
12221         ;;
12222 (yes)
12223
12224         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12225         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12226
12227         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12228
12229         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12230                 && test -z "${cf_tst_cflags}" \
12231                 && cf_fix_cppflags=no
12232         ;;
12233 esac
12234 done
12235
12236 if test -n "$cf_new_cflags" ; then
12237
12238         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12239         CFLAGS="${CFLAGS}$cf_new_cflags"
12240
12241 fi
12242
12243 if test -n "$cf_new_cppflags" ; then
12244
12245         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12246         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12247
12248 fi
12249
12250 if test -n "$cf_new_extra_cppflags" ; then
12251
12252         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12253         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12254
12255 fi
12256
12257 done
12258
12259 fi
12260
12261         fi
12262 fi
12263 fi # cf_cv_posix_visible
12264
12265 CPPFLAGS_after_XOPEN="$CPPFLAGS"
12266
12267 # Work around breakage on OS X
12268
12269 echo "$as_me:12269: checking if SIGWINCH is defined" >&5
12270 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
12271 if test "${cf_cv_define_sigwinch+set}" = set; then
12272   echo $ECHO_N "(cached) $ECHO_C" >&6
12273 else
12274
12275         cat >"conftest.$ac_ext" <<_ACEOF
12276 #line 12276 "configure"
12277 #include "confdefs.h"
12278
12279 #include <sys/types.h>
12280 #include <sys/signal.h>
12281
12282 int
12283 main (void)
12284 {
12285 int x = SIGWINCH; (void)x
12286   ;
12287   return 0;
12288 }
12289 _ACEOF
12290 rm -f "conftest.$ac_objext"
12291 if { (eval echo "$as_me:12291: \"$ac_compile\"") >&5
12292   (eval $ac_compile) 2>&5
12293   ac_status=$?
12294   echo "$as_me:12294: \$? = $ac_status" >&5
12295   (exit "$ac_status"); } &&
12296          { ac_try='test -s "conftest.$ac_objext"'
12297   { (eval echo "$as_me:12297: \"$ac_try\"") >&5
12298   (eval $ac_try) 2>&5
12299   ac_status=$?
12300   echo "$as_me:12300: \$? = $ac_status" >&5
12301   (exit "$ac_status"); }; }; then
12302   cf_cv_define_sigwinch=yes
12303 else
12304   echo "$as_me: failed program was:" >&5
12305 cat "conftest.$ac_ext" >&5
12306 cat >"conftest.$ac_ext" <<_ACEOF
12307 #line 12307 "configure"
12308 #include "confdefs.h"
12309
12310 #undef _XOPEN_SOURCE
12311 #undef _POSIX_SOURCE
12312 #undef _POSIX_C_SOURCE
12313 #include <sys/types.h>
12314 #include <sys/signal.h>
12315
12316 int
12317 main (void)
12318 {
12319 int x = SIGWINCH; (void)x
12320   ;
12321   return 0;
12322 }
12323 _ACEOF
12324 rm -f "conftest.$ac_objext"
12325 if { (eval echo "$as_me:12325: \"$ac_compile\"") >&5
12326   (eval $ac_compile) 2>&5
12327   ac_status=$?
12328   echo "$as_me:12328: \$? = $ac_status" >&5
12329   (exit "$ac_status"); } &&
12330          { ac_try='test -s "conftest.$ac_objext"'
12331   { (eval echo "$as_me:12331: \"$ac_try\"") >&5
12332   (eval $ac_try) 2>&5
12333   ac_status=$?
12334   echo "$as_me:12334: \$? = $ac_status" >&5
12335   (exit "$ac_status"); }; }; then
12336   cf_cv_define_sigwinch=maybe
12337 else
12338   echo "$as_me: failed program was:" >&5
12339 cat "conftest.$ac_ext" >&5
12340 cf_cv_define_sigwinch=no
12341 fi
12342 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12343
12344 fi
12345 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12346
12347 fi
12348 echo "$as_me:12348: result: $cf_cv_define_sigwinch" >&5
12349 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
12350
12351 if test "$cf_cv_define_sigwinch" = maybe ; then
12352 echo "$as_me:12352: checking for actual SIGWINCH definition" >&5
12353 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
12354 if test "${cf_cv_fixup_sigwinch+set}" = set; then
12355   echo $ECHO_N "(cached) $ECHO_C" >&6
12356 else
12357
12358 cf_cv_fixup_sigwinch=unknown
12359 cf_sigwinch=32
12360 while test "$cf_sigwinch" != 1
12361 do
12362         cat >"conftest.$ac_ext" <<_ACEOF
12363 #line 12363 "configure"
12364 #include "confdefs.h"
12365
12366 #undef _XOPEN_SOURCE
12367 #undef _POSIX_SOURCE
12368 #undef _POSIX_C_SOURCE
12369 #include <sys/types.h>
12370 #include <sys/signal.h>
12371
12372 int
12373 main (void)
12374 {
12375
12376 #if SIGWINCH != $cf_sigwinch
12377 make an error
12378 #endif
12379 int x = SIGWINCH; (void)x
12380   ;
12381   return 0;
12382 }
12383 _ACEOF
12384 rm -f "conftest.$ac_objext"
12385 if { (eval echo "$as_me:12385: \"$ac_compile\"") >&5
12386   (eval $ac_compile) 2>&5
12387   ac_status=$?
12388   echo "$as_me:12388: \$? = $ac_status" >&5
12389   (exit "$ac_status"); } &&
12390          { ac_try='test -s "conftest.$ac_objext"'
12391   { (eval echo "$as_me:12391: \"$ac_try\"") >&5
12392   (eval $ac_try) 2>&5
12393   ac_status=$?
12394   echo "$as_me:12394: \$? = $ac_status" >&5
12395   (exit "$ac_status"); }; }; then
12396   cf_cv_fixup_sigwinch=$cf_sigwinch
12397          break
12398 else
12399   echo "$as_me: failed program was:" >&5
12400 cat "conftest.$ac_ext" >&5
12401 fi
12402 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12403
12404 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
12405 done
12406
12407 fi
12408 echo "$as_me:12408: result: $cf_cv_fixup_sigwinch" >&5
12409 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
12410
12411         if test "$cf_cv_fixup_sigwinch" != unknown ; then
12412                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
12413         fi
12414 fi
12415
12416 # Checks for CODESET support.
12417
12418 echo "$as_me:12418: checking for nl_langinfo and CODESET" >&5
12419 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
12420 if test "${am_cv_langinfo_codeset+set}" = set; then
12421   echo $ECHO_N "(cached) $ECHO_C" >&6
12422 else
12423   cat >"conftest.$ac_ext" <<_ACEOF
12424 #line 12424 "configure"
12425 #include "confdefs.h"
12426
12427 $ac_includes_default
12428 #include <langinfo.h>
12429 int
12430 main (void)
12431 {
12432 char* cs = nl_langinfo(CODESET); (void)cs
12433   ;
12434   return 0;
12435 }
12436 _ACEOF
12437 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12438 if { (eval echo "$as_me:12438: \"$ac_link\"") >&5
12439   (eval $ac_link) 2>&5
12440   ac_status=$?
12441   echo "$as_me:12441: \$? = $ac_status" >&5
12442   (exit "$ac_status"); } &&
12443          { ac_try='test -s "conftest$ac_exeext"'
12444   { (eval echo "$as_me:12444: \"$ac_try\"") >&5
12445   (eval $ac_try) 2>&5
12446   ac_status=$?
12447   echo "$as_me:12447: \$? = $ac_status" >&5
12448   (exit "$ac_status"); }; }; then
12449   am_cv_langinfo_codeset=yes
12450 else
12451   echo "$as_me: failed program was:" >&5
12452 cat "conftest.$ac_ext" >&5
12453 am_cv_langinfo_codeset=no
12454 fi
12455 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12456
12457 fi
12458 echo "$as_me:12458: result: $am_cv_langinfo_codeset" >&5
12459 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
12460         if test "$am_cv_langinfo_codeset" = yes; then
12461
12462 cat >>confdefs.h <<\EOF
12463 #define HAVE_LANGINFO_CODESET 1
12464 EOF
12465
12466         fi
12467
12468 # use these variables to work around a defect in gcc's fixincludes.
12469 NCURSES_OK_WCHAR_T=
12470 NCURSES_OK_WINT_T=
12471
12472 echo "$as_me:12472: checking if you want wide-character code" >&5
12473 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
12474
12475 # Check whether --enable-widec or --disable-widec was given.
12476 if test "${enable_widec+set}" = set; then
12477   enableval="$enable_widec"
12478   with_widec=$enableval
12479 else
12480   with_widec=no
12481 fi;
12482 echo "$as_me:12482: result: $with_widec" >&5
12483 echo "${ECHO_T}$with_widec" >&6
12484
12485 NCURSES_WCWIDTH_GRAPHICS=1
12486
12487 if test "x$with_widec" = xyes ; then
12488         if test "x$disable_lib_suffixes" = xno ; then
12489                 LIB_SUFFIX="w${LIB_SUFFIX}"
12490         fi
12491
12492 cat >>confdefs.h <<\EOF
12493 #define USE_WIDEC_SUPPORT 1
12494 EOF
12495
12496 cat >>confdefs.h <<\EOF
12497 #define NCURSES_WIDECHAR 1
12498 EOF
12499
12500         case "$CPPFLAGS" in
12501         (*_XOPEN_SOURCE=*)
12502                 ;;
12503         (*)
12504                 { echo "$as_me:12504: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&5
12505 echo "$as_me: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&2;}
12506                 # CPPFLAGS="$CPPFLAGS -DNCURSES_WIDECHAR"
12507                 CPPFLAGS_after_XOPEN="$CPPFLAGS_after_XOPEN -DNCURSES_WIDECHAR"
12508                 ;;
12509         esac
12510
12511 for ac_header in \
12512 wchar.h \
12513 wctype.h \
12514
12515 do
12516 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12517 echo "$as_me:12517: checking for $ac_header" >&5
12518 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12519 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12520   echo $ECHO_N "(cached) $ECHO_C" >&6
12521 else
12522   cat >"conftest.$ac_ext" <<_ACEOF
12523 #line 12523 "configure"
12524 #include "confdefs.h"
12525 #include <$ac_header>
12526 _ACEOF
12527 if { (eval echo "$as_me:12527: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12528   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12529   ac_status=$?
12530   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12531   rm -f conftest.er1
12532   cat conftest.err >&5
12533   echo "$as_me:12533: \$? = $ac_status" >&5
12534   (exit "$ac_status"); } >/dev/null; then
12535   if test -s conftest.err; then
12536     ac_cpp_err=$ac_c_preproc_warn_flag
12537   else
12538     ac_cpp_err=
12539   fi
12540 else
12541   ac_cpp_err=yes
12542 fi
12543 if test -z "$ac_cpp_err"; then
12544   eval "$as_ac_Header=yes"
12545 else
12546   echo "$as_me: failed program was:" >&5
12547   cat "conftest.$ac_ext" >&5
12548   eval "$as_ac_Header=no"
12549 fi
12550 rm -f conftest.err "conftest.$ac_ext"
12551 fi
12552 echo "$as_me:12552: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12553 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12554 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12555   cat >>confdefs.h <<EOF
12556 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12557 EOF
12558
12559 fi
12560 done
12561
12562 echo "$as_me:12562: checking if wchar.h can be used as is" >&5
12563 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
12564 if test "${cf_cv_wchar_h_okay+set}" = set; then
12565   echo $ECHO_N "(cached) $ECHO_C" >&6
12566 else
12567
12568 cat >"conftest.$ac_ext" <<_ACEOF
12569 #line 12569 "configure"
12570 #include "confdefs.h"
12571
12572 #include <stdlib.h>
12573 #ifdef HAVE_WCHAR_H
12574 #include <wchar.h>
12575 #endif
12576 #ifdef HAVE_WCTYPE_H
12577 #include <wctype.h>
12578 #endif
12579
12580 int
12581 main (void)
12582 {
12583
12584         wint_t foo = 0;
12585         int bar = iswpunct(foo)
12586   ;
12587   return 0;
12588 }
12589 _ACEOF
12590 rm -f "conftest.$ac_objext"
12591 if { (eval echo "$as_me:12591: \"$ac_compile\"") >&5
12592   (eval $ac_compile) 2>&5
12593   ac_status=$?
12594   echo "$as_me:12594: \$? = $ac_status" >&5
12595   (exit "$ac_status"); } &&
12596          { ac_try='test -s "conftest.$ac_objext"'
12597   { (eval echo "$as_me:12597: \"$ac_try\"") >&5
12598   (eval $ac_try) 2>&5
12599   ac_status=$?
12600   echo "$as_me:12600: \$? = $ac_status" >&5
12601   (exit "$ac_status"); }; }; then
12602   cf_cv_wchar_h_okay=yes
12603 else
12604   echo "$as_me: failed program was:" >&5
12605 cat "conftest.$ac_ext" >&5
12606 cf_cv_wchar_h_okay=no
12607 fi
12608 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12609 fi
12610 echo "$as_me:12610: result: $cf_cv_wchar_h_okay" >&5
12611 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
12612
12613 if test "$cf_cv_wchar_h_okay" = no
12614 then
12615
12616 echo "$as_me:12616: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
12617 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
12618 cat >"conftest.$ac_ext" <<_ACEOF
12619 #line 12619 "configure"
12620 #include "confdefs.h"
12621 #include <sys/types.h>
12622
12623 int
12624 main (void)
12625 {
12626
12627 #ifndef _XOPEN_SOURCE_EXTENDED
12628 make an error
12629 #endif
12630   ;
12631   return 0;
12632 }
12633 _ACEOF
12634 rm -f "conftest.$ac_objext"
12635 if { (eval echo "$as_me:12635: \"$ac_compile\"") >&5
12636   (eval $ac_compile) 2>&5
12637   ac_status=$?
12638   echo "$as_me:12638: \$? = $ac_status" >&5
12639   (exit "$ac_status"); } &&
12640          { ac_try='test -s "conftest.$ac_objext"'
12641   { (eval echo "$as_me:12641: \"$ac_try\"") >&5
12642   (eval $ac_try) 2>&5
12643   ac_status=$?
12644   echo "$as_me:12644: \$? = $ac_status" >&5
12645   (exit "$ac_status"); }; }; then
12646   cf_result=no
12647 else
12648   echo "$as_me: failed program was:" >&5
12649 cat "conftest.$ac_ext" >&5
12650 cf_result=yes
12651 fi
12652 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12653 echo "$as_me:12653: result: $cf_result" >&5
12654 echo "${ECHO_T}$cf_result" >&6
12655
12656 if test "$cf_result" = yes ; then
12657         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
12658 elif test "x" != "x" ; then
12659         echo "$as_me:12659: checking checking for compatible value versus " >&5
12660 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
12661         cat >"conftest.$ac_ext" <<_ACEOF
12662 #line 12662 "configure"
12663 #include "confdefs.h"
12664 #include <sys/types.h>
12665
12666 int
12667 main (void)
12668 {
12669
12670 #if _XOPEN_SOURCE_EXTENDED- < 0
12671 make an error
12672 #endif
12673   ;
12674   return 0;
12675 }
12676 _ACEOF
12677 rm -f "conftest.$ac_objext"
12678 if { (eval echo "$as_me:12678: \"$ac_compile\"") >&5
12679   (eval $ac_compile) 2>&5
12680   ac_status=$?
12681   echo "$as_me:12681: \$? = $ac_status" >&5
12682   (exit "$ac_status"); } &&
12683          { ac_try='test -s "conftest.$ac_objext"'
12684   { (eval echo "$as_me:12684: \"$ac_try\"") >&5
12685   (eval $ac_try) 2>&5
12686   ac_status=$?
12687   echo "$as_me:12687: \$? = $ac_status" >&5
12688   (exit "$ac_status"); }; }; then
12689   cf_result=yes
12690 else
12691   echo "$as_me: failed program was:" >&5
12692 cat "conftest.$ac_ext" >&5
12693 cf_result=no
12694 fi
12695 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12696         echo "$as_me:12696: result: $cf_result" >&5
12697 echo "${ECHO_T}$cf_result" >&6
12698         if test "$cf_result" = no ; then
12699                 # perhaps we can override it - try...
12700                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
12701         fi
12702 fi
12703
12704 fi
12705
12706 echo "$as_me:12706: checking if wcwidth agrees graphics are single-width" >&5
12707 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
12708 if test "${cf_cv_wcwidth_graphics+set}" = set; then
12709   echo $ECHO_N "(cached) $ECHO_C" >&6
12710 else
12711
12712 cat >conftest.in <<CF_EOF
12713 -       VT100 symbols
12714 0x250c  upper left corner
12715 0x2514  lower left corner
12716 0x2510  upper right corner
12717 0x2518  lower right corner
12718 0x251c  tee pointing left
12719 0x2524  tee pointing right
12720 0x2534  tee pointing up
12721 0x252c  tee pointing down
12722 0x2500  horizontal line
12723 0x2502  vertical line
12724 0x253c  large plus or crossover
12725 0x23ba  scan line 1
12726 0x23bd  scan line 9
12727 0x25c6  diamond
12728 0x2592  checker board (stipple)
12729 0x00b0  degree symbol
12730 0x00b1  plus/minus
12731 0x00b7  bullet
12732 -       Teletype 5410v1 symbols
12733 0x2190  arrow pointing left
12734 0x2192  arrow pointing right
12735 0x2193  arrow pointing down
12736 0x2191  arrow pointing up
12737 0x2592  board of squares
12738 0x2603  lantern symbol
12739 0x25ae  solid square block
12740 -       these defaults were invented for ncurses
12741 0x23bb  scan line 3
12742 0x23bc  scan line 7
12743 0x2264  less-than-or-equal-to
12744 0x2265  greater-than-or-equal-to
12745 0x03c0  greek pi
12746 0x2260  not-equal
12747 0x00a3  pound-sterling symbol
12748 -       thick-line-drawing
12749 0x250f  upper left corner
12750 0x2517  lower left corner
12751 0x2513  upper right corner
12752 0x251b  lower right corner
12753 0x2523  tee pointing left
12754 0x252b  tee pointing right
12755 0x253b  tee pointing up
12756 0x2533  tee pointing down
12757 0x2501  horizontal line
12758 0x2503  vertical line
12759 0x254b  large plus or crossover
12760 -       double-line-drawing
12761 0x2554  upper left corner
12762 0x255a  lower left corner
12763 0x2557  upper right corner
12764 0x255d  lower right corner
12765 0x2563  tee pointing left
12766 0x2560  tee pointing right
12767 0x2569  tee pointing up
12768 0x2566  tee pointing down
12769 0x2550  horizontal line
12770 0x2551  vertical line
12771 0x256c  large plus or crossover
12772 CF_EOF
12773 if test "$cross_compiling" = yes; then
12774   cf_cv_wcwidth_graphics=unknown
12775 else
12776   cat >"conftest.$ac_ext" <<_ACEOF
12777 #line 12777 "configure"
12778 #include "confdefs.h"
12779
12780 $ac_includes_default
12781
12782 #include <locale.h>
12783 #include <wchar.h>
12784
12785 #define MY_LEN 80
12786
12787 int
12788 main(void)
12789 {
12790         FILE *fp;
12791         int value;
12792         char buffer[MY_LEN + 1];
12793         char notes[MY_LEN + 1];
12794         int totals = 0;
12795         int passed = 0;
12796
12797         if (setlocale(LC_ALL, "en_US.UTF8") ||
12798                 setlocale(LC_ALL, "en_US.UTF-8") ||
12799                 setlocale(LC_ALL, "en_US.utf8") ||
12800                 setlocale(LC_ALL, "en_US.utf-8")) {
12801                 if ((fp = fopen("conftest.in", "r")) != 0) {
12802                         while (fgets(buffer, MY_LEN, fp) != 0) {
12803                                 if (*buffer == '-') {
12804                                         fprintf(stderr, "\\t%s", buffer);
12805                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
12806                                         ++totals;
12807                                         if (wcwidth(value) == 1)
12808                                                 ++passed;
12809                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
12810                                 } else {
12811                                         fprintf(stderr, "?\\t%s", buffer);
12812                                 }
12813                         }
12814                 }
12815         }
12816         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
12817         return (totals == passed) ? 0 : 1;
12818 }
12819
12820 _ACEOF
12821 rm -f "conftest$ac_exeext"
12822 if { (eval echo "$as_me:12822: \"$ac_link\"") >&5
12823   (eval $ac_link) 2>&5
12824   ac_status=$?
12825   echo "$as_me:12825: \$? = $ac_status" >&5
12826   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12827   { (eval echo "$as_me:12827: \"$ac_try\"") >&5
12828   (eval $ac_try) 2>&5
12829   ac_status=$?
12830   echo "$as_me:12830: \$? = $ac_status" >&5
12831   (exit "$ac_status"); }; }; then
12832   cf_cv_wcwidth_graphics=yes
12833 else
12834   echo "$as_me: program exited with status $ac_status" >&5
12835 echo "$as_me: failed program was:" >&5
12836 cat "conftest.$ac_ext" >&5
12837 cf_cv_wcwidth_graphics=no
12838 fi
12839 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12840 fi
12841
12842 fi
12843 echo "$as_me:12843: result: $cf_cv_wcwidth_graphics" >&5
12844 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
12845
12846         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
12847
12848         # with_overwrite=no
12849         NCURSES_CH_T=cchar_t
12850
12851 for ac_func in putwc btowc wctob wmemchr mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
12852 do
12853 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12854 echo "$as_me:12854: checking for $ac_func" >&5
12855 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12856 if eval "test \"\${$as_ac_var+set}\" = set"; then
12857   echo $ECHO_N "(cached) $ECHO_C" >&6
12858 else
12859   cat >"conftest.$ac_ext" <<_ACEOF
12860 #line 12860 "configure"
12861 #include "confdefs.h"
12862 #define $ac_func autoconf_temporary
12863 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
12864 #undef $ac_func
12865
12866 #ifdef __cplusplus
12867 extern "C"
12868 #endif
12869
12870 /* We use char because int might match the return type of a gcc2
12871    builtin and then its argument prototype would still apply.  */
12872 char $ac_func (void);
12873
12874 int
12875 main (void)
12876 {
12877
12878 /* The GNU C library defines stubs for functions which it implements
12879     to always fail with ENOSYS.  Some functions are actually named
12880     something starting with __ and the normal name is an alias.  */
12881 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12882 #error found stub for $ac_func
12883 #endif
12884
12885         return $ac_func ();
12886   ;
12887   return 0;
12888 }
12889 _ACEOF
12890 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12891 if { (eval echo "$as_me:12891: \"$ac_link\"") >&5
12892   (eval $ac_link) 2>&5
12893   ac_status=$?
12894   echo "$as_me:12894: \$? = $ac_status" >&5
12895   (exit "$ac_status"); } &&
12896          { ac_try='test -s "conftest$ac_exeext"'
12897   { (eval echo "$as_me:12897: \"$ac_try\"") >&5
12898   (eval $ac_try) 2>&5
12899   ac_status=$?
12900   echo "$as_me:12900: \$? = $ac_status" >&5
12901   (exit "$ac_status"); }; }; then
12902   eval "$as_ac_var=yes"
12903 else
12904   echo "$as_me: failed program was:" >&5
12905 cat "conftest.$ac_ext" >&5
12906 eval "$as_ac_var=no"
12907 fi
12908 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12909 fi
12910 echo "$as_me:12910: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12911 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12912 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12913   cat >>confdefs.h <<EOF
12914 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12915 EOF
12916
12917 fi
12918 done
12919
12920         if test "x$ac_cv_func_putwc" != xyes ; then
12921
12922 for ac_header in wchar.h
12923 do
12924 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12925 echo "$as_me:12925: checking for $ac_header" >&5
12926 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12927 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12928   echo $ECHO_N "(cached) $ECHO_C" >&6
12929 else
12930   cat >"conftest.$ac_ext" <<_ACEOF
12931 #line 12931 "configure"
12932 #include "confdefs.h"
12933 #include <$ac_header>
12934 _ACEOF
12935 if { (eval echo "$as_me:12935: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12936   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12937   ac_status=$?
12938   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12939   rm -f conftest.er1
12940   cat conftest.err >&5
12941   echo "$as_me:12941: \$? = $ac_status" >&5
12942   (exit "$ac_status"); } >/dev/null; then
12943   if test -s conftest.err; then
12944     ac_cpp_err=$ac_c_preproc_warn_flag
12945   else
12946     ac_cpp_err=
12947   fi
12948 else
12949   ac_cpp_err=yes
12950 fi
12951 if test -z "$ac_cpp_err"; then
12952   eval "$as_ac_Header=yes"
12953 else
12954   echo "$as_me: failed program was:" >&5
12955   cat "conftest.$ac_ext" >&5
12956   eval "$as_ac_Header=no"
12957 fi
12958 rm -f conftest.err "conftest.$ac_ext"
12959 fi
12960 echo "$as_me:12960: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12961 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12962 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12963   cat >>confdefs.h <<EOF
12964 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12965 EOF
12966
12967 fi
12968 done
12969
12970 echo "$as_me:12970: checking for multibyte character support" >&5
12971 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12972 if test "${cf_cv_utf8_lib+set}" = set; then
12973   echo $ECHO_N "(cached) $ECHO_C" >&6
12974 else
12975
12976         cf_save_LIBS="$LIBS"
12977         cat >"conftest.$ac_ext" <<_ACEOF
12978 #line 12978 "configure"
12979 #include "confdefs.h"
12980
12981 $ac_includes_default
12982 #ifdef HAVE_WCHAR_H
12983 #include <wchar.h>
12984 #endif
12985
12986 int
12987 main (void)
12988 {
12989 putwc(0,0);
12990   ;
12991   return 0;
12992 }
12993 _ACEOF
12994 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12995 if { (eval echo "$as_me:12995: \"$ac_link\"") >&5
12996   (eval $ac_link) 2>&5
12997   ac_status=$?
12998   echo "$as_me:12998: \$? = $ac_status" >&5
12999   (exit "$ac_status"); } &&
13000          { ac_try='test -s "conftest$ac_exeext"'
13001   { (eval echo "$as_me:13001: \"$ac_try\"") >&5
13002   (eval $ac_try) 2>&5
13003   ac_status=$?
13004   echo "$as_me:13004: \$? = $ac_status" >&5
13005   (exit "$ac_status"); }; }; then
13006   cf_cv_utf8_lib=yes
13007 else
13008   echo "$as_me: failed program was:" >&5
13009 cat "conftest.$ac_ext" >&5
13010
13011 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
13012 # will be set on completion of the AC_TRY_LINK below.
13013 cf_cv_header_path_utf8=
13014 cf_cv_library_path_utf8=
13015
13016 echo "${as_me:-configure}:13016: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
13017
13018 cf_save_LIBS="$LIBS"
13019
13020 cat >"conftest.$ac_ext" <<_ACEOF
13021 #line 13021 "configure"
13022 #include "confdefs.h"
13023
13024 #include <libutf8.h>
13025 int
13026 main (void)
13027 {
13028 putwc(0,0);
13029   ;
13030   return 0;
13031 }
13032 _ACEOF
13033 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13034 if { (eval echo "$as_me:13034: \"$ac_link\"") >&5
13035   (eval $ac_link) 2>&5
13036   ac_status=$?
13037   echo "$as_me:13037: \$? = $ac_status" >&5
13038   (exit "$ac_status"); } &&
13039          { ac_try='test -s "conftest$ac_exeext"'
13040   { (eval echo "$as_me:13040: \"$ac_try\"") >&5
13041   (eval $ac_try) 2>&5
13042   ac_status=$?
13043   echo "$as_me:13043: \$? = $ac_status" >&5
13044   (exit "$ac_status"); }; }; then
13045
13046         cf_cv_find_linkage_utf8=yes
13047         cf_cv_header_path_utf8=/usr/include
13048         cf_cv_library_path_utf8=/usr/lib
13049
13050 else
13051   echo "$as_me: failed program was:" >&5
13052 cat "conftest.$ac_ext" >&5
13053
13054 LIBS="-lutf8  $cf_save_LIBS"
13055
13056 cat >"conftest.$ac_ext" <<_ACEOF
13057 #line 13057 "configure"
13058 #include "confdefs.h"
13059
13060 #include <libutf8.h>
13061 int
13062 main (void)
13063 {
13064 putwc(0,0);
13065   ;
13066   return 0;
13067 }
13068 _ACEOF
13069 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13070 if { (eval echo "$as_me:13070: \"$ac_link\"") >&5
13071   (eval $ac_link) 2>&5
13072   ac_status=$?
13073   echo "$as_me:13073: \$? = $ac_status" >&5
13074   (exit "$ac_status"); } &&
13075          { ac_try='test -s "conftest$ac_exeext"'
13076   { (eval echo "$as_me:13076: \"$ac_try\"") >&5
13077   (eval $ac_try) 2>&5
13078   ac_status=$?
13079   echo "$as_me:13079: \$? = $ac_status" >&5
13080   (exit "$ac_status"); }; }; then
13081
13082         cf_cv_find_linkage_utf8=yes
13083         cf_cv_header_path_utf8=/usr/include
13084         cf_cv_library_path_utf8=/usr/lib
13085         cf_cv_library_file_utf8="-lutf8"
13086
13087 else
13088   echo "$as_me: failed program was:" >&5
13089 cat "conftest.$ac_ext" >&5
13090
13091         cf_cv_find_linkage_utf8=no
13092         LIBS="$cf_save_LIBS"
13093
13094         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
13095
13096 echo "${as_me:-configure}:13096: testing find linkage for utf8 library ..." 1>&5
13097
13098 echo "${as_me:-configure}:13098: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
13099
13100         cf_save_CPPFLAGS="$CPPFLAGS"
13101         cf_test_CPPFLAGS="$CPPFLAGS"
13102
13103 cf_search=
13104
13105 # collect the current set of include-directories from compiler flags
13106 cf_header_path_list=""
13107 if test -n "${CFLAGS}${CPPFLAGS}" ; then
13108         for cf_header_path in $CPPFLAGS $CFLAGS
13109         do
13110                 case "$cf_header_path" in
13111                 (-I*)
13112                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
13113
13114 test "x$cf_header_path" != "xNONE" && \
13115 test -d "$cf_header_path" && \
13116  {
13117         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
13118         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
13119         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
13120         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
13121         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
13122         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
13123 }
13124
13125                         cf_header_path_list="$cf_header_path_list $cf_search"
13126                         ;;
13127                 esac
13128         done
13129 fi
13130
13131 # add the variations for the package we are looking for
13132
13133 cf_search=
13134
13135 test "x$prefix" != "xNONE" && \
13136 test -d "$prefix" && \
13137  {
13138         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
13139         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
13140         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
13141         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
13142         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
13143         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
13144 }
13145
13146 for cf_subdir_prefix in \
13147         /usr \
13148         /usr/local \
13149         /usr/pkg \
13150         /opt \
13151         /opt/local \
13152         $HOME
13153 do
13154
13155 test "x$cf_subdir_prefix" != "x$prefix" && \
13156 test -d "$cf_subdir_prefix" && \
13157 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13158         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
13159         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
13160         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
13161         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
13162         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
13163         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
13164 }
13165
13166 done
13167
13168 test "$includedir" != NONE && \
13169 test "$includedir" != "/usr/include" && \
13170 test -d "$includedir" && {
13171         test -d "$includedir" &&    cf_search="$cf_search $includedir"
13172         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
13173 }
13174
13175 test "$oldincludedir" != NONE && \
13176 test "$oldincludedir" != "/usr/include" && \
13177 test -d "$oldincludedir" && {
13178         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
13179         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
13180 }
13181
13182 cf_search="$cf_search $cf_header_path_list"
13183
13184         for cf_cv_header_path_utf8 in $cf_search
13185         do
13186                 if test -d "$cf_cv_header_path_utf8" ; then
13187                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
13188
13189 echo "${as_me:-configure}:13189: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
13190
13191                         CPPFLAGS="$cf_save_CPPFLAGS"
13192
13193         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13194         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
13195
13196                         cat >"conftest.$ac_ext" <<_ACEOF
13197 #line 13197 "configure"
13198 #include "confdefs.h"
13199
13200 #include <libutf8.h>
13201 int
13202 main (void)
13203 {
13204 putwc(0,0);
13205   ;
13206   return 0;
13207 }
13208 _ACEOF
13209 rm -f "conftest.$ac_objext"
13210 if { (eval echo "$as_me:13210: \"$ac_compile\"") >&5
13211   (eval $ac_compile) 2>&5
13212   ac_status=$?
13213   echo "$as_me:13213: \$? = $ac_status" >&5
13214   (exit "$ac_status"); } &&
13215          { ac_try='test -s "conftest.$ac_objext"'
13216   { (eval echo "$as_me:13216: \"$ac_try\"") >&5
13217   (eval $ac_try) 2>&5
13218   ac_status=$?
13219   echo "$as_me:13219: \$? = $ac_status" >&5
13220   (exit "$ac_status"); }; }; then
13221
13222                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
13223
13224 echo "${as_me:-configure}:13224: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
13225
13226                                 cf_cv_find_linkage_utf8=maybe
13227                                 cf_test_CPPFLAGS="$CPPFLAGS"
13228                                 break
13229 else
13230   echo "$as_me: failed program was:" >&5
13231 cat "conftest.$ac_ext" >&5
13232
13233                                 CPPFLAGS="$cf_save_CPPFLAGS"
13234
13235 fi
13236 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13237                 fi
13238         done
13239
13240         if test "$cf_cv_find_linkage_utf8" = maybe ; then
13241
13242 echo "${as_me:-configure}:13242: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
13243
13244                 cf_save_LIBS="$LIBS"
13245                 cf_save_LDFLAGS="$LDFLAGS"
13246
13247                 if test "$cf_cv_find_linkage_utf8" != yes ; then
13248
13249 cf_search=
13250 cf_library_path_list=""
13251 if test -n "${LDFLAGS}${LIBS}" ; then
13252         for cf_library_path in $LDFLAGS $LIBS
13253         do
13254                 case "$cf_library_path" in
13255                 (-L*)
13256                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
13257
13258 test "x$cf_library_path" != "xNONE" && \
13259 test -d "$cf_library_path" && \
13260  {
13261         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
13262         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
13263         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
13264         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
13265         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
13266         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
13267 }
13268
13269                         cf_library_path_list="$cf_library_path_list $cf_search"
13270                         ;;
13271                 esac
13272         done
13273 fi
13274
13275 cf_search=
13276
13277 test "x$prefix" != "xNONE" && \
13278 test -d "$prefix" && \
13279  {
13280         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
13281         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
13282         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
13283         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
13284         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
13285         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
13286 }
13287
13288 for cf_subdir_prefix in \
13289         /usr \
13290         /usr/local \
13291         /usr/pkg \
13292         /opt \
13293         /opt/local \
13294         $HOME
13295 do
13296
13297 test "x$cf_subdir_prefix" != "x$prefix" && \
13298 test -d "$cf_subdir_prefix" && \
13299 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13300         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
13301         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
13302         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
13303         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
13304         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
13305         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
13306 }
13307
13308 done
13309
13310 cf_search="$cf_library_path_list $cf_search"
13311
13312                         for cf_cv_library_path_utf8 in $cf_search
13313                         do
13314                                 if test -d "$cf_cv_library_path_utf8" ; then
13315                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
13316
13317 echo "${as_me:-configure}:13317: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
13318
13319                                         CPPFLAGS="$cf_test_CPPFLAGS"
13320                                         LIBS="-lutf8  $cf_save_LIBS"
13321                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
13322                                         cat >"conftest.$ac_ext" <<_ACEOF
13323 #line 13323 "configure"
13324 #include "confdefs.h"
13325
13326 #include <libutf8.h>
13327 int
13328 main (void)
13329 {
13330 putwc(0,0);
13331   ;
13332   return 0;
13333 }
13334 _ACEOF
13335 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13336 if { (eval echo "$as_me:13336: \"$ac_link\"") >&5
13337   (eval $ac_link) 2>&5
13338   ac_status=$?
13339   echo "$as_me:13339: \$? = $ac_status" >&5
13340   (exit "$ac_status"); } &&
13341          { ac_try='test -s "conftest$ac_exeext"'
13342   { (eval echo "$as_me:13342: \"$ac_try\"") >&5
13343   (eval $ac_try) 2>&5
13344   ac_status=$?
13345   echo "$as_me:13345: \$? = $ac_status" >&5
13346   (exit "$ac_status"); }; }; then
13347
13348                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
13349
13350 echo "${as_me:-configure}:13350: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
13351
13352                                         cf_cv_find_linkage_utf8=yes
13353                                         cf_cv_library_file_utf8="-lutf8"
13354                                         break
13355 else
13356   echo "$as_me: failed program was:" >&5
13357 cat "conftest.$ac_ext" >&5
13358
13359                                         CPPFLAGS="$cf_save_CPPFLAGS"
13360                                         LIBS="$cf_save_LIBS"
13361                                         LDFLAGS="$cf_save_LDFLAGS"
13362
13363 fi
13364 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13365                                 fi
13366                         done
13367                         CPPFLAGS="$cf_save_CPPFLAGS"
13368                         LDFLAGS="$cf_save_LDFLAGS"
13369                 fi
13370
13371         else
13372                 cf_cv_find_linkage_utf8=no
13373         fi
13374
13375 fi
13376 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13377
13378 fi
13379 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13380
13381 LIBS="$cf_save_LIBS"
13382
13383 if test "$cf_cv_find_linkage_utf8" = yes ; then
13384 cf_cv_utf8_lib=add-on
13385 else
13386 cf_cv_utf8_lib=no
13387 fi
13388
13389 fi
13390 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13391 fi
13392 echo "$as_me:13392: result: $cf_cv_utf8_lib" >&5
13393 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
13394
13395 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
13396 # ncurses/ncursesw:
13397 if test "$cf_cv_utf8_lib" = "add-on" ; then
13398
13399 cat >>confdefs.h <<\EOF
13400 #define HAVE_LIBUTF8_H 1
13401 EOF
13402
13403 if test -n "$cf_cv_header_path_utf8" ; then
13404   for cf_add_incdir in $cf_cv_header_path_utf8
13405   do
13406         while test "$cf_add_incdir" != /usr/include
13407         do
13408           if test -d "$cf_add_incdir"
13409           then
13410                 cf_have_incdir=no
13411                 if test -n "$CFLAGS$CPPFLAGS" ; then
13412                   # a loop is needed to ensure we can add subdirs of existing dirs
13413                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13414                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13415                           cf_have_incdir=yes; break
13416                         fi
13417                   done
13418                 fi
13419
13420                 if test "$cf_have_incdir" = no ; then
13421                   if test "$cf_add_incdir" = /usr/local/include ; then
13422                         if test "$GCC" = yes
13423                         then
13424                           cf_save_CPPFLAGS=$CPPFLAGS
13425
13426         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13427         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
13428
13429                           cat >"conftest.$ac_ext" <<_ACEOF
13430 #line 13430 "configure"
13431 #include "confdefs.h"
13432 #include <stdio.h>
13433 int
13434 main (void)
13435 {
13436 printf("Hello")
13437   ;
13438   return 0;
13439 }
13440 _ACEOF
13441 rm -f "conftest.$ac_objext"
13442 if { (eval echo "$as_me:13442: \"$ac_compile\"") >&5
13443   (eval $ac_compile) 2>&5
13444   ac_status=$?
13445   echo "$as_me:13445: \$? = $ac_status" >&5
13446   (exit "$ac_status"); } &&
13447          { ac_try='test -s "conftest.$ac_objext"'
13448   { (eval echo "$as_me:13448: \"$ac_try\"") >&5
13449   (eval $ac_try) 2>&5
13450   ac_status=$?
13451   echo "$as_me:13451: \$? = $ac_status" >&5
13452   (exit "$ac_status"); }; }; then
13453   :
13454 else
13455   echo "$as_me: failed program was:" >&5
13456 cat "conftest.$ac_ext" >&5
13457 cf_have_incdir=yes
13458 fi
13459 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13460                           CPPFLAGS=$cf_save_CPPFLAGS
13461                         fi
13462                   fi
13463                 fi
13464
13465                 if test "$cf_have_incdir" = no ; then
13466                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
13467
13468 echo "${as_me:-configure}:13468: testing adding $cf_add_incdir to include-path ..." 1>&5
13469
13470                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13471
13472                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
13473                   test "$cf_top_incdir" = "$cf_add_incdir" && break
13474                   cf_add_incdir="$cf_top_incdir"
13475                 else
13476                   break
13477                 fi
13478           else
13479                 break
13480           fi
13481         done
13482   done
13483 fi
13484
13485 if test -n "$cf_cv_library_path_utf8" ; then
13486         for cf_add_libdir in $cf_cv_library_path_utf8
13487         do
13488                 if test "$cf_add_libdir" = /usr/lib ; then
13489                         :
13490                 elif test -d "$cf_add_libdir"
13491                 then
13492                         cf_have_libdir=no
13493                         if test -n "$LDFLAGS$LIBS" ; then
13494                                 # a loop is needed to ensure we can add subdirs of existing dirs
13495                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
13496                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13497                                                 cf_have_libdir=yes; break
13498                                         fi
13499                                 done
13500                         fi
13501                         if test "$cf_have_libdir" = no ; then
13502                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
13503
13504 echo "${as_me:-configure}:13504: testing adding $cf_add_libdir to library-path ..." 1>&5
13505
13506                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13507                         fi
13508                 fi
13509         done
13510 fi
13511
13512 cf_add_libs="$LIBS"
13513 # reverse order
13514 cf_add_0lib=
13515 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13516 # filter duplicates
13517 for cf_add_1lib in $cf_add_0lib; do
13518         for cf_add_2lib in $cf_add_libs; do
13519                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13520                         cf_add_1lib=
13521                         break
13522                 fi
13523         done
13524         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13525 done
13526 LIBS="$cf_add_libs"
13527
13528 fi
13529
13530                 if test "$cf_cv_utf8_lib" != no ; then
13531                         NCURSES_LIBUTF8=1
13532                 fi
13533         fi
13534
13535 # This is needed on Tru64 5.0 to declare mbstate_t
13536 echo "$as_me:13536: checking if we must include wchar.h to declare mbstate_t" >&5
13537 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
13538 if test "${cf_cv_mbstate_t+set}" = set; then
13539   echo $ECHO_N "(cached) $ECHO_C" >&6
13540 else
13541
13542 cat >"conftest.$ac_ext" <<_ACEOF
13543 #line 13543 "configure"
13544 #include "confdefs.h"
13545
13546 #include <stdlib.h>
13547 #include <stdarg.h>
13548 #include <stdio.h>
13549 #ifdef HAVE_LIBUTF8_H
13550 #include <libutf8.h>
13551 #endif
13552 int
13553 main (void)
13554 {
13555 mbstate_t state
13556   ;
13557   return 0;
13558 }
13559 _ACEOF
13560 rm -f "conftest.$ac_objext"
13561 if { (eval echo "$as_me:13561: \"$ac_compile\"") >&5
13562   (eval $ac_compile) 2>&5
13563   ac_status=$?
13564   echo "$as_me:13564: \$? = $ac_status" >&5
13565   (exit "$ac_status"); } &&
13566          { ac_try='test -s "conftest.$ac_objext"'
13567   { (eval echo "$as_me:13567: \"$ac_try\"") >&5
13568   (eval $ac_try) 2>&5
13569   ac_status=$?
13570   echo "$as_me:13570: \$? = $ac_status" >&5
13571   (exit "$ac_status"); }; }; then
13572   cf_cv_mbstate_t=no
13573 else
13574   echo "$as_me: failed program was:" >&5
13575 cat "conftest.$ac_ext" >&5
13576 cat >"conftest.$ac_ext" <<_ACEOF
13577 #line 13577 "configure"
13578 #include "confdefs.h"
13579
13580 #include <stdlib.h>
13581 #include <stdarg.h>
13582 #include <stdio.h>
13583 #include <wchar.h>
13584 #ifdef HAVE_LIBUTF8_H
13585 #include <libutf8.h>
13586 #endif
13587 int
13588 main (void)
13589 {
13590 mbstate_t value
13591   ;
13592   return 0;
13593 }
13594 _ACEOF
13595 rm -f "conftest.$ac_objext"
13596 if { (eval echo "$as_me:13596: \"$ac_compile\"") >&5
13597   (eval $ac_compile) 2>&5
13598   ac_status=$?
13599   echo "$as_me:13599: \$? = $ac_status" >&5
13600   (exit "$ac_status"); } &&
13601          { ac_try='test -s "conftest.$ac_objext"'
13602   { (eval echo "$as_me:13602: \"$ac_try\"") >&5
13603   (eval $ac_try) 2>&5
13604   ac_status=$?
13605   echo "$as_me:13605: \$? = $ac_status" >&5
13606   (exit "$ac_status"); }; }; then
13607   cf_cv_mbstate_t=yes
13608 else
13609   echo "$as_me: failed program was:" >&5
13610 cat "conftest.$ac_ext" >&5
13611 cf_cv_mbstate_t=unknown
13612 fi
13613 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13614 fi
13615 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13616 fi
13617 echo "$as_me:13617: result: $cf_cv_mbstate_t" >&5
13618 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
13619
13620 if test "$cf_cv_mbstate_t" = yes ; then
13621
13622 cat >>confdefs.h <<\EOF
13623 #define NEED_WCHAR_H 1
13624 EOF
13625
13626         NEED_WCHAR_H=1
13627 fi
13628
13629 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
13630 if test "$cf_cv_mbstate_t" = unknown ; then
13631         NCURSES_MBSTATE_T=1
13632 fi
13633
13634 # This is needed on Tru64 5.0 to declare wchar_t
13635 echo "$as_me:13635: checking if we must include wchar.h to declare wchar_t" >&5
13636 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
13637 if test "${cf_cv_wchar_t+set}" = set; then
13638   echo $ECHO_N "(cached) $ECHO_C" >&6
13639 else
13640
13641 cat >"conftest.$ac_ext" <<_ACEOF
13642 #line 13642 "configure"
13643 #include "confdefs.h"
13644
13645 #include <stdlib.h>
13646 #include <stdarg.h>
13647 #include <stdio.h>
13648 #ifdef HAVE_LIBUTF8_H
13649 #include <libutf8.h>
13650 #endif
13651 int
13652 main (void)
13653 {
13654 wchar_t state
13655   ;
13656   return 0;
13657 }
13658 _ACEOF
13659 rm -f "conftest.$ac_objext"
13660 if { (eval echo "$as_me:13660: \"$ac_compile\"") >&5
13661   (eval $ac_compile) 2>&5
13662   ac_status=$?
13663   echo "$as_me:13663: \$? = $ac_status" >&5
13664   (exit "$ac_status"); } &&
13665          { ac_try='test -s "conftest.$ac_objext"'
13666   { (eval echo "$as_me:13666: \"$ac_try\"") >&5
13667   (eval $ac_try) 2>&5
13668   ac_status=$?
13669   echo "$as_me:13669: \$? = $ac_status" >&5
13670   (exit "$ac_status"); }; }; then
13671   cf_cv_wchar_t=no
13672 else
13673   echo "$as_me: failed program was:" >&5
13674 cat "conftest.$ac_ext" >&5
13675 cat >"conftest.$ac_ext" <<_ACEOF
13676 #line 13676 "configure"
13677 #include "confdefs.h"
13678
13679 #include <stdlib.h>
13680 #include <stdarg.h>
13681 #include <stdio.h>
13682 #include <wchar.h>
13683 #ifdef HAVE_LIBUTF8_H
13684 #include <libutf8.h>
13685 #endif
13686 int
13687 main (void)
13688 {
13689 wchar_t value
13690   ;
13691   return 0;
13692 }
13693 _ACEOF
13694 rm -f "conftest.$ac_objext"
13695 if { (eval echo "$as_me:13695: \"$ac_compile\"") >&5
13696   (eval $ac_compile) 2>&5
13697   ac_status=$?
13698   echo "$as_me:13698: \$? = $ac_status" >&5
13699   (exit "$ac_status"); } &&
13700          { ac_try='test -s "conftest.$ac_objext"'
13701   { (eval echo "$as_me:13701: \"$ac_try\"") >&5
13702   (eval $ac_try) 2>&5
13703   ac_status=$?
13704   echo "$as_me:13704: \$? = $ac_status" >&5
13705   (exit "$ac_status"); }; }; then
13706   cf_cv_wchar_t=yes
13707 else
13708   echo "$as_me: failed program was:" >&5
13709 cat "conftest.$ac_ext" >&5
13710 cf_cv_wchar_t=unknown
13711 fi
13712 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13713 fi
13714 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13715 fi
13716 echo "$as_me:13716: result: $cf_cv_wchar_t" >&5
13717 echo "${ECHO_T}$cf_cv_wchar_t" >&6
13718
13719 if test "$cf_cv_wchar_t" = yes ; then
13720
13721 cat >>confdefs.h <<\EOF
13722 #define NEED_WCHAR_H 1
13723 EOF
13724
13725         NEED_WCHAR_H=1
13726 fi
13727
13728 # if we do not find wchar_t in either place, use substitution to provide a fallback.
13729 if test "$cf_cv_wchar_t" = unknown ; then
13730         NCURSES_WCHAR_T=1
13731 fi
13732
13733 # if we find wchar_t in either place, use substitution to provide a fallback.
13734 if test "$cf_cv_wchar_t" != unknown ; then
13735         NCURSES_OK_WCHAR_T=1
13736 fi
13737
13738 # This is needed on Tru64 5.0 to declare wint_t
13739 echo "$as_me:13739: checking if we must include wchar.h to declare wint_t" >&5
13740 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
13741 if test "${cf_cv_wint_t+set}" = set; then
13742   echo $ECHO_N "(cached) $ECHO_C" >&6
13743 else
13744
13745 cat >"conftest.$ac_ext" <<_ACEOF
13746 #line 13746 "configure"
13747 #include "confdefs.h"
13748
13749 #include <stdlib.h>
13750 #include <stdarg.h>
13751 #include <stdio.h>
13752 #ifdef HAVE_LIBUTF8_H
13753 #include <libutf8.h>
13754 #endif
13755 int
13756 main (void)
13757 {
13758 wint_t state
13759   ;
13760   return 0;
13761 }
13762 _ACEOF
13763 rm -f "conftest.$ac_objext"
13764 if { (eval echo "$as_me:13764: \"$ac_compile\"") >&5
13765   (eval $ac_compile) 2>&5
13766   ac_status=$?
13767   echo "$as_me:13767: \$? = $ac_status" >&5
13768   (exit "$ac_status"); } &&
13769          { ac_try='test -s "conftest.$ac_objext"'
13770   { (eval echo "$as_me:13770: \"$ac_try\"") >&5
13771   (eval $ac_try) 2>&5
13772   ac_status=$?
13773   echo "$as_me:13773: \$? = $ac_status" >&5
13774   (exit "$ac_status"); }; }; then
13775   cf_cv_wint_t=no
13776 else
13777   echo "$as_me: failed program was:" >&5
13778 cat "conftest.$ac_ext" >&5
13779 cat >"conftest.$ac_ext" <<_ACEOF
13780 #line 13780 "configure"
13781 #include "confdefs.h"
13782
13783 #include <stdlib.h>
13784 #include <stdarg.h>
13785 #include <stdio.h>
13786 #include <wchar.h>
13787 #ifdef HAVE_LIBUTF8_H
13788 #include <libutf8.h>
13789 #endif
13790 int
13791 main (void)
13792 {
13793 wint_t value
13794   ;
13795   return 0;
13796 }
13797 _ACEOF
13798 rm -f "conftest.$ac_objext"
13799 if { (eval echo "$as_me:13799: \"$ac_compile\"") >&5
13800   (eval $ac_compile) 2>&5
13801   ac_status=$?
13802   echo "$as_me:13802: \$? = $ac_status" >&5
13803   (exit "$ac_status"); } &&
13804          { ac_try='test -s "conftest.$ac_objext"'
13805   { (eval echo "$as_me:13805: \"$ac_try\"") >&5
13806   (eval $ac_try) 2>&5
13807   ac_status=$?
13808   echo "$as_me:13808: \$? = $ac_status" >&5
13809   (exit "$ac_status"); }; }; then
13810   cf_cv_wint_t=yes
13811 else
13812   echo "$as_me: failed program was:" >&5
13813 cat "conftest.$ac_ext" >&5
13814 cf_cv_wint_t=unknown
13815 fi
13816 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13817 fi
13818 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13819 fi
13820 echo "$as_me:13820: result: $cf_cv_wint_t" >&5
13821 echo "${ECHO_T}$cf_cv_wint_t" >&6
13822
13823 if test "$cf_cv_wint_t" = yes ; then
13824
13825 cat >>confdefs.h <<\EOF
13826 #define NEED_WCHAR_H 1
13827 EOF
13828
13829         NEED_WCHAR_H=1
13830 fi
13831
13832 # if we do not find wint_t in either place, use substitution to provide a fallback.
13833 if test "$cf_cv_wint_t" = unknown ; then
13834         NCURSES_WINT_T=1
13835 fi
13836
13837 # if we find wint_t in either place, use substitution to provide a fallback.
13838 if test "$cf_cv_wint_t" != unknown ; then
13839         NCURSES_OK_WINT_T=1
13840 fi
13841
13842         if test "$NCURSES_MBSTATE_T" != 0; then
13843
13844 cat >>confdefs.h <<\EOF
13845 #define NEED_MBSTATE_T_DEF 1
13846 EOF
13847
13848         fi
13849 fi
13850
13851 ###   use option --disable-lp64 to allow long chtype
13852 echo "$as_me:13852: checking whether to enable _LP64 definition in curses.h" >&5
13853 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
13854
13855 # Check whether --enable-lp64 or --disable-lp64 was given.
13856 if test "${enable_lp64+set}" = set; then
13857   enableval="$enable_lp64"
13858   with_lp64=$enableval
13859 else
13860   with_lp64=$cf_dft_with_lp64
13861 fi;
13862 echo "$as_me:13862: result: $with_lp64" >&5
13863 echo "${ECHO_T}$with_lp64" >&6
13864
13865 if test "x$with_lp64" = xyes ; then
13866         cf_cv_enable_lp64=1
13867 else
13868         cf_cv_enable_lp64=0
13869 fi
13870
13871 # Check whether --enable-largefile or --disable-largefile was given.
13872 if test "${enable_largefile+set}" = set; then
13873   enableval="$enable_largefile"
13874
13875 fi;
13876 if test "$enable_largefile" != no; then
13877
13878   echo "$as_me:13878: checking for special C compiler options needed for large files" >&5
13879 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13880 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13881   echo $ECHO_N "(cached) $ECHO_C" >&6
13882 else
13883   ac_cv_sys_largefile_CC=no
13884      if test "$GCC" != yes; then
13885        ac_save_CC=$CC
13886        while :; do
13887          # IRIX 6.2 and later do not support large files by default,
13888          # so use the C compiler's -n32 option if that helps.
13889          cat >"conftest.$ac_ext" <<_ACEOF
13890 #line 13890 "configure"
13891 #include "confdefs.h"
13892 #include <sys/types.h>
13893  /* Check that off_t can represent 2**63 - 1 correctly.
13894     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13895     since some C++ compilers masquerading as C compilers
13896     incorrectly reject 9223372036854775807.  */
13897 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13898   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13899                        && LARGE_OFF_T % 2147483647 == 1)
13900                       ? 1 : -1];
13901 int
13902 main (void)
13903 {
13904
13905   ;
13906   return 0;
13907 }
13908 _ACEOF
13909          rm -f "conftest.$ac_objext"
13910 if { (eval echo "$as_me:13910: \"$ac_compile\"") >&5
13911   (eval $ac_compile) 2>&5
13912   ac_status=$?
13913   echo "$as_me:13913: \$? = $ac_status" >&5
13914   (exit "$ac_status"); } &&
13915          { ac_try='test -s "conftest.$ac_objext"'
13916   { (eval echo "$as_me:13916: \"$ac_try\"") >&5
13917   (eval $ac_try) 2>&5
13918   ac_status=$?
13919   echo "$as_me:13919: \$? = $ac_status" >&5
13920   (exit "$ac_status"); }; }; then
13921   break
13922 else
13923   echo "$as_me: failed program was:" >&5
13924 cat "conftest.$ac_ext" >&5
13925 fi
13926 rm -f "conftest.$ac_objext"
13927          CC="$CC -n32"
13928          rm -f "conftest.$ac_objext"
13929 if { (eval echo "$as_me:13929: \"$ac_compile\"") >&5
13930   (eval $ac_compile) 2>&5
13931   ac_status=$?
13932   echo "$as_me:13932: \$? = $ac_status" >&5
13933   (exit "$ac_status"); } &&
13934          { ac_try='test -s "conftest.$ac_objext"'
13935   { (eval echo "$as_me:13935: \"$ac_try\"") >&5
13936   (eval $ac_try) 2>&5
13937   ac_status=$?
13938   echo "$as_me:13938: \$? = $ac_status" >&5
13939   (exit "$ac_status"); }; }; then
13940   ac_cv_sys_largefile_CC=' -n32'; break
13941 else
13942   echo "$as_me: failed program was:" >&5
13943 cat "conftest.$ac_ext" >&5
13944 fi
13945 rm -f "conftest.$ac_objext"
13946          break
13947        done
13948        CC=$ac_save_CC
13949        rm -f "conftest.$ac_ext"
13950     fi
13951 fi
13952 echo "$as_me:13952: result: $ac_cv_sys_largefile_CC" >&5
13953 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13954   if test "$ac_cv_sys_largefile_CC" != no; then
13955     CC=$CC$ac_cv_sys_largefile_CC
13956   fi
13957
13958   echo "$as_me:13958: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13959 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13960 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13961   echo $ECHO_N "(cached) $ECHO_C" >&6
13962 else
13963   while :; do
13964   ac_cv_sys_file_offset_bits=no
13965   cat >"conftest.$ac_ext" <<_ACEOF
13966 #line 13966 "configure"
13967 #include "confdefs.h"
13968 #include <sys/types.h>
13969  /* Check that off_t can represent 2**63 - 1 correctly.
13970     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13971     since some C++ compilers masquerading as C compilers
13972     incorrectly reject 9223372036854775807.  */
13973 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13974   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13975                        && LARGE_OFF_T % 2147483647 == 1)
13976                       ? 1 : -1];
13977 int
13978 main (void)
13979 {
13980
13981   ;
13982   return 0;
13983 }
13984 _ACEOF
13985 rm -f "conftest.$ac_objext"
13986 if { (eval echo "$as_me:13986: \"$ac_compile\"") >&5
13987   (eval $ac_compile) 2>&5
13988   ac_status=$?
13989   echo "$as_me:13989: \$? = $ac_status" >&5
13990   (exit "$ac_status"); } &&
13991          { ac_try='test -s "conftest.$ac_objext"'
13992   { (eval echo "$as_me:13992: \"$ac_try\"") >&5
13993   (eval $ac_try) 2>&5
13994   ac_status=$?
13995   echo "$as_me:13995: \$? = $ac_status" >&5
13996   (exit "$ac_status"); }; }; then
13997   break
13998 else
13999   echo "$as_me: failed program was:" >&5
14000 cat "conftest.$ac_ext" >&5
14001 fi
14002 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14003   cat >"conftest.$ac_ext" <<_ACEOF
14004 #line 14004 "configure"
14005 #include "confdefs.h"
14006 #define _FILE_OFFSET_BITS 64
14007 #include <sys/types.h>
14008  /* Check that off_t can represent 2**63 - 1 correctly.
14009     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14010     since some C++ compilers masquerading as C compilers
14011     incorrectly reject 9223372036854775807.  */
14012 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14013   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14014                        && LARGE_OFF_T % 2147483647 == 1)
14015                       ? 1 : -1];
14016 int
14017 main (void)
14018 {
14019
14020   ;
14021   return 0;
14022 }
14023 _ACEOF
14024 rm -f "conftest.$ac_objext"
14025 if { (eval echo "$as_me:14025: \"$ac_compile\"") >&5
14026   (eval $ac_compile) 2>&5
14027   ac_status=$?
14028   echo "$as_me:14028: \$? = $ac_status" >&5
14029   (exit "$ac_status"); } &&
14030          { ac_try='test -s "conftest.$ac_objext"'
14031   { (eval echo "$as_me:14031: \"$ac_try\"") >&5
14032   (eval $ac_try) 2>&5
14033   ac_status=$?
14034   echo "$as_me:14034: \$? = $ac_status" >&5
14035   (exit "$ac_status"); }; }; then
14036   ac_cv_sys_file_offset_bits=64; break
14037 else
14038   echo "$as_me: failed program was:" >&5
14039 cat "conftest.$ac_ext" >&5
14040 fi
14041 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14042   break
14043 done
14044 fi
14045 echo "$as_me:14045: result: $ac_cv_sys_file_offset_bits" >&5
14046 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
14047 if test "$ac_cv_sys_file_offset_bits" != no; then
14048
14049 cat >>confdefs.h <<EOF
14050 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14051 EOF
14052
14053 fi
14054 rm -rf conftest*
14055   echo "$as_me:14055: checking for _LARGE_FILES value needed for large files" >&5
14056 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
14057 if test "${ac_cv_sys_large_files+set}" = set; then
14058   echo $ECHO_N "(cached) $ECHO_C" >&6
14059 else
14060   while :; do
14061   ac_cv_sys_large_files=no
14062   cat >"conftest.$ac_ext" <<_ACEOF
14063 #line 14063 "configure"
14064 #include "confdefs.h"
14065 #include <sys/types.h>
14066  /* Check that off_t can represent 2**63 - 1 correctly.
14067     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14068     since some C++ compilers masquerading as C compilers
14069     incorrectly reject 9223372036854775807.  */
14070 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14071   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14072                        && LARGE_OFF_T % 2147483647 == 1)
14073                       ? 1 : -1];
14074 int
14075 main (void)
14076 {
14077
14078   ;
14079   return 0;
14080 }
14081 _ACEOF
14082 rm -f "conftest.$ac_objext"
14083 if { (eval echo "$as_me:14083: \"$ac_compile\"") >&5
14084   (eval $ac_compile) 2>&5
14085   ac_status=$?
14086   echo "$as_me:14086: \$? = $ac_status" >&5
14087   (exit "$ac_status"); } &&
14088          { ac_try='test -s "conftest.$ac_objext"'
14089   { (eval echo "$as_me:14089: \"$ac_try\"") >&5
14090   (eval $ac_try) 2>&5
14091   ac_status=$?
14092   echo "$as_me:14092: \$? = $ac_status" >&5
14093   (exit "$ac_status"); }; }; then
14094   break
14095 else
14096   echo "$as_me: failed program was:" >&5
14097 cat "conftest.$ac_ext" >&5
14098 fi
14099 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14100   cat >"conftest.$ac_ext" <<_ACEOF
14101 #line 14101 "configure"
14102 #include "confdefs.h"
14103 #define _LARGE_FILES 1
14104 #include <sys/types.h>
14105  /* Check that off_t can represent 2**63 - 1 correctly.
14106     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14107     since some C++ compilers masquerading as C compilers
14108     incorrectly reject 9223372036854775807.  */
14109 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14110   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14111                        && LARGE_OFF_T % 2147483647 == 1)
14112                       ? 1 : -1];
14113 int
14114 main (void)
14115 {
14116
14117   ;
14118   return 0;
14119 }
14120 _ACEOF
14121 rm -f "conftest.$ac_objext"
14122 if { (eval echo "$as_me:14122: \"$ac_compile\"") >&5
14123   (eval $ac_compile) 2>&5
14124   ac_status=$?
14125   echo "$as_me:14125: \$? = $ac_status" >&5
14126   (exit "$ac_status"); } &&
14127          { ac_try='test -s "conftest.$ac_objext"'
14128   { (eval echo "$as_me:14128: \"$ac_try\"") >&5
14129   (eval $ac_try) 2>&5
14130   ac_status=$?
14131   echo "$as_me:14131: \$? = $ac_status" >&5
14132   (exit "$ac_status"); }; }; then
14133   ac_cv_sys_large_files=1; break
14134 else
14135   echo "$as_me: failed program was:" >&5
14136 cat "conftest.$ac_ext" >&5
14137 fi
14138 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14139   break
14140 done
14141 fi
14142 echo "$as_me:14142: result: $ac_cv_sys_large_files" >&5
14143 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14144 if test "$ac_cv_sys_large_files" != no; then
14145
14146 cat >>confdefs.h <<EOF
14147 #define _LARGE_FILES $ac_cv_sys_large_files
14148 EOF
14149
14150 fi
14151 rm -rf conftest*
14152 fi
14153
14154         if test "$enable_largefile" != no ; then
14155         echo "$as_me:14155: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14156 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14157 if test "${ac_cv_sys_largefile_source+set}" = set; then
14158   echo $ECHO_N "(cached) $ECHO_C" >&6
14159 else
14160   while :; do
14161   ac_cv_sys_largefile_source=no
14162   cat >"conftest.$ac_ext" <<_ACEOF
14163 #line 14163 "configure"
14164 #include "confdefs.h"
14165 #include <stdio.h>
14166 int
14167 main (void)
14168 {
14169 return !fseeko;
14170   ;
14171   return 0;
14172 }
14173 _ACEOF
14174 rm -f "conftest.$ac_objext"
14175 if { (eval echo "$as_me:14175: \"$ac_compile\"") >&5
14176   (eval $ac_compile) 2>&5
14177   ac_status=$?
14178   echo "$as_me:14178: \$? = $ac_status" >&5
14179   (exit "$ac_status"); } &&
14180          { ac_try='test -s "conftest.$ac_objext"'
14181   { (eval echo "$as_me:14181: \"$ac_try\"") >&5
14182   (eval $ac_try) 2>&5
14183   ac_status=$?
14184   echo "$as_me:14184: \$? = $ac_status" >&5
14185   (exit "$ac_status"); }; }; then
14186   break
14187 else
14188   echo "$as_me: failed program was:" >&5
14189 cat "conftest.$ac_ext" >&5
14190 fi
14191 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14192   cat >"conftest.$ac_ext" <<_ACEOF
14193 #line 14193 "configure"
14194 #include "confdefs.h"
14195 #define _LARGEFILE_SOURCE 1
14196 #include <stdio.h>
14197 int
14198 main (void)
14199 {
14200 return !fseeko;
14201   ;
14202   return 0;
14203 }
14204 _ACEOF
14205 rm -f "conftest.$ac_objext"
14206 if { (eval echo "$as_me:14206: \"$ac_compile\"") >&5
14207   (eval $ac_compile) 2>&5
14208   ac_status=$?
14209   echo "$as_me:14209: \$? = $ac_status" >&5
14210   (exit "$ac_status"); } &&
14211          { ac_try='test -s "conftest.$ac_objext"'
14212   { (eval echo "$as_me:14212: \"$ac_try\"") >&5
14213   (eval $ac_try) 2>&5
14214   ac_status=$?
14215   echo "$as_me:14215: \$? = $ac_status" >&5
14216   (exit "$ac_status"); }; }; then
14217   ac_cv_sys_largefile_source=1; break
14218 else
14219   echo "$as_me: failed program was:" >&5
14220 cat "conftest.$ac_ext" >&5
14221 fi
14222 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14223   break
14224 done
14225 fi
14226 echo "$as_me:14226: result: $ac_cv_sys_largefile_source" >&5
14227 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14228 if test "$ac_cv_sys_largefile_source" != no; then
14229
14230 cat >>confdefs.h <<EOF
14231 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14232 EOF
14233
14234 fi
14235 rm -rf conftest*
14236
14237 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14238 # in glibc 2.1.3, but that breaks too many other things.
14239 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14240 echo "$as_me:14240: checking for fseeko" >&5
14241 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14242 if test "${ac_cv_func_fseeko+set}" = set; then
14243   echo $ECHO_N "(cached) $ECHO_C" >&6
14244 else
14245   cat >"conftest.$ac_ext" <<_ACEOF
14246 #line 14246 "configure"
14247 #include "confdefs.h"
14248 #include <stdio.h>
14249 int
14250 main (void)
14251 {
14252 return fseeko && fseeko (stdin, 0, 0);
14253   ;
14254   return 0;
14255 }
14256 _ACEOF
14257 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14258 if { (eval echo "$as_me:14258: \"$ac_link\"") >&5
14259   (eval $ac_link) 2>&5
14260   ac_status=$?
14261   echo "$as_me:14261: \$? = $ac_status" >&5
14262   (exit "$ac_status"); } &&
14263          { ac_try='test -s "conftest$ac_exeext"'
14264   { (eval echo "$as_me:14264: \"$ac_try\"") >&5
14265   (eval $ac_try) 2>&5
14266   ac_status=$?
14267   echo "$as_me:14267: \$? = $ac_status" >&5
14268   (exit "$ac_status"); }; }; then
14269   ac_cv_func_fseeko=yes
14270 else
14271   echo "$as_me: failed program was:" >&5
14272 cat "conftest.$ac_ext" >&5
14273 ac_cv_func_fseeko=no
14274 fi
14275 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14276 fi
14277 echo "$as_me:14277: result: $ac_cv_func_fseeko" >&5
14278 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14279 if test $ac_cv_func_fseeko = yes; then
14280
14281 cat >>confdefs.h <<\EOF
14282 #define HAVE_FSEEKO 1
14283 EOF
14284
14285 fi
14286
14287         # Normally we would collect these definitions in the config.h,
14288         # but (like _XOPEN_SOURCE), some environments rely on having these
14289         # defined before any of the system headers are included.  Another
14290         # case comes up with C++, e.g., on AIX the compiler compiles the
14291         # header files by themselves before looking at the body files it is
14292         # told to compile.  For ncurses, those header files do not include
14293         # the config.h
14294         if test "$ac_cv_sys_large_files" != no
14295         then
14296
14297         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14298         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14299
14300         fi
14301         if test "$ac_cv_sys_largefile_source" != no
14302         then
14303
14304         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14305         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14306
14307         fi
14308         if test "$ac_cv_sys_file_offset_bits" != no
14309         then
14310
14311         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14312         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14313
14314         fi
14315
14316         echo "$as_me:14316: checking whether to use struct dirent64" >&5
14317 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14318 if test "${cf_cv_struct_dirent64+set}" = set; then
14319   echo $ECHO_N "(cached) $ECHO_C" >&6
14320 else
14321
14322                 cat >"conftest.$ac_ext" <<_ACEOF
14323 #line 14323 "configure"
14324 #include "confdefs.h"
14325
14326 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14327 #include <sys/types.h>
14328 #include <dirent.h>
14329
14330 int
14331 main (void)
14332 {
14333
14334                 /* if transitional largefile support is setup, this is true */
14335                 extern struct dirent64 * readdir(DIR *);
14336                 struct dirent64 *x = readdir((DIR *)0);
14337                 struct dirent *y = readdir((DIR *)0);
14338                 int z = x - y;
14339                 (void)z;
14340
14341   ;
14342   return 0;
14343 }
14344 _ACEOF
14345 rm -f "conftest.$ac_objext"
14346 if { (eval echo "$as_me:14346: \"$ac_compile\"") >&5
14347   (eval $ac_compile) 2>&5
14348   ac_status=$?
14349   echo "$as_me:14349: \$? = $ac_status" >&5
14350   (exit "$ac_status"); } &&
14351          { ac_try='test -s "conftest.$ac_objext"'
14352   { (eval echo "$as_me:14352: \"$ac_try\"") >&5
14353   (eval $ac_try) 2>&5
14354   ac_status=$?
14355   echo "$as_me:14355: \$? = $ac_status" >&5
14356   (exit "$ac_status"); }; }; then
14357   cf_cv_struct_dirent64=yes
14358 else
14359   echo "$as_me: failed program was:" >&5
14360 cat "conftest.$ac_ext" >&5
14361 cf_cv_struct_dirent64=no
14362 fi
14363 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14364
14365 fi
14366 echo "$as_me:14366: result: $cf_cv_struct_dirent64" >&5
14367 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14368         test "$cf_cv_struct_dirent64" = yes &&
14369 cat >>confdefs.h <<\EOF
14370 #define HAVE_STRUCT_DIRENT64 1
14371 EOF
14372
14373         fi
14374
14375 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
14376 echo "$as_me:14376: checking if you want tparm not to use X/Open fixed-parameter list" >&5
14377 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
14378
14379 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
14380 if test "${enable_tparm_varargs+set}" = set; then
14381   enableval="$enable_tparm_varargs"
14382   with_tparm_varargs=$enableval
14383 else
14384   with_tparm_varargs=yes
14385 fi;
14386 echo "$as_me:14386: result: $with_tparm_varargs" >&5
14387 echo "${ECHO_T}$with_tparm_varargs" >&6
14388 NCURSES_TPARM_VARARGS=0
14389 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
14390
14391 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
14392 if test "$with_ticlib" != no ; then
14393 echo "$as_me:14393: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
14394 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
14395
14396 # Check whether --enable-tic-depends or --disable-tic-depends was given.
14397 if test "${enable_tic_depends+set}" = set; then
14398   enableval="$enable_tic_depends"
14399   with_tic_depends=$enableval
14400 else
14401   with_tic_depends=yes
14402 fi;
14403 echo "$as_me:14403: result: $with_tic_depends" >&5
14404 echo "${ECHO_T}$with_tic_depends" >&6
14405 else
14406         with_tic_depends=no
14407 fi
14408
14409 ###   use option --enable-wattr-macros to enable wattr* macros in curses.h
14410 echo "$as_me:14410: checking if you want to enable wattr* macros" >&5
14411 echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6
14412
14413 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
14414 if test "${enable_wattr_macros+set}" = set; then
14415   enableval="$enable_wattr_macros"
14416   with_wattr_macros=$enableval
14417 else
14418   with_wattr_macros=no
14419 fi;
14420 if [ "x$with_wattr_macros" != xyes ]; then
14421         NCURSES_WATTR_MACROS=0
14422         echo "$as_me:14422: result: no" >&5
14423 echo "${ECHO_T}no" >&6
14424 else
14425         NCURSES_WATTR_MACROS=1
14426         echo "$as_me:14426: result: yes" >&5
14427 echo "${ECHO_T}yes" >&6
14428 fi
14429
14430 echo "$as_me:14430: checking for X11 rgb file" >&5
14431 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
14432
14433 # Check whether --with-x11-rgb or --without-x11-rgb was given.
14434 if test "${with_x11_rgb+set}" = set; then
14435   withval="$with_x11_rgb"
14436   RGB_PATH=$withval
14437 else
14438   RGB_PATH=auto
14439 fi;
14440
14441 if test "x$RGB_PATH" = xauto
14442 then
14443         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
14444         for cf_path in \
14445                 /opt/local/share/X11/rgb.txt \
14446                 /opt/X11/share/X11/rgb.txt \
14447                 /usr/share/X11/rgb.txt \
14448                 /usr/X11/share/X11/rgb.txt \
14449                 /usr/X11/lib/X11/rgb.txt \
14450                 /usr/lib/X11/rgb.txt \
14451                 /etc/X11/rgb.txt \
14452                 /usr/pkg/lib/X11/rgb.txt \
14453                 /usr/X11R7/lib/X11/rgb.txt \
14454                 /usr/X11R6/lib/X11/rgb.txt \
14455                 /usr/X11R5/lib/X11/rgb.txt \
14456                 /usr/X11R4/lib/X11/rgb.txt \
14457                 /usr/local/lib/X11/rgb.txt \
14458                 /usr/local/share/X11/rgb.txt \
14459                 /usr/lib64/X11/rgb.txt
14460         do
14461                 if test -f "$cf_path" ; then
14462                         RGB_PATH="$cf_path"
14463                         break
14464                 fi
14465         done
14466 else
14467         cf_path=$RGB_PATH
14468
14469 if test "x$prefix" != xNONE; then
14470         cf_path_syntax="$prefix"
14471 else
14472         cf_path_syntax="$ac_default_prefix"
14473 fi
14474
14475 case ".$cf_path" in
14476 (.\$\(*\)*|.\'*\'*)
14477         ;;
14478 (..|./*|.\\*)
14479         ;;
14480 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
14481         ;;
14482 (.\$\{*prefix\}*|.\$\{*dir\}*)
14483         eval cf_path="$cf_path"
14484         case ".$cf_path" in
14485         (.NONE/*)
14486                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14487                 ;;
14488         esac
14489         ;;
14490 (.no|.NONE/*)
14491         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14492         ;;
14493 (*)
14494         { { echo "$as_me:14494: error: expected a pathname, not \"$cf_path\"" >&5
14495 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
14496    { (exit 1); exit 1; }; }
14497         ;;
14498 esac
14499
14500 fi
14501
14502 echo "$as_me:14502: result: $RGB_PATH" >&5
14503 echo "${ECHO_T}$RGB_PATH" >&6
14504
14505 cat >>confdefs.h <<EOF
14506 #define RGB_PATH "$cf_path"
14507 EOF
14508
14509 no_x11_rgb=
14510 if test "$RGB_PATH" = no
14511 then
14512         no_x11_rgb="#"
14513 fi
14514
14515 ###   use option --with-bool to override bool's type
14516 echo "$as_me:14516: checking for type of bool" >&5
14517 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
14518
14519 # Check whether --with-bool or --without-bool was given.
14520 if test "${with_bool+set}" = set; then
14521   withval="$with_bool"
14522   NCURSES_BOOL="$withval"
14523 else
14524   NCURSES_BOOL=auto
14525 fi;
14526 echo "$as_me:14526: result: $NCURSES_BOOL" >&5
14527 echo "${ECHO_T}$NCURSES_BOOL" >&6
14528
14529 echo "$as_me:14529: checking for alternate terminal capabilities file" >&5
14530 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
14531
14532 # Check whether --with-caps or --without-caps was given.
14533 if test "${with_caps+set}" = set; then
14534   withval="$with_caps"
14535   TERMINFO_CAPS=Caps.$withval
14536 else
14537   TERMINFO_CAPS=Caps
14538 fi;
14539 if test ! -f "${srcdir}/include/${TERMINFO_CAPS}"
14540 then
14541         { echo "$as_me:14541: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&5
14542 echo "$as_me: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&2;}
14543         TERMINFO_CAPS=Caps
14544 fi
14545 echo "$as_me:14545: result: $TERMINFO_CAPS" >&5
14546 echo "${ECHO_T}$TERMINFO_CAPS" >&6
14547
14548 ###   use option --with-chtype to override chtype's type
14549 echo "$as_me:14549: checking for type of chtype" >&5
14550 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14551
14552 # Check whether --with-chtype or --without-chtype was given.
14553 if test "${with_chtype+set}" = set; then
14554   withval="$with_chtype"
14555   NCURSES_CHTYPE="$withval"
14556 else
14557   NCURSES_CHTYPE=$cf_dft_chtype
14558 fi;
14559 echo "$as_me:14559: result: $NCURSES_CHTYPE" >&5
14560 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
14561
14562 ###   use option --with-ospeed to override ospeed's type
14563 echo "$as_me:14563: checking for type of ospeed" >&5
14564 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
14565
14566 # Check whether --with-ospeed or --without-ospeed was given.
14567 if test "${with_ospeed+set}" = set; then
14568   withval="$with_ospeed"
14569   NCURSES_OSPEED="$withval"
14570 else
14571   NCURSES_OSPEED=short
14572 fi;
14573 echo "$as_me:14573: result: $NCURSES_OSPEED" >&5
14574 echo "${ECHO_T}$NCURSES_OSPEED" >&6
14575
14576 ###   use option --with-mmask-t to override mmask_t's type
14577 echo "$as_me:14577: checking for type of mmask_t" >&5
14578 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
14579
14580 # Check whether --with-mmask-t or --without-mmask-t was given.
14581 if test "${with_mmask_t+set}" = set; then
14582   withval="$with_mmask_t"
14583   NCURSES_MMASK_T="$withval"
14584 else
14585   NCURSES_MMASK_T=$cf_dft_mmask_t
14586 fi;
14587 echo "$as_me:14587: result: $NCURSES_MMASK_T" >&5
14588 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
14589
14590 ###   use option --with-ccharw-max to override CCHARW_MAX size
14591 echo "$as_me:14591: checking for size CCHARW_MAX" >&5
14592 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
14593
14594 # Check whether --with-ccharw-max or --without-ccharw-max was given.
14595 if test "${with_ccharw_max+set}" = set; then
14596   withval="$with_ccharw_max"
14597   NCURSES_CCHARW_MAX="$withval"
14598 else
14599   NCURSES_CCHARW_MAX=$cf_dft_ccharw_max
14600 fi;
14601 echo "$as_me:14601: result: $NCURSES_CCHARW_MAX" >&5
14602 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
14603
14604 echo "$as_me:14604: checking for signed char" >&5
14605 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14606 if test "${ac_cv_type_signed_char+set}" = set; then
14607   echo $ECHO_N "(cached) $ECHO_C" >&6
14608 else
14609   cat >"conftest.$ac_ext" <<_ACEOF
14610 #line 14610 "configure"
14611 #include "confdefs.h"
14612 $ac_includes_default
14613 int
14614 main (void)
14615 {
14616 if ((signed char *) 0)
14617   return 0;
14618 if (sizeof (signed char))
14619   return 0;
14620   ;
14621   return 0;
14622 }
14623 _ACEOF
14624 rm -f "conftest.$ac_objext"
14625 if { (eval echo "$as_me:14625: \"$ac_compile\"") >&5
14626   (eval $ac_compile) 2>&5
14627   ac_status=$?
14628   echo "$as_me:14628: \$? = $ac_status" >&5
14629   (exit "$ac_status"); } &&
14630          { ac_try='test -s "conftest.$ac_objext"'
14631   { (eval echo "$as_me:14631: \"$ac_try\"") >&5
14632   (eval $ac_try) 2>&5
14633   ac_status=$?
14634   echo "$as_me:14634: \$? = $ac_status" >&5
14635   (exit "$ac_status"); }; }; then
14636   ac_cv_type_signed_char=yes
14637 else
14638   echo "$as_me: failed program was:" >&5
14639 cat "conftest.$ac_ext" >&5
14640 ac_cv_type_signed_char=no
14641 fi
14642 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14643 fi
14644 echo "$as_me:14644: result: $ac_cv_type_signed_char" >&5
14645 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14646
14647 echo "$as_me:14647: checking size of signed char" >&5
14648 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14649 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14650   echo $ECHO_N "(cached) $ECHO_C" >&6
14651 else
14652   if test "$ac_cv_type_signed_char" = yes; then
14653   if test "$cross_compiling" = yes; then
14654   # Depending upon the size, compute the lo and hi bounds.
14655 cat >"conftest.$ac_ext" <<_ACEOF
14656 #line 14656 "configure"
14657 #include "confdefs.h"
14658 $ac_includes_default
14659 int
14660 main (void)
14661 {
14662 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14663   ;
14664   return 0;
14665 }
14666 _ACEOF
14667 rm -f "conftest.$ac_objext"
14668 if { (eval echo "$as_me:14668: \"$ac_compile\"") >&5
14669   (eval $ac_compile) 2>&5
14670   ac_status=$?
14671   echo "$as_me:14671: \$? = $ac_status" >&5
14672   (exit "$ac_status"); } &&
14673          { ac_try='test -s "conftest.$ac_objext"'
14674   { (eval echo "$as_me:14674: \"$ac_try\"") >&5
14675   (eval $ac_try) 2>&5
14676   ac_status=$?
14677   echo "$as_me:14677: \$? = $ac_status" >&5
14678   (exit "$ac_status"); }; }; then
14679   ac_lo=0 ac_mid=0
14680   while :; do
14681     cat >"conftest.$ac_ext" <<_ACEOF
14682 #line 14682 "configure"
14683 #include "confdefs.h"
14684 $ac_includes_default
14685 int
14686 main (void)
14687 {
14688 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14689   ;
14690   return 0;
14691 }
14692 _ACEOF
14693 rm -f "conftest.$ac_objext"
14694 if { (eval echo "$as_me:14694: \"$ac_compile\"") >&5
14695   (eval $ac_compile) 2>&5
14696   ac_status=$?
14697   echo "$as_me:14697: \$? = $ac_status" >&5
14698   (exit "$ac_status"); } &&
14699          { ac_try='test -s "conftest.$ac_objext"'
14700   { (eval echo "$as_me:14700: \"$ac_try\"") >&5
14701   (eval $ac_try) 2>&5
14702   ac_status=$?
14703   echo "$as_me:14703: \$? = $ac_status" >&5
14704   (exit "$ac_status"); }; }; then
14705   ac_hi=$ac_mid; break
14706 else
14707   echo "$as_me: failed program was:" >&5
14708 cat "conftest.$ac_ext" >&5
14709 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
14710 fi
14711 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14712   done
14713 else
14714   echo "$as_me: failed program was:" >&5
14715 cat "conftest.$ac_ext" >&5
14716 ac_hi=-1 ac_mid=-1
14717   while :; do
14718     cat >"conftest.$ac_ext" <<_ACEOF
14719 #line 14719 "configure"
14720 #include "confdefs.h"
14721 $ac_includes_default
14722 int
14723 main (void)
14724 {
14725 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14726   ;
14727   return 0;
14728 }
14729 _ACEOF
14730 rm -f "conftest.$ac_objext"
14731 if { (eval echo "$as_me:14731: \"$ac_compile\"") >&5
14732   (eval $ac_compile) 2>&5
14733   ac_status=$?
14734   echo "$as_me:14734: \$? = $ac_status" >&5
14735   (exit "$ac_status"); } &&
14736          { ac_try='test -s "conftest.$ac_objext"'
14737   { (eval echo "$as_me:14737: \"$ac_try\"") >&5
14738   (eval $ac_try) 2>&5
14739   ac_status=$?
14740   echo "$as_me:14740: \$? = $ac_status" >&5
14741   (exit "$ac_status"); }; }; then
14742   ac_lo=$ac_mid; break
14743 else
14744   echo "$as_me: failed program was:" >&5
14745 cat "conftest.$ac_ext" >&5
14746 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
14747 fi
14748 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14749   done
14750 fi
14751 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14752 # Binary search between lo and hi bounds.
14753 while test "x$ac_lo" != "x$ac_hi"; do
14754   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14755   cat >"conftest.$ac_ext" <<_ACEOF
14756 #line 14756 "configure"
14757 #include "confdefs.h"
14758 $ac_includes_default
14759 int
14760 main (void)
14761 {
14762 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14763   ;
14764   return 0;
14765 }
14766 _ACEOF
14767 rm -f "conftest.$ac_objext"
14768 if { (eval echo "$as_me:14768: \"$ac_compile\"") >&5
14769   (eval $ac_compile) 2>&5
14770   ac_status=$?
14771   echo "$as_me:14771: \$? = $ac_status" >&5
14772   (exit "$ac_status"); } &&
14773          { ac_try='test -s "conftest.$ac_objext"'
14774   { (eval echo "$as_me:14774: \"$ac_try\"") >&5
14775   (eval $ac_try) 2>&5
14776   ac_status=$?
14777   echo "$as_me:14777: \$? = $ac_status" >&5
14778   (exit "$ac_status"); }; }; then
14779   ac_hi=$ac_mid
14780 else
14781   echo "$as_me: failed program was:" >&5
14782 cat "conftest.$ac_ext" >&5
14783 ac_lo=`expr "$ac_mid" + 1`
14784 fi
14785 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14786 done
14787 ac_cv_sizeof_signed_char=$ac_lo
14788 else
14789   if test "$cross_compiling" = yes; then
14790   { { echo "$as_me:14790: error: cannot run test program while cross compiling" >&5
14791 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14792    { (exit 1); exit 1; }; }
14793 else
14794   cat >"conftest.$ac_ext" <<_ACEOF
14795 #line 14795 "configure"
14796 #include "confdefs.h"
14797 $ac_includes_default
14798 int
14799 main (void)
14800 {
14801 FILE *f = fopen ("conftest.val", "w");
14802 if (!f)
14803   $ac_main_return (1);
14804 fprintf (f, "%ld", (long)(sizeof (signed char)));
14805 fclose (f);
14806   ;
14807   return 0;
14808 }
14809 _ACEOF
14810 rm -f "conftest$ac_exeext"
14811 if { (eval echo "$as_me:14811: \"$ac_link\"") >&5
14812   (eval $ac_link) 2>&5
14813   ac_status=$?
14814   echo "$as_me:14814: \$? = $ac_status" >&5
14815   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14816   { (eval echo "$as_me:14816: \"$ac_try\"") >&5
14817   (eval $ac_try) 2>&5
14818   ac_status=$?
14819   echo "$as_me:14819: \$? = $ac_status" >&5
14820   (exit "$ac_status"); }; }; then
14821   ac_cv_sizeof_signed_char=`cat conftest.val`
14822 else
14823   echo "$as_me: program exited with status $ac_status" >&5
14824 echo "$as_me: failed program was:" >&5
14825 cat "conftest.$ac_ext" >&5
14826 fi
14827 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14828 fi
14829 fi
14830 rm -f conftest.val
14831 else
14832   ac_cv_sizeof_signed_char=0
14833 fi
14834 fi
14835 echo "$as_me:14835: result: $ac_cv_sizeof_signed_char" >&5
14836 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14837 cat >>confdefs.h <<EOF
14838 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14839 EOF
14840
14841 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14842         NCURSES_SBOOL="signed char"
14843 else
14844         NCURSES_SBOOL="char"
14845 fi
14846 echo "$as_me:14846: checking if you want to use signed Boolean array in term.h" >&5
14847 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14848
14849 # Check whether --enable-signed-char or --disable-signed-char was given.
14850 if test "${enable_signed_char+set}" = set; then
14851   enableval="$enable_signed_char"
14852   with_signed_char=$enableval
14853 else
14854   with_signed_char=$cf_dft_signed_char
14855 fi;
14856 echo "$as_me:14856: result: $with_signed_char" >&5
14857 echo "${ECHO_T}$with_signed_char" >&6
14858 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14859
14860 ###   use option --with-tparm-arg to override tparm's argument type
14861 echo "$as_me:14861: checking for type of tparm args" >&5
14862 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14863
14864 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14865 if test "${with_tparm_arg+set}" = set; then
14866   withval="$with_tparm_arg"
14867   NCURSES_TPARM_ARG="$withval"
14868 else
14869   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14870 fi;
14871 echo "$as_me:14871: result: $NCURSES_TPARM_ARG" >&5
14872 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14873
14874 ### Enable compiling-in rcs id's
14875 echo "$as_me:14875: checking if RCS identifiers should be compiled-in" >&5
14876 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14877
14878 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14879 if test "${with_rcs_ids+set}" = set; then
14880   withval="$with_rcs_ids"
14881   with_rcs_ids=$withval
14882 else
14883   with_rcs_ids=no
14884 fi;
14885 echo "$as_me:14885: result: $with_rcs_ids" >&5
14886 echo "${ECHO_T}$with_rcs_ids" >&6
14887 test "x$with_rcs_ids" = xyes &&
14888 cat >>confdefs.h <<\EOF
14889 #define USE_RCS_IDS 1
14890 EOF
14891
14892 ###############################################################################
14893
14894 echo "$as_me:14894: checking format of man-pages" >&5
14895 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14896
14897 # Check whether --with-manpage-format or --without-manpage-format was given.
14898 if test "${with_manpage_format+set}" = set; then
14899   withval="$with_manpage_format"
14900   MANPAGE_FORMAT=$withval
14901 else
14902   MANPAGE_FORMAT=unknown
14903 fi;
14904
14905 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14906 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14907
14908 cf_unknown=
14909
14910 case "$MANPAGE_FORMAT" in
14911 (unknown)
14912         if test -z "$MANPATH" ; then
14913                 MANPATH="/usr/man:/usr/share/man"
14914         fi
14915
14916         # look for the 'date' man-page (it is most likely to be installed!)
14917         MANPAGE_FORMAT=
14918         cf_preform="no"
14919         cf_catonly="yes"
14920         cf_example="date"
14921
14922         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14923         for cf_dir in $MANPATH; do
14924                 test -z "$cf_dir" && cf_dir=/usr/man
14925                 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
14926                 do
14927                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14928                         if test "x$cf_test" = "x$cf_name" ; then
14929
14930                                 case "$cf_name" in
14931                                 (*.bz2) MANPAGE_FORMAT="$MANPAGE_FORMAT bzip2";;
14932                                 (*.xz)  MANPAGE_FORMAT="$MANPAGE_FORMAT xz";;
14933                                 (*.gz)  MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14934                                 (*.Z)   MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14935                                 (*.0)   MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14936                                 (*)     MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14937                                 esac
14938
14939                                 case "$cf_name" in
14940                                 ($cf_dir/man*)
14941                                         cf_catonly=no
14942                                         ;;
14943                                 ($cf_dir/cat*)
14944                                         cf_preform=yes
14945                                         ;;
14946                                 esac
14947                                 break
14948                         fi
14949
14950                         # if we found a match in either man* or cat*, stop looking
14951                         if test -n "$MANPAGE_FORMAT" ; then
14952                                 cf_found=no
14953                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14954                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14955                                 case "$cf_name" in
14956                                 ($cf_dir/cat*)
14957                                         cf_found=yes
14958                                         ;;
14959                                 esac
14960                                 test "$cf_found" = yes && break
14961                         fi
14962                 done
14963                 # only check the first directory in $MANPATH where we find manpages
14964                 if test -n "$MANPAGE_FORMAT" ; then
14965                         break
14966                 fi
14967         done
14968         # if we did not find the example, just assume it is normal
14969         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14970         IFS="$ac_save_ifs"
14971         ;;
14972 (*)
14973         for cf_option in $MANPAGE_FORMAT; do
14974         case "$cf_option" in
14975         (xz|bzip2|gzip|compress|BSDI|normal|formatted|catonly)
14976                 ;;
14977         (*)
14978                 cf_unknown="$cf_unknown $cf_option"
14979                 ;;
14980         esac
14981         done
14982         ;;
14983 esac
14984
14985 echo "$as_me:14985: result: $MANPAGE_FORMAT" >&5
14986 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14987 if test -n "$cf_unknown" ; then
14988         { echo "$as_me:14988: WARNING: Unexpected manpage-format $cf_unknown" >&5
14989 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14990 fi
14991
14992 cf_manpage_format=no
14993 cf_manpage_inboth=no
14994 cf_manpage_so_strip=
14995 cf_manpage_compress=
14996
14997 for cf_item in $MANPAGE_FORMAT
14998 do
14999 case "$cf_item" in
15000 (catonly)
15001         cf_manpage_format=yes
15002         cf_manpage_inboth=no
15003         ;;
15004 (formatted)
15005         cf_manpage_format=yes
15006         cf_manpage_inboth=yes
15007         ;;
15008 (compress)
15009         cf_manpage_so_strip="Z"
15010         cf_manpage_compress=compress
15011         ;;
15012 (gzip)
15013         cf_manpage_so_strip="gz"
15014         cf_manpage_compress=gzip
15015         ;;
15016 (bzip2)
15017         cf_manpage_so_strip="bz2"
15018         cf_manpage_compress=bzip2
15019         ;;
15020 (xz)
15021         cf_manpage_so_strip="xz"
15022         cf_manpage_compress=xz
15023         ;;
15024 esac
15025 done
15026
15027 echo "$as_me:15027: checking for manpage renaming" >&5
15028 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
15029
15030 # Check whether --with-manpage-renames or --without-manpage-renames was given.
15031 if test "${with_manpage_renames+set}" = set; then
15032   withval="$with_manpage_renames"
15033   MANPAGE_RENAMES=$withval
15034 else
15035   MANPAGE_RENAMES=yes
15036 fi;
15037
15038 case ".$MANPAGE_RENAMES" in
15039 (.no)
15040         ;;
15041 (.|.yes)
15042         # Debian 'man' program?
15043         if test -f /etc/debian_version ; then
15044                 MANPAGE_RENAMES=man/man_db.renames
15045         else
15046                 MANPAGE_RENAMES=no
15047         fi
15048         ;;
15049 esac
15050
15051 if test "$MANPAGE_RENAMES" = man/man_db.renames ; then
15052         MANPAGE_RENAMES=`pwd`/$MANPAGE_RENAMES
15053 elif test "$MANPAGE_RENAMES" = no ; then
15054         :
15055 elif test ! -f "$MANPAGE_RENAMES" ; then
15056         { { echo "$as_me:15056: error: not a filename: $MANPAGE_RENAMES" >&5
15057 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
15058    { (exit 1); exit 1; }; }
15059 fi
15060
15061 echo "$as_me:15061: result: $MANPAGE_RENAMES" >&5
15062 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
15063
15064 echo "$as_me:15064: checking if manpage aliases will be installed" >&5
15065 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
15066
15067 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
15068 if test "${with_manpage_aliases+set}" = set; then
15069   withval="$with_manpage_aliases"
15070   MANPAGE_ALIASES=$withval
15071 else
15072   MANPAGE_ALIASES=yes
15073 fi;
15074
15075 echo "$as_me:15075: result: $MANPAGE_ALIASES" >&5
15076 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
15077
15078 case "x$LN_S" in
15079 (xln*)
15080         cf_use_symlinks=yes
15081         ;;
15082 (*)
15083         cf_use_symlinks=no
15084         ;;
15085 esac
15086
15087 MANPAGE_SYMLINKS=no
15088 if test "$MANPAGE_ALIASES" = yes ; then
15089 echo "$as_me:15089: checking if manpage symlinks should be used" >&5
15090 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
15091
15092 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
15093 if test "${with_manpage_symlinks+set}" = set; then
15094   withval="$with_manpage_symlinks"
15095   MANPAGE_SYMLINKS=$withval
15096 else
15097   MANPAGE_SYMLINKS=$cf_use_symlinks
15098 fi;
15099
15100 if test "$cf_use_symlinks" = no; then
15101 if test "$MANPAGE_SYMLINKS" = yes ; then
15102         { echo "$as_me:15102: WARNING: cannot make symlinks" >&5
15103 echo "$as_me: WARNING: cannot make symlinks" >&2;}
15104         MANPAGE_SYMLINKS=no
15105 fi
15106 fi
15107
15108 echo "$as_me:15108: result: $MANPAGE_SYMLINKS" >&5
15109 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
15110 fi
15111
15112 echo "$as_me:15112: checking for manpage tbl" >&5
15113 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
15114
15115 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
15116 if test "${with_manpage_tbl+set}" = set; then
15117   withval="$with_manpage_tbl"
15118   MANPAGE_TBL=$withval
15119 else
15120   MANPAGE_TBL=no
15121 fi;
15122
15123 echo "$as_me:15123: result: $MANPAGE_TBL" >&5
15124 echo "${ECHO_T}$MANPAGE_TBL" >&6
15125
15126 if test "$prefix" = "NONE" ; then
15127         cf_prefix="$ac_default_prefix"
15128 else
15129         cf_prefix="$prefix"
15130 fi
15131
15132 test ! -d man && mkdir man
15133
15134 cf_edit_man=./edit_man.sh
15135 cf_man_alias=`pwd`/man_alias.sed
15136
15137 cat >$cf_edit_man <<CF_EOF
15138 #! $SHELL
15139 # this script is generated by the configure-script CF_MAN_PAGES macro.
15140
15141 prefix="$cf_prefix"
15142 datarootdir="$datarootdir"
15143 datadir="$datadir"
15144
15145 NCURSES_MAJOR="$NCURSES_MAJOR"
15146 NCURSES_MINOR="$NCURSES_MINOR"
15147 NCURSES_PATCH="$NCURSES_PATCH"
15148
15149 NCURSES_OSPEED="$NCURSES_OSPEED"
15150 TERMINFO="$TERMINFO"
15151
15152 INSTALL="$INSTALL"
15153 INSTALL_DATA="$INSTALL_DATA"
15154
15155 transform="$program_transform_name"
15156
15157 TMP=\${TMPDIR:=/tmp}/man\$\$
15158 trap "rm -f \$TMP; exit 1" 1 2 3 15
15159 trap "rm -f \$TMP" 0
15160
15161 form=\$1
15162 shift || exit 1
15163
15164 verb=\$1
15165 shift || exit 1
15166
15167 mandir=\$1
15168 shift || exit 1
15169
15170 srcdir=\$1
15171 top_srcdir=\$srcdir/..
15172 shift || exit 1
15173
15174 if test "\$form" = normal ; then
15175         if test "$cf_manpage_format" = yes ; then
15176         if test "$cf_manpage_inboth" = no ; then
15177                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15178                 exit $?
15179         fi
15180         fi
15181         cf_subdir=\$mandir/man
15182         cf_tables=$MANPAGE_TBL
15183 else
15184         cf_subdir=\$mandir/cat
15185         cf_tables=yes
15186 fi
15187
15188 # process the list of source-files
15189 for i in "\$@" ; do
15190 case \$i in
15191 (*.orig|*.rej) ;;
15192 (*.[0-9]*)
15193         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
15194         if test "\$verb" = installing ; then
15195         if test ! -d "\$cf_subdir\${section}" ; then
15196                 mkdir -p "\$cf_subdir\$section"
15197         fi
15198         fi
15199
15200         # replace variables in man page
15201         if test ! -f "$cf_man_alias" ; then
15202 cat >>$cf_man_alias <<-CF_EOF2
15203                 s,@DATADIR@,\$datadir,g
15204                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
15205                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
15206                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
15207                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
15208                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
15209                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
15210 CF_EOF
15211
15212         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
15213         do
15214                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15215                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
15216 cat >>$cf_edit_man <<-CF_EOF
15217                 s,@$cf_NAME@,$cf_name,g
15218 CF_EOF
15219         done
15220
15221 cat >>$cf_edit_man <<CF_EOF
15222 CF_EOF2
15223                 echo "...made $cf_man_alias"
15224         fi
15225
15226         aliases=
15227         cf_source=\`basename "\$i"\`
15228         cf_full_alias=\$cf_source
15229         test ! -f "\$cf_full_alias" && cf_full_alias="\$srcdir/\$cf_full_alias"
15230         if test ! -f "\$cf_full_alias" ; then
15231                 echo ".. skipped \$cf_source"
15232                 continue
15233         fi
15234 CF_EOF
15235
15236 if test "$MANPAGE_ALIASES" != no ; then
15237 cat >>$cf_edit_man <<CF_EOF
15238         nCurses=ignore.3x
15239         cf_part_alias=\`echo \$cf_full_alias| sed -e 's,^.*/,,'\`
15240         test "$with_curses_h" = yes && nCurses=ncurses.3x
15241         aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$cf_full_alias" |sed -f "$cf_man_alias" | sort -u; test "\$cf_part_alias" = "\$nCurses" && echo curses\`
15242 CF_EOF
15243 fi
15244
15245 if test "$MANPAGE_RENAMES" = no ; then
15246 cat >>$cf_edit_man <<CF_EOF
15247         # perform program transformations for section 1 man pages
15248         if test \$section = 1 ; then
15249                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
15250         else
15251                 cf_target=\$cf_subdir\${section}/\$cf_source
15252         fi
15253 CF_EOF
15254 else
15255 cat >>$cf_edit_man <<CF_EOF
15256         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
15257         if test -z "\$cf_target" ; then
15258                 echo "? missing rename for \$cf_source"
15259                 cf_target="\$cf_source"
15260         fi
15261         cf_target="\$cf_subdir\${section}/\${cf_target}"
15262
15263 CF_EOF
15264 fi
15265
15266 cat >>$cf_edit_man <<CF_EOF
15267         sed     -f "$cf_man_alias" \\
15268 CF_EOF
15269
15270 if test "$MANPAGE_RENAMES" != no ; then
15271 cat >>$cf_edit_man <<CF_EOF
15272                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
15273 CF_EOF
15274 else
15275 cat >>$cf_edit_man <<CF_EOF
15276                 < "\$i" >\$TMP
15277 CF_EOF
15278 fi
15279
15280 cat >>$cf_edit_man <<CF_EOF
15281 if test \$cf_tables = yes ; then
15282         tbl \$TMP >\$TMP.out
15283         mv \$TMP.out \$TMP
15284 fi
15285 CF_EOF
15286
15287 if test "$with_overwrite" != yes ; then
15288 cat >>$cf_edit_man <<CF_EOF
15289         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
15290         mv \$TMP.out \$TMP
15291 CF_EOF
15292 fi
15293
15294 if test "$with_curses_h" != yes ; then
15295 cat >>$cf_edit_man <<CF_EOF
15296         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
15297         mv \$TMP.out \$TMP
15298 CF_EOF
15299 fi
15300
15301 cat >>$cf_edit_man <<CF_EOF
15302         if test "\$form" = format ; then
15303                 nroff -man \$TMP >\$TMP.out
15304                 mv \$TMP.out \$TMP
15305         fi
15306 CF_EOF
15307
15308 if test -n "$cf_manpage_compress" ; then
15309 cat >>$cf_edit_man <<CF_EOF
15310         if test "\$verb" = installing ; then
15311         if ( "$cf_manpage_compress" -f \$TMP )
15312         then
15313                 mv \$TMP.$cf_manpage_so_strip \$TMP
15314         fi
15315         fi
15316         cf_target="\$cf_target.$cf_manpage_so_strip"
15317 CF_EOF
15318 fi
15319
15320 case "$MANPAGE_FORMAT" in
15321 (*BSDI*)
15322 cat >>$cf_edit_man <<CF_EOF
15323         if test "\$form" = format ; then
15324                 # BSDI installs only .0 suffixes in the cat directories
15325                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
15326         fi
15327 CF_EOF
15328   ;;
15329 esac
15330
15331 cat >>$cf_edit_man <<CF_EOF
15332         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
15333         if test "\$verb" = installing ; then
15334                 echo "\$verb \$cf_target"
15335                 \$INSTALL_DATA \$TMP "\$cf_target"
15336                 test -d "\$cf_subdir\${section}" &&
15337                 test -n "\$aliases" && (
15338                         cd "\$cf_subdir\${section}" && (
15339                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
15340                                 test -n "$cf_manpage_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_manpage_so_strip\$%%'\`
15341                                 cf_target=\`basename "\$cf_target"\`
15342                                 for cf_alias in \$aliases
15343                                 do
15344                                         if test "\$section" = 1 ; then
15345                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15346                                         fi
15347
15348                                         if test "$MANPAGE_SYMLINKS" = yes ; then
15349                                                 if test -f "\$cf_alias\${suffix}" ; then
15350                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
15351                                                         then
15352                                                                 continue
15353                                                         fi
15354                                                 fi
15355                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15356 CF_EOF
15357 case "x$LN_S" in
15358 (*-f)
15359 cat >>$cf_edit_man <<CF_EOF
15360                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15361 CF_EOF
15362         ;;
15363 (*)
15364 cat >>$cf_edit_man <<CF_EOF
15365                                                 rm -f "\$cf_alias\${suffix}"
15366                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15367 CF_EOF
15368         ;;
15369 esac
15370 cat >>$cf_edit_man <<CF_EOF
15371                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
15372                                                 echo ".so \$cf_source" >\$TMP
15373 CF_EOF
15374 if test -n "$cf_manpage_compress" ; then
15375 cat >>$cf_edit_man <<CF_EOF
15376                                                 if test -n "$cf_manpage_so_strip" ; then
15377                                                         "$cf_manpage_compress" -f \$TMP
15378                                                         mv \$TMP.$cf_manpage_so_strip \$TMP
15379                                                 fi
15380 CF_EOF
15381 fi
15382 cat >>$cf_edit_man <<CF_EOF
15383                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15384                                                 rm -f "\$cf_alias\${suffix}"
15385                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
15386                                         fi
15387                                 done
15388                         )
15389                 )
15390         elif test "\$verb" = removing ; then
15391                 test -f "\$cf_target" && (
15392                         echo "\$verb \$cf_target"
15393                         rm -f "\$cf_target"
15394                 )
15395                 test -d "\$cf_subdir\${section}" &&
15396                 test -n "\$aliases" && (
15397                         cd "\$cf_subdir\${section}" && (
15398                                 for cf_alias in \$aliases
15399                                 do
15400                                         if test "\$section" = 1 ; then
15401                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15402                                         fi
15403
15404                                         echo ".. \$verb alias \$cf_alias\${suffix}"
15405                                         rm -f "\$cf_alias\${suffix}"
15406                                 done
15407                         )
15408                 )
15409         else
15410 #               echo ".hy 0"
15411                 cat \$TMP
15412         fi
15413         ;;
15414 esac
15415 done
15416
15417 if test "$cf_manpage_inboth" = yes ; then
15418 if test "\$form" != format ; then
15419         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15420 fi
15421 fi
15422
15423 exit 0
15424 CF_EOF
15425 chmod 755 "$cf_edit_man"
15426
15427 ###############################################################################
15428
15429 ### Note that some functions (such as const) are normally disabled anyway.
15430 echo "$as_me:15430: checking if you want to build with function extensions" >&5
15431 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15432
15433 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15434 if test "${enable_ext_funcs+set}" = set; then
15435   enableval="$enable_ext_funcs"
15436   with_ext_funcs=$enableval
15437 else
15438   with_ext_funcs=yes
15439 fi;
15440 echo "$as_me:15440: result: $with_ext_funcs" >&5
15441 echo "${ECHO_T}$with_ext_funcs" >&6
15442 if test "x$with_ext_funcs" = xyes ; then
15443         NCURSES_EXT_FUNCS=1
15444
15445 cat >>confdefs.h <<\EOF
15446 #define NCURSES_EXT_FUNCS 1
15447 EOF
15448
15449 cat >>confdefs.h <<\EOF
15450 #define HAVE_ASSUME_DEFAULT_COLORS 1
15451 EOF
15452
15453 cat >>confdefs.h <<\EOF
15454 #define HAVE_CURSES_VERSION 1
15455 EOF
15456
15457 cat >>confdefs.h <<\EOF
15458 #define HAVE_HAS_KEY 1
15459 EOF
15460
15461 cat >>confdefs.h <<\EOF
15462 #define HAVE_RESIZETERM 1
15463 EOF
15464
15465 cat >>confdefs.h <<\EOF
15466 #define HAVE_RESIZE_TERM 1
15467 EOF
15468
15469 cat >>confdefs.h <<\EOF
15470 #define HAVE_TERM_ENTRY_H 1
15471 EOF
15472
15473 cat >>confdefs.h <<\EOF
15474 #define HAVE_USE_DEFAULT_COLORS 1
15475 EOF
15476
15477 cat >>confdefs.h <<\EOF
15478 #define HAVE_USE_EXTENDED_NAMES 1
15479 EOF
15480
15481 cat >>confdefs.h <<\EOF
15482 #define HAVE_USE_SCREEN 1
15483 EOF
15484
15485 cat >>confdefs.h <<\EOF
15486 #define HAVE_USE_WINDOW 1
15487 EOF
15488
15489 cat >>confdefs.h <<\EOF
15490 #define HAVE_WRESIZE 1
15491 EOF
15492
15493         GENERATED_EXT_FUNCS=generated
15494         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
15495 else
15496         NCURSES_EXT_FUNCS=0
15497         GENERATED_EXT_FUNCS=
15498 fi
15499
15500 echo "$as_me:15500: checking if you want to build with SCREEN extensions" >&5
15501 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
15502
15503 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
15504 if test "${enable_sp_funcs+set}" = set; then
15505   enableval="$enable_sp_funcs"
15506   with_sp_funcs=$enableval
15507 else
15508   with_sp_funcs=$cf_dft_ext_spfuncs
15509 fi;
15510 echo "$as_me:15510: result: $with_sp_funcs" >&5
15511 echo "${ECHO_T}$with_sp_funcs" >&6
15512 if test "x$with_sp_funcs" = xyes ; then
15513         NCURSES_SP_FUNCS=1
15514
15515 cat >>confdefs.h <<\EOF
15516 #define NCURSES_SP_FUNCS 1
15517 EOF
15518
15519 cat >>confdefs.h <<\EOF
15520 #define HAVE_TPUTS_SP 1
15521 EOF
15522
15523         GENERATED_SP_FUNCS=generated
15524 else
15525         NCURSES_SP_FUNCS=0
15526         GENERATED_SP_FUNCS=
15527 fi
15528
15529 echo "$as_me:15529: checking if you want to build with terminal-driver" >&5
15530 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
15531
15532 # Check whether --enable-term-driver or --disable-term-driver was given.
15533 if test "${enable_term_driver+set}" = set; then
15534   enableval="$enable_term_driver"
15535   with_term_driver=$enableval
15536 else
15537   with_term_driver=no
15538 fi;
15539 echo "$as_me:15539: result: $with_term_driver" >&5
15540 echo "${ECHO_T}$with_term_driver" >&6
15541 if test "x$with_term_driver" = xyes ; then
15542
15543 cat >>confdefs.h <<\EOF
15544 #define USE_TERM_DRIVER 1
15545 EOF
15546
15547         if test "x$with_termlib" != xno ; then
15548                 { { echo "$as_me:15548: error: The term-driver option conflicts with the termlib option" >&5
15549 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15550    { (exit 1); exit 1; }; }
15551         fi
15552         if test "x$with_sp_funcs" != xyes ; then
15553                 { { echo "$as_me:15553: error: The term-driver option relies upon sp-funcs" >&5
15554 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15555    { (exit 1); exit 1; }; }
15556         fi
15557 fi
15558
15559 ###   use option --enable-const to turn on use of const beyond that in XSI.
15560 echo "$as_me:15560: checking for extended use of const keyword" >&5
15561 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15562
15563 # Check whether --enable-const or --disable-const was given.
15564 if test "${enable_const+set}" = set; then
15565   enableval="$enable_const"
15566   with_ext_const=$enableval
15567 else
15568   with_ext_const=$cf_dft_ext_const
15569 fi;
15570 echo "$as_me:15570: result: $with_ext_const" >&5
15571 echo "${ECHO_T}$with_ext_const" >&6
15572 NCURSES_CONST='/*nothing*/'
15573 if test "x$with_ext_const" = xyes ; then
15574         NCURSES_CONST=const
15575 fi
15576
15577 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
15578 echo "$as_me:15578: checking if you want to use extended colors" >&5
15579 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15580
15581 # Check whether --enable-ext-colors or --disable-ext-colors was given.
15582 if test "${enable_ext_colors+set}" = set; then
15583   enableval="$enable_ext_colors"
15584   with_ext_colors=$enableval
15585 else
15586   with_ext_colors=$cf_dft_ext_colors
15587 fi;
15588 echo "$as_me:15588: result: $with_ext_colors" >&5
15589 echo "${ECHO_T}$with_ext_colors" >&6
15590 NCURSES_EXT_COLORS=0
15591 if test "x$with_ext_colors" = xyes ; then
15592         if test "x$with_widec" != xyes ; then
15593                 { echo "$as_me:15593: WARNING: This option applies only to wide-character library" >&5
15594 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15595         else
15596                 # cannot be ABI 5 since it changes sizeof(cchar_t)
15597
15598 if test "${with_abi_version+set}" != set; then
15599         case "$cf_cv_rel_version" in
15600         (5.*)
15601                 cf_cv_rel_version=6.0
15602                 cf_cv_abi_version=6
15603                 cf_cv_abi_default=6
15604                 { echo "$as_me:15604: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15605 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
15606                 ;;
15607         esac
15608 fi
15609
15610                 NCURSES_EXT_COLORS=1
15611
15612 cat >>confdefs.h <<\EOF
15613 #define NCURSES_EXT_COLORS 1
15614 EOF
15615
15616 cat >>confdefs.h <<\EOF
15617 #define HAVE_ALLOC_PAIR 1
15618 EOF
15619
15620 cat >>confdefs.h <<\EOF
15621 #define HAVE_INIT_EXTENDED_COLOR 1
15622 EOF
15623
15624 cat >>confdefs.h <<\EOF
15625 #define HAVE_RESET_COLOR_PAIRS 1
15626 EOF
15627
15628         fi
15629 fi
15630
15631 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
15632 echo "$as_me:15632: checking if you want to use extended mouse encoding" >&5
15633 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15634
15635 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15636 if test "${enable_ext_mouse+set}" = set; then
15637   enableval="$enable_ext_mouse"
15638   with_ext_mouse=$enableval
15639 else
15640   with_ext_mouse=$cf_dft_ext_mouse
15641 fi;
15642 echo "$as_me:15642: result: $with_ext_mouse" >&5
15643 echo "${ECHO_T}$with_ext_mouse" >&6
15644 if test "x$with_ext_mouse" = xyes ; then
15645
15646 if test "${with_abi_version+set}" != set; then
15647         case "$cf_cv_rel_version" in
15648         (5.*)
15649                 cf_cv_rel_version=6.0
15650                 cf_cv_abi_version=6
15651                 cf_cv_abi_default=6
15652                 { echo "$as_me:15652: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15653 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
15654                 ;;
15655         esac
15656 fi
15657
15658 fi
15659
15660 case $cf_cv_abi_default in
15661 (5)
15662         NCURSES_MOUSE_VERSION=1
15663         ;;
15664 (6)
15665         NCURSES_MOUSE_VERSION=2
15666         ;;
15667 ([789])
15668         NCURSES_MOUSE_VERSION=3
15669         ;;
15670 esac
15671
15672 ###   use option --enable-ext-putwin to turn on extended screendumps
15673 echo "$as_me:15673: checking if you want to use extended putwin/screendump" >&5
15674 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15675
15676 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15677 if test "${enable_ext_putwin+set}" = set; then
15678   enableval="$enable_ext_putwin"
15679   with_ext_putwin=$enableval
15680 else
15681   with_ext_putwin=$cf_dft_ext_putwin
15682 fi;
15683 echo "$as_me:15683: result: $with_ext_putwin" >&5
15684 echo "${ECHO_T}$with_ext_putwin" >&6
15685 if test "x$with_ext_putwin" = xyes ; then
15686
15687 cat >>confdefs.h <<\EOF
15688 #define NCURSES_EXT_PUTWIN 1
15689 EOF
15690
15691 fi
15692
15693 echo "$as_me:15693: checking if you want \$NCURSES_NO_PADDING code" >&5
15694 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15695
15696 # Check whether --enable-no-padding or --disable-no-padding was given.
15697 if test "${enable_no_padding+set}" = set; then
15698   enableval="$enable_no_padding"
15699   with_no_padding=$enableval
15700 else
15701   with_no_padding=$with_ext_funcs
15702 fi;
15703 echo "$as_me:15703: result: $with_no_padding" >&5
15704 echo "${ECHO_T}$with_no_padding" >&6
15705 test "x$with_no_padding" = xyes &&
15706 cat >>confdefs.h <<\EOF
15707 #define NCURSES_NO_PADDING 1
15708 EOF
15709
15710 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15711 echo "$as_me:15711: checking if you want SIGWINCH handler" >&5
15712 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15713
15714 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15715 if test "${enable_sigwinch+set}" = set; then
15716   enableval="$enable_sigwinch"
15717   with_sigwinch=$enableval
15718 else
15719   with_sigwinch=$with_ext_funcs
15720 fi;
15721 echo "$as_me:15721: result: $with_sigwinch" >&5
15722 echo "${ECHO_T}$with_sigwinch" >&6
15723 test "x$with_sigwinch" = xyes &&
15724 cat >>confdefs.h <<\EOF
15725 #define USE_SIGWINCH 1
15726 EOF
15727
15728 ###   use option --enable-tcap-names to allow user to define new capabilities
15729 echo "$as_me:15729: checking if you want user-definable terminal capabilities like termcap" >&5
15730 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15731
15732 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15733 if test "${enable_tcap_names+set}" = set; then
15734   enableval="$enable_tcap_names"
15735   with_tcap_names=$enableval
15736 else
15737   with_tcap_names=$with_ext_funcs
15738 fi;
15739 echo "$as_me:15739: result: $with_tcap_names" >&5
15740 echo "${ECHO_T}$with_tcap_names" >&6
15741 NCURSES_XNAMES=0
15742 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
15743
15744 ##############################################################################
15745
15746 echo "$as_me:15746: checking if you want to link with the pthread library" >&5
15747 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15748
15749 # Check whether --with-pthread or --without-pthread was given.
15750 if test "${with_pthread+set}" = set; then
15751   withval="$with_pthread"
15752   with_pthread=$withval
15753 else
15754   with_pthread=no
15755 fi;
15756 echo "$as_me:15756: result: $with_pthread" >&5
15757 echo "${ECHO_T}$with_pthread" >&6
15758
15759 if test "$with_pthread" != no ; then
15760         echo "$as_me:15760: checking for pthread.h" >&5
15761 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15762 if test "${ac_cv_header_pthread_h+set}" = set; then
15763   echo $ECHO_N "(cached) $ECHO_C" >&6
15764 else
15765   cat >"conftest.$ac_ext" <<_ACEOF
15766 #line 15766 "configure"
15767 #include "confdefs.h"
15768 #include <pthread.h>
15769 _ACEOF
15770 if { (eval echo "$as_me:15770: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15771   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15772   ac_status=$?
15773   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15774   rm -f conftest.er1
15775   cat conftest.err >&5
15776   echo "$as_me:15776: \$? = $ac_status" >&5
15777   (exit "$ac_status"); } >/dev/null; then
15778   if test -s conftest.err; then
15779     ac_cpp_err=$ac_c_preproc_warn_flag
15780   else
15781     ac_cpp_err=
15782   fi
15783 else
15784   ac_cpp_err=yes
15785 fi
15786 if test -z "$ac_cpp_err"; then
15787   ac_cv_header_pthread_h=yes
15788 else
15789   echo "$as_me: failed program was:" >&5
15790   cat "conftest.$ac_ext" >&5
15791   ac_cv_header_pthread_h=no
15792 fi
15793 rm -f conftest.err "conftest.$ac_ext"
15794 fi
15795 echo "$as_me:15795: result: $ac_cv_header_pthread_h" >&5
15796 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15797 if test "$ac_cv_header_pthread_h" = yes; then
15798
15799 cat >>confdefs.h <<\EOF
15800 #define HAVE_PTHREADS_H 1
15801 EOF
15802
15803         for cf_lib_pthread in pthread c_r
15804         do
15805             echo "$as_me:15805: checking if we can link with the $cf_lib_pthread library" >&5
15806 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15807             cf_save_LIBS="$LIBS"
15808
15809 cf_add_libs="$LIBS"
15810 # reverse order
15811 cf_add_0lib=
15812 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15813 # filter duplicates
15814 for cf_add_1lib in $cf_add_0lib; do
15815         for cf_add_2lib in $cf_add_libs; do
15816                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15817                         cf_add_1lib=
15818                         break
15819                 fi
15820         done
15821         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15822 done
15823 LIBS="$cf_add_libs"
15824
15825             cat >"conftest.$ac_ext" <<_ACEOF
15826 #line 15826 "configure"
15827 #include "confdefs.h"
15828
15829 #include <pthread.h>
15830
15831 int
15832 main (void)
15833 {
15834
15835                 int rc = pthread_create(0,0,0,0);
15836                 int r2 = pthread_mutexattr_settype(0, 0);
15837
15838   ;
15839   return 0;
15840 }
15841 _ACEOF
15842 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15843 if { (eval echo "$as_me:15843: \"$ac_link\"") >&5
15844   (eval $ac_link) 2>&5
15845   ac_status=$?
15846   echo "$as_me:15846: \$? = $ac_status" >&5
15847   (exit "$ac_status"); } &&
15848          { ac_try='test -s "conftest$ac_exeext"'
15849   { (eval echo "$as_me:15849: \"$ac_try\"") >&5
15850   (eval $ac_try) 2>&5
15851   ac_status=$?
15852   echo "$as_me:15852: \$? = $ac_status" >&5
15853   (exit "$ac_status"); }; }; then
15854   with_pthread=yes
15855 else
15856   echo "$as_me: failed program was:" >&5
15857 cat "conftest.$ac_ext" >&5
15858 with_pthread=no
15859 fi
15860 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15861             LIBS="$cf_save_LIBS"
15862             echo "$as_me:15862: result: $with_pthread" >&5
15863 echo "${ECHO_T}$with_pthread" >&6
15864             test "$with_pthread" = yes && break
15865         done
15866
15867         if test "$with_pthread" = yes ; then
15868
15869 cf_add_libs="$LIBS"
15870 # reverse order
15871 cf_add_0lib=
15872 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15873 # filter duplicates
15874 for cf_add_1lib in $cf_add_0lib; do
15875         for cf_add_2lib in $cf_add_libs; do
15876                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15877                         cf_add_1lib=
15878                         break
15879                 fi
15880         done
15881         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15882 done
15883 LIBS="$cf_add_libs"
15884
15885 cat >>confdefs.h <<\EOF
15886 #define HAVE_LIBPTHREADS 1
15887 EOF
15888
15889         else
15890             { { echo "$as_me:15890: error: Cannot link with pthread library" >&5
15891 echo "$as_me: error: Cannot link with pthread library" >&2;}
15892    { (exit 1); exit 1; }; }
15893         fi
15894
15895 fi
15896
15897 fi
15898
15899 if test "x$with_pthread" != xno; then
15900         echo "$as_me:15900: checking for pthread_kill" >&5
15901 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15902 if test "${ac_cv_func_pthread_kill+set}" = set; then
15903   echo $ECHO_N "(cached) $ECHO_C" >&6
15904 else
15905   cat >"conftest.$ac_ext" <<_ACEOF
15906 #line 15906 "configure"
15907 #include "confdefs.h"
15908 #define pthread_kill autoconf_temporary
15909 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15910 #undef pthread_kill
15911
15912 #ifdef __cplusplus
15913 extern "C"
15914 #endif
15915
15916 /* We use char because int might match the return type of a gcc2
15917    builtin and then its argument prototype would still apply.  */
15918 char pthread_kill (void);
15919
15920 int
15921 main (void)
15922 {
15923
15924 /* The GNU C library defines stubs for functions which it implements
15925     to always fail with ENOSYS.  Some functions are actually named
15926     something starting with __ and the normal name is an alias.  */
15927 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15928 #error found stub for pthread_kill
15929 #endif
15930
15931         return pthread_kill ();
15932   ;
15933   return 0;
15934 }
15935 _ACEOF
15936 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15937 if { (eval echo "$as_me:15937: \"$ac_link\"") >&5
15938   (eval $ac_link) 2>&5
15939   ac_status=$?
15940   echo "$as_me:15940: \$? = $ac_status" >&5
15941   (exit "$ac_status"); } &&
15942          { ac_try='test -s "conftest$ac_exeext"'
15943   { (eval echo "$as_me:15943: \"$ac_try\"") >&5
15944   (eval $ac_try) 2>&5
15945   ac_status=$?
15946   echo "$as_me:15946: \$? = $ac_status" >&5
15947   (exit "$ac_status"); }; }; then
15948   ac_cv_func_pthread_kill=yes
15949 else
15950   echo "$as_me: failed program was:" >&5
15951 cat "conftest.$ac_ext" >&5
15952 ac_cv_func_pthread_kill=no
15953 fi
15954 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15955 fi
15956 echo "$as_me:15956: result: $ac_cv_func_pthread_kill" >&5
15957 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15958 if test "$ac_cv_func_pthread_kill" = yes; then
15959
15960                 echo "$as_me:15960: checking if you want to allow EINTR in wgetch with pthreads" >&5
15961 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15962
15963 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15964 if test "${enable_pthreads_eintr+set}" = set; then
15965   enableval="$enable_pthreads_eintr"
15966   use_pthreads_eintr=$enableval
15967 else
15968   use_pthreads_eintr=no
15969 fi;
15970                 echo "$as_me:15970: result: $use_pthreads_eintr" >&5
15971 echo "${ECHO_T}$use_pthreads_eintr" >&6
15972                 if test "x$use_pthreads_eintr" = xyes ; then
15973
15974 cat >>confdefs.h <<\EOF
15975 #define USE_PTHREADS_EINTR 1
15976 EOF
15977
15978                 fi
15979 fi
15980
15981         echo "$as_me:15981: checking if you want to use weak-symbols for pthreads" >&5
15982 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15983
15984 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15985 if test "${enable_weak_symbols+set}" = set; then
15986   enableval="$enable_weak_symbols"
15987   use_weak_symbols=$enableval
15988 else
15989   use_weak_symbols=no
15990 fi;
15991         echo "$as_me:15991: result: $use_weak_symbols" >&5
15992 echo "${ECHO_T}$use_weak_symbols" >&6
15993         if test "x$use_weak_symbols" = xyes ; then
15994
15995 echo "$as_me:15995: checking if $CC supports weak symbols" >&5
15996 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15997 if test "${cf_cv_weak_symbols+set}" = set; then
15998   echo $ECHO_N "(cached) $ECHO_C" >&6
15999 else
16000
16001 cat >"conftest.$ac_ext" <<_ACEOF
16002 #line 16002 "configure"
16003 #include "confdefs.h"
16004
16005 #include <stdio.h>
16006 int
16007 main (void)
16008 {
16009
16010 #if defined(__GNUC__)
16011 #  if defined __USE_ISOC99
16012 #    define _cat_pragma(exp)    _Pragma(#exp)
16013 #    define _weak_pragma(exp)   _cat_pragma(weak name)
16014 #  else
16015 #    define _weak_pragma(exp)
16016 #  endif
16017 #  define _declare(name)        __extension__ extern __typeof__(name) name
16018 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
16019 #endif
16020
16021 weak_symbol(fopen);
16022
16023   ;
16024   return 0;
16025 }
16026 _ACEOF
16027 rm -f "conftest.$ac_objext"
16028 if { (eval echo "$as_me:16028: \"$ac_compile\"") >&5
16029   (eval $ac_compile) 2>&5
16030   ac_status=$?
16031   echo "$as_me:16031: \$? = $ac_status" >&5
16032   (exit "$ac_status"); } &&
16033          { ac_try='test -s "conftest.$ac_objext"'
16034   { (eval echo "$as_me:16034: \"$ac_try\"") >&5
16035   (eval $ac_try) 2>&5
16036   ac_status=$?
16037   echo "$as_me:16037: \$? = $ac_status" >&5
16038   (exit "$ac_status"); }; }; then
16039   cf_cv_weak_symbols=yes
16040 else
16041   echo "$as_me: failed program was:" >&5
16042 cat "conftest.$ac_ext" >&5
16043 cf_cv_weak_symbols=no
16044 fi
16045 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16046
16047 fi
16048 echo "$as_me:16048: result: $cf_cv_weak_symbols" >&5
16049 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
16050
16051         else
16052                 cf_cv_weak_symbols=no
16053         fi
16054
16055         if test "x$cf_cv_weak_symbols" = xyes ; then
16056
16057 cat >>confdefs.h <<\EOF
16058 #define USE_WEAK_SYMBOLS 1
16059 EOF
16060
16061         fi
16062 fi
16063
16064 PTHREAD=
16065 if test "x$with_pthread" = "xyes" ; then
16066
16067 cat >>confdefs.h <<\EOF
16068 #define USE_PTHREADS 1
16069 EOF
16070
16071         enable_reentrant=yes
16072         if test "x$cf_cv_weak_symbols" = xyes ; then
16073                 PTHREAD=-lpthread
16074
16075 cf_add_libs="$PRIVATE_LIBS"
16076 # reverse order
16077 cf_add_0lib=
16078 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16079 # filter duplicates
16080 for cf_add_1lib in $cf_add_0lib; do
16081         for cf_add_2lib in $cf_add_libs; do
16082                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16083                         cf_add_1lib=
16084                         break
16085                 fi
16086         done
16087         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16088 done
16089 PRIVATE_LIBS="$cf_add_libs"
16090
16091         fi
16092 fi
16093
16094 # Reentrant code has to be opaque; there's little advantage to making ncurses
16095 # opaque outside of that, so there is no --enable-opaque option.  We can use
16096 # this option without --with-pthreads, but this will be always set for
16097 # pthreads.
16098 echo "$as_me:16098: checking if you want reentrant code" >&5
16099 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
16100
16101 # Check whether --enable-reentrant or --disable-reentrant was given.
16102 if test "${enable_reentrant+set}" = set; then
16103   enableval="$enable_reentrant"
16104   with_reentrant=$enableval
16105 else
16106   with_reentrant=no
16107 fi;
16108 echo "$as_me:16108: result: $with_reentrant" >&5
16109 echo "${ECHO_T}$with_reentrant" >&6
16110 if test "x$with_reentrant" = xyes ; then
16111         cf_cv_enable_reentrant=1
16112         cf_cv_enable_opaque="NCURSES_INTERNALS"
16113         NCURSES_SIZE_T=int
16114         if test "x$cf_cv_weak_symbols" = xyes ; then
16115
16116 # remove pthread library from $LIBS
16117 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
16118
16119 cf_add_libs="$TEST_LIBS"
16120 # reverse order
16121 cf_add_0lib=
16122 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16123 # filter duplicates
16124 for cf_add_1lib in $cf_add_0lib; do
16125         for cf_add_2lib in $cf_add_libs; do
16126                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16127                         cf_add_1lib=
16128                         break
16129                 fi
16130         done
16131         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16132 done
16133 TEST_LIBS="$cf_add_libs"
16134
16135 cf_add_libs="$TEST_LIBS2"
16136 # reverse order
16137 cf_add_0lib=
16138 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16139 # filter duplicates
16140 for cf_add_1lib in $cf_add_0lib; do
16141         for cf_add_2lib in $cf_add_libs; do
16142                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16143                         cf_add_1lib=
16144                         break
16145                 fi
16146         done
16147         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16148 done
16149 TEST_LIBS2="$cf_add_libs"
16150
16151 cf_add_libs="$PRIVATE_LIBS"
16152 # reverse order
16153 cf_add_0lib=
16154 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16155 # filter duplicates
16156 for cf_add_1lib in $cf_add_0lib; do
16157         for cf_add_2lib in $cf_add_libs; do
16158                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16159                         cf_add_1lib=
16160                         break
16161                 fi
16162         done
16163         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16164 done
16165 PRIVATE_LIBS="$cf_add_libs"
16166
16167         else
16168                 # when not using weak symbols but with_reentrant,
16169                 # add 't' to the library suffix on all platforms
16170                 # except cygwin, where we only do that if ALSO
16171                 # compiling with full thread support.
16172                 case "$host" in
16173                 (*cygwin* | *msys*)
16174                         if test "$with_pthread" = "yes" ; then
16175                                 if test "x$disable_lib_suffixes" = "xno" ; then
16176                                         LIB_SUFFIX="t${LIB_SUFFIX}"
16177                                 fi
16178                         fi ;;
16179                 (*)
16180                         if test "x$disable_lib_suffixes" = "xno" ; then
16181                                 LIB_SUFFIX="t${LIB_SUFFIX}"
16182                         fi
16183                         ;;
16184                 esac
16185         fi
16186
16187 cat >>confdefs.h <<\EOF
16188 #define USE_REENTRANT 1
16189 EOF
16190
16191 if test "${with_abi_version+set}" != set; then
16192         case "$cf_cv_rel_version" in
16193         (5.*)
16194                 cf_cv_rel_version=6.0
16195                 cf_cv_abi_version=6
16196                 cf_cv_abi_default=6
16197                 { echo "$as_me:16197: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
16198 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
16199                 ;;
16200         esac
16201 fi
16202
16203 else
16204         cf_cv_enable_reentrant=0
16205         cf_cv_enable_opaque="NCURSES_OPAQUE"
16206         NCURSES_SIZE_T=$cf_dft_ordinate_type
16207 fi
16208
16209 echo "$as_me:16209: checking if you want opaque curses-library structures" >&5
16210 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
16211
16212 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
16213 if test "${enable_opaque_curses+set}" = set; then
16214   enableval="$enable_opaque_curses"
16215   test "$enableval" != yes && enableval=no
16216         if test "$enableval" != "no" ; then
16217     enable_opaque_curses=yes
16218         else
16219
16220          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16221          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16222
16223         fi
16224 else
16225   enableval=no
16226
16227          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16228          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16229
16230 fi;
16231 echo "$as_me:16231: result: $enable_opaque_curses" >&5
16232 echo "${ECHO_T}$enable_opaque_curses" >&6
16233
16234 test "$cf_cv_enable_reentrant" = 1 && \
16235 test "$enable_opaque_curses" = no && \
16236 { { echo "$as_me:16236: error: reentrant configuration requires opaque library" >&5
16237 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
16238    { (exit 1); exit 1; }; }
16239
16240 echo "$as_me:16240: checking if you want opaque form-library structures" >&5
16241 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
16242
16243 # Check whether --enable-opaque-form or --disable-opaque-form was given.
16244 if test "${enable_opaque_form+set}" = set; then
16245   enableval="$enable_opaque_form"
16246   enable_opaque_form=yes
16247 else
16248   enable_opaque_form=no
16249 fi;
16250 echo "$as_me:16250: result: $enable_opaque_form" >&5
16251 echo "${ECHO_T}$enable_opaque_form" >&6
16252
16253 echo "$as_me:16253: checking if you want opaque menu-library structures" >&5
16254 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
16255
16256 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
16257 if test "${enable_opaque_menu+set}" = set; then
16258   enableval="$enable_opaque_menu"
16259   enable_opaque_menu=yes
16260 else
16261   enable_opaque_menu=no
16262 fi;
16263 echo "$as_me:16263: result: $enable_opaque_menu" >&5
16264 echo "${ECHO_T}$enable_opaque_menu" >&6
16265
16266 echo "$as_me:16266: checking if you want opaque panel-library structures" >&5
16267 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
16268
16269 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
16270 if test "${enable_opaque_panel+set}" = set; then
16271   enableval="$enable_opaque_panel"
16272   enable_opaque_panel=yes
16273 else
16274   enable_opaque_panel=no
16275 fi;
16276 echo "$as_me:16276: result: $enable_opaque_panel" >&5
16277 echo "${ECHO_T}$enable_opaque_panel" >&6
16278
16279 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
16280 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
16281 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
16282 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
16283
16284 ### Allow using a different wrap-prefix
16285 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
16286         echo "$as_me:16286: checking for prefix used to wrap public variables" >&5
16287 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
16288
16289 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
16290 if test "${with_wrap_prefix+set}" = set; then
16291   withval="$with_wrap_prefix"
16292   NCURSES_WRAP_PREFIX=$withval
16293 else
16294   NCURSES_WRAP_PREFIX=_nc_
16295 fi;
16296         echo "$as_me:16296: result: $NCURSES_WRAP_PREFIX" >&5
16297 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
16298 else
16299         NCURSES_WRAP_PREFIX=_nc_
16300 fi
16301
16302 cat >>confdefs.h <<EOF
16303 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
16304 EOF
16305
16306 ###############################################################################
16307 # These options are relatively safe to experiment with.
16308
16309 echo "$as_me:16309: checking if you want all development code" >&5
16310 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
16311
16312 # Check whether --with-develop or --without-develop was given.
16313 if test "${with_develop+set}" = set; then
16314   withval="$with_develop"
16315   with_develop=$withval
16316 else
16317   with_develop=no
16318 fi;
16319 echo "$as_me:16319: result: $with_develop" >&5
16320 echo "${ECHO_T}$with_develop" >&6
16321
16322 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
16323 echo "$as_me:16323: checking if you want hard-tabs code" >&5
16324 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
16325
16326 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
16327 if test "${enable_hard_tabs+set}" = set; then
16328   enableval="$enable_hard_tabs"
16329
16330 else
16331   enable_hard_tabs=$with_develop
16332 fi;
16333 echo "$as_me:16333: result: $enable_hard_tabs" >&5
16334 echo "${ECHO_T}$enable_hard_tabs" >&6
16335 test "x$enable_hard_tabs" = xyes &&
16336 cat >>confdefs.h <<\EOF
16337 #define USE_HARD_TABS 1
16338 EOF
16339
16340 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
16341 echo "$as_me:16341: checking if you want limited support for xmc" >&5
16342 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
16343
16344 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
16345 if test "${enable_xmc_glitch+set}" = set; then
16346   enableval="$enable_xmc_glitch"
16347
16348 else
16349   enable_xmc_glitch=$with_develop
16350 fi;
16351 echo "$as_me:16351: result: $enable_xmc_glitch" >&5
16352 echo "${ECHO_T}$enable_xmc_glitch" >&6
16353 test "x$enable_xmc_glitch" = xyes &&
16354 cat >>confdefs.h <<\EOF
16355 #define USE_XMC_SUPPORT 1
16356 EOF
16357
16358 ###############################################################################
16359 # These are just experimental, probably should not be in a package:
16360
16361 echo "$as_me:16361: checking if you do not want to assume colors are white-on-black" >&5
16362 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
16363
16364 # Check whether --enable-assumed-color or --disable-assumed-color was given.
16365 if test "${enable_assumed_color+set}" = set; then
16366   enableval="$enable_assumed_color"
16367   with_assumed_color=$enableval
16368 else
16369   with_assumed_color=yes
16370 fi;
16371 echo "$as_me:16371: result: $with_assumed_color" >&5
16372 echo "${ECHO_T}$with_assumed_color" >&6
16373 test "x$with_assumed_color" = xyes &&
16374 cat >>confdefs.h <<\EOF
16375 #define USE_ASSUMED_COLOR 1
16376 EOF
16377
16378 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
16379 echo "$as_me:16379: checking if you want hashmap scrolling-optimization code" >&5
16380 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
16381
16382 # Check whether --enable-hashmap or --disable-hashmap was given.
16383 if test "${enable_hashmap+set}" = set; then
16384   enableval="$enable_hashmap"
16385   with_hashmap=$enableval
16386 else
16387   with_hashmap=yes
16388 fi;
16389 echo "$as_me:16389: result: $with_hashmap" >&5
16390 echo "${ECHO_T}$with_hashmap" >&6
16391 test "x$with_hashmap" = xyes &&
16392 cat >>confdefs.h <<\EOF
16393 #define USE_HASHMAP 1
16394 EOF
16395
16396 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
16397 echo "$as_me:16397: checking if you want colorfgbg code" >&5
16398 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
16399
16400 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
16401 if test "${enable_colorfgbg+set}" = set; then
16402   enableval="$enable_colorfgbg"
16403   with_colorfgbg=$enableval
16404 else
16405   with_colorfgbg=no
16406 fi;
16407 echo "$as_me:16407: result: $with_colorfgbg" >&5
16408 echo "${ECHO_T}$with_colorfgbg" >&6
16409 test "x$with_colorfgbg" = xyes &&
16410 cat >>confdefs.h <<\EOF
16411 #define USE_COLORFGBG 1
16412 EOF
16413
16414 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
16415 echo "$as_me:16415: checking if you want to use gcc -fvisibility option" >&5
16416 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
16417
16418 # Check whether --enable-fvisibility or --disable-fvisibility was given.
16419 if test "${enable_fvisibility+set}" = set; then
16420   enableval="$enable_fvisibility"
16421   cf_with_fvisibility=$enableval
16422 else
16423   cf_with_fvisibility=no
16424 fi;
16425 echo "$as_me:16425: result: $cf_with_fvisibility" >&5
16426 echo "${ECHO_T}$cf_with_fvisibility" >&6
16427
16428 NCURSES_IMPEXP=
16429 NCURSES_CXX_IMPEXP=
16430 if test "x$cf_with_fvisibility" = xyes; then
16431
16432 echo "$as_me:16432: checking if $CC -fvisibility=hidden option works" >&5
16433 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
16434 if test "${cf_cv_fvisibility_hidden+set}" = set; then
16435   echo $ECHO_N "(cached) $ECHO_C" >&6
16436 else
16437
16438     cf_save_cflags="$CFLAGS"
16439     CFLAGS="$CFLAGS -fvisibility=hidden"
16440     cat >"conftest.$ac_ext" <<_ACEOF
16441 #line 16441 "configure"
16442 #include "confdefs.h"
16443
16444 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16445
16446 int
16447 main (void)
16448 {
16449
16450         if (somefunc()) return 1;
16451
16452   ;
16453   return 0;
16454 }
16455 _ACEOF
16456 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16457 if { (eval echo "$as_me:16457: \"$ac_link\"") >&5
16458   (eval $ac_link) 2>&5
16459   ac_status=$?
16460   echo "$as_me:16460: \$? = $ac_status" >&5
16461   (exit "$ac_status"); } &&
16462          { ac_try='test -s "conftest$ac_exeext"'
16463   { (eval echo "$as_me:16463: \"$ac_try\"") >&5
16464   (eval $ac_try) 2>&5
16465   ac_status=$?
16466   echo "$as_me:16466: \$? = $ac_status" >&5
16467   (exit "$ac_status"); }; }; then
16468   cf_cv_fvisibility_hidden=yes
16469 else
16470   echo "$as_me: failed program was:" >&5
16471 cat "conftest.$ac_ext" >&5
16472 cf_cv_fvisibility_hidden=no
16473 fi
16474 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16475     CFLAGS=$cf_save_cflags
16476
16477 fi
16478 echo "$as_me:16478: result: $cf_cv_fvisibility_hidden" >&5
16479 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
16480
16481         if test "x$cf_cv_fvisibility_hidden" = xyes
16482         then
16483
16484 cf_fix_cppflags=no
16485 cf_new_cflags=
16486 cf_new_cppflags=
16487 cf_new_extra_cppflags=
16488
16489 for cf_add_cflags in -fvisibility=hidden
16490 do
16491 case "$cf_fix_cppflags" in
16492 (no)
16493         case "$cf_add_cflags" in
16494         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16495                 case "$cf_add_cflags" in
16496                 (-D*)
16497                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16498
16499                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16500                                 && test -z "${cf_tst_cflags}" \
16501                                 && cf_fix_cppflags=yes
16502
16503                         if test "$cf_fix_cppflags" = yes ; then
16504
16505         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16506         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16507
16508                                 continue
16509                         elif test "${cf_tst_cflags}" = "\"'" ; then
16510
16511         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16512         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16513
16514                                 continue
16515                         fi
16516                         ;;
16517                 esac
16518                 case "$CPPFLAGS" in
16519                 (*$cf_add_cflags)
16520                         ;;
16521                 (*)
16522                         case "$cf_add_cflags" in
16523                         (-D*)
16524                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16525
16526 CPPFLAGS=`echo "$CPPFLAGS" | \
16527         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16528                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16529
16530                                 ;;
16531                         esac
16532
16533         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16534         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16535
16536                         ;;
16537                 esac
16538                 ;;
16539         (*)
16540
16541         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16542         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16543
16544                 ;;
16545         esac
16546         ;;
16547 (yes)
16548
16549         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16550         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16551
16552         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16553
16554         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16555                 && test -z "${cf_tst_cflags}" \
16556                 && cf_fix_cppflags=no
16557         ;;
16558 esac
16559 done
16560
16561 if test -n "$cf_new_cflags" ; then
16562
16563         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16564         CFLAGS="${CFLAGS}$cf_new_cflags"
16565
16566 fi
16567
16568 if test -n "$cf_new_cppflags" ; then
16569
16570         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16571         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16572
16573 fi
16574
16575 if test -n "$cf_new_extra_cppflags" ; then
16576
16577         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16578         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16579
16580 fi
16581
16582                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16583         fi
16584         if test -n "$CXX"
16585         then
16586                 ac_ext=cc
16587 ac_cpp='$CXXCPP $CPPFLAGS'
16588 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16589 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16590 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16591 ac_main_return="return"
16592
16593 echo "$as_me:16593: checking if $CXX -fvisibility=hidden option works" >&5
16594 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16595 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16596   echo $ECHO_N "(cached) $ECHO_C" >&6
16597 else
16598
16599     cf_save_cflags="$CXXFLAGS"
16600     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16601     cat >"conftest.$ac_ext" <<_ACEOF
16602 #line 16602 "configure"
16603 #include "confdefs.h"
16604
16605 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16606
16607 int
16608 main (void)
16609 {
16610
16611         if (somefunc()) return 1;
16612
16613   ;
16614   return 0;
16615 }
16616 _ACEOF
16617 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16618 if { (eval echo "$as_me:16618: \"$ac_link\"") >&5
16619   (eval $ac_link) 2>&5
16620   ac_status=$?
16621   echo "$as_me:16621: \$? = $ac_status" >&5
16622   (exit "$ac_status"); } &&
16623          { ac_try='test -s "conftest$ac_exeext"'
16624   { (eval echo "$as_me:16624: \"$ac_try\"") >&5
16625   (eval $ac_try) 2>&5
16626   ac_status=$?
16627   echo "$as_me:16627: \$? = $ac_status" >&5
16628   (exit "$ac_status"); }; }; then
16629   cf_cv_fvisibility_hidden2=yes
16630 else
16631   echo "$as_me: failed program was:" >&5
16632 cat "conftest.$ac_ext" >&5
16633 cf_cv_fvisibility_hidden2=no
16634 fi
16635 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16636     CXXFLAGS=$cf_save_cflags
16637
16638 fi
16639 echo "$as_me:16639: result: $cf_cv_fvisibility_hidden2" >&5
16640 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16641
16642                 if test "x$cf_cv_fvisibility_hidden2" = xyes
16643                 then
16644
16645 cf_save_CXXFLAGS="$CFLAGS"
16646 CFLAGS="$CXXFLAGS"
16647
16648 cf_fix_cppflags=no
16649 cf_new_cflags=
16650 cf_new_cppflags=
16651 cf_new_extra_cppflags=
16652
16653 for cf_add_cflags in -fvisibility=hidden
16654 do
16655 case "$cf_fix_cppflags" in
16656 (no)
16657         case "$cf_add_cflags" in
16658         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16659                 case "$cf_add_cflags" in
16660                 (-D*)
16661                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16662
16663                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16664                                 && test -z "${cf_tst_cflags}" \
16665                                 && cf_fix_cppflags=yes
16666
16667                         if test "$cf_fix_cppflags" = yes ; then
16668
16669         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16670         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16671
16672                                 continue
16673                         elif test "${cf_tst_cflags}" = "\"'" ; then
16674
16675         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16676         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16677
16678                                 continue
16679                         fi
16680                         ;;
16681                 esac
16682                 case "$CPPFLAGS" in
16683                 (*$cf_add_cflags)
16684                         ;;
16685                 (*)
16686                         case "$cf_add_cflags" in
16687                         (-D*)
16688                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16689
16690 CPPFLAGS=`echo "$CPPFLAGS" | \
16691         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16692                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16693
16694                                 ;;
16695                         esac
16696
16697         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16698         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16699
16700                         ;;
16701                 esac
16702                 ;;
16703         (*)
16704
16705         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16706         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16707
16708                 ;;
16709         esac
16710         ;;
16711 (yes)
16712
16713         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16714         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16715
16716         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16717
16718         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16719                 && test -z "${cf_tst_cflags}" \
16720                 && cf_fix_cppflags=no
16721         ;;
16722 esac
16723 done
16724
16725 if test -n "$cf_new_cflags" ; then
16726
16727         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16728         CFLAGS="${CFLAGS}$cf_new_cflags"
16729
16730 fi
16731
16732 if test -n "$cf_new_cppflags" ; then
16733
16734         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16735         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16736
16737 fi
16738
16739 if test -n "$cf_new_extra_cppflags" ; then
16740
16741         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16742         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16743
16744 fi
16745
16746 CXXFLAGS="$CFLAGS"
16747 CFLAGS="$cf_save_CXXFLAGS"
16748
16749                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16750                 fi
16751                 ac_ext=c
16752 ac_cpp='$CPP $CPPFLAGS'
16753 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16754 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16755 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16756 ac_main_return="return"
16757
16758         fi
16759 fi
16760
16761 ###   use option --enable-interop to turn on use of bindings used for interop
16762 echo "$as_me:16762: checking if you want interop bindings" >&5
16763 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16764
16765 # Check whether --enable-interop or --disable-interop was given.
16766 if test "${enable_interop+set}" = set; then
16767   enableval="$enable_interop"
16768   with_exp_interop=$enableval
16769 else
16770   with_exp_interop=$cf_dft_interop
16771 fi;
16772 echo "$as_me:16772: result: $with_exp_interop" >&5
16773 echo "${ECHO_T}$with_exp_interop" >&6
16774
16775 NCURSES_INTEROP_FUNCS=0
16776 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16777
16778 echo "$as_me:16778: checking if you want experimental safe-sprintf code" >&5
16779 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16780
16781 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16782 if test "${enable_safe_sprintf+set}" = set; then
16783   enableval="$enable_safe_sprintf"
16784   with_safe_sprintf=$enableval
16785 else
16786   with_safe_sprintf=no
16787 fi;
16788 echo "$as_me:16788: result: $with_safe_sprintf" >&5
16789 echo "${ECHO_T}$with_safe_sprintf" >&6
16790
16791 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16792 # when hashmap is used scroll hints are useless
16793 if test "$with_hashmap" = no ; then
16794 echo "$as_me:16794: checking if you want to experiment without scrolling-hints code" >&5
16795 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16796
16797 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16798 if test "${enable_scroll_hints+set}" = set; then
16799   enableval="$enable_scroll_hints"
16800   with_scroll_hints=$enableval
16801 else
16802   with_scroll_hints=yes
16803 fi;
16804 echo "$as_me:16804: result: $with_scroll_hints" >&5
16805 echo "${ECHO_T}$with_scroll_hints" >&6
16806 test "x$with_scroll_hints" = xyes &&
16807 cat >>confdefs.h <<\EOF
16808 #define USE_SCROLL_HINTS 1
16809 EOF
16810
16811 fi
16812
16813 echo "$as_me:16813: checking if you want wgetch-events code" >&5
16814 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16815
16816 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16817 if test "${enable_wgetch_events+set}" = set; then
16818   enableval="$enable_wgetch_events"
16819   with_wgetch_events=$enableval
16820 else
16821   with_wgetch_events=no
16822 fi;
16823 echo "$as_me:16823: result: $with_wgetch_events" >&5
16824 echo "${ECHO_T}$with_wgetch_events" >&6
16825 if test "x$with_wgetch_events" = xyes ; then
16826
16827 cat >>confdefs.h <<\EOF
16828 #define NCURSES_WGETCH_EVENTS 1
16829 EOF
16830
16831         NCURSES_WGETCH_EVENTS=1
16832 else
16833         NCURSES_WGETCH_EVENTS=0
16834 fi
16835
16836 case "$cf_cv_system_name" in
16837 (*mingw32*|*mingw64*|*-msvc*)
16838         echo "$as_me:16838: checking if you want experimental-Windows driver" >&5
16839 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16840
16841 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16842 if test "${enable_exp_win32+set}" = set; then
16843   enableval="$enable_exp_win32"
16844   with_exp_win32=$enableval
16845 else
16846   with_exp_win32=no
16847 fi;
16848         echo "$as_me:16848: result: $with_exp_win32" >&5
16849 echo "${ECHO_T}$with_exp_win32" >&6
16850         if test "x$with_exp_win32" = xyes
16851         then
16852
16853 cat >>confdefs.h <<\EOF
16854 #define EXP_WIN32_DRIVER 1
16855 EOF
16856
16857                 EXP_WIN32_DRIVER=1
16858                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16859         else
16860                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16861                 EXP_WIN32_DRIVER=0
16862         fi
16863         ;;
16864 (*)
16865         EXP_WIN32_DRIVER=0
16866         INTERNALS_HDR=
16867         ;;
16868 esac
16869
16870 ###############################################################################
16871
16872 ###     use option --disable-echo to suppress full display compiling commands
16873
16874 echo "$as_me:16874: checking if you want to see long compiling messages" >&5
16875 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16876
16877 # Check whether --enable-echo or --disable-echo was given.
16878 if test "${enable_echo+set}" = set; then
16879   enableval="$enable_echo"
16880   test "$enableval" != no && enableval=yes
16881         if test "$enableval" != "yes" ; then
16882
16883         ECHO_LT='--silent'
16884         ECHO_LD='@echo linking $@;'
16885         RULE_CC='@echo compiling $<'
16886         SHOW_CC='@echo compiling $@'
16887         ECHO_CC='@'
16888
16889         else
16890
16891         ECHO_LT=''
16892         ECHO_LD=''
16893         RULE_CC=''
16894         SHOW_CC=''
16895         ECHO_CC=''
16896
16897         fi
16898 else
16899   enableval=yes
16900
16901         ECHO_LT=''
16902         ECHO_LD=''
16903         RULE_CC=''
16904         SHOW_CC=''
16905         ECHO_CC=''
16906
16907 fi;
16908 echo "$as_me:16908: result: $enableval" >&5
16909 echo "${ECHO_T}$enableval" >&6
16910
16911 if test "x$enable_echo" = xyes; then
16912         ECHO_LINK=
16913 else
16914         ECHO_LINK='@ echo linking $@ ... ;'
16915         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16916         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16917 fi
16918
16919 # --disable-stripping is used for debugging
16920
16921 echo "$as_me:16921: checking if you want to install stripped executables" >&5
16922 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16923
16924 # Check whether --enable-stripping or --disable-stripping was given.
16925 if test "${enable_stripping+set}" = set; then
16926   enableval="$enable_stripping"
16927   test "$enableval" != no && enableval=yes
16928         if test "$enableval" != "yes" ; then
16929     enable_stripping=no
16930         else
16931                 enable_stripping=yes
16932         fi
16933 else
16934   enableval=yes
16935         enable_stripping=yes
16936
16937 fi;
16938 echo "$as_me:16938: result: $enable_stripping" >&5
16939 echo "${ECHO_T}$enable_stripping" >&6
16940
16941 if test "$enable_stripping" = yes
16942 then
16943         INSTALL_OPT_S="-s"
16944 else
16945         INSTALL_OPT_S=
16946 fi
16947
16948 : "${INSTALL:=install}"
16949 echo "$as_me:16949: checking if install accepts -p option" >&5
16950 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16951 if test "${cf_cv_install_p+set}" = set; then
16952   echo $ECHO_N "(cached) $ECHO_C" >&6
16953 else
16954
16955         rm -rf ./conftest*
16956         date >conftest.in
16957         mkdir conftest.out
16958         sleep 3
16959         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16960         then
16961                 if test -f conftest.out/conftest.in
16962                 then
16963                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16964                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16965                         if test -s conftest.err
16966                         then
16967                                 cf_cv_install_p=no
16968                         else
16969                                 cf_cv_install_p=yes
16970                         fi
16971                 else
16972                         cf_cv_install_p=no
16973                 fi
16974         else
16975                 cf_cv_install_p=no
16976         fi
16977         rm -rf ./conftest*
16978
16979 fi
16980 echo "$as_me:16980: result: $cf_cv_install_p" >&5
16981 echo "${ECHO_T}$cf_cv_install_p" >&6
16982
16983 echo "$as_me:16983: checking if install needs to be told about ownership" >&5
16984 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16985 case `$ac_config_guess` in
16986 (*minix)
16987         with_install_o=yes
16988         ;;
16989 (*)
16990         with_install_o=no
16991         ;;
16992 esac
16993
16994 echo "$as_me:16994: result: $with_install_o" >&5
16995 echo "${ECHO_T}$with_install_o" >&6
16996 if test "x$with_install_o" = xyes
16997 then
16998         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'`"
16999 else
17000         INSTALL_OPT_O=
17001 fi
17002
17003 # If we're avoiding relinking of shared libraries during install, that is to
17004 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
17005 # the install program has "-p" (for preserving timestamps).
17006 cf_cv_do_reranlib=yes
17007 if test "x$cf_cv_install_p" = xyes
17008 then
17009         if test "x$cf_cv_do_relink" != xyes
17010         then
17011                 cf_cv_do_reranlib=no
17012                 INSTALL_OPT_P="-p"
17013                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
17014         fi
17015 fi
17016
17017 ###     use option --enable-warnings to turn on all gcc warnings
17018
17019 echo "$as_me:17019: checking if you want to use C11 _Noreturn feature" >&5
17020 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
17021
17022 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
17023 if test "${enable_stdnoreturn+set}" = set; then
17024   enableval="$enable_stdnoreturn"
17025   test "$enableval" != yes && enableval=no
17026         if test "$enableval" != "no" ; then
17027     enable_stdnoreturn=yes
17028         else
17029                 enable_stdnoreturn=no
17030         fi
17031 else
17032   enableval=no
17033         enable_stdnoreturn=no
17034
17035 fi;
17036 echo "$as_me:17036: result: $enable_stdnoreturn" >&5
17037 echo "${ECHO_T}$enable_stdnoreturn" >&6
17038
17039 if test $enable_stdnoreturn = yes; then
17040 echo "$as_me:17040: checking for C11 _Noreturn feature" >&5
17041 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
17042 if test "${cf_cv_c11_noreturn+set}" = set; then
17043   echo $ECHO_N "(cached) $ECHO_C" >&6
17044 else
17045   cat >"conftest.$ac_ext" <<_ACEOF
17046 #line 17046 "configure"
17047 #include "confdefs.h"
17048
17049 #include <stdio.h>
17050 #include <stdlib.h>
17051 #include <stdnoreturn.h>
17052 static _Noreturn void giveup(void) { exit(0); }
17053
17054 int
17055 main (void)
17056 {
17057 if (feof(stdin)) giveup()
17058   ;
17059   return 0;
17060 }
17061 _ACEOF
17062 rm -f "conftest.$ac_objext"
17063 if { (eval echo "$as_me:17063: \"$ac_compile\"") >&5
17064   (eval $ac_compile) 2>&5
17065   ac_status=$?
17066   echo "$as_me:17066: \$? = $ac_status" >&5
17067   (exit "$ac_status"); } &&
17068          { ac_try='test -s "conftest.$ac_objext"'
17069   { (eval echo "$as_me:17069: \"$ac_try\"") >&5
17070   (eval $ac_try) 2>&5
17071   ac_status=$?
17072   echo "$as_me:17072: \$? = $ac_status" >&5
17073   (exit "$ac_status"); }; }; then
17074   cf_cv_c11_noreturn=yes
17075 else
17076   echo "$as_me: failed program was:" >&5
17077 cat "conftest.$ac_ext" >&5
17078 cf_cv_c11_noreturn=no
17079 fi
17080 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17081
17082 fi
17083 echo "$as_me:17083: result: $cf_cv_c11_noreturn" >&5
17084 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
17085 else
17086         cf_cv_c11_noreturn=no,
17087 fi
17088
17089 if test "$cf_cv_c11_noreturn" = yes; then
17090
17091 cat >>confdefs.h <<\EOF
17092 #define HAVE_STDNORETURN_H 1
17093 EOF
17094
17095 cat >>confdefs.h <<EOF
17096 #define STDC_NORETURN _Noreturn
17097 EOF
17098
17099         HAVE_STDNORETURN_H=1
17100 else
17101         HAVE_STDNORETURN_H=0
17102 fi
17103
17104 if test "$GCC" = yes || test "$GXX" = yes
17105 then
17106
17107 if test "$GCC" = yes || test "$GXX" = yes
17108 then
17109         case $CFLAGS in
17110         (*-Werror=*)
17111                 cf_temp_flags=
17112                 for cf_temp_scan in $CFLAGS
17113                 do
17114                         case "x$cf_temp_scan" in
17115                         (x-Werror=format*)
17116
17117         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17118         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17119
17120                                 ;;
17121                         (x-Werror=*)
17122
17123         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17124         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17125
17126                                 ;;
17127                         (*)
17128
17129         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17130         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17131
17132                                 ;;
17133                         esac
17134                 done
17135                 if test "x$CFLAGS" != "x$cf_temp_flags"
17136                 then
17137                         test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
17138
17139 echo "${as_me:-configure}:17139: testing repairing CFLAGS: $CFLAGS ..." 1>&5
17140
17141                         CFLAGS="$cf_temp_flags"
17142                         test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
17143
17144 echo "${as_me:-configure}:17144: testing ... fixed $CFLAGS ..." 1>&5
17145
17146                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17147
17148 echo "${as_me:-configure}:17148: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17149
17150                 fi
17151                 ;;
17152         esac
17153 fi
17154
17155 if test "$GCC" = yes || test "$GXX" = yes
17156 then
17157         case $CPPFLAGS in
17158         (*-Werror=*)
17159                 cf_temp_flags=
17160                 for cf_temp_scan in $CPPFLAGS
17161                 do
17162                         case "x$cf_temp_scan" in
17163                         (x-Werror=format*)
17164
17165         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17166         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17167
17168                                 ;;
17169                         (x-Werror=*)
17170
17171         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17172         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17173
17174                                 ;;
17175                         (*)
17176
17177         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17178         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17179
17180                                 ;;
17181                         esac
17182                 done
17183                 if test "x$CPPFLAGS" != "x$cf_temp_flags"
17184                 then
17185                         test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
17186
17187 echo "${as_me:-configure}:17187: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
17188
17189                         CPPFLAGS="$cf_temp_flags"
17190                         test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
17191
17192 echo "${as_me:-configure}:17192: testing ... fixed $CPPFLAGS ..." 1>&5
17193
17194                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17195
17196 echo "${as_me:-configure}:17196: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17197
17198                 fi
17199                 ;;
17200         esac
17201 fi
17202
17203 if test "$GCC" = yes || test "$GXX" = yes
17204 then
17205         case $LDFLAGS in
17206         (*-Werror=*)
17207                 cf_temp_flags=
17208                 for cf_temp_scan in $LDFLAGS
17209                 do
17210                         case "x$cf_temp_scan" in
17211                         (x-Werror=format*)
17212
17213         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17214         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17215
17216                                 ;;
17217                         (x-Werror=*)
17218
17219         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17220         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17221
17222                                 ;;
17223                         (*)
17224
17225         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17226         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17227
17228                                 ;;
17229                         esac
17230                 done
17231                 if test "x$LDFLAGS" != "x$cf_temp_flags"
17232                 then
17233                         test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
17234
17235 echo "${as_me:-configure}:17235: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
17236
17237                         LDFLAGS="$cf_temp_flags"
17238                         test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
17239
17240 echo "${as_me:-configure}:17240: testing ... fixed $LDFLAGS ..." 1>&5
17241
17242                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17243
17244 echo "${as_me:-configure}:17244: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17245
17246                 fi
17247                 ;;
17248         esac
17249 fi
17250
17251 echo "$as_me:17251: checking if you want to turn on gcc warnings" >&5
17252 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
17253
17254 # Check whether --enable-warnings or --disable-warnings was given.
17255 if test "${enable_warnings+set}" = set; then
17256   enableval="$enable_warnings"
17257   test "$enableval" != yes && enableval=no
17258         if test "$enableval" != "no" ; then
17259     enable_warnings=yes
17260         else
17261                 enable_warnings=no
17262         fi
17263 else
17264   enableval=no
17265         enable_warnings=no
17266
17267 fi;
17268 echo "$as_me:17268: result: $enable_warnings" >&5
17269 echo "${ECHO_T}$enable_warnings" >&6
17270 if test "$enable_warnings" = "yes"
17271 then
17272
17273 if test "x$have_x" = xyes; then
17274
17275 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
17276 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
17277 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
17278 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
17279 for cf_X_CFLAGS in $X_CFLAGS
17280 do
17281         case "x$cf_X_CFLAGS" in
17282         x-[IUD]*)
17283                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
17284                 ;;
17285         *)
17286                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
17287                 ;;
17288         esac
17289 done
17290
17291 cat >"conftest.$ac_ext" <<_ACEOF
17292 #line 17292 "configure"
17293 #include "confdefs.h"
17294
17295 #include <stdlib.h>
17296 #include <X11/Intrinsic.h>
17297
17298 int
17299 main (void)
17300 {
17301 String foo = malloc(1); free((void*)foo)
17302   ;
17303   return 0;
17304 }
17305 _ACEOF
17306 rm -f "conftest.$ac_objext"
17307 if { (eval echo "$as_me:17307: \"$ac_compile\"") >&5
17308   (eval $ac_compile) 2>&5
17309   ac_status=$?
17310   echo "$as_me:17310: \$? = $ac_status" >&5
17311   (exit "$ac_status"); } &&
17312          { ac_try='test -s "conftest.$ac_objext"'
17313   { (eval echo "$as_me:17313: \"$ac_try\"") >&5
17314   (eval $ac_try) 2>&5
17315   ac_status=$?
17316   echo "$as_me:17316: \$? = $ac_status" >&5
17317   (exit "$ac_status"); }; }; then
17318
17319 echo "$as_me:17319: checking for X11/Xt const-feature" >&5
17320 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
17321 if test "${cf_cv_const_x_string+set}" = set; then
17322   echo $ECHO_N "(cached) $ECHO_C" >&6
17323 else
17324
17325         cat >"conftest.$ac_ext" <<_ACEOF
17326 #line 17326 "configure"
17327 #include "confdefs.h"
17328
17329 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
17330 #undef  XTSTRINGDEFINES /* X11R5 and later */
17331 #include <stdlib.h>
17332 #include <X11/Intrinsic.h>
17333
17334 int
17335 main (void)
17336 {
17337 String foo = malloc(1); *foo = 0
17338   ;
17339   return 0;
17340 }
17341 _ACEOF
17342 rm -f "conftest.$ac_objext"
17343 if { (eval echo "$as_me:17343: \"$ac_compile\"") >&5
17344   (eval $ac_compile) 2>&5
17345   ac_status=$?
17346   echo "$as_me:17346: \$? = $ac_status" >&5
17347   (exit "$ac_status"); } &&
17348          { ac_try='test -s "conftest.$ac_objext"'
17349   { (eval echo "$as_me:17349: \"$ac_try\"") >&5
17350   (eval $ac_try) 2>&5
17351   ac_status=$?
17352   echo "$as_me:17352: \$? = $ac_status" >&5
17353   (exit "$ac_status"); }; }; then
17354
17355                         cf_cv_const_x_string=no
17356
17357 else
17358   echo "$as_me: failed program was:" >&5
17359 cat "conftest.$ac_ext" >&5
17360
17361                         cf_cv_const_x_string=yes
17362
17363 fi
17364 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17365
17366 fi
17367 echo "$as_me:17367: result: $cf_cv_const_x_string" >&5
17368 echo "${ECHO_T}$cf_cv_const_x_string" >&6
17369
17370 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
17371 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
17372 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
17373
17374 case "$cf_cv_const_x_string" in
17375 (no)
17376
17377         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17378         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
17379
17380         ;;
17381 (*)
17382
17383         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17384         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
17385
17386         ;;
17387 esac
17388
17389 else
17390   echo "$as_me: failed program was:" >&5
17391 cat "conftest.$ac_ext" >&5
17392 fi
17393 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17394  fi
17395 cat > "conftest.$ac_ext" <<EOF
17396 #line 17396 "${as_me:-configure}"
17397 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17398 EOF
17399 if test "$INTEL_COMPILER" = yes
17400 then
17401 # The "-wdXXX" options suppress warnings:
17402 # remark #1419: external declaration in primary source file
17403 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17404 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17405 # remark #193: zero used for undefined preprocessing identifier
17406 # remark #593: variable "curs_sb_left_arrow" was set but never used
17407 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17408 # remark #869: parameter "tw" was never referenced
17409 # remark #981: operands are evaluated in unspecified order
17410 # warning #279: controlling expression is constant
17411
17412         { echo "$as_me:17412: checking for $CC warning options..." >&5
17413 echo "$as_me: checking for $CC warning options..." >&6;}
17414         cf_save_CFLAGS="$CFLAGS"
17415         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
17416         for cf_opt in \
17417                 wd1419 \
17418                 wd1683 \
17419                 wd1684 \
17420                 wd193 \
17421                 wd593 \
17422                 wd279 \
17423                 wd810 \
17424                 wd869 \
17425                 wd981
17426         do
17427                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17428                 if { (eval echo "$as_me:17428: \"$ac_compile\"") >&5
17429   (eval $ac_compile) 2>&5
17430   ac_status=$?
17431   echo "$as_me:17431: \$? = $ac_status" >&5
17432   (exit "$ac_status"); }; then
17433                         test -n "$verbose" && echo "$as_me:17433: result: ... -$cf_opt" >&5
17434 echo "${ECHO_T}... -$cf_opt" >&6
17435                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17436                 fi
17437         done
17438         CFLAGS="$cf_save_CFLAGS"
17439 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
17440 then
17441         { echo "$as_me:17441: checking for $CC warning options..." >&5
17442 echo "$as_me: checking for $CC warning options..." >&6;}
17443         cf_save_CFLAGS="$CFLAGS"
17444         cf_warn_CONST=""
17445         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17446         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17447         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17448         for cf_opt in W Wall \
17449                 Wbad-function-cast \
17450                 Wcast-align \
17451                 Wcast-qual \
17452                 Wdeclaration-after-statement \
17453                 Wextra \
17454                 Winline \
17455                 Wmissing-declarations \
17456                 Wmissing-prototypes \
17457                 Wnested-externs \
17458                 Wpointer-arith \
17459                 Wshadow \
17460                 Wstrict-prototypes \
17461                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
17462         do
17463                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17464                 if { (eval echo "$as_me:17464: \"$ac_compile\"") >&5
17465   (eval $ac_compile) 2>&5
17466   ac_status=$?
17467   echo "$as_me:17467: \$? = $ac_status" >&5
17468   (exit "$ac_status"); }; then
17469                         test -n "$verbose" && echo "$as_me:17469: result: ... -$cf_opt" >&5
17470 echo "${ECHO_T}... -$cf_opt" >&6
17471                         case "$cf_opt" in
17472                         (Winline)
17473                                 case "$GCC_VERSION" in
17474                                 ([34].*)
17475                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17476
17477 echo "${as_me:-configure}:17477: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17478
17479                                         continue;;
17480                                 esac
17481                                 ;;
17482                         (Wpointer-arith)
17483                                 case "$GCC_VERSION" in
17484                                 ([12].*)
17485                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17486
17487 echo "${as_me:-configure}:17487: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17488
17489                                         continue;;
17490                                 esac
17491                                 ;;
17492                         esac
17493                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17494                 fi
17495         done
17496         CFLAGS="$cf_save_CFLAGS"
17497 fi
17498 rm -rf ./conftest*
17499
17500 fi
17501
17502 if test "$GCC" = yes || test "$GXX" = yes
17503 then
17504 cat > conftest.i <<EOF
17505 #ifndef GCC_PRINTF
17506 #define GCC_PRINTF 0
17507 #endif
17508 #ifndef GCC_SCANF
17509 #define GCC_SCANF 0
17510 #endif
17511 #ifndef GCC_NORETURN
17512 #define GCC_NORETURN /* nothing */
17513 #endif
17514 #ifndef GCC_UNUSED
17515 #define GCC_UNUSED /* nothing */
17516 #endif
17517 EOF
17518 if test "$GCC" = yes
17519 then
17520         { echo "$as_me:17520: checking for $CC __attribute__ directives..." >&5
17521 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
17522 cat > "conftest.$ac_ext" <<EOF
17523 #line 17523 "${as_me:-configure}"
17524 #include <stdio.h>
17525 #include "confdefs.h"
17526 #include "conftest.h"
17527 #include "conftest.i"
17528 #if     GCC_PRINTF
17529 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17530 #else
17531 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17532 #endif
17533 #if     GCC_SCANF
17534 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
17535 #else
17536 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
17537 #endif
17538 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17539 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
17540 extern GCC_NORETURN void foo(void);
17541 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
17542 EOF
17543         cf_printf_attribute=no
17544         cf_scanf_attribute=no
17545         for cf_attribute in scanf printf unused noreturn
17546         do
17547
17548 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17549
17550                 cf_directive="__attribute__(($cf_attribute))"
17551                 echo "checking for $CC $cf_directive" 1>&5
17552
17553                 case "$cf_attribute" in
17554                 (printf)
17555                         cf_printf_attribute=yes
17556                         cat >conftest.h <<EOF
17557 #define GCC_$cf_ATTRIBUTE 1
17558 EOF
17559                         ;;
17560                 (scanf)
17561                         cf_scanf_attribute=yes
17562                         cat >conftest.h <<EOF
17563 #define GCC_$cf_ATTRIBUTE 1
17564 EOF
17565                         ;;
17566                 (*)
17567                         cat >conftest.h <<EOF
17568 #define GCC_$cf_ATTRIBUTE $cf_directive
17569 EOF
17570                         ;;
17571                 esac
17572
17573                 if { (eval echo "$as_me:17573: \"$ac_compile\"") >&5
17574   (eval $ac_compile) 2>&5
17575   ac_status=$?
17576   echo "$as_me:17576: \$? = $ac_status" >&5
17577   (exit "$ac_status"); }; then
17578                         test -n "$verbose" && echo "$as_me:17578: result: ... $cf_attribute" >&5
17579 echo "${ECHO_T}... $cf_attribute" >&6
17580                         cat conftest.h >>confdefs.h
17581                         case "$cf_attribute" in
17582                         (noreturn)
17583
17584 cat >>confdefs.h <<EOF
17585 #define GCC_NORETURN $cf_directive
17586 EOF
17587
17588                                 ;;
17589                         (printf)
17590                                 cf_value='/* nothing */'
17591                                 if test "$cf_printf_attribute" != no ; then
17592                                         cf_value='__attribute__((format(printf,fmt,var)))'
17593
17594 cat >>confdefs.h <<\EOF
17595 #define GCC_PRINTF 1
17596 EOF
17597
17598                                 fi
17599
17600 cat >>confdefs.h <<EOF
17601 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17602 EOF
17603
17604                                 ;;
17605                         (scanf)
17606                                 cf_value='/* nothing */'
17607                                 if test "$cf_scanf_attribute" != no ; then
17608                                         cf_value='__attribute__((format(scanf,fmt,var)))'
17609
17610 cat >>confdefs.h <<\EOF
17611 #define GCC_SCANF 1
17612 EOF
17613
17614                                 fi
17615
17616 cat >>confdefs.h <<EOF
17617 #define GCC_SCANFLIKE(fmt,var) $cf_value
17618 EOF
17619
17620                                 ;;
17621                         (unused)
17622
17623 cat >>confdefs.h <<EOF
17624 #define GCC_UNUSED $cf_directive
17625 EOF
17626
17627                                 ;;
17628                         esac
17629                 fi
17630         done
17631 else
17632         ${FGREP-fgrep} define conftest.i >>confdefs.h
17633 fi
17634 rm -rf ./conftest*
17635 fi
17636
17637 fi
17638
17639 if test "x$enable_warnings" = "xyes"; then
17640
17641         ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
17642
17643         if test "x$cf_with_cxx" = xyes ; then
17644
17645 INTEL_CPLUSPLUS=no
17646
17647 if test "$GCC" = yes ; then
17648         case "$host_os" in
17649         (linux*|gnu*)
17650                 echo "$as_me:17650: checking if this is really Intel C++ compiler" >&5
17651 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
17652                 cf_save_CFLAGS="$CXXFLAGS"
17653                 CXXFLAGS="$CXXFLAGS -no-gcc"
17654                 cat >"conftest.$ac_ext" <<_ACEOF
17655 #line 17655 "configure"
17656 #include "confdefs.h"
17657
17658 int
17659 main (void)
17660 {
17661
17662 #ifdef __INTEL_COMPILER
17663 #else
17664 make an error
17665 #endif
17666
17667   ;
17668   return 0;
17669 }
17670 _ACEOF
17671 rm -f "conftest.$ac_objext"
17672 if { (eval echo "$as_me:17672: \"$ac_compile\"") >&5
17673   (eval $ac_compile) 2>&5
17674   ac_status=$?
17675   echo "$as_me:17675: \$? = $ac_status" >&5
17676   (exit "$ac_status"); } &&
17677          { ac_try='test -s "conftest.$ac_objext"'
17678   { (eval echo "$as_me:17678: \"$ac_try\"") >&5
17679   (eval $ac_try) 2>&5
17680   ac_status=$?
17681   echo "$as_me:17681: \$? = $ac_status" >&5
17682   (exit "$ac_status"); }; }; then
17683   INTEL_CPLUSPLUS=yes
17684 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17685
17686 else
17687   echo "$as_me: failed program was:" >&5
17688 cat "conftest.$ac_ext" >&5
17689 fi
17690 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17691                 CXXFLAGS="$cf_save_CFLAGS"
17692                 echo "$as_me:17692: result: $INTEL_CPLUSPLUS" >&5
17693 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17694                 ;;
17695         esac
17696 fi
17697
17698 CLANG_CPLUSPLUS=no
17699
17700 if test "$GCC" = yes ; then
17701         echo "$as_me:17701: checking if this is really Clang C++ compiler" >&5
17702 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17703         cf_save_CFLAGS="$CXXFLAGS"
17704         cat >"conftest.$ac_ext" <<_ACEOF
17705 #line 17705 "configure"
17706 #include "confdefs.h"
17707
17708 int
17709 main (void)
17710 {
17711
17712 #ifdef __clang__
17713 #else
17714 make an error
17715 #endif
17716
17717   ;
17718   return 0;
17719 }
17720 _ACEOF
17721 rm -f "conftest.$ac_objext"
17722 if { (eval echo "$as_me:17722: \"$ac_compile\"") >&5
17723   (eval $ac_compile) 2>&5
17724   ac_status=$?
17725   echo "$as_me:17725: \$? = $ac_status" >&5
17726   (exit "$ac_status"); } &&
17727          { ac_try='test -s "conftest.$ac_objext"'
17728   { (eval echo "$as_me:17728: \"$ac_try\"") >&5
17729   (eval $ac_try) 2>&5
17730   ac_status=$?
17731   echo "$as_me:17731: \$? = $ac_status" >&5
17732   (exit "$ac_status"); }; }; then
17733   CLANG_CPLUSPLUS=yes
17734
17735 else
17736   echo "$as_me: failed program was:" >&5
17737 cat "conftest.$ac_ext" >&5
17738 fi
17739 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17740         CXXFLAGS="$cf_save_CFLAGS"
17741         echo "$as_me:17741: result: $CLANG_CPLUSPLUS" >&5
17742 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17743 fi
17744
17745 CLANG_VERSION=none
17746
17747 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17748         case "$CC" in
17749         (c[1-9][0-9]|*/c[1-9][0-9])
17750                 { echo "$as_me:17750: WARNING: replacing broken compiler alias $CC" >&5
17751 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17752                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17753                 CC=clang
17754                 ;;
17755         esac
17756
17757         echo "$as_me:17757: checking version of $CC" >&5
17758 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17759         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.].*//'`"
17760         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17761         echo "$as_me:17761: result: $CLANG_VERSION" >&5
17762 echo "${ECHO_T}$CLANG_VERSION" >&6
17763
17764         for cf_clang_opt in \
17765                 -Qunused-arguments \
17766                 -Wno-error=implicit-function-declaration
17767         do
17768                 echo "$as_me:17768: checking if option $cf_clang_opt works" >&5
17769 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17770                 cf_save_CFLAGS="$CFLAGS"
17771                 CFLAGS="$CFLAGS $cf_clang_opt"
17772                 cat >"conftest.$ac_ext" <<_ACEOF
17773 #line 17773 "configure"
17774 #include "confdefs.h"
17775
17776                         #include <stdio.h>
17777 int
17778 main (void)
17779 {
17780
17781                         printf("hello!\\n");
17782   ;
17783   return 0;
17784 }
17785 _ACEOF
17786 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17787 if { (eval echo "$as_me:17787: \"$ac_link\"") >&5
17788   (eval $ac_link) 2>&5
17789   ac_status=$?
17790   echo "$as_me:17790: \$? = $ac_status" >&5
17791   (exit "$ac_status"); } &&
17792          { ac_try='test -s "conftest$ac_exeext"'
17793   { (eval echo "$as_me:17793: \"$ac_try\"") >&5
17794   (eval $ac_try) 2>&5
17795   ac_status=$?
17796   echo "$as_me:17796: \$? = $ac_status" >&5
17797   (exit "$ac_status"); }; }; then
17798
17799                         cf_clang_optok=yes
17800 else
17801   echo "$as_me: failed program was:" >&5
17802 cat "conftest.$ac_ext" >&5
17803
17804                         cf_clang_optok=no
17805 fi
17806 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17807                 echo "$as_me:17807: result: $cf_clang_optok" >&5
17808 echo "${ECHO_T}$cf_clang_optok" >&6
17809                 CFLAGS="$cf_save_CFLAGS"
17810                 if test "$cf_clang_optok" = yes; then
17811                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17812
17813 echo "${as_me:-configure}:17813: testing adding option $cf_clang_opt ..." 1>&5
17814
17815         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17816         CFLAGS="${CFLAGS}$cf_clang_opt"
17817
17818                 fi
17819         done
17820 fi
17821
17822 ac_ext=cc
17823 ac_cpp='$CXXCPP $CPPFLAGS'
17824 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17825 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17826 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17827 ac_main_return="return"
17828
17829 cat > conftest.$ac_ext <<EOF
17830 #line 17830 "configure"
17831 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17832 EOF
17833
17834 if test "$INTEL_CPLUSPLUS" = yes
17835 then
17836 # The "-wdXXX" options suppress warnings:
17837 # remark #1419: external declaration in primary source file
17838 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17839 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17840 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17841 # remark #193: zero used for undefined preprocessing identifier
17842 # remark #593: variable "curs_sb_left_arrow" was set but never used
17843 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17844 # remark #869: parameter "tw" was never referenced
17845 # remark #981: operands are evaluated in unspecified order
17846 # warning #269: invalid format string conversion
17847
17848         { echo "$as_me:17848: checking for $CC warning options..." >&5
17849 echo "$as_me: checking for $CC warning options..." >&6;}
17850         cf_save_CXXFLAGS="$CXXFLAGS"
17851         EXTRA_CXXFLAGS="-Wall"
17852         for cf_opt in \
17853                 wd1419 \
17854                 wd1682 \
17855                 wd1683 \
17856                 wd1684 \
17857                 wd193 \
17858                 wd279 \
17859                 wd593 \
17860                 wd810 \
17861                 wd869 \
17862                 wd981
17863         do
17864                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17865                 if { (eval echo "$as_me:17865: \"$ac_compile\"") >&5
17866   (eval $ac_compile) 2>&5
17867   ac_status=$?
17868   echo "$as_me:17868: \$? = $ac_status" >&5
17869   (exit "$ac_status"); }; then
17870                         test -n "$verbose" && echo "$as_me:17870: result: ... -$cf_opt" >&5
17871 echo "${ECHO_T}... -$cf_opt" >&6
17872                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17873                 fi
17874         done
17875         CXXFLAGS="$cf_save_CXXFLAGS"
17876
17877 elif test "$GXX" = yes
17878 then
17879         { echo "$as_me:17879: checking for $CXX warning options..." >&5
17880 echo "$as_me: checking for $CXX warning options..." >&6;}
17881         cf_save_CXXFLAGS="$CXXFLAGS"
17882         EXTRA_CXXFLAGS="-W -Wall"
17883         cf_gxx_extra_warnings=""
17884         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17885         case "$GXX_VERSION" in
17886         ([1-2].*)
17887                 ;;
17888         (*)
17889                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17890                 ;;
17891         esac
17892         for cf_opt in \
17893                 Wabi \
17894                 fabi-version=0 \
17895                 Wextra \
17896                 Wignored-qualifiers \
17897                 Wlogical-op \
17898                 Woverloaded-virtual \
17899                 Wsign-promo \
17900                 Wsynth \
17901                 Wold-style-cast \
17902                 Wcast-align \
17903                 Wcast-qual \
17904                 Wpointer-arith \
17905                 Wshadow \
17906                 Wundef $cf_gxx_extra_warnings Wno-unused
17907         do
17908                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17909                 if { (eval echo "$as_me:17909: \"$ac_compile\"") >&5
17910   (eval $ac_compile) 2>&5
17911   ac_status=$?
17912   echo "$as_me:17912: \$? = $ac_status" >&5
17913   (exit "$ac_status"); }; then
17914                         test -n "$verbose" && echo "$as_me:17914: result: ... -$cf_opt" >&5
17915 echo "${ECHO_T}... -$cf_opt" >&6
17916                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17917                 else
17918                         test -n "$verbose" && echo "$as_me:17918: result: ... no -$cf_opt" >&5
17919 echo "${ECHO_T}... no -$cf_opt" >&6
17920                 fi
17921         done
17922         CXXFLAGS="$cf_save_CXXFLAGS"
17923 fi
17924
17925 rm -rf ./conftest*
17926 ac_ext=c
17927 ac_cpp='$CPP $CPPFLAGS'
17928 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17929 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17930 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17931 ac_main_return="return"
17932
17933         fi
17934 fi
17935
17936 echo "$as_me:17936: checking if you want to work around bogus compiler/loader warnings" >&5
17937 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17938
17939 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17940 if test "${enable_string_hacks+set}" = set; then
17941   enableval="$enable_string_hacks"
17942   enable_string_hacks=$enableval
17943 else
17944   enable_string_hacks=no
17945 fi;
17946 echo "$as_me:17946: result: $enable_string_hacks" >&5
17947 echo "${ECHO_T}$enable_string_hacks" >&6
17948
17949 if test "x$enable_string_hacks" = "xyes"; then
17950
17951 cat >>confdefs.h <<\EOF
17952 #define USE_STRING_HACKS 1
17953 EOF
17954
17955         { echo "$as_me:17955: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
17956 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17957         echo "$as_me:17957: checking for strlcat" >&5
17958 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17959 if test "${ac_cv_func_strlcat+set}" = set; then
17960   echo $ECHO_N "(cached) $ECHO_C" >&6
17961 else
17962   cat >"conftest.$ac_ext" <<_ACEOF
17963 #line 17963 "configure"
17964 #include "confdefs.h"
17965 #define strlcat autoconf_temporary
17966 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17967 #undef strlcat
17968
17969 #ifdef __cplusplus
17970 extern "C"
17971 #endif
17972
17973 /* We use char because int might match the return type of a gcc2
17974    builtin and then its argument prototype would still apply.  */
17975 char strlcat (void);
17976
17977 int
17978 main (void)
17979 {
17980
17981 /* The GNU C library defines stubs for functions which it implements
17982     to always fail with ENOSYS.  Some functions are actually named
17983     something starting with __ and the normal name is an alias.  */
17984 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17985 #error found stub for strlcat
17986 #endif
17987
17988         return strlcat ();
17989   ;
17990   return 0;
17991 }
17992 _ACEOF
17993 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17994 if { (eval echo "$as_me:17994: \"$ac_link\"") >&5
17995   (eval $ac_link) 2>&5
17996   ac_status=$?
17997   echo "$as_me:17997: \$? = $ac_status" >&5
17998   (exit "$ac_status"); } &&
17999          { ac_try='test -s "conftest$ac_exeext"'
18000   { (eval echo "$as_me:18000: \"$ac_try\"") >&5
18001   (eval $ac_try) 2>&5
18002   ac_status=$?
18003   echo "$as_me:18003: \$? = $ac_status" >&5
18004   (exit "$ac_status"); }; }; then
18005   ac_cv_func_strlcat=yes
18006 else
18007   echo "$as_me: failed program was:" >&5
18008 cat "conftest.$ac_ext" >&5
18009 ac_cv_func_strlcat=no
18010 fi
18011 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18012 fi
18013 echo "$as_me:18013: result: $ac_cv_func_strlcat" >&5
18014 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
18015 if test "$ac_cv_func_strlcat" = yes; then
18016
18017 cat >>confdefs.h <<\EOF
18018 #define HAVE_STRLCAT 1
18019 EOF
18020
18021 else
18022
18023                 echo "$as_me:18023: checking for strlcat in -lbsd" >&5
18024 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
18025 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
18026   echo $ECHO_N "(cached) $ECHO_C" >&6
18027 else
18028   ac_check_lib_save_LIBS=$LIBS
18029 LIBS="-lbsd  $LIBS"
18030 cat >"conftest.$ac_ext" <<_ACEOF
18031 #line 18031 "configure"
18032 #include "confdefs.h"
18033
18034 /* Override any gcc2 internal prototype to avoid an error.  */
18035 #ifdef __cplusplus
18036 extern "C"
18037 #endif
18038 /* We use char because int might match the return type of a gcc2
18039    builtin and then its argument prototype would still apply.  */
18040 char strlcat ();
18041 int
18042 main (void)
18043 {
18044 strlcat ();
18045   ;
18046   return 0;
18047 }
18048 _ACEOF
18049 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18050 if { (eval echo "$as_me:18050: \"$ac_link\"") >&5
18051   (eval $ac_link) 2>&5
18052   ac_status=$?
18053   echo "$as_me:18053: \$? = $ac_status" >&5
18054   (exit "$ac_status"); } &&
18055          { ac_try='test -s "conftest$ac_exeext"'
18056   { (eval echo "$as_me:18056: \"$ac_try\"") >&5
18057   (eval $ac_try) 2>&5
18058   ac_status=$?
18059   echo "$as_me:18059: \$? = $ac_status" >&5
18060   (exit "$ac_status"); }; }; then
18061   ac_cv_lib_bsd_strlcat=yes
18062 else
18063   echo "$as_me: failed program was:" >&5
18064 cat "conftest.$ac_ext" >&5
18065 ac_cv_lib_bsd_strlcat=no
18066 fi
18067 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18068 LIBS=$ac_check_lib_save_LIBS
18069 fi
18070 echo "$as_me:18070: result: $ac_cv_lib_bsd_strlcat" >&5
18071 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
18072 if test "$ac_cv_lib_bsd_strlcat" = yes; then
18073
18074 cf_add_libs="$LIBS"
18075 # reverse order
18076 cf_add_0lib=
18077 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18078 # filter duplicates
18079 for cf_add_1lib in $cf_add_0lib; do
18080         for cf_add_2lib in $cf_add_libs; do
18081                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18082                         cf_add_1lib=
18083                         break
18084                 fi
18085         done
18086         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18087 done
18088 LIBS="$cf_add_libs"
18089
18090 for ac_header in bsd/string.h
18091 do
18092 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18093 echo "$as_me:18093: checking for $ac_header" >&5
18094 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18095 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18096   echo $ECHO_N "(cached) $ECHO_C" >&6
18097 else
18098   cat >"conftest.$ac_ext" <<_ACEOF
18099 #line 18099 "configure"
18100 #include "confdefs.h"
18101 #include <$ac_header>
18102 _ACEOF
18103 if { (eval echo "$as_me:18103: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18104   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18105   ac_status=$?
18106   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18107   rm -f conftest.er1
18108   cat conftest.err >&5
18109   echo "$as_me:18109: \$? = $ac_status" >&5
18110   (exit "$ac_status"); } >/dev/null; then
18111   if test -s conftest.err; then
18112     ac_cpp_err=$ac_c_preproc_warn_flag
18113   else
18114     ac_cpp_err=
18115   fi
18116 else
18117   ac_cpp_err=yes
18118 fi
18119 if test -z "$ac_cpp_err"; then
18120   eval "$as_ac_Header=yes"
18121 else
18122   echo "$as_me: failed program was:" >&5
18123   cat "conftest.$ac_ext" >&5
18124   eval "$as_ac_Header=no"
18125 fi
18126 rm -f conftest.err "conftest.$ac_ext"
18127 fi
18128 echo "$as_me:18128: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18129 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18130 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18131   cat >>confdefs.h <<EOF
18132 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18133 EOF
18134
18135 fi
18136 done
18137
18138 cat >>confdefs.h <<\EOF
18139 #define HAVE_STRLCAT 1
18140 EOF
18141
18142 fi
18143
18144 fi
18145
18146 for ac_func in strlcpy snprintf
18147 do
18148 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18149 echo "$as_me:18149: checking for $ac_func" >&5
18150 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18151 if eval "test \"\${$as_ac_var+set}\" = set"; then
18152   echo $ECHO_N "(cached) $ECHO_C" >&6
18153 else
18154   cat >"conftest.$ac_ext" <<_ACEOF
18155 #line 18155 "configure"
18156 #include "confdefs.h"
18157 #define $ac_func autoconf_temporary
18158 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18159 #undef $ac_func
18160
18161 #ifdef __cplusplus
18162 extern "C"
18163 #endif
18164
18165 /* We use char because int might match the return type of a gcc2
18166    builtin and then its argument prototype would still apply.  */
18167 char $ac_func (void);
18168
18169 int
18170 main (void)
18171 {
18172
18173 /* The GNU C library defines stubs for functions which it implements
18174     to always fail with ENOSYS.  Some functions are actually named
18175     something starting with __ and the normal name is an alias.  */
18176 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18177 #error found stub for $ac_func
18178 #endif
18179
18180         return $ac_func ();
18181   ;
18182   return 0;
18183 }
18184 _ACEOF
18185 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18186 if { (eval echo "$as_me:18186: \"$ac_link\"") >&5
18187   (eval $ac_link) 2>&5
18188   ac_status=$?
18189   echo "$as_me:18189: \$? = $ac_status" >&5
18190   (exit "$ac_status"); } &&
18191          { ac_try='test -s "conftest$ac_exeext"'
18192   { (eval echo "$as_me:18192: \"$ac_try\"") >&5
18193   (eval $ac_try) 2>&5
18194   ac_status=$?
18195   echo "$as_me:18195: \$? = $ac_status" >&5
18196   (exit "$ac_status"); }; }; then
18197   eval "$as_ac_var=yes"
18198 else
18199   echo "$as_me: failed program was:" >&5
18200 cat "conftest.$ac_ext" >&5
18201 eval "$as_ac_var=no"
18202 fi
18203 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18204 fi
18205 echo "$as_me:18205: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18206 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18207 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18208   cat >>confdefs.h <<EOF
18209 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18210 EOF
18211
18212 fi
18213 done
18214
18215 fi
18216
18217 ###     use option --enable-assertions to turn on generation of assertion code
18218 echo "$as_me:18218: checking if you want to enable runtime assertions" >&5
18219 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
18220
18221 # Check whether --enable-assertions or --disable-assertions was given.
18222 if test "${enable_assertions+set}" = set; then
18223   enableval="$enable_assertions"
18224   with_assertions=$enableval
18225 else
18226   with_assertions=no
18227 fi;
18228 echo "$as_me:18228: result: $with_assertions" >&5
18229 echo "${ECHO_T}$with_assertions" >&6
18230 if test -n "$GCC"
18231 then
18232         if test "$with_assertions" = no
18233         then
18234                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
18235         else
18236
18237         ADAFLAGS="$ADAFLAGS -gnata"
18238
18239         fi
18240 fi
18241
18242 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
18243
18244 echo "$as_me:18244: checking if you want to use dmalloc for testing" >&5
18245 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
18246
18247 # Check whether --with-dmalloc or --without-dmalloc was given.
18248 if test "${with_dmalloc+set}" = set; then
18249   withval="$with_dmalloc"
18250   case "x$withval" in
18251         (x|xno) ;;
18252         (*)
18253                 : "${with_cflags:=-g}"
18254                 : "${enable_leaks:=no}"
18255                 with_dmalloc=yes
18256
18257 cat >>confdefs.h <<EOF
18258 #define USE_DMALLOC 1
18259 EOF
18260
18261                 ;;
18262         esac
18263 else
18264   with_dmalloc=
18265 fi;
18266 echo "$as_me:18266: result: ${with_dmalloc:-no}" >&5
18267 echo "${ECHO_T}${with_dmalloc:-no}" >&6
18268
18269 case ".$with_cflags" in
18270 (.*-g*)
18271         case .$CFLAGS in
18272         (.*-g*)
18273                 ;;
18274         (*)
18275
18276 cf_fix_cppflags=no
18277 cf_new_cflags=
18278 cf_new_cppflags=
18279 cf_new_extra_cppflags=
18280
18281 for cf_add_cflags in -g
18282 do
18283 case "$cf_fix_cppflags" in
18284 (no)
18285         case "$cf_add_cflags" in
18286         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18287                 case "$cf_add_cflags" in
18288                 (-D*)
18289                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18290
18291                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18292                                 && test -z "${cf_tst_cflags}" \
18293                                 && cf_fix_cppflags=yes
18294
18295                         if test "$cf_fix_cppflags" = yes ; then
18296
18297         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18298         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18299
18300                                 continue
18301                         elif test "${cf_tst_cflags}" = "\"'" ; then
18302
18303         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18304         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18305
18306                                 continue
18307                         fi
18308                         ;;
18309                 esac
18310                 case "$CPPFLAGS" in
18311                 (*$cf_add_cflags)
18312                         ;;
18313                 (*)
18314                         case "$cf_add_cflags" in
18315                         (-D*)
18316                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18317
18318 CPPFLAGS=`echo "$CPPFLAGS" | \
18319         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18320                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18321
18322                                 ;;
18323                         esac
18324
18325         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18326         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18327
18328                         ;;
18329                 esac
18330                 ;;
18331         (*)
18332
18333         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18334         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18335
18336                 ;;
18337         esac
18338         ;;
18339 (yes)
18340
18341         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18342         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18343
18344         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18345
18346         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18347                 && test -z "${cf_tst_cflags}" \
18348                 && cf_fix_cppflags=no
18349         ;;
18350 esac
18351 done
18352
18353 if test -n "$cf_new_cflags" ; then
18354
18355         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18356         CFLAGS="${CFLAGS}$cf_new_cflags"
18357
18358 fi
18359
18360 if test -n "$cf_new_cppflags" ; then
18361
18362         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18363         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18364
18365 fi
18366
18367 if test -n "$cf_new_extra_cppflags" ; then
18368
18369         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18370         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18371
18372 fi
18373
18374                 ;;
18375         esac
18376         ;;
18377 esac
18378
18379 if test "$with_dmalloc" = yes ; then
18380         echo "$as_me:18380: checking for dmalloc.h" >&5
18381 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
18382 if test "${ac_cv_header_dmalloc_h+set}" = set; then
18383   echo $ECHO_N "(cached) $ECHO_C" >&6
18384 else
18385   cat >"conftest.$ac_ext" <<_ACEOF
18386 #line 18386 "configure"
18387 #include "confdefs.h"
18388 #include <dmalloc.h>
18389 _ACEOF
18390 if { (eval echo "$as_me:18390: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18391   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18392   ac_status=$?
18393   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18394   rm -f conftest.er1
18395   cat conftest.err >&5
18396   echo "$as_me:18396: \$? = $ac_status" >&5
18397   (exit "$ac_status"); } >/dev/null; then
18398   if test -s conftest.err; then
18399     ac_cpp_err=$ac_c_preproc_warn_flag
18400   else
18401     ac_cpp_err=
18402   fi
18403 else
18404   ac_cpp_err=yes
18405 fi
18406 if test -z "$ac_cpp_err"; then
18407   ac_cv_header_dmalloc_h=yes
18408 else
18409   echo "$as_me: failed program was:" >&5
18410   cat "conftest.$ac_ext" >&5
18411   ac_cv_header_dmalloc_h=no
18412 fi
18413 rm -f conftest.err "conftest.$ac_ext"
18414 fi
18415 echo "$as_me:18415: result: $ac_cv_header_dmalloc_h" >&5
18416 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
18417 if test "$ac_cv_header_dmalloc_h" = yes; then
18418
18419 echo "$as_me:18419: checking for dmalloc_debug in -ldmalloc" >&5
18420 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
18421 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
18422   echo $ECHO_N "(cached) $ECHO_C" >&6
18423 else
18424   ac_check_lib_save_LIBS=$LIBS
18425 LIBS="-ldmalloc  $LIBS"
18426 cat >"conftest.$ac_ext" <<_ACEOF
18427 #line 18427 "configure"
18428 #include "confdefs.h"
18429
18430 /* Override any gcc2 internal prototype to avoid an error.  */
18431 #ifdef __cplusplus
18432 extern "C"
18433 #endif
18434 /* We use char because int might match the return type of a gcc2
18435    builtin and then its argument prototype would still apply.  */
18436 char dmalloc_debug ();
18437 int
18438 main (void)
18439 {
18440 dmalloc_debug ();
18441   ;
18442   return 0;
18443 }
18444 _ACEOF
18445 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18446 if { (eval echo "$as_me:18446: \"$ac_link\"") >&5
18447   (eval $ac_link) 2>&5
18448   ac_status=$?
18449   echo "$as_me:18449: \$? = $ac_status" >&5
18450   (exit "$ac_status"); } &&
18451          { ac_try='test -s "conftest$ac_exeext"'
18452   { (eval echo "$as_me:18452: \"$ac_try\"") >&5
18453   (eval $ac_try) 2>&5
18454   ac_status=$?
18455   echo "$as_me:18455: \$? = $ac_status" >&5
18456   (exit "$ac_status"); }; }; then
18457   ac_cv_lib_dmalloc_dmalloc_debug=yes
18458 else
18459   echo "$as_me: failed program was:" >&5
18460 cat "conftest.$ac_ext" >&5
18461 ac_cv_lib_dmalloc_dmalloc_debug=no
18462 fi
18463 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18464 LIBS=$ac_check_lib_save_LIBS
18465 fi
18466 echo "$as_me:18466: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18467 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18468 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
18469   cat >>confdefs.h <<EOF
18470 #define HAVE_LIBDMALLOC 1
18471 EOF
18472
18473   LIBS="-ldmalloc $LIBS"
18474
18475 fi
18476
18477 fi
18478
18479 fi
18480
18481 echo "$as_me:18481: checking if you want to use dbmalloc for testing" >&5
18482 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18483
18484 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18485 if test "${with_dbmalloc+set}" = set; then
18486   withval="$with_dbmalloc"
18487   case "x$withval" in
18488         (x|xno) ;;
18489         (*)
18490                 : "${with_cflags:=-g}"
18491                 : "${enable_leaks:=no}"
18492                 with_dbmalloc=yes
18493
18494 cat >>confdefs.h <<EOF
18495 #define USE_DBMALLOC 1
18496 EOF
18497
18498                 ;;
18499         esac
18500 else
18501   with_dbmalloc=
18502 fi;
18503 echo "$as_me:18503: result: ${with_dbmalloc:-no}" >&5
18504 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18505
18506 case ".$with_cflags" in
18507 (.*-g*)
18508         case .$CFLAGS in
18509         (.*-g*)
18510                 ;;
18511         (*)
18512
18513 cf_fix_cppflags=no
18514 cf_new_cflags=
18515 cf_new_cppflags=
18516 cf_new_extra_cppflags=
18517
18518 for cf_add_cflags in -g
18519 do
18520 case "$cf_fix_cppflags" in
18521 (no)
18522         case "$cf_add_cflags" in
18523         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18524                 case "$cf_add_cflags" in
18525                 (-D*)
18526                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18527
18528                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18529                                 && test -z "${cf_tst_cflags}" \
18530                                 && cf_fix_cppflags=yes
18531
18532                         if test "$cf_fix_cppflags" = yes ; then
18533
18534         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18535         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18536
18537                                 continue
18538                         elif test "${cf_tst_cflags}" = "\"'" ; then
18539
18540         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18541         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18542
18543                                 continue
18544                         fi
18545                         ;;
18546                 esac
18547                 case "$CPPFLAGS" in
18548                 (*$cf_add_cflags)
18549                         ;;
18550                 (*)
18551                         case "$cf_add_cflags" in
18552                         (-D*)
18553                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18554
18555 CPPFLAGS=`echo "$CPPFLAGS" | \
18556         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18557                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18558
18559                                 ;;
18560                         esac
18561
18562         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18563         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18564
18565                         ;;
18566                 esac
18567                 ;;
18568         (*)
18569
18570         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18571         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18572
18573                 ;;
18574         esac
18575         ;;
18576 (yes)
18577
18578         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18579         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18580
18581         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18582
18583         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18584                 && test -z "${cf_tst_cflags}" \
18585                 && cf_fix_cppflags=no
18586         ;;
18587 esac
18588 done
18589
18590 if test -n "$cf_new_cflags" ; then
18591
18592         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18593         CFLAGS="${CFLAGS}$cf_new_cflags"
18594
18595 fi
18596
18597 if test -n "$cf_new_cppflags" ; then
18598
18599         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18600         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18601
18602 fi
18603
18604 if test -n "$cf_new_extra_cppflags" ; then
18605
18606         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18607         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18608
18609 fi
18610
18611                 ;;
18612         esac
18613         ;;
18614 esac
18615
18616 if test "$with_dbmalloc" = yes ; then
18617         echo "$as_me:18617: checking for dbmalloc.h" >&5
18618 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18619 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18620   echo $ECHO_N "(cached) $ECHO_C" >&6
18621 else
18622   cat >"conftest.$ac_ext" <<_ACEOF
18623 #line 18623 "configure"
18624 #include "confdefs.h"
18625 #include <dbmalloc.h>
18626 _ACEOF
18627 if { (eval echo "$as_me:18627: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18628   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18629   ac_status=$?
18630   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18631   rm -f conftest.er1
18632   cat conftest.err >&5
18633   echo "$as_me:18633: \$? = $ac_status" >&5
18634   (exit "$ac_status"); } >/dev/null; then
18635   if test -s conftest.err; then
18636     ac_cpp_err=$ac_c_preproc_warn_flag
18637   else
18638     ac_cpp_err=
18639   fi
18640 else
18641   ac_cpp_err=yes
18642 fi
18643 if test -z "$ac_cpp_err"; then
18644   ac_cv_header_dbmalloc_h=yes
18645 else
18646   echo "$as_me: failed program was:" >&5
18647   cat "conftest.$ac_ext" >&5
18648   ac_cv_header_dbmalloc_h=no
18649 fi
18650 rm -f conftest.err "conftest.$ac_ext"
18651 fi
18652 echo "$as_me:18652: result: $ac_cv_header_dbmalloc_h" >&5
18653 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18654 if test "$ac_cv_header_dbmalloc_h" = yes; then
18655
18656 echo "$as_me:18656: checking for debug_malloc in -ldbmalloc" >&5
18657 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18658 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18659   echo $ECHO_N "(cached) $ECHO_C" >&6
18660 else
18661   ac_check_lib_save_LIBS=$LIBS
18662 LIBS="-ldbmalloc  $LIBS"
18663 cat >"conftest.$ac_ext" <<_ACEOF
18664 #line 18664 "configure"
18665 #include "confdefs.h"
18666
18667 /* Override any gcc2 internal prototype to avoid an error.  */
18668 #ifdef __cplusplus
18669 extern "C"
18670 #endif
18671 /* We use char because int might match the return type of a gcc2
18672    builtin and then its argument prototype would still apply.  */
18673 char debug_malloc ();
18674 int
18675 main (void)
18676 {
18677 debug_malloc ();
18678   ;
18679   return 0;
18680 }
18681 _ACEOF
18682 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18683 if { (eval echo "$as_me:18683: \"$ac_link\"") >&5
18684   (eval $ac_link) 2>&5
18685   ac_status=$?
18686   echo "$as_me:18686: \$? = $ac_status" >&5
18687   (exit "$ac_status"); } &&
18688          { ac_try='test -s "conftest$ac_exeext"'
18689   { (eval echo "$as_me:18689: \"$ac_try\"") >&5
18690   (eval $ac_try) 2>&5
18691   ac_status=$?
18692   echo "$as_me:18692: \$? = $ac_status" >&5
18693   (exit "$ac_status"); }; }; then
18694   ac_cv_lib_dbmalloc_debug_malloc=yes
18695 else
18696   echo "$as_me: failed program was:" >&5
18697 cat "conftest.$ac_ext" >&5
18698 ac_cv_lib_dbmalloc_debug_malloc=no
18699 fi
18700 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18701 LIBS=$ac_check_lib_save_LIBS
18702 fi
18703 echo "$as_me:18703: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18704 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18705 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
18706   cat >>confdefs.h <<EOF
18707 #define HAVE_LIBDBMALLOC 1
18708 EOF
18709
18710   LIBS="-ldbmalloc $LIBS"
18711
18712 fi
18713
18714 fi
18715
18716 fi
18717
18718 echo "$as_me:18718: checking if you want to use valgrind for testing" >&5
18719 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18720
18721 # Check whether --with-valgrind or --without-valgrind was given.
18722 if test "${with_valgrind+set}" = set; then
18723   withval="$with_valgrind"
18724   case "x$withval" in
18725         (x|xno) ;;
18726         (*)
18727                 : "${with_cflags:=-g}"
18728                 : "${enable_leaks:=no}"
18729                 with_valgrind=yes
18730
18731 cat >>confdefs.h <<EOF
18732 #define USE_VALGRIND 1
18733 EOF
18734
18735                 ;;
18736         esac
18737 else
18738   with_valgrind=
18739 fi;
18740 echo "$as_me:18740: result: ${with_valgrind:-no}" >&5
18741 echo "${ECHO_T}${with_valgrind:-no}" >&6
18742
18743 case ".$with_cflags" in
18744 (.*-g*)
18745         case .$CFLAGS in
18746         (.*-g*)
18747                 ;;
18748         (*)
18749
18750 cf_fix_cppflags=no
18751 cf_new_cflags=
18752 cf_new_cppflags=
18753 cf_new_extra_cppflags=
18754
18755 for cf_add_cflags in -g
18756 do
18757 case "$cf_fix_cppflags" in
18758 (no)
18759         case "$cf_add_cflags" in
18760         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18761                 case "$cf_add_cflags" in
18762                 (-D*)
18763                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18764
18765                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18766                                 && test -z "${cf_tst_cflags}" \
18767                                 && cf_fix_cppflags=yes
18768
18769                         if test "$cf_fix_cppflags" = yes ; then
18770
18771         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18772         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18773
18774                                 continue
18775                         elif test "${cf_tst_cflags}" = "\"'" ; then
18776
18777         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18778         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18779
18780                                 continue
18781                         fi
18782                         ;;
18783                 esac
18784                 case "$CPPFLAGS" in
18785                 (*$cf_add_cflags)
18786                         ;;
18787                 (*)
18788                         case "$cf_add_cflags" in
18789                         (-D*)
18790                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18791
18792 CPPFLAGS=`echo "$CPPFLAGS" | \
18793         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18794                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18795
18796                                 ;;
18797                         esac
18798
18799         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18800         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18801
18802                         ;;
18803                 esac
18804                 ;;
18805         (*)
18806
18807         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18808         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18809
18810                 ;;
18811         esac
18812         ;;
18813 (yes)
18814
18815         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18816         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18817
18818         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18819
18820         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18821                 && test -z "${cf_tst_cflags}" \
18822                 && cf_fix_cppflags=no
18823         ;;
18824 esac
18825 done
18826
18827 if test -n "$cf_new_cflags" ; then
18828
18829         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18830         CFLAGS="${CFLAGS}$cf_new_cflags"
18831
18832 fi
18833
18834 if test -n "$cf_new_cppflags" ; then
18835
18836         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18837         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18838
18839 fi
18840
18841 if test -n "$cf_new_extra_cppflags" ; then
18842
18843         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18844         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18845
18846 fi
18847
18848                 ;;
18849         esac
18850         ;;
18851 esac
18852
18853 echo "$as_me:18853: checking if you want to perform memory-leak testing" >&5
18854 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18855
18856 # Check whether --enable-leaks or --disable-leaks was given.
18857 if test "${enable_leaks+set}" = set; then
18858   enableval="$enable_leaks"
18859   enable_leaks=$enableval
18860 else
18861   enable_leaks=yes
18862 fi;
18863 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18864 echo "$as_me:18864: result: $with_no_leaks" >&5
18865 echo "${ECHO_T}$with_no_leaks" >&6
18866
18867 if test "$enable_leaks" = no ; then
18868
18869 cat >>confdefs.h <<\EOF
18870 #define NO_LEAKS 1
18871 EOF
18872
18873 cat >>confdefs.h <<\EOF
18874 #define YY_NO_LEAKS 1
18875 EOF
18876
18877 fi
18878
18879 cat >>confdefs.h <<\EOF
18880 #define HAVE_NC_ALLOC_H 1
18881 EOF
18882
18883 ###     use option --enable-expanded to generate certain macros as functions
18884
18885 # Check whether --enable-expanded or --disable-expanded was given.
18886 if test "${enable_expanded+set}" = set; then
18887   enableval="$enable_expanded"
18888   test "x$enableval" = xyes &&
18889 cat >>confdefs.h <<\EOF
18890 #define NCURSES_EXPANDED 1
18891 EOF
18892
18893 fi;
18894
18895 ###     use option --disable-macros to suppress macros in favor of functions
18896
18897 # Check whether --enable-macros or --disable-macros was given.
18898 if test "${enable_macros+set}" = set; then
18899   enableval="$enable_macros"
18900   test "$enableval" = no &&
18901 cat >>confdefs.h <<\EOF
18902 #define NCURSES_NOMACROS 1
18903 EOF
18904
18905 fi;
18906
18907 # Normally we only add trace() to the debug-library.  Allow this to be
18908 # extended to all models of the ncurses library:
18909 cf_all_traces=no
18910 case "$CFLAGS $CPPFLAGS" in
18911 (*-DTRACE*)
18912         cf_all_traces=yes
18913         ;;
18914 esac
18915
18916 echo "$as_me:18916: checking whether to add trace feature to all models" >&5
18917 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18918
18919 # Check whether --with-trace or --without-trace was given.
18920 if test "${with_trace+set}" = set; then
18921   withval="$with_trace"
18922   cf_with_trace=$withval
18923 else
18924   cf_with_trace=$cf_all_traces
18925 fi;
18926 echo "$as_me:18926: result: $cf_with_trace" >&5
18927 echo "${ECHO_T}$cf_with_trace" >&6
18928
18929 if test "x$cf_with_trace" = xyes ; then
18930         LIB_TRACING=all
18931         ADA_TRACE=TRUE
18932
18933 cf_fix_cppflags=no
18934 cf_new_cflags=
18935 cf_new_cppflags=
18936 cf_new_extra_cppflags=
18937
18938 for cf_add_cflags in -DTRACE
18939 do
18940 case "$cf_fix_cppflags" in
18941 (no)
18942         case "$cf_add_cflags" in
18943         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18944                 case "$cf_add_cflags" in
18945                 (-D*)
18946                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18947
18948                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18949                                 && test -z "${cf_tst_cflags}" \
18950                                 && cf_fix_cppflags=yes
18951
18952                         if test "$cf_fix_cppflags" = yes ; then
18953
18954         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18955         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18956
18957                                 continue
18958                         elif test "${cf_tst_cflags}" = "\"'" ; then
18959
18960         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18961         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18962
18963                                 continue
18964                         fi
18965                         ;;
18966                 esac
18967                 case "$CPPFLAGS" in
18968                 (*$cf_add_cflags)
18969                         ;;
18970                 (*)
18971                         case "$cf_add_cflags" in
18972                         (-D*)
18973                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18974
18975 CPPFLAGS=`echo "$CPPFLAGS" | \
18976         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18977                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18978
18979                                 ;;
18980                         esac
18981
18982         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18983         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18984
18985                         ;;
18986                 esac
18987                 ;;
18988         (*)
18989
18990         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18991         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18992
18993                 ;;
18994         esac
18995         ;;
18996 (yes)
18997
18998         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18999         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19000
19001         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
19002
19003         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19004                 && test -z "${cf_tst_cflags}" \
19005                 && cf_fix_cppflags=no
19006         ;;
19007 esac
19008 done
19009
19010 if test -n "$cf_new_cflags" ; then
19011
19012         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19013         CFLAGS="${CFLAGS}$cf_new_cflags"
19014
19015 fi
19016
19017 if test -n "$cf_new_cppflags" ; then
19018
19019         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19020         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19021
19022 fi
19023
19024 if test -n "$cf_new_extra_cppflags" ; then
19025
19026         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19027         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19028
19029 fi
19030
19031 cat >>confdefs.h <<\EOF
19032 #define HAVE__TRACEF 1
19033 EOF
19034
19035 else
19036         LIB_TRACING=DEBUG
19037         ADA_TRACE=FALSE
19038 fi
19039
19040 echo "$as_me:19040: checking if we want to use GNAT projects" >&5
19041 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
19042
19043 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
19044 if test "${enable_gnat_projects+set}" = set; then
19045   enableval="$enable_gnat_projects"
19046   test "$enableval" != no && enableval=yes
19047         if test "$enableval" != "yes" ; then
19048     enable_gnat_projects=no
19049         else
19050                 enable_gnat_projects=yes
19051         fi
19052 else
19053   enableval=yes
19054         enable_gnat_projects=yes
19055
19056 fi;
19057 echo "$as_me:19057: result: $enable_gnat_projects" >&5
19058 echo "${ECHO_T}$enable_gnat_projects" >&6
19059
19060 ###     Checks for libraries.
19061 case "$cf_cv_system_name" in
19062 (*mingw32*|*mingw64*)
19063         # Note: WINVER may be a problem with Windows 10
19064         if test "x$with_exp_win32" = xyes ; then
19065                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
19066         else
19067                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
19068         fi
19069
19070 echo "$as_me:19070: checking if ssp library is needed" >&5
19071 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
19072 if test "${cf_cv_need_libssp+set}" = set; then
19073   echo $ECHO_N "(cached) $ECHO_C" >&6
19074 else
19075
19076 cat >"conftest.$ac_ext" <<_ACEOF
19077 #line 19077 "configure"
19078 #include "confdefs.h"
19079
19080 #include <sys/types.h>
19081 #include <dirent.h>
19082
19083 int
19084 main (void)
19085 {
19086
19087        DIR *dp = opendir(".");
19088
19089   ;
19090   return 0;
19091 }
19092 _ACEOF
19093 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19094 if { (eval echo "$as_me:19094: \"$ac_link\"") >&5
19095   (eval $ac_link) 2>&5
19096   ac_status=$?
19097   echo "$as_me:19097: \$? = $ac_status" >&5
19098   (exit "$ac_status"); } &&
19099          { ac_try='test -s "conftest$ac_exeext"'
19100   { (eval echo "$as_me:19100: \"$ac_try\"") >&5
19101   (eval $ac_try) 2>&5
19102   ac_status=$?
19103   echo "$as_me:19103: \$? = $ac_status" >&5
19104   (exit "$ac_status"); }; }; then
19105   cf_cv_need_libssp=no
19106 else
19107   echo "$as_me: failed program was:" >&5
19108 cat "conftest.$ac_ext" >&5
19109
19110         cf_save_LIBS="$LIBS"
19111         LIBS="$LIBS -lssp"
19112         cat >"conftest.$ac_ext" <<_ACEOF
19113 #line 19113 "configure"
19114 #include "confdefs.h"
19115
19116 #include <sys/types.h>
19117 #include <dirent.h>
19118
19119 int
19120 main (void)
19121 {
19122
19123                    DIR *dp = opendir(".");
19124
19125   ;
19126   return 0;
19127 }
19128 _ACEOF
19129 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19130 if { (eval echo "$as_me:19130: \"$ac_link\"") >&5
19131   (eval $ac_link) 2>&5
19132   ac_status=$?
19133   echo "$as_me:19133: \$? = $ac_status" >&5
19134   (exit "$ac_status"); } &&
19135          { ac_try='test -s "conftest$ac_exeext"'
19136   { (eval echo "$as_me:19136: \"$ac_try\"") >&5
19137   (eval $ac_try) 2>&5
19138   ac_status=$?
19139   echo "$as_me:19139: \$? = $ac_status" >&5
19140   (exit "$ac_status"); }; }; then
19141   cf_cv_need_libssp=yes
19142 else
19143   echo "$as_me: failed program was:" >&5
19144 cat "conftest.$ac_ext" >&5
19145 cf_cv_need_libssp=maybe
19146 fi
19147 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19148         LIBS="$cf_save_LIBS"
19149
19150 fi
19151 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19152 fi
19153 echo "$as_me:19153: result: $cf_cv_need_libssp" >&5
19154 echo "${ECHO_T}$cf_cv_need_libssp" >&6
19155
19156 if test "x$cf_cv_need_libssp" = xyes
19157 then
19158
19159 cf_add_libs="$LIBS"
19160 # reverse order
19161 cf_add_0lib=
19162 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19163 # filter duplicates
19164 for cf_add_1lib in $cf_add_0lib; do
19165         for cf_add_2lib in $cf_add_libs; do
19166                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19167                         cf_add_1lib=
19168                         break
19169                 fi
19170         done
19171         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19172 done
19173 LIBS="$cf_add_libs"
19174
19175 fi
19176
19177         ;;
19178 (*)
19179 echo "$as_me:19179: checking for gettimeofday" >&5
19180 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
19181 if test "${ac_cv_func_gettimeofday+set}" = set; then
19182   echo $ECHO_N "(cached) $ECHO_C" >&6
19183 else
19184   cat >"conftest.$ac_ext" <<_ACEOF
19185 #line 19185 "configure"
19186 #include "confdefs.h"
19187 #define gettimeofday autoconf_temporary
19188 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19189 #undef gettimeofday
19190
19191 #ifdef __cplusplus
19192 extern "C"
19193 #endif
19194
19195 /* We use char because int might match the return type of a gcc2
19196    builtin and then its argument prototype would still apply.  */
19197 char gettimeofday (void);
19198
19199 int
19200 main (void)
19201 {
19202
19203 /* The GNU C library defines stubs for functions which it implements
19204     to always fail with ENOSYS.  Some functions are actually named
19205     something starting with __ and the normal name is an alias.  */
19206 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
19207 #error found stub for gettimeofday
19208 #endif
19209
19210         return gettimeofday ();
19211   ;
19212   return 0;
19213 }
19214 _ACEOF
19215 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19216 if { (eval echo "$as_me:19216: \"$ac_link\"") >&5
19217   (eval $ac_link) 2>&5
19218   ac_status=$?
19219   echo "$as_me:19219: \$? = $ac_status" >&5
19220   (exit "$ac_status"); } &&
19221          { ac_try='test -s "conftest$ac_exeext"'
19222   { (eval echo "$as_me:19222: \"$ac_try\"") >&5
19223   (eval $ac_try) 2>&5
19224   ac_status=$?
19225   echo "$as_me:19225: \$? = $ac_status" >&5
19226   (exit "$ac_status"); }; }; then
19227   ac_cv_func_gettimeofday=yes
19228 else
19229   echo "$as_me: failed program was:" >&5
19230 cat "conftest.$ac_ext" >&5
19231 ac_cv_func_gettimeofday=no
19232 fi
19233 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19234 fi
19235 echo "$as_me:19235: result: $ac_cv_func_gettimeofday" >&5
19236 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
19237 if test "$ac_cv_func_gettimeofday" = yes; then
19238
19239 cat >>confdefs.h <<\EOF
19240 #define HAVE_GETTIMEOFDAY 1
19241 EOF
19242
19243 else
19244
19245 echo "$as_me:19245: checking for gettimeofday in -lbsd" >&5
19246 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
19247 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
19248   echo $ECHO_N "(cached) $ECHO_C" >&6
19249 else
19250   ac_check_lib_save_LIBS=$LIBS
19251 LIBS="-lbsd  $LIBS"
19252 cat >"conftest.$ac_ext" <<_ACEOF
19253 #line 19253 "configure"
19254 #include "confdefs.h"
19255
19256 /* Override any gcc2 internal prototype to avoid an error.  */
19257 #ifdef __cplusplus
19258 extern "C"
19259 #endif
19260 /* We use char because int might match the return type of a gcc2
19261    builtin and then its argument prototype would still apply.  */
19262 char gettimeofday ();
19263 int
19264 main (void)
19265 {
19266 gettimeofday ();
19267   ;
19268   return 0;
19269 }
19270 _ACEOF
19271 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19272 if { (eval echo "$as_me:19272: \"$ac_link\"") >&5
19273   (eval $ac_link) 2>&5
19274   ac_status=$?
19275   echo "$as_me:19275: \$? = $ac_status" >&5
19276   (exit "$ac_status"); } &&
19277          { ac_try='test -s "conftest$ac_exeext"'
19278   { (eval echo "$as_me:19278: \"$ac_try\"") >&5
19279   (eval $ac_try) 2>&5
19280   ac_status=$?
19281   echo "$as_me:19281: \$? = $ac_status" >&5
19282   (exit "$ac_status"); }; }; then
19283   ac_cv_lib_bsd_gettimeofday=yes
19284 else
19285   echo "$as_me: failed program was:" >&5
19286 cat "conftest.$ac_ext" >&5
19287 ac_cv_lib_bsd_gettimeofday=no
19288 fi
19289 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19290 LIBS=$ac_check_lib_save_LIBS
19291 fi
19292 echo "$as_me:19292: result: $ac_cv_lib_bsd_gettimeofday" >&5
19293 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
19294 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
19295
19296 cat >>confdefs.h <<\EOF
19297 #define HAVE_GETTIMEOFDAY 1
19298 EOF
19299
19300 cf_add_libs="$LIBS"
19301 # reverse order
19302 cf_add_0lib=
19303 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19304 # filter duplicates
19305 for cf_add_1lib in $cf_add_0lib; do
19306         for cf_add_2lib in $cf_add_libs; do
19307                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19308                         cf_add_1lib=
19309                         break
19310                 fi
19311         done
19312         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19313 done
19314 LIBS="$cf_add_libs"
19315
19316 fi
19317
19318 fi
19319         ;;
19320 esac
19321
19322 echo "$as_me:19322: checking if -lm needed for math functions" >&5
19323 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
19324 if test "${cf_cv_need_libm+set}" = set; then
19325   echo $ECHO_N "(cached) $ECHO_C" >&6
19326 else
19327
19328         cat >"conftest.$ac_ext" <<_ACEOF
19329 #line 19329 "configure"
19330 #include "confdefs.h"
19331
19332                 #include <stdio.h>
19333                 #include <stdlib.h>
19334                 #include <math.h>
19335
19336 int
19337 main (void)
19338 {
19339 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19340   ;
19341   return 0;
19342 }
19343 _ACEOF
19344 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19345 if { (eval echo "$as_me:19345: \"$ac_link\"") >&5
19346   (eval $ac_link) 2>&5
19347   ac_status=$?
19348   echo "$as_me:19348: \$? = $ac_status" >&5
19349   (exit "$ac_status"); } &&
19350          { ac_try='test -s "conftest$ac_exeext"'
19351   { (eval echo "$as_me:19351: \"$ac_try\"") >&5
19352   (eval $ac_try) 2>&5
19353   ac_status=$?
19354   echo "$as_me:19354: \$? = $ac_status" >&5
19355   (exit "$ac_status"); }; }; then
19356   cf_cv_need_libm=no
19357 else
19358   echo "$as_me: failed program was:" >&5
19359 cat "conftest.$ac_ext" >&5
19360 cf_cv_need_libm=yes
19361 fi
19362 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19363 fi
19364 echo "$as_me:19364: result: $cf_cv_need_libm" >&5
19365 echo "${ECHO_T}$cf_cv_need_libm" >&6
19366
19367 if test "$cf_cv_need_libm" = yes
19368 then
19369
19370         cf_save_LIBS="$LIBS"
19371         LIBS="$LIBS -lm"
19372         echo "$as_me:19372: checking if -lm is available for math functions" >&5
19373 echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6
19374 if test "${cf_cv_have_libm+set}" = set; then
19375   echo $ECHO_N "(cached) $ECHO_C" >&6
19376 else
19377
19378         cat >"conftest.$ac_ext" <<_ACEOF
19379 #line 19379 "configure"
19380 #include "confdefs.h"
19381
19382                 #include <stdio.h>
19383                 #include <stdlib.h>
19384                 #include <math.h>
19385
19386 int
19387 main (void)
19388 {
19389 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19390   ;
19391   return 0;
19392 }
19393 _ACEOF
19394 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19395 if { (eval echo "$as_me:19395: \"$ac_link\"") >&5
19396   (eval $ac_link) 2>&5
19397   ac_status=$?
19398   echo "$as_me:19398: \$? = $ac_status" >&5
19399   (exit "$ac_status"); } &&
19400          { ac_try='test -s "conftest$ac_exeext"'
19401   { (eval echo "$as_me:19401: \"$ac_try\"") >&5
19402   (eval $ac_try) 2>&5
19403   ac_status=$?
19404   echo "$as_me:19404: \$? = $ac_status" >&5
19405   (exit "$ac_status"); }; }; then
19406   cf_cv_have_libm=yes
19407 else
19408   echo "$as_me: failed program was:" >&5
19409 cat "conftest.$ac_ext" >&5
19410 cf_cv_have_libm=no
19411 fi
19412 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19413 fi
19414 echo "$as_me:19414: result: $cf_cv_have_libm" >&5
19415 echo "${ECHO_T}$cf_cv_have_libm" >&6
19416         LIBS="$cf_save_LIBS"
19417
19418         if test "$cf_cv_have_libm" = yes
19419         then
19420                 MATH_LIB=-lm
19421         fi
19422 else
19423         cf_cv_have_libm=yes
19424 fi
19425
19426 if test "$cf_cv_have_libm" = yes
19427 then
19428
19429 cat >>confdefs.h <<\EOF
19430 #define HAVE_MATH_FUNCS 1
19431 EOF
19432
19433 fi
19434
19435 ###     Checks for header files.
19436 echo "$as_me:19436: checking whether time.h and sys/time.h may both be included" >&5
19437 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
19438 if test "${ac_cv_header_time+set}" = set; then
19439   echo $ECHO_N "(cached) $ECHO_C" >&6
19440 else
19441   cat >"conftest.$ac_ext" <<_ACEOF
19442 #line 19442 "configure"
19443 #include "confdefs.h"
19444 #include <sys/types.h>
19445 #include <sys/time.h>
19446 #include <time.h>
19447
19448 int
19449 main (void)
19450 {
19451 if ((struct tm *) 0)
19452 return 0;
19453   ;
19454   return 0;
19455 }
19456 _ACEOF
19457 rm -f "conftest.$ac_objext"
19458 if { (eval echo "$as_me:19458: \"$ac_compile\"") >&5
19459   (eval $ac_compile) 2>&5
19460   ac_status=$?
19461   echo "$as_me:19461: \$? = $ac_status" >&5
19462   (exit "$ac_status"); } &&
19463          { ac_try='test -s "conftest.$ac_objext"'
19464   { (eval echo "$as_me:19464: \"$ac_try\"") >&5
19465   (eval $ac_try) 2>&5
19466   ac_status=$?
19467   echo "$as_me:19467: \$? = $ac_status" >&5
19468   (exit "$ac_status"); }; }; then
19469   ac_cv_header_time=yes
19470 else
19471   echo "$as_me: failed program was:" >&5
19472 cat "conftest.$ac_ext" >&5
19473 ac_cv_header_time=no
19474 fi
19475 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19476 fi
19477 echo "$as_me:19477: result: $ac_cv_header_time" >&5
19478 echo "${ECHO_T}$ac_cv_header_time" >&6
19479 if test $ac_cv_header_time = yes; then
19480
19481 cat >>confdefs.h <<\EOF
19482 #define TIME_WITH_SYS_TIME 1
19483 EOF
19484
19485 fi
19486
19487 cf_regex_func=no
19488 cf_regex_libs=
19489 case "$host_os" in
19490 (mingw*)
19491         # -lsystre -ltre -lintl -liconv
19492         echo "$as_me:19492: checking for regcomp in -lsystre" >&5
19493 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19494 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
19495   echo $ECHO_N "(cached) $ECHO_C" >&6
19496 else
19497   ac_check_lib_save_LIBS=$LIBS
19498 LIBS="-lsystre  $LIBS"
19499 cat >"conftest.$ac_ext" <<_ACEOF
19500 #line 19500 "configure"
19501 #include "confdefs.h"
19502
19503 /* Override any gcc2 internal prototype to avoid an error.  */
19504 #ifdef __cplusplus
19505 extern "C"
19506 #endif
19507 /* We use char because int might match the return type of a gcc2
19508    builtin and then its argument prototype would still apply.  */
19509 char regcomp ();
19510 int
19511 main (void)
19512 {
19513 regcomp ();
19514   ;
19515   return 0;
19516 }
19517 _ACEOF
19518 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19519 if { (eval echo "$as_me:19519: \"$ac_link\"") >&5
19520   (eval $ac_link) 2>&5
19521   ac_status=$?
19522   echo "$as_me:19522: \$? = $ac_status" >&5
19523   (exit "$ac_status"); } &&
19524          { ac_try='test -s "conftest$ac_exeext"'
19525   { (eval echo "$as_me:19525: \"$ac_try\"") >&5
19526   (eval $ac_try) 2>&5
19527   ac_status=$?
19528   echo "$as_me:19528: \$? = $ac_status" >&5
19529   (exit "$ac_status"); }; }; then
19530   ac_cv_lib_systre_regcomp=yes
19531 else
19532   echo "$as_me: failed program was:" >&5
19533 cat "conftest.$ac_ext" >&5
19534 ac_cv_lib_systre_regcomp=no
19535 fi
19536 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19537 LIBS=$ac_check_lib_save_LIBS
19538 fi
19539 echo "$as_me:19539: result: $ac_cv_lib_systre_regcomp" >&5
19540 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19541 if test "$ac_cv_lib_systre_regcomp" = yes; then
19542
19543                 echo "$as_me:19543: checking for libiconv_open in -liconv" >&5
19544 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19545 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19546   echo $ECHO_N "(cached) $ECHO_C" >&6
19547 else
19548   ac_check_lib_save_LIBS=$LIBS
19549 LIBS="-liconv  $LIBS"
19550 cat >"conftest.$ac_ext" <<_ACEOF
19551 #line 19551 "configure"
19552 #include "confdefs.h"
19553
19554 /* Override any gcc2 internal prototype to avoid an error.  */
19555 #ifdef __cplusplus
19556 extern "C"
19557 #endif
19558 /* We use char because int might match the return type of a gcc2
19559    builtin and then its argument prototype would still apply.  */
19560 char libiconv_open ();
19561 int
19562 main (void)
19563 {
19564 libiconv_open ();
19565   ;
19566   return 0;
19567 }
19568 _ACEOF
19569 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19570 if { (eval echo "$as_me:19570: \"$ac_link\"") >&5
19571   (eval $ac_link) 2>&5
19572   ac_status=$?
19573   echo "$as_me:19573: \$? = $ac_status" >&5
19574   (exit "$ac_status"); } &&
19575          { ac_try='test -s "conftest$ac_exeext"'
19576   { (eval echo "$as_me:19576: \"$ac_try\"") >&5
19577   (eval $ac_try) 2>&5
19578   ac_status=$?
19579   echo "$as_me:19579: \$? = $ac_status" >&5
19580   (exit "$ac_status"); }; }; then
19581   ac_cv_lib_iconv_libiconv_open=yes
19582 else
19583   echo "$as_me: failed program was:" >&5
19584 cat "conftest.$ac_ext" >&5
19585 ac_cv_lib_iconv_libiconv_open=no
19586 fi
19587 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19588 LIBS=$ac_check_lib_save_LIBS
19589 fi
19590 echo "$as_me:19590: result: $ac_cv_lib_iconv_libiconv_open" >&5
19591 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19592 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19593
19594 cf_add_libs="$LIBS"
19595 # reverse order
19596 cf_add_0lib=
19597 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19598 # filter duplicates
19599 for cf_add_1lib in $cf_add_0lib; do
19600         for cf_add_2lib in $cf_add_libs; do
19601                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19602                         cf_add_1lib=
19603                         break
19604                 fi
19605         done
19606         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19607 done
19608 LIBS="$cf_add_libs"
19609
19610 fi
19611
19612                 echo "$as_me:19612: checking for libintl_gettext in -lintl" >&5
19613 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19614 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19615   echo $ECHO_N "(cached) $ECHO_C" >&6
19616 else
19617   ac_check_lib_save_LIBS=$LIBS
19618 LIBS="-lintl  $LIBS"
19619 cat >"conftest.$ac_ext" <<_ACEOF
19620 #line 19620 "configure"
19621 #include "confdefs.h"
19622
19623 /* Override any gcc2 internal prototype to avoid an error.  */
19624 #ifdef __cplusplus
19625 extern "C"
19626 #endif
19627 /* We use char because int might match the return type of a gcc2
19628    builtin and then its argument prototype would still apply.  */
19629 char libintl_gettext ();
19630 int
19631 main (void)
19632 {
19633 libintl_gettext ();
19634   ;
19635   return 0;
19636 }
19637 _ACEOF
19638 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19639 if { (eval echo "$as_me:19639: \"$ac_link\"") >&5
19640   (eval $ac_link) 2>&5
19641   ac_status=$?
19642   echo "$as_me:19642: \$? = $ac_status" >&5
19643   (exit "$ac_status"); } &&
19644          { ac_try='test -s "conftest$ac_exeext"'
19645   { (eval echo "$as_me:19645: \"$ac_try\"") >&5
19646   (eval $ac_try) 2>&5
19647   ac_status=$?
19648   echo "$as_me:19648: \$? = $ac_status" >&5
19649   (exit "$ac_status"); }; }; then
19650   ac_cv_lib_intl_libintl_gettext=yes
19651 else
19652   echo "$as_me: failed program was:" >&5
19653 cat "conftest.$ac_ext" >&5
19654 ac_cv_lib_intl_libintl_gettext=no
19655 fi
19656 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19657 LIBS=$ac_check_lib_save_LIBS
19658 fi
19659 echo "$as_me:19659: result: $ac_cv_lib_intl_libintl_gettext" >&5
19660 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19661 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19662
19663 cf_add_libs="$LIBS"
19664 # reverse order
19665 cf_add_0lib=
19666 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19667 # filter duplicates
19668 for cf_add_1lib in $cf_add_0lib; do
19669         for cf_add_2lib in $cf_add_libs; do
19670                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19671                         cf_add_1lib=
19672                         break
19673                 fi
19674         done
19675         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19676 done
19677 LIBS="$cf_add_libs"
19678
19679 fi
19680
19681                 echo "$as_me:19681: checking for tre_regcomp in -ltre" >&5
19682 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19683 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19684   echo $ECHO_N "(cached) $ECHO_C" >&6
19685 else
19686   ac_check_lib_save_LIBS=$LIBS
19687 LIBS="-ltre  $LIBS"
19688 cat >"conftest.$ac_ext" <<_ACEOF
19689 #line 19689 "configure"
19690 #include "confdefs.h"
19691
19692 /* Override any gcc2 internal prototype to avoid an error.  */
19693 #ifdef __cplusplus
19694 extern "C"
19695 #endif
19696 /* We use char because int might match the return type of a gcc2
19697    builtin and then its argument prototype would still apply.  */
19698 char tre_regcomp ();
19699 int
19700 main (void)
19701 {
19702 tre_regcomp ();
19703   ;
19704   return 0;
19705 }
19706 _ACEOF
19707 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19708 if { (eval echo "$as_me:19708: \"$ac_link\"") >&5
19709   (eval $ac_link) 2>&5
19710   ac_status=$?
19711   echo "$as_me:19711: \$? = $ac_status" >&5
19712   (exit "$ac_status"); } &&
19713          { ac_try='test -s "conftest$ac_exeext"'
19714   { (eval echo "$as_me:19714: \"$ac_try\"") >&5
19715   (eval $ac_try) 2>&5
19716   ac_status=$?
19717   echo "$as_me:19717: \$? = $ac_status" >&5
19718   (exit "$ac_status"); }; }; then
19719   ac_cv_lib_tre_tre_regcomp=yes
19720 else
19721   echo "$as_me: failed program was:" >&5
19722 cat "conftest.$ac_ext" >&5
19723 ac_cv_lib_tre_tre_regcomp=no
19724 fi
19725 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19726 LIBS=$ac_check_lib_save_LIBS
19727 fi
19728 echo "$as_me:19728: result: $ac_cv_lib_tre_tre_regcomp" >&5
19729 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19730 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19731
19732 cf_add_libs="$LIBS"
19733 # reverse order
19734 cf_add_0lib=
19735 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19736 # filter duplicates
19737 for cf_add_1lib in $cf_add_0lib; do
19738         for cf_add_2lib in $cf_add_libs; do
19739                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19740                         cf_add_1lib=
19741                         break
19742                 fi
19743         done
19744         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19745 done
19746 LIBS="$cf_add_libs"
19747
19748 fi
19749
19750 cf_add_libs="$LIBS"
19751 # reverse order
19752 cf_add_0lib=
19753 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19754 # filter duplicates
19755 for cf_add_1lib in $cf_add_0lib; do
19756         for cf_add_2lib in $cf_add_libs; do
19757                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19758                         cf_add_1lib=
19759                         break
19760                 fi
19761         done
19762         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19763 done
19764 LIBS="$cf_add_libs"
19765
19766                 cf_regex_func=regcomp
19767
19768 else
19769
19770                 echo "$as_me:19770: checking for regcomp in -lgnurx" >&5
19771 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19772 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19773   echo $ECHO_N "(cached) $ECHO_C" >&6
19774 else
19775   ac_check_lib_save_LIBS=$LIBS
19776 LIBS="-lgnurx  $LIBS"
19777 cat >"conftest.$ac_ext" <<_ACEOF
19778 #line 19778 "configure"
19779 #include "confdefs.h"
19780
19781 /* Override any gcc2 internal prototype to avoid an error.  */
19782 #ifdef __cplusplus
19783 extern "C"
19784 #endif
19785 /* We use char because int might match the return type of a gcc2
19786    builtin and then its argument prototype would still apply.  */
19787 char regcomp ();
19788 int
19789 main (void)
19790 {
19791 regcomp ();
19792   ;
19793   return 0;
19794 }
19795 _ACEOF
19796 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19797 if { (eval echo "$as_me:19797: \"$ac_link\"") >&5
19798   (eval $ac_link) 2>&5
19799   ac_status=$?
19800   echo "$as_me:19800: \$? = $ac_status" >&5
19801   (exit "$ac_status"); } &&
19802          { ac_try='test -s "conftest$ac_exeext"'
19803   { (eval echo "$as_me:19803: \"$ac_try\"") >&5
19804   (eval $ac_try) 2>&5
19805   ac_status=$?
19806   echo "$as_me:19806: \$? = $ac_status" >&5
19807   (exit "$ac_status"); }; }; then
19808   ac_cv_lib_gnurx_regcomp=yes
19809 else
19810   echo "$as_me: failed program was:" >&5
19811 cat "conftest.$ac_ext" >&5
19812 ac_cv_lib_gnurx_regcomp=no
19813 fi
19814 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19815 LIBS=$ac_check_lib_save_LIBS
19816 fi
19817 echo "$as_me:19817: result: $ac_cv_lib_gnurx_regcomp" >&5
19818 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19819 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19820
19821 cf_add_libs="$LIBS"
19822 # reverse order
19823 cf_add_0lib=
19824 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19825 # filter duplicates
19826 for cf_add_1lib in $cf_add_0lib; do
19827         for cf_add_2lib in $cf_add_libs; do
19828                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19829                         cf_add_1lib=
19830                         break
19831                 fi
19832         done
19833         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19834 done
19835 LIBS="$cf_add_libs"
19836
19837                         cf_regex_func=regcomp
19838 fi
19839
19840 fi
19841
19842         ;;
19843 (*)
19844         cf_regex_libs="regex re"
19845         echo "$as_me:19845: checking for regcomp" >&5
19846 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19847 if test "${ac_cv_func_regcomp+set}" = set; then
19848   echo $ECHO_N "(cached) $ECHO_C" >&6
19849 else
19850   cat >"conftest.$ac_ext" <<_ACEOF
19851 #line 19851 "configure"
19852 #include "confdefs.h"
19853 #define regcomp autoconf_temporary
19854 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19855 #undef regcomp
19856
19857 #ifdef __cplusplus
19858 extern "C"
19859 #endif
19860
19861 /* We use char because int might match the return type of a gcc2
19862    builtin and then its argument prototype would still apply.  */
19863 char regcomp (void);
19864
19865 int
19866 main (void)
19867 {
19868
19869 /* The GNU C library defines stubs for functions which it implements
19870     to always fail with ENOSYS.  Some functions are actually named
19871     something starting with __ and the normal name is an alias.  */
19872 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19873 #error found stub for regcomp
19874 #endif
19875
19876         return regcomp ();
19877   ;
19878   return 0;
19879 }
19880 _ACEOF
19881 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19882 if { (eval echo "$as_me:19882: \"$ac_link\"") >&5
19883   (eval $ac_link) 2>&5
19884   ac_status=$?
19885   echo "$as_me:19885: \$? = $ac_status" >&5
19886   (exit "$ac_status"); } &&
19887          { ac_try='test -s "conftest$ac_exeext"'
19888   { (eval echo "$as_me:19888: \"$ac_try\"") >&5
19889   (eval $ac_try) 2>&5
19890   ac_status=$?
19891   echo "$as_me:19891: \$? = $ac_status" >&5
19892   (exit "$ac_status"); }; }; then
19893   ac_cv_func_regcomp=yes
19894 else
19895   echo "$as_me: failed program was:" >&5
19896 cat "conftest.$ac_ext" >&5
19897 ac_cv_func_regcomp=no
19898 fi
19899 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19900 fi
19901 echo "$as_me:19901: result: $ac_cv_func_regcomp" >&5
19902 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19903 if test "$ac_cv_func_regcomp" = yes; then
19904   cf_regex_func=regcomp
19905 else
19906
19907                 for cf_regex_lib in $cf_regex_libs
19908                 do
19909                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19910 echo "$as_me:19910: checking for regcomp in -l$cf_regex_lib" >&5
19911 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19912 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19913   echo $ECHO_N "(cached) $ECHO_C" >&6
19914 else
19915   ac_check_lib_save_LIBS=$LIBS
19916 LIBS="-l$cf_regex_lib  $LIBS"
19917 cat >"conftest.$ac_ext" <<_ACEOF
19918 #line 19918 "configure"
19919 #include "confdefs.h"
19920
19921 /* Override any gcc2 internal prototype to avoid an error.  */
19922 #ifdef __cplusplus
19923 extern "C"
19924 #endif
19925 /* We use char because int might match the return type of a gcc2
19926    builtin and then its argument prototype would still apply.  */
19927 char regcomp ();
19928 int
19929 main (void)
19930 {
19931 regcomp ();
19932   ;
19933   return 0;
19934 }
19935 _ACEOF
19936 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19937 if { (eval echo "$as_me:19937: \"$ac_link\"") >&5
19938   (eval $ac_link) 2>&5
19939   ac_status=$?
19940   echo "$as_me:19940: \$? = $ac_status" >&5
19941   (exit "$ac_status"); } &&
19942          { ac_try='test -s "conftest$ac_exeext"'
19943   { (eval echo "$as_me:19943: \"$ac_try\"") >&5
19944   (eval $ac_try) 2>&5
19945   ac_status=$?
19946   echo "$as_me:19946: \$? = $ac_status" >&5
19947   (exit "$ac_status"); }; }; then
19948   eval "$as_ac_Lib=yes"
19949 else
19950   echo "$as_me: failed program was:" >&5
19951 cat "conftest.$ac_ext" >&5
19952 eval "$as_ac_Lib=no"
19953 fi
19954 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19955 LIBS=$ac_check_lib_save_LIBS
19956 fi
19957 echo "$as_me:19957: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19958 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19959 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19960
19961 cf_add_libs="$LIBS"
19962 # reverse order
19963 cf_add_0lib=
19964 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19965 # filter duplicates
19966 for cf_add_1lib in $cf_add_0lib; do
19967         for cf_add_2lib in $cf_add_libs; do
19968                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19969                         cf_add_1lib=
19970                         break
19971                 fi
19972         done
19973         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19974 done
19975 LIBS="$cf_add_libs"
19976
19977                                         cf_regex_func=regcomp
19978                                         break
19979 fi
19980
19981                 done
19982
19983 fi
19984
19985         ;;
19986 esac
19987
19988 if test "$cf_regex_func" = no ; then
19989         echo "$as_me:19989: checking for compile" >&5
19990 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19991 if test "${ac_cv_func_compile+set}" = set; then
19992   echo $ECHO_N "(cached) $ECHO_C" >&6
19993 else
19994   cat >"conftest.$ac_ext" <<_ACEOF
19995 #line 19995 "configure"
19996 #include "confdefs.h"
19997 #define compile autoconf_temporary
19998 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19999 #undef compile
20000
20001 #ifdef __cplusplus
20002 extern "C"
20003 #endif
20004
20005 /* We use char because int might match the return type of a gcc2
20006    builtin and then its argument prototype would still apply.  */
20007 char compile (void);
20008
20009 int
20010 main (void)
20011 {
20012
20013 /* The GNU C library defines stubs for functions which it implements
20014     to always fail with ENOSYS.  Some functions are actually named
20015     something starting with __ and the normal name is an alias.  */
20016 #if defined (__stub_compile) || defined (__stub___compile)
20017 #error found stub for compile
20018 #endif
20019
20020         return compile ();
20021   ;
20022   return 0;
20023 }
20024 _ACEOF
20025 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20026 if { (eval echo "$as_me:20026: \"$ac_link\"") >&5
20027   (eval $ac_link) 2>&5
20028   ac_status=$?
20029   echo "$as_me:20029: \$? = $ac_status" >&5
20030   (exit "$ac_status"); } &&
20031          { ac_try='test -s "conftest$ac_exeext"'
20032   { (eval echo "$as_me:20032: \"$ac_try\"") >&5
20033   (eval $ac_try) 2>&5
20034   ac_status=$?
20035   echo "$as_me:20035: \$? = $ac_status" >&5
20036   (exit "$ac_status"); }; }; then
20037   ac_cv_func_compile=yes
20038 else
20039   echo "$as_me: failed program was:" >&5
20040 cat "conftest.$ac_ext" >&5
20041 ac_cv_func_compile=no
20042 fi
20043 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20044 fi
20045 echo "$as_me:20045: result: $ac_cv_func_compile" >&5
20046 echo "${ECHO_T}$ac_cv_func_compile" >&6
20047 if test "$ac_cv_func_compile" = yes; then
20048   cf_regex_func=compile
20049 else
20050
20051                 echo "$as_me:20051: checking for compile in -lgen" >&5
20052 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
20053 if test "${ac_cv_lib_gen_compile+set}" = set; then
20054   echo $ECHO_N "(cached) $ECHO_C" >&6
20055 else
20056   ac_check_lib_save_LIBS=$LIBS
20057 LIBS="-lgen  $LIBS"
20058 cat >"conftest.$ac_ext" <<_ACEOF
20059 #line 20059 "configure"
20060 #include "confdefs.h"
20061
20062 /* Override any gcc2 internal prototype to avoid an error.  */
20063 #ifdef __cplusplus
20064 extern "C"
20065 #endif
20066 /* We use char because int might match the return type of a gcc2
20067    builtin and then its argument prototype would still apply.  */
20068 char compile ();
20069 int
20070 main (void)
20071 {
20072 compile ();
20073   ;
20074   return 0;
20075 }
20076 _ACEOF
20077 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20078 if { (eval echo "$as_me:20078: \"$ac_link\"") >&5
20079   (eval $ac_link) 2>&5
20080   ac_status=$?
20081   echo "$as_me:20081: \$? = $ac_status" >&5
20082   (exit "$ac_status"); } &&
20083          { ac_try='test -s "conftest$ac_exeext"'
20084   { (eval echo "$as_me:20084: \"$ac_try\"") >&5
20085   (eval $ac_try) 2>&5
20086   ac_status=$?
20087   echo "$as_me:20087: \$? = $ac_status" >&5
20088   (exit "$ac_status"); }; }; then
20089   ac_cv_lib_gen_compile=yes
20090 else
20091   echo "$as_me: failed program was:" >&5
20092 cat "conftest.$ac_ext" >&5
20093 ac_cv_lib_gen_compile=no
20094 fi
20095 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20096 LIBS=$ac_check_lib_save_LIBS
20097 fi
20098 echo "$as_me:20098: result: $ac_cv_lib_gen_compile" >&5
20099 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
20100 if test "$ac_cv_lib_gen_compile" = yes; then
20101
20102 cf_add_libs="$LIBS"
20103 # reverse order
20104 cf_add_0lib=
20105 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20106 # filter duplicates
20107 for cf_add_1lib in $cf_add_0lib; do
20108         for cf_add_2lib in $cf_add_libs; do
20109                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20110                         cf_add_1lib=
20111                         break
20112                 fi
20113         done
20114         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20115 done
20116 LIBS="$cf_add_libs"
20117
20118                                 cf_regex_func=compile
20119 fi
20120
20121 fi
20122
20123 fi
20124
20125 if test "$cf_regex_func" = no ; then
20126         { echo "$as_me:20126: WARNING: cannot find regular expression library" >&5
20127 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
20128 fi
20129
20130 echo "$as_me:20130: checking for regular-expression headers" >&5
20131 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
20132 if test "${cf_cv_regex_hdrs+set}" = set; then
20133   echo $ECHO_N "(cached) $ECHO_C" >&6
20134 else
20135
20136 cf_cv_regex_hdrs=no
20137 case "$cf_regex_func" in
20138 (compile)
20139         for cf_regex_hdr in regexp.h regexpr.h
20140         do
20141                 cat >"conftest.$ac_ext" <<_ACEOF
20142 #line 20142 "configure"
20143 #include "confdefs.h"
20144 #include <$cf_regex_hdr>
20145 int
20146 main (void)
20147 {
20148
20149                         char *p = compile("", "", "", 0);
20150                         int x = step("", "");
20151                         (void)p;
20152                         (void)x;
20153
20154   ;
20155   return 0;
20156 }
20157 _ACEOF
20158 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20159 if { (eval echo "$as_me:20159: \"$ac_link\"") >&5
20160   (eval $ac_link) 2>&5
20161   ac_status=$?
20162   echo "$as_me:20162: \$? = $ac_status" >&5
20163   (exit "$ac_status"); } &&
20164          { ac_try='test -s "conftest$ac_exeext"'
20165   { (eval echo "$as_me:20165: \"$ac_try\"") >&5
20166   (eval $ac_try) 2>&5
20167   ac_status=$?
20168   echo "$as_me:20168: \$? = $ac_status" >&5
20169   (exit "$ac_status"); }; }; then
20170
20171                         cf_cv_regex_hdrs=$cf_regex_hdr
20172                         break
20173
20174 else
20175   echo "$as_me: failed program was:" >&5
20176 cat "conftest.$ac_ext" >&5
20177 fi
20178 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20179         done
20180         ;;
20181 (*)
20182         for cf_regex_hdr in regex.h
20183         do
20184                 cat >"conftest.$ac_ext" <<_ACEOF
20185 #line 20185 "configure"
20186 #include "confdefs.h"
20187 #include <sys/types.h>
20188 #include <$cf_regex_hdr>
20189 int
20190 main (void)
20191 {
20192
20193                         regex_t *p = 0;
20194                         int x = regcomp(p, "", 0);
20195                         int y = regexec(p, "", 0, 0, 0);
20196                         (void)x;
20197                         (void)y;
20198                         regfree(p);
20199
20200   ;
20201   return 0;
20202 }
20203 _ACEOF
20204 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20205 if { (eval echo "$as_me:20205: \"$ac_link\"") >&5
20206   (eval $ac_link) 2>&5
20207   ac_status=$?
20208   echo "$as_me:20208: \$? = $ac_status" >&5
20209   (exit "$ac_status"); } &&
20210          { ac_try='test -s "conftest$ac_exeext"'
20211   { (eval echo "$as_me:20211: \"$ac_try\"") >&5
20212   (eval $ac_try) 2>&5
20213   ac_status=$?
20214   echo "$as_me:20214: \$? = $ac_status" >&5
20215   (exit "$ac_status"); }; }; then
20216
20217                         cf_cv_regex_hdrs=$cf_regex_hdr
20218                         break
20219
20220 else
20221   echo "$as_me: failed program was:" >&5
20222 cat "conftest.$ac_ext" >&5
20223 fi
20224 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20225         done
20226         ;;
20227 esac
20228
20229 fi
20230 echo "$as_me:20230: result: $cf_cv_regex_hdrs" >&5
20231 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
20232
20233 case "$cf_cv_regex_hdrs" in
20234         (no)            { echo "$as_me:20234: WARNING: no regular expression header found" >&5
20235 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
20236         (regex.h)
20237 cat >>confdefs.h <<\EOF
20238 #define HAVE_REGEX_H_FUNCS 1
20239 EOF
20240  ;;
20241         (regexp.h)
20242 cat >>confdefs.h <<\EOF
20243 #define HAVE_REGEXP_H_FUNCS 1
20244 EOF
20245  ;;
20246         (regexpr.h)
20247 cat >>confdefs.h <<\EOF
20248 #define HAVE_REGEXPR_H_FUNCS 1
20249 EOF
20250  ;;
20251 esac
20252
20253 for ac_header in \
20254 fcntl.h \
20255 getopt.h \
20256 limits.h \
20257 locale.h \
20258 math.h \
20259 poll.h \
20260 sys/ioctl.h \
20261 sys/param.h \
20262 sys/poll.h \
20263 sys/select.h \
20264 sys/time.h \
20265 sys/times.h \
20266 unistd.h \
20267 wctype.h \
20268
20269 do
20270 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20271 echo "$as_me:20271: checking for $ac_header" >&5
20272 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20273 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20274   echo $ECHO_N "(cached) $ECHO_C" >&6
20275 else
20276   cat >"conftest.$ac_ext" <<_ACEOF
20277 #line 20277 "configure"
20278 #include "confdefs.h"
20279 #include <$ac_header>
20280 _ACEOF
20281 if { (eval echo "$as_me:20281: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20282   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20283   ac_status=$?
20284   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20285   rm -f conftest.er1
20286   cat conftest.err >&5
20287   echo "$as_me:20287: \$? = $ac_status" >&5
20288   (exit "$ac_status"); } >/dev/null; then
20289   if test -s conftest.err; then
20290     ac_cpp_err=$ac_c_preproc_warn_flag
20291   else
20292     ac_cpp_err=
20293   fi
20294 else
20295   ac_cpp_err=yes
20296 fi
20297 if test -z "$ac_cpp_err"; then
20298   eval "$as_ac_Header=yes"
20299 else
20300   echo "$as_me: failed program was:" >&5
20301   cat "conftest.$ac_ext" >&5
20302   eval "$as_ac_Header=no"
20303 fi
20304 rm -f conftest.err "conftest.$ac_ext"
20305 fi
20306 echo "$as_me:20306: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20307 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20308 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20309   cat >>confdefs.h <<EOF
20310 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20311 EOF
20312
20313 fi
20314 done
20315
20316 for ac_header in unistd.h getopt.h
20317 do
20318 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20319 echo "$as_me:20319: checking for $ac_header" >&5
20320 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20321 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20322   echo $ECHO_N "(cached) $ECHO_C" >&6
20323 else
20324   cat >"conftest.$ac_ext" <<_ACEOF
20325 #line 20325 "configure"
20326 #include "confdefs.h"
20327 #include <$ac_header>
20328 _ACEOF
20329 if { (eval echo "$as_me:20329: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20330   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20331   ac_status=$?
20332   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20333   rm -f conftest.er1
20334   cat conftest.err >&5
20335   echo "$as_me:20335: \$? = $ac_status" >&5
20336   (exit "$ac_status"); } >/dev/null; then
20337   if test -s conftest.err; then
20338     ac_cpp_err=$ac_c_preproc_warn_flag
20339   else
20340     ac_cpp_err=
20341   fi
20342 else
20343   ac_cpp_err=yes
20344 fi
20345 if test -z "$ac_cpp_err"; then
20346   eval "$as_ac_Header=yes"
20347 else
20348   echo "$as_me: failed program was:" >&5
20349   cat "conftest.$ac_ext" >&5
20350   eval "$as_ac_Header=no"
20351 fi
20352 rm -f conftest.err "conftest.$ac_ext"
20353 fi
20354 echo "$as_me:20354: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20355 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20356 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20357   cat >>confdefs.h <<EOF
20358 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20359 EOF
20360
20361 fi
20362 done
20363
20364 echo "$as_me:20364: checking for header declaring getopt variables" >&5
20365 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
20366 if test "${cf_cv_getopt_header+set}" = set; then
20367   echo $ECHO_N "(cached) $ECHO_C" >&6
20368 else
20369
20370 cf_cv_getopt_header=none
20371 for cf_header in stdio.h stdlib.h unistd.h getopt.h
20372 do
20373 cat >"conftest.$ac_ext" <<_ACEOF
20374 #line 20374 "configure"
20375 #include "confdefs.h"
20376
20377 #include <$cf_header>
20378 int
20379 main (void)
20380 {
20381 int x = optind; char *y = optarg; (void)x; (void)y
20382   ;
20383   return 0;
20384 }
20385 _ACEOF
20386 rm -f "conftest.$ac_objext"
20387 if { (eval echo "$as_me:20387: \"$ac_compile\"") >&5
20388   (eval $ac_compile) 2>&5
20389   ac_status=$?
20390   echo "$as_me:20390: \$? = $ac_status" >&5
20391   (exit "$ac_status"); } &&
20392          { ac_try='test -s "conftest.$ac_objext"'
20393   { (eval echo "$as_me:20393: \"$ac_try\"") >&5
20394   (eval $ac_try) 2>&5
20395   ac_status=$?
20396   echo "$as_me:20396: \$? = $ac_status" >&5
20397   (exit "$ac_status"); }; }; then
20398   cf_cv_getopt_header=$cf_header
20399  break
20400 else
20401   echo "$as_me: failed program was:" >&5
20402 cat "conftest.$ac_ext" >&5
20403 fi
20404 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20405 done
20406
20407 fi
20408 echo "$as_me:20408: result: $cf_cv_getopt_header" >&5
20409 echo "${ECHO_T}$cf_cv_getopt_header" >&6
20410 if test "$cf_cv_getopt_header" != none ; then
20411
20412 cat >>confdefs.h <<\EOF
20413 #define HAVE_GETOPT_HEADER 1
20414 EOF
20415
20416 fi
20417 if test "$cf_cv_getopt_header" = getopt.h ; then
20418
20419 cat >>confdefs.h <<\EOF
20420 #define NEED_GETOPT_H 1
20421 EOF
20422
20423 fi
20424
20425 echo "$as_me:20425: checking if external environ is declared" >&5
20426 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
20427 if test "${cf_cv_dcl_environ+set}" = set; then
20428   echo $ECHO_N "(cached) $ECHO_C" >&6
20429 else
20430
20431     cat >"conftest.$ac_ext" <<_ACEOF
20432 #line 20432 "configure"
20433 #include "confdefs.h"
20434
20435 #ifdef HAVE_STDLIB_H
20436 #include <stdlib.h>
20437 #endif
20438 #include <unistd.h>
20439 int
20440 main (void)
20441 {
20442 void* x = (void*) environ; (void)x
20443   ;
20444   return 0;
20445 }
20446 _ACEOF
20447 rm -f "conftest.$ac_objext"
20448 if { (eval echo "$as_me:20448: \"$ac_compile\"") >&5
20449   (eval $ac_compile) 2>&5
20450   ac_status=$?
20451   echo "$as_me:20451: \$? = $ac_status" >&5
20452   (exit "$ac_status"); } &&
20453          { ac_try='test -s "conftest.$ac_objext"'
20454   { (eval echo "$as_me:20454: \"$ac_try\"") >&5
20455   (eval $ac_try) 2>&5
20456   ac_status=$?
20457   echo "$as_me:20457: \$? = $ac_status" >&5
20458   (exit "$ac_status"); }; }; then
20459   cf_cv_dcl_environ=yes
20460 else
20461   echo "$as_me: failed program was:" >&5
20462 cat "conftest.$ac_ext" >&5
20463 cf_cv_dcl_environ=no
20464 fi
20465 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20466
20467 fi
20468 echo "$as_me:20468: result: $cf_cv_dcl_environ" >&5
20469 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20470
20471 if test "$cf_cv_dcl_environ" = no ; then
20472
20473 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20474
20475     cat >>confdefs.h <<EOF
20476 #define $cf_result 1
20477 EOF
20478
20479 fi
20480
20481 # It's possible (for near-UNIX clones) that the data doesn't exist
20482
20483 echo "$as_me:20483: checking if external environ exists" >&5
20484 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20485 if test "${cf_cv_have_environ+set}" = set; then
20486   echo $ECHO_N "(cached) $ECHO_C" >&6
20487 else
20488
20489         cat >"conftest.$ac_ext" <<_ACEOF
20490 #line 20490 "configure"
20491 #include "confdefs.h"
20492
20493 #undef environ
20494 extern int environ;
20495
20496 int
20497 main (void)
20498 {
20499 environ = 2
20500   ;
20501   return 0;
20502 }
20503 _ACEOF
20504 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20505 if { (eval echo "$as_me:20505: \"$ac_link\"") >&5
20506   (eval $ac_link) 2>&5
20507   ac_status=$?
20508   echo "$as_me:20508: \$? = $ac_status" >&5
20509   (exit "$ac_status"); } &&
20510          { ac_try='test -s "conftest$ac_exeext"'
20511   { (eval echo "$as_me:20511: \"$ac_try\"") >&5
20512   (eval $ac_try) 2>&5
20513   ac_status=$?
20514   echo "$as_me:20514: \$? = $ac_status" >&5
20515   (exit "$ac_status"); }; }; then
20516   cf_cv_have_environ=yes
20517 else
20518   echo "$as_me: failed program was:" >&5
20519 cat "conftest.$ac_ext" >&5
20520 cf_cv_have_environ=no
20521 fi
20522 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20523
20524 fi
20525 echo "$as_me:20525: result: $cf_cv_have_environ" >&5
20526 echo "${ECHO_T}$cf_cv_have_environ" >&6
20527
20528 if test "$cf_cv_have_environ" = yes ; then
20529
20530 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20531
20532         cat >>confdefs.h <<EOF
20533 #define $cf_result 1
20534 EOF
20535
20536 fi
20537
20538 echo "$as_me:20538: checking for getenv" >&5
20539 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20540 if test "${ac_cv_func_getenv+set}" = set; then
20541   echo $ECHO_N "(cached) $ECHO_C" >&6
20542 else
20543   cat >"conftest.$ac_ext" <<_ACEOF
20544 #line 20544 "configure"
20545 #include "confdefs.h"
20546 #define getenv autoconf_temporary
20547 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20548 #undef getenv
20549
20550 #ifdef __cplusplus
20551 extern "C"
20552 #endif
20553
20554 /* We use char because int might match the return type of a gcc2
20555    builtin and then its argument prototype would still apply.  */
20556 char getenv (void);
20557
20558 int
20559 main (void)
20560 {
20561
20562 /* The GNU C library defines stubs for functions which it implements
20563     to always fail with ENOSYS.  Some functions are actually named
20564     something starting with __ and the normal name is an alias.  */
20565 #if defined (__stub_getenv) || defined (__stub___getenv)
20566 #error found stub for getenv
20567 #endif
20568
20569         return getenv ();
20570   ;
20571   return 0;
20572 }
20573 _ACEOF
20574 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20575 if { (eval echo "$as_me:20575: \"$ac_link\"") >&5
20576   (eval $ac_link) 2>&5
20577   ac_status=$?
20578   echo "$as_me:20578: \$? = $ac_status" >&5
20579   (exit "$ac_status"); } &&
20580          { ac_try='test -s "conftest$ac_exeext"'
20581   { (eval echo "$as_me:20581: \"$ac_try\"") >&5
20582   (eval $ac_try) 2>&5
20583   ac_status=$?
20584   echo "$as_me:20584: \$? = $ac_status" >&5
20585   (exit "$ac_status"); }; }; then
20586   ac_cv_func_getenv=yes
20587 else
20588   echo "$as_me: failed program was:" >&5
20589 cat "conftest.$ac_ext" >&5
20590 ac_cv_func_getenv=no
20591 fi
20592 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20593 fi
20594 echo "$as_me:20594: result: $ac_cv_func_getenv" >&5
20595 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20596
20597 for ac_func in putenv setenv strdup
20598 do
20599 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20600 echo "$as_me:20600: checking for $ac_func" >&5
20601 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20602 if eval "test \"\${$as_ac_var+set}\" = set"; then
20603   echo $ECHO_N "(cached) $ECHO_C" >&6
20604 else
20605   cat >"conftest.$ac_ext" <<_ACEOF
20606 #line 20606 "configure"
20607 #include "confdefs.h"
20608 #define $ac_func autoconf_temporary
20609 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20610 #undef $ac_func
20611
20612 #ifdef __cplusplus
20613 extern "C"
20614 #endif
20615
20616 /* We use char because int might match the return type of a gcc2
20617    builtin and then its argument prototype would still apply.  */
20618 char $ac_func (void);
20619
20620 int
20621 main (void)
20622 {
20623
20624 /* The GNU C library defines stubs for functions which it implements
20625     to always fail with ENOSYS.  Some functions are actually named
20626     something starting with __ and the normal name is an alias.  */
20627 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20628 #error found stub for $ac_func
20629 #endif
20630
20631         return $ac_func ();
20632   ;
20633   return 0;
20634 }
20635 _ACEOF
20636 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20637 if { (eval echo "$as_me:20637: \"$ac_link\"") >&5
20638   (eval $ac_link) 2>&5
20639   ac_status=$?
20640   echo "$as_me:20640: \$? = $ac_status" >&5
20641   (exit "$ac_status"); } &&
20642          { ac_try='test -s "conftest$ac_exeext"'
20643   { (eval echo "$as_me:20643: \"$ac_try\"") >&5
20644   (eval $ac_try) 2>&5
20645   ac_status=$?
20646   echo "$as_me:20646: \$? = $ac_status" >&5
20647   (exit "$ac_status"); }; }; then
20648   eval "$as_ac_var=yes"
20649 else
20650   echo "$as_me: failed program was:" >&5
20651 cat "conftest.$ac_ext" >&5
20652 eval "$as_ac_var=no"
20653 fi
20654 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20655 fi
20656 echo "$as_me:20656: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20657 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20658 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20659   cat >>confdefs.h <<EOF
20660 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20661 EOF
20662
20663 fi
20664 done
20665
20666 echo "$as_me:20666: checking if getenv returns consistent values" >&5
20667 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20668 if test "${cf_cv_consistent_getenv+set}" = set; then
20669   echo $ECHO_N "(cached) $ECHO_C" >&6
20670 else
20671
20672 if test "$cross_compiling" = yes; then
20673   cf_cv_consistent_getenv=unknown
20674 else
20675   cat >"conftest.$ac_ext" <<_ACEOF
20676 #line 20676 "configure"
20677 #include "confdefs.h"
20678
20679 $ac_includes_default
20680
20681 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20682 extern char **environ;  /* POSIX, but some systems are not... */
20683 #endif
20684
20685 #if defined(HAVE_STRDUP)
20686 #define str_alloc(s) strdup(s)
20687 #else
20688 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20689 #endif
20690
20691 static void set_value(const char *name, const char *value)
20692 {
20693 #if defined(HAVE_SETENV)
20694         setenv(name, value, 1);
20695 #elif defined(HAVE_PUTENV)
20696         char buffer[1024];
20697         sprintf(buffer, "%s=%s", name, value);
20698         putenv(str_alloc(buffer));
20699 #else
20700 #error neither putenv/setenv found
20701 #endif
20702 }
20703 int main(void)
20704 {
20705         int pass;
20706         size_t numenv, limit, j;
20707         char **mynames;
20708         char **myvalues;
20709         char **mypointer;
20710         char *equals;
20711         for (numenv = 0; environ[numenv]; ++numenv) ;
20712         limit = numenv + 10;
20713         mynames = (char **) calloc(limit + 1, sizeof(char *));
20714         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20715         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20716 #if defined(HAVE_ENVIRON)
20717         for (j = 0; environ[j]; ++j) {
20718                 mynames[j] = str_alloc(environ[j]);
20719                 equals = strchr(mynames[j], '=');
20720                 if (equals != 0) {
20721                         *equals++ = '\\0';
20722                         myvalues[j] = str_alloc(equals);
20723                 } else {
20724                         myvalues[j] = str_alloc("");
20725                 }
20726         }
20727 #endif
20728         for (j = numenv; j < limit; ++j) {
20729                 char name[80];
20730                 char value[80];
20731                 size_t found;
20732                 size_t k = 0;
20733                 do {
20734                         size_t jk;
20735                         found = 0;
20736                         sprintf(name, "TERM%lu", (unsigned long) k);
20737                         for (jk = 0; jk < j; ++jk) {
20738                                 if (!strcmp(name, mynames[jk])) {
20739                                         found = 1;
20740                                         ++k;
20741                                         break;
20742                                 }
20743                         }
20744                 } while (found);
20745                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20746                 set_value(name, value);
20747                 mynames[j] = str_alloc(name);
20748                 myvalues[j] = str_alloc(value);
20749         }
20750         for (pass = 0; pass < 3; ++pass) {
20751                 for (j = 0; j < limit; ++j) {
20752                         char *value = getenv(mynames[j]);
20753                         if (pass) {
20754                                 if (value == 0) {
20755                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20756                                         ${cf_cv_main_return:-return}(1);
20757                                 } else if (value != mypointer[j]) {
20758                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20759                                         ${cf_cv_main_return:-return}(1);
20760                                 } else if (strcmp(value, myvalues[j])) {
20761                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20762                                         ${cf_cv_main_return:-return}(1);
20763                                 }
20764                         } else {
20765                                 size_t k;
20766                                 mypointer[j] = value;
20767                                 for (k = 0; k < j; ++k) {
20768                                         if (mypointer[j] == mypointer[k]) {
20769                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20770                                                 ${cf_cv_main_return:-return}(1);
20771                                         }
20772                                 }
20773                         }
20774                 }
20775         }
20776         ${cf_cv_main_return:-return}(0);
20777 }
20778
20779 _ACEOF
20780 rm -f "conftest$ac_exeext"
20781 if { (eval echo "$as_me:20781: \"$ac_link\"") >&5
20782   (eval $ac_link) 2>&5
20783   ac_status=$?
20784   echo "$as_me:20784: \$? = $ac_status" >&5
20785   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20786   { (eval echo "$as_me:20786: \"$ac_try\"") >&5
20787   (eval $ac_try) 2>&5
20788   ac_status=$?
20789   echo "$as_me:20789: \$? = $ac_status" >&5
20790   (exit "$ac_status"); }; }; then
20791   cf_cv_consistent_getenv=yes
20792 else
20793   echo "$as_me: program exited with status $ac_status" >&5
20794 echo "$as_me: failed program was:" >&5
20795 cat "conftest.$ac_ext" >&5
20796 cf_cv_consistent_getenv=no
20797 fi
20798 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20799 fi
20800
20801 fi
20802 echo "$as_me:20802: result: $cf_cv_consistent_getenv" >&5
20803 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20804
20805 if test "x$cf_cv_consistent_getenv" = xno
20806 then
20807
20808 cat >>confdefs.h <<\EOF
20809 #define HAVE_CONSISTENT_GETENV 1
20810 EOF
20811
20812 fi
20813
20814 if test "x$cf_cv_consistent_getenv" = xno && \
20815         test "x$cf_with_trace" = xyes
20816 then
20817         { echo "$as_me:20817: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20818 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20819 fi
20820
20821 echo "$as_me:20821: checking if sys/time.h works with sys/select.h" >&5
20822 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20823 if test "${cf_cv_sys_time_select+set}" = set; then
20824   echo $ECHO_N "(cached) $ECHO_C" >&6
20825 else
20826
20827 cat >"conftest.$ac_ext" <<_ACEOF
20828 #line 20828 "configure"
20829 #include "confdefs.h"
20830
20831 #include <sys/types.h>
20832 #ifdef HAVE_SYS_TIME_H
20833 #include <sys/time.h>
20834 #endif
20835 #ifdef HAVE_SYS_SELECT_H
20836 #include <sys/select.h>
20837 #endif
20838
20839 int
20840 main (void)
20841 {
20842
20843   ;
20844   return 0;
20845 }
20846 _ACEOF
20847 rm -f "conftest.$ac_objext"
20848 if { (eval echo "$as_me:20848: \"$ac_compile\"") >&5
20849   (eval $ac_compile) 2>&5
20850   ac_status=$?
20851   echo "$as_me:20851: \$? = $ac_status" >&5
20852   (exit "$ac_status"); } &&
20853          { ac_try='test -s "conftest.$ac_objext"'
20854   { (eval echo "$as_me:20854: \"$ac_try\"") >&5
20855   (eval $ac_try) 2>&5
20856   ac_status=$?
20857   echo "$as_me:20857: \$? = $ac_status" >&5
20858   (exit "$ac_status"); }; }; then
20859   cf_cv_sys_time_select=yes
20860 else
20861   echo "$as_me: failed program was:" >&5
20862 cat "conftest.$ac_ext" >&5
20863 cf_cv_sys_time_select=no
20864 fi
20865 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20866
20867 fi
20868
20869 echo "$as_me:20869: result: $cf_cv_sys_time_select" >&5
20870 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20871 test "$cf_cv_sys_time_select" = yes &&
20872 cat >>confdefs.h <<\EOF
20873 #define HAVE_SYS_TIME_SELECT 1
20874 EOF
20875
20876 ###     checks for compiler characteristics
20877 ac_ext=c
20878 ac_cpp='$CPP $CPPFLAGS'
20879 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20880 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20881 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20882 ac_main_return="return"
20883
20884 echo "$as_me:20884: checking for an ANSI C-conforming const" >&5
20885 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20886 if test "${ac_cv_c_const+set}" = set; then
20887   echo $ECHO_N "(cached) $ECHO_C" >&6
20888 else
20889   cat >"conftest.$ac_ext" <<_ACEOF
20890 #line 20890 "configure"
20891 #include "confdefs.h"
20892
20893 int
20894 main (void)
20895 {
20896 /* FIXME: Include the comments suggested by Paul. */
20897 #ifndef __cplusplus
20898   /* Ultrix mips cc rejects this.  */
20899   typedef int charset[2];
20900   const charset x;
20901   /* SunOS 4.1.1 cc rejects this.  */
20902   char const *const *ccp;
20903   char **p;
20904   /* NEC SVR4.0.2 mips cc rejects this.  */
20905   struct point {int x, y;};
20906   static struct point const zero = {0,0};
20907   /* AIX XL C 1.02.0.0 rejects this.
20908      It does not let you subtract one const X* pointer from another in
20909      an arm of an if-expression whose if-part is not a constant
20910      expression */
20911   const char *g = "string";
20912   ccp = &g + (g ? g-g : 0);
20913   /* HPUX 7.0 cc rejects these. */
20914   ++ccp;
20915   p = (char**) ccp;
20916   ccp = (char const *const *) p;
20917   { /* SCO 3.2v4 cc rejects this.  */
20918     char *t;
20919     char const *s = 0 ? (char *) 0 : (char const *) 0;
20920
20921     *t++ = 0;
20922   }
20923   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20924     int x[] = {25, 17};
20925     const int *foo = &x[0];
20926     ++foo;
20927   }
20928   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20929     typedef const int *iptr;
20930     iptr p = 0;
20931     ++p;
20932   }
20933   { /* AIX XL C 1.02.0.0 rejects this saying
20934        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20935     struct s { int j; const int *ap[3]; };
20936     struct s *b; b->j = 5;
20937   }
20938   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20939     const int foo = 10;
20940   }
20941 #endif
20942
20943   ;
20944   return 0;
20945 }
20946 _ACEOF
20947 rm -f "conftest.$ac_objext"
20948 if { (eval echo "$as_me:20948: \"$ac_compile\"") >&5
20949   (eval $ac_compile) 2>&5
20950   ac_status=$?
20951   echo "$as_me:20951: \$? = $ac_status" >&5
20952   (exit "$ac_status"); } &&
20953          { ac_try='test -s "conftest.$ac_objext"'
20954   { (eval echo "$as_me:20954: \"$ac_try\"") >&5
20955   (eval $ac_try) 2>&5
20956   ac_status=$?
20957   echo "$as_me:20957: \$? = $ac_status" >&5
20958   (exit "$ac_status"); }; }; then
20959   ac_cv_c_const=yes
20960 else
20961   echo "$as_me: failed program was:" >&5
20962 cat "conftest.$ac_ext" >&5
20963 ac_cv_c_const=no
20964 fi
20965 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20966 fi
20967 echo "$as_me:20967: result: $ac_cv_c_const" >&5
20968 echo "${ECHO_T}$ac_cv_c_const" >&6
20969 if test $ac_cv_c_const = no; then
20970
20971 cat >>confdefs.h <<\EOF
20972 #define const
20973 EOF
20974
20975 fi
20976
20977 echo "$as_me:20977: checking for inline" >&5
20978 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20979 if test "${ac_cv_c_inline+set}" = set; then
20980   echo $ECHO_N "(cached) $ECHO_C" >&6
20981 else
20982   ac_cv_c_inline=no
20983 for ac_kw in inline __inline__ __inline; do
20984   cat >"conftest.$ac_ext" <<_ACEOF
20985 #line 20985 "configure"
20986 #include "confdefs.h"
20987 #ifndef __cplusplus
20988 static $ac_kw int static_foo () {return 0; }
20989 $ac_kw int foo () {return 0; }
20990 #endif
20991
20992 _ACEOF
20993 rm -f "conftest.$ac_objext"
20994 if { (eval echo "$as_me:20994: \"$ac_compile\"") >&5
20995   (eval $ac_compile) 2>&5
20996   ac_status=$?
20997   echo "$as_me:20997: \$? = $ac_status" >&5
20998   (exit "$ac_status"); } &&
20999          { ac_try='test -s "conftest.$ac_objext"'
21000   { (eval echo "$as_me:21000: \"$ac_try\"") >&5
21001   (eval $ac_try) 2>&5
21002   ac_status=$?
21003   echo "$as_me:21003: \$? = $ac_status" >&5
21004   (exit "$ac_status"); }; }; then
21005   ac_cv_c_inline=$ac_kw; break
21006 else
21007   echo "$as_me: failed program was:" >&5
21008 cat "conftest.$ac_ext" >&5
21009 fi
21010 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21011 done
21012
21013 fi
21014 echo "$as_me:21014: result: $ac_cv_c_inline" >&5
21015 echo "${ECHO_T}$ac_cv_c_inline" >&6
21016 case $ac_cv_c_inline in
21017   inline | yes) ;;
21018   no)
21019 cat >>confdefs.h <<\EOF
21020 #define inline
21021 EOF
21022  ;;
21023   *)  cat >>confdefs.h <<EOF
21024 #define inline $ac_cv_c_inline
21025 EOF
21026  ;;
21027 esac
21028
21029 NCURSES_INLINE=
21030 if test "$ac_cv_c_inline" != no ; then
21031         NCURSES_INLINE=inline
21032         if test "$INTEL_COMPILER" = yes
21033         then
21034                 :
21035         elif test "$CLANG_COMPILER" = yes
21036         then
21037                 :
21038         elif test "$GCC" = yes
21039         then
21040                 echo "$as_me:21040: checking if $CC supports options to tune inlining" >&5
21041 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
21042 if test "${cf_cv_gcc_inline+set}" = set; then
21043   echo $ECHO_N "(cached) $ECHO_C" >&6
21044 else
21045
21046                 cf_save_CFLAGS=$CFLAGS
21047                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
21048                 cat >"conftest.$ac_ext" <<_ACEOF
21049 #line 21049 "configure"
21050 #include "confdefs.h"
21051 inline int foo(void) { return 1; }
21052 int
21053 main (void)
21054 {
21055 ${cf_cv_main_return:-return} foo()
21056   ;
21057   return 0;
21058 }
21059 _ACEOF
21060 rm -f "conftest.$ac_objext"
21061 if { (eval echo "$as_me:21061: \"$ac_compile\"") >&5
21062   (eval $ac_compile) 2>&5
21063   ac_status=$?
21064   echo "$as_me:21064: \$? = $ac_status" >&5
21065   (exit "$ac_status"); } &&
21066          { ac_try='test -s "conftest.$ac_objext"'
21067   { (eval echo "$as_me:21067: \"$ac_try\"") >&5
21068   (eval $ac_try) 2>&5
21069   ac_status=$?
21070   echo "$as_me:21070: \$? = $ac_status" >&5
21071   (exit "$ac_status"); }; }; then
21072   cf_cv_gcc_inline=yes
21073 else
21074   echo "$as_me: failed program was:" >&5
21075 cat "conftest.$ac_ext" >&5
21076 cf_cv_gcc_inline=no
21077 fi
21078 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21079                 CFLAGS=$cf_save_CFLAGS
21080
21081 fi
21082 echo "$as_me:21082: result: $cf_cv_gcc_inline" >&5
21083 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
21084                 if test "$cf_cv_gcc_inline" = yes ; then
21085
21086 cf_fix_cppflags=no
21087 cf_new_cflags=
21088 cf_new_cppflags=
21089 cf_new_extra_cppflags=
21090
21091 for cf_add_cflags in --param max-inline-insns-single=1200
21092 do
21093 case "$cf_fix_cppflags" in
21094 (no)
21095         case "$cf_add_cflags" in
21096         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21097                 case "$cf_add_cflags" in
21098                 (-D*)
21099                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21100
21101                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21102                                 && test -z "${cf_tst_cflags}" \
21103                                 && cf_fix_cppflags=yes
21104
21105                         if test "$cf_fix_cppflags" = yes ; then
21106
21107         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21108         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21109
21110                                 continue
21111                         elif test "${cf_tst_cflags}" = "\"'" ; then
21112
21113         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21114         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21115
21116                                 continue
21117                         fi
21118                         ;;
21119                 esac
21120                 case "$CPPFLAGS" in
21121                 (*$cf_add_cflags)
21122                         ;;
21123                 (*)
21124                         case "$cf_add_cflags" in
21125                         (-D*)
21126                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21127
21128 CPPFLAGS=`echo "$CPPFLAGS" | \
21129         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21130                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21131
21132                                 ;;
21133                         esac
21134
21135         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21136         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21137
21138                         ;;
21139                 esac
21140                 ;;
21141         (*)
21142
21143         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21144         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21145
21146                 ;;
21147         esac
21148         ;;
21149 (yes)
21150
21151         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21152         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21153
21154         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21155
21156         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21157                 && test -z "${cf_tst_cflags}" \
21158                 && cf_fix_cppflags=no
21159         ;;
21160 esac
21161 done
21162
21163 if test -n "$cf_new_cflags" ; then
21164
21165         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21166         CFLAGS="${CFLAGS}$cf_new_cflags"
21167
21168 fi
21169
21170 if test -n "$cf_new_cppflags" ; then
21171
21172         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21173         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21174
21175 fi
21176
21177 if test -n "$cf_new_extra_cppflags" ; then
21178
21179         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21180         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21181
21182 fi
21183
21184                 fi
21185         fi
21186 fi
21187
21188 echo "$as_me:21188: checking for signal global datatype" >&5
21189 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
21190 if test "${cf_cv_sig_atomic_t+set}" = set; then
21191   echo $ECHO_N "(cached) $ECHO_C" >&6
21192 else
21193
21194         for cf_type in \
21195                 "volatile sig_atomic_t" \
21196                 "sig_atomic_t" \
21197                 "int"
21198         do
21199         cat >"conftest.$ac_ext" <<_ACEOF
21200 #line 21200 "configure"
21201 #include "confdefs.h"
21202
21203 #include <sys/types.h>
21204 #include <signal.h>
21205 #include <stdio.h>
21206
21207 extern $cf_type x;
21208 $cf_type x;
21209 static void handler(int sig)
21210 {
21211         (void)sig;
21212         x = 5;
21213 }
21214 int
21215 main (void)
21216 {
21217 signal(SIGINT, handler);
21218                  x = 1
21219   ;
21220   return 0;
21221 }
21222 _ACEOF
21223 rm -f "conftest.$ac_objext"
21224 if { (eval echo "$as_me:21224: \"$ac_compile\"") >&5
21225   (eval $ac_compile) 2>&5
21226   ac_status=$?
21227   echo "$as_me:21227: \$? = $ac_status" >&5
21228   (exit "$ac_status"); } &&
21229          { ac_try='test -s "conftest.$ac_objext"'
21230   { (eval echo "$as_me:21230: \"$ac_try\"") >&5
21231   (eval $ac_try) 2>&5
21232   ac_status=$?
21233   echo "$as_me:21233: \$? = $ac_status" >&5
21234   (exit "$ac_status"); }; }; then
21235   cf_cv_sig_atomic_t=$cf_type
21236 else
21237   echo "$as_me: failed program was:" >&5
21238 cat "conftest.$ac_ext" >&5
21239 cf_cv_sig_atomic_t=no
21240 fi
21241 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21242                 test "$cf_cv_sig_atomic_t" != no && break
21243         done
21244
21245 fi
21246
21247 echo "$as_me:21247: result: $cf_cv_sig_atomic_t" >&5
21248 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
21249 test "$cf_cv_sig_atomic_t" != no &&
21250 cat >>confdefs.h <<EOF
21251 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
21252 EOF
21253
21254 if test "$NCURSES_CHTYPE" = auto ; then
21255
21256 echo "$as_me:21256: checking for type of chtype" >&5
21257 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
21258 if test "${cf_cv_typeof_chtype+set}" = set; then
21259   echo $ECHO_N "(cached) $ECHO_C" >&6
21260 else
21261
21262                 if test "$cross_compiling" = yes; then
21263   cf_cv_typeof_chtype=long
21264 else
21265   cat >"conftest.$ac_ext" <<_ACEOF
21266 #line 21266 "configure"
21267 #include "confdefs.h"
21268
21269 $ac_includes_default
21270 #define WANT_BITS 31
21271 int main(void)
21272 {
21273         FILE *fp = fopen("cf_test.out", "w");
21274         if (fp != 0) {
21275                 char *result = "long";
21276                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
21277                         int n;
21278                         unsigned int x, y;
21279                         for (n = 0; n < WANT_BITS; n++) {
21280                                 x = (1 << n);
21281                                 y = (x >> n);
21282                                 if (y != 1 || x == 0) {
21283                                         x = 0;
21284                                         break;
21285                                 }
21286                         }
21287                         /*
21288                          * If x is nonzero, an int is big enough for the bits
21289                          * that we want.
21290                          */
21291                         result = (x != 0) ? "int" : "long";
21292                 }
21293                 fputs(result, fp);
21294                 fclose(fp);
21295         }
21296         ${cf_cv_main_return:-return}(0);
21297 }
21298
21299 _ACEOF
21300 rm -f "conftest$ac_exeext"
21301 if { (eval echo "$as_me:21301: \"$ac_link\"") >&5
21302   (eval $ac_link) 2>&5
21303   ac_status=$?
21304   echo "$as_me:21304: \$? = $ac_status" >&5
21305   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21306   { (eval echo "$as_me:21306: \"$ac_try\"") >&5
21307   (eval $ac_try) 2>&5
21308   ac_status=$?
21309   echo "$as_me:21309: \$? = $ac_status" >&5
21310   (exit "$ac_status"); }; }; then
21311   cf_cv_typeof_chtype=`cat cf_test.out`
21312 else
21313   echo "$as_me: program exited with status $ac_status" >&5
21314 echo "$as_me: failed program was:" >&5
21315 cat "conftest.$ac_ext" >&5
21316 cf_cv_typeof_chtype=long
21317 fi
21318 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21319 fi
21320                 rm -f cf_test.out
21321
21322 fi
21323
21324 echo "$as_me:21324: result: $cf_cv_typeof_chtype" >&5
21325 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
21326
21327 cat >>confdefs.h <<EOF
21328 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
21329 EOF
21330
21331 else
21332         cf_cv_typeof_chtype=$NCURSES_CHTYPE
21333 fi
21334 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
21335
21336 echo "$as_me:21336: checking if unsigned literals are legal" >&5
21337 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
21338 if test "${cf_cv_unsigned_literals+set}" = set; then
21339   echo $ECHO_N "(cached) $ECHO_C" >&6
21340 else
21341
21342         cat >"conftest.$ac_ext" <<_ACEOF
21343 #line 21343 "configure"
21344 #include "confdefs.h"
21345
21346 int
21347 main (void)
21348 {
21349 long x = 1L + 1UL + 1U + 1
21350   ;
21351   return 0;
21352 }
21353 _ACEOF
21354 rm -f "conftest.$ac_objext"
21355 if { (eval echo "$as_me:21355: \"$ac_compile\"") >&5
21356   (eval $ac_compile) 2>&5
21357   ac_status=$?
21358   echo "$as_me:21358: \$? = $ac_status" >&5
21359   (exit "$ac_status"); } &&
21360          { ac_try='test -s "conftest.$ac_objext"'
21361   { (eval echo "$as_me:21361: \"$ac_try\"") >&5
21362   (eval $ac_try) 2>&5
21363   ac_status=$?
21364   echo "$as_me:21364: \$? = $ac_status" >&5
21365   (exit "$ac_status"); }; }; then
21366   cf_cv_unsigned_literals=yes
21367 else
21368   echo "$as_me: failed program was:" >&5
21369 cat "conftest.$ac_ext" >&5
21370 cf_cv_unsigned_literals=no
21371 fi
21372 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21373
21374 fi
21375
21376 echo "$as_me:21376: result: $cf_cv_unsigned_literals" >&5
21377 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
21378
21379 cf_cv_1UL="1"
21380 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
21381 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
21382
21383 if test "$NCURSES_MMASK_T" = auto ; then
21384         cf_cv_typeof_mmask_t=long
21385 else
21386         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
21387 fi
21388 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
21389
21390 ###     Checks for external-data
21391
21392 echo "$as_me:21392: checking if external errno is declared" >&5
21393 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
21394 if test "${cf_cv_dcl_errno+set}" = set; then
21395   echo $ECHO_N "(cached) $ECHO_C" >&6
21396 else
21397
21398         cat >"conftest.$ac_ext" <<_ACEOF
21399 #line 21399 "configure"
21400 #include "confdefs.h"
21401
21402 #ifdef HAVE_STDLIB_H
21403 #include <stdlib.h>
21404 #endif
21405 #include <stdio.h>
21406 #include <sys/types.h>
21407 #include <errno.h>
21408 int
21409 main (void)
21410 {
21411 int x = (int) errno; (void)x
21412   ;
21413   return 0;
21414 }
21415 _ACEOF
21416 rm -f "conftest.$ac_objext"
21417 if { (eval echo "$as_me:21417: \"$ac_compile\"") >&5
21418   (eval $ac_compile) 2>&5
21419   ac_status=$?
21420   echo "$as_me:21420: \$? = $ac_status" >&5
21421   (exit "$ac_status"); } &&
21422          { ac_try='test -s "conftest.$ac_objext"'
21423   { (eval echo "$as_me:21423: \"$ac_try\"") >&5
21424   (eval $ac_try) 2>&5
21425   ac_status=$?
21426   echo "$as_me:21426: \$? = $ac_status" >&5
21427   (exit "$ac_status"); }; }; then
21428   cf_cv_dcl_errno=yes
21429 else
21430   echo "$as_me: failed program was:" >&5
21431 cat "conftest.$ac_ext" >&5
21432 cf_cv_dcl_errno=no
21433 fi
21434 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21435
21436 fi
21437 echo "$as_me:21437: result: $cf_cv_dcl_errno" >&5
21438 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
21439
21440 if test "$cf_cv_dcl_errno" = no ; then
21441
21442 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21443
21444         cat >>confdefs.h <<EOF
21445 #define $cf_result 1
21446 EOF
21447
21448 fi
21449
21450 # It's possible (for near-UNIX clones) that the data doesn't exist
21451
21452 echo "$as_me:21452: checking if external errno exists" >&5
21453 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21454 if test "${cf_cv_have_errno+set}" = set; then
21455   echo $ECHO_N "(cached) $ECHO_C" >&6
21456 else
21457
21458         cat >"conftest.$ac_ext" <<_ACEOF
21459 #line 21459 "configure"
21460 #include "confdefs.h"
21461
21462 #undef errno
21463 extern int errno;
21464
21465 int
21466 main (void)
21467 {
21468 errno = 2
21469   ;
21470   return 0;
21471 }
21472 _ACEOF
21473 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21474 if { (eval echo "$as_me:21474: \"$ac_link\"") >&5
21475   (eval $ac_link) 2>&5
21476   ac_status=$?
21477   echo "$as_me:21477: \$? = $ac_status" >&5
21478   (exit "$ac_status"); } &&
21479          { ac_try='test -s "conftest$ac_exeext"'
21480   { (eval echo "$as_me:21480: \"$ac_try\"") >&5
21481   (eval $ac_try) 2>&5
21482   ac_status=$?
21483   echo "$as_me:21483: \$? = $ac_status" >&5
21484   (exit "$ac_status"); }; }; then
21485   cf_cv_have_errno=yes
21486 else
21487   echo "$as_me: failed program was:" >&5
21488 cat "conftest.$ac_ext" >&5
21489 cf_cv_have_errno=no
21490 fi
21491 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21492
21493 fi
21494 echo "$as_me:21494: result: $cf_cv_have_errno" >&5
21495 echo "${ECHO_T}$cf_cv_have_errno" >&6
21496
21497 if test "$cf_cv_have_errno" = yes ; then
21498
21499 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21500
21501         cat >>confdefs.h <<EOF
21502 #define $cf_result 1
21503 EOF
21504
21505 fi
21506
21507 echo "$as_me:21507: checking if data-only library module links" >&5
21508 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21509 if test "${cf_cv_link_dataonly+set}" = set; then
21510   echo $ECHO_N "(cached) $ECHO_C" >&6
21511 else
21512
21513         rm -f conftest.a
21514         cat >conftest.$ac_ext <<EOF
21515 #line 21515 "configure"
21516 int     testdata[3] = { 123, 456, 789 };
21517 EOF
21518         if { (eval echo "$as_me:21518: \"$ac_compile\"") >&5
21519   (eval $ac_compile) 2>&5
21520   ac_status=$?
21521   echo "$as_me:21521: \$? = $ac_status" >&5
21522   (exit "$ac_status"); } ; then
21523                 mv conftest.o data.o && \
21524                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
21525         fi
21526         rm -f conftest.$ac_ext data.o
21527         cat >conftest.$ac_ext <<EOF
21528 #line 21528 "configure"
21529 int     testfunc(void)
21530 {
21531 #if defined(NeXT)
21532         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
21533 #else
21534         extern int testdata[3];
21535         return testdata[0] == 123
21536            &&  testdata[1] == 456
21537            &&  testdata[2] == 789;
21538 #endif
21539 }
21540 EOF
21541         if { (eval echo "$as_me:21541: \"$ac_compile\"") >&5
21542   (eval $ac_compile) 2>&5
21543   ac_status=$?
21544   echo "$as_me:21544: \$? = $ac_status" >&5
21545   (exit "$ac_status"); }; then
21546                 mv conftest.o func.o && \
21547                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
21548         fi
21549         rm -f conftest.$ac_ext func.o
21550         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21551         cf_saveLIBS="$LIBS"
21552         LIBS="conftest.a $LIBS"
21553         if test "$cross_compiling" = yes; then
21554   cf_cv_link_dataonly=unknown
21555 else
21556   cat >"conftest.$ac_ext" <<_ACEOF
21557 #line 21557 "configure"
21558 #include "confdefs.h"
21559
21560         int main(void)
21561         {
21562                 extern int testfunc();
21563                 ${cf_cv_main_return:-return} (!testfunc());
21564         }
21565
21566 _ACEOF
21567 rm -f "conftest$ac_exeext"
21568 if { (eval echo "$as_me:21568: \"$ac_link\"") >&5
21569   (eval $ac_link) 2>&5
21570   ac_status=$?
21571   echo "$as_me:21571: \$? = $ac_status" >&5
21572   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21573   { (eval echo "$as_me:21573: \"$ac_try\"") >&5
21574   (eval $ac_try) 2>&5
21575   ac_status=$?
21576   echo "$as_me:21576: \$? = $ac_status" >&5
21577   (exit "$ac_status"); }; }; then
21578   cf_cv_link_dataonly=yes
21579 else
21580   echo "$as_me: program exited with status $ac_status" >&5
21581 echo "$as_me: failed program was:" >&5
21582 cat "conftest.$ac_ext" >&5
21583 cf_cv_link_dataonly=no
21584 fi
21585 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21586 fi
21587         LIBS="$cf_saveLIBS"
21588
21589 fi
21590
21591 echo "$as_me:21591: result: $cf_cv_link_dataonly" >&5
21592 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21593
21594 if test "$cf_cv_link_dataonly" = no ; then
21595
21596 cat >>confdefs.h <<\EOF
21597 #define BROKEN_LINKER 1
21598 EOF
21599
21600         BROKEN_LINKER=1
21601 fi
21602
21603 ###     Checks for library functions.
21604
21605 for ac_func in \
21606 fpathconf \
21607 getcwd \
21608 getegid \
21609 geteuid \
21610 getopt \
21611 issetugid \
21612 localeconv \
21613 poll \
21614 putenv \
21615 remove \
21616 select \
21617 setbuf \
21618 setbuffer \
21619 setenv \
21620 setfsuid \
21621 setvbuf \
21622 sigaction \
21623 sigvec \
21624 snprintf \
21625 strdup \
21626 strstr \
21627 sysconf \
21628 tcgetpgrp \
21629 times \
21630 tsearch \
21631 vsnprintf \
21632
21633 do
21634 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21635 echo "$as_me:21635: checking for $ac_func" >&5
21636 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21637 if eval "test \"\${$as_ac_var+set}\" = set"; then
21638   echo $ECHO_N "(cached) $ECHO_C" >&6
21639 else
21640   cat >"conftest.$ac_ext" <<_ACEOF
21641 #line 21641 "configure"
21642 #include "confdefs.h"
21643 #define $ac_func autoconf_temporary
21644 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21645 #undef $ac_func
21646
21647 #ifdef __cplusplus
21648 extern "C"
21649 #endif
21650
21651 /* We use char because int might match the return type of a gcc2
21652    builtin and then its argument prototype would still apply.  */
21653 char $ac_func (void);
21654
21655 int
21656 main (void)
21657 {
21658
21659 /* The GNU C library defines stubs for functions which it implements
21660     to always fail with ENOSYS.  Some functions are actually named
21661     something starting with __ and the normal name is an alias.  */
21662 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21663 #error found stub for $ac_func
21664 #endif
21665
21666         return $ac_func ();
21667   ;
21668   return 0;
21669 }
21670 _ACEOF
21671 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21672 if { (eval echo "$as_me:21672: \"$ac_link\"") >&5
21673   (eval $ac_link) 2>&5
21674   ac_status=$?
21675   echo "$as_me:21675: \$? = $ac_status" >&5
21676   (exit "$ac_status"); } &&
21677          { ac_try='test -s "conftest$ac_exeext"'
21678   { (eval echo "$as_me:21678: \"$ac_try\"") >&5
21679   (eval $ac_try) 2>&5
21680   ac_status=$?
21681   echo "$as_me:21681: \$? = $ac_status" >&5
21682   (exit "$ac_status"); }; }; then
21683   eval "$as_ac_var=yes"
21684 else
21685   echo "$as_me: failed program was:" >&5
21686 cat "conftest.$ac_ext" >&5
21687 eval "$as_ac_var=no"
21688 fi
21689 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21690 fi
21691 echo "$as_me:21691: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21692 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21693 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21694   cat >>confdefs.h <<EOF
21695 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21696 EOF
21697
21698 fi
21699 done
21700
21701 echo "$as_me:21701: checking if _PATH_TTYS is defined in ttyent.h" >&5
21702 echo $ECHO_N "checking if _PATH_TTYS is defined in ttyent.h... $ECHO_C" >&6
21703 if test "${cf_cv_PATH_TTYS+set}" = set; then
21704   echo $ECHO_N "(cached) $ECHO_C" >&6
21705 else
21706
21707 cat >"conftest.$ac_ext" <<_ACEOF
21708 #line 21708 "configure"
21709 #include "confdefs.h"
21710
21711 #include <stdio.h>
21712 #include <ttyent.h>
21713 int
21714 main (void)
21715 {
21716
21717 FILE *fp = fopen(_PATH_TTYS, "r"); (void)fp
21718   ;
21719   return 0;
21720 }
21721 _ACEOF
21722 rm -f "conftest.$ac_objext"
21723 if { (eval echo "$as_me:21723: \"$ac_compile\"") >&5
21724   (eval $ac_compile) 2>&5
21725   ac_status=$?
21726   echo "$as_me:21726: \$? = $ac_status" >&5
21727   (exit "$ac_status"); } &&
21728          { ac_try='test -s "conftest.$ac_objext"'
21729   { (eval echo "$as_me:21729: \"$ac_try\"") >&5
21730   (eval $ac_try) 2>&5
21731   ac_status=$?
21732   echo "$as_me:21732: \$? = $ac_status" >&5
21733   (exit "$ac_status"); }; }; then
21734   cf_cv_PATH_TTYS=yes
21735 else
21736   echo "$as_me: failed program was:" >&5
21737 cat "conftest.$ac_ext" >&5
21738 cf_cv_PATH_TTYS=no
21739 fi
21740 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21741 fi
21742 echo "$as_me:21742: result: $cf_cv_PATH_TTYS" >&5
21743 echo "${ECHO_T}$cf_cv_PATH_TTYS" >&6
21744
21745 if test $cf_cv_PATH_TTYS = no
21746 then
21747         for cf_ttys in /etc/ttytype /etc/ttys
21748         do
21749                 if test -f $cf_ttys
21750                 then
21751                         cf_cv_PATH_TTYS=maybe
21752
21753 cat >>confdefs.h <<\EOF
21754 #define _PATH_TTYS $cf_ttys
21755 EOF
21756
21757                         break
21758                 fi
21759         done
21760 fi
21761
21762 if test $cf_cv_PATH_TTYS != no
21763 then
21764         echo "$as_me:21764: checking if _PATH_TTYS file exists" >&5
21765 echo $ECHO_N "checking if _PATH_TTYS file exists... $ECHO_C" >&6
21766 if test "${cf_cv_have_PATH_TTYS+set}" = set; then
21767   echo $ECHO_N "(cached) $ECHO_C" >&6
21768 else
21769
21770                 if test "$cross_compiling" = yes; then
21771   cf_cv_have_PATH_TTYS=unknown
21772 else
21773   cat >"conftest.$ac_ext" <<_ACEOF
21774 #line 21774 "configure"
21775 #include "confdefs.h"
21776
21777 $ac_includes_default
21778
21779 #include <ttyent.h>
21780
21781 int main(void) {
21782         FILE *fp = fopen(_PATH_TTYS, "r");
21783         ${cf_cv_main_return:-return} (fp == 0);
21784 }
21785 _ACEOF
21786 rm -f "conftest$ac_exeext"
21787 if { (eval echo "$as_me:21787: \"$ac_link\"") >&5
21788   (eval $ac_link) 2>&5
21789   ac_status=$?
21790   echo "$as_me:21790: \$? = $ac_status" >&5
21791   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21792   { (eval echo "$as_me:21792: \"$ac_try\"") >&5
21793   (eval $ac_try) 2>&5
21794   ac_status=$?
21795   echo "$as_me:21795: \$? = $ac_status" >&5
21796   (exit "$ac_status"); }; }; then
21797   cf_cv_have_PATH_TTYS=yes
21798 else
21799   echo "$as_me: program exited with status $ac_status" >&5
21800 echo "$as_me: failed program was:" >&5
21801 cat "conftest.$ac_ext" >&5
21802 cf_cv_have_PATH_TTYS=no
21803 fi
21804 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21805 fi
21806 fi
21807 echo "$as_me:21807: result: $cf_cv_have_PATH_TTYS" >&5
21808 echo "${ECHO_T}$cf_cv_have_PATH_TTYS" >&6
21809         test "$cf_cv_have_PATH_TTYS" = no && cf_cv_PATH_TTYS=no
21810 fi
21811
21812 if test $cf_cv_PATH_TTYS != no
21813 then
21814
21815 cat >>confdefs.h <<\EOF
21816 #define HAVE_PATH_TTYS 1
21817 EOF
21818
21819         echo "$as_me:21819: checking for getttynam" >&5
21820 echo $ECHO_N "checking for getttynam... $ECHO_C" >&6
21821 if test "${cf_cv_func_getttynam+set}" = set; then
21822   echo $ECHO_N "(cached) $ECHO_C" >&6
21823 else
21824
21825                 cat >"conftest.$ac_ext" <<_ACEOF
21826 #line 21826 "configure"
21827 #include "confdefs.h"
21828 #include <ttyent.h>
21829 int
21830 main (void)
21831 {
21832 struct ttyent *fp = getttynam("/dev/tty"); (void)fp
21833   ;
21834   return 0;
21835 }
21836 _ACEOF
21837 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21838 if { (eval echo "$as_me:21838: \"$ac_link\"") >&5
21839   (eval $ac_link) 2>&5
21840   ac_status=$?
21841   echo "$as_me:21841: \$? = $ac_status" >&5
21842   (exit "$ac_status"); } &&
21843          { ac_try='test -s "conftest$ac_exeext"'
21844   { (eval echo "$as_me:21844: \"$ac_try\"") >&5
21845   (eval $ac_try) 2>&5
21846   ac_status=$?
21847   echo "$as_me:21847: \$? = $ac_status" >&5
21848   (exit "$ac_status"); }; }; then
21849   cf_cv_func_getttynam=yes
21850 else
21851   echo "$as_me: failed program was:" >&5
21852 cat "conftest.$ac_ext" >&5
21853 cf_cv_func_getttynam=no
21854 fi
21855 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21856 fi
21857 echo "$as_me:21857: result: $cf_cv_func_getttynam" >&5
21858 echo "${ECHO_T}$cf_cv_func_getttynam" >&6
21859         test "$cf_cv_func_getttynam" = yes && cat >>confdefs.h <<\EOF
21860 #define HAVE_GETTTYNAM 1
21861 EOF
21862
21863 fi
21864
21865 if test "x$ac_cv_func_getopt" = xno && \
21866    test "x$cf_with_progs$cf_with_tests" != xnono; then
21867         { { echo "$as_me:21867: error: getopt is required for building programs" >&5
21868 echo "$as_me: error: getopt is required for building programs" >&2;}
21869    { (exit 1); exit 1; }; }
21870 fi
21871
21872 if test "x$with_safe_sprintf" = xyes
21873 then
21874         if test "x$ac_cv_func_vsnprintf" = xyes
21875         then
21876                 { echo "$as_me:21876: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
21877 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
21878         else
21879
21880 cat >>confdefs.h <<\EOF
21881 #define USE_SAFE_SPRINTF 1
21882 EOF
21883
21884         fi
21885 fi
21886
21887 if test "x$with_getcap" = "xyes" ; then
21888
21889 echo "$as_me:21889: checking for terminal-capability database functions" >&5
21890 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
21891 if test "${cf_cv_cgetent+set}" = set; then
21892   echo $ECHO_N "(cached) $ECHO_C" >&6
21893 else
21894
21895 cat >"conftest.$ac_ext" <<_ACEOF
21896 #line 21896 "configure"
21897 #include "confdefs.h"
21898
21899 #include <stdlib.h>
21900 int
21901 main (void)
21902 {
21903
21904         char temp[128];
21905         char *buf = temp;
21906         char *db_array = temp;
21907         cgetent(&buf, &db_array, "vt100");
21908         cgetcap(buf, "tc", '=');
21909         cgetmatch(buf, "tc");
21910
21911   ;
21912   return 0;
21913 }
21914 _ACEOF
21915 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21916 if { (eval echo "$as_me:21916: \"$ac_link\"") >&5
21917   (eval $ac_link) 2>&5
21918   ac_status=$?
21919   echo "$as_me:21919: \$? = $ac_status" >&5
21920   (exit "$ac_status"); } &&
21921          { ac_try='test -s "conftest$ac_exeext"'
21922   { (eval echo "$as_me:21922: \"$ac_try\"") >&5
21923   (eval $ac_try) 2>&5
21924   ac_status=$?
21925   echo "$as_me:21925: \$? = $ac_status" >&5
21926   (exit "$ac_status"); }; }; then
21927   cf_cv_cgetent=yes
21928 else
21929   echo "$as_me: failed program was:" >&5
21930 cat "conftest.$ac_ext" >&5
21931 cf_cv_cgetent=no
21932 fi
21933 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21934
21935 fi
21936 echo "$as_me:21936: result: $cf_cv_cgetent" >&5
21937 echo "${ECHO_T}$cf_cv_cgetent" >&6
21938
21939 if test "$cf_cv_cgetent" = yes
21940 then
21941
21942 cat >>confdefs.h <<\EOF
21943 #define HAVE_BSD_CGETENT 1
21944 EOF
21945
21946 echo "$as_me:21946: checking if cgetent uses const parameter" >&5
21947 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
21948 if test "${cf_cv_cgetent_const+set}" = set; then
21949   echo $ECHO_N "(cached) $ECHO_C" >&6
21950 else
21951
21952 cat >"conftest.$ac_ext" <<_ACEOF
21953 #line 21953 "configure"
21954 #include "confdefs.h"
21955
21956 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
21957 #include <stdlib.h>
21958 int
21959 main (void)
21960 {
21961
21962         char temp[128];
21963         char *buf = temp;
21964 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
21965         const char *db_array = temp;
21966         cgetent(&buf, &db_array, "vt100");
21967 #endif
21968         cgetcap(buf, "tc", '=');
21969         cgetmatch(buf, "tc");
21970
21971   ;
21972   return 0;
21973 }
21974 _ACEOF
21975 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21976 if { (eval echo "$as_me:21976: \"$ac_link\"") >&5
21977   (eval $ac_link) 2>&5
21978   ac_status=$?
21979   echo "$as_me:21979: \$? = $ac_status" >&5
21980   (exit "$ac_status"); } &&
21981          { ac_try='test -s "conftest$ac_exeext"'
21982   { (eval echo "$as_me:21982: \"$ac_try\"") >&5
21983   (eval $ac_try) 2>&5
21984   ac_status=$?
21985   echo "$as_me:21985: \$? = $ac_status" >&5
21986   (exit "$ac_status"); }; }; then
21987   cf_cv_cgetent_const=yes
21988 else
21989   echo "$as_me: failed program was:" >&5
21990 cat "conftest.$ac_ext" >&5
21991 cf_cv_cgetent_const=no
21992 fi
21993 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21994
21995 fi
21996 echo "$as_me:21996: result: $cf_cv_cgetent_const" >&5
21997 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
21998         if test "$cf_cv_cgetent_const" = yes
21999         then
22000
22001 cat >>confdefs.h <<EOF
22002 #define CGETENT_CONST const
22003 EOF
22004
22005         fi
22006 fi
22007
22008 fi
22009
22010 echo "$as_me:22010: checking for isascii" >&5
22011 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
22012 if test "${cf_cv_have_isascii+set}" = set; then
22013   echo $ECHO_N "(cached) $ECHO_C" >&6
22014 else
22015
22016         cat >"conftest.$ac_ext" <<_ACEOF
22017 #line 22017 "configure"
22018 #include "confdefs.h"
22019 #include <ctype.h>
22020 int
22021 main (void)
22022 {
22023 int x = isascii(' ')
22024   ;
22025   return 0;
22026 }
22027 _ACEOF
22028 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22029 if { (eval echo "$as_me:22029: \"$ac_link\"") >&5
22030   (eval $ac_link) 2>&5
22031   ac_status=$?
22032   echo "$as_me:22032: \$? = $ac_status" >&5
22033   (exit "$ac_status"); } &&
22034          { ac_try='test -s "conftest$ac_exeext"'
22035   { (eval echo "$as_me:22035: \"$ac_try\"") >&5
22036   (eval $ac_try) 2>&5
22037   ac_status=$?
22038   echo "$as_me:22038: \$? = $ac_status" >&5
22039   (exit "$ac_status"); }; }; then
22040   cf_cv_have_isascii=yes
22041 else
22042   echo "$as_me: failed program was:" >&5
22043 cat "conftest.$ac_ext" >&5
22044 cf_cv_have_isascii=no
22045 fi
22046 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22047
22048 fi
22049 echo "$as_me:22049: result: $cf_cv_have_isascii" >&5
22050 echo "${ECHO_T}$cf_cv_have_isascii" >&6
22051 test "$cf_cv_have_isascii" = yes &&
22052 cat >>confdefs.h <<\EOF
22053 #define HAVE_ISASCII 1
22054 EOF
22055
22056 if test "$ac_cv_func_sigaction" = yes; then
22057 echo "$as_me:22057: checking whether sigaction needs _POSIX_SOURCE" >&5
22058 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
22059 cat >"conftest.$ac_ext" <<_ACEOF
22060 #line 22060 "configure"
22061 #include "confdefs.h"
22062
22063 #include <sys/types.h>
22064 #include <signal.h>
22065 int
22066 main (void)
22067 {
22068 struct sigaction act
22069   ;
22070   return 0;
22071 }
22072 _ACEOF
22073 rm -f "conftest.$ac_objext"
22074 if { (eval echo "$as_me:22074: \"$ac_compile\"") >&5
22075   (eval $ac_compile) 2>&5
22076   ac_status=$?
22077   echo "$as_me:22077: \$? = $ac_status" >&5
22078   (exit "$ac_status"); } &&
22079          { ac_try='test -s "conftest.$ac_objext"'
22080   { (eval echo "$as_me:22080: \"$ac_try\"") >&5
22081   (eval $ac_try) 2>&5
22082   ac_status=$?
22083   echo "$as_me:22083: \$? = $ac_status" >&5
22084   (exit "$ac_status"); }; }; then
22085   sigact_bad=no
22086 else
22087   echo "$as_me: failed program was:" >&5
22088 cat "conftest.$ac_ext" >&5
22089
22090 cat >"conftest.$ac_ext" <<_ACEOF
22091 #line 22091 "configure"
22092 #include "confdefs.h"
22093
22094 #define _POSIX_SOURCE
22095 #include <sys/types.h>
22096 #include <signal.h>
22097 int
22098 main (void)
22099 {
22100 struct sigaction act
22101   ;
22102   return 0;
22103 }
22104 _ACEOF
22105 rm -f "conftest.$ac_objext"
22106 if { (eval echo "$as_me:22106: \"$ac_compile\"") >&5
22107   (eval $ac_compile) 2>&5
22108   ac_status=$?
22109   echo "$as_me:22109: \$? = $ac_status" >&5
22110   (exit "$ac_status"); } &&
22111          { ac_try='test -s "conftest.$ac_objext"'
22112   { (eval echo "$as_me:22112: \"$ac_try\"") >&5
22113   (eval $ac_try) 2>&5
22114   ac_status=$?
22115   echo "$as_me:22115: \$? = $ac_status" >&5
22116   (exit "$ac_status"); }; }; then
22117   sigact_bad=yes
22118
22119 cat >>confdefs.h <<\EOF
22120 #define _POSIX_SOURCE 1
22121 EOF
22122
22123 else
22124   echo "$as_me: failed program was:" >&5
22125 cat "conftest.$ac_ext" >&5
22126 sigact_bad=unknown
22127 fi
22128 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22129 fi
22130 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22131 echo "$as_me:22131: result: $sigact_bad" >&5
22132 echo "${ECHO_T}$sigact_bad" >&6
22133 fi
22134
22135 echo "$as_me:22135: checking if nanosleep really works" >&5
22136 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
22137 if test "${cf_cv_func_nanosleep+set}" = set; then
22138   echo $ECHO_N "(cached) $ECHO_C" >&6
22139 else
22140
22141 if test "$cross_compiling" = yes; then
22142   cf_cv_func_nanosleep=unknown
22143 else
22144   cat >"conftest.$ac_ext" <<_ACEOF
22145 #line 22145 "configure"
22146 #include "confdefs.h"
22147
22148 $ac_includes_default
22149
22150 #include <errno.h>
22151 #include <time.h>
22152
22153 #ifdef HAVE_SYS_TIME_H
22154 #include <sys/time.h>
22155 #endif
22156
22157 int main(void) {
22158         struct timespec ts1, ts2;
22159         int code;
22160         ts1.tv_sec  = 0;
22161         ts1.tv_nsec = 750000000;
22162         ts2.tv_sec  = 0;
22163         ts2.tv_nsec = 0;
22164         errno = 0;
22165         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
22166         ${cf_cv_main_return:-return}(code != 0);
22167 }
22168
22169 _ACEOF
22170 rm -f "conftest$ac_exeext"
22171 if { (eval echo "$as_me:22171: \"$ac_link\"") >&5
22172   (eval $ac_link) 2>&5
22173   ac_status=$?
22174   echo "$as_me:22174: \$? = $ac_status" >&5
22175   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22176   { (eval echo "$as_me:22176: \"$ac_try\"") >&5
22177   (eval $ac_try) 2>&5
22178   ac_status=$?
22179   echo "$as_me:22179: \$? = $ac_status" >&5
22180   (exit "$ac_status"); }; }; then
22181   cf_cv_func_nanosleep=yes
22182 else
22183   echo "$as_me: program exited with status $ac_status" >&5
22184 echo "$as_me: failed program was:" >&5
22185 cat "conftest.$ac_ext" >&5
22186 cf_cv_func_nanosleep=no
22187 fi
22188 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22189 fi
22190 fi
22191 echo "$as_me:22191: result: $cf_cv_func_nanosleep" >&5
22192 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
22193
22194 test "$cf_cv_func_nanosleep" = "yes" &&
22195 cat >>confdefs.h <<\EOF
22196 #define HAVE_NANOSLEEP 1
22197 EOF
22198
22199 for ac_header in \
22200 termio.h \
22201 termios.h \
22202 unistd.h \
22203 sys/ioctl.h \
22204 sys/termio.h \
22205
22206 do
22207 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22208 echo "$as_me:22208: checking for $ac_header" >&5
22209 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22210 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22211   echo $ECHO_N "(cached) $ECHO_C" >&6
22212 else
22213   cat >"conftest.$ac_ext" <<_ACEOF
22214 #line 22214 "configure"
22215 #include "confdefs.h"
22216 #include <$ac_header>
22217 _ACEOF
22218 if { (eval echo "$as_me:22218: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22219   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22220   ac_status=$?
22221   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22222   rm -f conftest.er1
22223   cat conftest.err >&5
22224   echo "$as_me:22224: \$? = $ac_status" >&5
22225   (exit "$ac_status"); } >/dev/null; then
22226   if test -s conftest.err; then
22227     ac_cpp_err=$ac_c_preproc_warn_flag
22228   else
22229     ac_cpp_err=
22230   fi
22231 else
22232   ac_cpp_err=yes
22233 fi
22234 if test -z "$ac_cpp_err"; then
22235   eval "$as_ac_Header=yes"
22236 else
22237   echo "$as_me: failed program was:" >&5
22238   cat "conftest.$ac_ext" >&5
22239   eval "$as_ac_Header=no"
22240 fi
22241 rm -f conftest.err "conftest.$ac_ext"
22242 fi
22243 echo "$as_me:22243: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22244 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22245 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22246   cat >>confdefs.h <<EOF
22247 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22248 EOF
22249
22250 fi
22251 done
22252
22253 if test "$ac_cv_header_termios_h" = yes ; then
22254         case "$CFLAGS $CPPFLAGS" in
22255         (*-D_POSIX_SOURCE*)
22256                 termios_bad=dunno ;;
22257         (*)     termios_bad=maybe ;;
22258         esac
22259         if test "$termios_bad" = maybe ; then
22260         echo "$as_me:22260: checking whether termios.h needs _POSIX_SOURCE" >&5
22261 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
22262         cat >"conftest.$ac_ext" <<_ACEOF
22263 #line 22263 "configure"
22264 #include "confdefs.h"
22265 #include <termios.h>
22266 int
22267 main (void)
22268 {
22269 struct termios foo; int x = foo.c_iflag = 1; (void)x
22270   ;
22271   return 0;
22272 }
22273 _ACEOF
22274 rm -f "conftest.$ac_objext"
22275 if { (eval echo "$as_me:22275: \"$ac_compile\"") >&5
22276   (eval $ac_compile) 2>&5
22277   ac_status=$?
22278   echo "$as_me:22278: \$? = $ac_status" >&5
22279   (exit "$ac_status"); } &&
22280          { ac_try='test -s "conftest.$ac_objext"'
22281   { (eval echo "$as_me:22281: \"$ac_try\"") >&5
22282   (eval $ac_try) 2>&5
22283   ac_status=$?
22284   echo "$as_me:22284: \$? = $ac_status" >&5
22285   (exit "$ac_status"); }; }; then
22286   termios_bad=no
22287 else
22288   echo "$as_me: failed program was:" >&5
22289 cat "conftest.$ac_ext" >&5
22290
22291                 cat >"conftest.$ac_ext" <<_ACEOF
22292 #line 22292 "configure"
22293 #include "confdefs.h"
22294
22295 #define _POSIX_SOURCE
22296 #include <termios.h>
22297 int
22298 main (void)
22299 {
22300 struct termios foo; int x = foo.c_iflag = 2; (void)x
22301   ;
22302   return 0;
22303 }
22304 _ACEOF
22305 rm -f "conftest.$ac_objext"
22306 if { (eval echo "$as_me:22306: \"$ac_compile\"") >&5
22307   (eval $ac_compile) 2>&5
22308   ac_status=$?
22309   echo "$as_me:22309: \$? = $ac_status" >&5
22310   (exit "$ac_status"); } &&
22311          { ac_try='test -s "conftest.$ac_objext"'
22312   { (eval echo "$as_me:22312: \"$ac_try\"") >&5
22313   (eval $ac_try) 2>&5
22314   ac_status=$?
22315   echo "$as_me:22315: \$? = $ac_status" >&5
22316   (exit "$ac_status"); }; }; then
22317   termios_bad=unknown
22318 else
22319   echo "$as_me: failed program was:" >&5
22320 cat "conftest.$ac_ext" >&5
22321 termios_bad=yes
22322 cat >>confdefs.h <<\EOF
22323 #define _POSIX_SOURCE 1
22324 EOF
22325
22326 fi
22327 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22328
22329 fi
22330 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22331         echo "$as_me:22331: result: $termios_bad" >&5
22332 echo "${ECHO_T}$termios_bad" >&6
22333         fi
22334 fi
22335
22336 echo "$as_me:22336: checking for tcgetattr" >&5
22337 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
22338 if test "${cf_cv_have_tcgetattr+set}" = set; then
22339   echo $ECHO_N "(cached) $ECHO_C" >&6
22340 else
22341
22342 cat >"conftest.$ac_ext" <<_ACEOF
22343 #line 22343 "configure"
22344 #include "confdefs.h"
22345
22346 #include <sys/types.h>
22347 #ifdef HAVE_UNISTD_H
22348 #include <unistd.h>
22349 #endif
22350 #ifdef HAVE_TERMIOS_H
22351 #include <termios.h>
22352 #define TTY struct termios
22353 #else
22354 #ifdef HAVE_TERMIO_H
22355 #include <termio.h>
22356 #define TTY struct termio
22357 #endif
22358 #endif
22359
22360 int
22361 main (void)
22362 {
22363
22364 TTY foo;
22365 tcgetattr(1, &foo);
22366   ;
22367   return 0;
22368 }
22369 _ACEOF
22370 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22371 if { (eval echo "$as_me:22371: \"$ac_link\"") >&5
22372   (eval $ac_link) 2>&5
22373   ac_status=$?
22374   echo "$as_me:22374: \$? = $ac_status" >&5
22375   (exit "$ac_status"); } &&
22376          { ac_try='test -s "conftest$ac_exeext"'
22377   { (eval echo "$as_me:22377: \"$ac_try\"") >&5
22378   (eval $ac_try) 2>&5
22379   ac_status=$?
22380   echo "$as_me:22380: \$? = $ac_status" >&5
22381   (exit "$ac_status"); }; }; then
22382   cf_cv_have_tcgetattr=yes
22383 else
22384   echo "$as_me: failed program was:" >&5
22385 cat "conftest.$ac_ext" >&5
22386 cf_cv_have_tcgetattr=no
22387 fi
22388 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22389 fi
22390 echo "$as_me:22390: result: $cf_cv_have_tcgetattr" >&5
22391 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
22392 test "$cf_cv_have_tcgetattr" = yes &&
22393 cat >>confdefs.h <<\EOF
22394 #define HAVE_TCGETATTR 1
22395 EOF
22396
22397 echo "$as_me:22397: checking for vsscanf function or workaround" >&5
22398 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
22399 if test "${cf_cv_func_vsscanf+set}" = set; then
22400   echo $ECHO_N "(cached) $ECHO_C" >&6
22401 else
22402
22403 cat >"conftest.$ac_ext" <<_ACEOF
22404 #line 22404 "configure"
22405 #include "confdefs.h"
22406
22407 #include <stdarg.h>
22408 #include <stdio.h>
22409 int
22410 main (void)
22411 {
22412
22413         va_list ap;
22414         vsscanf("from", "%d", ap)
22415   ;
22416   return 0;
22417 }
22418 _ACEOF
22419 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22420 if { (eval echo "$as_me:22420: \"$ac_link\"") >&5
22421   (eval $ac_link) 2>&5
22422   ac_status=$?
22423   echo "$as_me:22423: \$? = $ac_status" >&5
22424   (exit "$ac_status"); } &&
22425          { ac_try='test -s "conftest$ac_exeext"'
22426   { (eval echo "$as_me:22426: \"$ac_try\"") >&5
22427   (eval $ac_try) 2>&5
22428   ac_status=$?
22429   echo "$as_me:22429: \$? = $ac_status" >&5
22430   (exit "$ac_status"); }; }; then
22431   cf_cv_func_vsscanf=vsscanf
22432 else
22433   echo "$as_me: failed program was:" >&5
22434 cat "conftest.$ac_ext" >&5
22435
22436 cat >"conftest.$ac_ext" <<_ACEOF
22437 #line 22437 "configure"
22438 #include "confdefs.h"
22439
22440 #include <stdarg.h>
22441 #include <stdio.h>
22442 int
22443 main (void)
22444 {
22445
22446         FILE strbuf;
22447         char *str = "from";
22448
22449         strbuf._flag = _IOREAD;
22450         strbuf._ptr = strbuf._base = (unsigned char *) str;
22451         strbuf._cnt = strlen(str);
22452         strbuf._file = _NFILE;
22453         return (vfscanf(&strbuf, "%d", ap))
22454   ;
22455   return 0;
22456 }
22457 _ACEOF
22458 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22459 if { (eval echo "$as_me:22459: \"$ac_link\"") >&5
22460   (eval $ac_link) 2>&5
22461   ac_status=$?
22462   echo "$as_me:22462: \$? = $ac_status" >&5
22463   (exit "$ac_status"); } &&
22464          { ac_try='test -s "conftest$ac_exeext"'
22465   { (eval echo "$as_me:22465: \"$ac_try\"") >&5
22466   (eval $ac_try) 2>&5
22467   ac_status=$?
22468   echo "$as_me:22468: \$? = $ac_status" >&5
22469   (exit "$ac_status"); }; }; then
22470   cf_cv_func_vsscanf=vfscanf
22471 else
22472   echo "$as_me: failed program was:" >&5
22473 cat "conftest.$ac_ext" >&5
22474
22475 cat >"conftest.$ac_ext" <<_ACEOF
22476 #line 22476 "configure"
22477 #include "confdefs.h"
22478
22479 #include <stdarg.h>
22480 #include <stdio.h>
22481 int
22482 main (void)
22483 {
22484
22485         FILE strbuf;
22486         char *str = "from";
22487
22488         strbuf._flag = _IOREAD;
22489         strbuf._ptr = strbuf._base = (unsigned char *) str;
22490         strbuf._cnt = strlen(str);
22491         strbuf._file = _NFILE;
22492         return (_doscan(&strbuf, "%d", ap))
22493   ;
22494   return 0;
22495 }
22496 _ACEOF
22497 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22498 if { (eval echo "$as_me:22498: \"$ac_link\"") >&5
22499   (eval $ac_link) 2>&5
22500   ac_status=$?
22501   echo "$as_me:22501: \$? = $ac_status" >&5
22502   (exit "$ac_status"); } &&
22503          { ac_try='test -s "conftest$ac_exeext"'
22504   { (eval echo "$as_me:22504: \"$ac_try\"") >&5
22505   (eval $ac_try) 2>&5
22506   ac_status=$?
22507   echo "$as_me:22507: \$? = $ac_status" >&5
22508   (exit "$ac_status"); }; }; then
22509   cf_cv_func_vsscanf=_doscan
22510 else
22511   echo "$as_me: failed program was:" >&5
22512 cat "conftest.$ac_ext" >&5
22513
22514 cf_cv_func_vsscanf=no
22515 fi
22516 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22517 fi
22518 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22519 fi
22520 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22521 fi
22522 echo "$as_me:22522: result: $cf_cv_func_vsscanf" >&5
22523 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
22524
22525 case "$cf_cv_func_vsscanf" in
22526 (vsscanf)
22527 cat >>confdefs.h <<\EOF
22528 #define HAVE_VSSCANF 1
22529 EOF
22530 ;;
22531 (vfscanf)
22532 cat >>confdefs.h <<\EOF
22533 #define HAVE_VFSCANF 1
22534 EOF
22535 ;;
22536 (_doscan)
22537 cat >>confdefs.h <<\EOF
22538 #define HAVE__DOSCAN 1
22539 EOF
22540 ;;
22541 esac
22542
22543 for ac_header in \
22544 unistd.h \
22545
22546 do
22547 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22548 echo "$as_me:22548: checking for $ac_header" >&5
22549 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22550 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22551   echo $ECHO_N "(cached) $ECHO_C" >&6
22552 else
22553   cat >"conftest.$ac_ext" <<_ACEOF
22554 #line 22554 "configure"
22555 #include "confdefs.h"
22556 #include <$ac_header>
22557 _ACEOF
22558 if { (eval echo "$as_me:22558: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22559   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22560   ac_status=$?
22561   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22562   rm -f conftest.er1
22563   cat conftest.err >&5
22564   echo "$as_me:22564: \$? = $ac_status" >&5
22565   (exit "$ac_status"); } >/dev/null; then
22566   if test -s conftest.err; then
22567     ac_cpp_err=$ac_c_preproc_warn_flag
22568   else
22569     ac_cpp_err=
22570   fi
22571 else
22572   ac_cpp_err=yes
22573 fi
22574 if test -z "$ac_cpp_err"; then
22575   eval "$as_ac_Header=yes"
22576 else
22577   echo "$as_me: failed program was:" >&5
22578   cat "conftest.$ac_ext" >&5
22579   eval "$as_ac_Header=no"
22580 fi
22581 rm -f conftest.err "conftest.$ac_ext"
22582 fi
22583 echo "$as_me:22583: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22584 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22585 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22586   cat >>confdefs.h <<EOF
22587 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22588 EOF
22589
22590 fi
22591 done
22592
22593 echo "$as_me:22593: checking for working mkstemp" >&5
22594 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
22595 if test "${cf_cv_func_mkstemp+set}" = set; then
22596   echo $ECHO_N "(cached) $ECHO_C" >&6
22597 else
22598
22599 rm -rf ./conftest*
22600 if test "$cross_compiling" = yes; then
22601   cf_cv_func_mkstemp=maybe
22602 else
22603   cat >"conftest.$ac_ext" <<_ACEOF
22604 #line 22604 "configure"
22605 #include "confdefs.h"
22606
22607 $ac_includes_default
22608
22609 int main(void)
22610 {
22611         char *tmpl = "conftestXXXXXX";
22612         char name[2][80];
22613         int n;
22614         int result = 0;
22615         int fd;
22616         struct stat sb;
22617
22618         umask(077);
22619         for (n = 0; n < 2; ++n) {
22620                 strcpy(name[n], tmpl);
22621                 if ((fd = mkstemp(name[n])) >= 0) {
22622                         if (!strcmp(name[n], tmpl)
22623                          || stat(name[n], &sb) != 0
22624                          || (sb.st_mode & S_IFMT) != S_IFREG
22625                          || (sb.st_mode & 077) != 0) {
22626                                 result = 1;
22627                         }
22628                         close(fd);
22629                 }
22630         }
22631         if (result == 0
22632          && !strcmp(name[0], name[1]))
22633                 result = 1;
22634         ${cf_cv_main_return:-return}(result);
22635 }
22636
22637 _ACEOF
22638 rm -f "conftest$ac_exeext"
22639 if { (eval echo "$as_me:22639: \"$ac_link\"") >&5
22640   (eval $ac_link) 2>&5
22641   ac_status=$?
22642   echo "$as_me:22642: \$? = $ac_status" >&5
22643   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22644   { (eval echo "$as_me:22644: \"$ac_try\"") >&5
22645   (eval $ac_try) 2>&5
22646   ac_status=$?
22647   echo "$as_me:22647: \$? = $ac_status" >&5
22648   (exit "$ac_status"); }; }; then
22649   cf_cv_func_mkstemp=yes
22650
22651 else
22652   echo "$as_me: program exited with status $ac_status" >&5
22653 echo "$as_me: failed program was:" >&5
22654 cat "conftest.$ac_ext" >&5
22655 cf_cv_func_mkstemp=no
22656
22657 fi
22658 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22659 fi
22660
22661 fi
22662 echo "$as_me:22662: result: $cf_cv_func_mkstemp" >&5
22663 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
22664 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
22665         echo "$as_me:22665: checking for mkstemp" >&5
22666 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
22667 if test "${ac_cv_func_mkstemp+set}" = set; then
22668   echo $ECHO_N "(cached) $ECHO_C" >&6
22669 else
22670   cat >"conftest.$ac_ext" <<_ACEOF
22671 #line 22671 "configure"
22672 #include "confdefs.h"
22673 #define mkstemp autoconf_temporary
22674 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22675 #undef mkstemp
22676
22677 #ifdef __cplusplus
22678 extern "C"
22679 #endif
22680
22681 /* We use char because int might match the return type of a gcc2
22682    builtin and then its argument prototype would still apply.  */
22683 char mkstemp (void);
22684
22685 int
22686 main (void)
22687 {
22688
22689 /* The GNU C library defines stubs for functions which it implements
22690     to always fail with ENOSYS.  Some functions are actually named
22691     something starting with __ and the normal name is an alias.  */
22692 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
22693 #error found stub for mkstemp
22694 #endif
22695
22696         return mkstemp ();
22697   ;
22698   return 0;
22699 }
22700 _ACEOF
22701 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22702 if { (eval echo "$as_me:22702: \"$ac_link\"") >&5
22703   (eval $ac_link) 2>&5
22704   ac_status=$?
22705   echo "$as_me:22705: \$? = $ac_status" >&5
22706   (exit "$ac_status"); } &&
22707          { ac_try='test -s "conftest$ac_exeext"'
22708   { (eval echo "$as_me:22708: \"$ac_try\"") >&5
22709   (eval $ac_try) 2>&5
22710   ac_status=$?
22711   echo "$as_me:22711: \$? = $ac_status" >&5
22712   (exit "$ac_status"); }; }; then
22713   ac_cv_func_mkstemp=yes
22714 else
22715   echo "$as_me: failed program was:" >&5
22716 cat "conftest.$ac_ext" >&5
22717 ac_cv_func_mkstemp=no
22718 fi
22719 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22720 fi
22721 echo "$as_me:22721: result: $ac_cv_func_mkstemp" >&5
22722 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22723
22724 fi
22725 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22726
22727 cat >>confdefs.h <<\EOF
22728 #define HAVE_MKSTEMP 1
22729 EOF
22730
22731 fi
22732
22733 # setup for prototype of fallback for vsscanf()
22734
22735 if test "$cf_cv_func_vsscanf" = vsscanf ; then
22736         HAVE_VSSCANF=1
22737 else
22738         HAVE_VSSCANF=0
22739 fi
22740
22741 if test "x$cross_compiling" = xyes ; then
22742         { echo "$as_me:22742: WARNING: cross compiling: assume setvbuf params not reversed" >&5
22743 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22744 else
22745         echo "$as_me:22745: checking whether setvbuf arguments are reversed" >&5
22746 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22747 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22748   echo $ECHO_N "(cached) $ECHO_C" >&6
22749 else
22750   if test "$cross_compiling" = yes; then
22751   { { echo "$as_me:22751: error: cannot run test program while cross compiling" >&5
22752 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22753    { (exit 1); exit 1; }; }
22754 else
22755   cat >"conftest.$ac_ext" <<_ACEOF
22756 #line 22756 "configure"
22757 #include "confdefs.h"
22758 #include <stdio.h>
22759 /* If setvbuf has the reversed format, exit 0. */
22760 int
22761 main (void)
22762 {
22763   /* This call has the arguments reversed.
22764      A reversed system may check and see that the address of main
22765      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
22766   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22767     $ac_main_return(1);
22768   putc('\r', stdout);
22769   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22770 }
22771 _ACEOF
22772 rm -f "conftest$ac_exeext"
22773 if { (eval echo "$as_me:22773: \"$ac_link\"") >&5
22774   (eval $ac_link) 2>&5
22775   ac_status=$?
22776   echo "$as_me:22776: \$? = $ac_status" >&5
22777   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22778   { (eval echo "$as_me:22778: \"$ac_try\"") >&5
22779   (eval $ac_try) 2>&5
22780   ac_status=$?
22781   echo "$as_me:22781: \$? = $ac_status" >&5
22782   (exit "$ac_status"); }; }; then
22783   ac_cv_func_setvbuf_reversed=yes
22784 else
22785   echo "$as_me: program exited with status $ac_status" >&5
22786 echo "$as_me: failed program was:" >&5
22787 cat "conftest.$ac_ext" >&5
22788 ac_cv_func_setvbuf_reversed=no
22789 fi
22790 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22791 fi
22792 rm -f core ./core.* ./*.core
22793 fi
22794 echo "$as_me:22794: result: $ac_cv_func_setvbuf_reversed" >&5
22795 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
22796 if test $ac_cv_func_setvbuf_reversed = yes; then
22797
22798 cat >>confdefs.h <<\EOF
22799 #define SETVBUF_REVERSED 1
22800 EOF
22801
22802 fi
22803
22804 fi
22805 echo "$as_me:22805: checking for intptr_t" >&5
22806 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
22807 if test "${ac_cv_type_intptr_t+set}" = set; then
22808   echo $ECHO_N "(cached) $ECHO_C" >&6
22809 else
22810   cat >"conftest.$ac_ext" <<_ACEOF
22811 #line 22811 "configure"
22812 #include "confdefs.h"
22813 $ac_includes_default
22814 int
22815 main (void)
22816 {
22817 if ((intptr_t *) 0)
22818   return 0;
22819 if (sizeof (intptr_t))
22820   return 0;
22821   ;
22822   return 0;
22823 }
22824 _ACEOF
22825 rm -f "conftest.$ac_objext"
22826 if { (eval echo "$as_me:22826: \"$ac_compile\"") >&5
22827   (eval $ac_compile) 2>&5
22828   ac_status=$?
22829   echo "$as_me:22829: \$? = $ac_status" >&5
22830   (exit "$ac_status"); } &&
22831          { ac_try='test -s "conftest.$ac_objext"'
22832   { (eval echo "$as_me:22832: \"$ac_try\"") >&5
22833   (eval $ac_try) 2>&5
22834   ac_status=$?
22835   echo "$as_me:22835: \$? = $ac_status" >&5
22836   (exit "$ac_status"); }; }; then
22837   ac_cv_type_intptr_t=yes
22838 else
22839   echo "$as_me: failed program was:" >&5
22840 cat "conftest.$ac_ext" >&5
22841 ac_cv_type_intptr_t=no
22842 fi
22843 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22844 fi
22845 echo "$as_me:22845: result: $ac_cv_type_intptr_t" >&5
22846 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
22847 if test "$ac_cv_type_intptr_t" = yes; then
22848   :
22849 else
22850
22851 cat >>confdefs.h <<EOF
22852 #define intptr_t long
22853 EOF
22854
22855 fi
22856
22857 echo "$as_me:22857: checking for ssize_t" >&5
22858 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22859 if test "${ac_cv_type_ssize_t+set}" = set; then
22860   echo $ECHO_N "(cached) $ECHO_C" >&6
22861 else
22862   cat >"conftest.$ac_ext" <<_ACEOF
22863 #line 22863 "configure"
22864 #include "confdefs.h"
22865 $ac_includes_default
22866 int
22867 main (void)
22868 {
22869 if ((ssize_t *) 0)
22870   return 0;
22871 if (sizeof (ssize_t))
22872   return 0;
22873   ;
22874   return 0;
22875 }
22876 _ACEOF
22877 rm -f "conftest.$ac_objext"
22878 if { (eval echo "$as_me:22878: \"$ac_compile\"") >&5
22879   (eval $ac_compile) 2>&5
22880   ac_status=$?
22881   echo "$as_me:22881: \$? = $ac_status" >&5
22882   (exit "$ac_status"); } &&
22883          { ac_try='test -s "conftest.$ac_objext"'
22884   { (eval echo "$as_me:22884: \"$ac_try\"") >&5
22885   (eval $ac_try) 2>&5
22886   ac_status=$?
22887   echo "$as_me:22887: \$? = $ac_status" >&5
22888   (exit "$ac_status"); }; }; then
22889   ac_cv_type_ssize_t=yes
22890 else
22891   echo "$as_me: failed program was:" >&5
22892 cat "conftest.$ac_ext" >&5
22893 ac_cv_type_ssize_t=no
22894 fi
22895 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22896 fi
22897 echo "$as_me:22897: result: $ac_cv_type_ssize_t" >&5
22898 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
22899 if test "$ac_cv_type_ssize_t" = yes; then
22900   :
22901 else
22902
22903 cat >>confdefs.h <<EOF
22904 #define ssize_t int
22905 EOF
22906
22907 fi
22908
22909 echo "$as_me:22909: checking for type sigaction_t" >&5
22910 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
22911 if test "${cf_cv_type_sigaction+set}" = set; then
22912   echo $ECHO_N "(cached) $ECHO_C" >&6
22913 else
22914
22915         cat >"conftest.$ac_ext" <<_ACEOF
22916 #line 22916 "configure"
22917 #include "confdefs.h"
22918
22919 #include <signal.h>
22920 int
22921 main (void)
22922 {
22923 sigaction_t x
22924   ;
22925   return 0;
22926 }
22927 _ACEOF
22928 rm -f "conftest.$ac_objext"
22929 if { (eval echo "$as_me:22929: \"$ac_compile\"") >&5
22930   (eval $ac_compile) 2>&5
22931   ac_status=$?
22932   echo "$as_me:22932: \$? = $ac_status" >&5
22933   (exit "$ac_status"); } &&
22934          { ac_try='test -s "conftest.$ac_objext"'
22935   { (eval echo "$as_me:22935: \"$ac_try\"") >&5
22936   (eval $ac_try) 2>&5
22937   ac_status=$?
22938   echo "$as_me:22938: \$? = $ac_status" >&5
22939   (exit "$ac_status"); }; }; then
22940   cf_cv_type_sigaction=yes
22941 else
22942   echo "$as_me: failed program was:" >&5
22943 cat "conftest.$ac_ext" >&5
22944 cf_cv_type_sigaction=no
22945 fi
22946 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22947 fi
22948
22949 echo "$as_me:22949: result: $cf_cv_type_sigaction" >&5
22950 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
22951 test "$cf_cv_type_sigaction" = yes &&
22952 cat >>confdefs.h <<\EOF
22953 #define HAVE_TYPE_SIGACTION 1
22954 EOF
22955
22956 echo "$as_me:22956: checking declaration of size-change" >&5
22957 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
22958 if test "${cf_cv_sizechange+set}" = set; then
22959   echo $ECHO_N "(cached) $ECHO_C" >&6
22960 else
22961
22962         cf_cv_sizechange=unknown
22963         cf_save_CPPFLAGS="$CPPFLAGS"
22964
22965 for cf_opts in "" "NEED_PTEM_H"
22966 do
22967
22968         CPPFLAGS="$cf_save_CPPFLAGS"
22969         if test -n "$cf_opts"
22970         then
22971
22972         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22973         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
22974
22975         fi
22976         cat >"conftest.$ac_ext" <<_ACEOF
22977 #line 22977 "configure"
22978 #include "confdefs.h"
22979 #include <sys/types.h>
22980 #ifdef HAVE_TERMIOS_H
22981 #include <termios.h>
22982 #else
22983 #ifdef HAVE_TERMIO_H
22984 #include <termio.h>
22985 #endif
22986 #endif
22987
22988 #ifdef NEED_PTEM_H
22989 /* This is a workaround for SCO:  they neglected to define struct winsize in
22990  * termios.h -- it is only in termio.h and ptem.h
22991  */
22992 #include <sys/stream.h>
22993 #include <sys/ptem.h>
22994 #endif
22995
22996 #ifdef HAVE_SYS_IOCTL_H
22997 #include <sys/ioctl.h>
22998 #endif
22999
23000 int
23001 main (void)
23002 {
23003
23004 #ifdef TIOCGSIZE
23005         struct ttysize win;     /* SunOS 3.0... */
23006         int y = win.ts_lines = 2;
23007         int x = win.ts_cols = 1;
23008         (void)y;
23009         (void)x;
23010 #else
23011 #ifdef TIOCGWINSZ
23012         struct winsize win;     /* everything else */
23013         int y = win.ws_row = 2;
23014         int x = win.ws_col = 1;
23015         (void)y;
23016         (void)x;
23017 #else
23018         no TIOCGSIZE or TIOCGWINSZ
23019 #endif /* TIOCGWINSZ */
23020 #endif /* TIOCGSIZE */
23021
23022   ;
23023   return 0;
23024 }
23025 _ACEOF
23026 rm -f "conftest.$ac_objext"
23027 if { (eval echo "$as_me:23027: \"$ac_compile\"") >&5
23028   (eval $ac_compile) 2>&5
23029   ac_status=$?
23030   echo "$as_me:23030: \$? = $ac_status" >&5
23031   (exit "$ac_status"); } &&
23032          { ac_try='test -s "conftest.$ac_objext"'
23033   { (eval echo "$as_me:23033: \"$ac_try\"") >&5
23034   (eval $ac_try) 2>&5
23035   ac_status=$?
23036   echo "$as_me:23036: \$? = $ac_status" >&5
23037   (exit "$ac_status"); }; }; then
23038   cf_cv_sizechange=yes
23039 else
23040   echo "$as_me: failed program was:" >&5
23041 cat "conftest.$ac_ext" >&5
23042 cf_cv_sizechange=no
23043 fi
23044 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23045
23046         CPPFLAGS="$cf_save_CPPFLAGS"
23047         if test "$cf_cv_sizechange" = yes ; then
23048                 echo "size-change succeeded ($cf_opts)" >&5
23049                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
23050                 break
23051         fi
23052 done
23053
23054 fi
23055 echo "$as_me:23055: result: $cf_cv_sizechange" >&5
23056 echo "${ECHO_T}$cf_cv_sizechange" >&6
23057 if test "$cf_cv_sizechange" != no ; then
23058
23059 cat >>confdefs.h <<\EOF
23060 #define HAVE_SIZECHANGE 1
23061 EOF
23062
23063         case "$cf_cv_sizechange" in
23064         (NEED*)
23065                 cat >>confdefs.h <<EOF
23066 #define $cf_cv_sizechange  1
23067 EOF
23068
23069                 ;;
23070         esac
23071 fi
23072
23073 echo "$as_me:23073: checking for memmove" >&5
23074 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
23075 if test "${ac_cv_func_memmove+set}" = set; then
23076   echo $ECHO_N "(cached) $ECHO_C" >&6
23077 else
23078   cat >"conftest.$ac_ext" <<_ACEOF
23079 #line 23079 "configure"
23080 #include "confdefs.h"
23081 #define memmove autoconf_temporary
23082 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23083 #undef memmove
23084
23085 #ifdef __cplusplus
23086 extern "C"
23087 #endif
23088
23089 /* We use char because int might match the return type of a gcc2
23090    builtin and then its argument prototype would still apply.  */
23091 char memmove (void);
23092
23093 int
23094 main (void)
23095 {
23096
23097 /* The GNU C library defines stubs for functions which it implements
23098     to always fail with ENOSYS.  Some functions are actually named
23099     something starting with __ and the normal name is an alias.  */
23100 #if defined (__stub_memmove) || defined (__stub___memmove)
23101 #error found stub for memmove
23102 #endif
23103
23104         return memmove ();
23105   ;
23106   return 0;
23107 }
23108 _ACEOF
23109 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23110 if { (eval echo "$as_me:23110: \"$ac_link\"") >&5
23111   (eval $ac_link) 2>&5
23112   ac_status=$?
23113   echo "$as_me:23113: \$? = $ac_status" >&5
23114   (exit "$ac_status"); } &&
23115          { ac_try='test -s "conftest$ac_exeext"'
23116   { (eval echo "$as_me:23116: \"$ac_try\"") >&5
23117   (eval $ac_try) 2>&5
23118   ac_status=$?
23119   echo "$as_me:23119: \$? = $ac_status" >&5
23120   (exit "$ac_status"); }; }; then
23121   ac_cv_func_memmove=yes
23122 else
23123   echo "$as_me: failed program was:" >&5
23124 cat "conftest.$ac_ext" >&5
23125 ac_cv_func_memmove=no
23126 fi
23127 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23128 fi
23129 echo "$as_me:23129: result: $ac_cv_func_memmove" >&5
23130 echo "${ECHO_T}$ac_cv_func_memmove" >&6
23131 if test "$ac_cv_func_memmove" = yes; then
23132   :
23133 else
23134
23135 echo "$as_me:23135: checking for bcopy" >&5
23136 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
23137 if test "${ac_cv_func_bcopy+set}" = set; then
23138   echo $ECHO_N "(cached) $ECHO_C" >&6
23139 else
23140   cat >"conftest.$ac_ext" <<_ACEOF
23141 #line 23141 "configure"
23142 #include "confdefs.h"
23143 #define bcopy autoconf_temporary
23144 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23145 #undef bcopy
23146
23147 #ifdef __cplusplus
23148 extern "C"
23149 #endif
23150
23151 /* We use char because int might match the return type of a gcc2
23152    builtin and then its argument prototype would still apply.  */
23153 char bcopy (void);
23154
23155 int
23156 main (void)
23157 {
23158
23159 /* The GNU C library defines stubs for functions which it implements
23160     to always fail with ENOSYS.  Some functions are actually named
23161     something starting with __ and the normal name is an alias.  */
23162 #if defined (__stub_bcopy) || defined (__stub___bcopy)
23163 #error found stub for bcopy
23164 #endif
23165
23166         return bcopy ();
23167   ;
23168   return 0;
23169 }
23170 _ACEOF
23171 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23172 if { (eval echo "$as_me:23172: \"$ac_link\"") >&5
23173   (eval $ac_link) 2>&5
23174   ac_status=$?
23175   echo "$as_me:23175: \$? = $ac_status" >&5
23176   (exit "$ac_status"); } &&
23177          { ac_try='test -s "conftest$ac_exeext"'
23178   { (eval echo "$as_me:23178: \"$ac_try\"") >&5
23179   (eval $ac_try) 2>&5
23180   ac_status=$?
23181   echo "$as_me:23181: \$? = $ac_status" >&5
23182   (exit "$ac_status"); }; }; then
23183   ac_cv_func_bcopy=yes
23184 else
23185   echo "$as_me: failed program was:" >&5
23186 cat "conftest.$ac_ext" >&5
23187 ac_cv_func_bcopy=no
23188 fi
23189 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23190 fi
23191 echo "$as_me:23191: result: $ac_cv_func_bcopy" >&5
23192 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
23193 if test "$ac_cv_func_bcopy" = yes; then
23194
23195         echo "$as_me:23195: checking if bcopy does overlapping moves" >&5
23196 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
23197 if test "${cf_cv_good_bcopy+set}" = set; then
23198   echo $ECHO_N "(cached) $ECHO_C" >&6
23199 else
23200
23201                 if test "$cross_compiling" = yes; then
23202   cf_cv_good_bcopy=unknown
23203 else
23204   cat >"conftest.$ac_ext" <<_ACEOF
23205 #line 23205 "configure"
23206 #include "confdefs.h"
23207
23208 $ac_includes_default
23209
23210 int main(void) {
23211         static char data[] = "abcdefghijklmnopqrstuwwxyz";
23212         char temp[40];
23213         bcopy(data, temp, sizeof(data));
23214         bcopy(temp+10, temp, 15);
23215         bcopy(temp+5, temp+15, 10);
23216         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
23217 }
23218
23219 _ACEOF
23220 rm -f "conftest$ac_exeext"
23221 if { (eval echo "$as_me:23221: \"$ac_link\"") >&5
23222   (eval $ac_link) 2>&5
23223   ac_status=$?
23224   echo "$as_me:23224: \$? = $ac_status" >&5
23225   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23226   { (eval echo "$as_me:23226: \"$ac_try\"") >&5
23227   (eval $ac_try) 2>&5
23228   ac_status=$?
23229   echo "$as_me:23229: \$? = $ac_status" >&5
23230   (exit "$ac_status"); }; }; then
23231   cf_cv_good_bcopy=yes
23232 else
23233   echo "$as_me: program exited with status $ac_status" >&5
23234 echo "$as_me: failed program was:" >&5
23235 cat "conftest.$ac_ext" >&5
23236 cf_cv_good_bcopy=no
23237 fi
23238 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23239 fi
23240
23241 fi
23242 echo "$as_me:23242: result: $cf_cv_good_bcopy" >&5
23243 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
23244
23245 else
23246   cf_cv_good_bcopy=no
23247 fi
23248
23249         if test "$cf_cv_good_bcopy" = yes ; then
23250
23251 cat >>confdefs.h <<\EOF
23252 #define USE_OK_BCOPY 1
23253 EOF
23254
23255         else
23256
23257 cat >>confdefs.h <<\EOF
23258 #define USE_MY_MEMMOVE 1
23259 EOF
23260
23261         fi
23262
23263 fi
23264
23265 tty >/dev/null 2>&1 || {
23266 for ac_func in posix_openpt
23267 do
23268 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23269 echo "$as_me:23269: checking for $ac_func" >&5
23270 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23271 if eval "test \"\${$as_ac_var+set}\" = set"; then
23272   echo $ECHO_N "(cached) $ECHO_C" >&6
23273 else
23274   cat >"conftest.$ac_ext" <<_ACEOF
23275 #line 23275 "configure"
23276 #include "confdefs.h"
23277 #define $ac_func autoconf_temporary
23278 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23279 #undef $ac_func
23280
23281 #ifdef __cplusplus
23282 extern "C"
23283 #endif
23284
23285 /* We use char because int might match the return type of a gcc2
23286    builtin and then its argument prototype would still apply.  */
23287 char $ac_func (void);
23288
23289 int
23290 main (void)
23291 {
23292
23293 /* The GNU C library defines stubs for functions which it implements
23294     to always fail with ENOSYS.  Some functions are actually named
23295     something starting with __ and the normal name is an alias.  */
23296 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23297 #error found stub for $ac_func
23298 #endif
23299
23300         return $ac_func ();
23301   ;
23302   return 0;
23303 }
23304 _ACEOF
23305 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23306 if { (eval echo "$as_me:23306: \"$ac_link\"") >&5
23307   (eval $ac_link) 2>&5
23308   ac_status=$?
23309   echo "$as_me:23309: \$? = $ac_status" >&5
23310   (exit "$ac_status"); } &&
23311          { ac_try='test -s "conftest$ac_exeext"'
23312   { (eval echo "$as_me:23312: \"$ac_try\"") >&5
23313   (eval $ac_try) 2>&5
23314   ac_status=$?
23315   echo "$as_me:23315: \$? = $ac_status" >&5
23316   (exit "$ac_status"); }; }; then
23317   eval "$as_ac_var=yes"
23318 else
23319   echo "$as_me: failed program was:" >&5
23320 cat "conftest.$ac_ext" >&5
23321 eval "$as_ac_var=no"
23322 fi
23323 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23324 fi
23325 echo "$as_me:23325: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23326 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23327 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23328   cat >>confdefs.h <<EOF
23329 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23330 EOF
23331
23332 fi
23333 done
23334  }
23335 echo "$as_me:23335: checking if poll really works" >&5
23336 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
23337 if test "${cf_cv_working_poll+set}" = set; then
23338   echo $ECHO_N "(cached) $ECHO_C" >&6
23339 else
23340
23341 if test "$cross_compiling" = yes; then
23342   cf_cv_working_poll=unknown
23343 else
23344   cat >"conftest.$ac_ext" <<_ACEOF
23345 #line 23345 "configure"
23346 #include "confdefs.h"
23347
23348 $ac_includes_default
23349
23350 #include <fcntl.h>
23351
23352 #ifdef HAVE_POLL_H
23353 #include <poll.h>
23354 #else
23355 #include <sys/poll.h>
23356 #endif
23357
23358 int main(void) {
23359         struct pollfd myfds;
23360         int ret;
23361
23362         /* check for Darwin bug with respect to "devices" */
23363         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
23364         if (myfds.fd < 0)
23365                 myfds.fd = 0;
23366         myfds.events = POLLIN;
23367         myfds.revents = 0;
23368
23369         ret = poll(&myfds, 1, 100);
23370
23371         if (ret < 0 || (myfds.revents & POLLNVAL)) {
23372                 ret = -1;
23373         } else {
23374                 int fd = 0;
23375                 if (!isatty(fd)) {
23376                         fd = open("/dev/tty", 2);       /* O_RDWR */
23377                 }
23378 #ifdef HAVE_POSIX_OPENPT
23379                 if (fd < 0) {
23380                         fd = posix_openpt(O_RDWR);
23381                 }
23382 #endif
23383
23384                 if (fd >= 0) {
23385                         /* also check with standard input */
23386                         myfds.fd = fd;
23387                         myfds.events = POLLIN;
23388                         myfds.revents = 0;
23389                         ret = poll(&myfds, 1, 100);
23390                 } else {
23391                         ret = -1;
23392                 }
23393         }
23394         ${cf_cv_main_return:-return}(ret < 0);
23395 }
23396 _ACEOF
23397 rm -f "conftest$ac_exeext"
23398 if { (eval echo "$as_me:23398: \"$ac_link\"") >&5
23399   (eval $ac_link) 2>&5
23400   ac_status=$?
23401   echo "$as_me:23401: \$? = $ac_status" >&5
23402   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23403   { (eval echo "$as_me:23403: \"$ac_try\"") >&5
23404   (eval $ac_try) 2>&5
23405   ac_status=$?
23406   echo "$as_me:23406: \$? = $ac_status" >&5
23407   (exit "$ac_status"); }; }; then
23408   cf_cv_working_poll=yes
23409 else
23410   echo "$as_me: program exited with status $ac_status" >&5
23411 echo "$as_me: failed program was:" >&5
23412 cat "conftest.$ac_ext" >&5
23413 cf_cv_working_poll=no
23414 fi
23415 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23416 fi
23417 fi
23418 echo "$as_me:23418: result: $cf_cv_working_poll" >&5
23419 echo "${ECHO_T}$cf_cv_working_poll" >&6
23420 test "$cf_cv_working_poll" = "yes" &&
23421 cat >>confdefs.h <<\EOF
23422 #define HAVE_WORKING_POLL 1
23423 EOF
23424
23425 echo "$as_me:23425: checking for va_copy" >&5
23426 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
23427 if test "${cf_cv_have_va_copy+set}" = set; then
23428   echo $ECHO_N "(cached) $ECHO_C" >&6
23429 else
23430
23431 cat >"conftest.$ac_ext" <<_ACEOF
23432 #line 23432 "configure"
23433 #include "confdefs.h"
23434
23435 #include <stdarg.h>
23436
23437 int
23438 main (void)
23439 {
23440
23441         static va_list dst;
23442         static va_list src;
23443         va_copy(dst, src)
23444   ;
23445   return 0;
23446 }
23447 _ACEOF
23448 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23449 if { (eval echo "$as_me:23449: \"$ac_link\"") >&5
23450   (eval $ac_link) 2>&5
23451   ac_status=$?
23452   echo "$as_me:23452: \$? = $ac_status" >&5
23453   (exit "$ac_status"); } &&
23454          { ac_try='test -s "conftest$ac_exeext"'
23455   { (eval echo "$as_me:23455: \"$ac_try\"") >&5
23456   (eval $ac_try) 2>&5
23457   ac_status=$?
23458   echo "$as_me:23458: \$? = $ac_status" >&5
23459   (exit "$ac_status"); }; }; then
23460   cf_cv_have_va_copy=yes
23461 else
23462   echo "$as_me: failed program was:" >&5
23463 cat "conftest.$ac_ext" >&5
23464 cf_cv_have_va_copy=no
23465 fi
23466 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23467 fi
23468 echo "$as_me:23468: result: $cf_cv_have_va_copy" >&5
23469 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
23470
23471 if test "$cf_cv_have_va_copy" = yes;
23472 then
23473
23474 cat >>confdefs.h <<\EOF
23475 #define HAVE_VA_COPY 1
23476 EOF
23477
23478 else # !cf_cv_have_va_copy
23479
23480 echo "$as_me:23480: checking for __va_copy" >&5
23481 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
23482 if test "${cf_cv_have___va_copy+set}" = set; then
23483   echo $ECHO_N "(cached) $ECHO_C" >&6
23484 else
23485
23486 cat >"conftest.$ac_ext" <<_ACEOF
23487 #line 23487 "configure"
23488 #include "confdefs.h"
23489
23490 #include <stdarg.h>
23491
23492 int
23493 main (void)
23494 {
23495
23496         static va_list dst;
23497         static va_list src;
23498         __va_copy(dst, src)
23499   ;
23500   return 0;
23501 }
23502 _ACEOF
23503 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23504 if { (eval echo "$as_me:23504: \"$ac_link\"") >&5
23505   (eval $ac_link) 2>&5
23506   ac_status=$?
23507   echo "$as_me:23507: \$? = $ac_status" >&5
23508   (exit "$ac_status"); } &&
23509          { ac_try='test -s "conftest$ac_exeext"'
23510   { (eval echo "$as_me:23510: \"$ac_try\"") >&5
23511   (eval $ac_try) 2>&5
23512   ac_status=$?
23513   echo "$as_me:23513: \$? = $ac_status" >&5
23514   (exit "$ac_status"); }; }; then
23515   cf_cv_have___va_copy=yes
23516 else
23517   echo "$as_me: failed program was:" >&5
23518 cat "conftest.$ac_ext" >&5
23519 cf_cv_have___va_copy=no
23520 fi
23521 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23522 fi
23523 echo "$as_me:23523: result: $cf_cv_have___va_copy" >&5
23524 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
23525
23526 if test "$cf_cv_have___va_copy" = yes
23527 then
23528
23529 cat >>confdefs.h <<\EOF
23530 #define HAVE___VA_COPY 1
23531 EOF
23532
23533 else # !cf_cv_have___va_copy
23534
23535 echo "$as_me:23535: checking for __builtin_va_copy" >&5
23536 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
23537 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
23538   echo $ECHO_N "(cached) $ECHO_C" >&6
23539 else
23540
23541 cat >"conftest.$ac_ext" <<_ACEOF
23542 #line 23542 "configure"
23543 #include "confdefs.h"
23544
23545 #include <stdarg.h>
23546
23547 int
23548 main (void)
23549 {
23550
23551         static va_list dst;
23552         static va_list src;
23553         __builtin_va_copy(dst, src)
23554   ;
23555   return 0;
23556 }
23557 _ACEOF
23558 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23559 if { (eval echo "$as_me:23559: \"$ac_link\"") >&5
23560   (eval $ac_link) 2>&5
23561   ac_status=$?
23562   echo "$as_me:23562: \$? = $ac_status" >&5
23563   (exit "$ac_status"); } &&
23564          { ac_try='test -s "conftest$ac_exeext"'
23565   { (eval echo "$as_me:23565: \"$ac_try\"") >&5
23566   (eval $ac_try) 2>&5
23567   ac_status=$?
23568   echo "$as_me:23568: \$? = $ac_status" >&5
23569   (exit "$ac_status"); }; }; then
23570   cf_cv_have___builtin_va_copy=yes
23571 else
23572   echo "$as_me: failed program was:" >&5
23573 cat "conftest.$ac_ext" >&5
23574 cf_cv_have___builtin_va_copy=no
23575 fi
23576 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23577 fi
23578 echo "$as_me:23578: result: $cf_cv_have___builtin_va_copy" >&5
23579 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
23580
23581 test "$cf_cv_have___builtin_va_copy" = yes &&
23582
23583 cat >>confdefs.h <<\EOF
23584 #define HAVE___BUILTIN_VA_COPY 1
23585 EOF
23586
23587 fi # cf_cv_have___va_copy
23588
23589 fi # cf_cv_have_va_copy
23590
23591 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
23592 (*yes*)
23593         ;;
23594
23595 (*)
23596         echo "$as_me:23596: checking if we can simply copy va_list" >&5
23597 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
23598 if test "${cf_cv_pointer_va_list+set}" = set; then
23599   echo $ECHO_N "(cached) $ECHO_C" >&6
23600 else
23601
23602 cat >"conftest.$ac_ext" <<_ACEOF
23603 #line 23603 "configure"
23604 #include "confdefs.h"
23605
23606 #include <stdarg.h>
23607
23608 int
23609 main (void)
23610 {
23611
23612         va_list dst;
23613         va_list src;
23614         dst = src
23615   ;
23616   return 0;
23617 }
23618 _ACEOF
23619 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23620 if { (eval echo "$as_me:23620: \"$ac_link\"") >&5
23621   (eval $ac_link) 2>&5
23622   ac_status=$?
23623   echo "$as_me:23623: \$? = $ac_status" >&5
23624   (exit "$ac_status"); } &&
23625          { ac_try='test -s "conftest$ac_exeext"'
23626   { (eval echo "$as_me:23626: \"$ac_try\"") >&5
23627   (eval $ac_try) 2>&5
23628   ac_status=$?
23629   echo "$as_me:23629: \$? = $ac_status" >&5
23630   (exit "$ac_status"); }; }; then
23631   cf_cv_pointer_va_list=yes
23632 else
23633   echo "$as_me: failed program was:" >&5
23634 cat "conftest.$ac_ext" >&5
23635 cf_cv_pointer_va_list=no
23636 fi
23637 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23638 fi
23639 echo "$as_me:23639: result: $cf_cv_pointer_va_list" >&5
23640 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
23641
23642         if test "$cf_cv_pointer_va_list" = no
23643         then
23644                 echo "$as_me:23644: checking if we can copy va_list indirectly" >&5
23645 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
23646 if test "${cf_cv_array_va_list+set}" = set; then
23647   echo $ECHO_N "(cached) $ECHO_C" >&6
23648 else
23649
23650 cat >"conftest.$ac_ext" <<_ACEOF
23651 #line 23651 "configure"
23652 #include "confdefs.h"
23653
23654 #include <stdarg.h>
23655
23656 int
23657 main (void)
23658 {
23659
23660         va_list dst;
23661         va_list src;
23662         *dst = *src
23663   ;
23664   return 0;
23665 }
23666 _ACEOF
23667 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23668 if { (eval echo "$as_me:23668: \"$ac_link\"") >&5
23669   (eval $ac_link) 2>&5
23670   ac_status=$?
23671   echo "$as_me:23671: \$? = $ac_status" >&5
23672   (exit "$ac_status"); } &&
23673          { ac_try='test -s "conftest$ac_exeext"'
23674   { (eval echo "$as_me:23674: \"$ac_try\"") >&5
23675   (eval $ac_try) 2>&5
23676   ac_status=$?
23677   echo "$as_me:23677: \$? = $ac_status" >&5
23678   (exit "$ac_status"); }; }; then
23679   cf_cv_array_va_list=yes
23680 else
23681   echo "$as_me: failed program was:" >&5
23682 cat "conftest.$ac_ext" >&5
23683 cf_cv_array_va_list=no
23684 fi
23685 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23686 fi
23687 echo "$as_me:23687: result: $cf_cv_array_va_list" >&5
23688 echo "${ECHO_T}$cf_cv_array_va_list" >&6
23689                 test "$cf_cv_array_va_list" = yes &&
23690 cat >>confdefs.h <<\EOF
23691 #define ARRAY_VA_LIST 1
23692 EOF
23693
23694         fi
23695         ;;
23696 esac
23697
23698 echo "$as_me:23698: checking for pid_t" >&5
23699 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23700 if test "${ac_cv_type_pid_t+set}" = set; then
23701   echo $ECHO_N "(cached) $ECHO_C" >&6
23702 else
23703   cat >"conftest.$ac_ext" <<_ACEOF
23704 #line 23704 "configure"
23705 #include "confdefs.h"
23706 $ac_includes_default
23707 int
23708 main (void)
23709 {
23710 if ((pid_t *) 0)
23711   return 0;
23712 if (sizeof (pid_t))
23713   return 0;
23714   ;
23715   return 0;
23716 }
23717 _ACEOF
23718 rm -f "conftest.$ac_objext"
23719 if { (eval echo "$as_me:23719: \"$ac_compile\"") >&5
23720   (eval $ac_compile) 2>&5
23721   ac_status=$?
23722   echo "$as_me:23722: \$? = $ac_status" >&5
23723   (exit "$ac_status"); } &&
23724          { ac_try='test -s "conftest.$ac_objext"'
23725   { (eval echo "$as_me:23725: \"$ac_try\"") >&5
23726   (eval $ac_try) 2>&5
23727   ac_status=$?
23728   echo "$as_me:23728: \$? = $ac_status" >&5
23729   (exit "$ac_status"); }; }; then
23730   ac_cv_type_pid_t=yes
23731 else
23732   echo "$as_me: failed program was:" >&5
23733 cat "conftest.$ac_ext" >&5
23734 ac_cv_type_pid_t=no
23735 fi
23736 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23737 fi
23738 echo "$as_me:23738: result: $ac_cv_type_pid_t" >&5
23739 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
23740 if test "$ac_cv_type_pid_t" = yes; then
23741   :
23742 else
23743
23744 cat >>confdefs.h <<EOF
23745 #define pid_t int
23746 EOF
23747
23748 fi
23749
23750 for ac_header in unistd.h vfork.h
23751 do
23752 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23753 echo "$as_me:23753: checking for $ac_header" >&5
23754 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23755 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23756   echo $ECHO_N "(cached) $ECHO_C" >&6
23757 else
23758   cat >"conftest.$ac_ext" <<_ACEOF
23759 #line 23759 "configure"
23760 #include "confdefs.h"
23761 #include <$ac_header>
23762 _ACEOF
23763 if { (eval echo "$as_me:23763: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23764   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23765   ac_status=$?
23766   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23767   rm -f conftest.er1
23768   cat conftest.err >&5
23769   echo "$as_me:23769: \$? = $ac_status" >&5
23770   (exit "$ac_status"); } >/dev/null; then
23771   if test -s conftest.err; then
23772     ac_cpp_err=$ac_c_preproc_warn_flag
23773   else
23774     ac_cpp_err=
23775   fi
23776 else
23777   ac_cpp_err=yes
23778 fi
23779 if test -z "$ac_cpp_err"; then
23780   eval "$as_ac_Header=yes"
23781 else
23782   echo "$as_me: failed program was:" >&5
23783   cat "conftest.$ac_ext" >&5
23784   eval "$as_ac_Header=no"
23785 fi
23786 rm -f conftest.err "conftest.$ac_ext"
23787 fi
23788 echo "$as_me:23788: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23789 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23790 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23791   cat >>confdefs.h <<EOF
23792 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23793 EOF
23794
23795 fi
23796 done
23797
23798 for ac_func in fork vfork
23799 do
23800 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23801 echo "$as_me:23801: checking for $ac_func" >&5
23802 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23803 if eval "test \"\${$as_ac_var+set}\" = set"; then
23804   echo $ECHO_N "(cached) $ECHO_C" >&6
23805 else
23806   cat >"conftest.$ac_ext" <<_ACEOF
23807 #line 23807 "configure"
23808 #include "confdefs.h"
23809 #define $ac_func autoconf_temporary
23810 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23811 #undef $ac_func
23812
23813 #ifdef __cplusplus
23814 extern "C"
23815 #endif
23816
23817 /* We use char because int might match the return type of a gcc2
23818    builtin and then its argument prototype would still apply.  */
23819 char $ac_func (void);
23820
23821 int
23822 main (void)
23823 {
23824
23825 /* The GNU C library defines stubs for functions which it implements
23826     to always fail with ENOSYS.  Some functions are actually named
23827     something starting with __ and the normal name is an alias.  */
23828 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23829 #error found stub for $ac_func
23830 #endif
23831
23832         return $ac_func ();
23833   ;
23834   return 0;
23835 }
23836 _ACEOF
23837 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23838 if { (eval echo "$as_me:23838: \"$ac_link\"") >&5
23839   (eval $ac_link) 2>&5
23840   ac_status=$?
23841   echo "$as_me:23841: \$? = $ac_status" >&5
23842   (exit "$ac_status"); } &&
23843          { ac_try='test -s "conftest$ac_exeext"'
23844   { (eval echo "$as_me:23844: \"$ac_try\"") >&5
23845   (eval $ac_try) 2>&5
23846   ac_status=$?
23847   echo "$as_me:23847: \$? = $ac_status" >&5
23848   (exit "$ac_status"); }; }; then
23849   eval "$as_ac_var=yes"
23850 else
23851   echo "$as_me: failed program was:" >&5
23852 cat "conftest.$ac_ext" >&5
23853 eval "$as_ac_var=no"
23854 fi
23855 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23856 fi
23857 echo "$as_me:23857: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23858 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23859 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23860   cat >>confdefs.h <<EOF
23861 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23862 EOF
23863
23864 fi
23865 done
23866
23867 ac_cv_func_fork_works=$ac_cv_func_fork
23868 if test "x$ac_cv_func_fork" = xyes; then
23869   echo "$as_me:23869: checking for working fork" >&5
23870 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23871 if test "${ac_cv_func_fork_works+set}" = set; then
23872   echo $ECHO_N "(cached) $ECHO_C" >&6
23873 else
23874   if test "$cross_compiling" = yes; then
23875   ac_cv_func_fork_works=cross
23876 else
23877   cat >"conftest.$ac_ext" <<_ACEOF
23878 /* By Rüdiger Kuhlmann. */
23879       #include <sys/types.h>
23880       #if HAVE_UNISTD_H
23881       # include <unistd.h>
23882       #endif
23883       /* Some systems only have a dummy stub for fork() */
23884       int main (void)
23885       {
23886         if (fork() < 0)
23887           $ac_main_return (1);
23888         $ac_main_return (0);
23889       }
23890 _ACEOF
23891 rm -f "conftest$ac_exeext"
23892 if { (eval echo "$as_me:23892: \"$ac_link\"") >&5
23893   (eval $ac_link) 2>&5
23894   ac_status=$?
23895   echo "$as_me:23895: \$? = $ac_status" >&5
23896   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23897   { (eval echo "$as_me:23897: \"$ac_try\"") >&5
23898   (eval $ac_try) 2>&5
23899   ac_status=$?
23900   echo "$as_me:23900: \$? = $ac_status" >&5
23901   (exit "$ac_status"); }; }; then
23902   ac_cv_func_fork_works=yes
23903 else
23904   echo "$as_me: program exited with status $ac_status" >&5
23905 echo "$as_me: failed program was:" >&5
23906 cat "conftest.$ac_ext" >&5
23907 ac_cv_func_fork_works=no
23908 fi
23909 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23910 fi
23911 fi
23912 echo "$as_me:23912: result: $ac_cv_func_fork_works" >&5
23913 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
23914
23915 fi
23916 if test "x$ac_cv_func_fork_works" = xcross; then
23917   case $host in
23918     *-*-amigaos* | *-*-msdosdjgpp*)
23919       # Override, as these systems have only a dummy fork() stub
23920       ac_cv_func_fork_works=no
23921       ;;
23922     *)
23923       ac_cv_func_fork_works=yes
23924       ;;
23925   esac
23926   { echo "$as_me:23926: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
23927 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
23928 fi
23929 ac_cv_func_vfork_works=$ac_cv_func_vfork
23930 if test "x$ac_cv_func_vfork" = xyes; then
23931   echo "$as_me:23931: checking for working vfork" >&5
23932 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
23933 if test "${ac_cv_func_vfork_works+set}" = set; then
23934   echo $ECHO_N "(cached) $ECHO_C" >&6
23935 else
23936   if test "$cross_compiling" = yes; then
23937   ac_cv_func_vfork_works=cross
23938 else
23939   cat >"conftest.$ac_ext" <<_ACEOF
23940 #line 23940 "configure"
23941 #include "confdefs.h"
23942 /* Thanks to Paul Eggert for this test.  */
23943 #include <stdio.h>
23944 #include <sys/types.h>
23945 #include <sys/stat.h>
23946 #if HAVE_UNISTD_H
23947 # include <unistd.h>
23948 #endif
23949 #if HAVE_VFORK_H
23950 # include <vfork.h>
23951 #endif
23952 /* On some sparc systems, changes by the child to local and incoming
23953    argument registers are propagated back to the parent.  The compiler
23954    is told about this with #include <vfork.h>, but some compilers
23955    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
23956    static variable whose address is put into a register that is
23957    clobbered by the vfork.  */
23958 static
23959 #ifdef __cplusplus
23960 sparc_address_test (int arg)
23961 # else
23962 sparc_address_test (arg) int arg;
23963 #endif
23964 {
23965   static pid_t child;
23966   if (!child) {
23967     child = vfork ();
23968     if (child < 0) {
23969       perror ("vfork");
23970       _exit(2);
23971     }
23972     if (!child) {
23973       arg = getpid();
23974       write(-1, "", 0);
23975       _exit (arg);
23976     }
23977   }
23978 }
23979
23980 int
23981 main (void)
23982 {
23983   pid_t parent = getpid ();
23984   pid_t child;
23985
23986   sparc_address_test ();
23987
23988   child = vfork ();
23989
23990   if (child == 0) {
23991     /* Here is another test for sparc vfork register problems.  This
23992        test uses lots of local variables, at least as many local
23993        variables as main has allocated so far including compiler
23994        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
23995        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
23996        reuse the register of parent for one of the local variables,
23997        since it will think that parent can't possibly be used any more
23998        in this routine.  Assigning to the local variable will thus
23999        munge parent in the parent process.  */
24000     pid_t
24001       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
24002       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
24003     /* Convince the compiler that p..p7 are live; otherwise, it might
24004        use the same hardware register for all 8 local variables.  */
24005     if (p != p1 || p != p2 || p != p3 || p != p4
24006         || p != p5 || p != p6 || p != p7)
24007       _exit(1);
24008
24009     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
24010        from child file descriptors.  If the child closes a descriptor
24011        before it execs or exits, this munges the parent's descriptor
24012        as well.  Test for this by closing stdout in the child.  */
24013     _exit(close(fileno(stdout)) != 0);
24014   } else {
24015     int status;
24016     struct stat st;
24017
24018     while (wait(&status) != child)
24019       ;
24020     $ac_main_return(
24021          /* Was there some problem with vforking?  */
24022          child < 0
24023
24024          /* Did the child fail?  (This shouldn't happen.)  */
24025          || status
24026
24027          /* Did the vfork/compiler bug occur?  */
24028          || parent != getpid()
24029
24030          /* Did the file descriptor bug occur?  */
24031          || fstat(fileno(stdout), &st) != 0
24032          );
24033   }
24034 }
24035 _ACEOF
24036 rm -f "conftest$ac_exeext"
24037 if { (eval echo "$as_me:24037: \"$ac_link\"") >&5
24038   (eval $ac_link) 2>&5
24039   ac_status=$?
24040   echo "$as_me:24040: \$? = $ac_status" >&5
24041   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24042   { (eval echo "$as_me:24042: \"$ac_try\"") >&5
24043   (eval $ac_try) 2>&5
24044   ac_status=$?
24045   echo "$as_me:24045: \$? = $ac_status" >&5
24046   (exit "$ac_status"); }; }; then
24047   ac_cv_func_vfork_works=yes
24048 else
24049   echo "$as_me: program exited with status $ac_status" >&5
24050 echo "$as_me: failed program was:" >&5
24051 cat "conftest.$ac_ext" >&5
24052 ac_cv_func_vfork_works=no
24053 fi
24054 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24055 fi
24056 fi
24057 echo "$as_me:24057: result: $ac_cv_func_vfork_works" >&5
24058 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
24059
24060 fi;
24061 if test "x$ac_cv_func_fork_works" = xcross; then
24062   ac_cv_func_vfork_works=ac_cv_func_vfork
24063   { echo "$as_me:24063: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
24064 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
24065 fi
24066
24067 if test "x$ac_cv_func_vfork_works" = xyes; then
24068
24069 cat >>confdefs.h <<\EOF
24070 #define HAVE_WORKING_VFORK 1
24071 EOF
24072
24073 else
24074
24075 cat >>confdefs.h <<\EOF
24076 #define vfork fork
24077 EOF
24078
24079 fi
24080 if test "x$ac_cv_func_fork_works" = xyes; then
24081
24082 cat >>confdefs.h <<\EOF
24083 #define HAVE_WORKING_FORK 1
24084 EOF
24085
24086 fi
24087
24088 echo "$as_me:24088: checking if fopen accepts explicit binary mode" >&5
24089 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
24090 if test "${cf_cv_fopen_bin_r+set}" = set; then
24091   echo $ECHO_N "(cached) $ECHO_C" >&6
24092 else
24093
24094         if test "$cross_compiling" = yes; then
24095   cf_cv_fopen_bin_r=unknown
24096 else
24097   cat >"conftest.$ac_ext" <<_ACEOF
24098 #line 24098 "configure"
24099 #include "confdefs.h"
24100
24101 $ac_includes_default
24102
24103 int main(void)
24104 {
24105         FILE *fp = fopen("conftest.tmp", "wb");
24106         int rc = 0;
24107         if (fp != 0) {
24108                 int p, q;
24109                 for (p = 0; p < 256; ++p) {
24110                         fputc(p, fp);
24111                 }
24112                 fclose(fp);
24113                 fp = fopen("conftest.tmp", "rb");
24114                 if (fp != 0) {
24115                         for (p = 0; p < 256; ++p) {
24116                                 q = fgetc(fp);
24117                                 if (q != p) {
24118                                         rc = 1;
24119                                         break;
24120                                 }
24121                         }
24122                 } else {
24123                         rc = 1;
24124                 }
24125         } else {
24126                 rc = 1;
24127         }
24128         ${cf_cv_main_return:-return} (rc);
24129 }
24130
24131 _ACEOF
24132 rm -f "conftest$ac_exeext"
24133 if { (eval echo "$as_me:24133: \"$ac_link\"") >&5
24134   (eval $ac_link) 2>&5
24135   ac_status=$?
24136   echo "$as_me:24136: \$? = $ac_status" >&5
24137   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24138   { (eval echo "$as_me:24138: \"$ac_try\"") >&5
24139   (eval $ac_try) 2>&5
24140   ac_status=$?
24141   echo "$as_me:24141: \$? = $ac_status" >&5
24142   (exit "$ac_status"); }; }; then
24143   cf_cv_fopen_bin_r=yes
24144 else
24145   echo "$as_me: program exited with status $ac_status" >&5
24146 echo "$as_me: failed program was:" >&5
24147 cat "conftest.$ac_ext" >&5
24148 cf_cv_fopen_bin_r=no
24149 fi
24150 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24151 fi
24152
24153 fi
24154 echo "$as_me:24154: result: $cf_cv_fopen_bin_r" >&5
24155 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
24156 test "x$cf_cv_fopen_bin_r" != xno &&
24157 cat >>confdefs.h <<\EOF
24158 #define USE_FOPEN_BIN_R 1
24159 EOF
24160
24161 # special check for test/ditto.c
24162
24163 echo "$as_me:24163: checking for openpty in -lutil" >&5
24164 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
24165 if test "${ac_cv_lib_util_openpty+set}" = set; then
24166   echo $ECHO_N "(cached) $ECHO_C" >&6
24167 else
24168   ac_check_lib_save_LIBS=$LIBS
24169 LIBS="-lutil  $LIBS"
24170 cat >"conftest.$ac_ext" <<_ACEOF
24171 #line 24171 "configure"
24172 #include "confdefs.h"
24173
24174 /* Override any gcc2 internal prototype to avoid an error.  */
24175 #ifdef __cplusplus
24176 extern "C"
24177 #endif
24178 /* We use char because int might match the return type of a gcc2
24179    builtin and then its argument prototype would still apply.  */
24180 char openpty ();
24181 int
24182 main (void)
24183 {
24184 openpty ();
24185   ;
24186   return 0;
24187 }
24188 _ACEOF
24189 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24190 if { (eval echo "$as_me:24190: \"$ac_link\"") >&5
24191   (eval $ac_link) 2>&5
24192   ac_status=$?
24193   echo "$as_me:24193: \$? = $ac_status" >&5
24194   (exit "$ac_status"); } &&
24195          { ac_try='test -s "conftest$ac_exeext"'
24196   { (eval echo "$as_me:24196: \"$ac_try\"") >&5
24197   (eval $ac_try) 2>&5
24198   ac_status=$?
24199   echo "$as_me:24199: \$? = $ac_status" >&5
24200   (exit "$ac_status"); }; }; then
24201   ac_cv_lib_util_openpty=yes
24202 else
24203   echo "$as_me: failed program was:" >&5
24204 cat "conftest.$ac_ext" >&5
24205 ac_cv_lib_util_openpty=no
24206 fi
24207 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24208 LIBS=$ac_check_lib_save_LIBS
24209 fi
24210 echo "$as_me:24210: result: $ac_cv_lib_util_openpty" >&5
24211 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
24212 if test "$ac_cv_lib_util_openpty" = yes; then
24213   cf_cv_lib_util=yes
24214 else
24215   cf_cv_lib_util=no
24216 fi
24217
24218 echo "$as_me:24218: checking for openpty header" >&5
24219 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
24220 if test "${cf_cv_func_openpty+set}" = set; then
24221   echo $ECHO_N "(cached) $ECHO_C" >&6
24222 else
24223
24224         cf_save_LIBS="$LIBS"
24225         test "$cf_cv_lib_util" = yes && {
24226 cf_add_libs="$LIBS"
24227 # reverse order
24228 cf_add_0lib=
24229 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24230 # filter duplicates
24231 for cf_add_1lib in $cf_add_0lib; do
24232         for cf_add_2lib in $cf_add_libs; do
24233                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24234                         cf_add_1lib=
24235                         break
24236                 fi
24237         done
24238         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24239 done
24240 LIBS="$cf_add_libs"
24241  }
24242         for cf_header in pty.h libutil.h util.h
24243         do
24244         cat >"conftest.$ac_ext" <<_ACEOF
24245 #line 24245 "configure"
24246 #include "confdefs.h"
24247
24248 #include <$cf_header>
24249
24250 int
24251 main (void)
24252 {
24253
24254         int x = openpty((int *)0, (int *)0, (char *)0,
24255                                    (struct termios *)0, (struct winsize *)0);
24256
24257   ;
24258   return 0;
24259 }
24260 _ACEOF
24261 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24262 if { (eval echo "$as_me:24262: \"$ac_link\"") >&5
24263   (eval $ac_link) 2>&5
24264   ac_status=$?
24265   echo "$as_me:24265: \$? = $ac_status" >&5
24266   (exit "$ac_status"); } &&
24267          { ac_try='test -s "conftest$ac_exeext"'
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
24274                 cf_cv_func_openpty=$cf_header
24275                 break
24276
24277 else
24278   echo "$as_me: failed program was:" >&5
24279 cat "conftest.$ac_ext" >&5
24280
24281                 cf_cv_func_openpty=no
24282
24283 fi
24284 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24285         done
24286         LIBS="$cf_save_LIBS"
24287
24288 fi
24289 echo "$as_me:24289: result: $cf_cv_func_openpty" >&5
24290 echo "${ECHO_T}$cf_cv_func_openpty" >&6
24291
24292 if test "$cf_cv_func_openpty" != no ; then
24293
24294 cat >>confdefs.h <<EOF
24295 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
24296 EOF
24297
24298 cat >>confdefs.h <<\EOF
24299 #define USE_XTERM_PTY 1
24300 EOF
24301
24302         if test "x$cf_cv_lib_util" = xyes ; then
24303
24304 cf_add_libs="$TEST_LIBS"
24305 # reverse order
24306 cf_add_0lib=
24307 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24308 # filter duplicates
24309 for cf_add_1lib in $cf_add_0lib; do
24310         for cf_add_2lib in $cf_add_libs; do
24311                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24312                         cf_add_1lib=
24313                         break
24314                 fi
24315         done
24316         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24317 done
24318 TEST_LIBS="$cf_add_libs"
24319
24320         fi
24321 fi
24322
24323 if test "$with_hashed_db" != no ; then
24324
24325 cat >>confdefs.h <<\EOF
24326 #define USE_HASHED_DB 1
24327 EOF
24328
24329 case $with_hashed_db in
24330 (yes|*able*)
24331         ;;
24332 (*)
24333         if test -d "$with_hashed_db" ; then
24334
24335 if test -n "$with_hashed_db/include" ; then
24336   for cf_add_incdir in $with_hashed_db/include
24337   do
24338         while test "$cf_add_incdir" != /usr/include
24339         do
24340           if test -d "$cf_add_incdir"
24341           then
24342                 cf_have_incdir=no
24343                 if test -n "$CFLAGS$CPPFLAGS" ; then
24344                   # a loop is needed to ensure we can add subdirs of existing dirs
24345                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24346                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24347                           cf_have_incdir=yes; break
24348                         fi
24349                   done
24350                 fi
24351
24352                 if test "$cf_have_incdir" = no ; then
24353                   if test "$cf_add_incdir" = /usr/local/include ; then
24354                         if test "$GCC" = yes
24355                         then
24356                           cf_save_CPPFLAGS=$CPPFLAGS
24357
24358         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24359         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24360
24361                           cat >"conftest.$ac_ext" <<_ACEOF
24362 #line 24362 "configure"
24363 #include "confdefs.h"
24364 #include <stdio.h>
24365 int
24366 main (void)
24367 {
24368 printf("Hello")
24369   ;
24370   return 0;
24371 }
24372 _ACEOF
24373 rm -f "conftest.$ac_objext"
24374 if { (eval echo "$as_me:24374: \"$ac_compile\"") >&5
24375   (eval $ac_compile) 2>&5
24376   ac_status=$?
24377   echo "$as_me:24377: \$? = $ac_status" >&5
24378   (exit "$ac_status"); } &&
24379          { ac_try='test -s "conftest.$ac_objext"'
24380   { (eval echo "$as_me:24380: \"$ac_try\"") >&5
24381   (eval $ac_try) 2>&5
24382   ac_status=$?
24383   echo "$as_me:24383: \$? = $ac_status" >&5
24384   (exit "$ac_status"); }; }; then
24385   :
24386 else
24387   echo "$as_me: failed program was:" >&5
24388 cat "conftest.$ac_ext" >&5
24389 cf_have_incdir=yes
24390 fi
24391 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24392                           CPPFLAGS=$cf_save_CPPFLAGS
24393                         fi
24394                   fi
24395                 fi
24396
24397                 if test "$cf_have_incdir" = no ; then
24398                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24399
24400 echo "${as_me:-configure}:24400: testing adding $cf_add_incdir to include-path ..." 1>&5
24401
24402                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24403
24404                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24405                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24406                   cf_add_incdir="$cf_top_incdir"
24407                 else
24408                   break
24409                 fi
24410           else
24411                 break
24412           fi
24413         done
24414   done
24415 fi
24416
24417 if test -n "$with_hashed_db/lib" ; then
24418         for cf_add_libdir in $with_hashed_db/lib
24419         do
24420                 if test "$cf_add_libdir" = /usr/lib ; then
24421                         :
24422                 elif test -d "$cf_add_libdir"
24423                 then
24424                         cf_have_libdir=no
24425                         if test -n "$LDFLAGS$LIBS" ; then
24426                                 # a loop is needed to ensure we can add subdirs of existing dirs
24427                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24428                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24429                                                 cf_have_libdir=yes; break
24430                                         fi
24431                                 done
24432                         fi
24433                         if test "$cf_have_libdir" = no ; then
24434                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24435
24436 echo "${as_me:-configure}:24436: testing adding $cf_add_libdir to library-path ..." 1>&5
24437
24438                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24439                         fi
24440                 fi
24441         done
24442 fi
24443
24444         else
24445                 case "$with_hashed_db" in
24446                 (./*|../*|/*)
24447                         { echo "$as_me:24447: WARNING: no such directory $with_hashed_db" >&5
24448 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
24449                         ;;
24450                 (*)
24451
24452 cf_search=
24453
24454 test "x$prefix" != "xNONE" && \
24455 test -d "$prefix" && \
24456  {
24457         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
24458         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
24459         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
24460         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
24461         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
24462         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
24463 }
24464
24465 for cf_subdir_prefix in \
24466         /usr \
24467         /usr/local \
24468         /usr/pkg \
24469         /opt \
24470         /opt/local \
24471         $HOME
24472 do
24473
24474 test "x$cf_subdir_prefix" != "x$prefix" && \
24475 test -d "$cf_subdir_prefix" && \
24476 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24477         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
24478         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
24479         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
24480         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
24481         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
24482         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"
24483 }
24484
24485 done
24486
24487         for cf_item in $cf_search
24488         do
24489                 case "$cf_item" in
24490                 (*/$with_hashed_db)
24491
24492 if test -n "$cf_item" ; then
24493   for cf_add_incdir in $cf_item
24494   do
24495         while test "$cf_add_incdir" != /usr/include
24496         do
24497           if test -d "$cf_add_incdir"
24498           then
24499                 cf_have_incdir=no
24500                 if test -n "$CFLAGS$CPPFLAGS" ; then
24501                   # a loop is needed to ensure we can add subdirs of existing dirs
24502                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24503                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24504                           cf_have_incdir=yes; break
24505                         fi
24506                   done
24507                 fi
24508
24509                 if test "$cf_have_incdir" = no ; then
24510                   if test "$cf_add_incdir" = /usr/local/include ; then
24511                         if test "$GCC" = yes
24512                         then
24513                           cf_save_CPPFLAGS=$CPPFLAGS
24514
24515         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24516         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24517
24518                           cat >"conftest.$ac_ext" <<_ACEOF
24519 #line 24519 "configure"
24520 #include "confdefs.h"
24521 #include <stdio.h>
24522 int
24523 main (void)
24524 {
24525 printf("Hello")
24526   ;
24527   return 0;
24528 }
24529 _ACEOF
24530 rm -f "conftest.$ac_objext"
24531 if { (eval echo "$as_me:24531: \"$ac_compile\"") >&5
24532   (eval $ac_compile) 2>&5
24533   ac_status=$?
24534   echo "$as_me:24534: \$? = $ac_status" >&5
24535   (exit "$ac_status"); } &&
24536          { ac_try='test -s "conftest.$ac_objext"'
24537   { (eval echo "$as_me:24537: \"$ac_try\"") >&5
24538   (eval $ac_try) 2>&5
24539   ac_status=$?
24540   echo "$as_me:24540: \$? = $ac_status" >&5
24541   (exit "$ac_status"); }; }; then
24542   :
24543 else
24544   echo "$as_me: failed program was:" >&5
24545 cat "conftest.$ac_ext" >&5
24546 cf_have_incdir=yes
24547 fi
24548 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24549                           CPPFLAGS=$cf_save_CPPFLAGS
24550                         fi
24551                   fi
24552                 fi
24553
24554                 if test "$cf_have_incdir" = no ; then
24555                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24556
24557 echo "${as_me:-configure}:24557: testing adding $cf_add_incdir to include-path ..." 1>&5
24558
24559                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24560
24561                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24562                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24563                   cf_add_incdir="$cf_top_incdir"
24564                 else
24565                   break
24566                 fi
24567           else
24568                 break
24569           fi
24570         done
24571   done
24572 fi
24573
24574                         ;;
24575                 esac
24576         done
24577
24578 cf_search=
24579
24580 test "x$prefix" != "xNONE" && \
24581 test -d "$prefix" && \
24582  {
24583         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
24584         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
24585         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
24586         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
24587         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
24588         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
24589 }
24590
24591 for cf_subdir_prefix in \
24592         /usr \
24593         /usr/local \
24594         /usr/pkg \
24595         /opt \
24596         /opt/local \
24597         $HOME
24598 do
24599
24600 test "x$cf_subdir_prefix" != "x$prefix" && \
24601 test -d "$cf_subdir_prefix" && \
24602 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24603         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
24604         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
24605         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
24606         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
24607         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
24608         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"
24609 }
24610
24611 done
24612
24613         for cf_item in $cf_search
24614         do
24615                 case "$cf_item" in
24616                 (*/$with_hashed_db)
24617
24618 if test -n "$cf_item" ; then
24619         for cf_add_libdir in $cf_item
24620         do
24621                 if test "$cf_add_libdir" = /usr/lib ; then
24622                         :
24623                 elif test -d "$cf_add_libdir"
24624                 then
24625                         cf_have_libdir=no
24626                         if test -n "$LDFLAGS$LIBS" ; then
24627                                 # a loop is needed to ensure we can add subdirs of existing dirs
24628                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24629                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24630                                                 cf_have_libdir=yes; break
24631                                         fi
24632                                 done
24633                         fi
24634                         if test "$cf_have_libdir" = no ; then
24635                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24636
24637 echo "${as_me:-configure}:24637: testing adding $cf_add_libdir to library-path ..." 1>&5
24638
24639                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24640                         fi
24641                 fi
24642         done
24643 fi
24644
24645                         ;;
24646                 esac
24647         done
24648
24649                         ;;
24650                 esac
24651         fi
24652 esac
24653
24654 echo "$as_me:24654: checking for db.h" >&5
24655 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
24656 if test "${ac_cv_header_db_h+set}" = set; then
24657   echo $ECHO_N "(cached) $ECHO_C" >&6
24658 else
24659   cat >"conftest.$ac_ext" <<_ACEOF
24660 #line 24660 "configure"
24661 #include "confdefs.h"
24662 #include <db.h>
24663 _ACEOF
24664 if { (eval echo "$as_me:24664: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24665   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24666   ac_status=$?
24667   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24668   rm -f conftest.er1
24669   cat conftest.err >&5
24670   echo "$as_me:24670: \$? = $ac_status" >&5
24671   (exit "$ac_status"); } >/dev/null; then
24672   if test -s conftest.err; then
24673     ac_cpp_err=$ac_c_preproc_warn_flag
24674   else
24675     ac_cpp_err=
24676   fi
24677 else
24678   ac_cpp_err=yes
24679 fi
24680 if test -z "$ac_cpp_err"; then
24681   ac_cv_header_db_h=yes
24682 else
24683   echo "$as_me: failed program was:" >&5
24684   cat "conftest.$ac_ext" >&5
24685   ac_cv_header_db_h=no
24686 fi
24687 rm -f conftest.err "conftest.$ac_ext"
24688 fi
24689 echo "$as_me:24689: result: $ac_cv_header_db_h" >&5
24690 echo "${ECHO_T}$ac_cv_header_db_h" >&6
24691 if test "$ac_cv_header_db_h" = yes; then
24692
24693 echo "$as_me:24693: checking for version of db" >&5
24694 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
24695 if test "${cf_cv_hashed_db_version+set}" = set; then
24696   echo $ECHO_N "(cached) $ECHO_C" >&6
24697 else
24698
24699 cf_cv_hashed_db_version=unknown
24700
24701 for cf_db_version in 1 2 3 4 5 6
24702 do
24703
24704 echo "${as_me:-configure}:24704: testing checking for db version $cf_db_version ..." 1>&5
24705
24706         cat >"conftest.$ac_ext" <<_ACEOF
24707 #line 24707 "configure"
24708 #include "confdefs.h"
24709
24710 $ac_includes_default
24711 #include <db.h>
24712
24713 #ifdef DB_VERSION_MAJOR
24714         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
24715 #if $cf_db_version == DB_VERSION_MAJOR
24716         /* ok */
24717 #else
24718         make an error
24719 #endif
24720 #else
24721 #if $cf_db_version == 1
24722         /* ok: assuming this is DB 1.8.5 */
24723 #else
24724         make an error
24725 #endif
24726 #endif
24727
24728 int
24729 main (void)
24730 {
24731 DBT *foo = 0
24732   ;
24733   return 0;
24734 }
24735 _ACEOF
24736 rm -f "conftest.$ac_objext"
24737 if { (eval echo "$as_me:24737: \"$ac_compile\"") >&5
24738   (eval $ac_compile) 2>&5
24739   ac_status=$?
24740   echo "$as_me:24740: \$? = $ac_status" >&5
24741   (exit "$ac_status"); } &&
24742          { ac_try='test -s "conftest.$ac_objext"'
24743   { (eval echo "$as_me:24743: \"$ac_try\"") >&5
24744   (eval $ac_try) 2>&5
24745   ac_status=$?
24746   echo "$as_me:24746: \$? = $ac_status" >&5
24747   (exit "$ac_status"); }; }; then
24748
24749         cf_cv_hashed_db_version=$cf_db_version
24750         break
24751
24752 else
24753   echo "$as_me: failed program was:" >&5
24754 cat "conftest.$ac_ext" >&5
24755 fi
24756 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24757 done
24758
24759 fi
24760 echo "$as_me:24760: result: $cf_cv_hashed_db_version" >&5
24761 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
24762
24763 if test "$cf_cv_hashed_db_version" = unknown ; then
24764         { { echo "$as_me:24764: error: Cannot determine version of db" >&5
24765 echo "$as_me: error: Cannot determine version of db" >&2;}
24766    { (exit 1); exit 1; }; }
24767 else
24768
24769 echo "$as_me:24769: checking for db libraries" >&5
24770 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
24771 if test "${cf_cv_hashed_db_libs+set}" = set; then
24772   echo $ECHO_N "(cached) $ECHO_C" >&6
24773 else
24774
24775 cf_cv_hashed_db_libs=unknown
24776 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
24777 do
24778         cf_save_libs="$LIBS"
24779         if test -n "$cf_db_libs"; then
24780
24781 cf_add_libs="$LIBS"
24782 # reverse order
24783 cf_add_0lib=
24784 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24785 # filter duplicates
24786 for cf_add_1lib in $cf_add_0lib; do
24787         for cf_add_2lib in $cf_add_libs; do
24788                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24789                         cf_add_1lib=
24790                         break
24791                 fi
24792         done
24793         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24794 done
24795 LIBS="$cf_add_libs"
24796
24797         fi
24798
24799 echo "${as_me:-configure}:24799: testing checking for library $cf_db_libs ..." 1>&5
24800
24801         cat >"conftest.$ac_ext" <<_ACEOF
24802 #line 24802 "configure"
24803 #include "confdefs.h"
24804
24805 $ac_includes_default
24806 #include <db.h>
24807
24808 int
24809 main (void)
24810 {
24811
24812         char *path = "/tmp/foo";
24813 #ifdef DB_VERSION_MAJOR
24814 #if DB_VERSION_MAJOR >= 4
24815         DB *result = 0;
24816         db_create(&result, NULL, 0);
24817         result->open(result,
24818                 NULL,
24819                 path,
24820                 path,
24821                 DB_HASH,
24822                 DB_CREATE,
24823                 0644);
24824 #elif DB_VERSION_MAJOR >= 3
24825         DB *result = 0;
24826         db_create(&result, NULL, 0);
24827         result->open(result,
24828                 path,
24829                 path,
24830                 DB_HASH,
24831                 DB_CREATE,
24832                 0644);
24833 #elif DB_VERSION_MAJOR >= 2
24834         DB *result = 0;
24835         db_open(path,
24836                 DB_HASH,
24837                 DB_CREATE,
24838                 0644,
24839                 (DB_ENV *) 0,
24840                 (DB_INFO *) 0,
24841                 &result);
24842 #endif /* DB_VERSION_MAJOR */
24843 #else
24844         DB *result = dbopen(path,
24845                      2,
24846                      0644,
24847                      DB_HASH,
24848                      0);
24849 #endif
24850         ${cf_cv_main_return:-return}(result != 0)
24851
24852   ;
24853   return 0;
24854 }
24855 _ACEOF
24856 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24857 if { (eval echo "$as_me:24857: \"$ac_link\"") >&5
24858   (eval $ac_link) 2>&5
24859   ac_status=$?
24860   echo "$as_me:24860: \$? = $ac_status" >&5
24861   (exit "$ac_status"); } &&
24862          { ac_try='test -s "conftest$ac_exeext"'
24863   { (eval echo "$as_me:24863: \"$ac_try\"") >&5
24864   (eval $ac_try) 2>&5
24865   ac_status=$?
24866   echo "$as_me:24866: \$? = $ac_status" >&5
24867   (exit "$ac_status"); }; }; then
24868
24869         if test -n "$cf_db_libs" ; then
24870                 cf_cv_hashed_db_libs=$cf_db_libs
24871         else
24872                 cf_cv_hashed_db_libs=default
24873         fi
24874         LIBS="$cf_save_libs"
24875         break
24876
24877 else
24878   echo "$as_me: failed program was:" >&5
24879 cat "conftest.$ac_ext" >&5
24880 fi
24881 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24882         LIBS="$cf_save_libs"
24883 done
24884
24885 fi
24886 echo "$as_me:24886: result: $cf_cv_hashed_db_libs" >&5
24887 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
24888
24889         if test "$cf_cv_hashed_db_libs" = unknown ; then
24890                 { { echo "$as_me:24890: error: Cannot determine library for db" >&5
24891 echo "$as_me: error: Cannot determine library for db" >&2;}
24892    { (exit 1); exit 1; }; }
24893         elif test "$cf_cv_hashed_db_libs" != default ; then
24894
24895 cf_add_libs="$LIBS"
24896 # reverse order
24897 cf_add_0lib=
24898 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24899 # filter duplicates
24900 for cf_add_1lib in $cf_add_0lib; do
24901         for cf_add_2lib in $cf_add_libs; do
24902                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24903                         cf_add_1lib=
24904                         break
24905                 fi
24906         done
24907         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24908 done
24909 LIBS="$cf_add_libs"
24910
24911         fi
24912 fi
24913
24914 else
24915
24916         { { echo "$as_me:24916: error: Cannot find db.h" >&5
24917 echo "$as_me: error: Cannot find db.h" >&2;}
24918    { (exit 1); exit 1; }; }
24919
24920 fi
24921
24922 fi
24923
24924 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
24925         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24926         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24927 fi
24928
24929 # Just in case, check if the C compiler has a bool type.
24930
24931 echo "$as_me:24931: checking if we should include stdbool.h" >&5
24932 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24933
24934 if test "${cf_cv_header_stdbool_h+set}" = set; then
24935   echo $ECHO_N "(cached) $ECHO_C" >&6
24936 else
24937
24938         cat >"conftest.$ac_ext" <<_ACEOF
24939 #line 24939 "configure"
24940 #include "confdefs.h"
24941
24942 int
24943 main (void)
24944 {
24945 bool foo = false
24946   ;
24947   return 0;
24948 }
24949 _ACEOF
24950 rm -f "conftest.$ac_objext"
24951 if { (eval echo "$as_me:24951: \"$ac_compile\"") >&5
24952   (eval $ac_compile) 2>&5
24953   ac_status=$?
24954   echo "$as_me:24954: \$? = $ac_status" >&5
24955   (exit "$ac_status"); } &&
24956          { ac_try='test -s "conftest.$ac_objext"'
24957   { (eval echo "$as_me:24957: \"$ac_try\"") >&5
24958   (eval $ac_try) 2>&5
24959   ac_status=$?
24960   echo "$as_me:24960: \$? = $ac_status" >&5
24961   (exit "$ac_status"); }; }; then
24962   cf_cv_header_stdbool_h=0
24963 else
24964   echo "$as_me: failed program was:" >&5
24965 cat "conftest.$ac_ext" >&5
24966 cat >"conftest.$ac_ext" <<_ACEOF
24967 #line 24967 "configure"
24968 #include "confdefs.h"
24969
24970 #ifndef __BEOS__
24971 #include <stdbool.h>
24972 #endif
24973
24974 int
24975 main (void)
24976 {
24977 bool foo = false
24978   ;
24979   return 0;
24980 }
24981 _ACEOF
24982 rm -f "conftest.$ac_objext"
24983 if { (eval echo "$as_me:24983: \"$ac_compile\"") >&5
24984   (eval $ac_compile) 2>&5
24985   ac_status=$?
24986   echo "$as_me:24986: \$? = $ac_status" >&5
24987   (exit "$ac_status"); } &&
24988          { ac_try='test -s "conftest.$ac_objext"'
24989   { (eval echo "$as_me:24989: \"$ac_try\"") >&5
24990   (eval $ac_try) 2>&5
24991   ac_status=$?
24992   echo "$as_me:24992: \$? = $ac_status" >&5
24993   (exit "$ac_status"); }; }; then
24994   cf_cv_header_stdbool_h=1
24995 else
24996   echo "$as_me: failed program was:" >&5
24997 cat "conftest.$ac_ext" >&5
24998 cf_cv_header_stdbool_h=0
24999 fi
25000 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25001 fi
25002 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25003 fi
25004
25005 if test "$cf_cv_header_stdbool_h" = 1
25006 then    echo "$as_me:25006: result: yes" >&5
25007 echo "${ECHO_T}yes" >&6
25008 else    echo "$as_me:25008: result: no" >&5
25009 echo "${ECHO_T}no" >&6
25010 fi
25011
25012 echo "$as_me:25012: checking for builtin bool type" >&5
25013 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25014
25015 if test "${cf_cv_cc_bool_type+set}" = set; then
25016   echo $ECHO_N "(cached) $ECHO_C" >&6
25017 else
25018
25019         cat >"conftest.$ac_ext" <<_ACEOF
25020 #line 25020 "configure"
25021 #include "confdefs.h"
25022
25023 #include <stdio.h>
25024 #include <sys/types.h>
25025
25026 int
25027 main (void)
25028 {
25029 bool x = false
25030   ;
25031   return 0;
25032 }
25033 _ACEOF
25034 rm -f "conftest.$ac_objext"
25035 if { (eval echo "$as_me:25035: \"$ac_compile\"") >&5
25036   (eval $ac_compile) 2>&5
25037   ac_status=$?
25038   echo "$as_me:25038: \$? = $ac_status" >&5
25039   (exit "$ac_status"); } &&
25040          { ac_try='test -s "conftest.$ac_objext"'
25041   { (eval echo "$as_me:25041: \"$ac_try\"") >&5
25042   (eval $ac_try) 2>&5
25043   ac_status=$?
25044   echo "$as_me:25044: \$? = $ac_status" >&5
25045   (exit "$ac_status"); }; }; then
25046   cf_cv_cc_bool_type=1
25047 else
25048   echo "$as_me: failed program was:" >&5
25049 cat "conftest.$ac_ext" >&5
25050 cf_cv_cc_bool_type=0
25051 fi
25052 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25053
25054 fi
25055
25056 if test "$cf_cv_cc_bool_type" = 1
25057 then    echo "$as_me:25057: result: yes" >&5
25058 echo "${ECHO_T}yes" >&6
25059 else    echo "$as_me:25059: result: no" >&5
25060 echo "${ECHO_T}no" >&6
25061 fi
25062
25063 # Check for C++ compiler characteristics (and ensure that it's there!)
25064 if test -n "$CXX" ; then
25065         ac_ext=cc
25066 ac_cpp='$CXXCPP $CPPFLAGS'
25067 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25068 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25069 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25070 ac_main_return="return"
25071
25072 if test -n "$GXX" ; then
25073
25074         cf_save="$LIBS"
25075         LIBS="$LIBS $CXXLIBS"
25076         echo "$as_me:25076: checking if we already have C++ library" >&5
25077 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
25078         cat >"conftest.$ac_ext" <<_ACEOF
25079 #line 25079 "configure"
25080 #include "confdefs.h"
25081
25082                         #include <iostream>
25083 int
25084 main (void)
25085 {
25086
25087                         std::cout << "Hello World!" << std::endl;
25088   ;
25089   return 0;
25090 }
25091 _ACEOF
25092 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25093 if { (eval echo "$as_me:25093: \"$ac_link\"") >&5
25094   (eval $ac_link) 2>&5
25095   ac_status=$?
25096   echo "$as_me:25096: \$? = $ac_status" >&5
25097   (exit "$ac_status"); } &&
25098          { ac_try='test -s "conftest$ac_exeext"'
25099   { (eval echo "$as_me:25099: \"$ac_try\"") >&5
25100   (eval $ac_try) 2>&5
25101   ac_status=$?
25102   echo "$as_me:25102: \$? = $ac_status" >&5
25103   (exit "$ac_status"); }; }; then
25104   cf_have_libstdcpp=yes
25105 else
25106   echo "$as_me: failed program was:" >&5
25107 cat "conftest.$ac_ext" >&5
25108 cf_have_libstdcpp=no
25109 fi
25110 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25111         echo "$as_me:25111: result: $cf_have_libstdcpp" >&5
25112 echo "${ECHO_T}$cf_have_libstdcpp" >&6
25113         LIBS="$cf_save"
25114
25115         if test "$cf_have_libstdcpp" != yes
25116         then
25117                 case "$cf_cv_system_name" in
25118                 (os2*)
25119                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
25120                                 cf_stdcpp_libname=stdcpp
25121                         else
25122                                 cf_stdcpp_libname=stdc++
25123                         fi
25124                         ;;
25125                 (*)
25126                         cf_stdcpp_libname=stdc++
25127                         ;;
25128                 esac
25129
25130                 echo "$as_me:25130: checking for library $cf_stdcpp_libname" >&5
25131 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
25132 if test "${cf_cv_libstdcpp+set}" = set; then
25133   echo $ECHO_N "(cached) $ECHO_C" >&6
25134 else
25135
25136                         cf_save="$LIBS"
25137                         LIBS="$LIBS $CXXLIBS"
25138
25139 cf_add_libs="$LIBS"
25140 # reverse order
25141 cf_add_0lib=
25142 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25143 # filter duplicates
25144 for cf_add_1lib in $cf_add_0lib; do
25145         for cf_add_2lib in $cf_add_libs; do
25146                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25147                         cf_add_1lib=
25148                         break
25149                 fi
25150         done
25151         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25152 done
25153 LIBS="$cf_add_libs"
25154
25155                 cat >"conftest.$ac_ext" <<_ACEOF
25156 #line 25156 "configure"
25157 #include "confdefs.h"
25158
25159                                 #include <iostream>
25160 int
25161 main (void)
25162 {
25163
25164                                 std::cout << "Hello World!" << std::endl;
25165   ;
25166   return 0;
25167 }
25168 _ACEOF
25169 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25170 if { (eval echo "$as_me:25170: \"$ac_link\"") >&5
25171   (eval $ac_link) 2>&5
25172   ac_status=$?
25173   echo "$as_me:25173: \$? = $ac_status" >&5
25174   (exit "$ac_status"); } &&
25175          { ac_try='test -s "conftest$ac_exeext"'
25176   { (eval echo "$as_me:25176: \"$ac_try\"") >&5
25177   (eval $ac_try) 2>&5
25178   ac_status=$?
25179   echo "$as_me:25179: \$? = $ac_status" >&5
25180   (exit "$ac_status"); }; }; then
25181   cf_cv_libstdcpp=yes
25182 else
25183   echo "$as_me: failed program was:" >&5
25184 cat "conftest.$ac_ext" >&5
25185 cf_cv_libstdcpp=no
25186 fi
25187 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25188                         LIBS="$cf_save"
25189
25190 fi
25191 echo "$as_me:25191: result: $cf_cv_libstdcpp" >&5
25192 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
25193                 test "$cf_cv_libstdcpp" = yes && {
25194 cf_add_libs="$CXXLIBS"
25195 # reverse order
25196 cf_add_0lib=
25197 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25198 # filter duplicates
25199 for cf_add_1lib in $cf_add_0lib; do
25200         for cf_add_2lib in $cf_add_libs; do
25201                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25202                         cf_add_1lib=
25203                         break
25204                 fi
25205         done
25206         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25207 done
25208 CXXLIBS="$cf_add_libs"
25209  }
25210         fi
25211 fi
25212
25213         echo "$as_me:25213: checking whether $CXX understands -c and -o together" >&5
25214 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
25215 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
25216   echo $ECHO_N "(cached) $ECHO_C" >&6
25217 else
25218
25219 cat > conftest.$ac_ext <<CF_EOF
25220 int main(void)
25221 {
25222         ${cf_cv_main_return:-return}(0);
25223 }
25224 CF_EOF
25225 # We do the test twice because some compilers refuse to overwrite an
25226 # existing .o file with -o, though they will create one.
25227 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
25228 if { (eval echo "$as_me:25228: \"$ac_try\"") >&5
25229   (eval $ac_try) 2>&5
25230   ac_status=$?
25231   echo "$as_me:25231: \$? = $ac_status" >&5
25232   (exit "$ac_status"); } &&
25233   test -f conftest2.$ac_objext && { (eval echo "$as_me:25233: \"$ac_try\"") >&5
25234   (eval $ac_try) 2>&5
25235   ac_status=$?
25236   echo "$as_me:25236: \$? = $ac_status" >&5
25237   (exit "$ac_status"); };
25238 then
25239   eval cf_cv_prog_CXX_c_o=yes
25240 else
25241   eval cf_cv_prog_CXX_c_o=no
25242 fi
25243 rm -rf ./conftest*
25244
25245 fi
25246 if test "$cf_cv_prog_CXX_c_o" = yes; then
25247   echo "$as_me:25247: result: yes" >&5
25248 echo "${ECHO_T}yes" >&6
25249 else
25250   echo "$as_me:25250: result: no" >&5
25251 echo "${ECHO_T}no" >&6
25252 fi
25253
25254         case "$GXX_VERSION" in
25255         (1.*|2.[0-6]*|[1-9][0-9].*)
25256                 cf_cxx_library=yes
25257                 ;;
25258         (*-2.7*|2.7*)
25259
25260 cf_cxx_library=unknown
25261 case "$cf_cv_system_name" in
25262 (os2*)
25263         cf_gpp_libname=gpp
25264         ;;
25265 (*)
25266         cf_gpp_libname=g++
25267         ;;
25268 esac
25269 if test "$GXX" = yes; then
25270         echo "$as_me:25270: checking for lib$cf_gpp_libname" >&5
25271 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
25272         cf_save="$LIBS"
25273
25274 cf_add_libs="$LIBS"
25275 # reverse order
25276 cf_add_0lib=
25277 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25278 # filter duplicates
25279 for cf_add_1lib in $cf_add_0lib; do
25280         for cf_add_2lib in $cf_add_libs; do
25281                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25282                         cf_add_1lib=
25283                         break
25284                 fi
25285         done
25286         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25287 done
25288 LIBS="$cf_add_libs"
25289
25290         cat >"conftest.$ac_ext" <<_ACEOF
25291 #line 25291 "configure"
25292 #include "confdefs.h"
25293
25294 #include <$cf_gpp_libname/builtin.h>
25295
25296 int
25297 main (void)
25298 {
25299 two_arg_error_handler_t foo2 = lib_error_handler
25300   ;
25301   return 0;
25302 }
25303 _ACEOF
25304 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25305 if { (eval echo "$as_me:25305: \"$ac_link\"") >&5
25306   (eval $ac_link) 2>&5
25307   ac_status=$?
25308   echo "$as_me:25308: \$? = $ac_status" >&5
25309   (exit "$ac_status"); } &&
25310          { ac_try='test -s "conftest$ac_exeext"'
25311   { (eval echo "$as_me:25311: \"$ac_try\"") >&5
25312   (eval $ac_try) 2>&5
25313   ac_status=$?
25314   echo "$as_me:25314: \$? = $ac_status" >&5
25315   (exit "$ac_status"); }; }; then
25316   cf_cxx_library=yes
25317
25318 cf_add_libs="$CXXLIBS"
25319 # reverse order
25320 cf_add_0lib=
25321 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25322 # filter duplicates
25323 for cf_add_1lib in $cf_add_0lib; do
25324         for cf_add_2lib in $cf_add_libs; do
25325                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25326                         cf_add_1lib=
25327                         break
25328                 fi
25329         done
25330         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25331 done
25332 CXXLIBS="$cf_add_libs"
25333
25334          if test "$cf_gpp_libname" = cpp ; then
25335
25336 cat >>confdefs.h <<\EOF
25337 #define HAVE_GPP_BUILTIN_H 1
25338 EOF
25339
25340          else
25341
25342 cat >>confdefs.h <<\EOF
25343 #define HAVE_GXX_BUILTIN_H 1
25344 EOF
25345
25346          fi
25347 else
25348   echo "$as_me: failed program was:" >&5
25349 cat "conftest.$ac_ext" >&5
25350 cat >"conftest.$ac_ext" <<_ACEOF
25351 #line 25351 "configure"
25352 #include "confdefs.h"
25353
25354 #include <builtin.h>
25355
25356 int
25357 main (void)
25358 {
25359 two_arg_error_handler_t foo2 = lib_error_handler
25360   ;
25361   return 0;
25362 }
25363 _ACEOF
25364 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25365 if { (eval echo "$as_me:25365: \"$ac_link\"") >&5
25366   (eval $ac_link) 2>&5
25367   ac_status=$?
25368   echo "$as_me:25368: \$? = $ac_status" >&5
25369   (exit "$ac_status"); } &&
25370          { ac_try='test -s "conftest$ac_exeext"'
25371   { (eval echo "$as_me:25371: \"$ac_try\"") >&5
25372   (eval $ac_try) 2>&5
25373   ac_status=$?
25374   echo "$as_me:25374: \$? = $ac_status" >&5
25375   (exit "$ac_status"); }; }; then
25376   cf_cxx_library=yes
25377
25378 cf_add_libs="$CXXLIBS"
25379 # reverse order
25380 cf_add_0lib=
25381 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25382 # filter duplicates
25383 for cf_add_1lib in $cf_add_0lib; do
25384         for cf_add_2lib in $cf_add_libs; do
25385                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25386                         cf_add_1lib=
25387                         break
25388                 fi
25389         done
25390         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25391 done
25392 CXXLIBS="$cf_add_libs"
25393
25394 cat >>confdefs.h <<\EOF
25395 #define HAVE_BUILTIN_H 1
25396 EOF
25397
25398 else
25399   echo "$as_me: failed program was:" >&5
25400 cat "conftest.$ac_ext" >&5
25401 cf_cxx_library=no
25402 fi
25403 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25404 fi
25405 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25406         LIBS="$cf_save"
25407         echo "$as_me:25407: result: $cf_cxx_library" >&5
25408 echo "${ECHO_T}$cf_cxx_library" >&6
25409 fi
25410
25411                 ;;
25412         (*)
25413                 cf_cxx_library=no
25414                 ;;
25415         esac
25416
25417         ac_ext=cc
25418 ac_cpp='$CXXCPP $CPPFLAGS'
25419 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25420 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25421 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25422 ac_main_return="return"
25423 echo "$as_me:25423: checking how to run the C++ preprocessor" >&5
25424 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
25425 if test -z "$CXXCPP"; then
25426   if test "${ac_cv_prog_CXXCPP+set}" = set; then
25427   echo $ECHO_N "(cached) $ECHO_C" >&6
25428 else
25429       # Double quotes because CXXCPP needs to be expanded
25430     for CXXCPP in "$CXX -E" "/lib/cpp"
25431     do
25432       ac_preproc_ok=false
25433 for ac_cxx_preproc_warn_flag in '' yes
25434 do
25435   # Use a header file that comes with gcc, so configuring glibc
25436   # with a fresh cross-compiler works.
25437   # On the NeXT, cc -E runs the code through the compiler's parser,
25438   # not just through cpp. "Syntax error" is here to catch this case.
25439   cat >"conftest.$ac_ext" <<_ACEOF
25440 #line 25440 "configure"
25441 #include "confdefs.h"
25442 #include <assert.h>
25443                      Syntax error
25444 _ACEOF
25445 if { (eval echo "$as_me:25445: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25446   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25447   ac_status=$?
25448   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25449   rm -f conftest.er1
25450   cat conftest.err >&5
25451   echo "$as_me:25451: \$? = $ac_status" >&5
25452   (exit "$ac_status"); } >/dev/null; then
25453   if test -s conftest.err; then
25454     ac_cpp_err=$ac_cxx_preproc_warn_flag
25455   else
25456     ac_cpp_err=
25457   fi
25458 else
25459   ac_cpp_err=yes
25460 fi
25461 if test -z "$ac_cpp_err"; then
25462   :
25463 else
25464   echo "$as_me: failed program was:" >&5
25465   cat "conftest.$ac_ext" >&5
25466   # Broken: fails on valid input.
25467 continue
25468 fi
25469 rm -f conftest.err "conftest.$ac_ext"
25470
25471   # OK, works on sane cases.  Now check whether non-existent headers
25472   # can be detected and how.
25473   cat >"conftest.$ac_ext" <<_ACEOF
25474 #line 25474 "configure"
25475 #include "confdefs.h"
25476 #include <ac_nonexistent.h>
25477 _ACEOF
25478 if { (eval echo "$as_me:25478: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25479   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25480   ac_status=$?
25481   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25482   rm -f conftest.er1
25483   cat conftest.err >&5
25484   echo "$as_me:25484: \$? = $ac_status" >&5
25485   (exit "$ac_status"); } >/dev/null; then
25486   if test -s conftest.err; then
25487     ac_cpp_err=$ac_cxx_preproc_warn_flag
25488   else
25489     ac_cpp_err=
25490   fi
25491 else
25492   ac_cpp_err=yes
25493 fi
25494 if test -z "$ac_cpp_err"; then
25495   # Broken: success on invalid input.
25496 continue
25497 else
25498   echo "$as_me: failed program was:" >&5
25499   cat "conftest.$ac_ext" >&5
25500   # Passes both tests.
25501 ac_preproc_ok=:
25502 break
25503 fi
25504 rm -f conftest.err "conftest.$ac_ext"
25505
25506 done
25507 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25508 rm -f conftest.err "conftest.$ac_ext"
25509 if $ac_preproc_ok; then
25510   break
25511 fi
25512
25513     done
25514     ac_cv_prog_CXXCPP=$CXXCPP
25515
25516 fi
25517   CXXCPP=$ac_cv_prog_CXXCPP
25518 else
25519   ac_cv_prog_CXXCPP=$CXXCPP
25520 fi
25521 echo "$as_me:25521: result: $CXXCPP" >&5
25522 echo "${ECHO_T}$CXXCPP" >&6
25523 ac_preproc_ok=false
25524 for ac_cxx_preproc_warn_flag in '' yes
25525 do
25526   # Use a header file that comes with gcc, so configuring glibc
25527   # with a fresh cross-compiler works.
25528   # On the NeXT, cc -E runs the code through the compiler's parser,
25529   # not just through cpp. "Syntax error" is here to catch this case.
25530   cat >"conftest.$ac_ext" <<_ACEOF
25531 #line 25531 "configure"
25532 #include "confdefs.h"
25533 #include <assert.h>
25534                      Syntax error
25535 _ACEOF
25536 if { (eval echo "$as_me:25536: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25537   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25538   ac_status=$?
25539   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25540   rm -f conftest.er1
25541   cat conftest.err >&5
25542   echo "$as_me:25542: \$? = $ac_status" >&5
25543   (exit "$ac_status"); } >/dev/null; then
25544   if test -s conftest.err; then
25545     ac_cpp_err=$ac_cxx_preproc_warn_flag
25546   else
25547     ac_cpp_err=
25548   fi
25549 else
25550   ac_cpp_err=yes
25551 fi
25552 if test -z "$ac_cpp_err"; then
25553   :
25554 else
25555   echo "$as_me: failed program was:" >&5
25556   cat "conftest.$ac_ext" >&5
25557   # Broken: fails on valid input.
25558 continue
25559 fi
25560 rm -f conftest.err "conftest.$ac_ext"
25561
25562   # OK, works on sane cases.  Now check whether non-existent headers
25563   # can be detected and how.
25564   cat >"conftest.$ac_ext" <<_ACEOF
25565 #line 25565 "configure"
25566 #include "confdefs.h"
25567 #include <ac_nonexistent.h>
25568 _ACEOF
25569 if { (eval echo "$as_me:25569: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25570   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25571   ac_status=$?
25572   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25573   rm -f conftest.er1
25574   cat conftest.err >&5
25575   echo "$as_me:25575: \$? = $ac_status" >&5
25576   (exit "$ac_status"); } >/dev/null; then
25577   if test -s conftest.err; then
25578     ac_cpp_err=$ac_cxx_preproc_warn_flag
25579   else
25580     ac_cpp_err=
25581   fi
25582 else
25583   ac_cpp_err=yes
25584 fi
25585 if test -z "$ac_cpp_err"; then
25586   # Broken: success on invalid input.
25587 continue
25588 else
25589   echo "$as_me: failed program was:" >&5
25590   cat "conftest.$ac_ext" >&5
25591   # Passes both tests.
25592 ac_preproc_ok=:
25593 break
25594 fi
25595 rm -f conftest.err "conftest.$ac_ext"
25596
25597 done
25598 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25599 rm -f conftest.err "conftest.$ac_ext"
25600 if $ac_preproc_ok; then
25601   :
25602 else
25603   { { echo "$as_me:25603: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
25604 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
25605    { (exit 1); exit 1; }; }
25606 fi
25607
25608 ac_ext=cc
25609 ac_cpp='$CXXCPP $CPPFLAGS'
25610 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25611 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25612 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25613 ac_main_return="return"
25614
25615 for ac_header in typeinfo
25616 do
25617 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25618 echo "$as_me:25618: checking for $ac_header" >&5
25619 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25620 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25621   echo $ECHO_N "(cached) $ECHO_C" >&6
25622 else
25623   cat >"conftest.$ac_ext" <<_ACEOF
25624 #line 25624 "configure"
25625 #include "confdefs.h"
25626 #include <$ac_header>
25627 _ACEOF
25628 if { (eval echo "$as_me:25628: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25629   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25630   ac_status=$?
25631   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25632   rm -f conftest.er1
25633   cat conftest.err >&5
25634   echo "$as_me:25634: \$? = $ac_status" >&5
25635   (exit "$ac_status"); } >/dev/null; then
25636   if test -s conftest.err; then
25637     ac_cpp_err=$ac_cxx_preproc_warn_flag
25638   else
25639     ac_cpp_err=
25640   fi
25641 else
25642   ac_cpp_err=yes
25643 fi
25644 if test -z "$ac_cpp_err"; then
25645   eval "$as_ac_Header=yes"
25646 else
25647   echo "$as_me: failed program was:" >&5
25648   cat "conftest.$ac_ext" >&5
25649   eval "$as_ac_Header=no"
25650 fi
25651 rm -f conftest.err "conftest.$ac_ext"
25652 fi
25653 echo "$as_me:25653: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25654 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25655 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25656   cat >>confdefs.h <<EOF
25657 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25658 EOF
25659
25660 fi
25661 done
25662
25663 for ac_header in iostream
25664 do
25665 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25666 echo "$as_me:25666: checking for $ac_header" >&5
25667 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25668 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25669   echo $ECHO_N "(cached) $ECHO_C" >&6
25670 else
25671   cat >"conftest.$ac_ext" <<_ACEOF
25672 #line 25672 "configure"
25673 #include "confdefs.h"
25674 #include <$ac_header>
25675 _ACEOF
25676 if { (eval echo "$as_me:25676: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25677   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25678   ac_status=$?
25679   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25680   rm -f conftest.er1
25681   cat conftest.err >&5
25682   echo "$as_me:25682: \$? = $ac_status" >&5
25683   (exit "$ac_status"); } >/dev/null; then
25684   if test -s conftest.err; then
25685     ac_cpp_err=$ac_cxx_preproc_warn_flag
25686   else
25687     ac_cpp_err=
25688   fi
25689 else
25690   ac_cpp_err=yes
25691 fi
25692 if test -z "$ac_cpp_err"; then
25693   eval "$as_ac_Header=yes"
25694 else
25695   echo "$as_me: failed program was:" >&5
25696   cat "conftest.$ac_ext" >&5
25697   eval "$as_ac_Header=no"
25698 fi
25699 rm -f conftest.err "conftest.$ac_ext"
25700 fi
25701 echo "$as_me:25701: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25702 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25703 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25704   cat >>confdefs.h <<EOF
25705 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25706 EOF
25707
25708 fi
25709 done
25710
25711 if test x"$ac_cv_header_iostream" = xyes ; then
25712         echo "$as_me:25712: checking if iostream uses std-namespace" >&5
25713 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
25714         cat >"conftest.$ac_ext" <<_ACEOF
25715 #line 25715 "configure"
25716 #include "confdefs.h"
25717
25718 #include <iostream>
25719 using std::endl;
25720 using std::cerr;
25721 int
25722 main (void)
25723 {
25724
25725 cerr << "testing" << endl;
25726
25727   ;
25728   return 0;
25729 }
25730 _ACEOF
25731 rm -f "conftest.$ac_objext"
25732 if { (eval echo "$as_me:25732: \"$ac_compile\"") >&5
25733   (eval $ac_compile) 2>&5
25734   ac_status=$?
25735   echo "$as_me:25735: \$? = $ac_status" >&5
25736   (exit "$ac_status"); } &&
25737          { ac_try='test -s "conftest.$ac_objext"'
25738   { (eval echo "$as_me:25738: \"$ac_try\"") >&5
25739   (eval $ac_try) 2>&5
25740   ac_status=$?
25741   echo "$as_me:25741: \$? = $ac_status" >&5
25742   (exit "$ac_status"); }; }; then
25743   cf_iostream_namespace=yes
25744 else
25745   echo "$as_me: failed program was:" >&5
25746 cat "conftest.$ac_ext" >&5
25747 cf_iostream_namespace=no
25748 fi
25749 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25750         echo "$as_me:25750: result: $cf_iostream_namespace" >&5
25751 echo "${ECHO_T}$cf_iostream_namespace" >&6
25752         if test "$cf_iostream_namespace" = yes ; then
25753
25754 cat >>confdefs.h <<\EOF
25755 #define IOSTREAM_NAMESPACE 1
25756 EOF
25757
25758         fi
25759 fi
25760
25761 echo "$as_me:25761: checking if we should include stdbool.h" >&5
25762 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25763
25764 if test "${cf_cv_header_stdbool_h+set}" = set; then
25765   echo $ECHO_N "(cached) $ECHO_C" >&6
25766 else
25767
25768         cat >"conftest.$ac_ext" <<_ACEOF
25769 #line 25769 "configure"
25770 #include "confdefs.h"
25771
25772 int
25773 main (void)
25774 {
25775 bool foo = false
25776   ;
25777   return 0;
25778 }
25779 _ACEOF
25780 rm -f "conftest.$ac_objext"
25781 if { (eval echo "$as_me:25781: \"$ac_compile\"") >&5
25782   (eval $ac_compile) 2>&5
25783   ac_status=$?
25784   echo "$as_me:25784: \$? = $ac_status" >&5
25785   (exit "$ac_status"); } &&
25786          { ac_try='test -s "conftest.$ac_objext"'
25787   { (eval echo "$as_me:25787: \"$ac_try\"") >&5
25788   (eval $ac_try) 2>&5
25789   ac_status=$?
25790   echo "$as_me:25790: \$? = $ac_status" >&5
25791   (exit "$ac_status"); }; }; then
25792   cf_cv_header_stdbool_h=0
25793 else
25794   echo "$as_me: failed program was:" >&5
25795 cat "conftest.$ac_ext" >&5
25796 cat >"conftest.$ac_ext" <<_ACEOF
25797 #line 25797 "configure"
25798 #include "confdefs.h"
25799
25800 #ifndef __BEOS__
25801 #include <stdbool.h>
25802 #endif
25803
25804 int
25805 main (void)
25806 {
25807 bool foo = false
25808   ;
25809   return 0;
25810 }
25811 _ACEOF
25812 rm -f "conftest.$ac_objext"
25813 if { (eval echo "$as_me:25813: \"$ac_compile\"") >&5
25814   (eval $ac_compile) 2>&5
25815   ac_status=$?
25816   echo "$as_me:25816: \$? = $ac_status" >&5
25817   (exit "$ac_status"); } &&
25818          { ac_try='test -s "conftest.$ac_objext"'
25819   { (eval echo "$as_me:25819: \"$ac_try\"") >&5
25820   (eval $ac_try) 2>&5
25821   ac_status=$?
25822   echo "$as_me:25822: \$? = $ac_status" >&5
25823   (exit "$ac_status"); }; }; then
25824   cf_cv_header_stdbool_h=1
25825 else
25826   echo "$as_me: failed program was:" >&5
25827 cat "conftest.$ac_ext" >&5
25828 cf_cv_header_stdbool_h=0
25829 fi
25830 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25831 fi
25832 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25833 fi
25834
25835 if test "$cf_cv_header_stdbool_h" = 1
25836 then    echo "$as_me:25836: result: yes" >&5
25837 echo "${ECHO_T}yes" >&6
25838 else    echo "$as_me:25838: result: no" >&5
25839 echo "${ECHO_T}no" >&6
25840 fi
25841
25842 echo "$as_me:25842: checking for builtin bool type" >&5
25843 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25844
25845 if test "${cf_cv_builtin_bool+set}" = set; then
25846   echo $ECHO_N "(cached) $ECHO_C" >&6
25847 else
25848
25849         cat >"conftest.$ac_ext" <<_ACEOF
25850 #line 25850 "configure"
25851 #include "confdefs.h"
25852
25853 #include <stdio.h>
25854 #include <sys/types.h>
25855
25856 int
25857 main (void)
25858 {
25859 bool x = false
25860   ;
25861   return 0;
25862 }
25863 _ACEOF
25864 rm -f "conftest.$ac_objext"
25865 if { (eval echo "$as_me:25865: \"$ac_compile\"") >&5
25866   (eval $ac_compile) 2>&5
25867   ac_status=$?
25868   echo "$as_me:25868: \$? = $ac_status" >&5
25869   (exit "$ac_status"); } &&
25870          { ac_try='test -s "conftest.$ac_objext"'
25871   { (eval echo "$as_me:25871: \"$ac_try\"") >&5
25872   (eval $ac_try) 2>&5
25873   ac_status=$?
25874   echo "$as_me:25874: \$? = $ac_status" >&5
25875   (exit "$ac_status"); }; }; then
25876   cf_cv_builtin_bool=1
25877 else
25878   echo "$as_me: failed program was:" >&5
25879 cat "conftest.$ac_ext" >&5
25880 cf_cv_builtin_bool=0
25881 fi
25882 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25883
25884 fi
25885
25886 if test "$cf_cv_builtin_bool" = 1
25887 then    echo "$as_me:25887: result: yes" >&5
25888 echo "${ECHO_T}yes" >&6
25889 else    echo "$as_me:25889: result: no" >&5
25890 echo "${ECHO_T}no" >&6
25891 fi
25892
25893 echo "$as_me:25893: checking for bool" >&5
25894 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25895 if test "${ac_cv_type_bool+set}" = set; then
25896   echo $ECHO_N "(cached) $ECHO_C" >&6
25897 else
25898   cat >"conftest.$ac_ext" <<_ACEOF
25899 #line 25899 "configure"
25900 #include "confdefs.h"
25901
25902 #include <stdlib.h>
25903 #include <stdio.h>
25904
25905 #if defined(__cplusplus)
25906
25907 #ifdef HAVE_GXX_BUILTIN_H
25908 #include <g++/builtin.h>
25909 #elif HAVE_GPP_BUILTIN_H
25910 #include <gpp/builtin.h>
25911 #elif HAVE_BUILTIN_H
25912 #include <builtin.h>
25913 #endif
25914
25915 #else
25916
25917 #if $cf_cv_header_stdbool_h
25918 #include <stdbool.h>
25919 #endif
25920
25921 #endif
25922
25923 int
25924 main (void)
25925 {
25926 if ((bool *) 0)
25927   return 0;
25928 if (sizeof (bool))
25929   return 0;
25930   ;
25931   return 0;
25932 }
25933 _ACEOF
25934 rm -f "conftest.$ac_objext"
25935 if { (eval echo "$as_me:25935: \"$ac_compile\"") >&5
25936   (eval $ac_compile) 2>&5
25937   ac_status=$?
25938   echo "$as_me:25938: \$? = $ac_status" >&5
25939   (exit "$ac_status"); } &&
25940          { ac_try='test -s "conftest.$ac_objext"'
25941   { (eval echo "$as_me:25941: \"$ac_try\"") >&5
25942   (eval $ac_try) 2>&5
25943   ac_status=$?
25944   echo "$as_me:25944: \$? = $ac_status" >&5
25945   (exit "$ac_status"); }; }; then
25946   ac_cv_type_bool=yes
25947 else
25948   echo "$as_me: failed program was:" >&5
25949 cat "conftest.$ac_ext" >&5
25950 ac_cv_type_bool=no
25951 fi
25952 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25953 fi
25954 echo "$as_me:25954: result: $ac_cv_type_bool" >&5
25955 echo "${ECHO_T}$ac_cv_type_bool" >&6
25956
25957 echo "$as_me:25957: checking size of bool" >&5
25958 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25959 if test "${ac_cv_sizeof_bool+set}" = set; then
25960   echo $ECHO_N "(cached) $ECHO_C" >&6
25961 else
25962   if test "$ac_cv_type_bool" = yes; then
25963   if test "$cross_compiling" = yes; then
25964   # Depending upon the size, compute the lo and hi bounds.
25965 cat >"conftest.$ac_ext" <<_ACEOF
25966 #line 25966 "configure"
25967 #include "confdefs.h"
25968
25969 #include <stdlib.h>
25970 #include <stdio.h>
25971
25972 #if defined(__cplusplus)
25973
25974 #ifdef HAVE_GXX_BUILTIN_H
25975 #include <g++/builtin.h>
25976 #elif HAVE_GPP_BUILTIN_H
25977 #include <gpp/builtin.h>
25978 #elif HAVE_BUILTIN_H
25979 #include <builtin.h>
25980 #endif
25981
25982 #else
25983
25984 #if $cf_cv_header_stdbool_h
25985 #include <stdbool.h>
25986 #endif
25987
25988 #endif
25989
25990 int
25991 main (void)
25992 {
25993 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25994   ;
25995   return 0;
25996 }
25997 _ACEOF
25998 rm -f "conftest.$ac_objext"
25999 if { (eval echo "$as_me:25999: \"$ac_compile\"") >&5
26000   (eval $ac_compile) 2>&5
26001   ac_status=$?
26002   echo "$as_me:26002: \$? = $ac_status" >&5
26003   (exit "$ac_status"); } &&
26004          { ac_try='test -s "conftest.$ac_objext"'
26005   { (eval echo "$as_me:26005: \"$ac_try\"") >&5
26006   (eval $ac_try) 2>&5
26007   ac_status=$?
26008   echo "$as_me:26008: \$? = $ac_status" >&5
26009   (exit "$ac_status"); }; }; then
26010   ac_lo=0 ac_mid=0
26011   while :; do
26012     cat >"conftest.$ac_ext" <<_ACEOF
26013 #line 26013 "configure"
26014 #include "confdefs.h"
26015
26016 #include <stdlib.h>
26017 #include <stdio.h>
26018
26019 #if defined(__cplusplus)
26020
26021 #ifdef HAVE_GXX_BUILTIN_H
26022 #include <g++/builtin.h>
26023 #elif HAVE_GPP_BUILTIN_H
26024 #include <gpp/builtin.h>
26025 #elif HAVE_BUILTIN_H
26026 #include <builtin.h>
26027 #endif
26028
26029 #else
26030
26031 #if $cf_cv_header_stdbool_h
26032 #include <stdbool.h>
26033 #endif
26034
26035 #endif
26036
26037 int
26038 main (void)
26039 {
26040 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26041   ;
26042   return 0;
26043 }
26044 _ACEOF
26045 rm -f "conftest.$ac_objext"
26046 if { (eval echo "$as_me:26046: \"$ac_compile\"") >&5
26047   (eval $ac_compile) 2>&5
26048   ac_status=$?
26049   echo "$as_me:26049: \$? = $ac_status" >&5
26050   (exit "$ac_status"); } &&
26051          { ac_try='test -s "conftest.$ac_objext"'
26052   { (eval echo "$as_me:26052: \"$ac_try\"") >&5
26053   (eval $ac_try) 2>&5
26054   ac_status=$?
26055   echo "$as_me:26055: \$? = $ac_status" >&5
26056   (exit "$ac_status"); }; }; then
26057   ac_hi=$ac_mid; break
26058 else
26059   echo "$as_me: failed program was:" >&5
26060 cat "conftest.$ac_ext" >&5
26061 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26062 fi
26063 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26064   done
26065 else
26066   echo "$as_me: failed program was:" >&5
26067 cat "conftest.$ac_ext" >&5
26068 ac_hi=-1 ac_mid=-1
26069   while :; do
26070     cat >"conftest.$ac_ext" <<_ACEOF
26071 #line 26071 "configure"
26072 #include "confdefs.h"
26073
26074 #include <stdlib.h>
26075 #include <stdio.h>
26076
26077 #if defined(__cplusplus)
26078
26079 #ifdef HAVE_GXX_BUILTIN_H
26080 #include <g++/builtin.h>
26081 #elif HAVE_GPP_BUILTIN_H
26082 #include <gpp/builtin.h>
26083 #elif HAVE_BUILTIN_H
26084 #include <builtin.h>
26085 #endif
26086
26087 #else
26088
26089 #if $cf_cv_header_stdbool_h
26090 #include <stdbool.h>
26091 #endif
26092
26093 #endif
26094
26095 int
26096 main (void)
26097 {
26098 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26099   ;
26100   return 0;
26101 }
26102 _ACEOF
26103 rm -f "conftest.$ac_objext"
26104 if { (eval echo "$as_me:26104: \"$ac_compile\"") >&5
26105   (eval $ac_compile) 2>&5
26106   ac_status=$?
26107   echo "$as_me:26107: \$? = $ac_status" >&5
26108   (exit "$ac_status"); } &&
26109          { ac_try='test -s "conftest.$ac_objext"'
26110   { (eval echo "$as_me:26110: \"$ac_try\"") >&5
26111   (eval $ac_try) 2>&5
26112   ac_status=$?
26113   echo "$as_me:26113: \$? = $ac_status" >&5
26114   (exit "$ac_status"); }; }; then
26115   ac_lo=$ac_mid; break
26116 else
26117   echo "$as_me: failed program was:" >&5
26118 cat "conftest.$ac_ext" >&5
26119 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26120 fi
26121 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26122   done
26123 fi
26124 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26125 # Binary search between lo and hi bounds.
26126 while test "x$ac_lo" != "x$ac_hi"; do
26127   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26128   cat >"conftest.$ac_ext" <<_ACEOF
26129 #line 26129 "configure"
26130 #include "confdefs.h"
26131
26132 #include <stdlib.h>
26133 #include <stdio.h>
26134
26135 #if defined(__cplusplus)
26136
26137 #ifdef HAVE_GXX_BUILTIN_H
26138 #include <g++/builtin.h>
26139 #elif HAVE_GPP_BUILTIN_H
26140 #include <gpp/builtin.h>
26141 #elif HAVE_BUILTIN_H
26142 #include <builtin.h>
26143 #endif
26144
26145 #else
26146
26147 #if $cf_cv_header_stdbool_h
26148 #include <stdbool.h>
26149 #endif
26150
26151 #endif
26152
26153 int
26154 main (void)
26155 {
26156 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26157   ;
26158   return 0;
26159 }
26160 _ACEOF
26161 rm -f "conftest.$ac_objext"
26162 if { (eval echo "$as_me:26162: \"$ac_compile\"") >&5
26163   (eval $ac_compile) 2>&5
26164   ac_status=$?
26165   echo "$as_me:26165: \$? = $ac_status" >&5
26166   (exit "$ac_status"); } &&
26167          { ac_try='test -s "conftest.$ac_objext"'
26168   { (eval echo "$as_me:26168: \"$ac_try\"") >&5
26169   (eval $ac_try) 2>&5
26170   ac_status=$?
26171   echo "$as_me:26171: \$? = $ac_status" >&5
26172   (exit "$ac_status"); }; }; then
26173   ac_hi=$ac_mid
26174 else
26175   echo "$as_me: failed program was:" >&5
26176 cat "conftest.$ac_ext" >&5
26177 ac_lo=`expr "$ac_mid" + 1`
26178 fi
26179 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26180 done
26181 ac_cv_sizeof_bool=$ac_lo
26182 else
26183   if test "$cross_compiling" = yes; then
26184   { { echo "$as_me:26184: error: cannot run test program while cross compiling" >&5
26185 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26186    { (exit 1); exit 1; }; }
26187 else
26188   cat >"conftest.$ac_ext" <<_ACEOF
26189 #line 26189 "configure"
26190 #include "confdefs.h"
26191
26192 #include <stdlib.h>
26193 #include <stdio.h>
26194
26195 #if defined(__cplusplus)
26196
26197 #ifdef HAVE_GXX_BUILTIN_H
26198 #include <g++/builtin.h>
26199 #elif HAVE_GPP_BUILTIN_H
26200 #include <gpp/builtin.h>
26201 #elif HAVE_BUILTIN_H
26202 #include <builtin.h>
26203 #endif
26204
26205 #else
26206
26207 #if $cf_cv_header_stdbool_h
26208 #include <stdbool.h>
26209 #endif
26210
26211 #endif
26212
26213 int
26214 main (void)
26215 {
26216 FILE *f = fopen ("conftest.val", "w");
26217 if (!f)
26218   $ac_main_return (1);
26219 fprintf (f, "%ld", (long)(sizeof (bool)));
26220 fclose (f);
26221   ;
26222   return 0;
26223 }
26224 _ACEOF
26225 rm -f "conftest$ac_exeext"
26226 if { (eval echo "$as_me:26226: \"$ac_link\"") >&5
26227   (eval $ac_link) 2>&5
26228   ac_status=$?
26229   echo "$as_me:26229: \$? = $ac_status" >&5
26230   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26231   { (eval echo "$as_me:26231: \"$ac_try\"") >&5
26232   (eval $ac_try) 2>&5
26233   ac_status=$?
26234   echo "$as_me:26234: \$? = $ac_status" >&5
26235   (exit "$ac_status"); }; }; then
26236   ac_cv_sizeof_bool=`cat conftest.val`
26237 else
26238   echo "$as_me: program exited with status $ac_status" >&5
26239 echo "$as_me: failed program was:" >&5
26240 cat "conftest.$ac_ext" >&5
26241 fi
26242 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26243 fi
26244 fi
26245 rm -f conftest.val
26246 else
26247   ac_cv_sizeof_bool=0
26248 fi
26249 fi
26250 echo "$as_me:26250: result: $ac_cv_sizeof_bool" >&5
26251 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26252 cat >>confdefs.h <<EOF
26253 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26254 EOF
26255
26256 echo "$as_me:26256: checking for type of bool" >&5
26257 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26258 if test "${cf_cv_type_of_bool+set}" = set; then
26259   echo $ECHO_N "(cached) $ECHO_C" >&6
26260 else
26261
26262         rm -f cf_test.out
26263         if test "$cross_compiling" = yes; then
26264
26265                 case x$ac_cv_sizeof_bool in
26266                 (x1) cf_cv_type_of_bool="unsigned char";;
26267                 (x2) cf_cv_type_of_bool="unsigned short";;
26268                 (x4) cf_cv_type_of_bool="unsigned int";;
26269                 (x8) cf_cv_type_of_bool="unsigned long";;
26270                 (*)  cf_cv_type_of_bool=unknown;;
26271                 esac
26272
26273 else
26274   cat >"conftest.$ac_ext" <<_ACEOF
26275 #line 26275 "configure"
26276 #include "confdefs.h"
26277
26278 $ac_includes_default
26279
26280 #if defined(__cplusplus)
26281
26282 #ifdef HAVE_GXX_BUILTIN_H
26283 #include <g++/builtin.h>
26284 #elif HAVE_GPP_BUILTIN_H
26285 #include <gpp/builtin.h>
26286 #elif HAVE_BUILTIN_H
26287 #include <builtin.h>
26288 #endif
26289
26290 #else
26291
26292 #if $cf_cv_header_stdbool_h
26293 #include <stdbool.h>
26294 #endif
26295
26296 #endif
26297
26298 int main(void)
26299 {
26300         FILE *fp = fopen("cf_test.out", "w");
26301         if (fp != 0) {
26302                 bool x = true;
26303                 if ((bool)(-x) >= 0)
26304                         fputs("unsigned ", fp);
26305                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26306                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26307                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26308                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26309                 fclose(fp);
26310         }
26311         ${cf_cv_main_return:-return}(0);
26312 }
26313
26314 _ACEOF
26315 rm -f "conftest$ac_exeext"
26316 if { (eval echo "$as_me:26316: \"$ac_link\"") >&5
26317   (eval $ac_link) 2>&5
26318   ac_status=$?
26319   echo "$as_me:26319: \$? = $ac_status" >&5
26320   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26321   { (eval echo "$as_me:26321: \"$ac_try\"") >&5
26322   (eval $ac_try) 2>&5
26323   ac_status=$?
26324   echo "$as_me:26324: \$? = $ac_status" >&5
26325   (exit "$ac_status"); }; }; then
26326   cf_cv_type_of_bool=`cat cf_test.out`
26327                  if test -z "$cf_cv_type_of_bool"; then
26328                    cf_cv_type_of_bool=unknown
26329                  fi
26330 else
26331   echo "$as_me: program exited with status $ac_status" >&5
26332 echo "$as_me: failed program was:" >&5
26333 cat "conftest.$ac_ext" >&5
26334 cf_cv_type_of_bool=unknown
26335 fi
26336 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26337 fi
26338         rm -f cf_test.out
26339
26340 fi
26341 echo "$as_me:26341: result: $cf_cv_type_of_bool" >&5
26342 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26343
26344 if test "$cf_cv_type_of_bool" = unknown ; then
26345         case .$NCURSES_BOOL in
26346         (.auto|.) NCURSES_BOOL=unsigned;;
26347         esac
26348         { echo "$as_me:26348: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26349 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26350         cf_cv_type_of_bool=$NCURSES_BOOL
26351 fi
26352
26353 echo "$as_me:26353: checking for special defines needed for etip.h" >&5
26354 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
26355 cf_save_CXXFLAGS="$CXXFLAGS"
26356 cf_result="none"
26357
26358 # etip.h includes ncurses.h which includes ncurses_dll.h
26359 # But ncurses_dll.h is generated - fix here.
26360 test -d include || mkdir include
26361 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
26362
26363 for cf_math in "" MATH_H
26364 do
26365 for cf_excp in "" MATH_EXCEPTION
26366 do
26367         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
26368         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
26369         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
26370 cat >"conftest.$ac_ext" <<_ACEOF
26371 #line 26371 "configure"
26372 #include "confdefs.h"
26373
26374 #include <etip.h.in>
26375
26376 int
26377 main (void)
26378 {
26379
26380   ;
26381   return 0;
26382 }
26383 _ACEOF
26384 rm -f "conftest.$ac_objext"
26385 if { (eval echo "$as_me:26385: \"$ac_compile\"") >&5
26386   (eval $ac_compile) 2>&5
26387   ac_status=$?
26388   echo "$as_me:26388: \$? = $ac_status" >&5
26389   (exit "$ac_status"); } &&
26390          { ac_try='test -s "conftest.$ac_objext"'
26391   { (eval echo "$as_me:26391: \"$ac_try\"") >&5
26392   (eval $ac_try) 2>&5
26393   ac_status=$?
26394   echo "$as_me:26394: \$? = $ac_status" >&5
26395   (exit "$ac_status"); }; }; then
26396
26397         test -n "$cf_math" && cat >>confdefs.h <<EOF
26398 #define ETIP_NEEDS_${cf_math} 1
26399 EOF
26400
26401         test -n "$cf_excp" && cat >>confdefs.h <<EOF
26402 #define ETIP_NEEDS_${cf_excp} 1
26403 EOF
26404
26405         cf_result="$cf_math $cf_excp"
26406         break 2
26407
26408 else
26409   echo "$as_me: failed program was:" >&5
26410 cat "conftest.$ac_ext" >&5
26411 fi
26412 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26413 done
26414 done
26415 echo "$as_me:26415: result: $cf_result" >&5
26416 echo "${ECHO_T}$cf_result" >&6
26417 CXXFLAGS="$cf_save_CXXFLAGS"
26418
26419 if test -n "$CXX"; then
26420 echo "$as_me:26420: checking if $CXX accepts override keyword" >&5
26421 echo $ECHO_N "checking if $CXX accepts override keyword... $ECHO_C" >&6
26422 if test "${cf_cv_cpp_override+set}" = set; then
26423   echo $ECHO_N "(cached) $ECHO_C" >&6
26424 else
26425
26426         ac_ext=cc
26427 ac_cpp='$CXXCPP $CPPFLAGS'
26428 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26429 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26430 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26431 ac_main_return="return"
26432
26433         if test "$cross_compiling" = yes; then
26434   cf_cv_cpp_override=unknown
26435 else
26436   cat >"conftest.$ac_ext" <<_ACEOF
26437 #line 26437 "configure"
26438 #include "confdefs.h"
26439
26440 class base
26441 {
26442 public:
26443         virtual int foo(float x) = 0;
26444 };
26445
26446 class derived: public base
26447 {
26448 public:
26449         int foo(float x) override { return x != 0.0 ? 1 : 0; }
26450 };
26451
26452 int main(void) { }
26453
26454 _ACEOF
26455 rm -f "conftest$ac_exeext"
26456 if { (eval echo "$as_me:26456: \"$ac_link\"") >&5
26457   (eval $ac_link) 2>&5
26458   ac_status=$?
26459   echo "$as_me:26459: \$? = $ac_status" >&5
26460   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26461   { (eval echo "$as_me:26461: \"$ac_try\"") >&5
26462   (eval $ac_try) 2>&5
26463   ac_status=$?
26464   echo "$as_me:26464: \$? = $ac_status" >&5
26465   (exit "$ac_status"); }; }; then
26466   cf_cv_cpp_override=yes
26467 else
26468   echo "$as_me: program exited with status $ac_status" >&5
26469 echo "$as_me: failed program was:" >&5
26470 cat "conftest.$ac_ext" >&5
26471 cf_cv_cpp_override=no
26472 fi
26473 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26474 fi
26475         ac_ext=cc
26476 ac_cpp='$CXXCPP $CPPFLAGS'
26477 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26478 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26479 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26480 ac_main_return="return"
26481
26482 fi
26483 echo "$as_me:26483: result: $cf_cv_cpp_override" >&5
26484 echo "${ECHO_T}$cf_cv_cpp_override" >&6
26485 fi
26486 test "$cf_cv_cpp_override" = yes &&
26487 cat >>confdefs.h <<\EOF
26488 #define CPP_HAS_OVERRIDE 1
26489 EOF
26490
26491 if test -n "$CXX"; then
26492 echo "$as_me:26492: checking if $CXX accepts parameter initialization" >&5
26493 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
26494 if test "${cf_cv_cpp_param_init+set}" = set; then
26495   echo $ECHO_N "(cached) $ECHO_C" >&6
26496 else
26497
26498         ac_ext=cc
26499 ac_cpp='$CXXCPP $CPPFLAGS'
26500 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26501 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26502 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26503 ac_main_return="return"
26504
26505         if test "$cross_compiling" = yes; then
26506   cf_cv_cpp_param_init=unknown
26507 else
26508   cat >"conftest.$ac_ext" <<_ACEOF
26509 #line 26509 "configure"
26510 #include "confdefs.h"
26511
26512 class TEST {
26513 private:
26514         int value;
26515 public:
26516         TEST(int x = 1);
26517         ~TEST();
26518 };
26519
26520 TEST::TEST(int x = 1)   // some compilers do not like second initializer
26521 {
26522         value = x;
26523 }
26524 int main(void) { }
26525
26526 _ACEOF
26527 rm -f "conftest$ac_exeext"
26528 if { (eval echo "$as_me:26528: \"$ac_link\"") >&5
26529   (eval $ac_link) 2>&5
26530   ac_status=$?
26531   echo "$as_me:26531: \$? = $ac_status" >&5
26532   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26533   { (eval echo "$as_me:26533: \"$ac_try\"") >&5
26534   (eval $ac_try) 2>&5
26535   ac_status=$?
26536   echo "$as_me:26536: \$? = $ac_status" >&5
26537   (exit "$ac_status"); }; }; then
26538   cf_cv_cpp_param_init=yes
26539 else
26540   echo "$as_me: program exited with status $ac_status" >&5
26541 echo "$as_me: failed program was:" >&5
26542 cat "conftest.$ac_ext" >&5
26543 cf_cv_cpp_param_init=no
26544 fi
26545 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26546 fi
26547         ac_ext=cc
26548 ac_cpp='$CXXCPP $CPPFLAGS'
26549 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26550 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26551 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26552 ac_main_return="return"
26553
26554 fi
26555 echo "$as_me:26555: result: $cf_cv_cpp_param_init" >&5
26556 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
26557 fi
26558 test "$cf_cv_cpp_param_init" = yes &&
26559 cat >>confdefs.h <<\EOF
26560 #define CPP_HAS_PARAM_INIT 1
26561 EOF
26562
26563 if test -n "$CXX"; then
26564
26565 echo "$as_me:26565: checking if $CXX accepts static_cast" >&5
26566 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
26567 if test "${cf_cv_cpp_static_cast+set}" = set; then
26568   echo $ECHO_N "(cached) $ECHO_C" >&6
26569 else
26570
26571         ac_ext=cc
26572 ac_cpp='$CXXCPP $CPPFLAGS'
26573 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26574 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26575 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26576 ac_main_return="return"
26577
26578         cat >"conftest.$ac_ext" <<_ACEOF
26579 #line 26579 "configure"
26580 #include "confdefs.h"
26581
26582 class NCursesPanel
26583 {
26584 public:
26585   NCursesPanel(int nlines,
26586                int ncols,
26587                int begin_y = 0,
26588                int begin_x = 0)
26589   {
26590   }
26591   NCursesPanel();
26592   ~NCursesPanel();
26593 };
26594
26595 template<class T> class NCursesUserPanel : public NCursesPanel
26596 {
26597 public:
26598   NCursesUserPanel (int nlines,
26599                     int ncols,
26600                     int begin_y = 0,
26601                     int begin_x = 0,
26602                     const T* p_UserData = static_cast<T*>(0))
26603     : NCursesPanel (nlines, ncols, begin_y, begin_x)
26604   {
26605   };
26606   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
26607   {
26608   };
26609
26610   virtual ~NCursesUserPanel() {};
26611 };
26612
26613 int
26614 main (void)
26615 {
26616
26617         const char* p_UserData = static_cast<char*>(0)
26618   ;
26619   return 0;
26620 }
26621 _ACEOF
26622 rm -f "conftest.$ac_objext"
26623 if { (eval echo "$as_me:26623: \"$ac_compile\"") >&5
26624   (eval $ac_compile) 2>&5
26625   ac_status=$?
26626   echo "$as_me:26626: \$? = $ac_status" >&5
26627   (exit "$ac_status"); } &&
26628          { ac_try='test -s "conftest.$ac_objext"'
26629   { (eval echo "$as_me:26629: \"$ac_try\"") >&5
26630   (eval $ac_try) 2>&5
26631   ac_status=$?
26632   echo "$as_me:26632: \$? = $ac_status" >&5
26633   (exit "$ac_status"); }; }; then
26634   cf_cv_cpp_static_cast=yes
26635 else
26636   echo "$as_me: failed program was:" >&5
26637 cat "conftest.$ac_ext" >&5
26638 cf_cv_cpp_static_cast=no
26639 fi
26640 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26641
26642         ac_ext=cc
26643 ac_cpp='$CXXCPP $CPPFLAGS'
26644 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26645 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26646 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26647 ac_main_return="return"
26648
26649 fi
26650 echo "$as_me:26650: result: $cf_cv_cpp_static_cast" >&5
26651 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
26652
26653 fi
26654
26655 test "$cf_cv_cpp_static_cast" = yes &&
26656 cat >>confdefs.h <<\EOF
26657 #define CPP_HAS_STATIC_CAST 1
26658 EOF
26659
26660         CXX_AR='$(AR)'
26661         CXX_ARFLAGS='$(ARFLAGS)'
26662         case "$cf_cv_system_name" in
26663         (irix*)
26664             if test "$GXX" != yes ; then
26665                 CXX_AR='$(CXX)'
26666                 CXX_ARFLAGS='-ar -o'
26667             fi
26668             ;;
26669         (sco3.2v5*)
26670             CXXLDFLAGS="-u main"
26671             ;;
26672         (solaris2*)
26673             if test "$GXX" != yes ; then
26674                 CXX_AR='$(CXX)'
26675                 CXX_ARFLAGS='-xar -o'
26676             fi
26677             ;;
26678         esac
26679
26680 else
26681         cf_cxx_library=no
26682         cf_cv_builtin_bool=1
26683
26684         # Just because we are not configuring against C++ right now does not
26685         # mean that a user will not want to use C++.  Some distributors disable
26686         # the C++ portion of this configuration as a shortcut (or just to avoid
26687         # compiling the demo in the c++ directory).  So we need a reasonable
26688         # default for the 'bool' type.
26689         #
26690         # Caveat: since the storage of the bool type is not standardized, it
26691         # may change.
26692
26693         if test "$NCURSES_BOOL" != auto ; then
26694                 cf_cv_type_of_bool=$NCURSES_BOOL
26695                 cf_cv_header_stdbool_h=0
26696         else
26697                 if test "$cf_cv_header_stdbool_h" = 1 ; then
26698
26699 echo "$as_me:26699: checking for bool" >&5
26700 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26701 if test "${ac_cv_type_bool+set}" = set; then
26702   echo $ECHO_N "(cached) $ECHO_C" >&6
26703 else
26704   cat >"conftest.$ac_ext" <<_ACEOF
26705 #line 26705 "configure"
26706 #include "confdefs.h"
26707
26708 #include <stdlib.h>
26709 #include <stdio.h>
26710
26711 #if defined(__cplusplus)
26712
26713 #ifdef HAVE_GXX_BUILTIN_H
26714 #include <g++/builtin.h>
26715 #elif HAVE_GPP_BUILTIN_H
26716 #include <gpp/builtin.h>
26717 #elif HAVE_BUILTIN_H
26718 #include <builtin.h>
26719 #endif
26720
26721 #else
26722
26723 #if $cf_cv_header_stdbool_h
26724 #include <stdbool.h>
26725 #endif
26726
26727 #endif
26728
26729 int
26730 main (void)
26731 {
26732 if ((bool *) 0)
26733   return 0;
26734 if (sizeof (bool))
26735   return 0;
26736   ;
26737   return 0;
26738 }
26739 _ACEOF
26740 rm -f "conftest.$ac_objext"
26741 if { (eval echo "$as_me:26741: \"$ac_compile\"") >&5
26742   (eval $ac_compile) 2>&5
26743   ac_status=$?
26744   echo "$as_me:26744: \$? = $ac_status" >&5
26745   (exit "$ac_status"); } &&
26746          { ac_try='test -s "conftest.$ac_objext"'
26747   { (eval echo "$as_me:26747: \"$ac_try\"") >&5
26748   (eval $ac_try) 2>&5
26749   ac_status=$?
26750   echo "$as_me:26750: \$? = $ac_status" >&5
26751   (exit "$ac_status"); }; }; then
26752   ac_cv_type_bool=yes
26753 else
26754   echo "$as_me: failed program was:" >&5
26755 cat "conftest.$ac_ext" >&5
26756 ac_cv_type_bool=no
26757 fi
26758 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26759 fi
26760 echo "$as_me:26760: result: $ac_cv_type_bool" >&5
26761 echo "${ECHO_T}$ac_cv_type_bool" >&6
26762
26763 echo "$as_me:26763: checking size of bool" >&5
26764 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26765 if test "${ac_cv_sizeof_bool+set}" = set; then
26766   echo $ECHO_N "(cached) $ECHO_C" >&6
26767 else
26768   if test "$ac_cv_type_bool" = yes; then
26769   if test "$cross_compiling" = yes; then
26770   # Depending upon the size, compute the lo and hi bounds.
26771 cat >"conftest.$ac_ext" <<_ACEOF
26772 #line 26772 "configure"
26773 #include "confdefs.h"
26774
26775 #include <stdlib.h>
26776 #include <stdio.h>
26777
26778 #if defined(__cplusplus)
26779
26780 #ifdef HAVE_GXX_BUILTIN_H
26781 #include <g++/builtin.h>
26782 #elif HAVE_GPP_BUILTIN_H
26783 #include <gpp/builtin.h>
26784 #elif HAVE_BUILTIN_H
26785 #include <builtin.h>
26786 #endif
26787
26788 #else
26789
26790 #if $cf_cv_header_stdbool_h
26791 #include <stdbool.h>
26792 #endif
26793
26794 #endif
26795
26796 int
26797 main (void)
26798 {
26799 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26800   ;
26801   return 0;
26802 }
26803 _ACEOF
26804 rm -f "conftest.$ac_objext"
26805 if { (eval echo "$as_me:26805: \"$ac_compile\"") >&5
26806   (eval $ac_compile) 2>&5
26807   ac_status=$?
26808   echo "$as_me:26808: \$? = $ac_status" >&5
26809   (exit "$ac_status"); } &&
26810          { ac_try='test -s "conftest.$ac_objext"'
26811   { (eval echo "$as_me:26811: \"$ac_try\"") >&5
26812   (eval $ac_try) 2>&5
26813   ac_status=$?
26814   echo "$as_me:26814: \$? = $ac_status" >&5
26815   (exit "$ac_status"); }; }; then
26816   ac_lo=0 ac_mid=0
26817   while :; do
26818     cat >"conftest.$ac_ext" <<_ACEOF
26819 #line 26819 "configure"
26820 #include "confdefs.h"
26821
26822 #include <stdlib.h>
26823 #include <stdio.h>
26824
26825 #if defined(__cplusplus)
26826
26827 #ifdef HAVE_GXX_BUILTIN_H
26828 #include <g++/builtin.h>
26829 #elif HAVE_GPP_BUILTIN_H
26830 #include <gpp/builtin.h>
26831 #elif HAVE_BUILTIN_H
26832 #include <builtin.h>
26833 #endif
26834
26835 #else
26836
26837 #if $cf_cv_header_stdbool_h
26838 #include <stdbool.h>
26839 #endif
26840
26841 #endif
26842
26843 int
26844 main (void)
26845 {
26846 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26847   ;
26848   return 0;
26849 }
26850 _ACEOF
26851 rm -f "conftest.$ac_objext"
26852 if { (eval echo "$as_me:26852: \"$ac_compile\"") >&5
26853   (eval $ac_compile) 2>&5
26854   ac_status=$?
26855   echo "$as_me:26855: \$? = $ac_status" >&5
26856   (exit "$ac_status"); } &&
26857          { ac_try='test -s "conftest.$ac_objext"'
26858   { (eval echo "$as_me:26858: \"$ac_try\"") >&5
26859   (eval $ac_try) 2>&5
26860   ac_status=$?
26861   echo "$as_me:26861: \$? = $ac_status" >&5
26862   (exit "$ac_status"); }; }; then
26863   ac_hi=$ac_mid; break
26864 else
26865   echo "$as_me: failed program was:" >&5
26866 cat "conftest.$ac_ext" >&5
26867 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26868 fi
26869 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26870   done
26871 else
26872   echo "$as_me: failed program was:" >&5
26873 cat "conftest.$ac_ext" >&5
26874 ac_hi=-1 ac_mid=-1
26875   while :; do
26876     cat >"conftest.$ac_ext" <<_ACEOF
26877 #line 26877 "configure"
26878 #include "confdefs.h"
26879
26880 #include <stdlib.h>
26881 #include <stdio.h>
26882
26883 #if defined(__cplusplus)
26884
26885 #ifdef HAVE_GXX_BUILTIN_H
26886 #include <g++/builtin.h>
26887 #elif HAVE_GPP_BUILTIN_H
26888 #include <gpp/builtin.h>
26889 #elif HAVE_BUILTIN_H
26890 #include <builtin.h>
26891 #endif
26892
26893 #else
26894
26895 #if $cf_cv_header_stdbool_h
26896 #include <stdbool.h>
26897 #endif
26898
26899 #endif
26900
26901 int
26902 main (void)
26903 {
26904 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26905   ;
26906   return 0;
26907 }
26908 _ACEOF
26909 rm -f "conftest.$ac_objext"
26910 if { (eval echo "$as_me:26910: \"$ac_compile\"") >&5
26911   (eval $ac_compile) 2>&5
26912   ac_status=$?
26913   echo "$as_me:26913: \$? = $ac_status" >&5
26914   (exit "$ac_status"); } &&
26915          { ac_try='test -s "conftest.$ac_objext"'
26916   { (eval echo "$as_me:26916: \"$ac_try\"") >&5
26917   (eval $ac_try) 2>&5
26918   ac_status=$?
26919   echo "$as_me:26919: \$? = $ac_status" >&5
26920   (exit "$ac_status"); }; }; then
26921   ac_lo=$ac_mid; break
26922 else
26923   echo "$as_me: failed program was:" >&5
26924 cat "conftest.$ac_ext" >&5
26925 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26926 fi
26927 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26928   done
26929 fi
26930 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26931 # Binary search between lo and hi bounds.
26932 while test "x$ac_lo" != "x$ac_hi"; do
26933   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26934   cat >"conftest.$ac_ext" <<_ACEOF
26935 #line 26935 "configure"
26936 #include "confdefs.h"
26937
26938 #include <stdlib.h>
26939 #include <stdio.h>
26940
26941 #if defined(__cplusplus)
26942
26943 #ifdef HAVE_GXX_BUILTIN_H
26944 #include <g++/builtin.h>
26945 #elif HAVE_GPP_BUILTIN_H
26946 #include <gpp/builtin.h>
26947 #elif HAVE_BUILTIN_H
26948 #include <builtin.h>
26949 #endif
26950
26951 #else
26952
26953 #if $cf_cv_header_stdbool_h
26954 #include <stdbool.h>
26955 #endif
26956
26957 #endif
26958
26959 int
26960 main (void)
26961 {
26962 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26963   ;
26964   return 0;
26965 }
26966 _ACEOF
26967 rm -f "conftest.$ac_objext"
26968 if { (eval echo "$as_me:26968: \"$ac_compile\"") >&5
26969   (eval $ac_compile) 2>&5
26970   ac_status=$?
26971   echo "$as_me:26971: \$? = $ac_status" >&5
26972   (exit "$ac_status"); } &&
26973          { ac_try='test -s "conftest.$ac_objext"'
26974   { (eval echo "$as_me:26974: \"$ac_try\"") >&5
26975   (eval $ac_try) 2>&5
26976   ac_status=$?
26977   echo "$as_me:26977: \$? = $ac_status" >&5
26978   (exit "$ac_status"); }; }; then
26979   ac_hi=$ac_mid
26980 else
26981   echo "$as_me: failed program was:" >&5
26982 cat "conftest.$ac_ext" >&5
26983 ac_lo=`expr "$ac_mid" + 1`
26984 fi
26985 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26986 done
26987 ac_cv_sizeof_bool=$ac_lo
26988 else
26989   if test "$cross_compiling" = yes; then
26990   { { echo "$as_me:26990: error: cannot run test program while cross compiling" >&5
26991 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26992    { (exit 1); exit 1; }; }
26993 else
26994   cat >"conftest.$ac_ext" <<_ACEOF
26995 #line 26995 "configure"
26996 #include "confdefs.h"
26997
26998 #include <stdlib.h>
26999 #include <stdio.h>
27000
27001 #if defined(__cplusplus)
27002
27003 #ifdef HAVE_GXX_BUILTIN_H
27004 #include <g++/builtin.h>
27005 #elif HAVE_GPP_BUILTIN_H
27006 #include <gpp/builtin.h>
27007 #elif HAVE_BUILTIN_H
27008 #include <builtin.h>
27009 #endif
27010
27011 #else
27012
27013 #if $cf_cv_header_stdbool_h
27014 #include <stdbool.h>
27015 #endif
27016
27017 #endif
27018
27019 int
27020 main (void)
27021 {
27022 FILE *f = fopen ("conftest.val", "w");
27023 if (!f)
27024   $ac_main_return (1);
27025 fprintf (f, "%ld", (long)(sizeof (bool)));
27026 fclose (f);
27027   ;
27028   return 0;
27029 }
27030 _ACEOF
27031 rm -f "conftest$ac_exeext"
27032 if { (eval echo "$as_me:27032: \"$ac_link\"") >&5
27033   (eval $ac_link) 2>&5
27034   ac_status=$?
27035   echo "$as_me:27035: \$? = $ac_status" >&5
27036   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27037   { (eval echo "$as_me:27037: \"$ac_try\"") >&5
27038   (eval $ac_try) 2>&5
27039   ac_status=$?
27040   echo "$as_me:27040: \$? = $ac_status" >&5
27041   (exit "$ac_status"); }; }; then
27042   ac_cv_sizeof_bool=`cat conftest.val`
27043 else
27044   echo "$as_me: program exited with status $ac_status" >&5
27045 echo "$as_me: failed program was:" >&5
27046 cat "conftest.$ac_ext" >&5
27047 fi
27048 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27049 fi
27050 fi
27051 rm -f conftest.val
27052 else
27053   ac_cv_sizeof_bool=0
27054 fi
27055 fi
27056 echo "$as_me:27056: result: $ac_cv_sizeof_bool" >&5
27057 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
27058 cat >>confdefs.h <<EOF
27059 #define SIZEOF_BOOL $ac_cv_sizeof_bool
27060 EOF
27061
27062 echo "$as_me:27062: checking for type of bool" >&5
27063 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
27064 if test "${cf_cv_type_of_bool+set}" = set; then
27065   echo $ECHO_N "(cached) $ECHO_C" >&6
27066 else
27067
27068         rm -f cf_test.out
27069         if test "$cross_compiling" = yes; then
27070
27071                 case x$ac_cv_sizeof_bool in
27072                 (x1) cf_cv_type_of_bool="unsigned char";;
27073                 (x2) cf_cv_type_of_bool="unsigned short";;
27074                 (x4) cf_cv_type_of_bool="unsigned int";;
27075                 (x8) cf_cv_type_of_bool="unsigned long";;
27076                 (*)  cf_cv_type_of_bool=unknown;;
27077                 esac
27078
27079 else
27080   cat >"conftest.$ac_ext" <<_ACEOF
27081 #line 27081 "configure"
27082 #include "confdefs.h"
27083
27084 $ac_includes_default
27085
27086 #if defined(__cplusplus)
27087
27088 #ifdef HAVE_GXX_BUILTIN_H
27089 #include <g++/builtin.h>
27090 #elif HAVE_GPP_BUILTIN_H
27091 #include <gpp/builtin.h>
27092 #elif HAVE_BUILTIN_H
27093 #include <builtin.h>
27094 #endif
27095
27096 #else
27097
27098 #if $cf_cv_header_stdbool_h
27099 #include <stdbool.h>
27100 #endif
27101
27102 #endif
27103
27104 int main(void)
27105 {
27106         FILE *fp = fopen("cf_test.out", "w");
27107         if (fp != 0) {
27108                 bool x = true;
27109                 if ((bool)(-x) >= 0)
27110                         fputs("unsigned ", fp);
27111                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
27112                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
27113                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
27114                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
27115                 fclose(fp);
27116         }
27117         ${cf_cv_main_return:-return}(0);
27118 }
27119
27120 _ACEOF
27121 rm -f "conftest$ac_exeext"
27122 if { (eval echo "$as_me:27122: \"$ac_link\"") >&5
27123   (eval $ac_link) 2>&5
27124   ac_status=$?
27125   echo "$as_me:27125: \$? = $ac_status" >&5
27126   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27127   { (eval echo "$as_me:27127: \"$ac_try\"") >&5
27128   (eval $ac_try) 2>&5
27129   ac_status=$?
27130   echo "$as_me:27130: \$? = $ac_status" >&5
27131   (exit "$ac_status"); }; }; then
27132   cf_cv_type_of_bool=`cat cf_test.out`
27133                  if test -z "$cf_cv_type_of_bool"; then
27134                    cf_cv_type_of_bool=unknown
27135                  fi
27136 else
27137   echo "$as_me: program exited with status $ac_status" >&5
27138 echo "$as_me: failed program was:" >&5
27139 cat "conftest.$ac_ext" >&5
27140 cf_cv_type_of_bool=unknown
27141 fi
27142 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27143 fi
27144         rm -f cf_test.out
27145
27146 fi
27147 echo "$as_me:27147: result: $cf_cv_type_of_bool" >&5
27148 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27149
27150 if test "$cf_cv_type_of_bool" = unknown ; then
27151         case .$NCURSES_BOOL in
27152         (.auto|.) NCURSES_BOOL=unsigned;;
27153         esac
27154         { echo "$as_me:27154: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
27155 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
27156         cf_cv_type_of_bool=$NCURSES_BOOL
27157 fi
27158
27159                 else
27160                         echo "$as_me:27160: checking for fallback type of bool" >&5
27161 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
27162                         case "$host_cpu" in
27163                         (i?86)  cf_cv_type_of_bool=char ;;
27164                         (*)     cf_cv_type_of_bool=int  ;;
27165                         esac
27166                         echo "$as_me:27166: result: $cf_cv_type_of_bool" >&5
27167 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27168                 fi
27169         fi
27170 fi
27171
27172 # If the C compiler did not declare bool, and we did not determine that the C++
27173 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
27174 # ncurses library use the same type as C++ bool.  Note that this allows one to
27175 # specify the type of bool in a configure-script option and postpone
27176 # integration with the C++ compiler provided that the types are compatible.
27177 USE_CXX_BOOL=1
27178 if test "$cf_cv_cc_bool_type" = 1
27179 then
27180         # oops: C has a bool.  Unlikely, but C++ could differ.
27181         USE_CXX_BOOL=0
27182 elif test "$cf_cv_builtin_bool" = 0
27183 then
27184         # C++ has no bool
27185         USE_CXX_BOOL=0
27186 else
27187         # this is the normal case
27188         USE_CXX_BOOL='defined(__cplusplus)'
27189 fi
27190
27191 if test -f "${srcdir}/Ada95/Makefile.in" ; then
27192
27193         if test "$cf_with_ada" != "no" ; then
27194                 if test "$with_libtool" != "no"; then
27195                         { echo "$as_me:27195: WARNING: libtool does not support Ada - disabling feature" >&5
27196 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
27197                         cf_with_ada=no
27198                 fi
27199         fi
27200
27201         if test "$cf_with_ada" != "no" ; then
27202
27203 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
27204 do
27205
27206 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27207
27208         unset ac_cv_path_cf_TEMP_gnat
27209         unset cf_TEMP_gnat
27210         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
27211 set dummy $cf_prog_gnat; ac_word=$2
27212 echo "$as_me:27212: checking for $ac_word" >&5
27213 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27214 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
27215   echo $ECHO_N "(cached) $ECHO_C" >&6
27216 else
27217   case $cf_TEMP_gnat in
27218   [\\/]* | ?:[\\/]*)
27219   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
27220   ;;
27221   *)
27222   ac_save_IFS=$IFS; IFS=$ac_path_separator
27223 ac_dummy="$PATH"
27224 for ac_dir in $ac_dummy; do
27225   IFS=$ac_save_IFS
27226   test -z "$ac_dir" && ac_dir=.
27227   if $as_executable_p "$ac_dir/$ac_word"; then
27228    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
27229    echo "$as_me:27229: found $ac_dir/$ac_word" >&5
27230    break
27231 fi
27232 done
27233
27234   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
27235   ;;
27236 esac
27237 fi
27238 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
27239
27240 if test -n "$cf_TEMP_gnat"; then
27241   echo "$as_me:27241: result: $cf_TEMP_gnat" >&5
27242 echo "${ECHO_T}$cf_TEMP_gnat" >&6
27243 else
27244   echo "$as_me:27244: result: no" >&5
27245 echo "${ECHO_T}no" >&6
27246 fi
27247
27248         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
27249
27250         if test "x$cf_TEMP_gnat" != xno; then
27251                 unset cf_cv_gnat_version
27252                 unset cf_TEMP_gnat
27253
27254 echo "$as_me:27254: checking for $cf_prog_gnat version" >&5
27255 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
27256 if test "${cf_cv_gnat_version+set}" = set; then
27257   echo $ECHO_N "(cached) $ECHO_C" >&6
27258 else
27259
27260 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
27261         grep '[0-9].[0-9][0-9]*' |\
27262         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27263
27264 fi
27265 echo "$as_me:27265: result: $cf_cv_gnat_version" >&5
27266 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27267 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27268 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
27269
27270         fi
27271         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
27272
27273         unset cf_TEMP_gnat
27274         unset cf_cv_gnat_version
27275         unset ac_cv_path_cf_TEMP_gnat
27276 done
27277
27278 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
27279         cf_ada_make=
27280         cf_cv_prog_gnat_correct=no
27281 else
27282         cf_ada_make=gnatmake
27283         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
27284                 # gprconfig is newer than gnatmake; we can continue...
27285                 cf_ada_config="##"
27286         else
27287                 rm -rf ./conftest* ./*~conftest*
27288                 if mkdir conftest.src
27289                 then
27290                         cf_ada_config=""
27291                         cd conftest.src
27292                         for cf_gprconfig in Ada C
27293                         do
27294                                 echo "$as_me:27294: checking for gprconfig name for $cf_gprconfig" >&5
27295 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
27296                                 if test "$cf_gprconfig" = C
27297                                 then
27298                                         for cf_gprconfig_param in \
27299                                                 "$cf_gprconfig,,,,GNATGCC" \
27300                                                 "$cf_gprconfig,,,,GCC" \
27301                                                 "$cf_gprconfig"
27302                                         do
27303                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27304                                                 test -n "$cf_gprconfig_value" && break
27305                                         done
27306                                 else
27307                                         cf_gprconfig_param=$cf_gprconfig
27308                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27309                                 fi
27310                                 if test -n "$cf_gprconfig_value"
27311                                 then
27312                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
27313                                         echo "$as_me:27313: result: $cf_gprconfig_value" >&5
27314 echo "${ECHO_T}$cf_gprconfig_value" >&6
27315                                 else
27316                                         echo "$as_me:27316: result: missing" >&5
27317 echo "${ECHO_T}missing" >&6
27318                                         cf_ada_config="#"
27319                                         break
27320                                 fi
27321                         done
27322                         cd ..
27323                         rm -rf ./conftest* ./*~conftest*
27324                 fi
27325         fi
27326         if test "x$cf_ada_config" != "x#"
27327         then
27328
27329 echo "$as_me:27329: checking for gnat version" >&5
27330 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
27331 if test "${cf_cv_gnat_version+set}" = set; then
27332   echo $ECHO_N "(cached) $ECHO_C" >&6
27333 else
27334
27335 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
27336         grep '[0-9].[0-9][0-9]*' |\
27337         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27338
27339 fi
27340 echo "$as_me:27340: result: $cf_cv_gnat_version" >&5
27341 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27342 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27343
27344 case "$cf_cv_gnat_version" in
27345 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27346         cf_cv_prog_gnat_correct=yes
27347         ;;
27348 (*)
27349         { echo "$as_me:27349: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
27350 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
27351         cf_cv_prog_gnat_correct=no
27352         ;;
27353 esac
27354
27355                 # Extract the first word of "m4", so it can be a program name with args.
27356 set dummy m4; ac_word=$2
27357 echo "$as_me:27357: checking for $ac_word" >&5
27358 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27359 if test "${ac_cv_prog_M4_exists+set}" = set; then
27360   echo $ECHO_N "(cached) $ECHO_C" >&6
27361 else
27362   if test -n "$M4_exists"; then
27363   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
27364 else
27365   ac_save_IFS=$IFS; IFS=$ac_path_separator
27366 ac_dummy="$PATH"
27367 for ac_dir in $ac_dummy; do
27368   IFS=$ac_save_IFS
27369   test -z "$ac_dir" && ac_dir=.
27370   $as_executable_p "$ac_dir/$ac_word" || continue
27371 ac_cv_prog_M4_exists="yes"
27372 echo "$as_me:27372: found $ac_dir/$ac_word" >&5
27373 break
27374 done
27375
27376   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
27377 fi
27378 fi
27379 M4_exists=$ac_cv_prog_M4_exists
27380 if test -n "$M4_exists"; then
27381   echo "$as_me:27381: result: $M4_exists" >&5
27382 echo "${ECHO_T}$M4_exists" >&6
27383 else
27384   echo "$as_me:27384: result: no" >&5
27385 echo "${ECHO_T}no" >&6
27386 fi
27387
27388                 if test "$ac_cv_prog_M4_exists" = no; then
27389                         cf_cv_prog_gnat_correct=no
27390                         { echo "$as_me:27390: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
27391 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
27392                 fi
27393                 if test "$cf_cv_prog_gnat_correct" = yes; then
27394                         echo "$as_me:27394: checking if GNAT works" >&5
27395 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
27396
27397 rm -rf ./conftest* ./*~conftest*
27398 cat >>conftest.ads <<CF_EOF
27399 procedure conftest;
27400 CF_EOF
27401 cat >>conftest.adb <<CF_EOF
27402 with Text_IO;
27403 with GNAT.OS_Lib;
27404 procedure conftest is
27405 begin
27406    Text_IO.Put ("Hello World");
27407    Text_IO.New_Line;
27408    GNAT.OS_Lib.OS_Exit (0);
27409 end conftest;
27410 CF_EOF
27411 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27412    if ( ./conftest 1>&5 2>&1 ) ; then
27413       cf_cv_prog_gnat_correct=yes
27414    else
27415       cf_cv_prog_gnat_correct=no
27416    fi
27417 else
27418    cf_cv_prog_gnat_correct=no
27419 fi
27420 rm -rf ./conftest* ./*~conftest*
27421
27422                         echo "$as_me:27422: result: $cf_cv_prog_gnat_correct" >&5
27423 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
27424                 fi
27425         else
27426                 cf_cv_prog_gnat_correct=no
27427         fi
27428 fi
27429
27430                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
27431
27432         ADAFLAGS="$ADAFLAGS -gnatpn"
27433
27434         echo "$as_me:27434: checking optimization options for ADAFLAGS" >&5
27435 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
27436         case "$CFLAGS" in
27437         (*-g*)
27438
27439         ADAFLAGS="$ADAFLAGS -g"
27440
27441                 ;;
27442         esac
27443         case "$CFLAGS" in
27444         (*-O*)
27445                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
27446
27447         ADAFLAGS="$ADAFLAGS $cf_O_flag"
27448
27449                 ;;
27450         esac
27451         echo "$as_me:27451: result: $ADAFLAGS" >&5
27452 echo "${ECHO_T}$ADAFLAGS" >&6
27453
27454 echo "$as_me:27454: checking if GNATPREP supports -T option" >&5
27455 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
27456 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
27457   echo $ECHO_N "(cached) $ECHO_C" >&6
27458 else
27459
27460 cf_cv_gnatprep_opt_t=no
27461 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
27462
27463 fi
27464 echo "$as_me:27464: result: $cf_cv_gnatprep_opt_t" >&5
27465 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
27466 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
27467
27468 echo "$as_me:27468: checking if GNAT supports generics" >&5
27469 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
27470 case "$cf_cv_gnat_version" in
27471 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27472         cf_gnat_generics=yes
27473         ;;
27474 (*)
27475         cf_gnat_generics=no
27476         ;;
27477 esac
27478 echo "$as_me:27478: result: $cf_gnat_generics" >&5
27479 echo "${ECHO_T}$cf_gnat_generics" >&6
27480
27481 if test "$cf_gnat_generics" = yes
27482 then
27483         cf_compile_generics=generics
27484         cf_generic_objects="\${GENOBJS}"
27485 else
27486         cf_compile_generics=
27487         cf_generic_objects=
27488 fi
27489
27490 echo "$as_me:27490: checking if GNAT supports SIGINT" >&5
27491 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
27492 if test "${cf_cv_gnat_sigint+set}" = set; then
27493   echo $ECHO_N "(cached) $ECHO_C" >&6
27494 else
27495
27496 rm -rf ./conftest* ./*~conftest*
27497 cat >>conftest.ads <<CF_EOF
27498 with Ada.Interrupts.Names;
27499
27500 package ConfTest is
27501
27502    pragma Warnings (Off);  --  the next pragma exists since 3.11p
27503    pragma Unreserve_All_Interrupts;
27504    pragma Warnings (On);
27505
27506    protected Process is
27507       procedure Stop;
27508       function Continue return Boolean;
27509       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
27510    private
27511       Done : Boolean := False;
27512    end Process;
27513
27514 end ConfTest;
27515 CF_EOF
27516 cat >>conftest.adb <<CF_EOF
27517 package body ConfTest is
27518    protected body Process is
27519       procedure Stop is
27520       begin
27521          Done := True;
27522       end Stop;
27523       function Continue return Boolean is
27524       begin
27525          return not Done;
27526       end Continue;
27527    end Process;
27528 end ConfTest;
27529 CF_EOF
27530 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27531       cf_cv_gnat_sigint=yes
27532 else
27533    cf_cv_gnat_sigint=no
27534 fi
27535 rm -rf ./conftest* ./*~conftest*
27536
27537 fi
27538 echo "$as_me:27538: result: $cf_cv_gnat_sigint" >&5
27539 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
27540
27541 if test "$cf_cv_gnat_sigint" = yes ; then
27542         USE_GNAT_SIGINT=""
27543 else
27544         USE_GNAT_SIGINT="#"
27545 fi
27546
27547 cf_gnat_libraries=no
27548 cf_gnat_projects=no
27549
27550 if test "$enable_gnat_projects" != no ; then
27551 echo "$as_me:27551: checking if GNAT supports project files" >&5
27552 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
27553 case "$cf_cv_gnat_version" in
27554 (3.[0-9]*)
27555         ;;
27556 (*)
27557         case "$cf_cv_system_name" in
27558         (cygwin*|msys*)
27559                 ;;
27560         (*)
27561                 rm -rf ./conftest* ./*~conftest*
27562                 if mkdir conftest.src conftest.bin conftest.lib
27563                 then
27564                         cd conftest.src
27565                         rm -rf ./conftest* ./*~conftest*
27566                         cat >>library.gpr <<CF_EOF
27567 project Library is
27568   Kind := External ("LIB_KIND");
27569   for Library_Name use "ConfTest";
27570   for Object_Dir use ".";
27571   for Library_ALI_Dir use External("LIBRARY_DIR");
27572   for Library_Version use External ("SONAME");
27573   for Library_Kind use Kind;
27574   for Library_Dir use External("BUILD_DIR");
27575   Source_Dir := External ("SOURCE_DIR");
27576   for Source_Dirs use (Source_Dir);
27577 end Library;
27578 CF_EOF
27579                         cat >>confpackage.ads <<CF_EOF
27580 package ConfPackage is
27581    procedure conftest;
27582 end ConfPackage;
27583 CF_EOF
27584                         cat >>confpackage.adb <<CF_EOF
27585 with Text_IO;
27586 package body ConfPackage is
27587    procedure conftest is
27588    begin
27589       Text_IO.Put ("Hello World");
27590       Text_IO.New_Line;
27591    end conftest;
27592 end ConfPackage;
27593 CF_EOF
27594                         if ( "$cf_ada_make" $ADAFLAGS \
27595                                         -Plibrary.gpr \
27596                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
27597                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
27598                                         -XSOURCE_DIR="`pwd`" \
27599                                         -XSONAME=libConfTest.so.1 \
27600                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
27601                                 cf_gnat_projects=yes
27602                         fi
27603                         cd ..
27604                 fi
27605                 if test -f conftest.lib/confpackage.ali
27606                 then
27607                         cf_gnat_libraries=yes
27608                 fi
27609                 rm -rf ./conftest* ./*~conftest*
27610                 ;;
27611         esac
27612         ;;
27613 esac
27614 echo "$as_me:27614: result: $cf_gnat_projects" >&5
27615 echo "${ECHO_T}$cf_gnat_projects" >&6
27616 fi # enable_gnat_projects
27617
27618 if test "$cf_gnat_projects" = yes
27619 then
27620         echo "$as_me:27620: checking if GNAT supports libraries" >&5
27621 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
27622         echo "$as_me:27622: result: $cf_gnat_libraries" >&5
27623 echo "${ECHO_T}$cf_gnat_libraries" >&6
27624 fi
27625
27626 USE_OLD_MAKERULES=""
27627 USE_GNAT_PROJECTS="#"
27628 USE_GNAT_MAKE_GPR="#"
27629 USE_GNAT_GPRBUILD="#"
27630
27631 if test "$cf_gnat_projects" = yes
27632 then
27633         USE_OLD_MAKERULES="#"
27634         USE_GNAT_PROJECTS=""
27635         if test "$cf_cv_VERSION_GPRBUILD" != no
27636         then
27637                 USE_GNAT_GPRBUILD=""
27638         elif test "$cf_cv_VERSION_GNATMAKE" != no
27639         then
27640                 USE_GNAT_MAKE_GPR=""
27641         else
27642                 { echo "$as_me:27642: WARNING: use old makefile rules since tools are missing" >&5
27643 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
27644         fi
27645 fi
27646
27647 if test "$cf_gnat_libraries" = yes
27648 then
27649         USE_GNAT_LIBRARIES=""
27650 else
27651         USE_GNAT_LIBRARIES="#"
27652 fi
27653
27654 echo "$as_me:27654: checking for ada-compiler" >&5
27655 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
27656
27657 # Check whether --with-ada-compiler or --without-ada-compiler was given.
27658 if test "${with_ada_compiler+set}" = set; then
27659   withval="$with_ada_compiler"
27660   cf_ada_compiler=$withval
27661 else
27662   cf_ada_compiler=gnatmake
27663 fi;
27664
27665 echo "$as_me:27665: result: $cf_ada_compiler" >&5
27666 echo "${ECHO_T}$cf_ada_compiler" >&6
27667
27668                         cf_ada_package=terminal_interface
27669
27670 echo "$as_me:27670: checking for ada-include" >&5
27671 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
27672
27673 # Check whether --with-ada-include or --without-ada-include was given.
27674 if test "${with_ada_include+set}" = set; then
27675   withval="$with_ada_include"
27676
27677 else
27678   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
27679 fi; if test -n "$prefix/share/ada/adainclude" ; then
27680
27681 if test "x$prefix" != xNONE; then
27682         cf_path_syntax="$prefix"
27683 else
27684         cf_path_syntax="$ac_default_prefix"
27685 fi
27686
27687 case ".$withval" in
27688 (.\$\(*\)*|.\'*\'*)
27689         ;;
27690 (..|./*|.\\*)
27691         ;;
27692 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27693         ;;
27694 (.\$\{*prefix\}*|.\$\{*dir\}*)
27695         eval withval="$withval"
27696         case ".$withval" in
27697         (.NONE/*)
27698                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27699                 ;;
27700         esac
27701         ;;
27702 (.no|.NONE/*)
27703         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27704         ;;
27705 (*)
27706         { { echo "$as_me:27706: error: expected a pathname, not \"$withval\"" >&5
27707 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27708    { (exit 1); exit 1; }; }
27709         ;;
27710 esac
27711
27712 fi
27713 eval ADA_INCLUDE="$withval"
27714
27715 echo "$as_me:27715: result: $ADA_INCLUDE" >&5
27716 echo "${ECHO_T}$ADA_INCLUDE" >&6
27717
27718 echo "$as_me:27718: checking for ada-objects" >&5
27719 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
27720
27721 # Check whether --with-ada-objects or --without-ada-objects was given.
27722 if test "${with_ada_objects+set}" = set; then
27723   withval="$with_ada_objects"
27724
27725 else
27726   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
27727 fi; if test -n "$prefix/lib/ada/adalib" ; then
27728
27729 if test "x$prefix" != xNONE; then
27730         cf_path_syntax="$prefix"
27731 else
27732         cf_path_syntax="$ac_default_prefix"
27733 fi
27734
27735 case ".$withval" in
27736 (.\$\(*\)*|.\'*\'*)
27737         ;;
27738 (..|./*|.\\*)
27739         ;;
27740 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27741         ;;
27742 (.\$\{*prefix\}*|.\$\{*dir\}*)
27743         eval withval="$withval"
27744         case ".$withval" in
27745         (.NONE/*)
27746                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27747                 ;;
27748         esac
27749         ;;
27750 (.no|.NONE/*)
27751         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27752         ;;
27753 (*)
27754         { { echo "$as_me:27754: error: expected a pathname, not \"$withval\"" >&5
27755 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27756    { (exit 1); exit 1; }; }
27757         ;;
27758 esac
27759
27760 fi
27761 eval ADA_OBJECTS="$withval"
27762
27763 echo "$as_me:27763: result: $ADA_OBJECTS" >&5
27764 echo "${ECHO_T}$ADA_OBJECTS" >&6
27765
27766 echo "$as_me:27766: checking if an Ada95 shared-library should be built" >&5
27767 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
27768
27769 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
27770 if test "${with_ada_sharedlib+set}" = set; then
27771   withval="$with_ada_sharedlib"
27772   with_ada_sharedlib=$withval
27773 else
27774   with_ada_sharedlib=no
27775 fi;
27776 echo "$as_me:27776: result: $with_ada_sharedlib" >&5
27777 echo "${ECHO_T}$with_ada_sharedlib" >&6
27778
27779 if test "x$with_ada_sharedlib" != xno
27780 then
27781         if test "x$cf_gnat_projects" != xyes
27782         then
27783                 { echo "$as_me:27783: WARNING: disabling shared-library since GNAT projects are not supported" >&5
27784 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
27785                 with_ada_sharedlib=no
27786         fi
27787 fi
27788
27789 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
27790 MAKE_ADA_SHAREDLIB="#"
27791
27792 if test "x$with_ada_sharedlib" != xno
27793 then
27794         MAKE_ADA_SHAREDLIB=
27795         if test "x$with_ada_sharedlib" != xyes
27796         then
27797                 ADA_SHAREDLIB="$with_ada_sharedlib"
27798         fi
27799 fi
27800
27801                         # allow the Ada binding to be renamed
27802
27803 echo "$as_me:27803: checking for ada-libname" >&5
27804 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
27805
27806 # Check whether --with-ada-libname or --without-ada-libname was given.
27807 if test "${with_ada_libname+set}" = set; then
27808   withval="$with_ada_libname"
27809   ADA_LIBNAME=$withval
27810 else
27811   ADA_LIBNAME=AdaCurses
27812 fi;
27813 case "x$ADA_LIBNAME" in
27814 (x|xyes|xno)
27815         ADA_LIBNAME=AdaCurses
27816         ;;
27817 esac
27818
27819 echo "$as_me:27819: result: $ADA_LIBNAME" >&5
27820 echo "${ECHO_T}$ADA_LIBNAME" >&6
27821
27822                 fi
27823         fi
27824 else
27825         cf_with_ada=no
27826 fi
27827
27828 # do this "late" to avoid conflict with header-checks
27829 if test "x$with_widec" = xyes ; then
27830         echo "$as_me:27830: checking for wchar_t" >&5
27831 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
27832 if test "${ac_cv_type_wchar_t+set}" = set; then
27833   echo $ECHO_N "(cached) $ECHO_C" >&6
27834 else
27835   cat >"conftest.$ac_ext" <<_ACEOF
27836 #line 27836 "configure"
27837 #include "confdefs.h"
27838 $ac_includes_default
27839 int
27840 main (void)
27841 {
27842 if ((wchar_t *) 0)
27843   return 0;
27844 if (sizeof (wchar_t))
27845   return 0;
27846   ;
27847   return 0;
27848 }
27849 _ACEOF
27850 rm -f "conftest.$ac_objext"
27851 if { (eval echo "$as_me:27851: \"$ac_compile\"") >&5
27852   (eval $ac_compile) 2>&5
27853   ac_status=$?
27854   echo "$as_me:27854: \$? = $ac_status" >&5
27855   (exit "$ac_status"); } &&
27856          { ac_try='test -s "conftest.$ac_objext"'
27857   { (eval echo "$as_me:27857: \"$ac_try\"") >&5
27858   (eval $ac_try) 2>&5
27859   ac_status=$?
27860   echo "$as_me:27860: \$? = $ac_status" >&5
27861   (exit "$ac_status"); }; }; then
27862   ac_cv_type_wchar_t=yes
27863 else
27864   echo "$as_me: failed program was:" >&5
27865 cat "conftest.$ac_ext" >&5
27866 ac_cv_type_wchar_t=no
27867 fi
27868 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27869 fi
27870 echo "$as_me:27870: result: $ac_cv_type_wchar_t" >&5
27871 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
27872
27873 echo "$as_me:27873: checking size of wchar_t" >&5
27874 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
27875 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
27876   echo $ECHO_N "(cached) $ECHO_C" >&6
27877 else
27878   if test "$ac_cv_type_wchar_t" = yes; then
27879   if test "$cross_compiling" = yes; then
27880   # Depending upon the size, compute the lo and hi bounds.
27881 cat >"conftest.$ac_ext" <<_ACEOF
27882 #line 27882 "configure"
27883 #include "confdefs.h"
27884 $ac_includes_default
27885 int
27886 main (void)
27887 {
27888 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
27889   ;
27890   return 0;
27891 }
27892 _ACEOF
27893 rm -f "conftest.$ac_objext"
27894 if { (eval echo "$as_me:27894: \"$ac_compile\"") >&5
27895   (eval $ac_compile) 2>&5
27896   ac_status=$?
27897   echo "$as_me:27897: \$? = $ac_status" >&5
27898   (exit "$ac_status"); } &&
27899          { ac_try='test -s "conftest.$ac_objext"'
27900   { (eval echo "$as_me:27900: \"$ac_try\"") >&5
27901   (eval $ac_try) 2>&5
27902   ac_status=$?
27903   echo "$as_me:27903: \$? = $ac_status" >&5
27904   (exit "$ac_status"); }; }; then
27905   ac_lo=0 ac_mid=0
27906   while :; do
27907     cat >"conftest.$ac_ext" <<_ACEOF
27908 #line 27908 "configure"
27909 #include "confdefs.h"
27910 $ac_includes_default
27911 int
27912 main (void)
27913 {
27914 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27915   ;
27916   return 0;
27917 }
27918 _ACEOF
27919 rm -f "conftest.$ac_objext"
27920 if { (eval echo "$as_me:27920: \"$ac_compile\"") >&5
27921   (eval $ac_compile) 2>&5
27922   ac_status=$?
27923   echo "$as_me:27923: \$? = $ac_status" >&5
27924   (exit "$ac_status"); } &&
27925          { ac_try='test -s "conftest.$ac_objext"'
27926   { (eval echo "$as_me:27926: \"$ac_try\"") >&5
27927   (eval $ac_try) 2>&5
27928   ac_status=$?
27929   echo "$as_me:27929: \$? = $ac_status" >&5
27930   (exit "$ac_status"); }; }; then
27931   ac_hi=$ac_mid; break
27932 else
27933   echo "$as_me: failed program was:" >&5
27934 cat "conftest.$ac_ext" >&5
27935 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27936 fi
27937 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27938   done
27939 else
27940   echo "$as_me: failed program was:" >&5
27941 cat "conftest.$ac_ext" >&5
27942 ac_hi=-1 ac_mid=-1
27943   while :; do
27944     cat >"conftest.$ac_ext" <<_ACEOF
27945 #line 27945 "configure"
27946 #include "confdefs.h"
27947 $ac_includes_default
27948 int
27949 main (void)
27950 {
27951 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
27952   ;
27953   return 0;
27954 }
27955 _ACEOF
27956 rm -f "conftest.$ac_objext"
27957 if { (eval echo "$as_me:27957: \"$ac_compile\"") >&5
27958   (eval $ac_compile) 2>&5
27959   ac_status=$?
27960   echo "$as_me:27960: \$? = $ac_status" >&5
27961   (exit "$ac_status"); } &&
27962          { ac_try='test -s "conftest.$ac_objext"'
27963   { (eval echo "$as_me:27963: \"$ac_try\"") >&5
27964   (eval $ac_try) 2>&5
27965   ac_status=$?
27966   echo "$as_me:27966: \$? = $ac_status" >&5
27967   (exit "$ac_status"); }; }; then
27968   ac_lo=$ac_mid; break
27969 else
27970   echo "$as_me: failed program was:" >&5
27971 cat "conftest.$ac_ext" >&5
27972 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27973 fi
27974 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27975   done
27976 fi
27977 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27978 # Binary search between lo and hi bounds.
27979 while test "x$ac_lo" != "x$ac_hi"; do
27980   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27981   cat >"conftest.$ac_ext" <<_ACEOF
27982 #line 27982 "configure"
27983 #include "confdefs.h"
27984 $ac_includes_default
27985 int
27986 main (void)
27987 {
27988 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27989   ;
27990   return 0;
27991 }
27992 _ACEOF
27993 rm -f "conftest.$ac_objext"
27994 if { (eval echo "$as_me:27994: \"$ac_compile\"") >&5
27995   (eval $ac_compile) 2>&5
27996   ac_status=$?
27997   echo "$as_me:27997: \$? = $ac_status" >&5
27998   (exit "$ac_status"); } &&
27999          { ac_try='test -s "conftest.$ac_objext"'
28000   { (eval echo "$as_me:28000: \"$ac_try\"") >&5
28001   (eval $ac_try) 2>&5
28002   ac_status=$?
28003   echo "$as_me:28003: \$? = $ac_status" >&5
28004   (exit "$ac_status"); }; }; then
28005   ac_hi=$ac_mid
28006 else
28007   echo "$as_me: failed program was:" >&5
28008 cat "conftest.$ac_ext" >&5
28009 ac_lo=`expr "$ac_mid" + 1`
28010 fi
28011 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28012 done
28013 ac_cv_sizeof_wchar_t=$ac_lo
28014 else
28015   if test "$cross_compiling" = yes; then
28016   { { echo "$as_me:28016: error: cannot run test program while cross compiling" >&5
28017 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
28018    { (exit 1); exit 1; }; }
28019 else
28020   cat >"conftest.$ac_ext" <<_ACEOF
28021 #line 28021 "configure"
28022 #include "confdefs.h"
28023 $ac_includes_default
28024 int
28025 main (void)
28026 {
28027 FILE *f = fopen ("conftest.val", "w");
28028 if (!f)
28029   $ac_main_return (1);
28030 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
28031 fclose (f);
28032   ;
28033   return 0;
28034 }
28035 _ACEOF
28036 rm -f "conftest$ac_exeext"
28037 if { (eval echo "$as_me:28037: \"$ac_link\"") >&5
28038   (eval $ac_link) 2>&5
28039   ac_status=$?
28040   echo "$as_me:28040: \$? = $ac_status" >&5
28041   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
28042   { (eval echo "$as_me:28042: \"$ac_try\"") >&5
28043   (eval $ac_try) 2>&5
28044   ac_status=$?
28045   echo "$as_me:28045: \$? = $ac_status" >&5
28046   (exit "$ac_status"); }; }; then
28047   ac_cv_sizeof_wchar_t=`cat conftest.val`
28048 else
28049   echo "$as_me: program exited with status $ac_status" >&5
28050 echo "$as_me: failed program was:" >&5
28051 cat "conftest.$ac_ext" >&5
28052 fi
28053 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
28054 fi
28055 fi
28056 rm -f conftest.val
28057 else
28058   ac_cv_sizeof_wchar_t=0
28059 fi
28060 fi
28061 echo "$as_me:28061: result: $ac_cv_sizeof_wchar_t" >&5
28062 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
28063 cat >>confdefs.h <<EOF
28064 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
28065 EOF
28066
28067         # cross-compiling to mingw can run into the problem that attempting to
28068         # link with the regex library fails, causing the test to not set this to
28069         # a number.  "recent" autoconf does not address this problem either -TD
28070         if test -z "$ac_cv_sizeof_wchar_t"
28071         then
28072                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
28073
28074 echo "${as_me:-configure}:28074: testing test failed (assume 2) ..." 1>&5
28075
28076                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
28077                 mv confdefs.tmp confdefs.h
28078                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
28079         fi
28080 fi
28081
28082 ### Construct the ncurses library-subsets, if any, from this set of keywords:
28083 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
28084 ###
28085 ### ticlib modules may be a separate library, otherwise contained in termlib.
28086 ### termlib modules may be a separate library, otherwise contained in ncurses.
28087 ###
28088 ### The of "+" or " " between the tokens controls the way the script
28089 ### chooses to split module lists into libraries.
28090 ###
28091 ### (see CF_LIB_RULES).
28092 echo "$as_me:28092: checking for library subsets" >&5
28093 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
28094 LIB_SUBSETS=
28095
28096 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
28097         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
28098         if test "$with_ticlib" != no ; then
28099                 LIB_SUBSETS="${LIB_SUBSETS} "
28100         else
28101                 LIB_SUBSETS="${LIB_SUBSETS}+"
28102         fi
28103 fi
28104
28105 LIB_SUBSETS="${LIB_SUBSETS}termlib"
28106 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
28107
28108 if test "$with_termlib" != no ; then
28109         LIB_SUBSETS="${LIB_SUBSETS} "
28110 else
28111         LIB_SUBSETS="${LIB_SUBSETS}+"
28112 fi
28113
28114 LIB_SUBSETS="${LIB_SUBSETS}base"
28115
28116 # Most term-driver calls are to tinfo, but some like init_pair are to the
28117 # base library (so it resides in base).
28118 if test "$with_term_driver" != no ; then
28119         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
28120         case "$cf_cv_system_name" in
28121         (*mingw32*|*mingw64*)
28122                 if test "x$with_exp_win32" = xyes ; then
28123                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
28124                 else
28125                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
28126                 fi
28127                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
28128                 ;;
28129         (*)
28130                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
28131                 ;;
28132         esac
28133 elif test "x$with_exp_win32" = xyes ; then
28134         case "$cf_cv_system_name" in
28135         (*mingw32*|*mingw64*)
28136                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
28137                 ;;
28138         (*)
28139                 ;;
28140         esac
28141 fi
28142
28143 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
28144 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
28145
28146 echo "$as_me:28146: result: $LIB_SUBSETS" >&5
28147 echo "${ECHO_T}$LIB_SUBSETS" >&6
28148
28149 ### Construct the list of include-directories to be generated
28150
28151 if test "$srcdir" != "."; then
28152         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
28153 fi
28154 CPPFLAGS="-I../include $CPPFLAGS"
28155 if test "$srcdir" != "."; then
28156         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
28157 fi
28158 CPPFLAGS="-I. $CPPFLAGS"
28159
28160 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
28161 if test "$srcdir" != "."; then
28162         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
28163 fi
28164 if test "$GCC" != yes; then
28165         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28166 elif test "$includedir" != "/usr/include"; then
28167         if test "$includedir" = '${prefix}/include' ; then
28168                 if test x$prefix != x/usr ; then
28169                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28170                 fi
28171         else
28172                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28173         fi
28174 fi
28175
28176 ### Build up pieces for makefile rules
28177 echo "$as_me:28177: checking default library suffix" >&5
28178 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
28179
28180         case $DFT_LWR_MODEL in
28181         (libtool) DFT_ARG_SUFFIX=''   ;;
28182         (normal)  DFT_ARG_SUFFIX=''   ;;
28183         (debug)   DFT_ARG_SUFFIX='_g' ;;
28184         (profile) DFT_ARG_SUFFIX='_p' ;;
28185         (shared)  DFT_ARG_SUFFIX=''   ;;
28186         esac
28187         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
28188 echo "$as_me:28188: result: $DFT_ARG_SUFFIX" >&5
28189 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
28190
28191 echo "$as_me:28191: checking default library-dependency suffix" >&5
28192 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
28193
28194         case X$DFT_LWR_MODEL in
28195         (Xlibtool)
28196                 DFT_LIB_SUFFIX='.la'
28197                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28198                 ;;
28199         (Xdebug)
28200                 case "$cf_cv_system_name" in
28201                 (*-msvc*)
28202                         DFT_LIB_SUFFIX='_g.lib'
28203                         ;;
28204                 (*)
28205                         DFT_LIB_SUFFIX='_g.a'
28206                         ;;
28207                 esac
28208                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28209                 ;;
28210         (Xprofile)
28211                 case "$cf_cv_system_name" in
28212                 (*-msvc*)
28213                         DFT_LIB_SUFFIX='_p.lib'
28214                         ;;
28215                 (*)
28216                         DFT_LIB_SUFFIX='_p.a'
28217                         ;;
28218                 esac
28219                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28220                 ;;
28221         (Xshared)
28222                 case "$cf_cv_system_name" in
28223                 (aix[5-7]*)
28224                         DFT_LIB_SUFFIX='.so'
28225                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28226                         ;;
28227                 (*-msvc*)
28228                         DFT_LIB_SUFFIX='.dll'
28229                         DFT_DEP_SUFFIX='.dll.lib'
28230                         ;;
28231                 (cygwin*|msys*|mingw*)
28232                         DFT_LIB_SUFFIX='.dll'
28233                         DFT_DEP_SUFFIX='.dll.a'
28234                         ;;
28235                 (darwin*)
28236                         DFT_LIB_SUFFIX='.dylib'
28237                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28238                         ;;
28239                 (hpux*)
28240                         case "$target" in
28241                         (ia64*)
28242                                 DFT_LIB_SUFFIX='.so'
28243                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28244                                 ;;
28245                         (*)
28246                                 DFT_LIB_SUFFIX='.sl'
28247                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28248                                 ;;
28249                         esac
28250                         ;;
28251                 (*)
28252                         DFT_LIB_SUFFIX='.so'
28253                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28254                         ;;
28255                 esac
28256                 ;;
28257         (*)
28258                 case "$target" in
28259                 (*-msvc*)
28260                         DFT_LIB_SUFFIX='.lib'
28261                         ;;
28262                 (*)
28263                         DFT_LIB_SUFFIX='.a'
28264                         ;;
28265                 esac
28266                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28267                 ;;
28268         esac
28269         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28270         then
28271                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
28272                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
28273         fi
28274 echo "$as_me:28274: result: $DFT_DEP_SUFFIX" >&5
28275 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
28276
28277 echo "$as_me:28277: checking default object directory" >&5
28278 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
28279
28280         case $DFT_LWR_MODEL in
28281         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
28282         (normal)  DFT_OBJ_SUBDIR='objects' ;;
28283         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
28284         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
28285         (shared)
28286                 case "$cf_cv_system_name" in
28287                 (cygwin|msys)
28288                         DFT_OBJ_SUBDIR='objects' ;;
28289                 (*)
28290                         DFT_OBJ_SUBDIR='obj_s' ;;
28291                 esac
28292         esac
28293 echo "$as_me:28293: result: $DFT_OBJ_SUBDIR" >&5
28294 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
28295
28296 if test "x$cf_with_cxx" = xyes ; then
28297 echo "$as_me:28297: checking c++ library-dependency suffix" >&5
28298 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
28299 if test "$with_libtool" != "no"; then
28300         # libtool thinks it can make c++ shared libraries (perhaps only g++)
28301         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28302 elif test "$with_shared_cxx" != "no"; then
28303         # also for g++ users...
28304         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28305 else
28306         # we normally make a static library because C/C++ library rules differ
28307
28308         case Xnormal in
28309         (Xlibtool)
28310                 CXX_LIB_SUFFIX='.la'
28311                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28312                 ;;
28313         (Xdebug)
28314                 case "$cf_cv_system_name" in
28315                 (*-msvc*)
28316                         CXX_LIB_SUFFIX='_g.lib'
28317                         ;;
28318                 (*)
28319                         CXX_LIB_SUFFIX='_g.a'
28320                         ;;
28321                 esac
28322                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28323                 ;;
28324         (Xprofile)
28325                 case "$cf_cv_system_name" in
28326                 (*-msvc*)
28327                         CXX_LIB_SUFFIX='_p.lib'
28328                         ;;
28329                 (*)
28330                         CXX_LIB_SUFFIX='_p.a'
28331                         ;;
28332                 esac
28333                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28334                 ;;
28335         (Xshared)
28336                 case "$cf_cv_system_name" in
28337                 (aix[5-7]*)
28338                         CXX_LIB_SUFFIX='.so'
28339                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28340                         ;;
28341                 (*-msvc*)
28342                         CXX_LIB_SUFFIX='.dll'
28343                         CXX_DEP_SUFFIX='.dll.lib'
28344                         ;;
28345                 (cygwin*|msys*|mingw*)
28346                         CXX_LIB_SUFFIX='.dll'
28347                         CXX_DEP_SUFFIX='.dll.a'
28348                         ;;
28349                 (darwin*)
28350                         CXX_LIB_SUFFIX='.dylib'
28351                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28352                         ;;
28353                 (hpux*)
28354                         case "$target" in
28355                         (ia64*)
28356                                 CXX_LIB_SUFFIX='.so'
28357                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28358                                 ;;
28359                         (*)
28360                                 CXX_LIB_SUFFIX='.sl'
28361                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28362                                 ;;
28363                         esac
28364                         ;;
28365                 (*)
28366                         CXX_LIB_SUFFIX='.so'
28367                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28368                         ;;
28369                 esac
28370                 ;;
28371         (*)
28372                 case "$target" in
28373                 (*-msvc*)
28374                         CXX_LIB_SUFFIX='.lib'
28375                         ;;
28376                 (*)
28377                         CXX_LIB_SUFFIX='.a'
28378                         ;;
28379                 esac
28380                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28381                 ;;
28382         esac
28383         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28384         then
28385                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
28386                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
28387         fi
28388
28389 fi
28390 echo "$as_me:28390: result: $CXX_LIB_SUFFIX" >&5
28391 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
28392
28393 fi
28394
28395 # do not want -ldl in build except as needed for -lncurses dependency
28396 if test "x$with_dlsym" = xyes ; then
28397 if test "$DFT_LWR_MODEL" = shared || \
28398    test "$DFT_LWR_MODEL" = libtool ; then
28399
28400 # remove dl library from $LIBS
28401 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
28402
28403 fi
28404 fi
28405 ### Set up low-level terminfo dependencies for makefiles.
28406
28407 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
28408 # do not need libdl
28409 TICS_LIST=
28410 if test "x$with_dlsym" = xyes ; then
28411
28412 # remove dl library from $SHLIB_LIST
28413 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
28414
28415 fi
28416
28417 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
28418 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
28419 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
28420 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
28421 then
28422         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
28423 fi
28424
28425 if test "$with_ticlib" != no ; then
28426
28427         if test "x$with_ticlib" != xyes ; then
28428                 TICS_NAME=$with_ticlib
28429                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28430                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28431                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28432                 TICS_LIB_SUFFIX="${with_ticlib}"
28433         else
28434                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
28435                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
28436                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
28437                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
28438         fi
28439         TICS_LDFLAGS="-L${LIB_DIR}"
28440         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
28441 else
28442         TICS_SUFFIX=${DFT_LIB_SUFFIX}
28443         TICS_LDFLAGS="-L${LIB_DIR}"
28444         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28445 fi
28446
28447 if test "$with_termlib" != no ; then
28448
28449         if test "x$with_termlib" != xyes ; then
28450                 TINFO_NAME=$with_termlib
28451                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28452                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28453                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28454                 TINFO_LIB_SUFFIX="${with_termlib}"
28455         else
28456                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28457                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
28458                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
28459                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
28460         fi
28461
28462         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28463         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28464         if test "$DFT_LWR_MODEL" = "libtool"; then
28465                 TEST_ARGS="${TEST_DEPS}"
28466                 TEST_ARG2="${TEST_DEP2}"
28467                 TINFO_LDFLAGS="-L${LIB_DIR}"
28468                 TINFO_LIBS="$TEST_ARGS"
28469                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
28470                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
28471         else
28472                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
28473                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
28474                 if test "x$with_term_driver" != xno ; then
28475                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28476                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
28477                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28478                 else
28479                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28480                         TINFO_LIBS="$TEST_ARGS"
28481                 fi
28482                 TINFO_LDFLAGS="-L${LIB_DIR}"
28483                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28484         fi
28485 else
28486         # the next lines are needed for linking libtic over libncurses
28487         TINFO_NAME=${LIB_NAME}
28488         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28489         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
28490         if test "x$with_tic_depends" = xyes ; then
28491                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28492         else
28493                 TICS_LIST="$SHLIB_LIST"
28494         fi
28495
28496         TINFO_LDFLAGS="-L${LIB_DIR}"
28497         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28498 fi
28499
28500 if test "$DFT_LWR_MODEL" = shared ; then
28501         case "$cf_cv_system_name" in
28502         (cygwin*|msys*)
28503                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
28504                 TINFO_SUFFIX=.dll
28505                 ;;
28506         esac
28507 fi
28508
28509 if test "x$with_dlsym" = xyes ; then
28510
28511 # remove dl library from $TICS_LIST
28512 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
28513
28514 fi
28515
28516 if test "$DFT_LWR_MODEL" = "libtool"; then
28517         OBJEXT=lo
28518 fi
28519
28520 # needed for Ada95
28521 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
28522
28523 case "$DFT_LWR_MODEL" in
28524 (normal|debug|profile)
28525
28526 if test "$GCC" = yes ; then
28527         case "$cf_cv_system_name" in
28528         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
28529                 LDFLAGS_STATIC=
28530                 LDFLAGS_SHARED=
28531                 ;;
28532         (*)     # normally, except when broken
28533                 LDFLAGS_STATIC=-static
28534                 LDFLAGS_SHARED=-dynamic
28535                 ;;
28536         esac
28537 else
28538         case "$cf_cv_system_name" in
28539         (aix[4-7]*)     # from ld manpage
28540                 LDFLAGS_STATIC=-bstatic
28541                 LDFLAGS_SHARED=-bdynamic
28542                 ;;
28543         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
28544                 # We could also use just "archive" and "shared".
28545                 LDFLAGS_STATIC=-Wl,-a,archive_shared
28546                 LDFLAGS_SHARED=-Wl,-a,shared_archive
28547                 ;;
28548         (irix*)         # from ld manpage IRIX64
28549                 LDFLAGS_STATIC=-Bstatic
28550                 LDFLAGS_SHARED=-Bdynamic
28551                 ;;
28552         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
28553                 # alternative "-oldstyle_liblookup" (not in cc manpage)
28554                 LDFLAGS_STATIC=-noso
28555                 LDFLAGS_SHARED=-so_archive
28556                 ;;
28557         (solaris2*)
28558                 LDFLAGS_STATIC=-Bstatic
28559                 LDFLAGS_SHARED=-Bdynamic
28560                 ;;
28561         esac
28562 fi
28563
28564 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
28565 then
28566         echo "$as_me:28566: checking if linker supports switching between static/dynamic" >&5
28567 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
28568
28569         rm -f libconftest.a
28570         cat >conftest.$ac_ext <<EOF
28571 #line 28571 "configure"
28572 #include <stdio.h>
28573 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
28574 EOF
28575         if { (eval echo "$as_me:28575: \"$ac_compile\"") >&5
28576   (eval $ac_compile) 2>&5
28577   ac_status=$?
28578   echo "$as_me:28578: \$? = $ac_status" >&5
28579   (exit "$ac_status"); } ; then
28580                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
28581                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
28582         fi
28583         rm -f conftest.*
28584
28585         cf_save_LIBS="$LIBS"
28586
28587         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
28588         cat >"conftest.$ac_ext" <<_ACEOF
28589 #line 28589 "configure"
28590 #include "confdefs.h"
28591
28592 #line 28592 "configure"
28593 #include <stdio.h>
28594 int cf_ldflags_static(FILE *fp);
28595
28596 int
28597 main (void)
28598 {
28599
28600         return cf_ldflags_static(stdin);
28601
28602   ;
28603   return 0;
28604 }
28605 _ACEOF
28606 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28607 if { (eval echo "$as_me:28607: \"$ac_link\"") >&5
28608   (eval $ac_link) 2>&5
28609   ac_status=$?
28610   echo "$as_me:28610: \$? = $ac_status" >&5
28611   (exit "$ac_status"); } &&
28612          { ac_try='test -s "conftest$ac_exeext"'
28613   { (eval echo "$as_me:28613: \"$ac_try\"") >&5
28614   (eval $ac_try) 2>&5
28615   ac_status=$?
28616   echo "$as_me:28616: \$? = $ac_status" >&5
28617   (exit "$ac_status"); }; }; then
28618
28619         # some linkers simply ignore the -dynamic
28620         case x`file "conftest$ac_exeext" 2>/dev/null` in
28621         (*static*)
28622                 cf_ldflags_static=no
28623                 ;;
28624         (*)
28625                 cf_ldflags_static=yes
28626                 ;;
28627         esac
28628
28629 else
28630   echo "$as_me: failed program was:" >&5
28631 cat "conftest.$ac_ext" >&5
28632 cf_ldflags_static=no
28633 fi
28634 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28635
28636         rm -f libconftest.*
28637         LIBS="$cf_save_LIBS"
28638
28639         echo "$as_me:28639: result: $cf_ldflags_static" >&5
28640 echo "${ECHO_T}$cf_ldflags_static" >&6
28641
28642         if test "$cf_ldflags_static" != yes
28643         then
28644                 LDFLAGS_STATIC=
28645                 LDFLAGS_SHARED=
28646         fi
28647 else
28648         LDFLAGS_STATIC=
28649         LDFLAGS_SHARED=
28650 fi
28651
28652         ;;
28653 esac
28654
28655 echo "$as_me:28655: checking where we will install curses.h" >&5
28656 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
28657
28658 includesubdir=
28659 if test "$with_overwrite" = no && \
28660  { test "x$includedir" = 'x${prefix}/include' || \
28661    test "x$includedir" = "x${prefix}/include"; }
28662 then
28663         includesubdir="/ncurses${USE_LIB_SUFFIX}"
28664 fi
28665 echo "$as_me:28665: result: ${includedir}${includesubdir}" >&5
28666 echo "${ECHO_T}${includedir}${includesubdir}" >&6
28667
28668 ### Resolve a conflict between normal and wide-curses by forcing applications
28669 ### that will need libutf8 to add it to their configure script.
28670 if test "$with_overwrite" != no ; then
28671 if test "$NCURSES_LIBUTF8" = 1 ; then
28672         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
28673         { echo "$as_me:28673: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
28674 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
28675 fi
28676 fi
28677 WITH_OVERWRITE=$with_overwrite
28678
28679 ### At least on MinGW a shared library build without libtool
28680 ### requires adding the additional libs to the link list.
28681 case "$cf_cv_system_name" in
28682 (*mingw32*|*mingw64*)
28683         if test "$DFT_LWR_MODEL" != "libtool"; then
28684            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
28685         fi
28686         ;;
28687 *)      ;;
28688 esac
28689
28690 # used to separate tack out of the tree
28691 NCURSES_TREE=
28692
28693 ### predefined stuff for the test programs
28694
28695 cat >>confdefs.h <<\EOF
28696 #define HAVE_SLK_COLOR 1
28697 EOF
28698
28699 # pkgsrc uses these
28700
28701 echo "$as_me:28701: checking for desired basename for form library" >&5
28702 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
28703
28704 # Check whether --with-form-libname or --without-form-libname was given.
28705 if test "${with_form_libname+set}" = set; then
28706   withval="$with_form_libname"
28707   with_lib_basename=$withval
28708 else
28709   with_lib_basename=form
28710 fi;
28711 FORM_NAME="$with_lib_basename"
28712
28713 case "x$FORM_NAME" in
28714 (x|xno|xnone|xyes)
28715         FORM_NAME=form
28716         ;;
28717 (*)
28718         ;;
28719 esac
28720
28721 echo "$as_me:28721: result: $FORM_NAME" >&5
28722 echo "${ECHO_T}$FORM_NAME" >&6
28723
28724 echo "$as_me:28724: checking for desired basename for menu library" >&5
28725 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
28726
28727 # Check whether --with-menu-libname or --without-menu-libname was given.
28728 if test "${with_menu_libname+set}" = set; then
28729   withval="$with_menu_libname"
28730   with_lib_basename=$withval
28731 else
28732   with_lib_basename=menu
28733 fi;
28734 MENU_NAME="$with_lib_basename"
28735
28736 case "x$MENU_NAME" in
28737 (x|xno|xnone|xyes)
28738         MENU_NAME=menu
28739         ;;
28740 (*)
28741         ;;
28742 esac
28743
28744 echo "$as_me:28744: result: $MENU_NAME" >&5
28745 echo "${ECHO_T}$MENU_NAME" >&6
28746
28747 echo "$as_me:28747: checking for desired basename for panel library" >&5
28748 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
28749
28750 # Check whether --with-panel-libname or --without-panel-libname was given.
28751 if test "${with_panel_libname+set}" = set; then
28752   withval="$with_panel_libname"
28753   with_lib_basename=$withval
28754 else
28755   with_lib_basename=panel
28756 fi;
28757 PANEL_NAME="$with_lib_basename"
28758
28759 case "x$PANEL_NAME" in
28760 (x|xno|xnone|xyes)
28761         PANEL_NAME=panel
28762         ;;
28763 (*)
28764         ;;
28765 esac
28766
28767 echo "$as_me:28767: result: $PANEL_NAME" >&5
28768 echo "${ECHO_T}$PANEL_NAME" >&6
28769
28770 echo "$as_me:28770: checking for desired basename for cxx library" >&5
28771 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
28772
28773 # Check whether --with-cxx-libname or --without-cxx-libname was given.
28774 if test "${with_cxx_libname+set}" = set; then
28775   withval="$with_cxx_libname"
28776   with_lib_basename=$withval
28777 else
28778   with_lib_basename=ncurses++
28779 fi;
28780 CXX_NAME="$with_lib_basename"
28781
28782 case "x$CXX_NAME" in
28783 (x|xno|xnone|xyes)
28784         CXX_NAME=ncurses++
28785         ;;
28786 (*)
28787         ;;
28788 esac
28789
28790 echo "$as_me:28790: result: $CXX_NAME" >&5
28791 echo "${ECHO_T}$CXX_NAME" >&6
28792
28793 ### Construct the list of subdirectories for which we'll customize makefiles
28794 ### with the appropriate compile-rules.
28795
28796 echo "$as_me:28796: checking for src modules" >&5
28797 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
28798
28799 # dependencies and linker-arguments for test-programs
28800 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
28801 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
28802 if test "$DFT_LWR_MODEL" = "libtool"; then
28803         TEST_ARGS="${TEST_DEPS}"
28804         TEST_ARG2="${TEST_DEP2}"
28805 else
28806         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28807         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
28808 fi
28809
28810 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
28811 cf_cv_src_modules=
28812 for cf_dir in $modules_to_build
28813 do
28814         if test -f "$srcdir/$cf_dir/modules" ; then
28815
28816                 # We may/may not have tack in the distribution, though the
28817                 # makefile is.
28818                 if test "$cf_dir" = tack ; then
28819                         if test "x$cf_with_tack" != "xyes"; then
28820                                 continue
28821                         fi
28822                 fi
28823
28824                 if test -z "$cf_cv_src_modules"; then
28825                         cf_cv_src_modules=$cf_dir
28826                 else
28827                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
28828                 fi
28829
28830                 # Make the ncurses_cfg.h file record the library interface files as
28831                 # well.  These are header files that are the same name as their
28832                 # directory.  Ncurses is the only library that does not follow
28833                 # that pattern.
28834                 if test "$cf_dir" = tack ; then
28835                         continue
28836                 elif test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
28837
28838 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28839
28840                         cat >>confdefs.h <<EOF
28841 #define HAVE_${cf_have_include}_H 1
28842 EOF
28843
28844                         cat >>confdefs.h <<EOF
28845 #define HAVE_LIB${cf_have_include} 1
28846 EOF
28847
28848 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28849
28850 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28851
28852                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28853                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
28854                         if test "$DFT_LWR_MODEL" = "libtool"; then
28855                                 TEST_ARGS="${TEST_DEPS}"
28856                                 TEST_ARG2="${TEST_DEP2}"
28857                         else
28858                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
28859                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
28860                         fi
28861                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
28862                 fi
28863         fi
28864 done
28865 echo "$as_me:28865: result: $cf_cv_src_modules" >&5
28866 echo "${ECHO_T}$cf_cv_src_modules" >&6
28867
28868 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
28869 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
28870
28871 SRC_SUBDIRS=
28872 if test "x$cf_with_manpages" != xno ; then
28873         SRC_SUBDIRS="$SRC_SUBDIRS man"
28874 fi
28875 SRC_SUBDIRS="$SRC_SUBDIRS include"
28876 for cf_dir in $cf_cv_src_modules
28877 do
28878         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
28879 done
28880 if test "x$cf_with_tests" != "xno" ; then
28881         SRC_SUBDIRS="$SRC_SUBDIRS test"
28882 fi
28883 # always make this, to install the ncurses-config script
28884 SRC_SUBDIRS="$SRC_SUBDIRS misc"
28885 if test "$cf_with_cxx_binding" != no; then
28886         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
28887         SRC_SUBDIRS="$SRC_SUBDIRS c++"
28888 fi
28889
28890 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
28891 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
28892
28893 ADA_SUBDIRS=
28894 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
28895         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
28896         ADA_SUBDIRS="gen src"
28897         if test "x$cf_with_tests" != "xno" ; then
28898                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
28899         fi
28900 fi
28901
28902 SUB_MAKEFILES=
28903 for cf_dir in $SRC_SUBDIRS
28904 do
28905         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
28906 done
28907
28908 if test -n "$ADA_SUBDIRS"; then
28909         for cf_dir in $ADA_SUBDIRS
28910         do
28911                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
28912         done
28913
28914 fi
28915
28916 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28917    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
28918    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
28919    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
28920 fi
28921
28922 DIRS_TO_MAKE="lib"
28923 for cf_item in $cf_list_models
28924 do
28925
28926         case $cf_item in
28927         (libtool) cf_subdir='obj_lo'  ;;
28928         (normal)  cf_subdir='objects' ;;
28929         (debug)   cf_subdir='obj_g' ;;
28930         (profile) cf_subdir='obj_p' ;;
28931         (shared)
28932                 case "$cf_cv_system_name" in
28933                 (cygwin|msys)
28934                         cf_subdir='objects' ;;
28935                 (*)
28936                         cf_subdir='obj_s' ;;
28937                 esac
28938         esac
28939
28940         for cf_item2 in $DIRS_TO_MAKE
28941         do
28942                 test "$cf_item2" = "$cf_subdir" && break
28943         done
28944         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
28945 done
28946 for cf_dir in $DIRS_TO_MAKE
28947 do
28948         test ! -d "$cf_dir" && mkdir "$cf_dir"
28949 done
28950
28951 # symbols that differ when compiling Ada95 by itself.
28952 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
28953
28954 # values to use as strings
28955
28956 cat >>confdefs.h <<EOF
28957 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
28958 EOF
28959
28960 cat >>confdefs.h <<EOF
28961 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
28962 EOF
28963
28964 ### Define substitutions for header files to avoid name-pollution
28965
28966 if test "x$cf_cv_have_tcgetattr" = xyes ; then
28967         HAVE_TCGETATTR=1
28968 else
28969         HAVE_TCGETATTR=0
28970 fi
28971
28972 if test "x$ac_cv_header_stdint_h" = xyes ; then
28973         HAVE_STDINT_H=1
28974 else
28975         HAVE_STDINT_H=0
28976 fi
28977
28978 if test "x$ac_cv_header_termio_h" = xyes ; then
28979         HAVE_TERMIO_H=1
28980 else
28981         HAVE_TERMIO_H=0
28982 fi
28983
28984 if test "x$ac_cv_header_termios_h" = xyes ; then
28985         HAVE_TERMIOS_H=1
28986 else
28987         HAVE_TERMIOS_H=0
28988 fi
28989
28990 ################################################################################
28991 test "x$use_database" = xyes && \
28992 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
28993
28994 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
28995 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
28996
28997 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
28998 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
28999 fi
29000
29001 if test "x$cf_with_tests" != xno ; then
29002         MAKE_TESTS=
29003 else
29004         MAKE_TESTS="#"
29005 fi
29006
29007 ADAHTML_DIR=../../doc/html/ada
29008
29009 # workaround for OS/2 (20151017)
29010 case "$cf_cv_system_name" in
29011 (os2*)
29012         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
29013         ;;
29014 (*)
29015         LIBTOOL_OPTS_CXX=
29016         ;;
29017 esac
29018
29019 # workaround for g++ versus Solaris (20131116)
29020 case "$cf_cv_system_name" in
29021 (solaris2*)
29022         case "x$CPPFLAGS" in
29023         (*-D_XOPEN_SOURCE_EXTENDED*)
29024                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
29025
29026 echo "${as_me:-configure}:29026: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
29027
29028                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
29029                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
29030                 ;;
29031         esac
29032         ;;
29033 esac
29034
29035 # Help to automatically enable the extended curses features when using either
29036 # the *-config or the ".pc" files by adding defines.
29037 echo "$as_me:29037: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
29038 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
29039 PKG_CFLAGS=
29040 for cf_loop1 in $CPPFLAGS_after_XOPEN
29041 do
29042         cf_found=no
29043         for cf_loop2 in $CPPFLAGS_before_XOPEN
29044         do
29045                 if test "x$cf_loop1" = "x$cf_loop2"
29046                 then
29047                         cf_found=yes
29048                         break
29049                 fi
29050         done
29051         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
29052 done
29053 echo "$as_me:29053: result: $PKG_CFLAGS" >&5
29054 echo "${ECHO_T}$PKG_CFLAGS" >&6
29055
29056 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
29057 case "x$NCURSES_OSPEED" in
29058 (*short*)
29059         cf_compatible=1
29060         ;;
29061 (*)
29062         cf_compatible=0
29063         ;;
29064 esac
29065
29066 cat >>confdefs.h <<EOF
29067 #define NCURSES_OSPEED_COMPAT $cf_compatible
29068 EOF
29069
29070 case "x$cf_cv_typeof_chtype" in
29071 (xshort|xint|xlong)
29072         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
29073         ;;
29074 esac
29075
29076 case "x$cf_cv_typeof_mmask_t" in
29077 (xshort|xint|xlong)
29078         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
29079         ;;
29080 esac
29081
29082 # substitute into misc/Makefile to suppress
29083 # (un)install.data from the
29084 # (un)install rules.
29085 if test "x$cf_with_db_install" = "xno"; then
29086         MISC_INSTALL_DATA=
29087         MISC_UNINSTALL_DATA=
29088 else
29089         MISC_INSTALL_DATA=install.data
29090         MISC_UNINSTALL_DATA=uninstall.data
29091 fi
29092
29093 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
29094         MAKE_DATABASE="#"
29095 else
29096         MAKE_DATABASE="$MAKE_TERMINFO"
29097 fi
29098
29099 if test -n "$PACKAGE"
29100 then
29101         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
29102         export PACKAGE
29103         echo "package: $PACKAGE"
29104 fi
29105
29106 UNALTERED_SYMS=
29107 cf_filter_syms=no
29108
29109 if test -n "$RESULTING_SYMS"
29110 then
29111         cf_filter_syms=$cf_dft_filter_syms
29112         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_default" 1>&6
29113
29114 echo "${as_me:-configure}:29114: testing will map symbols to ABI=$cf_cv_abi_default ..." 1>&5
29115
29116 fi
29117
29118 if test "x$WILDCARD_SYMS" = xno
29119 then
29120         cf_filter_syms=yes
29121 fi
29122
29123 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
29124
29125 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
29126 if test "$cf_filter_syms" = yes
29127 then
29128         RESULTING_SYMS=resulting.map
29129 fi
29130
29131 if test "x$cross_compiling" = xyes ; then
29132         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
29133         CHECK_BUILD="#"
29134 else
29135         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
29136         CHECK_BUILD=
29137 fi
29138
29139 # This is used for the *-config script and *.pc data files.
29140
29141 echo "$as_me:29141: checking for linker search path" >&5
29142 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
29143 if test "${cf_cv_ld_searchpath+set}" = set; then
29144   echo $ECHO_N "(cached) $ECHO_C" >&6
29145 else
29146
29147 if test "$cross_compiling" != yes ; then
29148
29149 # GNU binutils' ld does not involve permissions which may stop ldconfig.
29150 cf_pathlist=`${LD:-ld} --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
29151
29152 # The -NX options tell newer versions of Linux ldconfig to not attempt to
29153 # update the cache, which makes it run faster.
29154 test -z "$cf_pathlist" && \
29155         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
29156
29157 test -z "$cf_pathlist" &&
29158         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
29159
29160 # This works with OpenBSD 6.5, which lists only filenames
29161 test -z "$cf_pathlist" &&
29162         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
29163
29164 if test -z "$cf_pathlist"
29165 then
29166         # dyld default path with MacOS
29167         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
29168         then
29169                 # do this to bypass check
29170                 cf_cv_ld_searchpath='$HOME/lib'
29171                 cf_pathlist="/usr/local/lib /lib /usr/lib"
29172         fi
29173 fi
29174
29175 if test -z "$cf_pathlist"
29176 then
29177         # Solaris is "SunOS"
29178         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
29179         then
29180                 case x`(isainfo -b)` in
29181                 (x64)
29182                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
29183                         ;;
29184                 (x32)
29185                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
29186                         cf_pathlist="$cf_pathlist /lib /usr/lib"
29187                         ;;
29188                 (*)
29189                         { echo "$as_me:29189: WARNING: problem with Solaris architecture" >&5
29190 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
29191                         ;;
29192                 esac
29193         fi
29194 fi
29195
29196 if test -z "$cf_pathlist"
29197 then
29198         # HP-UX
29199         if test x"`uname -s`" = xHP-UX
29200         then
29201                 case x`getconf LONG_BIT` in
29202                 (x64)
29203                         cf_pathlist="/usr/lib/hpux64"
29204                         ;;
29205                 (x*)
29206                         cf_pathlist="/usr/lib/hpux32"
29207                         ;;
29208                 esac
29209         fi
29210 fi
29211
29212 fi
29213
29214 # If nothing else, assume it is conventional
29215 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
29216
29217 # Finally, check that this is only directories
29218 for cf_path in $0 $cf_pathlist
29219 do
29220         if test -d "$cf_path"; then
29221                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
29222                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
29223         fi
29224 done
29225
29226 # Ensure that it is nonempty
29227 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
29228
29229 fi
29230 echo "$as_me:29230: result: $cf_cv_ld_searchpath" >&5
29231 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
29232
29233 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
29234
29235 cat >>confdefs.h <<\EOF
29236 #define HAVE_CURSES_DATA_BOOLNAMES 1
29237 EOF
29238
29239 ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/termcap.h include/unctrl.h man/man_db.renames $SUB_MAKEFILES Makefile"
29240 ac_config_commands="$ac_config_commands default"
29241 cat >confcache <<\_ACEOF
29242 # This file is a shell script that caches the results of configure
29243 # tests run on this system so they can be shared between configure
29244 # scripts and configure runs, see configure's option --config-cache.
29245 # It is not useful on other systems.  If it contains results you don't
29246 # want to keep, you may remove or edit it.
29247 #
29248 # config.status only pays attention to the cache file if you give it
29249 # the --recheck option to rerun configure.
29250 #
29251 # `ac_cv_env_foo' variables (set or unset) will be overriden when
29252 # loading this file, other *unset* `ac_cv_foo' will be assigned the
29253 # following values.
29254
29255 _ACEOF
29256
29257 # The following way of writing the cache mishandles newlines in values,
29258 # but we know of no workaround that is simple, portable, and efficient.
29259 # So, don't put newlines in cache variables' values.
29260 # Ultrix sh set writes to stderr and can't be redirected directly,
29261 # and sets the high bit in the cache file unless we assign to the vars.
29262 {
29263   (set) 2>&1 |
29264     case `(ac_space=' '; set | grep ac_space) 2>&1` in
29265     *ac_space=\ *)
29266       # `set' does not quote correctly, so add quotes (double-quote
29267       # substitution turns \\\\ into \\, and sed turns \\ into \).
29268       sed -n \
29269         "s/'/'\\\\''/g;
29270           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29271       ;;
29272     *)
29273       # `set' quotes correctly as required by POSIX, so do not add quotes.
29274       sed -n \
29275         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
29276       ;;
29277     esac;
29278 } |
29279   sed '
29280      t clear
29281      : clear
29282      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29283      t end
29284      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29285      : end' >>confcache
29286 if cmp -s $cache_file confcache; then :; else
29287   if test -w $cache_file; then
29288     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
29289     cat confcache >$cache_file
29290   else
29291     echo "not updating unwritable cache $cache_file"
29292   fi
29293 fi
29294 rm -f confcache
29295
29296 test "x$prefix" = xNONE && prefix=$ac_default_prefix
29297 # Let make expand exec_prefix.
29298 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29299
29300 # VPATH may cause trouble with some makes, so we remove $(srcdir),
29301 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
29302 # trailing colons and then remove the whole line if VPATH becomes empty
29303 # (actually we leave an empty line to preserve line numbers).
29304 if test "x$srcdir" = x.; then
29305   ac_vpsub='/^[         ]*VPATH[        ]*=/{
29306 s/:*\$(srcdir):*/:/;
29307 s/:*\${srcdir}:*/:/;
29308 s/:*@srcdir@:*/:/;
29309 s/^\([^=]*=[    ]*\):*/\1/;
29310 s/:*$//;
29311 s/^[^=]*=[      ]*$//;
29312 }'
29313 fi
29314
29315 DEFS=-DHAVE_CONFIG_H
29316
29317 : "${CONFIG_STATUS=./config.status}"
29318 ac_clean_files_save=$ac_clean_files
29319 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29320 { echo "$as_me:29320: creating $CONFIG_STATUS" >&5
29321 echo "$as_me: creating $CONFIG_STATUS" >&6;}
29322 cat >"$CONFIG_STATUS" <<_ACEOF
29323 #! $SHELL
29324 # Generated automatically by configure.
29325 # Run this file to recreate the current configuration.
29326 # Compiler output produced by configure, useful for debugging
29327 # configure, is in config.log if it exists.
29328
29329 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
29330
29331 debug=false
29332 SHELL=\${CONFIG_SHELL-$SHELL}
29333 ac_cs_invocation="\$0 \$@"
29334
29335 CLICOLOR_FORCE= GREP_OPTIONS=
29336 unset CLICOLOR_FORCE GREP_OPTIONS
29337 _ACEOF
29338
29339 cat >>"$CONFIG_STATUS" <<\_ACEOF
29340 # Be Bourne compatible
29341 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29342   emulate sh
29343   NULLCMD=:
29344 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29345   set -o posix
29346 fi
29347
29348 # Name of the executable.
29349 as_me=`echo "$0" |sed 's,.*[\\/],,'`
29350
29351 if expr a : '\(a\)' >/dev/null 2>&1; then
29352   as_expr="expr"
29353 else
29354   as_expr="false"
29355 fi
29356
29357 rm -f conf$$ conf$$.exe conf$$.file
29358 echo >conf$$.file
29359 if ln -s conf$$.file conf$$ 2>/dev/null; then
29360   # We could just check for DJGPP; but this test a) works b) is more generic
29361   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
29362   if test -f conf$$.exe; then
29363     # Don't use ln at all; we don't have any links
29364     as_ln_s='cp -p'
29365   else
29366     as_ln_s='ln -s'
29367   fi
29368 elif ln conf$$.file conf$$ 2>/dev/null; then
29369   as_ln_s='ln'
29370 else
29371   as_ln_s='cp -p'
29372 fi
29373 rm -f conf$$ conf$$.exe conf$$.file
29374
29375 as_executable_p="test -f"
29376
29377 # Support unset when possible.
29378 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
29379   as_unset="unset"
29380 else
29381   as_unset="false"
29382 fi
29383
29384 # NLS nuisances.
29385 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
29386 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
29387 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
29388 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
29389 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
29390 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
29391 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
29392 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
29393
29394 # IFS
29395 # We need space, tab and new line, in precisely that order.
29396 as_nl='
29397 '
29398 IFS="   $as_nl"
29399
29400 # CDPATH.
29401 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
29402
29403 exec 6>&1
29404
29405 _ACEOF
29406
29407 # Files that config.status was made for.
29408 if test -n "$ac_config_files"; then
29409   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
29410 fi
29411
29412 if test -n "$ac_config_headers"; then
29413   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
29414 fi
29415
29416 if test -n "$ac_config_links"; then
29417   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
29418 fi
29419
29420 if test -n "$ac_config_commands"; then
29421   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
29422 fi
29423
29424 cat >>"$CONFIG_STATUS" <<\EOF
29425
29426 ac_cs_usage="\
29427 \`$as_me' instantiates files from templates according to the
29428 current configuration.
29429
29430 Usage: $0 [OPTIONS] [FILE]...
29431
29432   -h, --help       print this help, then exit
29433   -V, --version    print version number, then exit
29434   -d, --debug      don't remove temporary files
29435       --recheck    update $as_me by reconfiguring in the same conditions
29436   --file=FILE[:TEMPLATE]
29437                    instantiate the configuration file FILE
29438   --header=FILE[:TEMPLATE]
29439                    instantiate the configuration header FILE
29440
29441 Configuration files:
29442 $config_files
29443
29444 Configuration headers:
29445 $config_headers
29446
29447 Configuration commands:
29448 $config_commands
29449
29450 Report bugs to <dickey@invisible-island.net>."
29451 EOF
29452
29453 cat >>"$CONFIG_STATUS" <<EOF
29454 ac_cs_version="\\
29455 config.status
29456 configured by $0, generated by GNU Autoconf 2.52.20230114,
29457   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
29458
29459 Copyright 2003-2022,2023        Thomas E. Dickey
29460 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
29461 Free Software Foundation, Inc.
29462 This config.status script is free software; the Free Software Foundation
29463 gives unlimited permission to copy, distribute and modify it."
29464 srcdir="$srcdir"
29465 INSTALL="$INSTALL"
29466 EOF
29467
29468 cat >>"$CONFIG_STATUS" <<\EOF
29469 # If no file are specified by the user, then we need to provide default
29470 # value.  By we need to know if files were specified by the user.
29471 ac_need_defaults=:
29472 while test $# != 0
29473 do
29474   case $1 in
29475   --*=*)
29476     ac_option=`expr "x$1" : 'x\([^=]*\)='`
29477     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
29478     shift
29479     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
29480     shift
29481     ;;
29482   -*);;
29483   *) # This is not an option, so the user has probably given explicit
29484      # arguments.
29485      ac_need_defaults=false;;
29486   esac
29487
29488   case $1 in
29489   # Handling of the options.
29490 EOF
29491 cat >>"$CONFIG_STATUS" <<EOF
29492   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29493     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
29494     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
29495 EOF
29496 cat >>"$CONFIG_STATUS" <<\EOF
29497   --version | --vers* | -V )
29498     echo "$ac_cs_version"; exit 0 ;;
29499   --he | --h)
29500     # Conflict between --help and --header
29501     { { echo "$as_me:29501: error: ambiguous option: $1
29502 Try \`$0 --help' for more information." >&5
29503 echo "$as_me: error: ambiguous option: $1
29504 Try \`$0 --help' for more information." >&2;}
29505    { (exit 1); exit 1; }; };;
29506   --help | --hel | -h )
29507     echo "$ac_cs_usage"; exit 0 ;;
29508   --debug | --d* | -d )
29509     debug=: ;;
29510   --file | --fil | --fi | --f )
29511     shift
29512     CONFIG_FILES="$CONFIG_FILES $1"
29513     ac_need_defaults=false;;
29514   --header | --heade | --head | --hea )
29515     shift
29516     CONFIG_HEADERS="$CONFIG_HEADERS $1"
29517     ac_need_defaults=false;;
29518
29519   # This is an error.
29520   -*) { { echo "$as_me:29520: error: unrecognized option: $1
29521 Try \`$0 --help' for more information." >&5
29522 echo "$as_me: error: unrecognized option: $1
29523 Try \`$0 --help' for more information." >&2;}
29524    { (exit 1); exit 1; }; } ;;
29525
29526   *) ac_config_targets="$ac_config_targets $1" ;;
29527
29528   esac
29529   shift
29530 done
29531
29532 exec 5>>config.log
29533 cat >&5 << _ACEOF
29534
29535 ## ----------------------- ##
29536 ## Running config.status.  ##
29537 ## ----------------------- ##
29538
29539 This file was extended by $as_me 2.52.20230114, executed with
29540   CONFIG_FILES    = $CONFIG_FILES
29541   CONFIG_HEADERS  = $CONFIG_HEADERS
29542   CONFIG_LINKS    = $CONFIG_LINKS
29543   CONFIG_COMMANDS = $CONFIG_COMMANDS
29544   > "$ac_cs_invocation"
29545 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29546
29547 _ACEOF
29548 EOF
29549
29550 cat >>"$CONFIG_STATUS" <<EOF
29551 #
29552 # INIT-COMMANDS section.
29553 #
29554
29555 ### Special initialization commands, used to pass information from the
29556 ### configuration-run into config.status
29557
29558 ALTERNATE_SYMS="$ALTERNATE_SYMS"
29559 AWK="$AWK"
29560 CXX_NAME="$CXX_NAME"
29561 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
29562 DFT_LWR_MODEL="$DFT_LWR_MODEL"
29563 ECHO_LD="$ECHO_LD"
29564 EXTRA_SUFFIX="$EXTRA_SUFFIX"
29565 FORM_NAME="$FORM_NAME"
29566 LDCONFIG="$LDCONFIG"
29567 LIBTOOL_VERSION="$LIBTOOL_VERSION"
29568 LIB_NAME="$LIB_NAME"
29569 LIB_PREFIX="$LIB_PREFIX"
29570 LIB_SUBSETS="$LIB_SUBSETS"
29571 LIB_SUFFIX="$LIB_SUFFIX"
29572 LIB_TRACING="$LIB_TRACING"
29573 LN_S="$LN_S"
29574 MAKE_TERMINFO="$MAKE_TERMINFO"
29575 MANPAGE_RENAMES="$MANPAGE_RENAMES"
29576 MENU_NAME="$MENU_NAME"
29577 NCURSES_MAJOR="$NCURSES_MAJOR"
29578 NCURSES_MINOR="$NCURSES_MINOR"
29579 NCURSES_OSPEED="$NCURSES_OSPEED"
29580 NCURSES_PATCH="$NCURSES_PATCH"
29581 PANEL_NAME="$PANEL_NAME"
29582 SRC_SUBDIRS="$SRC_SUBDIRS"
29583 TERMINFO="$TERMINFO"
29584 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
29585 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
29586 TICS_NAME="$TICS_NAME"
29587 TICS_SUFFIX="$TICS_SUFFIX"
29588 TIC_PATH="$TIC_PATH"
29589 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
29590 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
29591 TINFO_NAME="$TINFO_NAME"
29592 TINFO_SUFFIX="$TINFO_SUFFIX"
29593 UNALTERED_SYMS="$UNALTERED_SYMS"
29594 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
29595 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
29596 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
29597 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
29598 WILDCARD_SYMS="$WILDCARD_SYMS"
29599 WITH_CURSES_H="$with_curses_h"
29600 WITH_ECHO="${enable_echo:=yes}"
29601 WITH_OVERWRITE="$with_overwrite"
29602 cf_LIST_MODELS="$cf_list_models"
29603 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
29604 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
29605 cf_cv_abi_default="$cf_cv_abi_default"
29606 cf_cv_abi_version="$cf_cv_abi_version"
29607 cf_cv_do_relink="$cf_cv_do_relink"
29608 cf_cv_do_reranlib="$cf_cv_do_reranlib"
29609 cf_cv_do_symlinks="$cf_cv_do_symlinks"
29610 cf_cv_enable_lp64="$cf_cv_enable_lp64"
29611 cf_cv_enable_opaque="$cf_cv_enable_opaque"
29612 cf_cv_make_PHONY="$cf_cv_make_PHONY"
29613 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
29614 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
29615 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
29616 cf_cv_rel_version="$cf_cv_rel_version"
29617 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
29618 cf_cv_shared_soname='$cf_cv_shared_soname'
29619 cf_cv_shlib_version="$cf_cv_shlib_version"
29620 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
29621 cf_cv_system_name="$cf_cv_system_name"
29622 cf_cv_term_driver="$with_term_driver"
29623 cf_with_ada="$cf_with_ada"
29624 cf_with_cxx_binding="$cf_with_cxx_binding"
29625 cf_with_db_install="$cf_with_db_install"
29626 cf_with_manpages="$cf_with_manpages"
29627 cf_with_tests="$cf_with_tests"
29628 host="$host"
29629 target="$target"
29630 verbose="$verbose"
29631 with_shared_cxx="$with_shared_cxx"
29632
29633 EOF
29634
29635 cat >>"$CONFIG_STATUS" <<\EOF
29636 for ac_config_target in $ac_config_targets
29637 do
29638   case "$ac_config_target" in
29639   # Handling of arguments.
29640   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
29641   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
29642   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
29643   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
29644   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
29645   "man/man_db.renames" ) CONFIG_FILES="$CONFIG_FILES man/man_db.renames" ;;
29646   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
29647   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29648   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29649   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
29650   *) { { echo "$as_me:29650: error: invalid argument: $ac_config_target" >&5
29651 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
29652    { (exit 1); exit 1; }; };;
29653   esac
29654 done
29655
29656 # If the user did not use the arguments to specify the items to instantiate,
29657 # then the envvar interface is used.  Set only those that are not.
29658 # We use the long form for the default assignment because of an extremely
29659 # bizarre bug on SunOS 4.1.3.
29660 if "$ac_need_defaults"; then
29661   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29662   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29663   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29664 fi
29665
29666 # Create a temporary directory, and hook for its removal unless debugging.
29667 $debug ||
29668 {
29669   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
29670   trap '{ (exit 1); exit 1; }' 1 2 13 15
29671 }
29672
29673 # Create a (secure) tmp directory for tmp files.
29674 : "${TMPDIR=/tmp}"
29675 {
29676   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
29677   test -n "$tmp" && test -d "$tmp"
29678 }  ||
29679 {
29680   tmp=$TMPDIR/cs$$-$RANDOM
29681   (umask 077 && mkdir "$tmp")
29682 } ||
29683 {
29684    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
29685    { (exit 1); exit 1; }
29686 }
29687
29688 EOF
29689
29690 cat >>"$CONFIG_STATUS" <<EOF
29691
29692 #
29693 # CONFIG_FILES section.
29694 #
29695
29696 # No need to generate the scripts if there are no CONFIG_FILES.
29697 # This happens for instance when ./config.status config.h
29698 if test -n "\$CONFIG_FILES"; then
29699   # Protect against being on the right side of a sed subst in config.status.
29700   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
29701    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
29702 s,@SHELL@,$SHELL,;t t
29703 s,@exec_prefix@,$exec_prefix,;t t
29704 s,@prefix@,$prefix,;t t
29705 s,@program_transform_name@,$program_transform_name,;t t
29706 s,@bindir@,$bindir,;t t
29707 s,@sbindir@,$sbindir,;t t
29708 s,@libexecdir@,$libexecdir,;t t
29709 s,@datarootdir@,$datarootdir,;t t
29710 s,@datadir@,$datadir,;t t
29711 s,@sysconfdir@,$sysconfdir,;t t
29712 s,@sharedstatedir@,$sharedstatedir,;t t
29713 s,@localstatedir@,$localstatedir,;t t
29714 s,@runstatedir@,$runstatedir,;t t
29715 s,@libdir@,$libdir,;t t
29716 s,@includedir@,$includedir,;t t
29717 s,@oldincludedir@,$oldincludedir,;t t
29718 s,@infodir@,$infodir,;t t
29719 s,@mandir@,$mandir,;t t
29720 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
29721 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
29722 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
29723 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
29724 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
29725 s,@build_alias@,$build_alias,;t t
29726 s,@host_alias@,$host_alias,;t t
29727 s,@target_alias@,$target_alias,;t t
29728 s,@ECHO_C@,$ECHO_C,;t t
29729 s,@ECHO_N@,$ECHO_N,;t t
29730 s,@ECHO_T@,$ECHO_T,;t t
29731 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
29732 s,@DEFS@,$DEFS,;t t
29733 s,@LIBS@,$LIBS,;t t
29734 s,@top_builddir@,$top_builddir,;t t
29735 s,@GREP@,$GREP,;t t
29736 s,@EGREP@,$EGREP,;t t
29737 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
29738 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
29739 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
29740 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
29741 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
29742 s,@cf_cv_abi_default@,$cf_cv_abi_default,;t t
29743 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
29744 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
29745 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
29746 s,@VERSION@,$VERSION,;t t
29747 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
29748 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
29749 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
29750 s,@PACKAGE@,$PACKAGE,;t t
29751 s,@build@,$build,;t t
29752 s,@build_cpu@,$build_cpu,;t t
29753 s,@build_vendor@,$build_vendor,;t t
29754 s,@build_os@,$build_os,;t t
29755 s,@host@,$host,;t t
29756 s,@host_cpu@,$host_cpu,;t t
29757 s,@host_vendor@,$host_vendor,;t t
29758 s,@host_os@,$host_os,;t t
29759 s,@target@,$target,;t t
29760 s,@target_cpu@,$target_cpu,;t t
29761 s,@target_vendor@,$target_vendor,;t t
29762 s,@target_os@,$target_os,;t t
29763 s,@FGREP@,$FGREP,;t t
29764 s,@CC@,$CC,;t t
29765 s,@CFLAGS@,$CFLAGS,;t t
29766 s,@LDFLAGS@,$LDFLAGS,;t t
29767 s,@CPPFLAGS@,$CPPFLAGS,;t t
29768 s,@ac_ct_CC@,$ac_ct_CC,;t t
29769 s,@EXEEXT@,$EXEEXT,;t t
29770 s,@OBJEXT@,$OBJEXT,;t t
29771 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
29772 s,@CPP@,$CPP,;t t
29773 s,@LDCONFIG@,$LDCONFIG,;t t
29774 s,@CXX@,$CXX,;t t
29775 s,@CXXFLAGS@,$CXXFLAGS,;t t
29776 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
29777 s,@AWK@,$AWK,;t t
29778 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
29779 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
29780 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
29781 s,@LINT@,$LINT,;t t
29782 s,@LINT_OPTS@,$LINT_OPTS,;t t
29783 s,@LINT_LIBS@,$LINT_LIBS,;t t
29784 s,@LN_S@,$LN_S,;t t
29785 s,@cf_config_suffix@,$cf_config_suffix,;t t
29786 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
29787 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
29788 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
29789 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
29790 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
29791 s,@SET_MAKE@,$SET_MAKE,;t t
29792 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
29793 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
29794 s,@CTAGS@,$CTAGS,;t t
29795 s,@ETAGS@,$ETAGS,;t t
29796 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
29797 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
29798 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
29799 s,@RANLIB@,$RANLIB,;t t
29800 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
29801 s,@LD@,$LD,;t t
29802 s,@ac_ct_LD@,$ac_ct_LD,;t t
29803 s,@AR@,$AR,;t t
29804 s,@ac_ct_AR@,$ac_ct_AR,;t t
29805 s,@NM@,$NM,;t t
29806 s,@ac_ct_NM@,$ac_ct_NM,;t t
29807 s,@ARFLAGS@,$ARFLAGS,;t t
29808 s,@DESTDIR@,$DESTDIR,;t t
29809 s,@BUILD_CC@,$BUILD_CC,;t t
29810 s,@BUILD_CPP@,$BUILD_CPP,;t t
29811 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
29812 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
29813 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
29814 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
29815 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
29816 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
29817 s,@cf_list_models@,$cf_list_models,;t t
29818 s,@ABI_VERSION@,$ABI_VERSION,;t t
29819 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
29820 s,@LIBTOOL@,$LIBTOOL,;t t
29821 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
29822 s,@LT_UNDEF@,$LT_UNDEF,;t t
29823 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
29824 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
29825 s,@LIB_CREATE@,$LIB_CREATE,;t t
29826 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
29827 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
29828 s,@LIB_PREP@,$LIB_PREP,;t t
29829 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
29830 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
29831 s,@LIB_LINK@,$LIB_LINK,;t t
29832 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
29833 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
29834 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
29835 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
29836 s,@TICS_NAME@,$TICS_NAME,;t t
29837 s,@TINFO_NAME@,$TINFO_NAME,;t t
29838 s,@LIB_NAME@,$LIB_NAME,;t t
29839 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
29840 s,@CC_G_OPT@,$CC_G_OPT,;t t
29841 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
29842 s,@LD_MODEL@,$LD_MODEL,;t t
29843 s,@shlibdir@,$shlibdir,;t t
29844 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
29845 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
29846 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
29847 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
29848 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
29849 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
29850 s,@LINK_PROGS@,$LINK_PROGS,;t t
29851 s,@LINK_TESTS@,$LINK_TESTS,;t t
29852 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
29853 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
29854 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
29855 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
29856 s,@RPATH_LIST@,$RPATH_LIST,;t t
29857 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
29858 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
29859 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
29860 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
29861 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
29862 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
29863 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
29864 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
29865 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
29866 s,@TIC@,$TIC,;t t
29867 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
29868 s,@INFOCMP@,$INFOCMP,;t t
29869 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
29870 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
29871 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
29872 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
29873 s,@XTERM_KBS@,$XTERM_KBS,;t t
29874 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
29875 s,@TERMINFO@,$TERMINFO,;t t
29876 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
29877 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
29878 s,@TERMPATH@,$TERMPATH,;t t
29879 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
29880 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
29881 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
29882 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
29883 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
29884 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
29885 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
29886 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
29887 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
29888 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
29889 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
29890 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
29891 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
29892 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
29893 s,@RGB_PATH@,$RGB_PATH,;t t
29894 s,@no_x11_rgb@,$no_x11_rgb,;t t
29895 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
29896 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
29897 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
29898 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
29899 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
29900 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
29901 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
29902 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
29903 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
29904 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
29905 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
29906 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
29907 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
29908 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
29909 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
29910 s,@PTHREAD@,$PTHREAD,;t t
29911 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
29912 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
29913 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
29914 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
29915 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
29916 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
29917 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
29918 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
29919 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
29920 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
29921 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
29922 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
29923 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
29924 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
29925 s,@ECHO_LT@,$ECHO_LT,;t t
29926 s,@ECHO_LD@,$ECHO_LD,;t t
29927 s,@RULE_CC@,$RULE_CC,;t t
29928 s,@SHOW_CC@,$SHOW_CC,;t t
29929 s,@ECHO_CC@,$ECHO_CC,;t t
29930 s,@ECHO_LINK@,$ECHO_LINK,;t t
29931 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
29932 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
29933 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
29934 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
29935 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
29936 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
29937 s,@ADAFLAGS@,$ADAFLAGS,;t t
29938 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
29939 s,@ADA_TRACE@,$ADA_TRACE,;t t
29940 s,@MATH_LIB@,$MATH_LIB,;t t
29941 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
29942 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
29943 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
29944 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
29945 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
29946 s,@TEST_LIBS@,$TEST_LIBS,;t t
29947 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
29948 s,@CXXCPP@,$CXXCPP,;t t
29949 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
29950 s,@CXX_AR@,$CXX_AR,;t t
29951 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
29952 s,@CXXLIBS@,$CXXLIBS,;t t
29953 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
29954 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
29955 s,@M4_exists@,$M4_exists,;t t
29956 s,@cf_ada_make@,$cf_ada_make,;t t
29957 s,@cf_ada_config@,$cf_ada_config,;t t
29958 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
29959 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
29960 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
29961 s,@cf_compile_generics@,$cf_compile_generics,;t t
29962 s,@cf_generic_objects@,$cf_generic_objects,;t t
29963 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
29964 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
29965 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
29966 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
29967 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
29968 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
29969 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
29970 s,@cf_ada_package@,$cf_ada_package,;t t
29971 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
29972 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
29973 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
29974 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
29975 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
29976 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
29977 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
29978 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
29979 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
29980 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
29981 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
29982 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
29983 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
29984 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
29985 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
29986 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
29987 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
29988 s,@TICS_LIBS@,$TICS_LIBS,;t t
29989 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
29990 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
29991 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
29992 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
29993 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
29994 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
29995 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
29996 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
29997 s,@includesubdir@,$includesubdir,;t t
29998 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
29999 s,@TICS_LIST@,$TICS_LIST,;t t
30000 s,@TINFO_LIST@,$TINFO_LIST,;t t
30001 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
30002 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
30003 s,@FORM_NAME@,$FORM_NAME,;t t
30004 s,@MENU_NAME@,$MENU_NAME,;t t
30005 s,@PANEL_NAME@,$PANEL_NAME,;t t
30006 s,@CXX_NAME@,$CXX_NAME,;t t
30007 s,@TEST_ARGS@,$TEST_ARGS,;t t
30008 s,@TEST_DEPS@,$TEST_DEPS,;t t
30009 s,@TEST_ARG2@,$TEST_ARG2,;t t
30010 s,@TEST_DEP2@,$TEST_DEP2,;t t
30011 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
30012 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
30013 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
30014 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
30015 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
30016 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
30017 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
30018 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
30019 s,@cross_compiling@,$cross_compiling,;t t
30020 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
30021 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
30022 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
30023 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
30024 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
30025 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
30026 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
30027 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
30028 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
30029 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
30030 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
30031 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
30032 CEOF
30033
30034 EOF
30035
30036   cat >>"$CONFIG_STATUS" <<\EOF
30037   # Split the substitutions into bite-sized pieces for seds with
30038   # small command number limits, like on Digital OSF/1 and HP-UX.
30039   ac_max_sed_lines=48
30040   ac_sed_frag=1 # Number of current file.
30041   ac_beg=1 # First line for current file.
30042   ac_end=$ac_max_sed_lines # Line after last line for current file.
30043   ac_more_lines=:
30044   ac_sed_cmds=
30045   while "$ac_more_lines"; do
30046     if test "$ac_beg" -gt 1; then
30047       sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30048     else
30049       sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30050     fi
30051     if test ! -s "$tmp"/subs.frag; then
30052       ac_more_lines=false
30053     else
30054       # The purpose of the label and of the branching condition is to
30055       # speed up the sed processing (if there are no `@' at all, there
30056       # is no need to browse any of the substitutions).
30057       # These are the two extra sed commands mentioned above.
30058       (echo ':t
30059   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
30060       # It is possible to make a multiline substitution using escaped newlines.
30061       # Ensure that we do not split the substitution between script fragments.
30062       ac_BEG=$ac_end
30063       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
30064       sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
30065       if test -s "$tmp"/subs.next; then
30066         grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit
30067         if test ! -s "$tmp"/subs.edit; then
30068           grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
30069           if test ! -s "$tmp"/subs.edit; then
30070             if test "$ac_beg" -gt 1; then
30071               ac_end=`expr "$ac_end" - 1`
30072               continue
30073             fi
30074           fi
30075         fi
30076       fi
30077
30078       if test -z "$ac_sed_cmds"; then
30079         ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30080       else
30081         ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30082       fi
30083       ac_sed_frag=`expr "$ac_sed_frag" + 1`
30084       ac_beg=$ac_end
30085       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
30086     fi
30087   done
30088   if test -z "$ac_sed_cmds"; then
30089     ac_sed_cmds="cat"
30090   fi
30091 fi # test -n "$CONFIG_FILES"
30092
30093 EOF
30094 cat >>"$CONFIG_STATUS" <<\EOF
30095 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
30096   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30097   case "$ac_file" in
30098   - | *:- | *:-:* ) # input from stdin
30099         cat >"$tmp"/stdin
30100         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30101         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30102   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30103         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30104   * )   ac_file_in=$ac_file.in ;;
30105   esac
30106
30107   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
30108   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30109          X"$ac_file" : 'X\(//\)[^/]' \| \
30110          X"$ac_file" : 'X\(//\)$' \| \
30111          X"$ac_file" : 'X\(/\)' \| \
30112          .     : '\(.\)' 2>/dev/null ||
30113 echo X"$ac_file" |
30114     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30115           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30116           /^X\(\/\/\)$/{ s//\1/; q; }
30117           /^X\(\/\).*/{ s//\1/; q; }
30118           s/.*/./; q'`
30119   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30120     { case "$ac_dir" in
30121   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30122   *)                      as_incr_dir=.;;
30123 esac
30124 as_dummy="$ac_dir"
30125 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30126   case $as_mkdir_dir in
30127     # Skip DOS drivespec
30128     ?:) as_incr_dir=$as_mkdir_dir ;;
30129     *)
30130       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30131       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30132     ;;
30133   esac
30134 done; }
30135
30136     ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
30137     # A "../" for each directory in $ac_dir_suffix.
30138     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
30139   else
30140     ac_dir_suffix= ac_dots=
30141   fi
30142
30143   case "$srcdir" in
30144   .)  ac_srcdir=.
30145       if test -z "$ac_dots"; then
30146          ac_top_srcdir=.
30147       else
30148          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
30149       fi ;;
30150   [\\/]* | ?:[\\/]* )
30151       ac_srcdir="$srcdir$ac_dir_suffix";
30152       ac_top_srcdir="$srcdir" ;;
30153   *) # Relative path.
30154     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
30155     ac_top_srcdir="$ac_dots$srcdir" ;;
30156   esac
30157
30158   case $INSTALL in
30159   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30160   *) ac_INSTALL=$ac_dots$INSTALL ;;
30161   esac
30162
30163   if test x"$ac_file" != x-; then
30164     { echo "$as_me:30164: creating $ac_file" >&5
30165 echo "$as_me: creating $ac_file" >&6;}
30166     rm -f "$ac_file"
30167   fi
30168   # Let's still pretend it is `configure' which instantiates (i.e., don't
30169   # use $as_me), people would be surprised to read:
30170   #    /* config.h.  Generated automatically by config.status.  */
30171   configure_input="Generated automatically from `echo $ac_file_in |
30172                                                  sed 's,.*/,,'` by configure."
30173
30174   # First look for the input files in the build tree, otherwise in the
30175   # src tree.
30176   ac_file_inputs=`IFS=:
30177     for f in $ac_file_in; do
30178       case $f in
30179       -) echo "$tmp"/stdin ;;
30180       [\\/$]*)
30181          # Absolute (can't be DOS-style, as IFS=:)
30182          test -f "$f" || { { echo "$as_me:30182: error: cannot find input file: $f" >&5
30183 echo "$as_me: error: cannot find input file: $f" >&2;}
30184    { (exit 1); exit 1; }; }
30185          echo "$f";;
30186       *) # Relative
30187          if test -f "$f"; then
30188            # Build tree
30189            echo "$f"
30190          elif test -f "$srcdir/$f"; then
30191            # Source tree
30192            echo "$srcdir/$f"
30193          else
30194            # /dev/null tree
30195            { { echo "$as_me:30195: error: cannot find input file: $f" >&5
30196 echo "$as_me: error: cannot find input file: $f" >&2;}
30197    { (exit 1); exit 1; }; }
30198          fi;;
30199       esac
30200     done` || { (exit 1); exit 1; }
30201 EOF
30202 cat >>"$CONFIG_STATUS" <<\EOF
30203   ac_warn_datarootdir=no
30204   if test x"$ac_file" != x-; then
30205     for ac_item in $ac_file_inputs
30206     do
30207       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
30208       if test -n "$ac_seen"; then
30209         ac_used=`grep '@datarootdir@' "$ac_item"`
30210         if test -z "$ac_used"; then
30211           { echo "$as_me:30211: WARNING: datarootdir was used implicitly but not set:
30212 $ac_seen" >&5
30213 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
30214 $ac_seen" >&2;}
30215           ac_warn_datarootdir=yes
30216         fi
30217       fi
30218       ac_seen=`grep '${datarootdir}' "$ac_item"`
30219       if test -n "$ac_seen"; then
30220         { echo "$as_me:30220: WARNING: datarootdir was used explicitly but not set:
30221 $ac_seen" >&5
30222 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
30223 $ac_seen" >&2;}
30224         ac_warn_datarootdir=yes
30225       fi
30226     done
30227   fi
30228
30229 if test "x$ac_warn_datarootdir" = xyes; then
30230   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
30231 fi
30232
30233 EOF
30234 cat >>"$CONFIG_STATUS" <<EOF
30235   sed "$ac_vpsub
30236 $extrasub
30237 EOF
30238 cat >>"$CONFIG_STATUS" <<\EOF
30239 :t
30240 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30241 s,@configure_input@,$configure_input,;t t
30242 s,@srcdir@,$ac_srcdir,;t t
30243 s,@top_srcdir@,$ac_top_srcdir,;t t
30244 s,@INSTALL@,$ac_INSTALL,;t t
30245 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
30246   rm -f "$tmp"/stdin
30247 EOF
30248 : "${FGREP:=grep -F}"
30249 : "${EGREP:=grep -E}"
30250 cat >>"$CONFIG_STATUS" <<EOF
30251   : "\${FGREP:=$FGREP}"
30252   : "\${EGREP:=$EGREP}"
30253 EOF
30254 cat >>"$CONFIG_STATUS" <<\EOF
30255   if test x"$ac_file" != x-; then
30256     cp "$tmp/out" "$ac_file"
30257
30258     for ac_name in prefix exec_prefix datarootdir
30259     do
30260         ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
30261         if test -n "$ac_seen"; then
30262             ac_init=`$EGREP '[  ]*'$ac_name'[   ]*=' "$ac_file"`
30263             if test -z "$ac_init"; then
30264               ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
30265               { echo "$as_me:30265: WARNING: Variable $ac_name is used but was not set:
30266 $ac_seen" >&5
30267 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
30268 $ac_seen" >&2;}
30269             fi
30270         fi
30271     done
30272     $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
30273     $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
30274     if test -s "$tmp"/out; then
30275       ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
30276       { echo "$as_me:30276: WARNING: Some variables may not be substituted:
30277 $ac_seen" >&5
30278 echo "$as_me: WARNING: Some variables may not be substituted:
30279 $ac_seen" >&2;}
30280     fi
30281   else
30282     cat "$tmp"/out
30283   fi
30284   rm -f "$tmp"/out
30285
30286 done
30287 EOF
30288 cat >>"$CONFIG_STATUS" <<\EOF
30289
30290 #
30291 # CONFIG_HEADER section.
30292 #
30293
30294 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
30295 # NAME is the cpp macro being defined and VALUE is the value it is being given.
30296 #
30297 # ac_d sets the value in "#define NAME VALUE" lines.
30298 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
30299 ac_dB='[        ].*$,\1#\2'
30300 ac_dC=' '
30301 ac_dD=',;t'
30302 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
30303 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30304 ac_iB='\([      ]\),\1#\2define\3'
30305 ac_iC=' '
30306 ac_iD='\4,;t'
30307 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
30308 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30309 ac_uB='$,\1#\2define\3'
30310 ac_uC=' '
30311 ac_uD=',;t'
30312
30313 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
30314   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30315   case "$ac_file" in
30316   - | *:- | *:-:* ) # input from stdin
30317         cat >"$tmp"/stdin
30318         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30319         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30320   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30321         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30322   * )   ac_file_in=$ac_file.in ;;
30323   esac
30324
30325   test x"$ac_file" != x- && { echo "$as_me:30325: creating $ac_file" >&5
30326 echo "$as_me: creating $ac_file" >&6;}
30327
30328   # First look for the input files in the build tree, otherwise in the
30329   # src tree.
30330   ac_file_inputs=`IFS=:
30331     for f in $ac_file_in; do
30332       case $f in
30333       -) echo "$tmp"/stdin ;;
30334       [\\/$]*)
30335          # Absolute (can't be DOS-style, as IFS=:)
30336          test -f "$f" || { { echo "$as_me:30336: error: cannot find input file: $f" >&5
30337 echo "$as_me: error: cannot find input file: $f" >&2;}
30338    { (exit 1); exit 1; }; }
30339          echo $f;;
30340       *) # Relative
30341          if test -f "$f"; then
30342            # Build tree
30343            echo $f
30344          elif test -f "$srcdir/$f"; then
30345            # Source tree
30346            echo "$srcdir/$f"
30347          else
30348            # /dev/null tree
30349            { { echo "$as_me:30349: error: cannot find input file: $f" >&5
30350 echo "$as_me: error: cannot find input file: $f" >&2;}
30351    { (exit 1); exit 1; }; }
30352          fi;;
30353       esac
30354     done` || { (exit 1); exit 1; }
30355   # Remove the trailing spaces.
30356   sed 's/[      ]*$//' $ac_file_inputs >"$tmp"/in
30357
30358 EOF
30359
30360 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
30361 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
30362 # be either 'cat' or 'sort'.
30363 cat confdefs.h | uniq >conftest.vals
30364
30365 # Break up conftest.vals because some shells have a limit on
30366 # the size of here documents, and old seds have small limits too.
30367
30368 rm -f conftest.tail
30369 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
30370 while grep . conftest.vals >/dev/null
30371 do
30372   # Write chunks of a limited-size here document to conftest.frag.
30373   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
30374   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
30375   echo 'CEOF' >> "$CONFIG_STATUS"
30376   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
30377   rm -f conftest.vals
30378   mv conftest.tail conftest.vals
30379 done
30380 rm -f conftest.vals
30381
30382 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
30383 # marker @DEFS@.
30384 echo '  cat >> conftest.edit <<CEOF
30385 /@DEFS@/r conftest.frag
30386 /@DEFS@/d
30387 CEOF
30388 sed -f conftest.edit "$tmp"/in > "$tmp"/out
30389 rm -f "$tmp"/in
30390 mv "$tmp"/out "$tmp"/in
30391 rm -f conftest.edit conftest.frag
30392 ' >> "$CONFIG_STATUS"
30393
30394 cat >>"$CONFIG_STATUS" <<\EOF
30395   # Let's still pretend it is `configure' which instantiates (i.e., don't
30396   # use $as_me), people would be surprised to read:
30397   #    /* config.h.  Generated automatically by config.status.  */
30398   if test x"$ac_file" = x-; then
30399     echo "/* Generated automatically by configure.  */" >"$tmp"/config.h
30400   else
30401     echo "/* $ac_file.  Generated automatically by configure.  */" >"$tmp"/config.h
30402   fi
30403   cat "$tmp"/in >>"$tmp"/config.h
30404   rm -f "$tmp"/in
30405   if test x"$ac_file" != x-; then
30406     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
30407       { echo "$as_me:30407: $ac_file is unchanged" >&5
30408 echo "$as_me: $ac_file is unchanged" >&6;}
30409     else
30410       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30411          X"$ac_file" : 'X\(//\)[^/]' \| \
30412          X"$ac_file" : 'X\(//\)$' \| \
30413          X"$ac_file" : 'X\(/\)' \| \
30414          .     : '\(.\)' 2>/dev/null ||
30415 echo X"$ac_file" |
30416     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30417           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30418           /^X\(\/\/\)$/{ s//\1/; q; }
30419           /^X\(\/\).*/{ s//\1/; q; }
30420           s/.*/./; q'`
30421       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30422         { case "$ac_dir" in
30423   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30424   *)                      as_incr_dir=.;;
30425 esac
30426 as_dummy="$ac_dir"
30427 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30428   case $as_mkdir_dir in
30429     # Skip DOS drivespec
30430     ?:) as_incr_dir=$as_mkdir_dir ;;
30431     *)
30432       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30433       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30434     ;;
30435   esac
30436 done; }
30437
30438       fi
30439       rm -f "$ac_file"
30440       mv "$tmp/config.h" "$ac_file"
30441     fi
30442   else
30443     cat "$tmp"/config.h
30444     rm -f "$tmp"/config.h
30445   fi
30446 done
30447 EOF
30448 cat >>"$CONFIG_STATUS" <<\EOF
30449 #
30450 # CONFIG_COMMANDS section.
30451 #
30452 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
30453   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
30454   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
30455
30456   case "$ac_dest" in
30457     default )
30458 if test "x$cf_with_tests" != xno ; then
30459
30460 for cf_dir in test
30461 do
30462         if test ! -d "$srcdir/$cf_dir" ; then
30463                 continue
30464         elif test -f "$srcdir/$cf_dir/programs" ; then
30465                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
30466         fi
30467 done
30468
30469 fi
30470
30471 cf_prefix=$LIB_PREFIX
30472
30473 case "$cf_cv_shlib_version" in
30474 (cygdll|msysdll|mingw|msvcdll)
30475         TINFO_NAME=$TINFO_ARG_SUFFIX
30476         TINFO_SUFFIX=.dll
30477         ;;
30478 esac
30479
30480 if test -n "$TINFO_SUFFIX" ; then
30481         case "$TINFO_SUFFIX" in
30482         (tw*)
30483                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
30484                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30485                 ;;
30486         (t*)
30487                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
30488                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
30489                 ;;
30490         (w*)
30491                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
30492                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
30493                 ;;
30494         esac
30495 fi
30496
30497 for cf_dir in $SRC_SUBDIRS
30498 do
30499         if test ! -d "$srcdir/$cf_dir" ; then
30500                 continue
30501         elif test -f "$srcdir/$cf_dir/modules" ; then
30502
30503                 SHARED_LIB=
30504                 Libs_To_Make=
30505                 cf_awk_program=
30506                 if test -n "${cf_cv_abi_default}" && test "x${cf_cv_abi_default}" != "x5"
30507                 then
30508                         cf_awk_program="$cf_awk_program\
30509 /deprecated in ABI${cf_cv_abi_default}/ { next; }\
30510 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_default}\"); }\
30511 "
30512                 fi
30513
30514                 if test "x$WILDCARD_SYMS" = xno
30515                 then
30516                         cf_awk_program="$cf_awk_program\
30517 /[      ]_\\*;/ { skip=1; next; }\
30518 "
30519                 fi
30520
30521                 if test "x$cf_awk_program" != "x"
30522                 then
30523                         cat >>$cf_dir/Makefile <<CF_EOF
30524
30525 # Generated by CF_LIB_RULES
30526 resulting.map: $UNALTERED_SYMS
30527         $AWK 'BEGIN { skip = 1; last=""; } \
30528 $cf_awk_program \
30529 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
30530  skip = 0; last = \$\$0; } \
30531 END { print last; }' < "$UNALTERED_SYMS" >\$@
30532
30533 distclean::
30534         rm -f resulting.map
30535 CF_EOF
30536                 fi
30537
30538                 for cf_item in $cf_LIST_MODELS
30539                 do
30540
30541         case X$cf_item in
30542         (Xlibtool)
30543                 cf_suffix='.la'
30544                 cf_depsuf=$cf_suffix
30545                 ;;
30546         (Xdebug)
30547                 case "$cf_cv_system_name" in
30548                 (*-msvc*)
30549                         cf_suffix='_g.lib'
30550                         ;;
30551                 (*)
30552                         cf_suffix='_g.a'
30553                         ;;
30554                 esac
30555                 cf_depsuf=$cf_suffix
30556                 ;;
30557         (Xprofile)
30558                 case "$cf_cv_system_name" in
30559                 (*-msvc*)
30560                         cf_suffix='_p.lib'
30561                         ;;
30562                 (*)
30563                         cf_suffix='_p.a'
30564                         ;;
30565                 esac
30566                 cf_depsuf=$cf_suffix
30567                 ;;
30568         (Xshared)
30569                 case "$cf_cv_system_name" in
30570                 (aix[5-7]*)
30571                         cf_suffix='.so'
30572                         cf_depsuf=$cf_suffix
30573                         ;;
30574                 (*-msvc*)
30575                         cf_suffix='.dll'
30576                         cf_depsuf='.dll.lib'
30577                         ;;
30578                 (cygwin*|msys*|mingw*)
30579                         cf_suffix='.dll'
30580                         cf_depsuf='.dll.a'
30581                         ;;
30582                 (darwin*)
30583                         cf_suffix='.dylib'
30584                         cf_depsuf=$cf_suffix
30585                         ;;
30586                 (hpux*)
30587                         case "$target" in
30588                         (ia64*)
30589                                 cf_suffix='.so'
30590                                 cf_depsuf=$cf_suffix
30591                                 ;;
30592                         (*)
30593                                 cf_suffix='.sl'
30594                                 cf_depsuf=$cf_suffix
30595                                 ;;
30596                         esac
30597                         ;;
30598                 (*)
30599                         cf_suffix='.so'
30600                         cf_depsuf=$cf_suffix
30601                         ;;
30602                 esac
30603                 ;;
30604         (*)
30605                 case "$target" in
30606                 (*-msvc*)
30607                         cf_suffix='.lib'
30608                         ;;
30609                 (*)
30610                         cf_suffix='.a'
30611                         ;;
30612                 esac
30613                 cf_depsuf=$cf_suffix
30614                 ;;
30615         esac
30616         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30617         then
30618                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30619                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30620         fi
30621
30622                         if test "$cf_dir" = "c++"
30623                         then
30624
30625 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30626
30627 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30628
30629                         else
30630
30631 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30632
30633 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30634
30635                         fi
30636                         test -z "$cf_libname" && cf_libname="$cf_dir"
30637                         if test "$cf_item" = shared ; then
30638                                 if test -n "${LIB_SUFFIX}"
30639                                 then
30640                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30641                                 else
30642                                         cf_shared_suffix="$cf_suffix"
30643                                 fi
30644                                 if test "$cf_cv_do_symlinks" = yes ; then
30645                                         cf_version_name=
30646
30647                                         case "$cf_cv_shlib_version" in
30648                                         (rel)
30649                                                 cf_version_name=REL_VERSION
30650                                                 ;;
30651                                         (abi)
30652                                                 cf_version_name=ABI_VERSION
30653                                                 ;;
30654                                         esac
30655
30656                                         if test -n "$cf_version_name"
30657                                         then
30658                                                 case "$cf_cv_system_name" in
30659                                                 (darwin*)
30660                                                         # "w", etc?
30661                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
30662                                                         ;;
30663                                                 (*)
30664                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
30665                                                         ;;
30666                                                 esac
30667                                         fi
30668                                         if test -n "${USE_LIB_SUFFIX}"
30669                                         then
30670                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30671                                         else
30672                                                 cf_shared_suffix="$cf_suffix"
30673                                         fi
30674                                 fi
30675                                 # cygwin needs import library, and has unique naming convention
30676                                 # use autodetected ${cf_prefix} for import lib and static lib, but
30677                                 # use 'cyg' prefix for shared lib.
30678                                 case "$cf_cv_shlib_version" in
30679                                 (cygdll)
30680                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30681                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
30682                                         ;;
30683                                 (msysdll)
30684                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30685                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
30686                                         ;;
30687                                 (mingw)
30688                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30689                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
30690                                         ;;
30691                                 (msvcdll)
30692                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30693                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
30694                                         ;;
30695                                 (*)
30696                                         cf_add_lib=
30697                                         ;;
30698                                 esac
30699                                 if test -n "$cf_add_lib"
30700                                 then
30701                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30702                                         continue
30703                                 fi
30704                         fi
30705                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
30706                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30707                 done
30708
30709                 if test "$cf_dir" = ncurses ; then
30710                         cf_subsets="$LIB_SUBSETS"
30711                         cf_r_parts="$cf_subsets"
30712                         cf_liblist="$Libs_To_Make"
30713
30714                         while test -n "$cf_r_parts"
30715                         do
30716                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
30717                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
30718                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
30719                                         cf_add_lib=
30720                                         case "$cf_l_parts" in
30721                                         (*termlib*)
30722                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
30723                                                 ;;
30724                                         (*ticlib*)
30725                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
30726                                                 ;;
30727                                         (*)
30728                                                 break
30729                                                 ;;
30730                                         esac
30731                                         if test -n "$cf_add_lib"; then
30732                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
30733                                         fi
30734                                 else
30735                                         break
30736                                 fi
30737                         done
30738                 else
30739                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
30740                 fi
30741
30742                 if test "$cf_dir" = c++; then
30743                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
30744                                 cf_list=
30745                                 for cf_item in $Libs_To_Make
30746                                 do
30747                                         case "$cf_item" in
30748                                         (*.a)
30749                                                 ;;
30750                                         (*)
30751                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
30752                                                 ;;
30753                                         esac
30754                                         for cf_test in $cf_list
30755                                         do
30756                                                 if test "$cf_test" = "$cf_item"
30757                                                 then
30758                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
30759                                                         cf_item=
30760                                                         break
30761                                                 fi
30762                                         done
30763                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
30764                                 done
30765                                 Libs_To_Make="$cf_list"
30766                         fi
30767                 fi
30768
30769                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
30770                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
30771                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
30772                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
30773
30774                 $AWK -f "$srcdir/mk-0th.awk" \
30775                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
30776                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30777
30778                 for cf_subset in $cf_subsets
30779                 do
30780                         cf_subdirs=
30781                         for cf_item in $cf_LIST_MODELS
30782                         do
30783
30784                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
30785
30786 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30787
30788                         CXX_MODEL=$cf_ITEM
30789                         if test "$CXX_MODEL" = SHARED; then
30790                                 case "$cf_cv_shlib_version" in
30791                                 (cygdll|msysdll|mingw|msvcdll)
30792                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
30793
30794 echo "${as_me:-configure}:30794: testing overriding CXX_MODEL to SHARED ..." 1>&5
30795
30796                                         with_shared_cxx=yes
30797                                         ;;
30798                                 (*)
30799                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
30800                                         ;;
30801                                 esac
30802                         fi
30803
30804         case X$cf_item in
30805         (Xlibtool)
30806                 cf_suffix='.la'
30807                 cf_depsuf=$cf_suffix
30808                 ;;
30809         (Xdebug)
30810                 case "$cf_cv_system_name" in
30811                 (*-msvc*)
30812                         cf_suffix='_g.lib'
30813                         ;;
30814                 (*)
30815                         cf_suffix='_g.a'
30816                         ;;
30817                 esac
30818                 cf_depsuf=$cf_suffix
30819                 ;;
30820         (Xprofile)
30821                 case "$cf_cv_system_name" in
30822                 (*-msvc*)
30823                         cf_suffix='_p.lib'
30824                         ;;
30825                 (*)
30826                         cf_suffix='_p.a'
30827                         ;;
30828                 esac
30829                 cf_depsuf=$cf_suffix
30830                 ;;
30831         (Xshared)
30832                 case "$cf_cv_system_name" in
30833                 (aix[5-7]*)
30834                         cf_suffix='.so'
30835                         cf_depsuf=$cf_suffix
30836                         ;;
30837                 (*-msvc*)
30838                         cf_suffix='.dll'
30839                         cf_depsuf='.dll.lib'
30840                         ;;
30841                 (cygwin*|msys*|mingw*)
30842                         cf_suffix='.dll'
30843                         cf_depsuf='.dll.a'
30844                         ;;
30845                 (darwin*)
30846                         cf_suffix='.dylib'
30847                         cf_depsuf=$cf_suffix
30848                         ;;
30849                 (hpux*)
30850                         case "$target" in
30851                         (ia64*)
30852                                 cf_suffix='.so'
30853                                 cf_depsuf=$cf_suffix
30854                                 ;;
30855                         (*)
30856                                 cf_suffix='.sl'
30857                                 cf_depsuf=$cf_suffix
30858                                 ;;
30859                         esac
30860                         ;;
30861                 (*)
30862                         cf_suffix='.so'
30863                         cf_depsuf=$cf_suffix
30864                         ;;
30865                 esac
30866                 ;;
30867         (*)
30868                 case "$target" in
30869                 (*-msvc*)
30870                         cf_suffix='.lib'
30871                         ;;
30872                 (*)
30873                         cf_suffix='.a'
30874                         ;;
30875                 esac
30876                 cf_depsuf=$cf_suffix
30877                 ;;
30878         esac
30879         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30880         then
30881                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30882                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30883         fi
30884
30885         case $cf_item in
30886         (libtool) cf_subdir='obj_lo'  ;;
30887         (normal)  cf_subdir='objects' ;;
30888         (debug)   cf_subdir='obj_g' ;;
30889         (profile) cf_subdir='obj_p' ;;
30890         (shared)
30891                 case "$cf_cv_system_name" in
30892                 (cygwin|msys)
30893                         cf_subdir='objects' ;;
30894                 (*)
30895                         cf_subdir='obj_s' ;;
30896                 esac
30897         esac
30898
30899                         # Test for case where we build libtinfo with a different name.
30900                         cf_libname=$cf_dir
30901                         if test "$cf_dir" = ncurses ; then
30902                                 case "$cf_subset" in
30903                                 (*base*)
30904                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
30905                                         ;;
30906                                 (*termlib*)
30907                                         cf_libname=$TINFO_LIB_SUFFIX
30908                                         ;;
30909                                 (ticlib*)
30910                                         cf_libname=$TICS_LIB_SUFFIX
30911                                         ;;
30912                                 esac
30913                         elif test "$cf_dir" = c++ ; then
30914
30915 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30916
30917 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30918
30919                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30920                         else
30921
30922 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30923
30924 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30925
30926                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30927                         fi
30928                         if test -n "${USE_ARG_SUFFIX}" ; then
30929                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
30930                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
30931                         fi
30932
30933                         # These dependencies really are for development, not
30934                         # builds, but they are useful in porting, too.
30935                         cf_depend="../include/ncurses_cfg.h"
30936                         if test "$srcdir" = "."; then
30937                                 cf_reldir="."
30938                         else
30939                                 cf_reldir="\${srcdir}"
30940                         fi
30941
30942                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
30943                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
30944                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
30945                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
30946                         fi
30947
30948                         cf_dir_suffix=
30949                         old_cf_suffix="$cf_suffix"
30950                         if test "$cf_cv_shlib_version_infix" = yes ; then
30951                         if test -n "$USE_LIB_SUFFIX" ; then
30952                                 case "$USE_LIB_SUFFIX" in
30953                                 (tw*)
30954                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
30955                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30956                                         cf_dir_suffix=tw$EXTRA_SUFFIX
30957                                         ;;
30958                                 (t*)
30959                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
30960                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
30961                                         cf_dir_suffix=t$EXTRA_SUFFIX
30962                                         ;;
30963                                 (w*)
30964                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
30965                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
30966                                         cf_dir_suffix=w$EXTRA_SUFFIX
30967                                         ;;
30968                                 (*)
30969                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
30970                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
30971                                         cf_dir_suffix=$EXTRA_SUFFIX
30972                                         ;;
30973                                 esac
30974                         fi
30975                         fi
30976
30977                         $AWK -f "$srcdir/mk-1st.awk" \
30978                                 name=${cf_libname}${cf_dir_suffix} \
30979                                 traces=$LIB_TRACING \
30980                                 MODEL=$cf_ITEM \
30981                                 CXX_MODEL=$CXX_MODEL \
30982                                 LIB_SUFFIX=$LIB_SUFFIX \
30983                                 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
30984                                 make_phony="${cf_cv_make_PHONY:-no}" \
30985                                 model=$cf_subdir \
30986                                 prefix=$cf_prefix \
30987                                 suffix=$cf_suffix \
30988                                 subset=$cf_subset \
30989                                 driver=$cf_cv_term_driver \
30990                                 SymLink="$LN_S" \
30991                                 TermlibRoot=$TINFO_NAME \
30992                                 TermlibSuffix=$TINFO_SUFFIX \
30993                                 ShlibVer=$cf_cv_shlib_version \
30994                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
30995                                 ReLink=${cf_cv_do_relink:-no} \
30996                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
30997                                 DoLinks=$cf_cv_do_symlinks \
30998                                 rmSoLocs=$cf_cv_rm_so_locs \
30999                                 ldconfig="$LDCONFIG" \
31000                                 overwrite=$WITH_OVERWRITE \
31001                                 depend="$cf_depend" \
31002                                 host="$host" \
31003                                 libtool_version="$LIBTOOL_VERSION" \
31004                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31005
31006                         cf_suffix="$old_cf_suffix"
31007
31008                         for cf_subdir2 in $cf_subdirs lib
31009                         do
31010                                 test "$cf_subdir" = "$cf_subdir2" && break
31011                         done
31012                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
31013                         $AWK -f "$srcdir/mk-2nd.awk" \
31014                                 name=$cf_dir \
31015                                 traces=$LIB_TRACING \
31016                                 MODEL=$cf_ITEM \
31017                                 model=$cf_subdir \
31018                                 subset=$cf_subset \
31019                                 srcdir=$srcdir \
31020                                 echo=$WITH_ECHO \
31021                                 crenames=$cf_cv_prog_CC_c_o \
31022                                 cxxrenames=$cf_cv_prog_CXX_c_o \
31023                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31024                         cf_subdirs="$cf_subdirs $cf_subdir"
31025                         done
31026                 done
31027         fi
31028
31029         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
31030 done
31031
31032 echo >> Makefile
31033 echo '# generated by CF_LIB_RULES' >> Makefile
31034
31035 if test "x$cf_cv_make_PHONY" = xyes ; then
31036         cat >> Makefile <<-CF_EOF
31037
31038         .PHONY :        libs
31039         .PHONY :        lintlib
31040         .PHONY :        install.includes
31041         .PHONY :        uninstall.includes
31042         .PHONY :        install.libs
31043         .PHONY :        uninstall.libs
31044 CF_EOF
31045 fi
31046
31047 for cf_dir in $SRC_SUBDIRS
31048 do
31049         if test ! -d "$srcdir/$cf_dir" ; then
31050                 continue
31051         fi
31052
31053         if test -f "$cf_dir/Makefile" ; then
31054                 case "$cf_dir" in
31055                 (Ada95)
31056                         echo 'libs \' >> Makefile
31057                         echo 'install.libs \' >> Makefile
31058                         echo 'uninstall.libs ::' >> Makefile
31059                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
31060                         ;;
31061                 esac
31062         fi
31063
31064         if test -f "$srcdir/$cf_dir/modules" ; then
31065
31066                 if test "x$cf_cv_make_PHONY" = xyes ; then
31067                         cat >> Makefile <<-CF_EOF
31068
31069                         .PHONY :        install.$cf_dir
31070                         .PHONY :        uninstall.$cf_dir
31071 CF_EOF
31072                 fi
31073
31074                 echo >> Makefile
31075                 if test -f "$srcdir/$cf_dir/headers" ; then
31076 cat >> Makefile <<CF_EOF
31077 install.includes \\
31078 uninstall.includes \\
31079 CF_EOF
31080                 fi
31081
31082 cat >> Makefile <<CF_EOF
31083 lint \\
31084 libs \\
31085 lintlib \\
31086 install.libs \\
31087 uninstall.libs \\
31088 install.$cf_dir \\
31089 uninstall.$cf_dir ::
31090         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31091 CF_EOF
31092         elif test -f "$srcdir/$cf_dir/headers" ; then
31093 cat >> Makefile <<CF_EOF
31094
31095 libs \\
31096 install.libs \\
31097 uninstall.libs \\
31098 install.includes \\
31099 uninstall.includes ::
31100         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31101 CF_EOF
31102 fi
31103 done
31104
31105 if test "x$cf_cv_make_PHONY" = xyes ; then
31106         cat >> Makefile <<-CF_EOF
31107
31108         .PHONY :        install.data
31109         .PHONY :        uninstall.data
31110 CF_EOF
31111 fi
31112
31113 if test "x$cf_with_db_install" = xyes; then
31114 cat >> Makefile <<CF_EOF
31115
31116 install.libs uninstall.libs \\
31117 install.data uninstall.data ::
31118 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31119 CF_EOF
31120 else
31121 cat >> Makefile <<CF_EOF
31122
31123 install.libs uninstall.libs ::
31124         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31125 CF_EOF
31126 fi
31127
31128 if test "x$cf_with_manpages" = xyes; then
31129
31130 if test "x$cf_cv_make_PHONY" = xyes ; then
31131         cat >> Makefile <<-CF_EOF
31132
31133         .PHONY :        install.man
31134         .PHONY :        uninstall.man
31135 CF_EOF
31136 fi
31137
31138 cat >> Makefile <<CF_EOF
31139
31140 install.man \\
31141 uninstall.man ::
31142         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
31143 CF_EOF
31144 fi
31145
31146 cat >> Makefile <<CF_EOF
31147
31148 distclean ::
31149         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
31150         rm -f headers.sh headers.sed mk_shared_lib.sh
31151         rm -f edit_man.* man_alias.*
31152         rm -rf \${DIRS_TO_MAKE}
31153 CF_EOF
31154
31155 # Special case: tack's manpage lives in its own directory.
31156 if test "x$cf_with_manpages" = xyes; then
31157 if test "x$cf_with_tack" = "xyes"; then
31158 cat >> Makefile <<CF_EOF
31159
31160 install.man \\
31161 uninstall.man ::
31162         ( cd tack && \${MAKE} \${TOP_MFLAGS} \$@ )
31163 CF_EOF
31164 fi
31165 fi
31166
31167 rm -f headers.sed headers.sh
31168
31169 echo creating headers.sh
31170 cat >headers.sh <<CF_EOF
31171 #! $SHELL
31172 # This shell script is generated by the 'configure' script.  It is invoked in a
31173 # subdirectory of the build tree.  It generates a sed-script in the parent
31174 # directory that is used to adjust includes for header files that reside in a
31175 # subdirectory of /usr/include, etc.
31176 PRG=""
31177 while test \$# != 3
31178 do
31179 PRG="\$PRG \$1"; shift
31180 done
31181 DST=\$1
31182 REF=\$2
31183 SRC=\$3
31184 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
31185 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
31186 echo installing \$SRC in \$DST
31187 CF_EOF
31188
31189 if test "$WITH_CURSES_H" = yes; then
31190         cat >>headers.sh <<CF_EOF
31191 case \$DST in
31192 (/*/include/*)
31193         END=\`basename \$DST\`
31194         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31195         do
31196                 NAME=\`basename \$i\`
31197                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31198         done
31199         ;;
31200 (*)
31201         echo "" >> \$TMPSED
31202         ;;
31203 esac
31204 CF_EOF
31205
31206 else
31207         cat >>headers.sh <<CF_EOF
31208 case \$DST in
31209 (/*/include/*)
31210         END=\`basename \$DST\`
31211         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31212         do
31213                 NAME=\`basename \$i\`
31214                 if test "\$NAME" = "curses.h"
31215                 then
31216                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31217                         NAME=ncurses.h
31218                 fi
31219                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31220         done
31221         ;;
31222 (*)
31223         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31224         ;;
31225 esac
31226 CF_EOF
31227 fi
31228 cat >>headers.sh <<CF_EOF
31229 rm -f \$TMPSRC
31230 sed -f \$TMPSED \$SRC > \$TMPSRC
31231 NAME=\`basename \$SRC\`
31232 CF_EOF
31233 if test "$WITH_CURSES_H" != yes; then
31234         cat >>headers.sh <<CF_EOF
31235 test "\$NAME" = "curses.h" && NAME=ncurses.h
31236 CF_EOF
31237 fi
31238 cat >>headers.sh <<CF_EOF
31239 # Just in case someone gzip'd manpages, remove the conflicting copy.
31240 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
31241
31242 eval \$PRG \$TMPSRC \$DST/\$NAME
31243 rm -f \$TMPSRC \$TMPSED
31244 CF_EOF
31245
31246 chmod 0755 headers.sh
31247
31248 for cf_dir in $SRC_SUBDIRS
31249 do
31250         if test ! -d "$srcdir/$cf_dir" ; then
31251                 continue
31252         fi
31253
31254         if test -f "$srcdir/$cf_dir/headers" ; then
31255                 $AWK -f "$srcdir/mk-hdr.awk" \
31256                         subset="$LIB_SUBSETS" \
31257                         compat="$WITH_CURSES_H" \
31258                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
31259         fi
31260
31261         if test -f "$srcdir/$cf_dir/modules" ; then
31262                 if test "$cf_dir" != "c++" ; then
31263                         if test "x$cf_cv_make_PHONY" = xyes ; then
31264                                 cat >> $cf_dir/Makefile <<-CF_EOF
31265
31266                                 .PHONY :        depend
31267 CF_EOF
31268                         fi
31269
31270                         cat >>$cf_dir/Makefile <<"CF_EOF"
31271 depend : ${AUTO_SRC}
31272         makedepend -- ${CPPFLAGS} -- ${C_SRC}
31273
31274 # DO NOT DELETE THIS LINE -- make depend depends on it.
31275 CF_EOF
31276                 fi
31277         fi
31278 done
31279
31280 if test "$MANPAGE_RENAMES" != no ; then
31281         # Construct a sed-script to perform renaming within man-pages
31282         test -n "$verbose" && echo "creating edit_man.sed"
31283         test ! -d man && mkdir man
31284         FGREP="${FGREP-grep -F}" $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
31285 fi
31286
31287 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
31288 if test -z "$USE_OLD_MAKERULES" ; then
31289         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
31290 fi
31291 fi
31292  ;;
31293   esac
31294 done
31295 EOF
31296
31297 cat >>"$CONFIG_STATUS" <<\EOF
31298
31299 { (exit 0); exit 0; }
31300 EOF
31301 chmod +x "$CONFIG_STATUS"
31302 ac_clean_files=$ac_clean_files_save
31303
31304 # configure is writing to config.log, and then calls config.status.
31305 # config.status does its own redirection, appending to config.log.
31306 # Unfortunately, on DOS this fails, as config.log is still kept open
31307 # by configure, so config.status won't be able to write to it; its
31308 # output is simply discarded.  So we exec the FD to /dev/null,
31309 # effectively closing config.log, so it can be properly (re)opened and
31310 # appended to by config.status.  When coming back to configure, we
31311 # need to make the FD available again.
31312 if test "$no_create" != yes; then
31313   ac_cs_success=:
31314   exec 5>/dev/null
31315   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
31316   exec 5>>config.log
31317   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31318   # would make configure fail if this is the last instruction.
31319   "$ac_cs_success" || { (exit 1); exit 1; }
31320 fi
31321 ${MAKE:-make} preinstall