]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.4 - patch 20231028
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.770 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20230903.
5 #
6 # Copyright 2003-2022,2023      Thomas E. Dickey
7 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
8 # Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11
12 # Avoid depending upon Character Ranges.
13 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16 as_cr_digits='0123456789'
17 as_cr_alnum=$as_cr_Letters$as_cr_digits
18
19 # Sed expression to map a string onto a valid variable name.
20 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
21
22 # Sed expression to map a string onto a valid CPP name.
23 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
24
25 # Be Bourne compatible
26 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27   emulate sh
28   NULLCMD=:
29 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
30   set -o posix
31 fi
32
33 # Name of the executable.
34 as_me=`echo "$0" |sed 's,.*[\\/],,'`
35
36 if expr a : '\(a\)' >/dev/null 2>&1; then
37   as_expr="expr"
38 else
39   as_expr="false"
40 fi
41
42 rm -f conf$$ conf$$.exe conf$$.file
43 echo >conf$$.file
44 if ln -s conf$$.file conf$$ 2>/dev/null; then
45   # We could just check for DJGPP; but this test a) works b) is more generic
46   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
47   if test -f conf$$.exe; then
48     # Don't use ln at all; we don't have any links
49     as_ln_s='cp -p'
50   else
51     as_ln_s='ln -s'
52   fi
53 elif ln conf$$.file conf$$ 2>/dev/null; then
54   as_ln_s='ln'
55 else
56   as_ln_s='cp -p'
57 fi
58 rm -f conf$$ conf$$.exe conf$$.file
59
60 as_executable_p="test -f"
61
62 # Support unset when possible.
63 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
64   as_unset="unset"
65 else
66   as_unset="false"
67 fi
68
69 # NLS nuisances.
70 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
71 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
72 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
73 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
74 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
75 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
76 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
77 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
78
79 # IFS
80 # We need space, tab and new line, in precisely that order.
81 as_nl='
82 '
83 IFS="   $as_nl"
84
85 # CDPATH.
86 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
87
88 # Name of the host.
89 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
90 # so uname gets run too.
91 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
92
93 exec 6>&1
94
95 #
96 # Initializations.
97 #
98 ac_default_prefix=/usr/local
99 cross_compiling=no
100 subdirs=
101 MFLAGS=
102 MAKEFLAGS=
103 SHELL=${CONFIG_SHELL-/bin/sh}
104
105 # Maximum number of lines to put in a shell here document.
106 # This variable seems obsolete.  It should probably be removed, and
107 # only ac_max_sed_lines should be used.
108 : "${ac_max_here_lines=38}"
109
110 ac_unique_file="ncurses/base/lib_initscr.c"
111 # Factoring default headers for most tests.
112 ac_includes_default="\
113 #include <stdio.h>
114 #if HAVE_SYS_TYPES_H
115 # include <sys/types.h>
116 #endif
117 #if HAVE_SYS_STAT_H
118 # include <sys/stat.h>
119 #endif
120 #if STDC_HEADERS
121 # include <stdlib.h>
122 # include <stddef.h>
123 #else
124 # if HAVE_STDLIB_H
125 #  include <stdlib.h>
126 # endif
127 #endif
128 #if HAVE_STRING_H
129 # if !STDC_HEADERS && HAVE_MEMORY_H
130 #  include <memory.h>
131 # endif
132 # include <string.h>
133 #endif
134 #if HAVE_STRINGS_H
135 # include <strings.h>
136 #endif
137 #if HAVE_INTTYPES_H
138 # include <inttypes.h>
139 #else
140 # if HAVE_STDINT_H
141 #  include <stdint.h>
142 # endif
143 #endif
144 #if HAVE_UNISTD_H
145 # include <unistd.h>
146 #endif"
147
148 # Initialize some variables set by options.
149 ac_init_help=
150 ac_init_version=false
151 # The variables have the same names as the options, with
152 # dashes changed to underlines.
153 cache_file=/dev/null
154 exec_prefix=NONE
155 no_create=
156 no_recursion=
157 prefix=NONE
158 program_prefix=NONE
159 program_suffix=NONE
160 program_transform_name=s,x,x,
161 silent=
162 site=
163 srcdir=
164 verbose=
165 x_includes=NONE
166 x_libraries=NONE
167
168 # Installation directory options.
169 # These are left unexpanded so users can "make install exec_prefix=/foo"
170 # and all the variables that are supposed to be based on exec_prefix
171 # by default will actually change.
172 # Use braces instead of parens because sh, perl, etc. also accept them.
173 bindir='${exec_prefix}/bin'
174 sbindir='${exec_prefix}/sbin'
175 libexecdir='${exec_prefix}/libexec'
176 datarootdir='${prefix}/share'
177 datadir='${datarootdir}'
178 sysconfdir='${prefix}/etc'
179 sharedstatedir='${prefix}/com'
180 localstatedir='${prefix}/var'
181 runstatedir='${localstatedir}/run'
182 libdir='${exec_prefix}/lib'
183 includedir='${prefix}/include'
184 oldincludedir='/usr/include'
185 infodir='${datarootdir}/info'
186 mandir='${datarootdir}/man'
187
188 # Identity of this package.
189 PACKAGE_NAME=
190 PACKAGE_TARNAME=
191 PACKAGE_VERSION=
192 PACKAGE_STRING=
193 PACKAGE_BUGREPORT=
194
195 ac_prev=
196 for ac_option
197 do
198   # If the previous option needs an argument, assign it.
199   if test -n "$ac_prev"; then
200     eval "$ac_prev=\$ac_option"
201     ac_prev=
202     continue
203   fi
204
205   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
206
207   # Accept the important Cygnus configure options, so we can diagnose typos.
208
209   case "$ac_option" in
210
211   -bindir | --bindir | --bindi | --bind | --bin | --bi)
212     ac_prev=bindir ;;
213   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
214     bindir=$ac_optarg ;;
215
216   -build | --build | --buil | --bui | --bu)
217     ac_prev=build_alias ;;
218   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
219     build_alias=$ac_optarg ;;
220
221   -cache-file | --cache-file | --cache-fil | --cache-fi \
222   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
223     ac_prev=cache_file ;;
224   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
225   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
226     cache_file=$ac_optarg ;;
227
228   --config-cache | -C)
229     cache_file=config.cache ;;
230
231   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
232     ac_prev=datadir ;;
233   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
234   | --da=*)
235     datadir=$ac_optarg ;;
236
237   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
238   | --dataroo | --dataro | --datar)
239     ac_prev=datarootdir ;;
240   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
241   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
242     datarootdir=$ac_optarg ;;
243
244   -disable-* | --disable-*)
245     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
246     # Reject names that are not valid shell variable names.
247     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
248       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
249    { (exit 1); exit 1; }; }
250     ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
251     eval "enable_$ac_feature=no" ;;
252
253   -enable-* | --enable-*)
254     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
255     # Reject names that are not valid shell variable names.
256     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
257       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
258    { (exit 1); exit 1; }; }
259     ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
260     case "$ac_option" in
261       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
262       *) ac_optarg=yes ;;
263     esac
264     eval "enable_$ac_feature='$ac_optarg'" ;;
265
266   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
267   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
268   | --exec | --exe | --ex)
269     ac_prev=exec_prefix ;;
270   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
271   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
272   | --exec=* | --exe=* | --ex=*)
273     exec_prefix=$ac_optarg ;;
274
275   -gas | --gas | --ga | --g)
276     # Obsolete; use --with-gas.
277     with_gas=yes ;;
278
279   -help | --help | --hel | --he | -h)
280     ac_init_help=long ;;
281   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
282     ac_init_help=recursive ;;
283   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
284     ac_init_help=short ;;
285
286   -host | --host | --hos | --ho)
287     ac_prev=host_alias ;;
288   -host=* | --host=* | --hos=* | --ho=*)
289     host_alias=$ac_optarg ;;
290
291   -includedir | --includedir | --includedi | --included | --include \
292   | --includ | --inclu | --incl | --inc)
293     ac_prev=includedir ;;
294   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
295   | --includ=* | --inclu=* | --incl=* | --inc=*)
296     includedir=$ac_optarg ;;
297
298   -infodir | --infodir | --infodi | --infod | --info | --inf)
299     ac_prev=infodir ;;
300   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
301     infodir=$ac_optarg ;;
302
303   -libdir | --libdir | --libdi | --libd)
304     ac_prev=libdir ;;
305   -libdir=* | --libdir=* | --libdi=* | --libd=*)
306     libdir=$ac_optarg ;;
307
308   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
309   | --libexe | --libex | --libe)
310     ac_prev=libexecdir ;;
311   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
312   | --libexe=* | --libex=* | --libe=*)
313     libexecdir=$ac_optarg ;;
314
315   -localstatedir | --localstatedir | --localstatedi | --localstated \
316   | --localstate | --localstat | --localsta | --localst \
317   | --locals | --local | --loca | --loc | --lo)
318     ac_prev=localstatedir ;;
319   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
320   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
321   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
322     localstatedir=$ac_optarg ;;
323
324   -runstatedir | --runstatedir | --runstatedi | --runstated \
325   | --runstate | --runstat | --runsta | --runst \
326   | --runs | --run | --ru)
327     ac_prev=runstatedir ;;
328   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
329   | --runstate=* | --runstat=* | --runsta=* | --runst=* \
330   | --runs=* | --run=* | --ru=*)
331     runstatedir=$ac_optarg ;;
332
333   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
334     ac_prev=mandir ;;
335   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
336     mandir=$ac_optarg ;;
337
338   -nfp | --nfp | --nf)
339     # Obsolete; use --without-fp.
340     with_fp=no ;;
341
342   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
343   | --no-cr | --no-c)
344     no_create=yes ;;
345
346   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
347   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
348     no_recursion=yes ;;
349
350   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
351   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
352   | --oldin | --oldi | --old | --ol | --o)
353     ac_prev=oldincludedir ;;
354   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
355   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
356   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
357     oldincludedir=$ac_optarg ;;
358
359   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
360     ac_prev=prefix ;;
361   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
362     prefix=$ac_optarg ;;
363
364   -program-prefix | --program-prefix | --program-prefi | --program-pref \
365   | --program-pre | --program-pr | --program-p)
366     ac_prev=program_prefix ;;
367   -program-prefix=* | --program-prefix=* | --program-prefi=* \
368   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
369     program_prefix=$ac_optarg ;;
370
371   -program-suffix | --program-suffix | --program-suffi | --program-suff \
372   | --program-suf | --program-su | --program-s)
373     ac_prev=program_suffix ;;
374   -program-suffix=* | --program-suffix=* | --program-suffi=* \
375   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
376     program_suffix=$ac_optarg ;;
377
378   -program-transform-name | --program-transform-name \
379   | --program-transform-nam | --program-transform-na \
380   | --program-transform-n | --program-transform- \
381   | --program-transform | --program-transfor \
382   | --program-transfo | --program-transf \
383   | --program-trans | --program-tran \
384   | --progr-tra | --program-tr | --program-t)
385     ac_prev=program_transform_name ;;
386   -program-transform-name=* | --program-transform-name=* \
387   | --program-transform-nam=* | --program-transform-na=* \
388   | --program-transform-n=* | --program-transform-=* \
389   | --program-transform=* | --program-transfor=* \
390   | --program-transfo=* | --program-transf=* \
391   | --program-trans=* | --program-tran=* \
392   | --progr-tra=* | --program-tr=* | --program-t=*)
393     program_transform_name=$ac_optarg ;;
394
395   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
396   | -silent | --silent | --silen | --sile | --sil)
397     silent=yes ;;
398
399   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
400     ac_prev=sbindir ;;
401   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
402   | --sbi=* | --sb=*)
403     sbindir=$ac_optarg ;;
404
405   -sharedstatedir | --sharedstatedir | --sharedstatedi \
406   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
407   | --sharedst | --shareds | --shared | --share | --shar \
408   | --sha | --sh)
409     ac_prev=sharedstatedir ;;
410   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
411   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
412   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
413   | --sha=* | --sh=*)
414     sharedstatedir=$ac_optarg ;;
415
416   -site | --site | --sit)
417     ac_prev=site ;;
418   -site=* | --site=* | --sit=*)
419     site=$ac_optarg ;;
420
421   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
422     ac_prev=srcdir ;;
423   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
424     srcdir=$ac_optarg ;;
425
426   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
427   | --syscon | --sysco | --sysc | --sys | --sy)
428     ac_prev=sysconfdir ;;
429   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
430   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
431     sysconfdir=$ac_optarg ;;
432
433   -target | --target | --targe | --targ | --tar | --ta | --t)
434     ac_prev=target_alias ;;
435   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
436     target_alias=$ac_optarg ;;
437
438   -v | -verbose | --verbose | --verbos | --verbo | --verb)
439     verbose=yes ;;
440
441   -version | --version | --versio | --versi | --vers | -V)
442     ac_init_version=: ;;
443
444   -with-* | --with-*)
445     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
446     # Reject names that are not valid shell variable names.
447     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
448       { echo "$as_me: error: invalid package name: $ac_package" >&2
449    { (exit 1); exit 1; }; }
450     ac_package=`echo "$ac_package" | sed 's/-/_/g'`
451     case "$ac_option" in
452       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
453       *) ac_optarg=yes ;;
454     esac
455     eval "with_$ac_package='$ac_optarg'" ;;
456
457   -without-* | --without-*)
458     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
459     # Reject names that are not valid shell variable names.
460     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
461       { echo "$as_me: error: invalid package name: $ac_package" >&2
462    { (exit 1); exit 1; }; }
463     ac_package=`echo "$ac_package" | sed 's/-/_/g'`
464     eval "with_$ac_package=no" ;;
465
466   --x)
467     # Obsolete; use --with-x.
468     with_x=yes ;;
469
470   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
471   | --x-incl | --x-inc | --x-in | --x-i)
472     ac_prev=x_includes ;;
473   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
474   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
475     x_includes=$ac_optarg ;;
476
477   -x-libraries | --x-libraries | --x-librarie | --x-librari \
478   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
479     ac_prev=x_libraries ;;
480   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
481   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
482     x_libraries=$ac_optarg ;;
483
484   -*) { echo "$as_me: error: unrecognized option: $ac_option
485 Try \`$0 --help' for more information." >&2
486    { (exit 1); exit 1; }; }
487     ;;
488
489   *=*)
490     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
491     # Reject names that are not valid shell variable names.
492     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
493       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
494    { (exit 1); exit 1; }; }
495     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
496     eval "$ac_envvar='$ac_optarg'"
497     export "$ac_envvar" ;;
498
499   *)
500     # FIXME: should be removed in autoconf 3.0.
501     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
502     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
504     : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
505     ;;
506
507   esac
508 done
509
510 if test -n "$ac_prev"; then
511   ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
512   { echo "$as_me: error: missing argument to $ac_option" >&2
513    { (exit 1); exit 1; }; }
514 fi
515
516 # Be sure to have absolute paths.
517 for ac_var in exec_prefix prefix
518 do
519   eval ac_val=$`echo "$ac_var"`
520   case "$ac_val" in
521     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # Be sure to have absolute paths.
528 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
529               localstatedir libdir includedir oldincludedir infodir mandir
530 do
531   eval ac_val=$`echo "$ac_var"`
532   case "$ac_val" in
533     [\\/$]* | ?:[\\/]* ) ;;
534     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
535    { (exit 1); exit 1; }; };;
536   esac
537 done
538
539 # There might be people who depend on the old broken behavior: `$host'
540 # used to hold the argument of --host etc.
541 build=$build_alias
542 host=$host_alias
543 target=$target_alias
544
545 # FIXME: should be removed in autoconf 3.0.
546 if test "x$host_alias" != x; then
547   if test "x$build_alias" = x; then
548     cross_compiling=maybe
549     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
550     If a cross compiler is detected then cross compile mode will be used." >&2
551   elif test "x$build_alias" != "x$host_alias"; then
552     cross_compiling=yes
553   fi
554 fi
555
556 ac_tool_prefix=
557 test -n "$host_alias" && ac_tool_prefix=$host_alias-
558
559 test "$silent" = yes && exec 6>/dev/null
560
561 # Find the source files, if location was not specified.
562 if test -z "$srcdir"; then
563   ac_srcdir_defaulted=yes
564   # Try the directory containing this script, then its parent.
565   ac_prog=$0
566   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
567   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
568   srcdir=$ac_confdir
569   if test ! -r "$srcdir/$ac_unique_file"; then
570     srcdir=..
571   fi
572 else
573   ac_srcdir_defaulted=no
574 fi
575 if test ! -r "$srcdir/$ac_unique_file"; then
576   if test "$ac_srcdir_defaulted" = yes; then
577     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
578    { (exit 1); exit 1; }; }
579   else
580     { echo "$as_me: error: cannot find sources in $srcdir" >&2
581    { (exit 1); exit 1; }; }
582   fi
583 fi
584 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
585 ac_env_build_alias_set=${build_alias+set}
586 ac_env_build_alias_value=$build_alias
587 ac_cv_env_build_alias_set=${build_alias+set}
588 ac_cv_env_build_alias_value=$build_alias
589 ac_env_host_alias_set=${host_alias+set}
590 ac_env_host_alias_value=$host_alias
591 ac_cv_env_host_alias_set=${host_alias+set}
592 ac_cv_env_host_alias_value=$host_alias
593 ac_env_target_alias_set=${target_alias+set}
594 ac_env_target_alias_value=$target_alias
595 ac_cv_env_target_alias_set=${target_alias+set}
596 ac_cv_env_target_alias_value=$target_alias
597 ac_env_CC_set=${CC+set}
598 ac_env_CC_value=$CC
599 ac_cv_env_CC_set=${CC+set}
600 ac_cv_env_CC_value=$CC
601 ac_env_CFLAGS_set=${CFLAGS+set}
602 ac_env_CFLAGS_value=$CFLAGS
603 ac_cv_env_CFLAGS_set=${CFLAGS+set}
604 ac_cv_env_CFLAGS_value=$CFLAGS
605 ac_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_env_LDFLAGS_value=$LDFLAGS
607 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
608 ac_cv_env_LDFLAGS_value=$LDFLAGS
609 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_env_CPPFLAGS_value=$CPPFLAGS
611 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
612 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
613 ac_env_CPP_set=${CPP+set}
614 ac_env_CPP_value=$CPP
615 ac_cv_env_CPP_set=${CPP+set}
616 ac_cv_env_CPP_value=$CPP
617 ac_env_CXX_set=${CXX+set}
618 ac_env_CXX_value=$CXX
619 ac_cv_env_CXX_set=${CXX+set}
620 ac_cv_env_CXX_value=$CXX
621 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
622 ac_env_CXXFLAGS_value=$CXXFLAGS
623 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
624 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
625 ac_env_CXXCPP_set=${CXXCPP+set}
626 ac_env_CXXCPP_value=$CXXCPP
627 ac_cv_env_CXXCPP_set=${CXXCPP+set}
628 ac_cv_env_CXXCPP_value=$CXXCPP
629
630 #
631 # Report the --help message.
632 #
633 if test "$ac_init_help" = "long"; then
634   # Omit some internal or obsolete options to make the list less imposing.
635   # This message is too long to be a string in the A/UX 3.1 sh.
636   cat <<EOF
637 \`configure' configures this package to adapt to many kinds of systems.
638
639 Usage: $0 [OPTION]... [VAR=VALUE]...
640
641 To assign environment variables (e.g., CC, CFLAGS...), specify them as
642 VAR=VALUE.  See below for descriptions of some of the useful variables.
643
644 Defaults for the options are specified in brackets.
645
646 Configuration:
647   -h, --help              display this help and exit
648       --help=short        display options specific to this package
649       --help=recursive    display the short help of all the included packages
650   -V, --version           display version information and exit
651   -q, --quiet, --silent   do not print \`checking...' messages
652       --cache-file=FILE   cache test results in FILE [disabled]
653   -C, --config-cache      alias for \`--cache-file=config.cache'
654   -n, --no-create         do not create output files
655       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
656
657 EOF
658
659   cat <<EOF
660 Installation directories:
661   --prefix=PREFIX         install architecture-independent files in PREFIX
662                           [$ac_default_prefix]
663   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
664                           [PREFIX]
665
666 By default, \`make install' will install all the files in
667 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
668 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
669 for instance \`--prefix=\$HOME'.
670
671 For better control, use the options below.
672
673 Fine tuning of the installation directories:
674   --bindir=DIR            user executables [EPREFIX/bin]
675   --sbindir=DIR           system admin executables [EPREFIX/sbin]
676   --libexecdir=DIR        program executables [EPREFIX/libexec]
677   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
678   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
679   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
680   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
681   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
682   --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
683   --libdir=DIR            object code libraries [EPREFIX/lib]
684   --includedir=DIR        C header files [PREFIX/include]
685   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
686   --infodir=DIR           info documentation [DATAROOTDIR/info]
687   --mandir=DIR            man documentation [DATAROOTDIR/man]
688 EOF
689
690   cat <<\EOF
691
692 Program names:
693   --program-prefix=PREFIX            prepend PREFIX to installed program names
694   --program-suffix=SUFFIX            append SUFFIX to installed program names
695   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
696
697 System types:
698   --build=BUILD           configure for building on BUILD [guessed]
699   --host=HOST       build programs to run on HOST [BUILD]
700   --target=TARGET   configure for building compilers for TARGET [HOST]
701 EOF
702 fi
703
704 if test -n "$ac_init_help"; then
705
706   cat <<\EOF
707
708 Optional Packages:
709   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
710   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
711
712 Optional Features:
713   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
714   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
715
716   --with-rel-version=XXX  override derived release version
717   --with-abi-version=XXX  override derived ABI version
718   --with-system-type=XXX  test: override derived host system-type
719   --with-abi-altered=XXX  override visible ABI version, for packaging
720   --without-ada           suppress check for Ada compiler, don't build demo
721   --without-cxx           do not adjust ncurses bool to match C++
722   --without-cxx-binding   do not build C++ binding and demo
723   --disable-db-install    suppress install of terminal database
724   --without-manpages      suppress install of manpages
725   --without-progs         suppress build/install with programs (e.g., tic)
726   --without-tests         suppress build/install with test-programs
727   --without-curses-h      install curses.h as ncurses.h only
728   --with-config-suffix=X  name ncurses*X-config file with X
729   --with-pkg-config[=CMD] enable/disable use of pkg-config and its name CMD
730   --with-pkg-config-libdir=XXX use given directory for installing pc-files
731   --enable-pc-files       generate and install .pc files for pkg-config
732   --with-pc-suffix=XXX    suffix pkg-config files with XXX
733   --enable-mixed-case     tic should assume mixed-case filenames
734   --with-install-prefix=DESTDIR use DESTDIR as installation directory prefix
735 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
736   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
737   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
738   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
739   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
740   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
741   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
742 Options to Specify the Libraries Built/Used:
743   --disable-libtool-version  enable to use libtool's incompatible naming scheme
744   --with-libtool          generate libraries with libtool
745   --with-shared           generate shared-libraries
746   --with-normal           generate normal-libraries (default)
747   --with-debug            generate debug-libraries (default)
748   --with-profile          generate profile-libraries
749   --with-cxx-shared       generate C++ shared-libraries
750   --with-lib-prefix       override library-prefix
751   --with-termlib          generate separate terminfo library
752   --with-ticlib           generate separate tic library
753   --enable-rpath          use rpath option when generating shared libraries
754   --disable-relink        relink shared libraries during install
755   --with-shlib-version[={rel|abi}] use release or ABI version in shared library file names
756   --with-libtool-opts=XXX give libtool additional options XXX
757   --with-export-syms=SYM-FILE limit symbols exported by libtool to those listed in SYM-FILE
758   --with-versioned-syms=MAP-FILE version ELF shared library symbols per MAP-FILE
759   --with-gpm              use Alessandro Rubini's GPM library
760   --without-dlsym         do not use dlsym() to load GPM dynamically
761   --with-pcre2            use PCRE2 for regular-expressions
762   --with-sysmouse         use sysmouse (FreeBSD console)
763   --disable-lib-suffixes  disable library suffixes
764   --disable-rpath-hack    don't add rpath options for additional libraries
765   --disable-pkg-ldflags   disable extra LDFLAGS for package-scripts
766 Fine-Tuning Your Configuration:
767   --with-extra-suffix=X   append extra suffix X to header/library paths
768   --disable-overwrite     put headers in subdir, omit link to -lcurses
769   --disable-database      do not use terminfo, only fallbacks/termcap
770   --with-database=XXX     specify terminfo source to install
771   --with-hashed-db        specify hashed-database library
772   --with-fallbacks=XXX    specify list of fallback terminal descriptions
773   --with-tic-path=XXX     specify path of tic for fallbacks
774   --with-infocmp-path=XXX     specify path of infocmp for fallbacks
775   --without-xterm-new     specify if xterm terminfo should be old version
776   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
777   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
778   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
779   --disable-big-core      assume machine has little memory
780   --disable-big-strings   assume compiler has only standard-size strings
781   --enable-termcap        compile in termcap fallback support
782   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
783   --enable-getcap         fast termcap load, no xrefs to terminfo
784   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
785   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
786   --disable-root-environ  restrict root use of ncurses environment variables
787   --disable-root-access   restrict file-access when running setuid
788   --disable-setuid-environ restrict setuid use of ncurses environment variables
789   --enable-symlinks       make tic use symbolic links not hard links
790   --enable-broken_linker  compile with broken-linker support code
791   --enable-bsdpad         recognize BSD-style prefix padding
792   --disable-widec         compile without wide character and UTF-8 support
793   --disable-lp64          allow chtype to be long (ignore _LP64)
794   --disable-largefile     omit support for large files
795   --disable-tparm-varargs compile tparm() without varargs interface
796   --disable-tic-depends   link tic library without explicit dependency on ncurses library
797   --enable-wattr-macros   enable wattr* macros
798   --with-x11-rgb=FILE     obtain X11 color definitions from FILE (default: EPREFIX/lib/X11/rgb.txt)
799   --with-bool=TYPE        fall back to TYPE for curses 'bool' typedef
800   --with-caps=alt         compile with alternate Caps file
801   --with-chtype=TYPE      override type of chtype
802   --with-ospeed=TYPE      override type of ospeed variable
803   --with-mmask-t=TYPE     override type of mmask_t
804   --with-ccharw-max=XXX   override size CCHARW_MAX
805   --enable-signed-char    use signed chars for Boolean array in term.h
806   --with-tparm-arg=TYPE   override parameter type of tparm
807   --with-rcs-ids          compile-in RCS identifiers
808 Options to Specify How Manpages are Installed:
809   --with-manpage-format   specify manpage-format: gzip/compress/bzip2/xz,
810                           BSDI/normal and optionally formatted/catonly,
811                           e.g., gzip,formatted
812   --with-manpage-renames  specify manpage-renaming
813   --with-manpage-aliases  specify manpage-aliases using .so
814   --with-manpage-symlinks specify manpage-aliases using symlinks
815   --with-manpage-tbl      specify manpage processing with tbl
816 Extensions:
817   --disable-ext-funcs     disable function-extensions
818   --enable-sp-funcs       enable SCREEN-extensions
819   --enable-term-driver    enable terminal-driver
820   --enable-const          compile with extra/non-standard const
821   --enable-ext-colors     compile for 256-color support
822   --enable-ext-mouse      compile for extended mouse-encoding
823   --enable-ext-putwin     compile with extended putwin/screendump
824   --enable-no-padding     compile with $NCURSES_NO_PADDING code
825   --enable-sigwinch       compile with SIGWINCH handler
826   --enable-tcap-names     compile with user-definable terminal capabilities
827 Reentrant Code:
828   --with-pthread          use POSIX thread library
829   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
830   --enable-weak-symbols   enable weak-symbols for pthreads
831   --enable-reentrant      compile with reentrant code
832   --disable-opaque-curses do not make WINDOW, etc., structures opaque
833   --disable-opaque-form   do not make form library structures opaque
834   --disable-opaque-menu   do not make menu library structures opaque
835   --disable-opaque-panel  do not make panel library structures opaque
836   --with-wrap-prefix=XXX  override prefix used for public variables
837 Development Code:
838   --without-develop       disable development options
839   --enable-hard-tabs      compile with hard-tabs code
840   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
841 Experimental Code:
842   --disable-assumed-color do not assume anything about default-colors
843   --disable-hashmap       compile without hashmap scrolling-optimization
844   --enable-check-size     compile-in code to detect screensize
845   --enable-colorfgbg      compile-in experimental $COLORFGBG code
846   --enable-fvisibility    compile with -fvisibility=hidden
847   --enable-interop        compile-in interop bindings
848   --enable-safe-sprintf   compile with experimental safe-sprintf code
849   --disable-scroll-hints  compile without scroll-hints code
850   --enable-wgetch-events  compile with wgetch-events code
851   --enable-exp-win32      compile with experimental-Windows driver
852 Testing/development Options:
853   --disable-echo          do not display "compiling" commands
854   --disable-stripping     do not strip (debug info) installed executables
855   --with-strip-program=XX specify program to use when stripping in install
856   --enable-warnings       test: turn on gcc compiler warnings
857   --enable-stdnoreturn    enable C11 _Noreturn feature for diagnostics
858   --enable-string-hacks   work around bogus compiler/loader warnings
859   --enable-assertions     test: turn on generation of assertion code
860   --with-dmalloc          test: use Gray Watson's dmalloc library
861   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
862   --with-valgrind         test: use valgrind
863   --disable-leaks         test: free permanent memory, analyze leaks
864   --enable-expanded       test: generate functions for certain macros
865   --disable-macros        test: use functions rather than macros
866   --with-trace            test: add trace() function to all models of ncurses
867   --disable-gnat-projects test: disable GNAT projects even if usable
868 Ada Binding Options:
869   --with-ada-compiler[=CMD] use CMD as Ada95 compiler (default: gnatmake)
870   --with-ada-include=DIR  find Ada95 includes in DIR (default: PREFIX/share/ada/adainclude)
871   --with-ada-objects=DIR  find Ada95 objects in DIR (default: PREFIX/lib/ada/adalib)
872   --with-ada-sharedlib    build Ada95 shared library; requires GNAT project support
873   --with-ada-libname=XXX  use XXX as Ada95 library name
874 Library basenames for pkgsrc:
875   --with-form-libname=XXX override form basename of library
876   --with-menu-libname=XXX override menu basename of library
877   --with-panel-libname=XXX override panel basename of library
878   --with-cxx-libname=XXX override ncurses++ basename of library
879
880 Some influential environment variables:
881   CC          C compiler command
882   CFLAGS      C compiler flags
883   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
884               nonstandard directory <lib dir>
885   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
886               headers in a nonstandard directory <include dir>
887   CPP         C preprocessor
888   CXX         C++ compiler command
889   CXXFLAGS    C++ compiler flags
890   CXXCPP      C++ preprocessor
891
892 Use these variables to override the choices made by `configure' or to help
893 it to find libraries and programs with nonstandard names/locations.
894
895 EOF
896 fi
897
898 if test "$ac_init_help" = "recursive"; then
899   # If there are subdirs, report their specific --help.
900   ac_popdir=`pwd`
901   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
902     cd "$ac_subdir"
903     # A "../" for each directory in /$ac_subdir.
904     ac_dots=`echo "$ac_subdir" |
905              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
906
907     case "$srcdir" in
908     .) # No --srcdir option.  We are building in place.
909       ac_sub_srcdir="$srcdir" ;;
910     [\\/]* | ?:[\\/]* ) # Absolute path.
911       ac_sub_srcdir="$srcdir/$ac_subdir" ;;
912     *) # Relative path.
913       ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
914     esac
915
916     # Check for guested configure; otherwise get Cygnus style configure.
917     if test -f "$ac_sub_srcdir/configure.gnu"; then
918       echo
919       $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
920     elif test -f "$ac_sub_srcdir/configure"; then
921       echo
922       $SHELL "$ac_sub_srcdir/configure" --help=recursive
923     elif test -f "$ac_sub_srcdir/configure.ac" ||
924            test -f "$ac_sub_srcdir/configure.in"; then
925       echo
926       "$ac_configure" --help
927     else
928       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
929     fi
930     cd "$ac_popdir"
931   done
932 fi
933
934 test -n "$ac_init_help" && exit 0
935 if "$ac_init_version"; then
936   cat <<\EOF
937
938 Copyright 2003-2022,2023        Thomas E. Dickey
939 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
940 Free Software Foundation, Inc.
941 This configure script is free software; the Free Software Foundation
942 gives unlimited permission to copy, distribute and modify it.
943 EOF
944   exit 0
945 fi
946 exec 5>config.log
947 cat >&5 <<EOF
948 This file contains any messages produced by compilers while
949 running configure, to aid debugging if configure makes a mistake.
950
951 It was created by $as_me, which was
952 generated by GNU Autoconf 2.52.20230903.  Invocation command line was
953
954   $ $0 $@
955
956 EOF
957 {
958 cat <<_ASUNAME
959 ## ---------- ##
960 ## Platform.  ##
961 ## ---------- ##
962
963 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
964 uname -m = `(uname -m) 2>/dev/null || echo unknown`
965 uname -r = `(uname -r) 2>/dev/null || echo unknown`
966 uname -s = `(uname -s) 2>/dev/null || echo unknown`
967 uname -v = `(uname -v) 2>/dev/null || echo unknown`
968
969 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
970 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
971
972 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
973 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
974 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
975 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
976 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
977 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
978 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
979
980 PATH = $PATH
981
982 _ASUNAME
983 } >&5
984
985 cat >&5 <<EOF
986 ## ------------ ##
987 ## Core tests.  ##
988 ## ------------ ##
989
990 EOF
991
992 # Keep a trace of the command line.
993 # Strip out --no-create and --no-recursion so they do not pile up.
994 # Also quote any args containing shell meta-characters.
995 ac_configure_args=
996 ac_sep=
997 for ac_arg
998 do
999   case "$ac_arg" in
1000   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1001   | --no-cr | --no-c) ;;
1002   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1003   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
1004   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1005     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
1006     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1007     ac_sep=" " ;;
1008   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
1009      ac_sep=" " ;;
1010   esac
1011   # Get rid of the leading space.
1012 done
1013
1014 # When interrupted or exit'd, cleanup temporary files, and complete
1015 # config.log.  We remove comments because anyway the quotes in there
1016 # would cause problems or look ugly.
1017 trap 'exit_status=$?
1018   # Save into config.log some information that might help in debugging.
1019   echo >&5
1020   echo "## ----------------- ##" >&5
1021   echo "## Cache variables.  ##" >&5
1022   echo "## ----------------- ##" >&5
1023   echo >&5
1024   # The following way of writing the cache mishandles newlines in values,
1025 {
1026   (set) 2>&1 |
1027     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1028     *ac_space=\ *)
1029       sed -n \
1030         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1031           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1032       ;;
1033     *)
1034       sed -n \
1035         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1036       ;;
1037     esac;
1038 } >&5
1039   sed "/^$/d" confdefs.h >conftest.log
1040   if test -s conftest.log; then
1041     echo >&5
1042     echo "## ------------ ##" >&5
1043     echo "## confdefs.h.  ##" >&5
1044     echo "## ------------ ##" >&5
1045     echo >&5
1046     cat conftest.log >&5
1047   fi
1048   (echo; echo) >&5
1049   test "$ac_signal" != 0 &&
1050     echo "$as_me: caught signal $ac_signal" >&5
1051   echo "$as_me: exit $exit_status" >&5
1052   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1053     exit $exit_status
1054      ' 0
1055 for ac_signal in 1 2 13 15; do
1056   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1057 done
1058 ac_signal=0
1059
1060 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1061 rm -rf conftest* confdefs.h
1062 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1063 echo >confdefs.h
1064
1065 # Let the site file select an alternate cache file if it wants to.
1066 # Prefer explicitly selected file to automatically selected ones.
1067 if test -z "$CONFIG_SITE"; then
1068   if test "x$prefix" != xNONE; then
1069     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1070   else
1071     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1072   fi
1073 fi
1074 for ac_site_file in $CONFIG_SITE; do
1075   if test -r "$ac_site_file"; then
1076     { echo "$as_me:1076: loading site script $ac_site_file" >&5
1077 echo "$as_me: loading site script $ac_site_file" >&6;}
1078     cat "$ac_site_file" >&5
1079     . "$ac_site_file"
1080   fi
1081 done
1082
1083 if test -r "$cache_file"; then
1084   # Some versions of bash will fail to source /dev/null (special
1085   # files actually), so we avoid doing that.
1086   if test -f "$cache_file"; then
1087     { echo "$as_me:1087: loading cache $cache_file" >&5
1088 echo "$as_me: loading cache $cache_file" >&6;}
1089     case $cache_file in
1090       [\\/]* | ?:[\\/]* ) . $cache_file;;
1091       *)                      . ./$cache_file;;
1092     esac
1093   fi
1094 else
1095   { echo "$as_me:1095: creating cache $cache_file" >&5
1096 echo "$as_me: creating cache $cache_file" >&6;}
1097   >$cache_file
1098 fi
1099
1100 # Check that the precious variables saved in the cache have kept the same
1101 # value.
1102 ac_cache_corrupted=false
1103 for ac_var in `(set) 2>&1 |
1104                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1105   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1106   eval ac_new_set=\$ac_env_${ac_var}_set
1107   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1108   eval ac_new_val="\$ac_env_${ac_var}_value"
1109   case "$ac_old_set,$ac_new_set" in
1110     set,)
1111       { echo "$as_me:1111: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1112 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1113       ac_cache_corrupted=: ;;
1114     ,set)
1115       { echo "$as_me:1115: error: \`$ac_var' was not set in the previous run" >&5
1116 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1117       ac_cache_corrupted=: ;;
1118     ,);;
1119     *)
1120       if test "x$ac_old_val" != "x$ac_new_val"; then
1121         { echo "$as_me:1121: error: \`$ac_var' has changed since the previous run:" >&5
1122 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1123         { echo "$as_me:1123:   former value:  $ac_old_val" >&5
1124 echo "$as_me:   former value:  $ac_old_val" >&2;}
1125         { echo "$as_me:1125:   current value: $ac_new_val" >&5
1126 echo "$as_me:   current value: $ac_new_val" >&2;}
1127         ac_cache_corrupted=:
1128       fi;;
1129   esac
1130   # Pass precious variables to config.status.  It doesn't matter if
1131   # we pass some twice (in addition to the command line arguments).
1132   if test "$ac_new_set" = set; then
1133     case "$ac_new_val" in
1134     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1135       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1136       ac_configure_args="$ac_configure_args '$ac_arg'"
1137       ;;
1138     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1139        ;;
1140     esac
1141   fi
1142 done
1143 if "$ac_cache_corrupted"; then
1144   { echo "$as_me:1144: error: changes in the environment can compromise the build" >&5
1145 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1146   { { echo "$as_me:1146: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1147 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1148    { (exit 1); exit 1; }; }
1149 fi
1150
1151 ac_ext=c
1152 ac_cpp='$CPP $CPPFLAGS'
1153 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1154 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1155 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1156 ac_main_return="return"
1157
1158 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1159   *c*,-n*) ECHO_N=
1160            ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1161            ECHO_T='     '
1162            ;;
1163   *c*,*  ) ECHO_N=-n
1164            ECHO_C=
1165            ECHO_T=
1166            ;;
1167   *)       ECHO_N=
1168            ECHO_C='\c'
1169            ECHO_T=
1170            ;;
1171 esac
1172 echo "#! $SHELL" >conftest.sh
1173 echo  "exit 0"   >>conftest.sh
1174 chmod +x conftest.sh
1175 if { (echo "$as_me:1175: PATH=\".;.\"; conftest.sh") >&5
1176   (PATH=".;."; conftest.sh) 2>&5
1177   ac_status=$?
1178   echo "$as_me:1178: \$? = $ac_status" >&5
1179   (exit "$ac_status"); }; then
1180   ac_path_separator=';'
1181 else
1182   ac_path_separator=:
1183 fi
1184 PATH_SEPARATOR="$ac_path_separator"
1185 rm -f conftest.sh
1186
1187 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1188
1189 top_builddir=`pwd`
1190
1191 for ac_prog in ggrep grep
1192 do
1193   # Extract the first word of "$ac_prog", so it can be a program name with args.
1194 set dummy $ac_prog; ac_word=$2
1195 echo "$as_me:1195: checking for $ac_word" >&5
1196 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1197 if test "${ac_cv_prog_GREP+set}" = set; then
1198   echo $ECHO_N "(cached) $ECHO_C" >&6
1199 else
1200   if test -n "$GREP"; then
1201   ac_cv_prog_GREP="$GREP" # Let the user override the test.
1202 else
1203   ac_save_IFS=$IFS; IFS=$ac_path_separator
1204 ac_dummy="$PATH"
1205 for ac_dir in $ac_dummy; do
1206   IFS=$ac_save_IFS
1207   test -z "$ac_dir" && ac_dir=.
1208   $as_executable_p "$ac_dir/$ac_word" || continue
1209 ac_cv_prog_GREP="$ac_prog"
1210 echo "$as_me:1210: found $ac_dir/$ac_word" >&5
1211 break
1212 done
1213
1214 fi
1215 fi
1216 GREP=$ac_cv_prog_GREP
1217 if test -n "$GREP"; then
1218   echo "$as_me:1218: result: $GREP" >&5
1219 echo "${ECHO_T}$GREP" >&6
1220 else
1221   echo "$as_me:1221: result: no" >&5
1222 echo "${ECHO_T}no" >&6
1223 fi
1224
1225   test -n "$GREP" && break
1226 done
1227 test -n "$GREP" || GREP=": "
1228
1229 echo "$as_me:1229: checking for egrep" >&5
1230 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1231 if test "${ac_cv_path_EGREP+set}" = set; then
1232   echo $ECHO_N "(cached) $ECHO_C" >&6
1233 else
1234   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
1235    then ac_cv_path_EGREP="$GREP -E"
1236    else
1237      for ac_prog in gegrep egrep
1238 do
1239   # Extract the first word of "$ac_prog", so it can be a program name with args.
1240 set dummy $ac_prog; ac_word=$2
1241 echo "$as_me:1241: checking for $ac_word" >&5
1242 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1243 if test "${ac_cv_path_EGREP+set}" = set; then
1244   echo $ECHO_N "(cached) $ECHO_C" >&6
1245 else
1246   case $EGREP in
1247   [\\/]* | ?:[\\/]*)
1248   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
1249   ;;
1250   *)
1251   ac_save_IFS=$IFS; IFS=$ac_path_separator
1252 ac_dummy="$PATH"
1253 for ac_dir in $ac_dummy; do
1254   IFS=$ac_save_IFS
1255   test -z "$ac_dir" && ac_dir=.
1256   if $as_executable_p "$ac_dir/$ac_word"; then
1257    ac_cv_path_EGREP="$ac_dir/$ac_word"
1258    echo "$as_me:1258: found $ac_dir/$ac_word" >&5
1259    break
1260 fi
1261 done
1262
1263   ;;
1264 esac
1265 fi
1266 EGREP=$ac_cv_path_EGREP
1267
1268 if test -n "$EGREP"; then
1269   echo "$as_me:1269: result: $EGREP" >&5
1270 echo "${ECHO_T}$EGREP" >&6
1271 else
1272   echo "$as_me:1272: result: no" >&5
1273 echo "${ECHO_T}no" >&6
1274 fi
1275
1276   test -n "$EGREP" && break
1277 done
1278 test -n "$EGREP" || EGREP=": "
1279
1280      test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:1280: error: cannot find workable egrep" >&5
1281 echo "$as_me: error: cannot find workable egrep" >&2;}
1282    { (exit 1); exit 1; }; }
1283    fi
1284 fi
1285 echo "$as_me:1285: result: $ac_cv_path_EGREP" >&5
1286 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
1287  EGREP="$ac_cv_path_EGREP"
1288
1289 NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1290 NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1291 NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1292 cf_cv_abi_version=${NCURSES_MAJOR}
1293 cf_cv_abi_default=${NCURSES_MAJOR}
1294 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1295 cf_cv_timestamp=`date`
1296 echo "$as_me:1296: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_default ($cf_cv_timestamp)" >&5
1297 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_default ($cf_cv_timestamp)" >&6
1298
1299 if test -f "$srcdir/VERSION" ; then
1300         echo "$as_me:1300: checking for package version" >&5
1301 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1302
1303         # if there are not enough fields, cut returns the last one...
1304         cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
1305         cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
1306         cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
1307
1308         # this is how CF_BUNDLED_INTL uses $VERSION:
1309         VERSION="$cf_field1"
1310
1311         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1312         test -z "$VERSION_MAJOR" && { { echo "$as_me:1312: error: missing major-version" >&5
1313 echo "$as_me: error: missing major-version" >&2;}
1314    { (exit 1); exit 1; }; }
1315
1316         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1317         test -z "$VERSION_MINOR" && { { echo "$as_me:1317: error: missing minor-version" >&5
1318 echo "$as_me: error: missing minor-version" >&2;}
1319    { (exit 1); exit 1; }; }
1320
1321         echo "$as_me:1321: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1322 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1323
1324         echo "$as_me:1324: checking for package patch date" >&5
1325 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1326         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1327         case .$VERSION_PATCH in
1328         (.)
1329                 { { echo "$as_me:1329: error: missing patch-date $VERSION_PATCH" >&5
1330 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1331    { (exit 1); exit 1; }; }
1332                 ;;
1333         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1334                 ;;
1335         (*)
1336                 { { echo "$as_me:1336: error: illegal patch-date $VERSION_PATCH" >&5
1337 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1338    { (exit 1); exit 1; }; }
1339                 ;;
1340         esac
1341         echo "$as_me:1341: result: $VERSION_PATCH" >&5
1342 echo "${ECHO_T}$VERSION_PATCH" >&6
1343 else
1344         { { echo "$as_me:1344: error: did not find $srcdir/VERSION" >&5
1345 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1346    { (exit 1); exit 1; }; }
1347 fi
1348
1349 # show the actual data that we have for versions:
1350 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1351
1352 echo "${as_me:-configure}:1352: testing ABI VERSION $VERSION ..." 1>&5
1353
1354 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1355
1356 echo "${as_me:-configure}:1356: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1357
1358 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1359
1360 echo "${as_me:-configure}:1360: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1361
1362 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1363
1364 echo "${as_me:-configure}:1364: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1365
1366         cf_PACKAGE=NCURSES
1367         PACKAGE=ncurses
1368
1369 cat >>confdefs.h <<EOF
1370 #define PACKAGE "$PACKAGE"
1371 EOF
1372
1373 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1374
1375         cat >>confdefs.h <<EOF
1376 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1377 EOF
1378
1379         cat >>confdefs.h <<EOF
1380 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1381 EOF
1382
1383 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1384
1385 # Check whether --with-rel-version or --without-rel-version was given.
1386 if test "${with_rel_version+set}" = set; then
1387   withval="$with_rel_version"
1388   { echo "$as_me:1388: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1389 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1390  cf_cv_rel_version=$withval
1391 fi;
1392
1393  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1394  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1395  test -n "NCURSES_MINOR" || NCURSES_MINOR=0
1396
1397 if test -n "$NCURSES_MAJOR" ; then
1398   case `echo "$NCURSES_MAJOR" | sed -e 's/^[0-9]*$/0/g'` in
1399   (0)
1400         ;;
1401   (*)
1402         { { echo "$as_me:1402: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1403 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1404    { (exit 1); exit 1; }; }
1405         ;;
1406   esac
1407 else
1408   { { echo "$as_me:1408: error: Release major-version value is empty" >&5
1409 echo "$as_me: error: Release major-version value is empty" >&2;}
1410    { (exit 1); exit 1; }; }
1411 fi
1412
1413 if test -n "$NCURSES_MINOR" ; then
1414   case `echo "$NCURSES_MINOR" | sed -e 's/^[0-9]*$/0/g'` in
1415   (0)
1416         ;;
1417   (*)
1418         { { echo "$as_me:1418: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1419 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1420    { (exit 1); exit 1; }; }
1421         ;;
1422   esac
1423 else
1424   { { echo "$as_me:1424: error: Release minor-version value is empty" >&5
1425 echo "$as_me: error: Release minor-version value is empty" >&2;}
1426    { (exit 1); exit 1; }; }
1427 fi
1428
1429 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1430
1431 # Check whether --with-abi-version or --without-abi-version was given.
1432 if test "${with_abi_version+set}" = set; then
1433   withval="$with_abi_version"
1434
1435         if test "x$cf_cv_abi_version" != "x$withval"
1436         then
1437                 { echo "$as_me:1437: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1438 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1439                 case "$cf_cv_rel_version" in
1440                 (5.*)
1441                         cf_cv_rel_version=$withval.0
1442                         ;;
1443                 (6.*)
1444                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1445                         ;;
1446                 esac
1447         fi
1448         cf_cv_abi_version=$withval
1449 fi;
1450
1451 if test -n "$cf_cv_abi_version" ; then
1452   case `echo "$cf_cv_abi_version" | sed -e 's/^[0-9]*$/0/g'` in
1453   (0)
1454         ;;
1455   (*)
1456         { { echo "$as_me:1456: error: ABI version is not a number: $cf_cv_abi_version" >&5
1457 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1458    { (exit 1); exit 1; }; }
1459         ;;
1460   esac
1461 else
1462   { { echo "$as_me:1462: error: ABI version value is empty" >&5
1463 echo "$as_me: error: ABI version value is empty" >&2;}
1464    { (exit 1); exit 1; }; }
1465 fi
1466
1467 cf_cv_abi_default=$cf_cv_abi_version
1468
1469 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1470 then
1471         case "$cf_cv_rel_version" in
1472         (5.*)
1473                 cf_cv_rel_version=$with_abi_version.0
1474                 ;;
1475         esac
1476 fi
1477
1478 ac_aux_dir=
1479 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1480   if test -f "$ac_dir/install-sh"; then
1481     ac_aux_dir=$ac_dir
1482     ac_install_sh="$ac_aux_dir/install-sh -c"
1483     break
1484   elif test -f "$ac_dir/install.sh"; then
1485     ac_aux_dir=$ac_dir
1486     ac_install_sh="$ac_aux_dir/install.sh -c"
1487     break
1488   elif test -f "$ac_dir/shtool"; then
1489     ac_aux_dir=$ac_dir
1490     ac_install_sh="$ac_aux_dir/shtool install -c"
1491     break
1492   fi
1493 done
1494 if test -z "$ac_aux_dir"; then
1495   { { echo "$as_me:1495: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1496 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1497    { (exit 1); exit 1; }; }
1498 fi
1499 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1500 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1501 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1502
1503 # Make sure we can run config.sub.
1504 $ac_config_sub sun4 >/dev/null 2>&1 ||
1505   { { echo "$as_me:1505: error: cannot run $ac_config_sub" >&5
1506 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1507    { (exit 1); exit 1; }; }
1508
1509 echo "$as_me:1509: checking build system type" >&5
1510 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1511 if test "${ac_cv_build+set}" = set; then
1512   echo $ECHO_N "(cached) $ECHO_C" >&6
1513 else
1514   ac_cv_build_alias=$build_alias
1515 test -z "$ac_cv_build_alias" &&
1516   ac_cv_build_alias=`$ac_config_guess`
1517 test -z "$ac_cv_build_alias" &&
1518   { { echo "$as_me:1518: error: cannot guess build type; you must specify one" >&5
1519 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1520    { (exit 1); exit 1; }; }
1521 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1522   { { echo "$as_me:1522: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1523 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1524    { (exit 1); exit 1; }; }
1525
1526 fi
1527 echo "$as_me:1527: result: $ac_cv_build" >&5
1528 echo "${ECHO_T}$ac_cv_build" >&6
1529 build=$ac_cv_build
1530 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1531 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1532 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1533
1534 echo "$as_me:1534: checking host system type" >&5
1535 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1536 if test "${ac_cv_host+set}" = set; then
1537   echo $ECHO_N "(cached) $ECHO_C" >&6
1538 else
1539   ac_cv_host_alias=$host_alias
1540 test -z "$ac_cv_host_alias" &&
1541   ac_cv_host_alias=$ac_cv_build_alias
1542 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1543   { { echo "$as_me:1543: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1544 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1545    { (exit 1); exit 1; }; }
1546
1547 fi
1548 echo "$as_me:1548: result: $ac_cv_host" >&5
1549 echo "${ECHO_T}$ac_cv_host" >&6
1550 host=$ac_cv_host
1551 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1552 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1553 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1554
1555 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1556         echo "$as_me:1556: checking target system type" >&5
1557 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1558 if test "${ac_cv_target+set}" = set; then
1559   echo $ECHO_N "(cached) $ECHO_C" >&6
1560 else
1561   ac_cv_target_alias=$target_alias
1562 test "x$ac_cv_target_alias" = "x" &&
1563   ac_cv_target_alias=$ac_cv_host_alias
1564 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1565   { { echo "$as_me:1565: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1566 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1567    { (exit 1); exit 1; }; }
1568
1569 fi
1570 echo "$as_me:1570: result: $ac_cv_target" >&5
1571 echo "${ECHO_T}$ac_cv_target" >&6
1572 target=$ac_cv_target
1573 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1574 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1575 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1576
1577 # The aliases save the names the user supplied, while $host etc.
1578 # will get canonicalized.
1579 test -n "$target_alias" &&
1580   test "$program_prefix$program_suffix$program_transform_name" = \
1581     NONENONEs,x,x, &&
1582   program_prefix=${target_alias}-
1583         system_name="$host_os"
1584 else
1585         system_name="`(uname -s -r) 2>/dev/null`"
1586         if test -z "$system_name" ; then
1587                 system_name="`(hostname) 2>/dev/null`"
1588         fi
1589 fi
1590 test -n "$system_name" &&
1591 cat >>confdefs.h <<EOF
1592 #define SYSTEM_NAME "$system_name"
1593 EOF
1594
1595 if test "${cf_cv_system_name+set}" = set; then
1596   echo $ECHO_N "(cached) $ECHO_C" >&6
1597 else
1598   cf_cv_system_name="$system_name"
1599 fi
1600
1601 test -z "$system_name" && system_name="$cf_cv_system_name"
1602 test -n "$cf_cv_system_name" && echo "$as_me:1602: result: Configuring for $cf_cv_system_name" >&5
1603 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1604
1605 if test ".$system_name" != ".$cf_cv_system_name" ; then
1606         echo "$as_me:1606: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1607 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1608         { { echo "$as_me:1608: error: \"Please remove config.cache and try again.\"" >&5
1609 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1610    { (exit 1); exit 1; }; }
1611 fi
1612
1613 # Check whether --with-system-type or --without-system-type was given.
1614 if test "${with_system_type+set}" = set; then
1615   withval="$with_system_type"
1616   { echo "$as_me:1616: WARNING: overriding system type to $withval" >&5
1617 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1618         cf_cv_system_name=$withval
1619         host_os=$withval
1620
1621 fi;
1622
1623 ###     Save the given $CFLAGS to allow user-override.
1624 cf_user_CFLAGS="$CFLAGS"
1625
1626 ###     Default install-location
1627 echo "$as_me:1627: checking for fgrep" >&5
1628 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1629 if test "${ac_cv_path_FGREP+set}" = set; then
1630   echo $ECHO_N "(cached) $ECHO_C" >&6
1631 else
1632   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1633    then ac_cv_path_FGREP="$GREP -F"
1634    else
1635      for ac_prog in gfgrep fgrep
1636 do
1637   # Extract the first word of "$ac_prog", so it can be a program name with args.
1638 set dummy $ac_prog; ac_word=$2
1639 echo "$as_me:1639: checking for $ac_word" >&5
1640 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1641 if test "${ac_cv_path_FGREP+set}" = set; then
1642   echo $ECHO_N "(cached) $ECHO_C" >&6
1643 else
1644   case $FGREP in
1645   [\\/]* | ?:[\\/]*)
1646   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1647   ;;
1648   *)
1649   ac_save_IFS=$IFS; IFS=$ac_path_separator
1650 ac_dummy="$PATH"
1651 for ac_dir in $ac_dummy; do
1652   IFS=$ac_save_IFS
1653   test -z "$ac_dir" && ac_dir=.
1654   if $as_executable_p "$ac_dir/$ac_word"; then
1655    ac_cv_path_FGREP="$ac_dir/$ac_word"
1656    echo "$as_me:1656: found $ac_dir/$ac_word" >&5
1657    break
1658 fi
1659 done
1660
1661   ;;
1662 esac
1663 fi
1664 FGREP=$ac_cv_path_FGREP
1665
1666 if test -n "$FGREP"; then
1667   echo "$as_me:1667: result: $FGREP" >&5
1668 echo "${ECHO_T}$FGREP" >&6
1669 else
1670   echo "$as_me:1670: result: no" >&5
1671 echo "${ECHO_T}no" >&6
1672 fi
1673
1674   test -n "$FGREP" && break
1675 done
1676 test -n "$FGREP" || FGREP=": "
1677
1678      test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1678: error: cannot find workable fgrep" >&5
1679 echo "$as_me: error: cannot find workable fgrep" >&2;}
1680    { (exit 1); exit 1; }; }
1681    fi
1682 fi
1683 echo "$as_me:1683: result: $ac_cv_path_FGREP" >&5
1684 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1685  FGREP="$ac_cv_path_FGREP"
1686
1687 echo "$as_me:1687: checking for prefix" >&5
1688 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1689 if test "x$prefix" = "xNONE" ; then
1690         case "$cf_cv_system_name" in
1691                 # non-vendor systems don't have a conflict
1692         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1693                 prefix=/usr
1694                 ;;
1695         (*)     prefix=$ac_default_prefix
1696                 ;;
1697         esac
1698 fi
1699 echo "$as_me:1699: result: $prefix" >&5
1700 echo "${ECHO_T}$prefix" >&6
1701
1702 if test "x$prefix" = "xNONE" ; then
1703 echo "$as_me:1703: checking for default include-directory" >&5
1704 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1705 test -n "$verbose" && echo 1>&6
1706 for cf_symbol in \
1707         "$includedir" \
1708         "$includedir/ncurses" \
1709         "$prefix/include" \
1710         "$prefix/include/ncurses" \
1711         /usr/local/include \
1712         /usr/local/include/ncurses \
1713         /usr/include \
1714         /usr/include/ncurses
1715 do
1716         cf_dir=`eval echo "$cf_symbol"`
1717         if test -f "$cf_dir/curses.h" ; then
1718         if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1719                 includedir="$cf_symbol"
1720                 test -n "$verbose"  && echo $ECHO_N "   found " 1>&6
1721                 break
1722         fi
1723         fi
1724         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1725 done
1726 echo "$as_me:1726: result: $includedir" >&5
1727 echo "${ECHO_T}$includedir" >&6
1728 fi
1729
1730 ### Defaults for ncurses ABI
1731
1732 # ABI 5 defaults:
1733 cf_dft_ccharw_max=5
1734 cf_dft_chtype=auto
1735 cf_dft_ext_colors=no
1736 cf_dft_ext_const=no
1737 cf_dft_ext_mouse=no
1738 cf_dft_ext_putwin=no
1739 cf_dft_ext_spfuncs=no
1740 cf_dft_filter_syms=no
1741 cf_dft_interop=no
1742 cf_dft_mmask_t=auto
1743 cf_dft_opaque_curses=no
1744 cf_dft_ordinate_type=short
1745 cf_dft_signed_char=no
1746 cf_dft_tparm_arg=long
1747 cf_dft_widec=no
1748 cf_dft_with_lp64=no
1749
1750 # ABI 6 default differences from ABI 5:
1751 case x$cf_cv_abi_default in
1752 (x[6789])
1753         cf_dft_chtype=uint32_t
1754         cf_dft_ext_colors=yes
1755         cf_dft_ext_const=yes
1756         cf_dft_ext_mouse=yes
1757         cf_dft_ext_putwin=yes
1758         cf_dft_ext_spfuncs=yes
1759         cf_dft_filter_syms=yes
1760         cf_dft_interop=yes
1761         cf_dft_mmask_t=uint32_t
1762         cf_dft_opaque_curses=yes
1763         cf_dft_tparm_arg=intptr_t
1764         cf_dft_widec=yes
1765         cf_dft_with_lp64=yes
1766         ;;
1767 esac
1768
1769 # ABI 7 default differences from ABI 6:
1770 case x$cf_cv_abi_default in
1771 (x[789])
1772         cf_dft_ccharw_max=6
1773         cf_dft_mmask_t=uint64_t
1774         cf_dft_ordinate_type=int
1775         cf_dft_signed_char=yes
1776         # also: remove the wgetch-events feature in ABI 7
1777         ;;
1778 esac
1779
1780 ### override ABI version, e.g., packagers
1781
1782 # Check whether --with-abi-altered or --without-abi-altered was given.
1783 if test "${with_abi_altered+set}" = set; then
1784   withval="$with_abi_altered"
1785
1786 if test -n "$withval" ; then
1787   case `echo "$withval" | sed -e 's/^[0-9]*$/0/g'` in
1788   (0)
1789         ;;
1790   (*)
1791         { { echo "$as_me:1791: error: ABI altered is not a number: $withval" >&5
1792 echo "$as_me: error: ABI altered is not a number: $withval" >&2;}
1793    { (exit 1); exit 1; }; }
1794         ;;
1795   esac
1796 else
1797   { { echo "$as_me:1797: error: ABI altered value is empty" >&5
1798 echo "$as_me: error: ABI altered value is empty" >&2;}
1799    { (exit 1); exit 1; }; }
1800 fi
1801
1802         if test "$cf_cv_abi_version" != "$withval"
1803         then
1804                 { echo "$as_me:1804: WARNING: altering visible ABI from $cf_cv_abi_version to $withval" >&5
1805 echo "$as_me: WARNING: altering visible ABI from $cf_cv_abi_version to $withval" >&2;}
1806                 cf_cv_abi_version=$withval
1807         fi
1808
1809 fi;
1810
1811 ###     Checks for programs.
1812
1813 # Check whether --with-ada or --without-ada was given.
1814 if test "${with_ada+set}" = set; then
1815   withval="$with_ada"
1816   cf_with_ada=$withval
1817 else
1818   cf_with_ada=yes
1819 fi;
1820
1821 if test "x$cf_with_ada" = xyes
1822 then
1823         cf_prog_cc="gnatgcc gcc cc"
1824 else
1825         cf_prog_cc="gcc cc"
1826 fi
1827
1828 ac_ext=c
1829 ac_cpp='$CPP $CPPFLAGS'
1830 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1831 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1832 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1833 ac_main_return="return"
1834 if test -n "$ac_tool_prefix"; then
1835   for ac_prog in $cf_prog_cc
1836   do
1837     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1838 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1839 echo "$as_me:1839: checking for $ac_word" >&5
1840 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1841 if test "${ac_cv_prog_CC+set}" = set; then
1842   echo $ECHO_N "(cached) $ECHO_C" >&6
1843 else
1844   if test -n "$CC"; then
1845   ac_cv_prog_CC="$CC" # Let the user override the test.
1846 else
1847   ac_save_IFS=$IFS; IFS=$ac_path_separator
1848 ac_dummy="$PATH"
1849 for ac_dir in $ac_dummy; do
1850   IFS=$ac_save_IFS
1851   test -z "$ac_dir" && ac_dir=.
1852   $as_executable_p "$ac_dir/$ac_word" || continue
1853 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1854 echo "$as_me:1854: found $ac_dir/$ac_word" >&5
1855 break
1856 done
1857
1858 fi
1859 fi
1860 CC=$ac_cv_prog_CC
1861 if test -n "$CC"; then
1862   echo "$as_me:1862: result: $CC" >&5
1863 echo "${ECHO_T}$CC" >&6
1864 else
1865   echo "$as_me:1865: result: no" >&5
1866 echo "${ECHO_T}no" >&6
1867 fi
1868
1869     test -n "$CC" && break
1870   done
1871 fi
1872 if test -z "$CC"; then
1873   ac_ct_CC=$CC
1874   for ac_prog in $cf_prog_cc
1875 do
1876   # Extract the first word of "$ac_prog", so it can be a program name with args.
1877 set dummy $ac_prog; ac_word=$2
1878 echo "$as_me:1878: checking for $ac_word" >&5
1879 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1880 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1881   echo $ECHO_N "(cached) $ECHO_C" >&6
1882 else
1883   if test -n "$ac_ct_CC"; then
1884   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1885 else
1886   ac_save_IFS=$IFS; IFS=$ac_path_separator
1887 ac_dummy="$PATH"
1888 for ac_dir in $ac_dummy; do
1889   IFS=$ac_save_IFS
1890   test -z "$ac_dir" && ac_dir=.
1891   $as_executable_p "$ac_dir/$ac_word" || continue
1892 ac_cv_prog_ac_ct_CC="$ac_prog"
1893 echo "$as_me:1893: found $ac_dir/$ac_word" >&5
1894 break
1895 done
1896
1897 fi
1898 fi
1899 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1900 if test -n "$ac_ct_CC"; then
1901   echo "$as_me:1901: result: $ac_ct_CC" >&5
1902 echo "${ECHO_T}$ac_ct_CC" >&6
1903 else
1904   echo "$as_me:1904: result: no" >&5
1905 echo "${ECHO_T}no" >&6
1906 fi
1907
1908   test -n "$ac_ct_CC" && break
1909 done
1910
1911   CC=$ac_ct_CC
1912 fi
1913
1914 test -z "$CC" && { { echo "$as_me:1914: error: no acceptable cc found in \$PATH" >&5
1915 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1916    { (exit 1); exit 1; }; }
1917
1918 # Provide some information about the compiler.
1919 echo "$as_me:1919:" \
1920      "checking for C compiler version" >&5
1921 ac_compiler=`set X $ac_compile; echo "$2"`
1922 { (eval echo "$as_me:1922: \"$ac_compiler --version </dev/null >&5\"") >&5
1923   (eval $ac_compiler --version </dev/null >&5) 2>&5
1924   ac_status=$?
1925   echo "$as_me:1925: \$? = $ac_status" >&5
1926   (exit "$ac_status"); }
1927 { (eval echo "$as_me:1927: \"$ac_compiler -v </dev/null >&5\"") >&5
1928   (eval $ac_compiler -v </dev/null >&5) 2>&5
1929   ac_status=$?
1930   echo "$as_me:1930: \$? = $ac_status" >&5
1931   (exit "$ac_status"); }
1932 { (eval echo "$as_me:1932: \"$ac_compiler -V </dev/null >&5\"") >&5
1933   (eval $ac_compiler -V </dev/null >&5) 2>&5
1934   ac_status=$?
1935   echo "$as_me:1935: \$? = $ac_status" >&5
1936   (exit "$ac_status"); }
1937
1938 cat >"conftest.$ac_ext" <<_ACEOF
1939 #line 1939 "configure"
1940 #include "confdefs.h"
1941
1942 int
1943 main (void)
1944 {
1945
1946   ;
1947   return 0;
1948 }
1949 _ACEOF
1950 ac_clean_files_save=$ac_clean_files
1951 ac_clean_files="$ac_clean_files a.out a.exe"
1952 # Try to create an executable without -o first, disregard a.out.
1953 # It will help us diagnose broken compilers, and finding out an intuition
1954 # of exeext.
1955 echo "$as_me:1955: checking for C compiler default output" >&5
1956 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1957 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1958 if { (eval echo "$as_me:1958: \"$ac_link_default\"") >&5
1959   (eval $ac_link_default) 2>&5
1960   ac_status=$?
1961   echo "$as_me:1961: \$? = $ac_status" >&5
1962   (exit "$ac_status"); }; then
1963   # Find the output, starting from the most likely.  This scheme is
1964 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1965 # resort.
1966 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1967                 ls a.out conftest 2>/dev/null;
1968                 ls a.* conftest.* 2>/dev/null`; do
1969   case $ac_file in
1970     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1971     a.out ) # We found the default executable, but exeext='' is most
1972             # certainly right.
1973             break;;
1974     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1975           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1976           export ac_cv_exeext
1977           break;;
1978     * ) break;;
1979   esac
1980 done
1981 else
1982   echo "$as_me: failed program was:" >&5
1983 cat "conftest.$ac_ext" >&5
1984 { { echo "$as_me:1984: error: C compiler cannot create executables" >&5
1985 echo "$as_me: error: C compiler cannot create executables" >&2;}
1986    { (exit 77); exit 77; }; }
1987 fi
1988
1989 ac_exeext=$ac_cv_exeext
1990 echo "$as_me:1990: result: $ac_file" >&5
1991 echo "${ECHO_T}$ac_file" >&6
1992
1993 # Check the compiler produces executables we can run.  If not, either
1994 # the compiler is broken, or we cross compile.
1995 echo "$as_me:1995: checking whether the C compiler works" >&5
1996 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1997 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1998 # If not cross compiling, check that we can run a simple program.
1999 if test "$cross_compiling" != yes; then
2000   if { ac_try='./$ac_file'
2001   { (eval echo "$as_me:2001: \"$ac_try\"") >&5
2002   (eval $ac_try) 2>&5
2003   ac_status=$?
2004   echo "$as_me:2004: \$? = $ac_status" >&5
2005   (exit "$ac_status"); }; }; then
2006     cross_compiling=no
2007   else
2008     if test "$cross_compiling" = maybe; then
2009         cross_compiling=yes
2010     else
2011         { { echo "$as_me:2011: error: cannot run C compiled programs.
2012 If you meant to cross compile, use \`--host'." >&5
2013 echo "$as_me: error: cannot run C compiled programs.
2014 If you meant to cross compile, use \`--host'." >&2;}
2015    { (exit 1); exit 1; }; }
2016     fi
2017   fi
2018 fi
2019 echo "$as_me:2019: result: yes" >&5
2020 echo "${ECHO_T}yes" >&6
2021
2022 rm -f a.out a.exe "conftest$ac_cv_exeext"
2023 ac_clean_files=$ac_clean_files_save
2024 # Check the compiler produces executables we can run.  If not, either
2025 # the compiler is broken, or we cross compile.
2026 echo "$as_me:2026: checking whether we are cross compiling" >&5
2027 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2028 echo "$as_me:2028: result: $cross_compiling" >&5
2029 echo "${ECHO_T}$cross_compiling" >&6
2030
2031 echo "$as_me:2031: checking for executable suffix" >&5
2032 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
2033 if { (eval echo "$as_me:2033: \"$ac_link\"") >&5
2034   (eval $ac_link) 2>&5
2035   ac_status=$?
2036   echo "$as_me:2036: \$? = $ac_status" >&5
2037   (exit "$ac_status"); }; then
2038   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2039 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2040 # work properly (i.e., refer to `conftest.exe'), while it won't with
2041 # `rm'.
2042 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2043   case $ac_file in
2044     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2045     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2046           export ac_cv_exeext
2047           break;;
2048     * ) break;;
2049   esac
2050 done
2051 else
2052   { { echo "$as_me:2052: error: cannot compute EXEEXT: cannot compile and link" >&5
2053 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
2054    { (exit 1); exit 1; }; }
2055 fi
2056
2057 rm -f "conftest$ac_cv_exeext"
2058 echo "$as_me:2058: result: $ac_cv_exeext" >&5
2059 echo "${ECHO_T}$ac_cv_exeext" >&6
2060
2061 rm -f "conftest.$ac_ext"
2062 EXEEXT=$ac_cv_exeext
2063 ac_exeext=$EXEEXT
2064 echo "$as_me:2064: checking for object suffix" >&5
2065 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2066 if test "${ac_cv_objext+set}" = set; then
2067   echo $ECHO_N "(cached) $ECHO_C" >&6
2068 else
2069   cat >"conftest.$ac_ext" <<_ACEOF
2070 #line 2070 "configure"
2071 #include "confdefs.h"
2072
2073 int
2074 main (void)
2075 {
2076
2077   ;
2078   return 0;
2079 }
2080 _ACEOF
2081 rm -f conftest.o conftest.obj
2082 if { (eval echo "$as_me:2082: \"$ac_compile\"") >&5
2083   (eval $ac_compile) 2>&5
2084   ac_status=$?
2085   echo "$as_me:2085: \$? = $ac_status" >&5
2086   (exit "$ac_status"); }; then
2087   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2088   case $ac_file in
2089     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
2090     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2091        break;;
2092   esac
2093 done
2094 else
2095   echo "$as_me: failed program was:" >&5
2096 cat "conftest.$ac_ext" >&5
2097 { { echo "$as_me:2097: error: cannot compute OBJEXT: cannot compile" >&5
2098 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2099    { (exit 1); exit 1; }; }
2100 fi
2101
2102 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
2103 fi
2104 echo "$as_me:2104: result: $ac_cv_objext" >&5
2105 echo "${ECHO_T}$ac_cv_objext" >&6
2106 OBJEXT=$ac_cv_objext
2107 ac_objext=$OBJEXT
2108 echo "$as_me:2108: checking whether we are using the GNU C compiler" >&5
2109 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2110 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2111   echo $ECHO_N "(cached) $ECHO_C" >&6
2112 else
2113   cat >"conftest.$ac_ext" <<_ACEOF
2114 #line 2114 "configure"
2115 #include "confdefs.h"
2116
2117 int
2118 main (void)
2119 {
2120 #ifndef __GNUC__
2121        choke me
2122 #endif
2123
2124   ;
2125   return 0;
2126 }
2127 _ACEOF
2128 rm -f "conftest.$ac_objext"
2129 if { (eval echo "$as_me:2129: \"$ac_compile\"") >&5
2130   (eval $ac_compile) 2>&5
2131   ac_status=$?
2132   echo "$as_me:2132: \$? = $ac_status" >&5
2133   (exit "$ac_status"); } &&
2134          { ac_try='test -s "conftest.$ac_objext"'
2135   { (eval echo "$as_me:2135: \"$ac_try\"") >&5
2136   (eval $ac_try) 2>&5
2137   ac_status=$?
2138   echo "$as_me:2138: \$? = $ac_status" >&5
2139   (exit "$ac_status"); }; }; then
2140   ac_compiler_gnu=yes
2141 else
2142   echo "$as_me: failed program was:" >&5
2143 cat "conftest.$ac_ext" >&5
2144 ac_compiler_gnu=no
2145 fi
2146 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2147 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2148
2149 fi
2150 echo "$as_me:2150: result: $ac_cv_c_compiler_gnu" >&5
2151 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2152 GCC=`test $ac_compiler_gnu = yes && echo yes`
2153 ac_test_CFLAGS=${CFLAGS+set}
2154 ac_save_CFLAGS=$CFLAGS
2155 CFLAGS="-g"
2156 echo "$as_me:2156: checking whether $CC accepts -g" >&5
2157 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2158 if test "${ac_cv_prog_cc_g+set}" = set; then
2159   echo $ECHO_N "(cached) $ECHO_C" >&6
2160 else
2161   cat >"conftest.$ac_ext" <<_ACEOF
2162 #line 2162 "configure"
2163 #include "confdefs.h"
2164
2165 int
2166 main (void)
2167 {
2168
2169   ;
2170   return 0;
2171 }
2172 _ACEOF
2173 rm -f "conftest.$ac_objext"
2174 if { (eval echo "$as_me:2174: \"$ac_compile\"") >&5
2175   (eval $ac_compile) 2>&5
2176   ac_status=$?
2177   echo "$as_me:2177: \$? = $ac_status" >&5
2178   (exit "$ac_status"); } &&
2179          { ac_try='test -s "conftest.$ac_objext"'
2180   { (eval echo "$as_me:2180: \"$ac_try\"") >&5
2181   (eval $ac_try) 2>&5
2182   ac_status=$?
2183   echo "$as_me:2183: \$? = $ac_status" >&5
2184   (exit "$ac_status"); }; }; then
2185   ac_cv_prog_cc_g=yes
2186 else
2187   echo "$as_me: failed program was:" >&5
2188 cat "conftest.$ac_ext" >&5
2189 ac_cv_prog_cc_g=no
2190 fi
2191 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2192 fi
2193 echo "$as_me:2193: result: $ac_cv_prog_cc_g" >&5
2194 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2195 if test "$ac_test_CFLAGS" = set; then
2196   CFLAGS=$ac_save_CFLAGS
2197 elif test $ac_cv_prog_cc_g = yes; then
2198   if test "$GCC" = yes; then
2199     CFLAGS="-g -O2"
2200   else
2201     CFLAGS="-g"
2202   fi
2203 else
2204   if test "$GCC" = yes; then
2205     CFLAGS="-O2"
2206   else
2207     CFLAGS=
2208   fi
2209 fi
2210 # Some people use a C++ compiler to compile C.  Since we use `exit',
2211 # in C++ we need to declare it.  In case someone uses the same compiler
2212 # for both compiling C and C++ we need to have the C++ compiler decide
2213 # the declaration of exit, since it's the most demanding environment.
2214 cat >"conftest.$ac_ext" <<_ACEOF
2215 #ifndef __cplusplus
2216   choke me
2217 #endif
2218 _ACEOF
2219 rm -f "conftest.$ac_objext"
2220 if { (eval echo "$as_me:2220: \"$ac_compile\"") >&5
2221   (eval $ac_compile) 2>&5
2222   ac_status=$?
2223   echo "$as_me:2223: \$? = $ac_status" >&5
2224   (exit "$ac_status"); } &&
2225          { ac_try='test -s "conftest.$ac_objext"'
2226   { (eval echo "$as_me:2226: \"$ac_try\"") >&5
2227   (eval $ac_try) 2>&5
2228   ac_status=$?
2229   echo "$as_me:2229: \$? = $ac_status" >&5
2230   (exit "$ac_status"); }; }; then
2231   for ac_declaration in \
2232    ''\
2233    '#include <stdlib.h>' \
2234    'extern "C" void std::exit (int) throw (); using std::exit;' \
2235    'extern "C" void std::exit (int); using std::exit;' \
2236    'extern "C" void exit (int) throw ();' \
2237    'extern "C" void exit (int);' \
2238    'void exit (int);'
2239 do
2240   cat >"conftest.$ac_ext" <<_ACEOF
2241 #line 2241 "configure"
2242 #include "confdefs.h"
2243 #include <stdlib.h>
2244 $ac_declaration
2245 int
2246 main (void)
2247 {
2248 exit (42);
2249   ;
2250   return 0;
2251 }
2252 _ACEOF
2253 rm -f "conftest.$ac_objext"
2254 if { (eval echo "$as_me:2254: \"$ac_compile\"") >&5
2255   (eval $ac_compile) 2>&5
2256   ac_status=$?
2257   echo "$as_me:2257: \$? = $ac_status" >&5
2258   (exit "$ac_status"); } &&
2259          { ac_try='test -s "conftest.$ac_objext"'
2260   { (eval echo "$as_me:2260: \"$ac_try\"") >&5
2261   (eval $ac_try) 2>&5
2262   ac_status=$?
2263   echo "$as_me:2263: \$? = $ac_status" >&5
2264   (exit "$ac_status"); }; }; then
2265   :
2266 else
2267   echo "$as_me: failed program was:" >&5
2268 cat "conftest.$ac_ext" >&5
2269 continue
2270 fi
2271 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2272   cat >"conftest.$ac_ext" <<_ACEOF
2273 #line 2273 "configure"
2274 #include "confdefs.h"
2275 $ac_declaration
2276 int
2277 main (void)
2278 {
2279 exit (42);
2280   ;
2281   return 0;
2282 }
2283 _ACEOF
2284 rm -f "conftest.$ac_objext"
2285 if { (eval echo "$as_me:2285: \"$ac_compile\"") >&5
2286   (eval $ac_compile) 2>&5
2287   ac_status=$?
2288   echo "$as_me:2288: \$? = $ac_status" >&5
2289   (exit "$ac_status"); } &&
2290          { ac_try='test -s "conftest.$ac_objext"'
2291   { (eval echo "$as_me:2291: \"$ac_try\"") >&5
2292   (eval $ac_try) 2>&5
2293   ac_status=$?
2294   echo "$as_me:2294: \$? = $ac_status" >&5
2295   (exit "$ac_status"); }; }; then
2296   break
2297 else
2298   echo "$as_me: failed program was:" >&5
2299 cat "conftest.$ac_ext" >&5
2300 fi
2301 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2302 done
2303 rm -rf conftest*
2304 if test -n "$ac_declaration"; then
2305   echo '#ifdef __cplusplus' >>confdefs.h
2306   echo "$ac_declaration"    >>confdefs.h
2307   echo '#endif'             >>confdefs.h
2308 fi
2309
2310 else
2311   echo "$as_me: failed program was:" >&5
2312 cat "conftest.$ac_ext" >&5
2313 fi
2314 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2315 ac_ext=c
2316 ac_cpp='$CPP $CPPFLAGS'
2317 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2318 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2319 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2320 ac_main_return="return"
2321
2322 GCC_VERSION=none
2323 if test "$GCC" = yes ; then
2324         echo "$as_me:2324: checking version of $CC" >&5
2325 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2326         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2327         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2328         echo "$as_me:2328: result: $GCC_VERSION" >&5
2329 echo "${ECHO_T}$GCC_VERSION" >&6
2330 fi
2331
2332 INTEL_COMPILER=no
2333
2334 if test "$GCC" = yes ; then
2335         case "$host_os" in
2336         (linux*|gnu*)
2337                 echo "$as_me:2337: checking if this is really Intel C compiler" >&5
2338 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2339                 cf_save_CFLAGS="$CFLAGS"
2340                 CFLAGS="$CFLAGS -no-gcc"
2341                 cat >"conftest.$ac_ext" <<_ACEOF
2342 #line 2342 "configure"
2343 #include "confdefs.h"
2344
2345 int
2346 main (void)
2347 {
2348
2349 #ifdef __INTEL_COMPILER
2350 #else
2351 #error __INTEL_COMPILER is not defined
2352 #endif
2353
2354   ;
2355   return 0;
2356 }
2357 _ACEOF
2358 rm -f "conftest.$ac_objext"
2359 if { (eval echo "$as_me:2359: \"$ac_compile\"") >&5
2360   (eval $ac_compile) 2>&5
2361   ac_status=$?
2362   echo "$as_me:2362: \$? = $ac_status" >&5
2363   (exit "$ac_status"); } &&
2364          { ac_try='test -s "conftest.$ac_objext"'
2365   { (eval echo "$as_me:2365: \"$ac_try\"") >&5
2366   (eval $ac_try) 2>&5
2367   ac_status=$?
2368   echo "$as_me:2368: \$? = $ac_status" >&5
2369   (exit "$ac_status"); }; }; then
2370   INTEL_COMPILER=yes
2371 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2372
2373 else
2374   echo "$as_me: failed program was:" >&5
2375 cat "conftest.$ac_ext" >&5
2376 fi
2377 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2378                 CFLAGS="$cf_save_CFLAGS"
2379                 echo "$as_me:2379: result: $INTEL_COMPILER" >&5
2380 echo "${ECHO_T}$INTEL_COMPILER" >&6
2381                 ;;
2382         esac
2383 fi
2384
2385 CLANG_COMPILER=no
2386
2387 if test "$GCC" = yes ; then
2388         echo "$as_me:2388: checking if this is really Clang C compiler" >&5
2389 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2390         cf_save_CFLAGS="$CFLAGS"
2391         cat >"conftest.$ac_ext" <<_ACEOF
2392 #line 2392 "configure"
2393 #include "confdefs.h"
2394
2395 int
2396 main (void)
2397 {
2398
2399 #ifdef __clang__
2400 #else
2401 #error __clang__ is not defined
2402 #endif
2403
2404   ;
2405   return 0;
2406 }
2407 _ACEOF
2408 rm -f "conftest.$ac_objext"
2409 if { (eval echo "$as_me:2409: \"$ac_compile\"") >&5
2410   (eval $ac_compile) 2>&5
2411   ac_status=$?
2412   echo "$as_me:2412: \$? = $ac_status" >&5
2413   (exit "$ac_status"); } &&
2414          { ac_try='test -s "conftest.$ac_objext"'
2415   { (eval echo "$as_me:2415: \"$ac_try\"") >&5
2416   (eval $ac_try) 2>&5
2417   ac_status=$?
2418   echo "$as_me:2418: \$? = $ac_status" >&5
2419   (exit "$ac_status"); }; }; then
2420   CLANG_COMPILER=yes
2421
2422 else
2423   echo "$as_me: failed program was:" >&5
2424 cat "conftest.$ac_ext" >&5
2425 fi
2426 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2427         CFLAGS="$cf_save_CFLAGS"
2428         echo "$as_me:2428: result: $CLANG_COMPILER" >&5
2429 echo "${ECHO_T}$CLANG_COMPILER" >&6
2430 fi
2431
2432 CLANG_VERSION=none
2433
2434 if test "x$CLANG_COMPILER" = "xyes" ; then
2435         case "$CC" in
2436         (c[1-9][0-9]|*/c[1-9][0-9])
2437                 { echo "$as_me:2437: WARNING: replacing broken compiler alias $CC" >&5
2438 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2439                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2440                 CC=clang
2441                 ;;
2442         esac
2443
2444         echo "$as_me:2444: checking version of $CC" >&5
2445 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2446         CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2447         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2448         echo "$as_me:2448: result: $CLANG_VERSION" >&5
2449 echo "${ECHO_T}$CLANG_VERSION" >&6
2450
2451         for cf_clang_opt in \
2452                 -Qunused-arguments \
2453                 -Wno-error=implicit-function-declaration
2454         do
2455                 echo "$as_me:2455: checking if option $cf_clang_opt works" >&5
2456 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2457                 cf_save_CFLAGS="$CFLAGS"
2458                 CFLAGS="$CFLAGS $cf_clang_opt"
2459                 cat >"conftest.$ac_ext" <<_ACEOF
2460 #line 2460 "configure"
2461 #include "confdefs.h"
2462
2463                         #include <stdio.h>
2464 int
2465 main (void)
2466 {
2467
2468                         printf("hello!\\n");
2469   ;
2470   return 0;
2471 }
2472 _ACEOF
2473 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2474 if { (eval echo "$as_me:2474: \"$ac_link\"") >&5
2475   (eval $ac_link) 2>&5
2476   ac_status=$?
2477   echo "$as_me:2477: \$? = $ac_status" >&5
2478   (exit "$ac_status"); } &&
2479          { ac_try='test -s "conftest$ac_exeext"'
2480   { (eval echo "$as_me:2480: \"$ac_try\"") >&5
2481   (eval $ac_try) 2>&5
2482   ac_status=$?
2483   echo "$as_me:2483: \$? = $ac_status" >&5
2484   (exit "$ac_status"); }; }; then
2485
2486                         cf_clang_optok=yes
2487 else
2488   echo "$as_me: failed program was:" >&5
2489 cat "conftest.$ac_ext" >&5
2490
2491                         cf_clang_optok=no
2492 fi
2493 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2494                 echo "$as_me:2494: result: $cf_clang_optok" >&5
2495 echo "${ECHO_T}$cf_clang_optok" >&6
2496                 CFLAGS="$cf_save_CFLAGS"
2497                 if test "$cf_clang_optok" = yes; then
2498                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2499
2500 echo "${as_me:-configure}:2500: testing adding option $cf_clang_opt ..." 1>&5
2501
2502         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2503         CFLAGS="${CFLAGS}$cf_clang_opt"
2504
2505                 fi
2506         done
2507 fi
2508
2509 echo "$as_me:2509: checking for $CC option to accept ANSI C" >&5
2510 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2511 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2512   echo $ECHO_N "(cached) $ECHO_C" >&6
2513 else
2514   ac_cv_prog_cc_stdc=no
2515 ac_save_CC=$CC
2516 cat >"conftest.$ac_ext" <<_ACEOF
2517 #line 2517 "configure"
2518 #include "confdefs.h"
2519 #include <stdarg.h>
2520 #include <stdio.h>
2521 #include <sys/types.h>
2522 #include <sys/stat.h>
2523 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2524 struct buf { int x; };
2525 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2526 static char *e (char **p, int i)
2527 {
2528   return p[i];
2529 }
2530 static char *f (char * (*g) (char **, int), char **p, ...)
2531 {
2532   char *s;
2533   va_list v;
2534   va_start (v,p);
2535   s = g (p, va_arg (v,int));
2536   va_end (v);
2537   return s;
2538 }
2539 int test (int i, double x);
2540 struct s1 {int (*f) (int a);};
2541 struct s2 {int (*f) (double a);};
2542 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2543 int argc;
2544 char **argv;
2545 int
2546 main (void)
2547 {
2548 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2549   ;
2550   return 0;
2551 }
2552 _ACEOF
2553 # Don't try gcc -ansi; that turns off useful extensions and
2554 # breaks some systems' header files.
2555 # AIX                   -qlanglvl=ansi
2556 # Ultrix and OSF/1      -std1
2557 # HP-UX 10.20 and later -Ae
2558 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2559 # SVR4                  -Xc -D__EXTENSIONS__
2560 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2561 do
2562   CC="$ac_save_CC $ac_arg"
2563   rm -f "conftest.$ac_objext"
2564 if { (eval echo "$as_me:2564: \"$ac_compile\"") >&5
2565   (eval $ac_compile) 2>&5
2566   ac_status=$?
2567   echo "$as_me:2567: \$? = $ac_status" >&5
2568   (exit "$ac_status"); } &&
2569          { ac_try='test -s "conftest.$ac_objext"'
2570   { (eval echo "$as_me:2570: \"$ac_try\"") >&5
2571   (eval $ac_try) 2>&5
2572   ac_status=$?
2573   echo "$as_me:2573: \$? = $ac_status" >&5
2574   (exit "$ac_status"); }; }; then
2575   ac_cv_prog_cc_stdc=$ac_arg
2576 break
2577 else
2578   echo "$as_me: failed program was:" >&5
2579 cat "conftest.$ac_ext" >&5
2580 fi
2581 rm -f "conftest.$ac_objext"
2582 done
2583 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2584 CC=$ac_save_CC
2585
2586 fi
2587
2588 case "x$ac_cv_prog_cc_stdc" in
2589   x|xno)
2590     echo "$as_me:2590: result: none needed" >&5
2591 echo "${ECHO_T}none needed" >&6 ;;
2592   *)
2593     echo "$as_me:2593: result: $ac_cv_prog_cc_stdc" >&5
2594 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2595     CC="$CC $ac_cv_prog_cc_stdc" ;;
2596 esac
2597
2598 # This should have been defined by AC_PROG_CC
2599 : "${CC:=cc}"
2600
2601 echo "$as_me:2601: checking \$CFLAGS variable" >&5
2602 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2603 case "x$CFLAGS" in
2604 (*-[IUD]*)
2605         echo "$as_me:2605: result: broken" >&5
2606 echo "${ECHO_T}broken" >&6
2607         { echo "$as_me:2607: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2608 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2609         cf_flags="$CFLAGS"
2610         CFLAGS=
2611         for cf_arg in $cf_flags
2612         do
2613
2614 cf_fix_cppflags=no
2615 cf_new_cflags=
2616 cf_new_cppflags=
2617 cf_new_extra_cppflags=
2618
2619 for cf_add_cflags in $cf_arg
2620 do
2621 case "$cf_fix_cppflags" in
2622 (no)
2623         case "$cf_add_cflags" in
2624         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2625                 case "$cf_add_cflags" in
2626                 (-D*)
2627                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2628
2629                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2630                                 && test -z "${cf_tst_cflags}" \
2631                                 && cf_fix_cppflags=yes
2632
2633                         if test "$cf_fix_cppflags" = yes ; then
2634
2635         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2636         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2637
2638                                 continue
2639                         elif test "${cf_tst_cflags}" = "\"'" ; then
2640
2641         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2642         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2643
2644                                 continue
2645                         fi
2646                         ;;
2647                 esac
2648                 case "$CPPFLAGS" in
2649                 (*$cf_add_cflags)
2650                         ;;
2651                 (*)
2652                         case "$cf_add_cflags" in
2653                         (-D*)
2654                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2655
2656 CPPFLAGS=`echo "$CPPFLAGS" | \
2657         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2658                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2659
2660                                 ;;
2661                         esac
2662
2663         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2664         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2665
2666                         ;;
2667                 esac
2668                 ;;
2669         (*)
2670
2671         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2672         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2673
2674                 ;;
2675         esac
2676         ;;
2677 (yes)
2678
2679         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2680         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2681
2682         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2683
2684         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2685                 && test -z "${cf_tst_cflags}" \
2686                 && cf_fix_cppflags=no
2687         ;;
2688 esac
2689 done
2690
2691 if test -n "$cf_new_cflags" ; then
2692
2693         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2694         CFLAGS="${CFLAGS}$cf_new_cflags"
2695
2696 fi
2697
2698 if test -n "$cf_new_cppflags" ; then
2699
2700         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2701         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2702
2703 fi
2704
2705 if test -n "$cf_new_extra_cppflags" ; then
2706
2707         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2708         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2709
2710 fi
2711
2712         done
2713         ;;
2714 (*)
2715         echo "$as_me:2715: result: ok" >&5
2716 echo "${ECHO_T}ok" >&6
2717         ;;
2718 esac
2719
2720 echo "$as_me:2720: checking \$CC variable" >&5
2721 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2722 case "$CC" in
2723 (*[\ \  ]-*)
2724         echo "$as_me:2724: result: broken" >&5
2725 echo "${ECHO_T}broken" >&6
2726         { echo "$as_me:2726: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2727 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2728         # humor him...
2729         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2730         cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"`
2731         CC="$cf_prog"
2732         for cf_arg in $cf_flags
2733         do
2734                 case "x$cf_arg" in
2735                 (x-[IUDfgOW]*)
2736
2737 cf_fix_cppflags=no
2738 cf_new_cflags=
2739 cf_new_cppflags=
2740 cf_new_extra_cppflags=
2741
2742 for cf_add_cflags in $cf_arg
2743 do
2744 case "$cf_fix_cppflags" in
2745 (no)
2746         case "$cf_add_cflags" in
2747         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2748                 case "$cf_add_cflags" in
2749                 (-D*)
2750                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2751
2752                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2753                                 && test -z "${cf_tst_cflags}" \
2754                                 && cf_fix_cppflags=yes
2755
2756                         if test "$cf_fix_cppflags" = yes ; then
2757
2758         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2759         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2760
2761                                 continue
2762                         elif test "${cf_tst_cflags}" = "\"'" ; then
2763
2764         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2765         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2766
2767                                 continue
2768                         fi
2769                         ;;
2770                 esac
2771                 case "$CPPFLAGS" in
2772                 (*$cf_add_cflags)
2773                         ;;
2774                 (*)
2775                         case "$cf_add_cflags" in
2776                         (-D*)
2777                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2778
2779 CPPFLAGS=`echo "$CPPFLAGS" | \
2780         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2781                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2782
2783                                 ;;
2784                         esac
2785
2786         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2787         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2788
2789                         ;;
2790                 esac
2791                 ;;
2792         (*)
2793
2794         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2795         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2796
2797                 ;;
2798         esac
2799         ;;
2800 (yes)
2801
2802         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2803         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2804
2805         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2806
2807         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2808                 && test -z "${cf_tst_cflags}" \
2809                 && cf_fix_cppflags=no
2810         ;;
2811 esac
2812 done
2813
2814 if test -n "$cf_new_cflags" ; then
2815
2816         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2817         CFLAGS="${CFLAGS}$cf_new_cflags"
2818
2819 fi
2820
2821 if test -n "$cf_new_cppflags" ; then
2822
2823         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2824         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2825
2826 fi
2827
2828 if test -n "$cf_new_extra_cppflags" ; then
2829
2830         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2831         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2832
2833 fi
2834
2835                         ;;
2836                 (*)
2837                         CC="$CC $cf_arg"
2838                         ;;
2839                 esac
2840         done
2841         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2842
2843 echo "${as_me:-configure}:2843: testing resulting CC: '$CC' ..." 1>&5
2844
2845         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2846
2847 echo "${as_me:-configure}:2847: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2848
2849         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2850
2851 echo "${as_me:-configure}:2851: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2852
2853         ;;
2854 (*)
2855         echo "$as_me:2855: result: ok" >&5
2856 echo "${ECHO_T}ok" >&6
2857         ;;
2858 esac
2859
2860 ac_ext=c
2861 ac_cpp='$CPP $CPPFLAGS'
2862 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2863 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2864 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2865 ac_main_return="return"
2866 echo "$as_me:2866: checking how to run the C preprocessor" >&5
2867 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2868 # On Suns, sometimes $CPP names a directory.
2869 if test -n "$CPP" && test -d "$CPP"; then
2870   CPP=
2871 fi
2872 if test -z "$CPP"; then
2873   if test "${ac_cv_prog_CPP+set}" = set; then
2874   echo $ECHO_N "(cached) $ECHO_C" >&6
2875 else
2876       # Double quotes because CPP needs to be expanded
2877     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2878     do
2879       ac_preproc_ok=false
2880 for ac_c_preproc_warn_flag in '' yes
2881 do
2882   # Use a header file that comes with gcc, so configuring glibc
2883   # with a fresh cross-compiler works.
2884   # On the NeXT, cc -E runs the code through the compiler's parser,
2885   # not just through cpp. "Syntax error" is here to catch this case.
2886   cat >"conftest.$ac_ext" <<_ACEOF
2887 #line 2887 "configure"
2888 #include "confdefs.h"
2889 #include <assert.h>
2890                      Syntax error
2891 _ACEOF
2892 if { (eval echo "$as_me:2892: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2893   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2894   ac_status=$?
2895   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2896   rm -f conftest.er1
2897   cat conftest.err >&5
2898   echo "$as_me:2898: \$? = $ac_status" >&5
2899   (exit "$ac_status"); } >/dev/null; then
2900   if test -s conftest.err; then
2901     ac_cpp_err=$ac_c_preproc_warn_flag
2902   else
2903     ac_cpp_err=
2904   fi
2905 else
2906   ac_cpp_err=yes
2907 fi
2908 if test -z "$ac_cpp_err"; then
2909   :
2910 else
2911   echo "$as_me: failed program was:" >&5
2912   cat "conftest.$ac_ext" >&5
2913   # Broken: fails on valid input.
2914 continue
2915 fi
2916 rm -f conftest.err "conftest.$ac_ext"
2917
2918   # OK, works on sane cases.  Now check whether non-existent headers
2919   # can be detected and how.
2920   cat >"conftest.$ac_ext" <<_ACEOF
2921 #line 2921 "configure"
2922 #include "confdefs.h"
2923 #include <ac_nonexistent.h>
2924 _ACEOF
2925 if { (eval echo "$as_me:2925: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2926   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2927   ac_status=$?
2928   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2929   rm -f conftest.er1
2930   cat conftest.err >&5
2931   echo "$as_me:2931: \$? = $ac_status" >&5
2932   (exit "$ac_status"); } >/dev/null; then
2933   if test -s conftest.err; then
2934     ac_cpp_err=$ac_c_preproc_warn_flag
2935   else
2936     ac_cpp_err=
2937   fi
2938 else
2939   ac_cpp_err=yes
2940 fi
2941 if test -z "$ac_cpp_err"; then
2942   # Broken: success on invalid input.
2943 continue
2944 else
2945   echo "$as_me: failed program was:" >&5
2946   cat "conftest.$ac_ext" >&5
2947   # Passes both tests.
2948 ac_preproc_ok=:
2949 break
2950 fi
2951 rm -f conftest.err "conftest.$ac_ext"
2952
2953 done
2954 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2955 rm -f conftest.err "conftest.$ac_ext"
2956 if $ac_preproc_ok; then
2957   break
2958 fi
2959
2960     done
2961     ac_cv_prog_CPP=$CPP
2962
2963 fi
2964   CPP=$ac_cv_prog_CPP
2965 else
2966   ac_cv_prog_CPP=$CPP
2967 fi
2968 echo "$as_me:2968: result: $CPP" >&5
2969 echo "${ECHO_T}$CPP" >&6
2970 ac_preproc_ok=false
2971 for ac_c_preproc_warn_flag in '' yes
2972 do
2973   # Use a header file that comes with gcc, so configuring glibc
2974   # with a fresh cross-compiler works.
2975   # On the NeXT, cc -E runs the code through the compiler's parser,
2976   # not just through cpp. "Syntax error" is here to catch this case.
2977   cat >"conftest.$ac_ext" <<_ACEOF
2978 #line 2978 "configure"
2979 #include "confdefs.h"
2980 #include <assert.h>
2981                      Syntax error
2982 _ACEOF
2983 if { (eval echo "$as_me:2983: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2984   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2985   ac_status=$?
2986   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2987   rm -f conftest.er1
2988   cat conftest.err >&5
2989   echo "$as_me:2989: \$? = $ac_status" >&5
2990   (exit "$ac_status"); } >/dev/null; then
2991   if test -s conftest.err; then
2992     ac_cpp_err=$ac_c_preproc_warn_flag
2993   else
2994     ac_cpp_err=
2995   fi
2996 else
2997   ac_cpp_err=yes
2998 fi
2999 if test -z "$ac_cpp_err"; then
3000   :
3001 else
3002   echo "$as_me: failed program was:" >&5
3003   cat "conftest.$ac_ext" >&5
3004   # Broken: fails on valid input.
3005 continue
3006 fi
3007 rm -f conftest.err "conftest.$ac_ext"
3008
3009   # OK, works on sane cases.  Now check whether non-existent headers
3010   # can be detected and how.
3011   cat >"conftest.$ac_ext" <<_ACEOF
3012 #line 3012 "configure"
3013 #include "confdefs.h"
3014 #include <ac_nonexistent.h>
3015 _ACEOF
3016 if { (eval echo "$as_me:3016: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3017   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3018   ac_status=$?
3019   $EGREP -v '^ *\+' conftest.er1 >conftest.err
3020   rm -f conftest.er1
3021   cat conftest.err >&5
3022   echo "$as_me:3022: \$? = $ac_status" >&5
3023   (exit "$ac_status"); } >/dev/null; then
3024   if test -s conftest.err; then
3025     ac_cpp_err=$ac_c_preproc_warn_flag
3026   else
3027     ac_cpp_err=
3028   fi
3029 else
3030   ac_cpp_err=yes
3031 fi
3032 if test -z "$ac_cpp_err"; then
3033   # Broken: success on invalid input.
3034 continue
3035 else
3036   echo "$as_me: failed program was:" >&5
3037   cat "conftest.$ac_ext" >&5
3038   # Passes both tests.
3039 ac_preproc_ok=:
3040 break
3041 fi
3042 rm -f conftest.err "conftest.$ac_ext"
3043
3044 done
3045 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3046 rm -f conftest.err "conftest.$ac_ext"
3047 if $ac_preproc_ok; then
3048   :
3049 else
3050   { { echo "$as_me:3050: error: C preprocessor \"$CPP\" fails sanity check" >&5
3051 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
3052    { (exit 1); exit 1; }; }
3053 fi
3054
3055 ac_ext=c
3056 ac_cpp='$CPP $CPPFLAGS'
3057 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3058 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3059 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3060 ac_main_return="return"
3061
3062 if test $ac_cv_c_compiler_gnu = yes; then
3063     echo "$as_me:3063: checking whether $CC needs -traditional" >&5
3064 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
3065 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
3066   echo $ECHO_N "(cached) $ECHO_C" >&6
3067 else
3068     ac_pattern="Autoconf.*'x'"
3069   cat >"conftest.$ac_ext" <<_ACEOF
3070 #line 3070 "configure"
3071 #include "confdefs.h"
3072 #include <sgtty.h>
3073 int Autoconf = TIOCGETP;
3074 _ACEOF
3075 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3076   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3077   ac_cv_prog_gcc_traditional=yes
3078 else
3079   ac_cv_prog_gcc_traditional=no
3080 fi
3081 rm -rf conftest*
3082
3083   if test $ac_cv_prog_gcc_traditional = no; then
3084     cat >"conftest.$ac_ext" <<_ACEOF
3085 #line 3085 "configure"
3086 #include "confdefs.h"
3087 #include <termio.h>
3088 int Autoconf = TCGETA;
3089 _ACEOF
3090 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3091   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3092   ac_cv_prog_gcc_traditional=yes
3093 fi
3094 rm -rf conftest*
3095
3096   fi
3097 fi
3098 echo "$as_me:3098: result: $ac_cv_prog_gcc_traditional" >&5
3099 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3100   if test $ac_cv_prog_gcc_traditional = yes; then
3101     CC="$CC -traditional"
3102   fi
3103 fi
3104
3105 echo "$as_me:3105: checking whether $CC understands -c and -o together" >&5
3106 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3107 if test "${cf_cv_prog_CC_c_o+set}" = set; then
3108   echo $ECHO_N "(cached) $ECHO_C" >&6
3109 else
3110
3111 cat > conftest.$ac_ext <<CF_EOF
3112 int main(void)
3113 {
3114         ${cf_cv_main_return:-return}(0);
3115 }
3116 CF_EOF
3117 # We do the test twice because some compilers refuse to overwrite an
3118 # existing .o file with -o, though they will create one.
3119 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3120 if { (eval echo "$as_me:3120: \"$ac_try\"") >&5
3121   (eval $ac_try) 2>&5
3122   ac_status=$?
3123   echo "$as_me:3123: \$? = $ac_status" >&5
3124   (exit "$ac_status"); } &&
3125   test -f conftest2.$ac_objext && { (eval echo "$as_me:3125: \"$ac_try\"") >&5
3126   (eval $ac_try) 2>&5
3127   ac_status=$?
3128   echo "$as_me:3128: \$? = $ac_status" >&5
3129   (exit "$ac_status"); };
3130 then
3131   eval cf_cv_prog_CC_c_o=yes
3132 else
3133   eval cf_cv_prog_CC_c_o=no
3134 fi
3135 rm -rf ./conftest*
3136
3137 fi
3138 if test "$cf_cv_prog_CC_c_o" = yes; then
3139   echo "$as_me:3139: result: yes" >&5
3140 echo "${ECHO_T}yes" >&6
3141 else
3142   echo "$as_me:3142: result: no" >&5
3143 echo "${ECHO_T}no" >&6
3144 fi
3145
3146 if test "$cross_compiling" = yes ; then
3147         LDCONFIG=:
3148 else
3149         case "$cf_cv_system_name" in
3150         (dragonfly*|mirbsd*|freebsd*)
3151                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
3152                 ;;
3153         (*) LDPATH=$PATH:/sbin:/usr/sbin
3154                 # Extract the first word of "ldconfig", so it can be a program name with args.
3155 set dummy ldconfig; ac_word=$2
3156 echo "$as_me:3156: checking for $ac_word" >&5
3157 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3158 if test "${ac_cv_path_LDCONFIG+set}" = set; then
3159   echo $ECHO_N "(cached) $ECHO_C" >&6
3160 else
3161   case $LDCONFIG in
3162   [\\/]* | ?:[\\/]*)
3163   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
3164   ;;
3165   *)
3166   ac_save_IFS=$IFS; IFS=$ac_path_separator
3167 ac_dummy="$LDPATH"
3168 for ac_dir in $ac_dummy; do
3169   IFS=$ac_save_IFS
3170   test -z "$ac_dir" && ac_dir=.
3171   if $as_executable_p "$ac_dir/$ac_word"; then
3172    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
3173    echo "$as_me:3173: found $ac_dir/$ac_word" >&5
3174    break
3175 fi
3176 done
3177
3178   ;;
3179 esac
3180 fi
3181 LDCONFIG=$ac_cv_path_LDCONFIG
3182
3183 if test -n "$LDCONFIG"; then
3184   echo "$as_me:3184: result: $LDCONFIG" >&5
3185 echo "${ECHO_T}$LDCONFIG" >&6
3186 else
3187   echo "$as_me:3187: result: no" >&5
3188 echo "${ECHO_T}no" >&6
3189 fi
3190
3191                 ;;
3192         esac
3193 fi
3194
3195 echo "$as_me:3195: checking if you want to ensure bool is consistent with C++" >&5
3196 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
3197
3198 # Check whether --with-cxx or --without-cxx was given.
3199 if test "${with_cxx+set}" = set; then
3200   withval="$with_cxx"
3201   cf_with_cxx=$withval
3202 else
3203   cf_with_cxx=yes
3204 fi;
3205 echo "$as_me:3205: result: $cf_with_cxx" >&5
3206 echo "${ECHO_T}$cf_with_cxx" >&6
3207 if test "X$cf_with_cxx" = Xno ; then
3208         CXX=""
3209         GXX=""
3210 else
3211         # with autoconf 2.13, we can change the error to a warning:
3212                 ac_ext=cc
3213 ac_cpp='$CXXCPP $CPPFLAGS'
3214 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3215 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3216 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3217 ac_main_return="return"
3218 if test -n "$ac_tool_prefix"; then
3219   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3220   do
3221     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3222 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3223 echo "$as_me:3223: checking for $ac_word" >&5
3224 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3225 if test "${ac_cv_prog_CXX+set}" = set; then
3226   echo $ECHO_N "(cached) $ECHO_C" >&6
3227 else
3228   if test -n "$CXX"; then
3229   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3230 else
3231   ac_save_IFS=$IFS; IFS=$ac_path_separator
3232 ac_dummy="$PATH"
3233 for ac_dir in $ac_dummy; do
3234   IFS=$ac_save_IFS
3235   test -z "$ac_dir" && ac_dir=.
3236   $as_executable_p "$ac_dir/$ac_word" || continue
3237 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3238 echo "$as_me:3238: found $ac_dir/$ac_word" >&5
3239 break
3240 done
3241
3242 fi
3243 fi
3244 CXX=$ac_cv_prog_CXX
3245 if test -n "$CXX"; then
3246   echo "$as_me:3246: result: $CXX" >&5
3247 echo "${ECHO_T}$CXX" >&6
3248 else
3249   echo "$as_me:3249: result: no" >&5
3250 echo "${ECHO_T}no" >&6
3251 fi
3252
3253     test -n "$CXX" && break
3254   done
3255 fi
3256 if test -z "$CXX"; then
3257   ac_ct_CXX=$CXX
3258   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3259 do
3260   # Extract the first word of "$ac_prog", so it can be a program name with args.
3261 set dummy $ac_prog; ac_word=$2
3262 echo "$as_me:3262: checking for $ac_word" >&5
3263 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3264 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3265   echo $ECHO_N "(cached) $ECHO_C" >&6
3266 else
3267   if test -n "$ac_ct_CXX"; then
3268   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3269 else
3270   ac_save_IFS=$IFS; IFS=$ac_path_separator
3271 ac_dummy="$PATH"
3272 for ac_dir in $ac_dummy; do
3273   IFS=$ac_save_IFS
3274   test -z "$ac_dir" && ac_dir=.
3275   $as_executable_p "$ac_dir/$ac_word" || continue
3276 ac_cv_prog_ac_ct_CXX="$ac_prog"
3277 echo "$as_me:3277: found $ac_dir/$ac_word" >&5
3278 break
3279 done
3280
3281 fi
3282 fi
3283 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3284 if test -n "$ac_ct_CXX"; then
3285   echo "$as_me:3285: result: $ac_ct_CXX" >&5
3286 echo "${ECHO_T}$ac_ct_CXX" >&6
3287 else
3288   echo "$as_me:3288: result: no" >&5
3289 echo "${ECHO_T}no" >&6
3290 fi
3291
3292   test -n "$ac_ct_CXX" && break
3293 done
3294 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3295
3296   CXX=$ac_ct_CXX
3297 fi
3298
3299 # Provide some information about the compiler.
3300 echo "$as_me:3300:" \
3301      "checking for C++ compiler version" >&5
3302 ac_compiler=`set X $ac_compile; echo $2`
3303 { (eval echo "$as_me:3303: \"$ac_compiler --version </dev/null >&5\"") >&5
3304   (eval $ac_compiler --version </dev/null >&5) 2>&5
3305   ac_status=$?
3306   echo "$as_me:3306: \$? = $ac_status" >&5
3307   (exit "$ac_status"); }
3308 { (eval echo "$as_me:3308: \"$ac_compiler -v </dev/null >&5\"") >&5
3309   (eval $ac_compiler -v </dev/null >&5) 2>&5
3310   ac_status=$?
3311   echo "$as_me:3311: \$? = $ac_status" >&5
3312   (exit "$ac_status"); }
3313 { (eval echo "$as_me:3313: \"$ac_compiler -V </dev/null >&5\"") >&5
3314   (eval $ac_compiler -V </dev/null >&5) 2>&5
3315   ac_status=$?
3316   echo "$as_me:3316: \$? = $ac_status" >&5
3317   (exit "$ac_status"); }
3318
3319 echo "$as_me:3319: checking whether we are using the GNU C++ compiler" >&5
3320 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3321 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3322   echo $ECHO_N "(cached) $ECHO_C" >&6
3323 else
3324   cat >"conftest.$ac_ext" <<_ACEOF
3325 #line 3325 "configure"
3326 #include "confdefs.h"
3327
3328 int
3329 main (void)
3330 {
3331 #ifndef __GNUC__
3332        choke me
3333 #endif
3334
3335   ;
3336   return 0;
3337 }
3338 _ACEOF
3339 rm -f "conftest.$ac_objext"
3340 if { (eval echo "$as_me:3340: \"$ac_compile\"") >&5
3341   (eval $ac_compile) 2>&5
3342   ac_status=$?
3343   echo "$as_me:3343: \$? = $ac_status" >&5
3344   (exit "$ac_status"); } &&
3345          { ac_try='test -s "conftest.$ac_objext"'
3346   { (eval echo "$as_me:3346: \"$ac_try\"") >&5
3347   (eval $ac_try) 2>&5
3348   ac_status=$?
3349   echo "$as_me:3349: \$? = $ac_status" >&5
3350   (exit "$ac_status"); }; }; then
3351   ac_compiler_gnu=yes
3352 else
3353   echo "$as_me: failed program was:" >&5
3354 cat "conftest.$ac_ext" >&5
3355 ac_compiler_gnu=no
3356 fi
3357 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3358 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3359
3360 fi
3361 echo "$as_me:3361: result: $ac_cv_cxx_compiler_gnu" >&5
3362 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3363 GXX=`test $ac_compiler_gnu = yes && echo yes`
3364 ac_test_CXXFLAGS=${CXXFLAGS+set}
3365 ac_save_CXXFLAGS=$CXXFLAGS
3366 CXXFLAGS="-g"
3367 echo "$as_me:3367: checking whether $CXX accepts -g" >&5
3368 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3369 if test "${ac_cv_prog_cxx_g+set}" = set; then
3370   echo $ECHO_N "(cached) $ECHO_C" >&6
3371 else
3372   cat >"conftest.$ac_ext" <<_ACEOF
3373 #line 3373 "configure"
3374 #include "confdefs.h"
3375
3376 int
3377 main (void)
3378 {
3379
3380   ;
3381   return 0;
3382 }
3383 _ACEOF
3384 rm -f "conftest.$ac_objext"
3385 if { (eval echo "$as_me:3385: \"$ac_compile\"") >&5
3386   (eval $ac_compile) 2>&5
3387   ac_status=$?
3388   echo "$as_me:3388: \$? = $ac_status" >&5
3389   (exit "$ac_status"); } &&
3390          { ac_try='test -s "conftest.$ac_objext"'
3391   { (eval echo "$as_me:3391: \"$ac_try\"") >&5
3392   (eval $ac_try) 2>&5
3393   ac_status=$?
3394   echo "$as_me:3394: \$? = $ac_status" >&5
3395   (exit "$ac_status"); }; }; then
3396   ac_cv_prog_cxx_g=yes
3397 else
3398   echo "$as_me: failed program was:" >&5
3399 cat "conftest.$ac_ext" >&5
3400 ac_cv_prog_cxx_g=no
3401 fi
3402 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3403 fi
3404 echo "$as_me:3404: result: $ac_cv_prog_cxx_g" >&5
3405 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3406 if test "$ac_test_CXXFLAGS" = set; then
3407   CXXFLAGS=$ac_save_CXXFLAGS
3408 elif test $ac_cv_prog_cxx_g = yes; then
3409   if test "$GXX" = yes; then
3410     CXXFLAGS="-g -O2"
3411   else
3412     CXXFLAGS="-g"
3413   fi
3414 else
3415   if test "$GXX" = yes; then
3416     CXXFLAGS="-O2"
3417   else
3418     CXXFLAGS=
3419   fi
3420 fi
3421 for ac_declaration in \
3422    ''\
3423    '#include <stdlib.h>' \
3424    'extern "C" void std::exit (int) throw (); using std::exit;' \
3425    'extern "C" void std::exit (int); using std::exit;' \
3426    'extern "C" void exit (int) throw ();' \
3427    'extern "C" void exit (int);' \
3428    'void exit (int);'
3429 do
3430   cat >"conftest.$ac_ext" <<_ACEOF
3431 #line 3431 "configure"
3432 #include "confdefs.h"
3433 #include <stdlib.h>
3434 $ac_declaration
3435 int
3436 main (void)
3437 {
3438 exit (42);
3439   ;
3440   return 0;
3441 }
3442 _ACEOF
3443 rm -f "conftest.$ac_objext"
3444 if { (eval echo "$as_me:3444: \"$ac_compile\"") >&5
3445   (eval $ac_compile) 2>&5
3446   ac_status=$?
3447   echo "$as_me:3447: \$? = $ac_status" >&5
3448   (exit "$ac_status"); } &&
3449          { ac_try='test -s "conftest.$ac_objext"'
3450   { (eval echo "$as_me:3450: \"$ac_try\"") >&5
3451   (eval $ac_try) 2>&5
3452   ac_status=$?
3453   echo "$as_me:3453: \$? = $ac_status" >&5
3454   (exit "$ac_status"); }; }; then
3455   :
3456 else
3457   echo "$as_me: failed program was:" >&5
3458 cat "conftest.$ac_ext" >&5
3459 continue
3460 fi
3461 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3462   cat >"conftest.$ac_ext" <<_ACEOF
3463 #line 3463 "configure"
3464 #include "confdefs.h"
3465 $ac_declaration
3466 int
3467 main (void)
3468 {
3469 exit (42);
3470   ;
3471   return 0;
3472 }
3473 _ACEOF
3474 rm -f "conftest.$ac_objext"
3475 if { (eval echo "$as_me:3475: \"$ac_compile\"") >&5
3476   (eval $ac_compile) 2>&5
3477   ac_status=$?
3478   echo "$as_me:3478: \$? = $ac_status" >&5
3479   (exit "$ac_status"); } &&
3480          { ac_try='test -s "conftest.$ac_objext"'
3481   { (eval echo "$as_me:3481: \"$ac_try\"") >&5
3482   (eval $ac_try) 2>&5
3483   ac_status=$?
3484   echo "$as_me:3484: \$? = $ac_status" >&5
3485   (exit "$ac_status"); }; }; then
3486   break
3487 else
3488   echo "$as_me: failed program was:" >&5
3489 cat "conftest.$ac_ext" >&5
3490 fi
3491 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3492 done
3493 rm -rf conftest*
3494 if test -n "$ac_declaration"; then
3495   echo '#ifdef __cplusplus' >>confdefs.h
3496   echo "$ac_declaration"    >>confdefs.h
3497   echo '#endif'             >>confdefs.h
3498 fi
3499
3500 ac_ext=c
3501 ac_cpp='$CPP $CPPFLAGS'
3502 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3503 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3504 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3505 ac_main_return="return"
3506
3507         ac_ext=cc
3508 ac_cpp='$CXXCPP $CPPFLAGS'
3509 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3510 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3511 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3512 ac_main_return="return"
3513
3514         if test "x$cf_with_cxx" != xno
3515         then
3516                 # Several of the C++ configurations do not work, particularly when
3517                 # cross-compiling (20140913 -TD)
3518                 echo "$as_me:3518: checking if $CXX works" >&5
3519 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3520
3521                 save_CPPFLAGS="$CPPFLAGS"
3522                 eval cf_includedir=${includedir}
3523                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3524
3525 cat >"conftest.$ac_ext" <<_ACEOF
3526 #line 3526 "configure"
3527 #include "confdefs.h"
3528
3529 #include <stdlib.h>
3530 #include <stdio.h>
3531
3532 int
3533 main (void)
3534 {
3535
3536                 printf("Hello world!\n")
3537
3538   ;
3539   return 0;
3540 }
3541 _ACEOF
3542 rm -f "conftest.$ac_objext"
3543 if { (eval echo "$as_me:3543: \"$ac_compile\"") >&5
3544   (eval $ac_compile) 2>&5
3545   ac_status=$?
3546   echo "$as_me:3546: \$? = $ac_status" >&5
3547   (exit "$ac_status"); } &&
3548          { ac_try='test -s "conftest.$ac_objext"'
3549   { (eval echo "$as_me:3549: \"$ac_try\"") >&5
3550   (eval $ac_try) 2>&5
3551   ac_status=$?
3552   echo "$as_me:3552: \$? = $ac_status" >&5
3553   (exit "$ac_status"); }; }; then
3554   cf_cxx_works=yes
3555 else
3556   echo "$as_me: failed program was:" >&5
3557 cat "conftest.$ac_ext" >&5
3558 cf_cxx_works=no
3559 fi
3560 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3561                 CPPFLAGS="$save_CPPFLAGS"
3562
3563                 echo "$as_me:3563: result: $cf_cxx_works" >&5
3564 echo "${ECHO_T}$cf_cxx_works" >&6
3565                 if test "x$cf_cxx_works" = xno
3566                 then
3567                         { echo "$as_me:3567: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3568 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3569                         cf_with_cxx=no; CXX=""; GXX="";
3570                 fi
3571         fi
3572         ac_ext=c
3573 ac_cpp='$CPP $CPPFLAGS'
3574 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3575 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3576 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3577 ac_main_return="return"
3578
3579         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3580         if test "$CXX" = "g++" ; then
3581                 # Extract the first word of "g++", so it can be a program name with args.
3582 set dummy g++; ac_word=$2
3583 echo "$as_me:3583: checking for $ac_word" >&5
3584 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3585 if test "${ac_cv_path_CXX+set}" = set; then
3586   echo $ECHO_N "(cached) $ECHO_C" >&6
3587 else
3588   case $CXX in
3589   [\\/]* | ?:[\\/]*)
3590   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3591   ;;
3592   *)
3593   ac_save_IFS=$IFS; IFS=$ac_path_separator
3594 ac_dummy="$PATH"
3595 for ac_dir in $ac_dummy; do
3596   IFS=$ac_save_IFS
3597   test -z "$ac_dir" && ac_dir=.
3598   if $as_executable_p "$ac_dir/$ac_word"; then
3599    ac_cv_path_CXX="$ac_dir/$ac_word"
3600    echo "$as_me:3600: found $ac_dir/$ac_word" >&5
3601    break
3602 fi
3603 done
3604
3605   ;;
3606 esac
3607 fi
3608 CXX=$ac_cv_path_CXX
3609
3610 if test -n "$CXX"; then
3611   echo "$as_me:3611: result: $CXX" >&5
3612 echo "${ECHO_T}$CXX" >&6
3613 else
3614   echo "$as_me:3614: result: no" >&5
3615 echo "${ECHO_T}no" >&6
3616 fi
3617
3618         fi
3619         case "x$CXX" in
3620         (x|xg++)
3621                 { echo "$as_me:3621: WARNING: You don't have any C++ compiler, too bad" >&5
3622 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3623                 cf_with_cxx=no; CXX=""; GXX="";
3624                 ;;
3625         esac
3626 fi
3627
3628 GXX_VERSION=none
3629 if test "$GXX" = yes; then
3630         echo "$as_me:3630: checking version of ${CXX:-g++}" >&5
3631 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3632         GXX_VERSION="`${CXX:-g++} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3633         if test -z "$GXX_VERSION"
3634         then
3635                 GXX_VERSION=unknown
3636                 GXX=no
3637         fi
3638         echo "$as_me:3638: result: $GXX_VERSION" >&5
3639 echo "${ECHO_T}$GXX_VERSION" >&6
3640 fi
3641
3642 case "$GXX_VERSION" in
3643 ([1-9][0-9].*)
3644         ;;
3645 (1.*|2.[0-6]*)
3646         { echo "$as_me:3646: WARNING: templates do not work" >&5
3647 echo "$as_me: WARNING: templates do not work" >&2;}
3648         ;;
3649 esac
3650
3651 echo "$as_me:3651: checking if you want to build C++ binding and demo" >&5
3652 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3653
3654 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3655 if test "${with_cxx_binding+set}" = set; then
3656   withval="$with_cxx_binding"
3657   cf_with_cxx_binding=$withval
3658 else
3659   cf_with_cxx_binding=$cf_with_cxx
3660 fi;
3661 echo "$as_me:3661: result: $cf_with_cxx_binding" >&5
3662 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3663
3664 echo "$as_me:3664: checking if you want to build with Ada" >&5
3665 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3666 echo "$as_me:3666: result: $cf_with_ada" >&5
3667 echo "${ECHO_T}$cf_with_ada" >&6
3668
3669 echo "$as_me:3669: checking if you want to install terminal database" >&5
3670 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3671
3672 # Check whether --enable-db-install or --disable-db-install was given.
3673 if test "${enable_db_install+set}" = set; then
3674   enableval="$enable_db_install"
3675   cf_with_db_install=$enableval
3676 else
3677   cf_with_db_install=yes
3678 fi;
3679 echo "$as_me:3679: result: $cf_with_db_install" >&5
3680 echo "${ECHO_T}$cf_with_db_install" >&6
3681
3682 echo "$as_me:3682: checking if you want to install manpages" >&5
3683 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3684
3685 # Check whether --with-manpages or --without-manpages was given.
3686 if test "${with_manpages+set}" = set; then
3687   withval="$with_manpages"
3688   cf_with_manpages=$withval
3689 else
3690   cf_with_manpages=yes
3691 fi;
3692 echo "$as_me:3692: result: $cf_with_manpages" >&5
3693 echo "${ECHO_T}$cf_with_manpages" >&6
3694
3695 echo "$as_me:3695: checking if you want to build programs such as tic" >&5
3696 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3697
3698 # Check whether --with-progs or --without-progs was given.
3699 if test "${with_progs+set}" = set; then
3700   withval="$with_progs"
3701   cf_with_progs=$withval
3702 else
3703   cf_with_progs=yes
3704 fi;
3705 echo "$as_me:3705: result: $cf_with_progs" >&5
3706 echo "${ECHO_T}$cf_with_progs" >&6
3707
3708 echo "$as_me:3708: checking if you want to build test-programs" >&5
3709 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3710
3711 # Check whether --with-tests or --without-tests was given.
3712 if test "${with_tests+set}" = set; then
3713   withval="$with_tests"
3714   cf_with_tests=$withval
3715 else
3716   cf_with_tests=yes
3717 fi;
3718 echo "$as_me:3718: result: $cf_with_tests" >&5
3719 echo "${ECHO_T}$cf_with_tests" >&6
3720
3721 echo "$as_me:3721: checking if you wish to install curses.h" >&5
3722 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3723
3724 # Check whether --with-curses-h or --without-curses-h was given.
3725 if test "${with_curses_h+set}" = set; then
3726   withval="$with_curses_h"
3727   with_curses_h=$withval
3728 else
3729   with_curses_h=yes
3730 fi;
3731 echo "$as_me:3731: result: $with_curses_h" >&5
3732 echo "${ECHO_T}$with_curses_h" >&6
3733
3734 modules_to_build="ncurses"
3735 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3736 modules_to_build="$modules_to_build panel menu form"
3737
3738 test "$program_prefix" != NONE &&
3739   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3740 # Use a double $ so make ignores it.
3741 test "$program_suffix" != NONE &&
3742   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3743 # Double any \ or $.  echo might interpret backslashes.
3744 # By default was `s,x,x', remove it if useless.
3745 cat <<\_ACEOF >conftest.sed
3746 s/[\\$]/&&/g;s/;s,x,x,$//
3747 _ACEOF
3748 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3749 rm conftest.sed
3750
3751 for ac_prog in mawk gawk nawk awk
3752 do
3753   # Extract the first word of "$ac_prog", so it can be a program name with args.
3754 set dummy $ac_prog; ac_word=$2
3755 echo "$as_me:3755: checking for $ac_word" >&5
3756 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3757 if test "${ac_cv_prog_AWK+set}" = set; then
3758   echo $ECHO_N "(cached) $ECHO_C" >&6
3759 else
3760   if test -n "$AWK"; then
3761   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3762 else
3763   ac_save_IFS=$IFS; IFS=$ac_path_separator
3764 ac_dummy="$PATH"
3765 for ac_dir in $ac_dummy; do
3766   IFS=$ac_save_IFS
3767   test -z "$ac_dir" && ac_dir=.
3768   $as_executable_p "$ac_dir/$ac_word" || continue
3769 ac_cv_prog_AWK="$ac_prog"
3770 echo "$as_me:3770: found $ac_dir/$ac_word" >&5
3771 break
3772 done
3773
3774 fi
3775 fi
3776 AWK=$ac_cv_prog_AWK
3777 if test -n "$AWK"; then
3778   echo "$as_me:3778: result: $AWK" >&5
3779 echo "${ECHO_T}$AWK" >&6
3780 else
3781   echo "$as_me:3781: result: no" >&5
3782 echo "${ECHO_T}no" >&6
3783 fi
3784
3785   test -n "$AWK" && break
3786 done
3787
3788 test -z "$AWK" && { { echo "$as_me:3788: error: No awk program found" >&5
3789 echo "$as_me: error: No awk program found" >&2;}
3790    { (exit 1); exit 1; }; }
3791
3792 # Find a good install program.  We prefer a C program (faster),
3793 # so one script is as good as another.  But avoid the broken or
3794 # incompatible versions:
3795 # SysV /etc/install, /usr/sbin/install
3796 # SunOS /usr/etc/install
3797 # IRIX /sbin/install
3798 # AIX /bin/install
3799 # AmigaOS /C/install, which installs bootblocks on floppy discs
3800 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3801 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3802 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3803 # ./install, which can be erroneously created by make from ./install.sh.
3804 echo "$as_me:3804: checking for a BSD compatible install" >&5
3805 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3806 if test -z "$INSTALL"; then
3807 if test "${ac_cv_path_install+set}" = set; then
3808   echo $ECHO_N "(cached) $ECHO_C" >&6
3809 else
3810     ac_save_IFS=$IFS; IFS=$ac_path_separator
3811   for ac_dir in $PATH; do
3812     IFS=$ac_save_IFS
3813     # Account for people who put trailing slashes in PATH elements.
3814     case $ac_dir/ in
3815     / | ./ | .// | /cC/* \
3816     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3817     | /usr/ucb/* ) ;;
3818     *)
3819       # OSF1 and SCO ODT 3.0 have their own names for install.
3820       # Don't use installbsd from OSF since it installs stuff as root
3821       # by default.
3822       for ac_prog in ginstall scoinst install; do
3823         if $as_executable_p "$ac_dir/$ac_prog"; then
3824           if test $ac_prog = install &&
3825             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3826             # AIX install.  It has an incompatible calling convention.
3827             :
3828           elif test $ac_prog = install &&
3829             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3830             # program-specific install script used by HP pwplus--don't use.
3831             :
3832           else
3833             ac_cv_path_install="$ac_dir/$ac_prog -c"
3834             break 2
3835           fi
3836         fi
3837       done
3838       ;;
3839     esac
3840   done
3841
3842 fi
3843   if test "${ac_cv_path_install+set}" = set; then
3844     INSTALL=$ac_cv_path_install
3845   else
3846     # As a last resort, use the slow shell script.  We don't cache a
3847     # path for INSTALL within a source directory, because that will
3848     # break other packages using the cache if that directory is
3849     # removed, or if the path is relative.
3850     INSTALL=$ac_install_sh
3851   fi
3852 fi
3853 echo "$as_me:3853: result: $INSTALL" >&5
3854 echo "${ECHO_T}$INSTALL" >&6
3855
3856 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3857 # It thinks the first close brace ends the variable substitution.
3858 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3859
3860 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3861
3862 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3863
3864 case $INSTALL in
3865 (/*)
3866         ;;
3867 (*)
3868         cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
3869         test -z "$cf_dir" && cf_dir=.
3870         INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
3871         ;;
3872 esac
3873
3874 for ac_prog in lint cppcheck splint
3875 do
3876   # Extract the first word of "$ac_prog", so it can be a program name with args.
3877 set dummy $ac_prog; ac_word=$2
3878 echo "$as_me:3878: checking for $ac_word" >&5
3879 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3880 if test "${ac_cv_prog_LINT+set}" = set; then
3881   echo $ECHO_N "(cached) $ECHO_C" >&6
3882 else
3883   if test -n "$LINT"; then
3884   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3885 else
3886   ac_save_IFS=$IFS; IFS=$ac_path_separator
3887 ac_dummy="$PATH"
3888 for ac_dir in $ac_dummy; do
3889   IFS=$ac_save_IFS
3890   test -z "$ac_dir" && ac_dir=.
3891   $as_executable_p "$ac_dir/$ac_word" || continue
3892 ac_cv_prog_LINT="$ac_prog"
3893 echo "$as_me:3893: found $ac_dir/$ac_word" >&5
3894 break
3895 done
3896
3897 fi
3898 fi
3899 LINT=$ac_cv_prog_LINT
3900 if test -n "$LINT"; then
3901   echo "$as_me:3901: result: $LINT" >&5
3902 echo "${ECHO_T}$LINT" >&6
3903 else
3904   echo "$as_me:3904: result: no" >&5
3905 echo "${ECHO_T}no" >&6
3906 fi
3907
3908   test -n "$LINT" && break
3909 done
3910
3911 case "x$LINT" in
3912 (xcppcheck|x*/cppcheck)
3913         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3914         ;;
3915 esac
3916
3917 echo "$as_me:3917: checking whether ln -s works" >&5
3918 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3919 LN_S=$as_ln_s
3920 if test "$LN_S" = "ln -s"; then
3921   echo "$as_me:3921: result: yes" >&5
3922 echo "${ECHO_T}yes" >&6
3923 else
3924   echo "$as_me:3924: result: no, using $LN_S" >&5
3925 echo "${ECHO_T}no, using $LN_S" >&6
3926 fi
3927
3928 echo "$as_me:3928: checking if $LN_S -f options work" >&5
3929 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3930
3931 rm -f conf$$.src conf$$dst
3932 echo >conf$$.dst
3933 echo first >conf$$.src
3934 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3935         cf_prog_ln_sf=yes
3936 else
3937         cf_prog_ln_sf=no
3938 fi
3939 rm -f conf$$.dst conf$$src
3940 echo "$as_me:3940: result: $cf_prog_ln_sf" >&5
3941 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3942
3943 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3944
3945 echo "$as_me:3945: checking for long file names" >&5
3946 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3947 if test "${ac_cv_sys_long_file_names+set}" = set; then
3948   echo $ECHO_N "(cached) $ECHO_C" >&6
3949 else
3950   ac_cv_sys_long_file_names=yes
3951 # Test for long file names in all the places we know might matter:
3952 #      .                the current directory, where building will happen
3953 #      $prefix/lib      where we will be installing things
3954 #      $exec_prefix/lib likewise
3955 # eval it to expand exec_prefix.
3956 #      $TMPDIR          if set, where it might want to write temporary files
3957 # if $TMPDIR is not set:
3958 #      /tmp             where it might want to write temporary files
3959 #      /var/tmp         likewise
3960 #      /usr/tmp         likewise
3961 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3962   ac_tmpdirs=$TMPDIR
3963 else
3964   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3965 fi
3966 for ac_dir in  . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3967   test -d "$ac_dir" || continue
3968   test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3969   ac_xdir=$ac_dir/cf$$
3970   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3971   ac_tf1=$ac_xdir/conftest9012345
3972   ac_tf2=$ac_xdir/conftest9012346
3973   (echo 1 >"$ac_tf1") 2>/dev/null
3974   (echo 2 >"$ac_tf2") 2>/dev/null
3975   ac_val=`cat "$ac_tf1" 2>/dev/null`
3976   if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3977     ac_cv_sys_long_file_names=no
3978     rm -rf "$ac_xdir" 2>/dev/null
3979     break
3980   fi
3981   rm -rf "$ac_xdir" 2>/dev/null
3982 done
3983 fi
3984 echo "$as_me:3984: result: $ac_cv_sys_long_file_names" >&5
3985 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3986 if test "$ac_cv_sys_long_file_names" = yes; then
3987
3988 cat >>confdefs.h <<\EOF
3989 #define HAVE_LONG_FILE_NAMES 1
3990 EOF
3991
3992 fi
3993
3994 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3995 # of package conflict.
3996 cf_config_suffix=
3997
3998 # Check whether --with-config-suffix or --without-config-suffix was given.
3999 if test "${with_config_suffix+set}" = set; then
4000   withval="$with_config_suffix"
4001   case "x$withval" in
4002         (xyes|xno)
4003                 { echo "$as_me:4003: WARNING: expected a value for config-suffix option" >&5
4004 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
4005                 ;;
4006         (*)     cf_config_suffix="$withval"
4007                 ;;
4008         esac
4009 fi;
4010
4011 # If we find pkg-config, check if we should install the ".pc" files.
4012
4013 echo "$as_me:4013: checking if you want to use pkg-config" >&5
4014 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4015
4016 # Check whether --with-pkg-config or --without-pkg-config was given.
4017 if test "${with_pkg_config+set}" = set; then
4018   withval="$with_pkg_config"
4019   cf_pkg_config=$withval
4020 else
4021   cf_pkg_config=yes
4022 fi;
4023 echo "$as_me:4023: result: $cf_pkg_config" >&5
4024 echo "${ECHO_T}$cf_pkg_config" >&6
4025
4026 case "$cf_pkg_config" in
4027 (no)
4028         PKG_CONFIG=none
4029         ;;
4030 (yes)
4031
4032 if test -n "$ac_tool_prefix"; then
4033   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4034 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4035 echo "$as_me:4035: checking for $ac_word" >&5
4036 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4037 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4038   echo $ECHO_N "(cached) $ECHO_C" >&6
4039 else
4040   case $PKG_CONFIG in
4041   [\\/]* | ?:[\\/]*)
4042   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4043   ;;
4044   *)
4045   ac_save_IFS=$IFS; IFS=$ac_path_separator
4046 ac_dummy="$PATH"
4047 for ac_dir in $ac_dummy; do
4048   IFS=$ac_save_IFS
4049   test -z "$ac_dir" && ac_dir=.
4050   if $as_executable_p "$ac_dir/$ac_word"; then
4051    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4052    echo "$as_me:4052: found $ac_dir/$ac_word" >&5
4053    break
4054 fi
4055 done
4056
4057   ;;
4058 esac
4059 fi
4060 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4061
4062 if test -n "$PKG_CONFIG"; then
4063   echo "$as_me:4063: result: $PKG_CONFIG" >&5
4064 echo "${ECHO_T}$PKG_CONFIG" >&6
4065 else
4066   echo "$as_me:4066: result: no" >&5
4067 echo "${ECHO_T}no" >&6
4068 fi
4069
4070 fi
4071 if test -z "$ac_cv_path_PKG_CONFIG"; then
4072   ac_pt_PKG_CONFIG=$PKG_CONFIG
4073   # Extract the first word of "pkg-config", so it can be a program name with args.
4074 set dummy pkg-config; ac_word=$2
4075 echo "$as_me:4075: checking for $ac_word" >&5
4076 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4077 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4078   echo $ECHO_N "(cached) $ECHO_C" >&6
4079 else
4080   case $ac_pt_PKG_CONFIG in
4081   [\\/]* | ?:[\\/]*)
4082   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4083   ;;
4084   *)
4085   ac_save_IFS=$IFS; IFS=$ac_path_separator
4086 ac_dummy="$PATH"
4087 for ac_dir in $ac_dummy; do
4088   IFS=$ac_save_IFS
4089   test -z "$ac_dir" && ac_dir=.
4090   if $as_executable_p "$ac_dir/$ac_word"; then
4091    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4092    echo "$as_me:4092: found $ac_dir/$ac_word" >&5
4093    break
4094 fi
4095 done
4096
4097   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4098   ;;
4099 esac
4100 fi
4101 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4102
4103 if test -n "$ac_pt_PKG_CONFIG"; then
4104   echo "$as_me:4104: result: $ac_pt_PKG_CONFIG" >&5
4105 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4106 else
4107   echo "$as_me:4107: result: no" >&5
4108 echo "${ECHO_T}no" >&6
4109 fi
4110
4111   PKG_CONFIG=$ac_pt_PKG_CONFIG
4112 else
4113   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4114 fi
4115
4116         ;;
4117 (*)
4118         PKG_CONFIG=$withval
4119         ;;
4120 esac
4121
4122 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4123 if test "$PKG_CONFIG" != none ; then
4124
4125 if test "x$prefix" != xNONE; then
4126         cf_path_syntax="$prefix"
4127 else
4128         cf_path_syntax="$ac_default_prefix"
4129 fi
4130
4131 case ".$PKG_CONFIG" in
4132 (.\$\(*\)*|.\'*\'*)
4133         ;;
4134 (..|./*|.\\*)
4135         ;;
4136 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4137         ;;
4138 (.\$\{*prefix\}*|.\$\{*dir\}*)
4139         eval PKG_CONFIG="$PKG_CONFIG"
4140         case ".$PKG_CONFIG" in
4141         (.NONE/*)
4142                 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4143                 ;;
4144         esac
4145         ;;
4146 (.no|.NONE/*)
4147         PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4148         ;;
4149 (*)
4150         { { echo "$as_me:4150: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4151 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4152    { (exit 1); exit 1; }; }
4153         ;;
4154 esac
4155
4156 elif test "x$cf_pkg_config" != xno ; then
4157         { echo "$as_me:4157: WARNING: pkg-config is not installed" >&5
4158 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4159 fi
4160
4161 case "$PKG_CONFIG" in
4162 (no|none|yes)
4163         echo "$as_me:4163: checking for pkg-config library directory" >&5
4164 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4165         ;;
4166 (*)
4167         echo "$as_me:4167: checking for $PKG_CONFIG library directory" >&5
4168 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
4169         ;;
4170 esac
4171
4172 # if $PKG_CONFIG_LIBDIR is set, try to use that
4173 if test -n "$PKG_CONFIG_PATH"; then
4174         cf_search_path=`echo "$PKG_CONFIG_PATH" | sed -e 's/:/ /g' -e 's,^[     ]*,,' -e 's,[   ]*$,,'`
4175 elif test -n "$PKG_CONFIG_LIBDIR"; then
4176         cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[   ]*,,' -e 's,[   ]*$,,'`
4177 else
4178         cf_search_path=libdir
4179 fi
4180
4181 # if the option is used, let that override.  otherwise default to "libdir"
4182
4183 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4184 if test "${with_pkg_config_libdir+set}" = set; then
4185   withval="$with_pkg_config_libdir"
4186   cf_search_path=$withval
4187 fi;
4188
4189 case "x$cf_search_path" in
4190 (xlibdir)
4191         PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
4192         echo "$as_me:4192: result: $PKG_CONFIG_LIBDIR" >&5
4193 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4194         cf_search_path=
4195         ;;
4196 (x)
4197         ;;
4198 (x/*\ *)
4199         PKG_CONFIG_LIBDIR=
4200         ;;
4201 (x/*)
4202         PKG_CONFIG_LIBDIR="$cf_search_path"
4203         echo "$as_me:4203: result: $PKG_CONFIG_LIBDIR" >&5
4204 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4205         cf_search_path=
4206         ;;
4207 (xyes|xauto)
4208         echo "$as_me:4208: result: auto" >&5
4209 echo "${ECHO_T}auto" >&6
4210         cf_search_path=
4211         # Look for the library directory using the same prefix as the executable
4212         echo "$as_me:4212: checking for search-list" >&5
4213 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
4214         if test "x$PKG_CONFIG" != xnone
4215         then
4216                 # works for pkg-config since version 0.24 (2009)
4217                 # works for pkgconf since version 0.8.3 (2012)
4218                 for cf_pkg_program in \
4219                         `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
4220                         pkg-config \
4221                         pkgconf
4222                 do
4223                         cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
4224                         test -n "$cf_search_path" && break
4225                 done
4226
4227                 # works for pkg-config since import in 2005 of original 2001 HP code.
4228                 test -z "$cf_search_path" && \
4229                 cf_search_path=`
4230                 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
4231 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
4232         sub(\"^[^']*'\",\"\"); \
4233         sub(\"'.*\",\"\"); \
4234         printf \" %s\", \\$0; } \
4235 { next; } \
4236 "`
4237         fi
4238
4239         echo "$as_me:4239: result: $cf_search_path" >&5
4240 echo "${ECHO_T}$cf_search_path" >&6
4241         ;;
4242 (*)
4243         { { echo "$as_me:4243: error: Unexpected option value: $cf_search_path" >&5
4244 echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
4245    { (exit 1); exit 1; }; }
4246         ;;
4247 esac
4248
4249 if test -n "$cf_search_path"
4250 then
4251         echo "$as_me:4251: checking for first directory" >&5
4252 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
4253         cf_pkg_config_path=none
4254         for cf_config in $cf_search_path
4255         do
4256                 if test -d "$cf_config"
4257                 then
4258                         cf_pkg_config_path=$cf_config
4259                         break
4260                 fi
4261         done
4262         echo "$as_me:4262: result: $cf_pkg_config_path" >&5
4263 echo "${ECHO_T}$cf_pkg_config_path" >&6
4264
4265         if test "x$cf_pkg_config_path" != xnone ; then
4266                 # limit this to the first directory found
4267                 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
4268         fi
4269
4270         if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
4271         then
4272                 echo "$as_me:4272: checking for workaround" >&5
4273 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
4274                 if test "$prefix" = "NONE" ; then
4275                         cf_prefix="$ac_default_prefix"
4276                 else
4277                         cf_prefix="$prefix"
4278                 fi
4279                 eval cf_libdir=$libdir
4280                 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
4281                 cf_backup=
4282                 for cf_config in $cf_search_path
4283                 do
4284                         case $cf_config in
4285                         $cf_libdir/pkgconfig)
4286                                 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
4287                                 break
4288                                 ;;
4289                         *)
4290                                 test -z "$cf_backup" && cf_backup=$cf_config
4291                                 ;;
4292                         esac
4293                 done
4294                 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
4295                 echo "$as_me:4295: result: $PKG_CONFIG_LIBDIR" >&5
4296 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4297         fi
4298 fi
4299
4300 if test "x$PKG_CONFIG" != xnone
4301 then
4302         echo "$as_me:4302: checking if we should install .pc files for $PKG_CONFIG" >&5
4303 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4304 else
4305         echo "$as_me:4305: checking if we should install .pc files" >&5
4306 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4307 fi
4308
4309 # Check whether --enable-pc-files or --disable-pc-files was given.
4310 if test "${enable_pc_files+set}" = set; then
4311   enableval="$enable_pc_files"
4312   enable_pc_files=$enableval
4313 else
4314   enable_pc_files=no
4315 fi;
4316 echo "$as_me:4316: result: $enable_pc_files" >&5
4317 echo "${ECHO_T}$enable_pc_files" >&6
4318
4319 if test "x$enable_pc_files" != xno
4320 then
4321         MAKE_PC_FILES=
4322         case "x$PKG_CONFIG_LIBDIR" in
4323         (xno|xnone|xyes|x)
4324                 { echo "$as_me:4324: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4325 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4326                 ;;
4327         (*)
4328                 cf_pkg_config_libdir="$PKG_CONFIG_LIBDIR"
4329
4330 if test "x$prefix" != xNONE; then
4331         cf_path_syntax="$prefix"
4332 else
4333         cf_path_syntax="$ac_default_prefix"
4334 fi
4335
4336 case ".$cf_pkg_config_libdir" in
4337 (.\$\(*\)*|.\'*\'*)
4338         ;;
4339 (..|./*|.\\*)
4340         ;;
4341 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4342         ;;
4343 (.\$\{*prefix\}*|.\$\{*dir\}*)
4344         eval cf_pkg_config_libdir="$cf_pkg_config_libdir"
4345         case ".$cf_pkg_config_libdir" in
4346         (.NONE/*)
4347                 cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4348                 ;;
4349         esac
4350         ;;
4351 (.no|.NONE/*)
4352         cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4353         ;;
4354 (*)
4355         { { echo "$as_me:4355: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&5
4356 echo "$as_me: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&2;}
4357    { (exit 1); exit 1; }; }
4358         ;;
4359 esac
4360
4361                 ;;
4362         esac
4363 else
4364         MAKE_PC_FILES="#"
4365 fi
4366
4367 if test -z "$MAKE_PC_FILES"
4368 then
4369         echo "$as_me:4369: checking for suffix to add to pkg-config files" >&5
4370 echo $ECHO_N "checking for suffix to add to pkg-config files... $ECHO_C" >&6
4371
4372 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4373 if test "${with_pc_suffix+set}" = set; then
4374   withval="$with_pc_suffix"
4375   case "x$withval" in
4376         (xyes|xno)
4377                 PC_MODULE_SUFFIX=
4378                 ;;
4379         (*)     PC_MODULE_SUFFIX="$withval"
4380                 ;;
4381         esac
4382 fi;
4383         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4384         echo "$as_me:4384: result: $PC_MODULE_SUFFIX" >&5
4385 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4386         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4387
4388 fi
4389
4390 echo "$as_me:4390: checking if we should assume mixed-case filenames" >&5
4391 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4392
4393 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4394 if test "${enable_mixed_case+set}" = set; then
4395   enableval="$enable_mixed_case"
4396   enable_mixedcase=$enableval
4397 else
4398   enable_mixedcase=auto
4399 fi;
4400 echo "$as_me:4400: result: $enable_mixedcase" >&5
4401 echo "${ECHO_T}$enable_mixedcase" >&6
4402 if test "$enable_mixedcase" = "auto" ; then
4403
4404 echo "$as_me:4404: checking if filesystem supports mixed-case filenames" >&5
4405 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4406 if test "${cf_cv_mixedcase+set}" = set; then
4407   echo $ECHO_N "(cached) $ECHO_C" >&6
4408 else
4409
4410 if test "$cross_compiling" = yes ; then
4411         case "$target_alias" in
4412         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4413                 cf_cv_mixedcase=no
4414                 ;;
4415         (*)
4416                 cf_cv_mixedcase=yes
4417                 ;;
4418         esac
4419 else
4420         rm -f conftest CONFTEST
4421         echo test >conftest
4422         if test -f CONFTEST ; then
4423                 cf_cv_mixedcase=no
4424         else
4425                 cf_cv_mixedcase=yes
4426         fi
4427         rm -f conftest CONFTEST
4428 fi
4429
4430 fi
4431 echo "$as_me:4431: result: $cf_cv_mixedcase" >&5
4432 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4433 test "$cf_cv_mixedcase" = yes &&
4434 cat >>confdefs.h <<\EOF
4435 #define MIXEDCASE_FILENAMES 1
4436 EOF
4437
4438 else
4439         cf_cv_mixedcase=$enable_mixedcase
4440         if test "x$enable_mixedcase" = "xyes" ; then
4441
4442 cat >>confdefs.h <<\EOF
4443 #define MIXEDCASE_FILENAMES 1
4444 EOF
4445
4446         fi
4447 fi
4448
4449 # do this after mixed-case option (tags/TAGS is not as important as tic).
4450 echo "$as_me:4450: checking whether ${MAKE-make} sets \${MAKE}" >&5
4451 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4452 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4453 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4454   echo $ECHO_N "(cached) $ECHO_C" >&6
4455 else
4456   cat >conftest.make <<\EOF
4457 all:
4458         @echo 'ac_maketemp="${MAKE}"'
4459 EOF
4460 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4461 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4462 if test -n "$ac_maketemp"; then
4463   eval ac_cv_prog_make_${ac_make}_set=yes
4464 else
4465   eval ac_cv_prog_make_${ac_make}_set=no
4466 fi
4467 rm -f conftest.make
4468 fi
4469 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4470   echo "$as_me:4470: result: yes" >&5
4471 echo "${ECHO_T}yes" >&6
4472   SET_MAKE=
4473 else
4474   echo "$as_me:4474: result: no" >&5
4475 echo "${ECHO_T}no" >&6
4476   SET_MAKE="MAKE=${MAKE-make}"
4477 fi
4478
4479 echo "$as_me:4479: checking for \".PHONY\" make-support" >&5
4480 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
4481 if test "${cf_cv_make_PHONY+set}" = set; then
4482   echo $ECHO_N "(cached) $ECHO_C" >&6
4483 else
4484
4485         rm -rf conftest*
4486         (
4487                 mkdir conftest || exit 1
4488                 cd conftest
4489                 cat >makefile <<'CF_EOF'
4490 .PHONY: always
4491 DATA=0
4492 always: always.out
4493         @echo "** making $@ $(DATA)"
4494 once: once.out
4495         @echo "** making $@ $(DATA)"
4496 always.out:
4497         @echo "** making $@ $(DATA)"
4498         echo $(DATA) > $@
4499 once.out:
4500         @echo "** making $@ $(DATA)"
4501         echo $(DATA) > $@
4502 CF_EOF
4503                 for cf_data in 1 2 3
4504                 do
4505                         ${MAKE:-make} always DATA=$cf_data
4506                         ${MAKE:-make} once   DATA=$cf_data
4507                         ${MAKE:-make} -t always once
4508                         if test -f always ; then
4509                                 echo "no (case 1)" > ../conftest.tmp
4510                         elif test ! -f always.out ; then
4511                                 echo "no (case 2)" > ../conftest.tmp
4512                         elif test ! -f once.out ; then
4513                                 echo "no (case 3)" > ../conftest.tmp
4514                         elif ! cmp -s always.out once.out ; then
4515                                 echo "no (case 4)" > ../conftest.tmp
4516                                 diff always.out once.out
4517                         else
4518                                 cf_check="`cat always.out`"
4519                                 if test "x$cf_check" != "x$cf_data" ; then
4520                                         echo "no (case 5)" > ../conftest.tmp
4521                                 else
4522                                         echo yes > ../conftest.tmp
4523                                         rm -f ./*.out
4524                                         continue
4525                                 fi
4526                         fi
4527                         break
4528                 done
4529         ) >&5 2>&1
4530         cf_cv_make_PHONY="`cat conftest.tmp`"
4531         rm -rf conftest*
4532
4533 fi
4534 echo "$as_me:4534: result: $cf_cv_make_PHONY" >&5
4535 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
4536 MAKE_NO_PHONY="#"
4537 MAKE_PHONY="#"
4538 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
4539 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
4540
4541 for ac_prog in exctags ctags
4542 do
4543   # Extract the first word of "$ac_prog", so it can be a program name with args.
4544 set dummy $ac_prog; ac_word=$2
4545 echo "$as_me:4545: checking for $ac_word" >&5
4546 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4547 if test "${ac_cv_prog_CTAGS+set}" = set; then
4548   echo $ECHO_N "(cached) $ECHO_C" >&6
4549 else
4550   if test -n "$CTAGS"; then
4551   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4552 else
4553   ac_save_IFS=$IFS; IFS=$ac_path_separator
4554 ac_dummy="$PATH"
4555 for ac_dir in $ac_dummy; do
4556   IFS=$ac_save_IFS
4557   test -z "$ac_dir" && ac_dir=.
4558   $as_executable_p "$ac_dir/$ac_word" || continue
4559 ac_cv_prog_CTAGS="$ac_prog"
4560 echo "$as_me:4560: found $ac_dir/$ac_word" >&5
4561 break
4562 done
4563
4564 fi
4565 fi
4566 CTAGS=$ac_cv_prog_CTAGS
4567 if test -n "$CTAGS"; then
4568   echo "$as_me:4568: result: $CTAGS" >&5
4569 echo "${ECHO_T}$CTAGS" >&6
4570 else
4571   echo "$as_me:4571: result: no" >&5
4572 echo "${ECHO_T}no" >&6
4573 fi
4574
4575   test -n "$CTAGS" && break
4576 done
4577
4578 for ac_prog in exetags etags
4579 do
4580   # Extract the first word of "$ac_prog", so it can be a program name with args.
4581 set dummy $ac_prog; ac_word=$2
4582 echo "$as_me:4582: checking for $ac_word" >&5
4583 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4584 if test "${ac_cv_prog_ETAGS+set}" = set; then
4585   echo $ECHO_N "(cached) $ECHO_C" >&6
4586 else
4587   if test -n "$ETAGS"; then
4588   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4589 else
4590   ac_save_IFS=$IFS; IFS=$ac_path_separator
4591 ac_dummy="$PATH"
4592 for ac_dir in $ac_dummy; do
4593   IFS=$ac_save_IFS
4594   test -z "$ac_dir" && ac_dir=.
4595   $as_executable_p "$ac_dir/$ac_word" || continue
4596 ac_cv_prog_ETAGS="$ac_prog"
4597 echo "$as_me:4597: found $ac_dir/$ac_word" >&5
4598 break
4599 done
4600
4601 fi
4602 fi
4603 ETAGS=$ac_cv_prog_ETAGS
4604 if test -n "$ETAGS"; then
4605   echo "$as_me:4605: result: $ETAGS" >&5
4606 echo "${ECHO_T}$ETAGS" >&6
4607 else
4608   echo "$as_me:4608: result: no" >&5
4609 echo "${ECHO_T}no" >&6
4610 fi
4611
4612   test -n "$ETAGS" && break
4613 done
4614
4615 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4616 set dummy ${CTAGS:-ctags}; ac_word=$2
4617 echo "$as_me:4617: checking for $ac_word" >&5
4618 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4619 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4620   echo $ECHO_N "(cached) $ECHO_C" >&6
4621 else
4622   if test -n "$MAKE_LOWER_TAGS"; then
4623   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4624 else
4625   ac_save_IFS=$IFS; IFS=$ac_path_separator
4626 ac_dummy="$PATH"
4627 for ac_dir in $ac_dummy; do
4628   IFS=$ac_save_IFS
4629   test -z "$ac_dir" && ac_dir=.
4630   $as_executable_p "$ac_dir/$ac_word" || continue
4631 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4632 echo "$as_me:4632: found $ac_dir/$ac_word" >&5
4633 break
4634 done
4635
4636   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4637 fi
4638 fi
4639 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4640 if test -n "$MAKE_LOWER_TAGS"; then
4641   echo "$as_me:4641: result: $MAKE_LOWER_TAGS" >&5
4642 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4643 else
4644   echo "$as_me:4644: result: no" >&5
4645 echo "${ECHO_T}no" >&6
4646 fi
4647
4648 if test "$cf_cv_mixedcase" = yes ; then
4649         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4650 set dummy ${ETAGS:-etags}; ac_word=$2
4651 echo "$as_me:4651: checking for $ac_word" >&5
4652 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4653 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4654   echo $ECHO_N "(cached) $ECHO_C" >&6
4655 else
4656   if test -n "$MAKE_UPPER_TAGS"; then
4657   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4658 else
4659   ac_save_IFS=$IFS; IFS=$ac_path_separator
4660 ac_dummy="$PATH"
4661 for ac_dir in $ac_dummy; do
4662   IFS=$ac_save_IFS
4663   test -z "$ac_dir" && ac_dir=.
4664   $as_executable_p "$ac_dir/$ac_word" || continue
4665 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4666 echo "$as_me:4666: found $ac_dir/$ac_word" >&5
4667 break
4668 done
4669
4670   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4671 fi
4672 fi
4673 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4674 if test -n "$MAKE_UPPER_TAGS"; then
4675   echo "$as_me:4675: result: $MAKE_UPPER_TAGS" >&5
4676 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4677 else
4678   echo "$as_me:4678: result: no" >&5
4679 echo "${ECHO_T}no" >&6
4680 fi
4681
4682 else
4683         MAKE_UPPER_TAGS=no
4684 fi
4685
4686 if test "$MAKE_UPPER_TAGS" = yes ; then
4687         MAKE_UPPER_TAGS=
4688 else
4689         MAKE_UPPER_TAGS="#"
4690 fi
4691
4692 if test "$MAKE_LOWER_TAGS" = yes ; then
4693         MAKE_LOWER_TAGS=
4694 else
4695         MAKE_LOWER_TAGS="#"
4696 fi
4697
4698 echo "$as_me:4698: checking for makeflags variable" >&5
4699 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4700 if test "${cf_cv_makeflags+set}" = set; then
4701   echo $ECHO_N "(cached) $ECHO_C" >&6
4702 else
4703
4704         cf_cv_makeflags=''
4705         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4706         do
4707                 cat >cf_makeflags.tmp <<CF_EOF
4708 SHELL = $SHELL
4709 all :
4710         @ echo '.$cf_option'
4711 CF_EOF
4712                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4713                 case "$cf_result" in
4714                 (.*k|.*kw)
4715                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4716                         case "$cf_result" in
4717                         (.*CC=*)        cf_cv_makeflags=
4718                                 ;;
4719                         (*)     cf_cv_makeflags=$cf_option
4720                                 ;;
4721                         esac
4722                         break
4723                         ;;
4724                 (.-)
4725                         ;;
4726                 (*)
4727
4728 echo "${as_me:-configure}:4728: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4729
4730                         ;;
4731                 esac
4732         done
4733         rm -f cf_makeflags.tmp
4734
4735 fi
4736 echo "$as_me:4736: result: $cf_cv_makeflags" >&5
4737 echo "${ECHO_T}$cf_cv_makeflags" >&6
4738
4739 if test -n "$ac_tool_prefix"; then
4740   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4741 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4742 echo "$as_me:4742: checking for $ac_word" >&5
4743 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4744 if test "${ac_cv_prog_RANLIB+set}" = set; then
4745   echo $ECHO_N "(cached) $ECHO_C" >&6
4746 else
4747   if test -n "$RANLIB"; then
4748   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4749 else
4750   ac_save_IFS=$IFS; IFS=$ac_path_separator
4751 ac_dummy="$PATH"
4752 for ac_dir in $ac_dummy; do
4753   IFS=$ac_save_IFS
4754   test -z "$ac_dir" && ac_dir=.
4755   $as_executable_p "$ac_dir/$ac_word" || continue
4756 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4757 echo "$as_me:4757: found $ac_dir/$ac_word" >&5
4758 break
4759 done
4760
4761 fi
4762 fi
4763 RANLIB=$ac_cv_prog_RANLIB
4764 if test -n "$RANLIB"; then
4765   echo "$as_me:4765: result: $RANLIB" >&5
4766 echo "${ECHO_T}$RANLIB" >&6
4767 else
4768   echo "$as_me:4768: result: no" >&5
4769 echo "${ECHO_T}no" >&6
4770 fi
4771
4772 fi
4773 if test -z "$ac_cv_prog_RANLIB"; then
4774   ac_ct_RANLIB=$RANLIB
4775   # Extract the first word of "ranlib", so it can be a program name with args.
4776 set dummy ranlib; ac_word=$2
4777 echo "$as_me:4777: checking for $ac_word" >&5
4778 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4779 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4780   echo $ECHO_N "(cached) $ECHO_C" >&6
4781 else
4782   if test -n "$ac_ct_RANLIB"; then
4783   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4784 else
4785   ac_save_IFS=$IFS; IFS=$ac_path_separator
4786 ac_dummy="$PATH"
4787 for ac_dir in $ac_dummy; do
4788   IFS=$ac_save_IFS
4789   test -z "$ac_dir" && ac_dir=.
4790   $as_executable_p "$ac_dir/$ac_word" || continue
4791 ac_cv_prog_ac_ct_RANLIB="ranlib"
4792 echo "$as_me:4792: found $ac_dir/$ac_word" >&5
4793 break
4794 done
4795
4796   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4797 fi
4798 fi
4799 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4800 if test -n "$ac_ct_RANLIB"; then
4801   echo "$as_me:4801: result: $ac_ct_RANLIB" >&5
4802 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4803 else
4804   echo "$as_me:4804: result: no" >&5
4805 echo "${ECHO_T}no" >&6
4806 fi
4807
4808   RANLIB=$ac_ct_RANLIB
4809 else
4810   RANLIB="$ac_cv_prog_RANLIB"
4811 fi
4812
4813 if test -n "$ac_tool_prefix"; then
4814   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4815 set dummy ${ac_tool_prefix}ld; ac_word=$2
4816 echo "$as_me:4816: checking for $ac_word" >&5
4817 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4818 if test "${ac_cv_prog_LD+set}" = set; then
4819   echo $ECHO_N "(cached) $ECHO_C" >&6
4820 else
4821   if test -n "$LD"; then
4822   ac_cv_prog_LD="$LD" # Let the user override the test.
4823 else
4824   ac_save_IFS=$IFS; IFS=$ac_path_separator
4825 ac_dummy="$PATH"
4826 for ac_dir in $ac_dummy; do
4827   IFS=$ac_save_IFS
4828   test -z "$ac_dir" && ac_dir=.
4829   $as_executable_p "$ac_dir/$ac_word" || continue
4830 ac_cv_prog_LD="${ac_tool_prefix}ld"
4831 echo "$as_me:4831: found $ac_dir/$ac_word" >&5
4832 break
4833 done
4834
4835 fi
4836 fi
4837 LD=$ac_cv_prog_LD
4838 if test -n "$LD"; then
4839   echo "$as_me:4839: result: $LD" >&5
4840 echo "${ECHO_T}$LD" >&6
4841 else
4842   echo "$as_me:4842: result: no" >&5
4843 echo "${ECHO_T}no" >&6
4844 fi
4845
4846 fi
4847 if test -z "$ac_cv_prog_LD"; then
4848   ac_ct_LD=$LD
4849   # Extract the first word of "ld", so it can be a program name with args.
4850 set dummy ld; ac_word=$2
4851 echo "$as_me:4851: checking for $ac_word" >&5
4852 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4853 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4854   echo $ECHO_N "(cached) $ECHO_C" >&6
4855 else
4856   if test -n "$ac_ct_LD"; then
4857   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4858 else
4859   ac_save_IFS=$IFS; IFS=$ac_path_separator
4860 ac_dummy="$PATH"
4861 for ac_dir in $ac_dummy; do
4862   IFS=$ac_save_IFS
4863   test -z "$ac_dir" && ac_dir=.
4864   $as_executable_p "$ac_dir/$ac_word" || continue
4865 ac_cv_prog_ac_ct_LD="ld"
4866 echo "$as_me:4866: found $ac_dir/$ac_word" >&5
4867 break
4868 done
4869
4870   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4871 fi
4872 fi
4873 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4874 if test -n "$ac_ct_LD"; then
4875   echo "$as_me:4875: result: $ac_ct_LD" >&5
4876 echo "${ECHO_T}$ac_ct_LD" >&6
4877 else
4878   echo "$as_me:4878: result: no" >&5
4879 echo "${ECHO_T}no" >&6
4880 fi
4881
4882   LD=$ac_ct_LD
4883 else
4884   LD="$ac_cv_prog_LD"
4885 fi
4886
4887 if test -n "$ac_tool_prefix"; then
4888   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4889 set dummy ${ac_tool_prefix}ar; ac_word=$2
4890 echo "$as_me:4890: checking for $ac_word" >&5
4891 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4892 if test "${ac_cv_prog_AR+set}" = set; then
4893   echo $ECHO_N "(cached) $ECHO_C" >&6
4894 else
4895   if test -n "$AR"; then
4896   ac_cv_prog_AR="$AR" # Let the user override the test.
4897 else
4898   ac_save_IFS=$IFS; IFS=$ac_path_separator
4899 ac_dummy="$PATH"
4900 for ac_dir in $ac_dummy; do
4901   IFS=$ac_save_IFS
4902   test -z "$ac_dir" && ac_dir=.
4903   $as_executable_p "$ac_dir/$ac_word" || continue
4904 ac_cv_prog_AR="${ac_tool_prefix}ar"
4905 echo "$as_me:4905: found $ac_dir/$ac_word" >&5
4906 break
4907 done
4908
4909 fi
4910 fi
4911 AR=$ac_cv_prog_AR
4912 if test -n "$AR"; then
4913   echo "$as_me:4913: result: $AR" >&5
4914 echo "${ECHO_T}$AR" >&6
4915 else
4916   echo "$as_me:4916: result: no" >&5
4917 echo "${ECHO_T}no" >&6
4918 fi
4919
4920 fi
4921 if test -z "$ac_cv_prog_AR"; then
4922   ac_ct_AR=$AR
4923   # Extract the first word of "ar", so it can be a program name with args.
4924 set dummy ar; ac_word=$2
4925 echo "$as_me:4925: checking for $ac_word" >&5
4926 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4927 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4928   echo $ECHO_N "(cached) $ECHO_C" >&6
4929 else
4930   if test -n "$ac_ct_AR"; then
4931   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4932 else
4933   ac_save_IFS=$IFS; IFS=$ac_path_separator
4934 ac_dummy="$PATH"
4935 for ac_dir in $ac_dummy; do
4936   IFS=$ac_save_IFS
4937   test -z "$ac_dir" && ac_dir=.
4938   $as_executable_p "$ac_dir/$ac_word" || continue
4939 ac_cv_prog_ac_ct_AR="ar"
4940 echo "$as_me:4940: found $ac_dir/$ac_word" >&5
4941 break
4942 done
4943
4944   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4945 fi
4946 fi
4947 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4948 if test -n "$ac_ct_AR"; then
4949   echo "$as_me:4949: result: $ac_ct_AR" >&5
4950 echo "${ECHO_T}$ac_ct_AR" >&6
4951 else
4952   echo "$as_me:4952: result: no" >&5
4953 echo "${ECHO_T}no" >&6
4954 fi
4955
4956   AR=$ac_ct_AR
4957 else
4958   AR="$ac_cv_prog_AR"
4959 fi
4960
4961 if test -n "$ac_tool_prefix"; then
4962   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4963 set dummy ${ac_tool_prefix}nm; ac_word=$2
4964 echo "$as_me:4964: checking for $ac_word" >&5
4965 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4966 if test "${ac_cv_prog_NM+set}" = set; then
4967   echo $ECHO_N "(cached) $ECHO_C" >&6
4968 else
4969   if test -n "$NM"; then
4970   ac_cv_prog_NM="$NM" # Let the user override the test.
4971 else
4972   ac_save_IFS=$IFS; IFS=$ac_path_separator
4973 ac_dummy="$PATH"
4974 for ac_dir in $ac_dummy; do
4975   IFS=$ac_save_IFS
4976   test -z "$ac_dir" && ac_dir=.
4977   $as_executable_p "$ac_dir/$ac_word" || continue
4978 ac_cv_prog_NM="${ac_tool_prefix}nm"
4979 echo "$as_me:4979: found $ac_dir/$ac_word" >&5
4980 break
4981 done
4982
4983 fi
4984 fi
4985 NM=$ac_cv_prog_NM
4986 if test -n "$NM"; then
4987   echo "$as_me:4987: result: $NM" >&5
4988 echo "${ECHO_T}$NM" >&6
4989 else
4990   echo "$as_me:4990: result: no" >&5
4991 echo "${ECHO_T}no" >&6
4992 fi
4993
4994 fi
4995 if test -z "$ac_cv_prog_NM"; then
4996   ac_ct_NM=$NM
4997   # Extract the first word of "nm", so it can be a program name with args.
4998 set dummy nm; ac_word=$2
4999 echo "$as_me:4999: checking for $ac_word" >&5
5000 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5001 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
5002   echo $ECHO_N "(cached) $ECHO_C" >&6
5003 else
5004   if test -n "$ac_ct_NM"; then
5005   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
5006 else
5007   ac_save_IFS=$IFS; IFS=$ac_path_separator
5008 ac_dummy="$PATH"
5009 for ac_dir in $ac_dummy; do
5010   IFS=$ac_save_IFS
5011   test -z "$ac_dir" && ac_dir=.
5012   $as_executable_p "$ac_dir/$ac_word" || continue
5013 ac_cv_prog_ac_ct_NM="nm"
5014 echo "$as_me:5014: found $ac_dir/$ac_word" >&5
5015 break
5016 done
5017
5018   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
5019 fi
5020 fi
5021 ac_ct_NM=$ac_cv_prog_ac_ct_NM
5022 if test -n "$ac_ct_NM"; then
5023   echo "$as_me:5023: result: $ac_ct_NM" >&5
5024 echo "${ECHO_T}$ac_ct_NM" >&6
5025 else
5026   echo "$as_me:5026: result: no" >&5
5027 echo "${ECHO_T}no" >&6
5028 fi
5029
5030   NM=$ac_ct_NM
5031 else
5032   NM="$ac_cv_prog_NM"
5033 fi
5034
5035 if test -n "$ac_tool_prefix"; then
5036   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5037 set dummy ${ac_tool_prefix}ar; ac_word=$2
5038 echo "$as_me:5038: checking for $ac_word" >&5
5039 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5040 if test "${ac_cv_prog_AR+set}" = set; then
5041   echo $ECHO_N "(cached) $ECHO_C" >&6
5042 else
5043   if test -n "$AR"; then
5044   ac_cv_prog_AR="$AR" # Let the user override the test.
5045 else
5046   ac_save_IFS=$IFS; IFS=$ac_path_separator
5047 ac_dummy="$PATH"
5048 for ac_dir in $ac_dummy; do
5049   IFS=$ac_save_IFS
5050   test -z "$ac_dir" && ac_dir=.
5051   $as_executable_p "$ac_dir/$ac_word" || continue
5052 ac_cv_prog_AR="${ac_tool_prefix}ar"
5053 echo "$as_me:5053: found $ac_dir/$ac_word" >&5
5054 break
5055 done
5056
5057 fi
5058 fi
5059 AR=$ac_cv_prog_AR
5060 if test -n "$AR"; then
5061   echo "$as_me:5061: result: $AR" >&5
5062 echo "${ECHO_T}$AR" >&6
5063 else
5064   echo "$as_me:5064: result: no" >&5
5065 echo "${ECHO_T}no" >&6
5066 fi
5067
5068 fi
5069 if test -z "$ac_cv_prog_AR"; then
5070   ac_ct_AR=$AR
5071   # Extract the first word of "ar", so it can be a program name with args.
5072 set dummy ar; ac_word=$2
5073 echo "$as_me:5073: checking for $ac_word" >&5
5074 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5075 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
5076   echo $ECHO_N "(cached) $ECHO_C" >&6
5077 else
5078   if test -n "$ac_ct_AR"; then
5079   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5080 else
5081   ac_save_IFS=$IFS; IFS=$ac_path_separator
5082 ac_dummy="$PATH"
5083 for ac_dir in $ac_dummy; do
5084   IFS=$ac_save_IFS
5085   test -z "$ac_dir" && ac_dir=.
5086   $as_executable_p "$ac_dir/$ac_word" || continue
5087 ac_cv_prog_ac_ct_AR="ar"
5088 echo "$as_me:5088: found $ac_dir/$ac_word" >&5
5089 break
5090 done
5091
5092   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5093 fi
5094 fi
5095 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5096 if test -n "$ac_ct_AR"; then
5097   echo "$as_me:5097: result: $ac_ct_AR" >&5
5098 echo "${ECHO_T}$ac_ct_AR" >&6
5099 else
5100   echo "$as_me:5100: result: no" >&5
5101 echo "${ECHO_T}no" >&6
5102 fi
5103
5104   AR=$ac_ct_AR
5105 else
5106   AR="$ac_cv_prog_AR"
5107 fi
5108
5109 echo "$as_me:5109: checking for options to update archives" >&5
5110 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
5111 if test "${cf_cv_ar_flags+set}" = set; then
5112   echo $ECHO_N "(cached) $ECHO_C" >&6
5113 else
5114
5115         case "$cf_cv_system_name" in
5116         (*-msvc*)
5117                 cf_cv_ar_flags=''
5118                 cat >mk_static_lib.sh <<-EOF
5119                 #!$SHELL
5120                 MSVC_BIN="$AR"
5121                 out="\$1"
5122                 shift
5123                 exec \$MSVC_BIN -out:"\$out" \$@
5124                 EOF
5125                 chmod +x mk_static_lib.sh
5126                 AR=`pwd`/mk_static_lib.sh
5127                 ;;
5128         (*)
5129                 cf_cv_ar_flags=unknown
5130                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
5131                 do
5132
5133                         # check if $ARFLAGS already contains this choice
5134                         if test "x$ARFLAGS" != "x" ; then
5135                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
5136                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
5137                                         cf_cv_ar_flags=
5138                                         break
5139                                 fi
5140                         fi
5141
5142                         rm -f "conftest.$ac_cv_objext"
5143                         rm -f conftest.a
5144
5145                         cat >"conftest.$ac_ext" <<EOF
5146 #line 5146 "configure"
5147 int     testdata[3] = { 123, 456, 789 };
5148 EOF
5149                         if { (eval echo "$as_me:5149: \"$ac_compile\"") >&5
5150   (eval $ac_compile) 2>&5
5151   ac_status=$?
5152   echo "$as_me:5152: \$? = $ac_status" >&5
5153   (exit "$ac_status"); } ; then
5154                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5155                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5156                                 if test -f conftest.a ; then
5157                                         cf_cv_ar_flags="$cf_ar_flags"
5158                                         break
5159                                 fi
5160                         else
5161                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5162
5163 echo "${as_me:-configure}:5163: testing cannot compile test-program ..." 1>&5
5164
5165                                 break
5166                         fi
5167                 done
5168                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5169                 ;;
5170         esac
5171
5172 fi
5173 echo "$as_me:5173: result: $cf_cv_ar_flags" >&5
5174 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5175
5176 if test -n "$ARFLAGS" ; then
5177         if test -n "$cf_cv_ar_flags" ; then
5178                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5179         fi
5180 else
5181         ARFLAGS=$cf_cv_ar_flags
5182 fi
5183
5184 echo "$as_me:5184: checking for an installation directory prefix" >&5
5185 echo $ECHO_N "checking for an installation directory prefix... $ECHO_C" >&6
5186
5187 # Check whether --with-install-prefix or --without-install-prefix was given.
5188 if test "${with_install_prefix+set}" = set; then
5189   withval="$with_install_prefix"
5190   case "x$withval" in
5191         (xyes|xno)
5192                 ;;
5193         (*)     DESTDIR="$withval"
5194                 ;;
5195         esac
5196 fi;
5197 echo "$as_me:5197: result: ${DESTDIR:-(none)}" >&5
5198 echo "${ECHO_T}${DESTDIR:-(none)}" >&6
5199
5200 ###############################################################################
5201
5202 # If we're cross-compiling, allow the user to override the tools and their
5203 # options.  The configure script is oriented toward identifying the host
5204 # compiler, etc., but we need a build compiler to generate parts of the source.
5205
5206 case "$cf_cv_system_name" in
5207 (*-msvc*)
5208         LDFLAGS="$LDFLAGS user32.lib"
5209         export LDFLAGS
5210         ;;
5211 esac
5212
5213 if test "$cross_compiling" = yes ; then
5214
5215         # defaults that we might want to override
5216         : ${BUILD_CFLAGS:=''}
5217         : ${BUILD_CPPFLAGS:=''}
5218         : ${BUILD_LDFLAGS:=''}
5219         : ${BUILD_LIBS:=''}
5220         : ${BUILD_EXEEXT:='$x'}
5221         : ${BUILD_OBJEXT:='o'}
5222
5223 # Check whether --with-build-cc or --without-build-cc was given.
5224 if test "${with_build_cc+set}" = set; then
5225   withval="$with_build_cc"
5226   BUILD_CC="$withval"
5227 else
5228   for ac_prog in gcc clang c99 c89 cc cl
5229 do
5230   # Extract the first word of "$ac_prog", so it can be a program name with args.
5231 set dummy $ac_prog; ac_word=$2
5232 echo "$as_me:5232: checking for $ac_word" >&5
5233 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5234 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5235   echo $ECHO_N "(cached) $ECHO_C" >&6
5236 else
5237   if test -n "$BUILD_CC"; then
5238   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5239 else
5240   ac_save_IFS=$IFS; IFS=$ac_path_separator
5241 ac_dummy="$PATH"
5242 for ac_dir in $ac_dummy; do
5243   IFS=$ac_save_IFS
5244   test -z "$ac_dir" && ac_dir=.
5245   $as_executable_p "$ac_dir/$ac_word" || continue
5246 ac_cv_prog_BUILD_CC="$ac_prog"
5247 echo "$as_me:5247: found $ac_dir/$ac_word" >&5
5248 break
5249 done
5250
5251 fi
5252 fi
5253 BUILD_CC=$ac_cv_prog_BUILD_CC
5254 if test -n "$BUILD_CC"; then
5255   echo "$as_me:5255: result: $BUILD_CC" >&5
5256 echo "${ECHO_T}$BUILD_CC" >&6
5257 else
5258   echo "$as_me:5258: result: no" >&5
5259 echo "${ECHO_T}no" >&6
5260 fi
5261
5262   test -n "$BUILD_CC" && break
5263 done
5264 test -n "$BUILD_CC" || BUILD_CC="none"
5265
5266 fi;
5267         echo "$as_me:5267: checking for native build C compiler" >&5
5268 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5269         echo "$as_me:5269: result: $BUILD_CC" >&5
5270 echo "${ECHO_T}$BUILD_CC" >&6
5271
5272         echo "$as_me:5272: checking for native build C preprocessor" >&5
5273 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5274
5275 # Check whether --with-build-cpp or --without-build-cpp was given.
5276 if test "${with_build_cpp+set}" = set; then
5277   withval="$with_build_cpp"
5278   BUILD_CPP="$withval"
5279 else
5280   BUILD_CPP='${BUILD_CC} -E'
5281 fi;
5282         echo "$as_me:5282: result: $BUILD_CPP" >&5
5283 echo "${ECHO_T}$BUILD_CPP" >&6
5284
5285         echo "$as_me:5285: checking for native build C flags" >&5
5286 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5287
5288 # Check whether --with-build-cflags or --without-build-cflags was given.
5289 if test "${with_build_cflags+set}" = set; then
5290   withval="$with_build_cflags"
5291   BUILD_CFLAGS="$withval"
5292 fi;
5293         echo "$as_me:5293: result: $BUILD_CFLAGS" >&5
5294 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5295
5296         echo "$as_me:5296: checking for native build C preprocessor-flags" >&5
5297 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5298
5299 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5300 if test "${with_build_cppflags+set}" = set; then
5301   withval="$with_build_cppflags"
5302   BUILD_CPPFLAGS="$withval"
5303 fi;
5304         echo "$as_me:5304: result: $BUILD_CPPFLAGS" >&5
5305 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5306
5307         echo "$as_me:5307: checking for native build linker-flags" >&5
5308 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5309
5310 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5311 if test "${with_build_ldflags+set}" = set; then
5312   withval="$with_build_ldflags"
5313   BUILD_LDFLAGS="$withval"
5314 fi;
5315         echo "$as_me:5315: result: $BUILD_LDFLAGS" >&5
5316 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5317
5318         echo "$as_me:5318: checking for native build linker-libraries" >&5
5319 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5320
5321 # Check whether --with-build-libs or --without-build-libs was given.
5322 if test "${with_build_libs+set}" = set; then
5323   withval="$with_build_libs"
5324   BUILD_LIBS="$withval"
5325 fi;
5326         echo "$as_me:5326: result: $BUILD_LIBS" >&5
5327 echo "${ECHO_T}$BUILD_LIBS" >&6
5328
5329         # this assumes we're on Unix.
5330         BUILD_EXEEXT=
5331         BUILD_OBJEXT=o
5332
5333         : ${BUILD_CC:='${CC}'}
5334
5335         echo "$as_me:5335: checking if the build-compiler \"$BUILD_CC\" works" >&5
5336 echo $ECHO_N "checking if the build-compiler \"$BUILD_CC\" works... $ECHO_C" >&6
5337
5338         cf_save_crossed=$cross_compiling
5339         cf_save_ac_link=$ac_link
5340         cross_compiling=no
5341         cf_build_cppflags=$BUILD_CPPFLAGS
5342         test "$cf_build_cppflags" = "#" && cf_build_cppflags=
5343         ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $cf_build_cppflags $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&5'
5344
5345         if test "$cross_compiling" = yes; then
5346   cf_ok_build_cc=unknown
5347 else
5348   cat >"conftest.$ac_ext" <<_ACEOF
5349 #line 5349 "configure"
5350 #include "confdefs.h"
5351 #include <stdio.h>
5352                 int main(int argc, char *argv[])
5353                 {
5354                         ${cf_cv_main_return:-return}(argc < 0 || argv == 0 || argv[0] == 0);
5355                 }
5356
5357 _ACEOF
5358 rm -f "conftest$ac_exeext"
5359 if { (eval echo "$as_me:5359: \"$ac_link\"") >&5
5360   (eval $ac_link) 2>&5
5361   ac_status=$?
5362   echo "$as_me:5362: \$? = $ac_status" >&5
5363   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
5364   { (eval echo "$as_me:5364: \"$ac_try\"") >&5
5365   (eval $ac_try) 2>&5
5366   ac_status=$?
5367   echo "$as_me:5367: \$? = $ac_status" >&5
5368   (exit "$ac_status"); }; }; then
5369   cf_ok_build_cc=yes
5370 else
5371   echo "$as_me: program exited with status $ac_status" >&5
5372 echo "$as_me: failed program was:" >&5
5373 cat "conftest.$ac_ext" >&5
5374 cf_ok_build_cc=no
5375 fi
5376 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
5377 fi
5378
5379         cross_compiling=$cf_save_crossed
5380         ac_link=$cf_save_ac_link
5381
5382         echo "$as_me:5382: result: $cf_ok_build_cc" >&5
5383 echo "${ECHO_T}$cf_ok_build_cc" >&6
5384
5385         if test "$cf_ok_build_cc" != yes
5386         then
5387                 { { echo "$as_me:5387: error: Cross-build requires two compilers.
5388 Use --with-build-cc to specify the native compiler." >&5
5389 echo "$as_me: error: Cross-build requires two compilers.
5390 Use --with-build-cc to specify the native compiler." >&2;}
5391    { (exit 1); exit 1; }; }
5392         fi
5393
5394 else
5395         : ${BUILD_CC:='${CC}'}
5396         : ${BUILD_CPP:='${CPP}'}
5397         : ${BUILD_CFLAGS:='${CFLAGS}'}
5398         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5399         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5400         : ${BUILD_LIBS:='${LIBS}'}
5401         : ${BUILD_EXEEXT:='$x'}
5402         : ${BUILD_OBJEXT:='o'}
5403 fi
5404
5405 ###############################################################################
5406
5407 ### Options to allow the user to specify the set of libraries which are used.
5408 ### Use "--without-normal --with-shared" to allow the default model to be
5409 ### shared, for example.
5410 cf_list_models=""
5411
5412 echo "$as_me:5412: checking if libtool -version-number should be used" >&5
5413 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5414
5415 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5416 if test "${enable_libtool_version+set}" = set; then
5417   enableval="$enable_libtool_version"
5418   test "$enableval" != no && enableval=yes
5419         if test "$enableval" != "yes" ; then
5420     cf_libtool_version=no
5421         else
5422                 cf_libtool_version=yes
5423         fi
5424 else
5425   enableval=yes
5426         cf_libtool_version=yes
5427
5428 fi;
5429 echo "$as_me:5429: result: $cf_libtool_version" >&5
5430 echo "${ECHO_T}$cf_libtool_version" >&6
5431
5432 if test "$cf_libtool_version" = yes ; then
5433         LIBTOOL_VERSION="-version-number"
5434 else
5435         LIBTOOL_VERSION="-version-info"
5436         case "x$VERSION" in
5437         (x)
5438                 { echo "$as_me:5438: WARNING: VERSION was not set" >&5
5439 echo "$as_me: WARNING: VERSION was not set" >&2;}
5440                 ;;
5441         (x*.*.*)
5442                 ABI_VERSION="$VERSION"
5443                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5444
5445 echo "${as_me:-configure}:5445: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5446
5447                 ;;
5448         (x*:*:*)
5449                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5450                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5451
5452 echo "${as_me:-configure}:5452: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5453
5454                 ;;
5455         (*)
5456                 { echo "$as_me:5456: WARNING: unexpected VERSION value: $VERSION" >&5
5457 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5458                 ;;
5459         esac
5460 fi
5461
5462 LIBTOOL=
5463
5464 # common library maintenance symbols that are convenient for libtool scripts:
5465 LIB_CREATE='${AR} -cr'
5466 LIB_OBJECT='${OBJECTS}'
5467 LIB_SUFFIX=.a
5468 LIB_PREP="$RANLIB"
5469
5470 # symbols used to prop libtool up to enable it to determine what it should be
5471 # doing:
5472 LIB_CLEAN=
5473 LIB_COMPILE=
5474 LIB_LINK='${CC}'
5475 LIB_INSTALL=
5476 LIB_UNINSTALL=
5477
5478 echo "$as_me:5478: checking if you want to build libraries with libtool" >&5
5479 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5480
5481 # Check whether --with-libtool or --without-libtool was given.
5482 if test "${with_libtool+set}" = set; then
5483   withval="$with_libtool"
5484   with_libtool=$withval
5485 else
5486   with_libtool=no
5487 fi;
5488 echo "$as_me:5488: result: $with_libtool" >&5
5489 echo "${ECHO_T}$with_libtool" >&6
5490 if test "$with_libtool" != "no"; then
5491
5492         if test "$with_libtool" != "yes" ; then
5493
5494 if test "x$prefix" != xNONE; then
5495         cf_path_syntax="$prefix"
5496 else
5497         cf_path_syntax="$ac_default_prefix"
5498 fi
5499
5500 case ".$with_libtool" in
5501 (.\$\(*\)*|.\'*\'*)
5502         ;;
5503 (..|./*|.\\*)
5504         ;;
5505 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5506         ;;
5507 (.\$\{*prefix\}*|.\$\{*dir\}*)
5508         eval with_libtool="$with_libtool"
5509         case ".$with_libtool" in
5510         (.NONE/*)
5511                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5512                 ;;
5513         esac
5514         ;;
5515 (.no|.NONE/*)
5516         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5517         ;;
5518 (*)
5519         { { echo "$as_me:5519: error: expected a pathname, not \"$with_libtool\"" >&5
5520 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5521    { (exit 1); exit 1; }; }
5522         ;;
5523 esac
5524
5525                 LIBTOOL=$with_libtool
5526         else
5527                 if test -n "$ac_tool_prefix"; then
5528   for ac_prog in libtool glibtool
5529   do
5530     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5531 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5532 echo "$as_me:5532: checking for $ac_word" >&5
5533 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5534 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5535   echo $ECHO_N "(cached) $ECHO_C" >&6
5536 else
5537   if test -n "$LIBTOOL"; then
5538   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5539 else
5540   ac_save_IFS=$IFS; IFS=$ac_path_separator
5541 ac_dummy="$PATH"
5542 for ac_dir in $ac_dummy; do
5543   IFS=$ac_save_IFS
5544   test -z "$ac_dir" && ac_dir=.
5545   $as_executable_p "$ac_dir/$ac_word" || continue
5546 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5547 echo "$as_me:5547: found $ac_dir/$ac_word" >&5
5548 break
5549 done
5550
5551 fi
5552 fi
5553 LIBTOOL=$ac_cv_prog_LIBTOOL
5554 if test -n "$LIBTOOL"; then
5555   echo "$as_me:5555: result: $LIBTOOL" >&5
5556 echo "${ECHO_T}$LIBTOOL" >&6
5557 else
5558   echo "$as_me:5558: result: no" >&5
5559 echo "${ECHO_T}no" >&6
5560 fi
5561
5562     test -n "$LIBTOOL" && break
5563   done
5564 fi
5565 if test -z "$LIBTOOL"; then
5566   ac_ct_LIBTOOL=$LIBTOOL
5567   for ac_prog in libtool glibtool
5568 do
5569   # Extract the first word of "$ac_prog", so it can be a program name with args.
5570 set dummy $ac_prog; ac_word=$2
5571 echo "$as_me:5571: checking for $ac_word" >&5
5572 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5573 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5574   echo $ECHO_N "(cached) $ECHO_C" >&6
5575 else
5576   if test -n "$ac_ct_LIBTOOL"; then
5577   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5578 else
5579   ac_save_IFS=$IFS; IFS=$ac_path_separator
5580 ac_dummy="$PATH"
5581 for ac_dir in $ac_dummy; do
5582   IFS=$ac_save_IFS
5583   test -z "$ac_dir" && ac_dir=.
5584   $as_executable_p "$ac_dir/$ac_word" || continue
5585 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5586 echo "$as_me:5586: found $ac_dir/$ac_word" >&5
5587 break
5588 done
5589
5590 fi
5591 fi
5592 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5593 if test -n "$ac_ct_LIBTOOL"; then
5594   echo "$as_me:5594: result: $ac_ct_LIBTOOL" >&5
5595 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5596 else
5597   echo "$as_me:5597: result: no" >&5
5598 echo "${ECHO_T}no" >&6
5599 fi
5600
5601   test -n "$ac_ct_LIBTOOL" && break
5602 done
5603 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5604
5605   LIBTOOL=$ac_ct_LIBTOOL
5606 fi
5607
5608 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5609 then
5610         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.].*//'`
5611 else
5612         cf_cv_libtool_version=
5613 fi
5614 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5615
5616                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5617                 then
5618
5619 unset ac_cv_prog_ac_ct_LIBTOOL
5620 unset ac_ct_LIBTOOL
5621 unset LIBTOOL
5622
5623                         if test -n "$ac_tool_prefix"; then
5624   for ac_prog in glibtool
5625   do
5626     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5627 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5628 echo "$as_me:5628: checking for $ac_word" >&5
5629 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5630 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5631   echo $ECHO_N "(cached) $ECHO_C" >&6
5632 else
5633   if test -n "$LIBTOOL"; then
5634   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5635 else
5636   ac_save_IFS=$IFS; IFS=$ac_path_separator
5637 ac_dummy="$PATH"
5638 for ac_dir in $ac_dummy; do
5639   IFS=$ac_save_IFS
5640   test -z "$ac_dir" && ac_dir=.
5641   $as_executable_p "$ac_dir/$ac_word" || continue
5642 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5643 echo "$as_me:5643: found $ac_dir/$ac_word" >&5
5644 break
5645 done
5646
5647 fi
5648 fi
5649 LIBTOOL=$ac_cv_prog_LIBTOOL
5650 if test -n "$LIBTOOL"; then
5651   echo "$as_me:5651: result: $LIBTOOL" >&5
5652 echo "${ECHO_T}$LIBTOOL" >&6
5653 else
5654   echo "$as_me:5654: result: no" >&5
5655 echo "${ECHO_T}no" >&6
5656 fi
5657
5658     test -n "$LIBTOOL" && break
5659   done
5660 fi
5661 if test -z "$LIBTOOL"; then
5662   ac_ct_LIBTOOL=$LIBTOOL
5663   for ac_prog in glibtool
5664 do
5665   # Extract the first word of "$ac_prog", so it can be a program name with args.
5666 set dummy $ac_prog; ac_word=$2
5667 echo "$as_me:5667: checking for $ac_word" >&5
5668 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5669 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5670   echo $ECHO_N "(cached) $ECHO_C" >&6
5671 else
5672   if test -n "$ac_ct_LIBTOOL"; then
5673   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5674 else
5675   ac_save_IFS=$IFS; IFS=$ac_path_separator
5676 ac_dummy="$PATH"
5677 for ac_dir in $ac_dummy; do
5678   IFS=$ac_save_IFS
5679   test -z "$ac_dir" && ac_dir=.
5680   $as_executable_p "$ac_dir/$ac_word" || continue
5681 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5682 echo "$as_me:5682: found $ac_dir/$ac_word" >&5
5683 break
5684 done
5685
5686 fi
5687 fi
5688 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5689 if test -n "$ac_ct_LIBTOOL"; then
5690   echo "$as_me:5690: result: $ac_ct_LIBTOOL" >&5
5691 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5692 else
5693   echo "$as_me:5693: result: no" >&5
5694 echo "${ECHO_T}no" >&6
5695 fi
5696
5697   test -n "$ac_ct_LIBTOOL" && break
5698 done
5699 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5700
5701   LIBTOOL=$ac_ct_LIBTOOL
5702 fi
5703
5704 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5705 then
5706         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.].*//'`
5707 else
5708         cf_cv_libtool_version=
5709 fi
5710 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5711
5712                 fi
5713         fi
5714         if test -z "$LIBTOOL" ; then
5715                 { { echo "$as_me:5715: error: Cannot find libtool" >&5
5716 echo "$as_me: error: Cannot find libtool" >&2;}
5717    { (exit 1); exit 1; }; }
5718         fi
5719         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5720         LIB_OBJECT='${OBJECTS:.o=.lo}'
5721         LIB_SUFFIX=.la
5722         LIB_CLEAN='${LIBTOOL} --mode=clean'
5723         LIB_COMPILE='${LIBTOOL} --mode=compile'
5724         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5725         LIB_INSTALL='${LIBTOOL} --mode=install'
5726         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5727         LIB_PREP=:
5728
5729 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5730 then
5731         echo "$as_me:5731: checking version of $LIBTOOL" >&5
5732 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5733
5734 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5735 then
5736         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.].*//'`
5737 else
5738         cf_cv_libtool_version=
5739 fi
5740 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5741
5742         echo "$as_me:5742: result: $cf_cv_libtool_version" >&5
5743 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5744         if test -n "$cf_cv_libtool_version"
5745         then
5746                 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
5747                 case "x$cf_check_libtool_version" in
5748                 (*...GNU-libtool...*)
5749                         ;;
5750                 (*)
5751                         { { echo "$as_me:5751: error: This is not GNU libtool" >&5
5752 echo "$as_me: error: This is not GNU libtool" >&2;}
5753    { (exit 1); exit 1; }; }
5754                         ;;
5755                 esac
5756         else
5757                 { { echo "$as_me:5757: error: No version found for $LIBTOOL" >&5
5758 echo "$as_me: error: No version found for $LIBTOOL" >&2;}
5759    { (exit 1); exit 1; }; }
5760         fi
5761 else
5762         { { echo "$as_me:5762: error: GNU libtool has not been found" >&5
5763 echo "$as_me: error: GNU libtool has not been found" >&2;}
5764    { (exit 1); exit 1; }; }
5765 fi
5766
5767         # special hack to add -no-undefined (which libtool should do for itself)
5768         LT_UNDEF=
5769         case "$cf_cv_system_name" in
5770         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5771                 LT_UNDEF=-no-undefined
5772                 ;;
5773         esac
5774
5775         # special hack to add --tag option for C++ compiler
5776         case "$cf_cv_libtool_version" in
5777         (1.[5-9]*|[2-9].[0-9.a-z]*)
5778                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5779                 LIBTOOL="$LIBTOOL --tag=CC"
5780                 ;;
5781         (*)
5782                 LIBTOOL_CXX="$LIBTOOL"
5783                 ;;
5784         esac
5785 else
5786         LIBTOOL=""
5787         LIBTOOL_CXX=""
5788 fi
5789
5790 test -z "$LIBTOOL" && ECHO_LT=
5791
5792 if test "$with_libtool" != "no" ; then
5793
5794 cf_list_models="$cf_list_models libtool"
5795
5796 else
5797
5798 echo "$as_me:5798: checking if you want to build shared libraries" >&5
5799 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5800
5801 # Check whether --with-shared or --without-shared was given.
5802 if test "${with_shared+set}" = set; then
5803   withval="$with_shared"
5804   with_shared=$withval
5805 else
5806   with_shared=no
5807 fi;
5808 echo "$as_me:5808: result: $with_shared" >&5
5809 echo "${ECHO_T}$with_shared" >&6
5810 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5811
5812 echo "$as_me:5812: checking if you want to build static libraries" >&5
5813 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5814
5815 # Check whether --with-normal or --without-normal was given.
5816 if test "${with_normal+set}" = set; then
5817   withval="$with_normal"
5818   with_normal=$withval
5819 else
5820   with_normal=yes
5821 fi;
5822 echo "$as_me:5822: result: $with_normal" >&5
5823 echo "${ECHO_T}$with_normal" >&6
5824 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5825
5826 echo "$as_me:5826: checking if you want to build debug libraries" >&5
5827 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5828
5829 # Check whether --with-debug or --without-debug was given.
5830 if test "${with_debug+set}" = set; then
5831   withval="$with_debug"
5832   with_debug=$withval
5833 else
5834   with_debug=yes
5835 fi;
5836 echo "$as_me:5836: result: $with_debug" >&5
5837 echo "${ECHO_T}$with_debug" >&6
5838 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5839
5840 echo "$as_me:5840: checking if you want to build profiling libraries" >&5
5841 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5842
5843 # Check whether --with-profile or --without-profile was given.
5844 if test "${with_profile+set}" = set; then
5845   withval="$with_profile"
5846   with_profile=$withval
5847 else
5848   with_profile=no
5849 fi;
5850 echo "$as_me:5850: result: $with_profile" >&5
5851 echo "${ECHO_T}$with_profile" >&6
5852 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5853
5854 fi
5855
5856 if test "X$cf_with_cxx_binding" != Xno; then
5857 if test "x$with_shared" = "xyes"; then
5858 echo "$as_me:5858: checking if you want to build C++ shared libraries" >&5
5859 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5860
5861 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5862 if test "${with_cxx_shared+set}" = set; then
5863   withval="$with_cxx_shared"
5864   with_shared_cxx=$withval
5865 else
5866   with_shared_cxx=no
5867 fi;
5868 echo "$as_me:5868: result: $with_shared_cxx" >&5
5869 echo "${ECHO_T}$with_shared_cxx" >&6
5870 fi
5871 fi
5872
5873 ###############################################################################
5874
5875 echo "$as_me:5875: checking for specified models" >&5
5876 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5877 test -z "$cf_list_models" && cf_list_models=normal
5878 test "$with_libtool" != "no" && cf_list_models=libtool
5879 echo "$as_me:5879: result: $cf_list_models" >&5
5880 echo "${ECHO_T}$cf_list_models" >&6
5881
5882 ### Use the first model as the default, and save its suffix for use in building
5883 ### up test-applications.
5884 echo "$as_me:5884: checking for default model" >&5
5885 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5886 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5887 echo "$as_me:5887: result: $DFT_LWR_MODEL" >&5
5888 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5889
5890 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5891
5892 TICS_NAME=tic
5893
5894 TINFO_NAME=tinfo
5895
5896 LIB_NAME=ncurses
5897
5898 LIB_DIR=../lib
5899 LIB_2ND=../../lib
5900
5901 echo "$as_me:5901: checking if you want to have a library-prefix" >&5
5902 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5903
5904 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5905 if test "${with_lib_prefix+set}" = set; then
5906   withval="$with_lib_prefix"
5907   with_lib_prefix=$withval
5908 else
5909   with_lib_prefix=auto
5910 fi;
5911 echo "$as_me:5911: result: $with_lib_prefix" >&5
5912 echo "${ECHO_T}$with_lib_prefix" >&6
5913
5914 if test "$with_lib_prefix" = auto
5915 then
5916
5917         case "$cf_cv_system_name" in
5918         (OS/2*|os2*)
5919                 if test "$DFT_LWR_MODEL" = libtool; then
5920                         LIB_PREFIX='lib'
5921                 else
5922                         LIB_PREFIX=''
5923                 fi
5924                 ;;
5925         (*-msvc*)
5926                 LIB_PREFIX=''
5927                 ;;
5928         (*)     LIB_PREFIX='lib'
5929                 ;;
5930         esac
5931 cf_prefix=$LIB_PREFIX
5932
5933 elif test "$with_lib_prefix" = no
5934 then
5935         LIB_PREFIX=
5936 else
5937         LIB_PREFIX=$with_lib_prefix
5938 fi
5939
5940 LIB_SUFFIX=
5941
5942         echo "$as_me:5942: checking for PATH separator" >&5
5943 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5944         case "$cf_cv_system_name" in
5945         (os2*)  PATH_SEPARATOR=';'  ;;
5946         (*)     ${PATH_SEPARATOR:=':'}  ;;
5947         esac
5948
5949         echo "$as_me:5949: result: $PATH_SEPARATOR" >&5
5950 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5951
5952 # headers needed for checks...
5953 echo "$as_me:5953: checking for ANSI C header files" >&5
5954 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5955 if test "${ac_cv_header_stdc+set}" = set; then
5956   echo $ECHO_N "(cached) $ECHO_C" >&6
5957 else
5958   cat >"conftest.$ac_ext" <<_ACEOF
5959 #line 5959 "configure"
5960 #include "confdefs.h"
5961 #include <stdlib.h>
5962 #include <stdarg.h>
5963 #include <string.h>
5964 #include <float.h>
5965
5966 _ACEOF
5967 if { (eval echo "$as_me:5967: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5968   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5969   ac_status=$?
5970   $EGREP -v '^ *\+' conftest.er1 >conftest.err
5971   rm -f conftest.er1
5972   cat conftest.err >&5
5973   echo "$as_me:5973: \$? = $ac_status" >&5
5974   (exit "$ac_status"); } >/dev/null; then
5975   if test -s conftest.err; then
5976     ac_cpp_err=$ac_c_preproc_warn_flag
5977   else
5978     ac_cpp_err=
5979   fi
5980 else
5981   ac_cpp_err=yes
5982 fi
5983 if test -z "$ac_cpp_err"; then
5984   ac_cv_header_stdc=yes
5985 else
5986   echo "$as_me: failed program was:" >&5
5987   cat "conftest.$ac_ext" >&5
5988   ac_cv_header_stdc=no
5989 fi
5990 rm -f conftest.err "conftest.$ac_ext"
5991
5992 if test $ac_cv_header_stdc = yes; then
5993   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5994   cat >"conftest.$ac_ext" <<_ACEOF
5995 #line 5995 "configure"
5996 #include "confdefs.h"
5997 #include <string.h>
5998
5999 _ACEOF
6000 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6001   $EGREP "memchr" >/dev/null 2>&1; then
6002   :
6003 else
6004   ac_cv_header_stdc=no
6005 fi
6006 rm -rf conftest*
6007
6008 fi
6009
6010 if test $ac_cv_header_stdc = yes; then
6011   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6012   cat >"conftest.$ac_ext" <<_ACEOF
6013 #line 6013 "configure"
6014 #include "confdefs.h"
6015 #include <stdlib.h>
6016
6017 _ACEOF
6018 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6019   $EGREP "free" >/dev/null 2>&1; then
6020   :
6021 else
6022   ac_cv_header_stdc=no
6023 fi
6024 rm -rf conftest*
6025
6026 fi
6027
6028 if test $ac_cv_header_stdc = yes; then
6029   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6030   if test "$cross_compiling" = yes; then
6031   :
6032 else
6033   cat >"conftest.$ac_ext" <<_ACEOF
6034 #line 6034 "configure"
6035 #include "confdefs.h"
6036 #include <ctype.h>
6037 #if ((' ' & 0x0FF) == 0x020)
6038 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6039 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6040 #else
6041 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
6042                      || ('j' <= (c) && (c) <= 'r') \
6043                      || ('s' <= (c) && (c) <= 'z'))
6044 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6045 #endif
6046
6047 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6048 int
6049 main (void)
6050 {
6051   int i;
6052   for (i = 0; i < 256; i++)
6053     if (XOR (islower (i), ISLOWER (i))
6054         || toupper (i) != TOUPPER (i))
6055       $ac_main_return(2);
6056   $ac_main_return (0);
6057 }
6058 _ACEOF
6059 rm -f "conftest$ac_exeext"
6060 if { (eval echo "$as_me:6060: \"$ac_link\"") >&5
6061   (eval $ac_link) 2>&5
6062   ac_status=$?
6063   echo "$as_me:6063: \$? = $ac_status" >&5
6064   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6065   { (eval echo "$as_me:6065: \"$ac_try\"") >&5
6066   (eval $ac_try) 2>&5
6067   ac_status=$?
6068   echo "$as_me:6068: \$? = $ac_status" >&5
6069   (exit "$ac_status"); }; }; then
6070   :
6071 else
6072   echo "$as_me: program exited with status $ac_status" >&5
6073 echo "$as_me: failed program was:" >&5
6074 cat "conftest.$ac_ext" >&5
6075 ac_cv_header_stdc=no
6076 fi
6077 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6078 fi
6079 fi
6080 fi
6081 echo "$as_me:6081: result: $ac_cv_header_stdc" >&5
6082 echo "${ECHO_T}$ac_cv_header_stdc" >&6
6083 if test $ac_cv_header_stdc = yes; then
6084
6085 cat >>confdefs.h <<\EOF
6086 #define STDC_HEADERS 1
6087 EOF
6088
6089 fi
6090
6091 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6092
6093 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6094                   inttypes.h stdint.h unistd.h
6095 do
6096 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6097 echo "$as_me:6097: checking for $ac_header" >&5
6098 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6099 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6100   echo $ECHO_N "(cached) $ECHO_C" >&6
6101 else
6102   cat >"conftest.$ac_ext" <<_ACEOF
6103 #line 6103 "configure"
6104 #include "confdefs.h"
6105 $ac_includes_default
6106 #include <$ac_header>
6107 _ACEOF
6108 rm -f "conftest.$ac_objext"
6109 if { (eval echo "$as_me:6109: \"$ac_compile\"") >&5
6110   (eval $ac_compile) 2>&5
6111   ac_status=$?
6112   echo "$as_me:6112: \$? = $ac_status" >&5
6113   (exit "$ac_status"); } &&
6114          { ac_try='test -s "conftest.$ac_objext"'
6115   { (eval echo "$as_me:6115: \"$ac_try\"") >&5
6116   (eval $ac_try) 2>&5
6117   ac_status=$?
6118   echo "$as_me:6118: \$? = $ac_status" >&5
6119   (exit "$ac_status"); }; }; then
6120   eval "$as_ac_Header=yes"
6121 else
6122   echo "$as_me: failed program was:" >&5
6123 cat "conftest.$ac_ext" >&5
6124 eval "$as_ac_Header=no"
6125 fi
6126 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6127 fi
6128 echo "$as_me:6128: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6129 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6130 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6131   cat >>confdefs.h <<EOF
6132 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6133 EOF
6134
6135 fi
6136 done
6137
6138 echo "$as_me:6138: checking whether exit is declared" >&5
6139 echo $ECHO_N "checking whether exit is declared... $ECHO_C" >&6
6140 if test "${ac_cv_have_decl_exit+set}" = set; then
6141   echo $ECHO_N "(cached) $ECHO_C" >&6
6142 else
6143   cat >"conftest.$ac_ext" <<_ACEOF
6144 #line 6144 "configure"
6145 #include "confdefs.h"
6146 $ac_includes_default
6147 int
6148 main (void)
6149 {
6150 #ifndef exit
6151   char *p = (char *) exit; (void) p;
6152 #endif
6153
6154   ;
6155   return 0;
6156 }
6157 _ACEOF
6158 rm -f "conftest.$ac_objext"
6159 if { (eval echo "$as_me:6159: \"$ac_compile\"") >&5
6160   (eval $ac_compile) 2>&5
6161   ac_status=$?
6162   echo "$as_me:6162: \$? = $ac_status" >&5
6163   (exit "$ac_status"); } &&
6164          { ac_try='test -s "conftest.$ac_objext"'
6165   { (eval echo "$as_me:6165: \"$ac_try\"") >&5
6166   (eval $ac_try) 2>&5
6167   ac_status=$?
6168   echo "$as_me:6168: \$? = $ac_status" >&5
6169   (exit "$ac_status"); }; }; then
6170   ac_cv_have_decl_exit=yes
6171 else
6172   echo "$as_me: failed program was:" >&5
6173 cat "conftest.$ac_ext" >&5
6174 ac_cv_have_decl_exit=no
6175 fi
6176 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6177 fi
6178 echo "$as_me:6178: result: $ac_cv_have_decl_exit" >&5
6179 echo "${ECHO_T}$ac_cv_have_decl_exit" >&6
6180
6181 ac_header_dirent=no
6182 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
6183   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6184 echo "$as_me:6184: checking for $ac_hdr that defines DIR" >&5
6185 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
6186 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6187   echo $ECHO_N "(cached) $ECHO_C" >&6
6188 else
6189   cat >"conftest.$ac_ext" <<_ACEOF
6190 #line 6190 "configure"
6191 #include "confdefs.h"
6192 #include <sys/types.h>
6193 #include <$ac_hdr>
6194
6195 int
6196 main (void)
6197 {
6198 if ((DIR *) 0)
6199 return 0;
6200   ;
6201   return 0;
6202 }
6203 _ACEOF
6204 rm -f "conftest.$ac_objext"
6205 if { (eval echo "$as_me:6205: \"$ac_compile\"") >&5
6206   (eval $ac_compile) 2>&5
6207   ac_status=$?
6208   echo "$as_me:6208: \$? = $ac_status" >&5
6209   (exit "$ac_status"); } &&
6210          { ac_try='test -s "conftest.$ac_objext"'
6211   { (eval echo "$as_me:6211: \"$ac_try\"") >&5
6212   (eval $ac_try) 2>&5
6213   ac_status=$?
6214   echo "$as_me:6214: \$? = $ac_status" >&5
6215   (exit "$ac_status"); }; }; then
6216   eval "$as_ac_Header=yes"
6217 else
6218   echo "$as_me: failed program was:" >&5
6219 cat "conftest.$ac_ext" >&5
6220 eval "$as_ac_Header=no"
6221 fi
6222 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6223 fi
6224 echo "$as_me:6224: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6225 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6226 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6227   cat >>confdefs.h <<EOF
6228 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
6229 EOF
6230
6231 ac_header_dirent=$ac_hdr; break
6232 fi
6233
6234 done
6235 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6236 if test $ac_header_dirent = dirent.h; then
6237   echo "$as_me:6237: checking for opendir in -ldir" >&5
6238 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
6239 if test "${ac_cv_lib_dir_opendir+set}" = set; then
6240   echo $ECHO_N "(cached) $ECHO_C" >&6
6241 else
6242   ac_check_lib_save_LIBS=$LIBS
6243 LIBS="-ldir  $LIBS"
6244 cat >"conftest.$ac_ext" <<_ACEOF
6245 #line 6245 "configure"
6246 #include "confdefs.h"
6247
6248 /* Override any gcc2 internal prototype to avoid an error.  */
6249 #ifdef __cplusplus
6250 extern "C"
6251 #endif
6252 /* We use char because int might match the return type of a gcc2
6253    builtin and then its argument prototype would still apply.  */
6254 char opendir ();
6255 int
6256 main (void)
6257 {
6258 opendir ();
6259   ;
6260   return 0;
6261 }
6262 _ACEOF
6263 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6264 if { (eval echo "$as_me:6264: \"$ac_link\"") >&5
6265   (eval $ac_link) 2>&5
6266   ac_status=$?
6267   echo "$as_me:6267: \$? = $ac_status" >&5
6268   (exit "$ac_status"); } &&
6269          { ac_try='test -s "conftest$ac_exeext"'
6270   { (eval echo "$as_me:6270: \"$ac_try\"") >&5
6271   (eval $ac_try) 2>&5
6272   ac_status=$?
6273   echo "$as_me:6273: \$? = $ac_status" >&5
6274   (exit "$ac_status"); }; }; then
6275   ac_cv_lib_dir_opendir=yes
6276 else
6277   echo "$as_me: failed program was:" >&5
6278 cat "conftest.$ac_ext" >&5
6279 ac_cv_lib_dir_opendir=no
6280 fi
6281 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6282 LIBS=$ac_check_lib_save_LIBS
6283 fi
6284 echo "$as_me:6284: result: $ac_cv_lib_dir_opendir" >&5
6285 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
6286 if test "$ac_cv_lib_dir_opendir" = yes; then
6287   LIBS="$LIBS -ldir"
6288 fi
6289
6290 else
6291   echo "$as_me:6291: checking for opendir in -lx" >&5
6292 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
6293 if test "${ac_cv_lib_x_opendir+set}" = set; then
6294   echo $ECHO_N "(cached) $ECHO_C" >&6
6295 else
6296   ac_check_lib_save_LIBS=$LIBS
6297 LIBS="-lx  $LIBS"
6298 cat >"conftest.$ac_ext" <<_ACEOF
6299 #line 6299 "configure"
6300 #include "confdefs.h"
6301
6302 /* Override any gcc2 internal prototype to avoid an error.  */
6303 #ifdef __cplusplus
6304 extern "C"
6305 #endif
6306 /* We use char because int might match the return type of a gcc2
6307    builtin and then its argument prototype would still apply.  */
6308 char opendir ();
6309 int
6310 main (void)
6311 {
6312 opendir ();
6313   ;
6314   return 0;
6315 }
6316 _ACEOF
6317 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6318 if { (eval echo "$as_me:6318: \"$ac_link\"") >&5
6319   (eval $ac_link) 2>&5
6320   ac_status=$?
6321   echo "$as_me:6321: \$? = $ac_status" >&5
6322   (exit "$ac_status"); } &&
6323          { ac_try='test -s "conftest$ac_exeext"'
6324   { (eval echo "$as_me:6324: \"$ac_try\"") >&5
6325   (eval $ac_try) 2>&5
6326   ac_status=$?
6327   echo "$as_me:6327: \$? = $ac_status" >&5
6328   (exit "$ac_status"); }; }; then
6329   ac_cv_lib_x_opendir=yes
6330 else
6331   echo "$as_me: failed program was:" >&5
6332 cat "conftest.$ac_ext" >&5
6333 ac_cv_lib_x_opendir=no
6334 fi
6335 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6336 LIBS=$ac_check_lib_save_LIBS
6337 fi
6338 echo "$as_me:6338: result: $ac_cv_lib_x_opendir" >&5
6339 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
6340 if test "$ac_cv_lib_x_opendir" = yes; then
6341   LIBS="$LIBS -lx"
6342 fi
6343
6344 fi
6345
6346 ###############################################################################
6347
6348 echo "$as_me:6348: checking if you want to build a separate terminfo library" >&5
6349 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
6350
6351 # Check whether --with-termlib or --without-termlib was given.
6352 if test "${with_termlib+set}" = set; then
6353   withval="$with_termlib"
6354   with_termlib=$withval
6355 else
6356   with_termlib=no
6357 fi;
6358 echo "$as_me:6358: result: $with_termlib" >&5
6359 echo "${ECHO_T}$with_termlib" >&6
6360
6361 echo "$as_me:6361: checking if you want to build a separate tic library" >&5
6362 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
6363
6364 # Check whether --with-ticlib or --without-ticlib was given.
6365 if test "${with_ticlib+set}" = set; then
6366   withval="$with_ticlib"
6367   with_ticlib=$withval
6368 else
6369   with_ticlib=no
6370 fi;
6371 echo "$as_me:6371: result: $with_ticlib" >&5
6372 echo "${ECHO_T}$with_ticlib" >&6
6373
6374 if test X"$CC_G_OPT" = X"" ; then
6375         CC_G_OPT='-g'
6376         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
6377 fi
6378
6379 if test X"$CXX_G_OPT" = X"" ; then
6380         CXX_G_OPT='-g'
6381         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
6382 fi
6383
6384 echo "$as_me:6384: checking for default loader flags" >&5
6385 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
6386 case "$DFT_LWR_MODEL" in
6387 (libtool) LD_MODEL=''   ;;
6388 (normal)  LD_MODEL=''   ;;
6389 (debug)   LD_MODEL=$CC_G_OPT ;;
6390 (profile) LD_MODEL='-pg';;
6391 (shared)  LD_MODEL=''   ;;
6392 esac
6393 echo "$as_me:6393: result: ${LD_MODEL:-(none)}" >&5
6394 echo "${ECHO_T}${LD_MODEL:-(none)}" >&6
6395
6396 case "$DFT_LWR_MODEL" in
6397 (shared)
6398
6399 echo "$as_me:6399: checking if rpath option should be used" >&5
6400 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
6401
6402 # Check whether --enable-rpath or --disable-rpath was given.
6403 if test "${enable_rpath+set}" = set; then
6404   enableval="$enable_rpath"
6405   cf_cv_enable_rpath=$enableval
6406 else
6407   cf_cv_enable_rpath=no
6408 fi;
6409 echo "$as_me:6409: result: $cf_cv_enable_rpath" >&5
6410 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
6411
6412 echo "$as_me:6412: checking if shared libraries should be relinked during install" >&5
6413 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
6414
6415 # Check whether --enable-relink or --disable-relink was given.
6416 if test "${enable_relink+set}" = set; then
6417   enableval="$enable_relink"
6418   cf_cv_do_relink=$enableval
6419 else
6420   cf_cv_do_relink=yes
6421 fi;
6422 echo "$as_me:6422: result: $cf_cv_do_relink" >&5
6423 echo "${ECHO_T}$cf_cv_do_relink" >&6
6424         ;;
6425 esac
6426
6427 # we will build libraries one-level down.
6428 rel_builddir=..
6429
6430 LD_RPATH_OPT=
6431 if test "x$cf_cv_enable_rpath" != xno
6432 then
6433         echo "$as_me:6433: checking for an rpath option" >&5
6434 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
6435         case "$cf_cv_system_name" in
6436         (irix*)
6437                 if test "$GCC" = yes; then
6438                         LD_RPATH_OPT="-Wl,-rpath,"
6439                 else
6440                         LD_RPATH_OPT="-rpath "
6441                 fi
6442                 ;;
6443         (linux*|gnu*|k*bsd*-gnu|freebsd*)
6444                 LD_RPATH_OPT="-Wl,-rpath,"
6445                 ;;
6446         (openbsd[2-9].*|mirbsd*)
6447                 LD_RPATH_OPT="-Wl,-rpath,"
6448                 ;;
6449         (dragonfly*)
6450                 LD_RPATH_OPT="-rpath "
6451                 ;;
6452         (netbsd*)
6453                 LD_RPATH_OPT="-Wl,-rpath,"
6454                 ;;
6455         (osf*|mls+*)
6456                 LD_RPATH_OPT="-rpath "
6457                 ;;
6458         (solaris2*)
6459                 LD_RPATH_OPT="-R"
6460                 ;;
6461         (*)
6462                 ;;
6463         esac
6464         echo "$as_me:6464: result: $LD_RPATH_OPT" >&5
6465 echo "${ECHO_T}$LD_RPATH_OPT" >&6
6466
6467         case "x$LD_RPATH_OPT" in
6468         (x-R*)
6469                 echo "$as_me:6469: checking if we need a space after rpath option" >&5
6470 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
6471                 cf_save_LIBS="$LIBS"
6472
6473 cf_add_libs="$LIBS"
6474 # reverse order
6475 cf_add_0lib=
6476 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6477 # filter duplicates
6478 for cf_add_1lib in $cf_add_0lib; do
6479         for cf_add_2lib in $cf_add_libs; do
6480                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6481                         cf_add_1lib=
6482                         break
6483                 fi
6484         done
6485         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6486 done
6487 LIBS="$cf_add_libs"
6488
6489                 cat >"conftest.$ac_ext" <<_ACEOF
6490 #line 6490 "configure"
6491 #include "confdefs.h"
6492
6493 int
6494 main (void)
6495 {
6496
6497   ;
6498   return 0;
6499 }
6500 _ACEOF
6501 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6502 if { (eval echo "$as_me:6502: \"$ac_link\"") >&5
6503   (eval $ac_link) 2>&5
6504   ac_status=$?
6505   echo "$as_me:6505: \$? = $ac_status" >&5
6506   (exit "$ac_status"); } &&
6507          { ac_try='test -s "conftest$ac_exeext"'
6508   { (eval echo "$as_me:6508: \"$ac_try\"") >&5
6509   (eval $ac_try) 2>&5
6510   ac_status=$?
6511   echo "$as_me:6511: \$? = $ac_status" >&5
6512   (exit "$ac_status"); }; }; then
6513   cf_rpath_space=no
6514 else
6515   echo "$as_me: failed program was:" >&5
6516 cat "conftest.$ac_ext" >&5
6517 cf_rpath_space=yes
6518 fi
6519 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6520                 LIBS="$cf_save_LIBS"
6521                 echo "$as_me:6521: result: $cf_rpath_space" >&5
6522 echo "${ECHO_T}$cf_rpath_space" >&6
6523                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6524                 ;;
6525         esac
6526 fi
6527
6528         RM_SHARED_OPTS=
6529         LOCAL_LDFLAGS=
6530         LOCAL_LDFLAGS2=
6531         LD_SHARED_OPTS=
6532         INSTALL_LIB="-m 644"
6533         : ${rel_builddir:=.}
6534
6535         shlibdir=$libdir
6536
6537         MAKE_DLLS="#"
6538
6539         cf_cv_do_symlinks=no
6540         cf_ld_rpath_opt=
6541         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6542
6543         echo "$as_me:6543: checking whether to use release or ABI version in shared library file names" >&5
6544 echo $ECHO_N "checking whether to use release or ABI version in shared library file names... $ECHO_C" >&6
6545
6546 # Check whether --with-shlib-version or --without-shlib-version was given.
6547 if test "${with_shlib_version+set}" = set; then
6548   withval="$with_shlib_version"
6549   test -z "$withval" && withval=auto
6550         case "$withval" in
6551         (yes)
6552                 cf_cv_shlib_version=auto
6553                 ;;
6554         (rel|abi|auto)
6555                 cf_cv_shlib_version=$withval
6556                 ;;
6557         (*)
6558                 echo "$as_me:6558: result: $withval" >&5
6559 echo "${ECHO_T}$withval" >&6
6560                 { { echo "$as_me:6560: error: option value must be one of: rel, abi, or auto" >&5
6561 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6562    { (exit 1); exit 1; }; }
6563                 ;;
6564         esac
6565
6566 else
6567   cf_cv_shlib_version=auto
6568 fi;
6569         echo "$as_me:6569: result: $cf_cv_shlib_version" >&5
6570 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6571
6572         cf_cv_rm_so_locs=no
6573         cf_try_cflags=
6574
6575         # Some less-capable ports of gcc support only -fpic
6576         CC_SHARED_OPTS=
6577
6578         cf_try_fPIC=no
6579         if test "$GCC" = yes
6580         then
6581                 cf_try_fPIC=yes
6582         else
6583                 case "$cf_cv_system_name" in
6584                 (*linux*)       # e.g., PGI compiler
6585                         cf_try_fPIC=yes
6586                         ;;
6587                 esac
6588         fi
6589
6590         if test "$cf_try_fPIC" = yes
6591         then
6592                 echo "$as_me:6592: checking which $CC option to use" >&5
6593 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6594                 cf_save_CFLAGS="$CFLAGS"
6595                 for CC_SHARED_OPTS in -fPIC -fpic ''
6596                 do
6597                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6598                         cat >"conftest.$ac_ext" <<_ACEOF
6599 #line 6599 "configure"
6600 #include "confdefs.h"
6601 #include <stdio.h>
6602 int
6603 main (void)
6604 {
6605 int x = 1
6606   ;
6607   return 0;
6608 }
6609 _ACEOF
6610 rm -f "conftest.$ac_objext"
6611 if { (eval echo "$as_me:6611: \"$ac_compile\"") >&5
6612   (eval $ac_compile) 2>&5
6613   ac_status=$?
6614   echo "$as_me:6614: \$? = $ac_status" >&5
6615   (exit "$ac_status"); } &&
6616          { ac_try='test -s "conftest.$ac_objext"'
6617   { (eval echo "$as_me:6617: \"$ac_try\"") >&5
6618   (eval $ac_try) 2>&5
6619   ac_status=$?
6620   echo "$as_me:6620: \$? = $ac_status" >&5
6621   (exit "$ac_status"); }; }; then
6622   break
6623 else
6624   echo "$as_me: failed program was:" >&5
6625 cat "conftest.$ac_ext" >&5
6626 fi
6627 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6628                 done
6629                 echo "$as_me:6629: result: $CC_SHARED_OPTS" >&5
6630 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6631                 CFLAGS="$cf_save_CFLAGS"
6632         fi
6633
6634         cf_cv_shlib_version_infix=no
6635
6636         case "$cf_cv_system_name" in
6637         (aix4.3-9*|aix[5-7]*)
6638                 if test "$GCC" = yes; then
6639                         CC_SHARED_OPTS='-Wl,-brtl'
6640                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6641                 else
6642                         CC_SHARED_OPTS='-brtl'
6643                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6644                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6645                 fi
6646                 ;;
6647         (beos*)
6648                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6649                 ;;
6650         (cygwin*)
6651                 CC_SHARED_OPTS=
6652                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6653                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6654                 cf_cv_shlib_version=cygdll
6655                 cf_cv_shlib_version_infix=cygdll
6656                 shlibdir=$bindir
6657                 MAKE_DLLS=
6658                 cat >mk_shared_lib.sh <<-CF_EOF
6659                 #!$SHELL
6660                 SHARED_LIB=\$1
6661                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6662                 shift
6663                 cat <<-EOF
6664                 Linking shared library
6665                 ** SHARED_LIB \$SHARED_LIB
6666                 ** IMPORT_LIB \$IMPORT_LIB
6667 EOF
6668                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6669 CF_EOF
6670                 chmod +x mk_shared_lib.sh
6671                 ;;
6672         (msys*)
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=msysdll
6677                 cf_cv_shlib_version_infix=msysdll
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/msys-/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         (darwin*)
6695                 cf_try_cflags="no-cpp-precomp"
6696                 CC_SHARED_OPTS="-dynamic"
6697                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6698                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6699                 cf_cv_shlib_version_infix=yes
6700                 echo "$as_me:6700: checking if ld -search_paths_first works" >&5
6701 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6702 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6703   echo $ECHO_N "(cached) $ECHO_C" >&6
6704 else
6705
6706                         cf_save_LDFLAGS=$LDFLAGS
6707                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6708                         cat >"conftest.$ac_ext" <<_ACEOF
6709 #line 6709 "configure"
6710 #include "confdefs.h"
6711
6712 int
6713 main (void)
6714 {
6715 int i;
6716   ;
6717   return 0;
6718 }
6719 _ACEOF
6720 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6721 if { (eval echo "$as_me:6721: \"$ac_link\"") >&5
6722   (eval $ac_link) 2>&5
6723   ac_status=$?
6724   echo "$as_me:6724: \$? = $ac_status" >&5
6725   (exit "$ac_status"); } &&
6726          { ac_try='test -s "conftest$ac_exeext"'
6727   { (eval echo "$as_me:6727: \"$ac_try\"") >&5
6728   (eval $ac_try) 2>&5
6729   ac_status=$?
6730   echo "$as_me:6730: \$? = $ac_status" >&5
6731   (exit "$ac_status"); }; }; then
6732   cf_cv_ldflags_search_paths_first=yes
6733 else
6734   echo "$as_me: failed program was:" >&5
6735 cat "conftest.$ac_ext" >&5
6736 cf_cv_ldflags_search_paths_first=no
6737 fi
6738 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6739                                 LDFLAGS=$cf_save_LDFLAGS
6740 fi
6741 echo "$as_me:6741: result: $cf_cv_ldflags_search_paths_first" >&5
6742 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6743                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6744                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6745                 fi
6746                 ;;
6747         (haiku*)
6748
6749         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6750         if test "$cf_cv_shlib_version" = rel; then
6751                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6752         else
6753                 cf_cv_shared_soname='`basename $@`'
6754         fi
6755
6756                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6757                 ;;
6758         (hpux[7-8]*)
6759                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6760                 if test "$GCC" != yes; then
6761                         CC_SHARED_OPTS='+Z'
6762                 fi
6763                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6764                 INSTALL_LIB="-m 555"
6765                 ;;
6766         (hpux*)
6767                 # (tested with gcc 2.7.2 -- I don't have c89)
6768                 if test "$GCC" = yes; then
6769                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6770                 else
6771                         CC_SHARED_OPTS='+Z'
6772                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6773                 fi
6774                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6775                 # HP-UX shared libraries must be executable, and should be
6776                 # readonly to exploit a quirk in the memory manager.
6777                 INSTALL_LIB="-m 555"
6778                 ;;
6779         (interix*)
6780                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6781                 if test "$cf_cv_shlib_version" = rel; then
6782                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6783                 else
6784                         cf_shared_soname='`basename $@`'
6785                 fi
6786                 CC_SHARED_OPTS=
6787                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6788                 ;;
6789         (irix*)
6790                 if test "$cf_cv_enable_rpath" = yes ; then
6791                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6792                 fi
6793                 # tested with IRIX 5.2 and 'cc'.
6794                 if test "$GCC" != yes; then
6795                         CC_SHARED_OPTS='-KPIC'
6796                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6797                 else
6798                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6799                 fi
6800                 cf_cv_rm_so_locs=yes
6801                 ;;
6802         (linux*|gnu*|k*bsd*-gnu)
6803                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6804                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6805                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6806                 fi
6807                 if test "$cf_cv_enable_rpath" = yes ; then
6808                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6809                 fi
6810
6811         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6812         if test "$cf_cv_shlib_version" = rel; then
6813                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6814         else
6815                 cf_cv_shared_soname='`basename $@`'
6816         fi
6817
6818                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6819                 ;;
6820         (mingw*msvc*)
6821                 cf_cv_shlib_version=msvcdll
6822                 cf_cv_shlib_version_infix=msvcdll
6823                 shlibdir=$bindir
6824                 MAKE_DLLS=
6825                 if test "$DFT_LWR_MODEL" = "shared" ; then
6826                         LOCAL_LDFLAGS="-link -dll"
6827                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6828                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6829                 fi
6830                 CC_SHARED_OPTS=
6831                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6832                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6833                 cat >mk_shared_lib.sh <<-CF_EOF
6834                 #!$SHELL
6835                 SHARED_LIB=\$1
6836                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6837                 shift
6838                 my_ld=\$1
6839                 shift
6840                 cat <<-EOF
6841                 Linking shared library
6842                 ** SHARED LIB \$SHARED_LIB
6843                 ** IMPORT_LIB \$IMPORT_LIB
6844 EOF
6845                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6846                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6847                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6848 CF_EOF
6849                 chmod +x mk_shared_lib.sh
6850                 cat >mk_prog.sh <<-CF_EOF
6851                 #!$SHELL
6852                 shift
6853                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6854                 LD="$LD"
6855                 clopts=()
6856                 ldopts=("/subsystem:console")
6857                 libs=()
6858                 isdll=0
6859                 while test \$# -gt 0; do
6860                         case "\$1" in
6861                                 -link)
6862                                         # ignore -link argument
6863                                         ;;
6864                                 -M[TD] | -M[TD]d)
6865                                         # ignore runtime-library option
6866                                         ;;
6867                                 -dll)
6868                                         isdll=1
6869                                         ;;
6870                                 -W* | -w*)
6871                                         # ignore warnings
6872                                         ;;
6873                                 -D*)
6874                                         clopts+=("\$1")
6875                                         ;;
6876                                 -I*)
6877                                         clopts+=("\$1")
6878                                         ;;
6879                                 -l*)
6880                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6881                                         ;;
6882                                 -L*)
6883                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6884                                         ;;
6885                                 *.obj | *.o)
6886                                         ldopts+=("\$1")
6887                                         ;;
6888                                 -Wl,*)
6889                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6890                                                 ldopts+=("\${linkarg}")
6891                                         done
6892                                         ;;
6893                                 *.lib)
6894                                         ldopts+=("\$1")
6895                                         ;;
6896                                 -o)
6897                                         shift
6898                                         ldopts+=("-out:\$1")
6899                                         ;;
6900                                 *)
6901                                         clopts+=("\$1")
6902                                         ldopts+=("\$1")
6903                                         ;;
6904                         esac
6905                         shift
6906                 done
6907                 if [ "\$isdll" -ne 0 ]; then
6908                         for lib in \${libs[*]}; do
6909                                 ldopts+=("\$lib.dll.lib")
6910                         done
6911                 else
6912                         for lib in \${libs[*]}; do
6913                                 ldopts+=("\$lib.lib")
6914                         done
6915                 fi
6916                 cat <<-EOF
6917                 Creating program
6918                 ** ld options:   "\${ldopts[@]}"
6919 EOF
6920                 exec \$LD \${ldopts[@]}
6921 CF_EOF
6922                 chmod +x mk_prog.sh
6923                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6924                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6925                 ;;
6926         (mingw*)
6927                 cf_cv_shlib_version=mingw
6928                 cf_cv_shlib_version_infix=mingw
6929                 shlibdir=$bindir
6930                 MAKE_DLLS=
6931                 if test "$DFT_LWR_MODEL" = "shared" ; then
6932                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6933                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6934                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6935                 fi
6936                 CC_SHARED_OPTS=
6937                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6938                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6939                 cat >mk_shared_lib.sh <<-CF_EOF
6940                 #!$SHELL
6941                 SHARED_LIB=\$1
6942                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6943                 shift
6944                 cat <<-EOF
6945                 Linking shared library
6946                 ** SHARED_LIB \$SHARED_LIB
6947                 ** IMPORT_LIB \$IMPORT_LIB
6948 EOF
6949                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6950 CF_EOF
6951                 chmod +x mk_shared_lib.sh
6952                 ;;
6953         (openbsd[2-9].*|mirbsd*)
6954                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6955                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6956                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6957                 fi
6958                 if test "$cf_cv_enable_rpath" = yes ; then
6959                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6960                 fi
6961                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6962
6963         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6964         if test "$cf_cv_shlib_version" = rel; then
6965                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6966         else
6967                 cf_cv_shared_soname='`basename $@`'
6968         fi
6969
6970                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6971                 ;;
6972         (nskJ*)
6973                 CC_SHARED_OPTS=
6974                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6975                 ;;
6976         (nskL*)
6977                 CC_SHARED_OPTS=
6978                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6979                 ;;
6980         (nto-qnx*|openbsd*|freebsd[12].*)
6981                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6982                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6983                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6984                 ;;
6985         (dragonfly*|freebsd*)
6986                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6987                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6988                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6989                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6990                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6991                 fi
6992
6993         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6994         if test "$cf_cv_shlib_version" = rel; then
6995                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6996         else
6997                 cf_cv_shared_soname='`basename $@`'
6998         fi
6999
7000                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7001                 ;;
7002         (netbsd*)
7003                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7004                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7005                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7006                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7007                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7008                         if test "$cf_cv_shlib_version" = auto; then
7009                         if test -f /usr/libexec/ld.elf_so; then
7010                                 cf_cv_shlib_version=abi
7011                         else
7012                                 cf_cv_shlib_version=rel
7013                         fi
7014                         fi
7015
7016         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7017         if test "$cf_cv_shlib_version" = rel; then
7018                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7019         else
7020                 cf_cv_shared_soname='`basename $@`'
7021         fi
7022
7023                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
7024                 else
7025                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
7026                 fi
7027                 ;;
7028         (osf*|mls+*)
7029                 # tested with OSF/1 V3.2 and 'cc'
7030                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
7031                 # link with shared libs).
7032                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
7033                 case "$host_os" in
7034                 (osf4*)
7035                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
7036                         ;;
7037                 esac
7038                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
7039                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
7040                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7041                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7042                 fi
7043                 cf_cv_rm_so_locs=yes
7044                 ;;
7045         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
7046                 # tested with osr5.0.5
7047                 if test "$GCC" != yes; then
7048                         CC_SHARED_OPTS='-belf -KPIC'
7049                 fi
7050                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
7051                 if test "$cf_cv_enable_rpath" = yes ; then
7052                         # only way is to set LD_RUN_PATH but no switch for it
7053                         RUN_PATH=$libdir
7054                 fi
7055                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7056                 LINK_PROGS='LD_RUN_PATH=${libdir}'
7057                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
7058                 ;;
7059         (sunos4*)
7060                 # tested with SunOS 4.1.1 and gcc 2.7.0
7061                 if test "$GCC" != yes; then
7062                         CC_SHARED_OPTS='-KPIC'
7063                 fi
7064                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
7065                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7066                 ;;
7067         (solaris2*)
7068                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
7069                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
7070                 if test "$DFT_LWR_MODEL" = "shared" ; then
7071                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
7072                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7073                 fi
7074                 if test "$cf_cv_enable_rpath" = yes ; then
7075                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
7076                 fi
7077
7078         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7079         if test "$cf_cv_shlib_version" = rel; then
7080                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7081         else
7082                 cf_cv_shared_soname='`basename $@`'
7083         fi
7084
7085                 if test "$GCC" != yes; then
7086                         cf_save_CFLAGS="$CFLAGS"
7087                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
7088                         do
7089                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
7090                                 cat >"conftest.$ac_ext" <<_ACEOF
7091 #line 7091 "configure"
7092 #include "confdefs.h"
7093 #include <stdio.h>
7094 int
7095 main (void)
7096 {
7097 printf("Hello\\n");
7098   ;
7099   return 0;
7100 }
7101 _ACEOF
7102 rm -f "conftest.$ac_objext"
7103 if { (eval echo "$as_me:7103: \"$ac_compile\"") >&5
7104   (eval $ac_compile) 2>&5
7105   ac_status=$?
7106   echo "$as_me:7106: \$? = $ac_status" >&5
7107   (exit "$ac_status"); } &&
7108          { ac_try='test -s "conftest.$ac_objext"'
7109   { (eval echo "$as_me:7109: \"$ac_try\"") >&5
7110   (eval $ac_try) 2>&5
7111   ac_status=$?
7112   echo "$as_me:7112: \$? = $ac_status" >&5
7113   (exit "$ac_status"); }; }; then
7114   break
7115 else
7116   echo "$as_me: failed program was:" >&5
7117 cat "conftest.$ac_ext" >&5
7118 fi
7119 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7120                         done
7121                         CFLAGS="$cf_save_CFLAGS"
7122                         CC_SHARED_OPTS=$cf_shared_opts
7123                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
7124                 else
7125                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
7126                 fi
7127                 ;;
7128         (sysv5uw7*|unix_sv*)
7129                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
7130                 if test "$GCC" != yes; then
7131                         CC_SHARED_OPTS='-KPIC'
7132                 fi
7133                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
7134                 ;;
7135         (*)
7136                 CC_SHARED_OPTS='unknown'
7137                 MK_SHARED_LIB='echo unknown'
7138                 ;;
7139         esac
7140
7141         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
7142         case "$cf_cv_shlib_version" in
7143         (rel|abi)
7144                 case "$MK_SHARED_LIB" in
7145                 (*'-o $@')
7146                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
7147                         ;;
7148                 (*)
7149                         { echo "$as_me:7149: WARNING: ignored --with-shlib-version" >&5
7150 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
7151                         ;;
7152                 esac
7153                 ;;
7154         esac
7155
7156         if test -n "$cf_try_cflags"
7157         then
7158 cat > conftest.$ac_ext <<EOF
7159 #line 7159 "${as_me:-configure}"
7160 #include <stdio.h>
7161 int main(int argc, char *argv[])
7162 {
7163         printf("hello\\n");
7164         return (argv[argc-1] == 0) ;
7165 }
7166 EOF
7167                 cf_save_CFLAGS="$CFLAGS"
7168                 for cf_opt in $cf_try_cflags
7169                 do
7170                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
7171                         echo "$as_me:7171: checking if CFLAGS option -$cf_opt works" >&5
7172 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
7173                         if { (eval echo "$as_me:7173: \"$ac_compile\"") >&5
7174   (eval $ac_compile) 2>&5
7175   ac_status=$?
7176   echo "$as_me:7176: \$? = $ac_status" >&5
7177   (exit "$ac_status"); }; then
7178                                 echo "$as_me:7178: result: yes" >&5
7179 echo "${ECHO_T}yes" >&6
7180                                 cf_save_CFLAGS="$CFLAGS"
7181                         else
7182                                 echo "$as_me:7182: result: no" >&5
7183 echo "${ECHO_T}no" >&6
7184                         fi
7185                 done
7186                 CFLAGS="$cf_save_CFLAGS"
7187         fi
7188
7189         # RPATH_LIST is a colon-separated list of directories
7190         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
7191         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
7192
7193         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
7194
7195         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
7196
7197 echo "${as_me:-configure}:7197: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
7198
7199         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7200
7201 echo "${as_me:-configure}:7201: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7202
7203 for model in $cf_list_models ; do
7204         case "$model" in
7205         (libtool)
7206
7207 echo "$as_me:7207: checking for additional libtool options" >&5
7208 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
7209
7210 # Check whether --with-libtool-opts or --without-libtool-opts was given.
7211 if test "${with_libtool_opts+set}" = set; then
7212   withval="$with_libtool_opts"
7213   with_libtool_opts=$withval
7214 else
7215   with_libtool_opts=no
7216 fi;
7217 echo "$as_me:7217: result: $with_libtool_opts" >&5
7218 echo "${ECHO_T}$with_libtool_opts" >&6
7219
7220 case .$with_libtool_opts in
7221 (.yes|.no|.)
7222         ;;
7223 (*)
7224         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
7225         ;;
7226 esac
7227
7228 echo "$as_me:7228: checking if exported-symbols file should be used" >&5
7229 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
7230
7231 # Check whether --with-export-syms or --without-export-syms was given.
7232 if test "${with_export_syms+set}" = set; then
7233   withval="$with_export_syms"
7234   with_export_syms=$withval
7235 else
7236   with_export_syms=no
7237 fi;
7238 if test "x$with_export_syms" = xyes
7239 then
7240         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
7241
7242 fi
7243 echo "$as_me:7243: result: $with_export_syms" >&5
7244 echo "${ECHO_T}$with_export_syms" >&6
7245 if test "x$with_export_syms" != xno
7246 then
7247         EXPORT_SYMS="-export-symbols $with_export_syms"
7248
7249 fi
7250
7251                 ;;
7252         (shared)
7253                 if test "$CC_SHARED_OPTS" = "unknown"; then
7254                         { { echo "$as_me:7254: error: Shared libraries are not supported in this version" >&5
7255 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
7256    { (exit 1); exit 1; }; }
7257                 fi
7258                 # workaround for inept transition to PIE vs PIC...
7259                 echo "$as_me:7259: checking if current CFLAGS link properly" >&5
7260 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
7261                 cat >"conftest.$ac_ext" <<_ACEOF
7262 #line 7262 "configure"
7263 #include "confdefs.h"
7264 #include <stdio.h>
7265 int
7266 main (void)
7267 {
7268 printf("Hello work\\n");
7269   ;
7270   return 0;
7271 }
7272 _ACEOF
7273 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7274 if { (eval echo "$as_me:7274: \"$ac_link\"") >&5
7275   (eval $ac_link) 2>&5
7276   ac_status=$?
7277   echo "$as_me:7277: \$? = $ac_status" >&5
7278   (exit "$ac_status"); } &&
7279          { ac_try='test -s "conftest$ac_exeext"'
7280   { (eval echo "$as_me:7280: \"$ac_try\"") >&5
7281   (eval $ac_try) 2>&5
7282   ac_status=$?
7283   echo "$as_me:7283: \$? = $ac_status" >&5
7284   (exit "$ac_status"); }; }; then
7285   cf_cflags_work=yes
7286 else
7287   echo "$as_me: failed program was:" >&5
7288 cat "conftest.$ac_ext" >&5
7289 cf_cflags_work=no
7290 fi
7291 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7292                 echo "$as_me:7292: result: $cf_cflags_work" >&5
7293 echo "${ECHO_T}$cf_cflags_work" >&6
7294                 if test "$cf_cflags_work" = no
7295                 then
7296                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
7297
7298 echo "${as_me:-configure}:7298: testing try to work around by appending shared-options ..." 1>&5
7299
7300                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
7301                 fi
7302
7303 echo "$as_me:7303: checking if versioned-symbols file should be used" >&5
7304 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
7305
7306 # Check whether --with-versioned-syms or --without-versioned-syms was given.
7307 if test "${with_versioned_syms+set}" = set; then
7308   withval="$with_versioned_syms"
7309   with_versioned_syms=$withval
7310 else
7311   with_versioned_syms=no
7312 fi;
7313 case "x$with_versioned_syms" in
7314 (xyes)
7315         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
7316
7317         ;;
7318 (xno)
7319         ;;
7320 (x/*)
7321         test -f "$with_versioned_syms" || { { echo "$as_me:7321: error: expected a filename: $with_versioned_syms" >&5
7322 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
7323    { (exit 1); exit 1; }; }
7324         ;;
7325 (*)
7326         test -f "$with_versioned_syms" || { { echo "$as_me:7326: error: expected a filename: $with_versioned_syms" >&5
7327 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
7328    { (exit 1); exit 1; }; }
7329         with_versioned_syms=`pwd`/"$with_versioned_syms"
7330         ;;
7331 esac
7332 echo "$as_me:7332: result: $with_versioned_syms" >&5
7333 echo "${ECHO_T}$with_versioned_syms" >&6
7334
7335 RESULTING_SYMS=
7336 VERSIONED_SYMS=
7337 WILDCARD_SYMS=
7338
7339 if test "x$with_versioned_syms" != xno
7340 then
7341         RESULTING_SYMS=$with_versioned_syms
7342         case "x$MK_SHARED_LIB" in
7343         (*-Wl,*)
7344                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
7345                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
7346                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7347
7348 echo "${as_me:-configure}:7348: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7349
7350                 ;;
7351         (*-dy\ *)
7352                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
7353                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
7354                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7355
7356 echo "${as_me:-configure}:7356: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7357
7358                 ;;
7359         (*)
7360                 { echo "$as_me:7360: WARNING: this system does not support versioned-symbols" >&5
7361 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
7362                 ;;
7363         esac
7364
7365         # Linux ld can selectively override scope, e.g., of symbols beginning with
7366         # "_" by first declaring some as global, and then using a wildcard to
7367         # declare the others as local.  Some other loaders cannot do this.  Check
7368         # by constructing a (very) simple shared library and inspecting its
7369         # symbols.
7370         if test "x$VERSIONED_SYMS" != "x"
7371         then
7372                 echo "$as_me:7372: checking if wildcards can be used to selectively omit symbols" >&5
7373 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
7374                 WILDCARD_SYMS=no
7375
7376                 # make sources
7377                 rm -f conftest.*
7378
7379                 cat >conftest.ver <<EOF
7380 module_1.0 {
7381 global:
7382         globalf1;
7383 local:
7384         localf1;
7385 };
7386 module_2.0 {
7387 global:
7388         globalf2;
7389 local:
7390         localf2;
7391         _*;
7392 } module_1.0;
7393 submodule_1.0 {
7394 global:
7395         subglobalf1;
7396         _ismissing;
7397 local:
7398         sublocalf1;
7399 };
7400 submodule_2.0 {
7401 global:
7402         subglobalf2;
7403 local:
7404         sublocalf2;
7405         _*;
7406 } submodule_1.0;
7407 EOF
7408                 cat >conftest.$ac_ext <<EOF
7409 #line 7409 "configure"
7410 int     _ismissing(void) { return 1; }
7411 int     _localf1(void) { return 1; }
7412 int     _localf2(void) { return 2; }
7413 int     globalf1(void) { return 1; }
7414 int     globalf2(void) { return 2; }
7415 int     _sublocalf1(void) { return 1; }
7416 int     _sublocalf2(void) { return 2; }
7417 int     subglobalf1(void) { return 1; }
7418 int     subglobalf2(void) { return 2; }
7419 EOF
7420                 cat >conftest.mk <<EOF
7421 CC=${CC}
7422 CFLAGS=${CFLAGS}
7423 CPPFLAGS=${CPPFLAGS}
7424 LDFLAGS=${LDFLAGS}
7425 LIBS=${LIBS}
7426 VERSIONED_SYMS=${VERSIONED_SYMS}
7427 RESULTING_SYMS=conftest.ver
7428 MK_SHARED_LIB=${MK_SHARED_LIB}
7429 conftest.so: conftest.$ac_cv_objext
7430                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
7431 EOF
7432
7433                 # compile source, make library
7434                 if make -f conftest.mk 2>&5 >/dev/null
7435                 then
7436                         # test for missing symbol in either Data or Text section
7437                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
7438                         test -n "$cf_missing" && WILDCARD_SYMS=yes
7439                 fi
7440                 echo "$as_me:7440: result: $WILDCARD_SYMS" >&5
7441 echo "${ECHO_T}$WILDCARD_SYMS" >&6
7442                 rm -f conftest.*
7443         fi
7444 fi
7445
7446                 ;;
7447         esac
7448 done
7449
7450 ### Checks for special libraries, must be done up-front.
7451 SHLIB_LIST=""
7452
7453 echo "$as_me:7453: checking if you want to link with the GPM mouse library" >&5
7454 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
7455
7456 # Check whether --with-gpm or --without-gpm was given.
7457 if test "${with_gpm+set}" = set; then
7458   withval="$with_gpm"
7459   with_gpm=$withval
7460 else
7461   with_gpm=maybe
7462 fi;
7463 echo "$as_me:7463: result: $with_gpm" >&5
7464 echo "${ECHO_T}$with_gpm" >&6
7465
7466 if test "$with_gpm" != no ; then
7467         echo "$as_me:7467: checking for gpm.h" >&5
7468 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
7469 if test "${ac_cv_header_gpm_h+set}" = set; then
7470   echo $ECHO_N "(cached) $ECHO_C" >&6
7471 else
7472   cat >"conftest.$ac_ext" <<_ACEOF
7473 #line 7473 "configure"
7474 #include "confdefs.h"
7475 #include <gpm.h>
7476 _ACEOF
7477 if { (eval echo "$as_me:7477: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7478   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7479   ac_status=$?
7480   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7481   rm -f conftest.er1
7482   cat conftest.err >&5
7483   echo "$as_me:7483: \$? = $ac_status" >&5
7484   (exit "$ac_status"); } >/dev/null; then
7485   if test -s conftest.err; then
7486     ac_cpp_err=$ac_c_preproc_warn_flag
7487   else
7488     ac_cpp_err=
7489   fi
7490 else
7491   ac_cpp_err=yes
7492 fi
7493 if test -z "$ac_cpp_err"; then
7494   ac_cv_header_gpm_h=yes
7495 else
7496   echo "$as_me: failed program was:" >&5
7497   cat "conftest.$ac_ext" >&5
7498   ac_cv_header_gpm_h=no
7499 fi
7500 rm -f conftest.err "conftest.$ac_ext"
7501 fi
7502 echo "$as_me:7502: result: $ac_cv_header_gpm_h" >&5
7503 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
7504 if test "$ac_cv_header_gpm_h" = yes; then
7505
7506 cat >>confdefs.h <<\EOF
7507 #define HAVE_GPM_H 1
7508 EOF
7509
7510                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
7511                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
7512
7513 echo "${as_me:-configure}:7513: testing assuming we really have GPM library ..." 1>&5
7514
7515 cat >>confdefs.h <<\EOF
7516 #define HAVE_LIBGPM 1
7517 EOF
7518
7519                         with_gpm=yes
7520                 else
7521                         echo "$as_me:7521: checking for Gpm_Open in -lgpm" >&5
7522 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7523 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7524   echo $ECHO_N "(cached) $ECHO_C" >&6
7525 else
7526   ac_check_lib_save_LIBS=$LIBS
7527 LIBS="-lgpm  $LIBS"
7528 cat >"conftest.$ac_ext" <<_ACEOF
7529 #line 7529 "configure"
7530 #include "confdefs.h"
7531
7532 /* Override any gcc2 internal prototype to avoid an error.  */
7533 #ifdef __cplusplus
7534 extern "C"
7535 #endif
7536 /* We use char because int might match the return type of a gcc2
7537    builtin and then its argument prototype would still apply.  */
7538 char Gpm_Open ();
7539 int
7540 main (void)
7541 {
7542 Gpm_Open ();
7543   ;
7544   return 0;
7545 }
7546 _ACEOF
7547 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7548 if { (eval echo "$as_me:7548: \"$ac_link\"") >&5
7549   (eval $ac_link) 2>&5
7550   ac_status=$?
7551   echo "$as_me:7551: \$? = $ac_status" >&5
7552   (exit "$ac_status"); } &&
7553          { ac_try='test -s "conftest$ac_exeext"'
7554   { (eval echo "$as_me:7554: \"$ac_try\"") >&5
7555   (eval $ac_try) 2>&5
7556   ac_status=$?
7557   echo "$as_me:7557: \$? = $ac_status" >&5
7558   (exit "$ac_status"); }; }; then
7559   ac_cv_lib_gpm_Gpm_Open=yes
7560 else
7561   echo "$as_me: failed program was:" >&5
7562 cat "conftest.$ac_ext" >&5
7563 ac_cv_lib_gpm_Gpm_Open=no
7564 fi
7565 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7566 LIBS=$ac_check_lib_save_LIBS
7567 fi
7568 echo "$as_me:7568: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7569 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7570 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
7571   with_gpm=yes
7572 else
7573
7574                                 if test "$with_gpm" = maybe; then
7575                                         { echo "$as_me:7575: WARNING: Cannot link with GPM library" >&5
7576 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
7577                                         with_gpm=no
7578                                 else
7579                                         { { echo "$as_me:7579: error: Cannot link with GPM library" >&5
7580 echo "$as_me: error: Cannot link with GPM library" >&2;}
7581    { (exit 1); exit 1; }; }
7582                                 fi
7583
7584 fi
7585
7586                 fi
7587
7588 else
7589
7590                 test "$with_gpm" != maybe && { echo "$as_me:7590: WARNING: Cannot find GPM header" >&5
7591 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
7592                 with_gpm=no
7593
7594 fi
7595
7596 fi
7597
7598 if test "$with_gpm" != no ; then
7599         echo "$as_me:7599: checking if you want to load GPM dynamically" >&5
7600 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
7601
7602 # Check whether --with-dlsym or --without-dlsym was given.
7603 if test "${with_dlsym+set}" = set; then
7604   withval="$with_dlsym"
7605   with_dlsym=$withval
7606 else
7607   with_dlsym=yes
7608 fi;
7609         echo "$as_me:7609: result: $with_dlsym" >&5
7610 echo "${ECHO_T}$with_dlsym" >&6
7611         if test "x$with_dlsym" = xyes ; then
7612
7613 cf_have_dlsym=no
7614 echo "$as_me:7614: checking for dlsym" >&5
7615 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7616 if test "${ac_cv_func_dlsym+set}" = set; then
7617   echo $ECHO_N "(cached) $ECHO_C" >&6
7618 else
7619   cat >"conftest.$ac_ext" <<_ACEOF
7620 #line 7620 "configure"
7621 #include "confdefs.h"
7622 #define dlsym autoconf_temporary
7623 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7624 #undef dlsym
7625
7626 #ifdef __cplusplus
7627 extern "C"
7628 #endif
7629
7630 /* We use char because int might match the return type of a gcc2
7631    builtin and then its argument prototype would still apply.  */
7632 char dlsym (void);
7633
7634 int
7635 main (void)
7636 {
7637
7638 /* The GNU C library defines stubs for functions which it implements
7639     to always fail with ENOSYS.  Some functions are actually named
7640     something starting with __ and the normal name is an alias.  */
7641 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7642 #error found stub for dlsym
7643 #endif
7644
7645         return dlsym ();
7646   ;
7647   return 0;
7648 }
7649 _ACEOF
7650 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7651 if { (eval echo "$as_me:7651: \"$ac_link\"") >&5
7652   (eval $ac_link) 2>&5
7653   ac_status=$?
7654   echo "$as_me:7654: \$? = $ac_status" >&5
7655   (exit "$ac_status"); } &&
7656          { ac_try='test -s "conftest$ac_exeext"'
7657   { (eval echo "$as_me:7657: \"$ac_try\"") >&5
7658   (eval $ac_try) 2>&5
7659   ac_status=$?
7660   echo "$as_me:7660: \$? = $ac_status" >&5
7661   (exit "$ac_status"); }; }; then
7662   ac_cv_func_dlsym=yes
7663 else
7664   echo "$as_me: failed program was:" >&5
7665 cat "conftest.$ac_ext" >&5
7666 ac_cv_func_dlsym=no
7667 fi
7668 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7669 fi
7670 echo "$as_me:7670: result: $ac_cv_func_dlsym" >&5
7671 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7672 if test "$ac_cv_func_dlsym" = yes; then
7673   cf_have_dlsym=yes
7674 else
7675
7676 cf_have_libdl=no
7677 echo "$as_me:7677: checking for dlsym in -ldl" >&5
7678 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7679 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7680   echo $ECHO_N "(cached) $ECHO_C" >&6
7681 else
7682   ac_check_lib_save_LIBS=$LIBS
7683 LIBS="-ldl  $LIBS"
7684 cat >"conftest.$ac_ext" <<_ACEOF
7685 #line 7685 "configure"
7686 #include "confdefs.h"
7687
7688 /* Override any gcc2 internal prototype to avoid an error.  */
7689 #ifdef __cplusplus
7690 extern "C"
7691 #endif
7692 /* We use char because int might match the return type of a gcc2
7693    builtin and then its argument prototype would still apply.  */
7694 char dlsym ();
7695 int
7696 main (void)
7697 {
7698 dlsym ();
7699   ;
7700   return 0;
7701 }
7702 _ACEOF
7703 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7704 if { (eval echo "$as_me:7704: \"$ac_link\"") >&5
7705   (eval $ac_link) 2>&5
7706   ac_status=$?
7707   echo "$as_me:7707: \$? = $ac_status" >&5
7708   (exit "$ac_status"); } &&
7709          { ac_try='test -s "conftest$ac_exeext"'
7710   { (eval echo "$as_me:7710: \"$ac_try\"") >&5
7711   (eval $ac_try) 2>&5
7712   ac_status=$?
7713   echo "$as_me:7713: \$? = $ac_status" >&5
7714   (exit "$ac_status"); }; }; then
7715   ac_cv_lib_dl_dlsym=yes
7716 else
7717   echo "$as_me: failed program was:" >&5
7718 cat "conftest.$ac_ext" >&5
7719 ac_cv_lib_dl_dlsym=no
7720 fi
7721 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7722 LIBS=$ac_check_lib_save_LIBS
7723 fi
7724 echo "$as_me:7724: result: $ac_cv_lib_dl_dlsym" >&5
7725 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7726 if test "$ac_cv_lib_dl_dlsym" = yes; then
7727
7728         cf_have_dlsym=yes
7729         cf_have_libdl=yes
7730 fi
7731
7732 fi
7733
7734 if test "$cf_have_dlsym" = yes ; then
7735         test "$cf_have_libdl" = yes && {
7736 cf_add_libs="$LIBS"
7737 # reverse order
7738 cf_add_0lib=
7739 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7740 # filter duplicates
7741 for cf_add_1lib in $cf_add_0lib; do
7742         for cf_add_2lib in $cf_add_libs; do
7743                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7744                         cf_add_1lib=
7745                         break
7746                 fi
7747         done
7748         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7749 done
7750 LIBS="$cf_add_libs"
7751  }
7752
7753         echo "$as_me:7753: checking whether able to link to dl*() functions" >&5
7754 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7755         cat >"conftest.$ac_ext" <<_ACEOF
7756 #line 7756 "configure"
7757 #include "confdefs.h"
7758 #include <dlfcn.h>
7759 int
7760 main (void)
7761 {
7762
7763                 void *obj;
7764                 if ((obj = dlopen("filename", 0)) != 0) {
7765                         if (dlsym(obj, "symbolname") == 0) {
7766                         dlclose(obj);
7767                         }
7768                 }
7769   ;
7770   return 0;
7771 }
7772 _ACEOF
7773 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7774 if { (eval echo "$as_me:7774: \"$ac_link\"") >&5
7775   (eval $ac_link) 2>&5
7776   ac_status=$?
7777   echo "$as_me:7777: \$? = $ac_status" >&5
7778   (exit "$ac_status"); } &&
7779          { ac_try='test -s "conftest$ac_exeext"'
7780   { (eval echo "$as_me:7780: \"$ac_try\"") >&5
7781   (eval $ac_try) 2>&5
7782   ac_status=$?
7783   echo "$as_me:7783: \$? = $ac_status" >&5
7784   (exit "$ac_status"); }; }; then
7785
7786 cat >>confdefs.h <<\EOF
7787 #define HAVE_LIBDL 1
7788 EOF
7789
7790 else
7791   echo "$as_me: failed program was:" >&5
7792 cat "conftest.$ac_ext" >&5
7793
7794                 { { echo "$as_me:7794: error: Cannot link test program for libdl" >&5
7795 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7796    { (exit 1); exit 1; }; }
7797 fi
7798 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7799         echo "$as_me:7799: result: ok" >&5
7800 echo "${ECHO_T}ok" >&6
7801 else
7802         { { echo "$as_me:7802: error: Cannot find dlsym function" >&5
7803 echo "$as_me: error: Cannot find dlsym function" >&2;}
7804    { (exit 1); exit 1; }; }
7805 fi
7806
7807                 if test "x$with_gpm" != xyes ; then
7808                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7809
7810 echo "${as_me:-configure}:7810: testing assuming soname for gpm is $with_gpm ..." 1>&5
7811
7812                         cf_cv_gpm_soname="$with_gpm"
7813                 else
7814
7815 echo "$as_me:7815: checking for soname of gpm library" >&5
7816 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7817 if test "${cf_cv_gpm_soname+set}" = set; then
7818   echo $ECHO_N "(cached) $ECHO_C" >&6
7819 else
7820
7821 cf_cv_gpm_soname=unknown
7822 if test "$cross_compiling" != yes ; then
7823 cat >conftest.$ac_ext <<CF_EOF
7824 #include <gpm.h>
7825 int main(void)
7826 {
7827 if (Gpm_Open(0,0)) Gpm_Close();
7828         ${cf_cv_main_return:-return}(0);
7829 }
7830 CF_EOF
7831 cf_save_LIBS="$LIBS"
7832
7833 cf_add_libs="$LIBS"
7834 # reverse order
7835 cf_add_0lib=
7836 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7837 # filter duplicates
7838 for cf_add_1lib in $cf_add_0lib; do
7839         for cf_add_2lib in $cf_add_libs; do
7840                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7841                         cf_add_1lib=
7842                         break
7843                 fi
7844         done
7845         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7846 done
7847 LIBS="$cf_add_libs"
7848
7849         if { (eval echo "$as_me:7849: \"$ac_compile\"") >&5
7850   (eval $ac_compile) 2>&5
7851   ac_status=$?
7852   echo "$as_me:7852: \$? = $ac_status" >&5
7853   (exit "$ac_status"); } ; then
7854                 if { (eval echo "$as_me:7854: \"$ac_link\"") >&5
7855   (eval $ac_link) 2>&5
7856   ac_status=$?
7857   echo "$as_me:7857: \$? = $ac_status" >&5
7858   (exit "$ac_status"); } ; then
7859                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7860                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7861                 fi
7862         fi
7863 rm -rf ./conftest*
7864 LIBS="$cf_save_LIBS"
7865 fi
7866
7867 fi
7868 echo "$as_me:7868: result: $cf_cv_gpm_soname" >&5
7869 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7870
7871                 fi
7872                 test "$cf_cv_gpm_soname" != "unknown" &&
7873 cat >>confdefs.h <<EOF
7874 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7875 EOF
7876
7877                 SHLIB_LIST="-ldl $SHLIB_LIST"
7878
7879 cf_add_libs="$PRIVATE_LIBS"
7880 # reverse order
7881 cf_add_0lib=
7882 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7883 # filter duplicates
7884 for cf_add_1lib in $cf_add_0lib; do
7885         for cf_add_2lib in $cf_add_libs; do
7886                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7887                         cf_add_1lib=
7888                         break
7889                 fi
7890         done
7891         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7892 done
7893 PRIVATE_LIBS="$cf_add_libs"
7894
7895         else
7896                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7897
7898 cf_add_libs="$TEST_LIBS"
7899 # reverse order
7900 cf_add_0lib=
7901 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7902 # filter duplicates
7903 for cf_add_1lib in $cf_add_0lib; do
7904         for cf_add_2lib in $cf_add_libs; do
7905                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7906                         cf_add_1lib=
7907                         break
7908                 fi
7909         done
7910         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7911 done
7912 TEST_LIBS="$cf_add_libs"
7913
7914 cf_add_libs="$PRIVATE_LIBS"
7915 # reverse order
7916 cf_add_0lib=
7917 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7918 # filter duplicates
7919 for cf_add_1lib in $cf_add_0lib; do
7920         for cf_add_2lib in $cf_add_libs; do
7921                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7922                         cf_add_1lib=
7923                         break
7924                 fi
7925         done
7926         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7927 done
7928 PRIVATE_LIBS="$cf_add_libs"
7929
7930         fi
7931
7932 cat >>confdefs.h <<\EOF
7933 #define HAVE_LIBGPM 1
7934 EOF
7935
7936 echo "$as_me:7936: checking for Gpm_Wgetch in -lgpm" >&5
7937 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7938 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7939   echo $ECHO_N "(cached) $ECHO_C" >&6
7940 else
7941   ac_check_lib_save_LIBS=$LIBS
7942 LIBS="-lgpm  $LIBS"
7943 cat >"conftest.$ac_ext" <<_ACEOF
7944 #line 7944 "configure"
7945 #include "confdefs.h"
7946
7947 /* Override any gcc2 internal prototype to avoid an error.  */
7948 #ifdef __cplusplus
7949 extern "C"
7950 #endif
7951 /* We use char because int might match the return type of a gcc2
7952    builtin and then its argument prototype would still apply.  */
7953 char Gpm_Wgetch ();
7954 int
7955 main (void)
7956 {
7957 Gpm_Wgetch ();
7958   ;
7959   return 0;
7960 }
7961 _ACEOF
7962 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7963 if { (eval echo "$as_me:7963: \"$ac_link\"") >&5
7964   (eval $ac_link) 2>&5
7965   ac_status=$?
7966   echo "$as_me:7966: \$? = $ac_status" >&5
7967   (exit "$ac_status"); } &&
7968          { ac_try='test -s "conftest$ac_exeext"'
7969   { (eval echo "$as_me:7969: \"$ac_try\"") >&5
7970   (eval $ac_try) 2>&5
7971   ac_status=$?
7972   echo "$as_me:7972: \$? = $ac_status" >&5
7973   (exit "$ac_status"); }; }; then
7974   ac_cv_lib_gpm_Gpm_Wgetch=yes
7975 else
7976   echo "$as_me: failed program was:" >&5
7977 cat "conftest.$ac_ext" >&5
7978 ac_cv_lib_gpm_Gpm_Wgetch=no
7979 fi
7980 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7981 LIBS=$ac_check_lib_save_LIBS
7982 fi
7983 echo "$as_me:7983: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7984 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7985 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
7986
7987 echo "$as_me:7987: checking if GPM is weakly bound to curses library" >&5
7988 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7989 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7990   echo $ECHO_N "(cached) $ECHO_C" >&6
7991 else
7992
7993 cf_cv_check_gpm_wgetch=unknown
7994 if test "$cross_compiling" != yes ; then
7995
7996 cat >conftest.$ac_ext <<CF_EOF
7997 #include <gpm.h>
7998 int main(void)
7999 {
8000         Gpm_Wgetch();
8001         ${cf_cv_main_return:-return}(0);
8002 }
8003 CF_EOF
8004
8005         cf_save_LIBS="$LIBS"
8006         # This only works if we can look at the symbol table.  If a shared
8007         # library is stripped for install, we cannot use that.  So we're forced
8008         # to rely on the static library, noting that some packagers may not
8009         # include it.
8010         LIBS="-static -lgpm -dynamic $LIBS"
8011         if { (eval echo "$as_me:8011: \"$ac_compile\"") >&5
8012   (eval $ac_compile) 2>&5
8013   ac_status=$?
8014   echo "$as_me:8014: \$? = $ac_status" >&5
8015   (exit "$ac_status"); } ; then
8016                 if { (eval echo "$as_me:8016: \"$ac_link\"") >&5
8017   (eval $ac_link) 2>&5
8018   ac_status=$?
8019   echo "$as_me:8019: \$? = $ac_status" >&5
8020   (exit "$ac_status"); } ; then
8021                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
8022                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
8023                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
8024                 fi
8025         fi
8026         rm -rf ./conftest*
8027         LIBS="$cf_save_LIBS"
8028 fi
8029
8030 fi
8031 echo "$as_me:8031: result: $cf_cv_check_gpm_wgetch" >&5
8032 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
8033
8034 if test "$cf_cv_check_gpm_wgetch" != yes ; then
8035         { echo "$as_me:8035: WARNING: GPM library is already linked with curses - read the FAQ" >&5
8036 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
8037 fi
8038
8039 fi
8040
8041 fi
8042
8043 echo "$as_me:8043: checking if you want to use PCRE2 for regular-expressions" >&5
8044 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
8045
8046 # Check whether --with-pcre2 or --without-pcre2 was given.
8047 if test "${with_pcre2+set}" = set; then
8048   withval="$with_pcre2"
8049
8050 fi;
8051 test -z "$with_pcre2" && with_pcre2=no
8052 echo "$as_me:8052: result: $with_pcre2" >&5
8053 echo "${ECHO_T}$with_pcre2" >&6
8054
8055 if test "x$with_pcre2" != xno ; then
8056         cf_with_pcre2_ok=no
8057         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
8058         do
8059
8060 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
8061         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
8062
8063 echo "${as_me:-configure}:8063: testing found package $cf_with_pcre2 ..." 1>&5
8064
8065         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
8066         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
8067         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
8068
8069 echo "${as_me:-configure}:8069: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
8070
8071         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
8072
8073 echo "${as_me:-configure}:8073: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
8074
8075 cf_fix_cppflags=no
8076 cf_new_cflags=
8077 cf_new_cppflags=
8078 cf_new_extra_cppflags=
8079
8080 for cf_add_cflags in $cf_pkgconfig_incs
8081 do
8082 case "$cf_fix_cppflags" in
8083 (no)
8084         case "$cf_add_cflags" in
8085         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8086                 case "$cf_add_cflags" in
8087                 (-D*)
8088                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8089
8090                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8091                                 && test -z "${cf_tst_cflags}" \
8092                                 && cf_fix_cppflags=yes
8093
8094                         if test "$cf_fix_cppflags" = yes ; then
8095
8096         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8097         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8098
8099                                 continue
8100                         elif test "${cf_tst_cflags}" = "\"'" ; then
8101
8102         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8103         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8104
8105                                 continue
8106                         fi
8107                         ;;
8108                 esac
8109                 case "$CPPFLAGS" in
8110                 (*$cf_add_cflags)
8111                         ;;
8112                 (*)
8113                         case "$cf_add_cflags" in
8114                         (-D*)
8115                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8116
8117 CPPFLAGS=`echo "$CPPFLAGS" | \
8118         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8119                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8120
8121                                 ;;
8122                         esac
8123
8124         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8125         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8126
8127                         ;;
8128                 esac
8129                 ;;
8130         (*)
8131
8132         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8133         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8134
8135                 ;;
8136         esac
8137         ;;
8138 (yes)
8139
8140         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8141         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8142
8143         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8144
8145         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8146                 && test -z "${cf_tst_cflags}" \
8147                 && cf_fix_cppflags=no
8148         ;;
8149 esac
8150 done
8151
8152 if test -n "$cf_new_cflags" ; then
8153
8154         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8155         CFLAGS="${CFLAGS}$cf_new_cflags"
8156
8157 fi
8158
8159 if test -n "$cf_new_cppflags" ; then
8160
8161         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8162         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8163
8164 fi
8165
8166 if test -n "$cf_new_extra_cppflags" ; then
8167
8168         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8169         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8170
8171 fi
8172
8173 cf_add_libs="$LIBS"
8174 # reverse order
8175 cf_add_0lib=
8176 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8177 # filter duplicates
8178 for cf_add_1lib in $cf_add_0lib; do
8179         for cf_add_2lib in $cf_add_libs; do
8180                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8181                         cf_add_1lib=
8182                         break
8183                 fi
8184         done
8185         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8186 done
8187 LIBS="$cf_add_libs"
8188
8189         cf_with_pcre2_ok=yes; break
8190 else
8191         cf_pkgconfig_incs=
8192         cf_pkgconfig_libs=
8193         :
8194 fi
8195
8196         done
8197         cf_with_pcre2_ok=yes || { { echo "$as_me:8197: error: Cannot find PCRE2 library" >&5
8198 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
8199    { (exit 1); exit 1; }; }
8200
8201 cat >>confdefs.h <<\EOF
8202 #define HAVE_LIB_PCRE2 1
8203 EOF
8204
8205         # if pkgconfig gave no results, look for the libraries directly
8206         case "$LIBS" in
8207         (*pcre2-posix*|*pcreposix*)
8208                 ;;
8209         (*)
8210                 echo "$as_me:8210: checking for regcomp in -lpcre2-posix" >&5
8211 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
8212 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
8213   echo $ECHO_N "(cached) $ECHO_C" >&6
8214 else
8215   ac_check_lib_save_LIBS=$LIBS
8216 LIBS="-lpcre2-posix  $LIBS"
8217 cat >"conftest.$ac_ext" <<_ACEOF
8218 #line 8218 "configure"
8219 #include "confdefs.h"
8220
8221 /* Override any gcc2 internal prototype to avoid an error.  */
8222 #ifdef __cplusplus
8223 extern "C"
8224 #endif
8225 /* We use char because int might match the return type of a gcc2
8226    builtin and then its argument prototype would still apply.  */
8227 char regcomp ();
8228 int
8229 main (void)
8230 {
8231 regcomp ();
8232   ;
8233   return 0;
8234 }
8235 _ACEOF
8236 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8237 if { (eval echo "$as_me:8237: \"$ac_link\"") >&5
8238   (eval $ac_link) 2>&5
8239   ac_status=$?
8240   echo "$as_me:8240: \$? = $ac_status" >&5
8241   (exit "$ac_status"); } &&
8242          { ac_try='test -s "conftest$ac_exeext"'
8243   { (eval echo "$as_me:8243: \"$ac_try\"") >&5
8244   (eval $ac_try) 2>&5
8245   ac_status=$?
8246   echo "$as_me:8246: \$? = $ac_status" >&5
8247   (exit "$ac_status"); }; }; then
8248   ac_cv_lib_pcre2_posix_regcomp=yes
8249 else
8250   echo "$as_me: failed program was:" >&5
8251 cat "conftest.$ac_ext" >&5
8252 ac_cv_lib_pcre2_posix_regcomp=no
8253 fi
8254 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8255 LIBS=$ac_check_lib_save_LIBS
8256 fi
8257 echo "$as_me:8257: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
8258 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
8259 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
8260
8261 cf_add_libs="$LIBS"
8262 # reverse order
8263 cf_add_0lib=
8264 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8265 # filter duplicates
8266 for cf_add_1lib in $cf_add_0lib; do
8267         for cf_add_2lib in $cf_add_libs; do
8268                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8269                         cf_add_1lib=
8270                         break
8271                 fi
8272         done
8273         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8274 done
8275 LIBS="$cf_add_libs"
8276
8277 else
8278   echo "$as_me:8278: checking for regcomp in -lpcreposix" >&5
8279 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
8280 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
8281   echo $ECHO_N "(cached) $ECHO_C" >&6
8282 else
8283   ac_check_lib_save_LIBS=$LIBS
8284 LIBS="-lpcreposix  $LIBS"
8285 cat >"conftest.$ac_ext" <<_ACEOF
8286 #line 8286 "configure"
8287 #include "confdefs.h"
8288
8289 /* Override any gcc2 internal prototype to avoid an error.  */
8290 #ifdef __cplusplus
8291 extern "C"
8292 #endif
8293 /* We use char because int might match the return type of a gcc2
8294    builtin and then its argument prototype would still apply.  */
8295 char regcomp ();
8296 int
8297 main (void)
8298 {
8299 regcomp ();
8300   ;
8301   return 0;
8302 }
8303 _ACEOF
8304 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8305 if { (eval echo "$as_me:8305: \"$ac_link\"") >&5
8306   (eval $ac_link) 2>&5
8307   ac_status=$?
8308   echo "$as_me:8308: \$? = $ac_status" >&5
8309   (exit "$ac_status"); } &&
8310          { ac_try='test -s "conftest$ac_exeext"'
8311   { (eval echo "$as_me:8311: \"$ac_try\"") >&5
8312   (eval $ac_try) 2>&5
8313   ac_status=$?
8314   echo "$as_me:8314: \$? = $ac_status" >&5
8315   (exit "$ac_status"); }; }; then
8316   ac_cv_lib_pcreposix_regcomp=yes
8317 else
8318   echo "$as_me: failed program was:" >&5
8319 cat "conftest.$ac_ext" >&5
8320 ac_cv_lib_pcreposix_regcomp=no
8321 fi
8322 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8323 LIBS=$ac_check_lib_save_LIBS
8324 fi
8325 echo "$as_me:8325: result: $ac_cv_lib_pcreposix_regcomp" >&5
8326 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
8327 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
8328
8329 cf_add_libs="$LIBS"
8330 # reverse order
8331 cf_add_0lib=
8332 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8333 # filter duplicates
8334 for cf_add_1lib in $cf_add_0lib; do
8335         for cf_add_2lib in $cf_add_libs; do
8336                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8337                         cf_add_1lib=
8338                         break
8339                 fi
8340         done
8341         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8342 done
8343 LIBS="$cf_add_libs"
8344
8345 else
8346   { { echo "$as_me:8346: error: Cannot find PCRE2 POSIX library" >&5
8347 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
8348    { (exit 1); exit 1; }; }
8349 fi
8350
8351 fi
8352
8353                 ;;
8354         esac
8355
8356         # either way, check for the library header files
8357
8358 for ac_header in pcre2posix.h pcreposix.h
8359 do
8360 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8361 echo "$as_me:8361: checking for $ac_header" >&5
8362 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8363 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8364   echo $ECHO_N "(cached) $ECHO_C" >&6
8365 else
8366   cat >"conftest.$ac_ext" <<_ACEOF
8367 #line 8367 "configure"
8368 #include "confdefs.h"
8369 #include <$ac_header>
8370 _ACEOF
8371 if { (eval echo "$as_me:8371: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8372   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8373   ac_status=$?
8374   $EGREP -v '^ *\+' conftest.er1 >conftest.err
8375   rm -f conftest.er1
8376   cat conftest.err >&5
8377   echo "$as_me:8377: \$? = $ac_status" >&5
8378   (exit "$ac_status"); } >/dev/null; then
8379   if test -s conftest.err; then
8380     ac_cpp_err=$ac_c_preproc_warn_flag
8381   else
8382     ac_cpp_err=
8383   fi
8384 else
8385   ac_cpp_err=yes
8386 fi
8387 if test -z "$ac_cpp_err"; then
8388   eval "$as_ac_Header=yes"
8389 else
8390   echo "$as_me: failed program was:" >&5
8391   cat "conftest.$ac_ext" >&5
8392   eval "$as_ac_Header=no"
8393 fi
8394 rm -f conftest.err "conftest.$ac_ext"
8395 fi
8396 echo "$as_me:8396: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8397 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8398 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8399   cat >>confdefs.h <<EOF
8400 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8401 EOF
8402
8403 fi
8404 done
8405
8406 for ac_func in PCRE2regcomp
8407 do
8408 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8409 echo "$as_me:8409: checking for $ac_func" >&5
8410 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8411 if eval "test \"\${$as_ac_var+set}\" = set"; then
8412   echo $ECHO_N "(cached) $ECHO_C" >&6
8413 else
8414   cat >"conftest.$ac_ext" <<_ACEOF
8415 #line 8415 "configure"
8416 #include "confdefs.h"
8417 #define $ac_func autoconf_temporary
8418 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8419 #undef $ac_func
8420
8421 #ifdef __cplusplus
8422 extern "C"
8423 #endif
8424
8425 /* We use char because int might match the return type of a gcc2
8426    builtin and then its argument prototype would still apply.  */
8427 char $ac_func (void);
8428
8429 int
8430 main (void)
8431 {
8432
8433 /* The GNU C library defines stubs for functions which it implements
8434     to always fail with ENOSYS.  Some functions are actually named
8435     something starting with __ and the normal name is an alias.  */
8436 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8437 #error found stub for $ac_func
8438 #endif
8439
8440         return $ac_func ();
8441   ;
8442   return 0;
8443 }
8444 _ACEOF
8445 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8446 if { (eval echo "$as_me:8446: \"$ac_link\"") >&5
8447   (eval $ac_link) 2>&5
8448   ac_status=$?
8449   echo "$as_me:8449: \$? = $ac_status" >&5
8450   (exit "$ac_status"); } &&
8451          { ac_try='test -s "conftest$ac_exeext"'
8452   { (eval echo "$as_me:8452: \"$ac_try\"") >&5
8453   (eval $ac_try) 2>&5
8454   ac_status=$?
8455   echo "$as_me:8455: \$? = $ac_status" >&5
8456   (exit "$ac_status"); }; }; then
8457   eval "$as_ac_var=yes"
8458 else
8459   echo "$as_me: failed program was:" >&5
8460 cat "conftest.$ac_ext" >&5
8461 eval "$as_ac_var=no"
8462 fi
8463 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8464 fi
8465 echo "$as_me:8465: result: `eval echo '${'"$as_ac_var"'}'`" >&5
8466 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
8467 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
8468   cat >>confdefs.h <<EOF
8469 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8470 EOF
8471
8472 fi
8473 done
8474
8475 fi
8476
8477 # not everyone has "test -c"
8478 if test -c /dev/sysmouse 2>/dev/null ; then
8479 echo "$as_me:8479: checking if you want to use sysmouse" >&5
8480 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
8481
8482 # Check whether --with-sysmouse or --without-sysmouse was given.
8483 if test "${with_sysmouse+set}" = set; then
8484   withval="$with_sysmouse"
8485   cf_with_sysmouse=$withval
8486 else
8487   cf_with_sysmouse=maybe
8488 fi;
8489         if test "$cf_with_sysmouse" != no ; then
8490         cat >"conftest.$ac_ext" <<_ACEOF
8491 #line 8491 "configure"
8492 #include "confdefs.h"
8493
8494 #include <osreldate.h>
8495 #if (__FreeBSD_version >= 400017)
8496 #include <sys/consio.h>
8497 #include <sys/fbio.h>
8498 #else
8499 #include <machine/console.h>
8500 #endif
8501
8502 int
8503 main (void)
8504 {
8505
8506         struct mouse_info the_mouse;
8507         ioctl(0, CONS_MOUSECTL, &the_mouse);
8508
8509   ;
8510   return 0;
8511 }
8512 _ACEOF
8513 rm -f "conftest.$ac_objext"
8514 if { (eval echo "$as_me:8514: \"$ac_compile\"") >&5
8515   (eval $ac_compile) 2>&5
8516   ac_status=$?
8517   echo "$as_me:8517: \$? = $ac_status" >&5
8518   (exit "$ac_status"); } &&
8519          { ac_try='test -s "conftest.$ac_objext"'
8520   { (eval echo "$as_me:8520: \"$ac_try\"") >&5
8521   (eval $ac_try) 2>&5
8522   ac_status=$?
8523   echo "$as_me:8523: \$? = $ac_status" >&5
8524   (exit "$ac_status"); }; }; then
8525   cf_with_sysmouse=yes
8526 else
8527   echo "$as_me: failed program was:" >&5
8528 cat "conftest.$ac_ext" >&5
8529 cf_with_sysmouse=no
8530 fi
8531 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8532         fi
8533 echo "$as_me:8533: result: $cf_with_sysmouse" >&5
8534 echo "${ECHO_T}$cf_with_sysmouse" >&6
8535 test "$cf_with_sysmouse" = yes &&
8536 cat >>confdefs.h <<\EOF
8537 #define USE_SYSMOUSE 1
8538 EOF
8539
8540 fi
8541
8542 # pretend that ncurses==ncursesw==ncursest
8543 echo "$as_me:8543: checking if you want to disable library suffixes" >&5
8544 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
8545
8546 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
8547 if test "${enable_lib_suffixes+set}" = set; then
8548   enableval="$enable_lib_suffixes"
8549   test "$enableval" != no && enableval=yes
8550         if test "$enableval" != "yes" ; then
8551     disable_lib_suffixes=yes
8552         else
8553                 disable_lib_suffixes=no
8554         fi
8555 else
8556   enableval=yes
8557         disable_lib_suffixes=no
8558
8559 fi;
8560 echo "$as_me:8560: result: $disable_lib_suffixes" >&5
8561 echo "${ECHO_T}$disable_lib_suffixes" >&6
8562
8563 ### If we're building with rpath, try to link non-standard libs that way too.
8564 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
8565
8566 echo "$as_me:8566: checking if rpath-hack should be disabled" >&5
8567 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
8568
8569 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
8570 if test "${enable_rpath_hack+set}" = set; then
8571   enableval="$enable_rpath_hack"
8572   test "$enableval" != no && enableval=yes
8573         if test "$enableval" != "yes" ; then
8574     enable_rpath_hack=no
8575         else
8576                 enable_rpath_hack=yes
8577         fi
8578 else
8579   enableval=yes
8580         enable_rpath_hack=yes
8581
8582 fi;
8583 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
8584 echo "$as_me:8584: result: $cf_disable_rpath_hack" >&5
8585 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
8586
8587 if test "$enable_rpath_hack" = yes ; then
8588
8589 echo "$as_me:8589: checking for updated LDFLAGS" >&5
8590 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
8591 if test -n "$LD_RPATH_OPT" ; then
8592         echo "$as_me:8592: result: maybe" >&5
8593 echo "${ECHO_T}maybe" >&6
8594
8595         for ac_prog in ldd
8596 do
8597   # Extract the first word of "$ac_prog", so it can be a program name with args.
8598 set dummy $ac_prog; ac_word=$2
8599 echo "$as_me:8599: checking for $ac_word" >&5
8600 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8601 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
8602   echo $ECHO_N "(cached) $ECHO_C" >&6
8603 else
8604   if test -n "$cf_ldd_prog"; then
8605   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
8606 else
8607   ac_save_IFS=$IFS; IFS=$ac_path_separator
8608 ac_dummy="$PATH"
8609 for ac_dir in $ac_dummy; do
8610   IFS=$ac_save_IFS
8611   test -z "$ac_dir" && ac_dir=.
8612   $as_executable_p "$ac_dir/$ac_word" || continue
8613 ac_cv_prog_cf_ldd_prog="$ac_prog"
8614 echo "$as_me:8614: found $ac_dir/$ac_word" >&5
8615 break
8616 done
8617
8618 fi
8619 fi
8620 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
8621 if test -n "$cf_ldd_prog"; then
8622   echo "$as_me:8622: result: $cf_ldd_prog" >&5
8623 echo "${ECHO_T}$cf_ldd_prog" >&6
8624 else
8625   echo "$as_me:8625: result: no" >&5
8626 echo "${ECHO_T}no" >&6
8627 fi
8628
8629   test -n "$cf_ldd_prog" && break
8630 done
8631 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
8632
8633         cf_rpath_list="/usr/lib /lib"
8634         if test "$cf_ldd_prog" != no
8635         then
8636                 cf_rpath_oops=
8637
8638 cat >"conftest.$ac_ext" <<_ACEOF
8639 #line 8639 "configure"
8640 #include "confdefs.h"
8641 #include <stdio.h>
8642 int
8643 main (void)
8644 {
8645 printf("Hello");
8646   ;
8647   return 0;
8648 }
8649 _ACEOF
8650 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8651 if { (eval echo "$as_me:8651: \"$ac_link\"") >&5
8652   (eval $ac_link) 2>&5
8653   ac_status=$?
8654   echo "$as_me:8654: \$? = $ac_status" >&5
8655   (exit "$ac_status"); } &&
8656          { ac_try='test -s "conftest$ac_exeext"'
8657   { (eval echo "$as_me:8657: \"$ac_try\"") >&5
8658   (eval $ac_try) 2>&5
8659   ac_status=$?
8660   echo "$as_me:8660: \$? = $ac_status" >&5
8661   (exit "$ac_status"); }; }; then
8662   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
8663                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
8664 else
8665   echo "$as_me: failed program was:" >&5
8666 cat "conftest.$ac_ext" >&5
8667 fi
8668 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8669
8670                 # If we passed the link-test, but get a "not found" on a given library,
8671                 # this could be due to inept reconfiguration of gcc to make it only
8672                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
8673                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
8674                 # /usr/local libraries.
8675                 if test -n "$cf_rpath_oops"
8676                 then
8677                         for cf_rpath_src in $cf_rpath_oops
8678                         do
8679                                 for cf_rpath_dir in \
8680                                         /usr/local \
8681                                         /usr/pkg \
8682                                         /opt/sfw
8683                                 do
8684                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8685                                         then
8686                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8687
8688 echo "${as_me:-configure}:8688: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8689
8690                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8691                                                 break
8692                                         fi
8693                                 done
8694                         done
8695                 fi
8696         fi
8697
8698         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8699
8700 echo "${as_me:-configure}:8700: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8701
8702 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8703
8704 echo "${as_me:-configure}:8704: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8705
8706 cf_rpath_dst=
8707 for cf_rpath_src in $LDFLAGS
8708 do
8709         case "$cf_rpath_src" in
8710         (-L*)
8711
8712                 # check if this refers to a directory which we will ignore
8713                 cf_rpath_skip=no
8714                 if test -n "$cf_rpath_list"
8715                 then
8716                         for cf_rpath_item in $cf_rpath_list
8717                         do
8718                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8719                                 then
8720                                         cf_rpath_skip=yes
8721                                         break
8722                                 fi
8723                         done
8724                 fi
8725
8726                 if test "$cf_rpath_skip" = no
8727                 then
8728                         # transform the option
8729                         if test "$LD_RPATH_OPT" = "-R " ; then
8730                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8731                         else
8732                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8733                         fi
8734
8735                         # if we have not already added this, add it now
8736                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8737                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8738                         then
8739                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8740
8741 echo "${as_me:-configure}:8741: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8742
8743                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8744                         fi
8745                 fi
8746                 ;;
8747         esac
8748         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8749 done
8750 LDFLAGS=$cf_rpath_dst
8751
8752 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8753
8754 echo "${as_me:-configure}:8754: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8755
8756 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8757
8758 echo "${as_me:-configure}:8758: testing ...checking LIBS $LIBS ..." 1>&5
8759
8760 cf_rpath_dst=
8761 for cf_rpath_src in $LIBS
8762 do
8763         case "$cf_rpath_src" in
8764         (-L*)
8765
8766                 # check if this refers to a directory which we will ignore
8767                 cf_rpath_skip=no
8768                 if test -n "$cf_rpath_list"
8769                 then
8770                         for cf_rpath_item in $cf_rpath_list
8771                         do
8772                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8773                                 then
8774                                         cf_rpath_skip=yes
8775                                         break
8776                                 fi
8777                         done
8778                 fi
8779
8780                 if test "$cf_rpath_skip" = no
8781                 then
8782                         # transform the option
8783                         if test "$LD_RPATH_OPT" = "-R " ; then
8784                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8785                         else
8786                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8787                         fi
8788
8789                         # if we have not already added this, add it now
8790                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8791                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8792                         then
8793                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8794
8795 echo "${as_me:-configure}:8795: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8796
8797                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8798                         fi
8799                 fi
8800                 ;;
8801         esac
8802         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8803 done
8804 LIBS=$cf_rpath_dst
8805
8806 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8807
8808 echo "${as_me:-configure}:8808: testing ...checked LIBS $LIBS ..." 1>&5
8809
8810         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8811
8812 echo "${as_me:-configure}:8812: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8813
8814 else
8815         echo "$as_me:8815: result: no" >&5
8816 echo "${ECHO_T}no" >&6
8817 fi
8818
8819 fi
8820
8821 fi
8822
8823 ### Depending on the system, someone may use rpath to build ncurses but not
8824 # want users of the package to rely upon that feature.  Give those people an
8825 # option to suppress that detail from EXTRA_LDFLAGS.
8826 EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
8827 if test -n "$EXTRA_PKG_LDFLAGS"
8828 then
8829         echo "$as_me:8829: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8830 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8831
8832 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8833 if test "${enable_pkg_ldflags+set}" = set; then
8834   enableval="$enable_pkg_ldflags"
8835   test "$enableval" != no && enableval=yes
8836         if test "$enableval" != "yes" ; then
8837     disable_pkg_ldflags=yes
8838         else
8839                 disable_pkg_ldflags=no
8840         fi
8841 else
8842   enableval=yes
8843         disable_pkg_ldflags=no
8844
8845 fi;
8846         echo "$as_me:8846: result: $disable_pkg_ldflags" >&5
8847 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8848         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8849 fi
8850
8851 ###############################################################################
8852
8853 ###     use option --with-extra-suffix to append suffix to headers and libraries
8854 echo "$as_me:8854: checking for extra suffix to append to header/library paths" >&5
8855 echo $ECHO_N "checking for extra suffix to append to header/library paths... $ECHO_C" >&6
8856 EXTRA_SUFFIX=
8857
8858 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8859 if test "${with_extra_suffix+set}" = set; then
8860   withval="$with_extra_suffix"
8861   case x$withval in
8862         (xno)
8863                 ;;
8864         (xyes|x)
8865                 EXTRA_SUFFIX=$cf_cv_abi_version
8866                 ;;
8867         (*)
8868                 EXTRA_SUFFIX=$withval
8869                 ;;
8870         esac
8871
8872 fi;
8873 echo "$as_me:8873: result: ${EXTRA_SUFFIX:-(none)}" >&5
8874 echo "${ECHO_T}${EXTRA_SUFFIX:-(none)}" >&6
8875
8876 ###     use option --disable-overwrite to leave out the link to -lcurses
8877 echo "$as_me:8877: checking if you wish to install ncurses overwriting curses" >&5
8878 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8879
8880 # Check whether --enable-overwrite or --disable-overwrite was given.
8881 if test "${enable_overwrite+set}" = set; then
8882   enableval="$enable_overwrite"
8883   with_overwrite=$enableval
8884 else
8885   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8886 fi;
8887 echo "$as_me:8887: result: $with_overwrite" >&5
8888 echo "${ECHO_T}$with_overwrite" >&6
8889
8890 echo "$as_me:8890: checking if external terminfo-database is used" >&5
8891 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8892
8893 # Check whether --enable-database or --disable-database was given.
8894 if test "${enable_database+set}" = set; then
8895   enableval="$enable_database"
8896   use_database=$enableval
8897 else
8898   use_database=yes
8899 fi;
8900 echo "$as_me:8900: result: $use_database" >&5
8901 echo "${ECHO_T}$use_database" >&6
8902
8903 case "$host_os" in
8904 (os2*)
8905         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8906         ;;
8907 (*)
8908         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8909         ;;
8910 esac
8911
8912 NCURSES_USE_DATABASE=0
8913 if test "$use_database" != no ; then
8914         NCURSES_USE_DATABASE=1
8915
8916         echo "$as_me:8916: checking which terminfo source-file will be installed" >&5
8917 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8918
8919 # Check whether --with-database or --without-database was given.
8920 if test "${with_database+set}" = set; then
8921   withval="$with_database"
8922   TERMINFO_SRC=$withval
8923 fi;
8924         echo "$as_me:8924: result: $TERMINFO_SRC" >&5
8925 echo "${ECHO_T}$TERMINFO_SRC" >&6
8926
8927         echo "$as_me:8927: checking whether to use hashed database instead of directory/tree" >&5
8928 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8929
8930 # Check whether --with-hashed-db or --without-hashed-db was given.
8931 if test "${with_hashed_db+set}" = set; then
8932   withval="$with_hashed_db"
8933
8934 else
8935   with_hashed_db=no
8936 fi;
8937         echo "$as_me:8937: result: $with_hashed_db" >&5
8938 echo "${ECHO_T}$with_hashed_db" >&6
8939 else
8940         with_hashed_db=no
8941 fi
8942
8943 echo "$as_me:8943: checking for list of fallback terminal descriptions" >&5
8944 echo $ECHO_N "checking for list of fallback terminal descriptions... $ECHO_C" >&6
8945
8946 # Check whether --with-fallbacks or --without-fallbacks was given.
8947 if test "${with_fallbacks+set}" = set; then
8948   withval="$with_fallbacks"
8949   with_fallback=$withval
8950 else
8951   with_fallback=
8952 fi;
8953 echo "$as_me:8953: result: ${with_fallback:-(none)}" >&5
8954 echo "${ECHO_T}${with_fallback:-(none)}" >&6
8955
8956 case ".$with_fallback" in
8957 (.|.no)
8958         FALLBACK_LIST=
8959         ;;
8960 (.yes)
8961         { echo "$as_me:8961: WARNING: expected a list of terminal descriptions" >&5
8962 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8963         ;;
8964 (*)
8965         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8966         ;;
8967 esac
8968
8969 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8970 # tree for generating the terminal descriptions that will be compiled into the
8971 # library.  If your toolchain is old, it may not handle current terminal
8972 # databases.  Use configure-options to point to the tools which will be used,
8973 # rather than the first ones found on the $PATH.
8974 if test -n "$ac_tool_prefix"; then
8975   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8976 set dummy ${ac_tool_prefix}tic; ac_word=$2
8977 echo "$as_me:8977: checking for $ac_word" >&5
8978 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8979 if test "${ac_cv_prog_TIC+set}" = set; then
8980   echo $ECHO_N "(cached) $ECHO_C" >&6
8981 else
8982   if test -n "$TIC"; then
8983   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8984 else
8985   ac_save_IFS=$IFS; IFS=$ac_path_separator
8986 ac_dummy="$PATH"
8987 for ac_dir in $ac_dummy; do
8988   IFS=$ac_save_IFS
8989   test -z "$ac_dir" && ac_dir=.
8990   $as_executable_p "$ac_dir/$ac_word" || continue
8991 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8992 echo "$as_me:8992: found $ac_dir/$ac_word" >&5
8993 break
8994 done
8995
8996 fi
8997 fi
8998 TIC=$ac_cv_prog_TIC
8999 if test -n "$TIC"; then
9000   echo "$as_me:9000: result: $TIC" >&5
9001 echo "${ECHO_T}$TIC" >&6
9002 else
9003   echo "$as_me:9003: result: no" >&5
9004 echo "${ECHO_T}no" >&6
9005 fi
9006
9007 fi
9008 if test -z "$ac_cv_prog_TIC"; then
9009   ac_ct_TIC=$TIC
9010   # Extract the first word of "tic", so it can be a program name with args.
9011 set dummy tic; ac_word=$2
9012 echo "$as_me:9012: checking for $ac_word" >&5
9013 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9014 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
9015   echo $ECHO_N "(cached) $ECHO_C" >&6
9016 else
9017   if test -n "$ac_ct_TIC"; then
9018   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
9019 else
9020   ac_save_IFS=$IFS; IFS=$ac_path_separator
9021 ac_dummy="$PATH"
9022 for ac_dir in $ac_dummy; do
9023   IFS=$ac_save_IFS
9024   test -z "$ac_dir" && ac_dir=.
9025   $as_executable_p "$ac_dir/$ac_word" || continue
9026 ac_cv_prog_ac_ct_TIC="tic"
9027 echo "$as_me:9027: found $ac_dir/$ac_word" >&5
9028 break
9029 done
9030
9031 fi
9032 fi
9033 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
9034 if test -n "$ac_ct_TIC"; then
9035   echo "$as_me:9035: result: $ac_ct_TIC" >&5
9036 echo "${ECHO_T}$ac_ct_TIC" >&6
9037 else
9038   echo "$as_me:9038: result: no" >&5
9039 echo "${ECHO_T}no" >&6
9040 fi
9041
9042   TIC=$ac_ct_TIC
9043 else
9044   TIC="$ac_cv_prog_TIC"
9045 fi
9046
9047 if test -n "$ac_tool_prefix"; then
9048   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
9049 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
9050 echo "$as_me:9050: checking for $ac_word" >&5
9051 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9052 if test "${ac_cv_prog_INFOCMP+set}" = set; then
9053   echo $ECHO_N "(cached) $ECHO_C" >&6
9054 else
9055   if test -n "$INFOCMP"; then
9056   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
9057 else
9058   ac_save_IFS=$IFS; IFS=$ac_path_separator
9059 ac_dummy="$PATH"
9060 for ac_dir in $ac_dummy; do
9061   IFS=$ac_save_IFS
9062   test -z "$ac_dir" && ac_dir=.
9063   $as_executable_p "$ac_dir/$ac_word" || continue
9064 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
9065 echo "$as_me:9065: found $ac_dir/$ac_word" >&5
9066 break
9067 done
9068
9069 fi
9070 fi
9071 INFOCMP=$ac_cv_prog_INFOCMP
9072 if test -n "$INFOCMP"; then
9073   echo "$as_me:9073: result: $INFOCMP" >&5
9074 echo "${ECHO_T}$INFOCMP" >&6
9075 else
9076   echo "$as_me:9076: result: no" >&5
9077 echo "${ECHO_T}no" >&6
9078 fi
9079
9080 fi
9081 if test -z "$ac_cv_prog_INFOCMP"; then
9082   ac_ct_INFOCMP=$INFOCMP
9083   # Extract the first word of "infocmp", so it can be a program name with args.
9084 set dummy infocmp; ac_word=$2
9085 echo "$as_me:9085: checking for $ac_word" >&5
9086 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9087 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
9088   echo $ECHO_N "(cached) $ECHO_C" >&6
9089 else
9090   if test -n "$ac_ct_INFOCMP"; then
9091   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
9092 else
9093   ac_save_IFS=$IFS; IFS=$ac_path_separator
9094 ac_dummy="$PATH"
9095 for ac_dir in $ac_dummy; do
9096   IFS=$ac_save_IFS
9097   test -z "$ac_dir" && ac_dir=.
9098   $as_executable_p "$ac_dir/$ac_word" || continue
9099 ac_cv_prog_ac_ct_INFOCMP="infocmp"
9100 echo "$as_me:9100: found $ac_dir/$ac_word" >&5
9101 break
9102 done
9103
9104 fi
9105 fi
9106 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
9107 if test -n "$ac_ct_INFOCMP"; then
9108   echo "$as_me:9108: result: $ac_ct_INFOCMP" >&5
9109 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
9110 else
9111   echo "$as_me:9111: result: no" >&5
9112 echo "${ECHO_T}no" >&6
9113 fi
9114
9115   INFOCMP=$ac_ct_INFOCMP
9116 else
9117   INFOCMP="$ac_cv_prog_INFOCMP"
9118 fi
9119
9120 if test -n "$FALLBACK_LIST"
9121 then
9122
9123 # Check whether --with-tic-path or --without-tic-path was given.
9124 if test "${with_tic_path+set}" = set; then
9125   withval="$with_tic_path"
9126   echo "$as_me:9126: checking for tic program for fallbacks" >&5
9127 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
9128                 TIC=$withval
9129                 echo "$as_me:9129: result: $TIC" >&5
9130 echo "${ECHO_T}$TIC" >&6
9131
9132 if test "x$prefix" != xNONE; then
9133         cf_path_syntax="$prefix"
9134 else
9135         cf_path_syntax="$ac_default_prefix"
9136 fi
9137
9138 case ".$TIC" in
9139 (.\$\(*\)*|.\'*\'*)
9140         ;;
9141 (..|./*|.\\*)
9142         ;;
9143 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9144         ;;
9145 (.\$\{*prefix\}*|.\$\{*dir\}*)
9146         eval TIC="$TIC"
9147         case ".$TIC" in
9148         (.NONE/*)
9149                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
9150                 ;;
9151         esac
9152         ;;
9153 (.no|.NONE/*)
9154         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
9155         ;;
9156 (*)
9157         { { echo "$as_me:9157: error: expected a pathname, not \"$TIC\"" >&5
9158 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
9159    { (exit 1); exit 1; }; }
9160         ;;
9161 esac
9162
9163 else
9164
9165 test -z "$TIC" && TIC="tic"
9166 for ac_prog in $TIC tic
9167 do
9168   # Extract the first word of "$ac_prog", so it can be a program name with args.
9169 set dummy $ac_prog; ac_word=$2
9170 echo "$as_me:9170: checking for $ac_word" >&5
9171 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9172 if test "${ac_cv_path_TIC+set}" = set; then
9173   echo $ECHO_N "(cached) $ECHO_C" >&6
9174 else
9175   case $TIC in
9176   [\\/]* | ?:[\\/]*)
9177   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
9178   ;;
9179   *)
9180   ac_save_IFS=$IFS; IFS=$ac_path_separator
9181 ac_dummy="$PATH:/usr/local/ncurses/bin"
9182 for ac_dir in $ac_dummy; do
9183   IFS=$ac_save_IFS
9184   test -z "$ac_dir" && ac_dir=.
9185   if $as_executable_p "$ac_dir/$ac_word"; then
9186    ac_cv_path_TIC="$ac_dir/$ac_word"
9187    echo "$as_me:9187: found $ac_dir/$ac_word" >&5
9188    break
9189 fi
9190 done
9191
9192   ;;
9193 esac
9194 fi
9195 TIC=$ac_cv_path_TIC
9196
9197 if test -n "$TIC"; then
9198   echo "$as_me:9198: result: $TIC" >&5
9199 echo "${ECHO_T}$TIC" >&6
9200 else
9201   echo "$as_me:9201: result: no" >&5
9202 echo "${ECHO_T}no" >&6
9203 fi
9204
9205   test -n "$TIC" && break
9206 done
9207 test -n "$TIC" || TIC="$TIC"
9208
9209 cf_path_prog=""
9210 cf_path_args=""
9211 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
9212 for cf_temp in $ac_cv_path_TIC
9213 do
9214         if test -z "$cf_path_prog" ; then
9215                 if test "$with_full_paths" = yes ; then
9216
9217 if test "x$prefix" != xNONE; then
9218         cf_path_syntax="$prefix"
9219 else
9220         cf_path_syntax="$ac_default_prefix"
9221 fi
9222
9223 case ".$cf_temp" in
9224 (.\$\(*\)*|.\'*\'*)
9225         ;;
9226 (..|./*|.\\*)
9227         ;;
9228 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9229         ;;
9230 (.\$\{*prefix\}*|.\$\{*dir\}*)
9231         eval cf_temp="$cf_temp"
9232         case ".$cf_temp" in
9233         (.NONE/*)
9234                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9235                 ;;
9236         esac
9237         ;;
9238 (.no|.NONE/*)
9239         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9240         ;;
9241 (*)
9242         break
9243         ;;
9244 esac
9245
9246                         cf_path_prog="$cf_temp"
9247                 else
9248                         cf_path_prog="`basename "$cf_temp"`"
9249                 fi
9250         elif test -z "$cf_path_args" ; then
9251                 cf_path_args="$cf_temp"
9252         else
9253                 cf_path_args="$cf_path_args $cf_temp"
9254         fi
9255 done
9256 IFS="$cf_save_ifs"
9257
9258 if test -n "$cf_path_prog" ; then
9259
9260 echo "${as_me:-configure}:9260: testing defining path for ${cf_path_prog} ..." 1>&5
9261
9262 cat >>confdefs.h <<EOF
9263 #define TIC_PATH "$cf_path_prog"
9264 EOF
9265
9266         test -n "$cf_path_args" &&
9267 cat >>confdefs.h <<EOF
9268 #define TIC_ARGS "$cf_path_args"
9269 EOF
9270
9271 fi
9272
9273                 if test -z "$TIC"
9274                 then
9275                         { echo "$as_me:9275: WARNING: no tic program found for fallbacks" >&5
9276 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
9277                 fi
9278
9279 fi;
9280
9281 # Check whether --with-infocmp-path or --without-infocmp-path was given.
9282 if test "${with_infocmp_path+set}" = set; then
9283   withval="$with_infocmp_path"
9284   echo "$as_me:9284: checking for infocmp program for fallbacks" >&5
9285 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
9286                 INFOCMP=$withval
9287                 echo "$as_me:9287: result: $INFOCMP" >&5
9288 echo "${ECHO_T}$INFOCMP" >&6
9289
9290 if test "x$prefix" != xNONE; then
9291         cf_path_syntax="$prefix"
9292 else
9293         cf_path_syntax="$ac_default_prefix"
9294 fi
9295
9296 case ".$INFOCMP" in
9297 (.\$\(*\)*|.\'*\'*)
9298         ;;
9299 (..|./*|.\\*)
9300         ;;
9301 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9302         ;;
9303 (.\$\{*prefix\}*|.\$\{*dir\}*)
9304         eval INFOCMP="$INFOCMP"
9305         case ".$INFOCMP" in
9306         (.NONE/*)
9307                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
9308                 ;;
9309         esac
9310         ;;
9311 (.no|.NONE/*)
9312         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
9313         ;;
9314 (*)
9315         { { echo "$as_me:9315: error: expected a pathname, not \"$INFOCMP\"" >&5
9316 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
9317    { (exit 1); exit 1; }; }
9318         ;;
9319 esac
9320
9321 else
9322
9323 test -z "$INFOCMP" && INFOCMP="infocmp"
9324 for ac_prog in $INFOCMP infocmp
9325 do
9326   # Extract the first word of "$ac_prog", so it can be a program name with args.
9327 set dummy $ac_prog; ac_word=$2
9328 echo "$as_me:9328: checking for $ac_word" >&5
9329 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9330 if test "${ac_cv_path_INFOCMP+set}" = set; then
9331   echo $ECHO_N "(cached) $ECHO_C" >&6
9332 else
9333   case $INFOCMP in
9334   [\\/]* | ?:[\\/]*)
9335   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
9336   ;;
9337   *)
9338   ac_save_IFS=$IFS; IFS=$ac_path_separator
9339 ac_dummy="$PATH:/usr/local/ncurses/bin"
9340 for ac_dir in $ac_dummy; do
9341   IFS=$ac_save_IFS
9342   test -z "$ac_dir" && ac_dir=.
9343   if $as_executable_p "$ac_dir/$ac_word"; then
9344    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
9345    echo "$as_me:9345: found $ac_dir/$ac_word" >&5
9346    break
9347 fi
9348 done
9349
9350   ;;
9351 esac
9352 fi
9353 INFOCMP=$ac_cv_path_INFOCMP
9354
9355 if test -n "$INFOCMP"; then
9356   echo "$as_me:9356: result: $INFOCMP" >&5
9357 echo "${ECHO_T}$INFOCMP" >&6
9358 else
9359   echo "$as_me:9359: result: no" >&5
9360 echo "${ECHO_T}no" >&6
9361 fi
9362
9363   test -n "$INFOCMP" && break
9364 done
9365 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
9366
9367 cf_path_prog=""
9368 cf_path_args=""
9369 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
9370 for cf_temp in $ac_cv_path_INFOCMP
9371 do
9372         if test -z "$cf_path_prog" ; then
9373                 if test "$with_full_paths" = yes ; then
9374
9375 if test "x$prefix" != xNONE; then
9376         cf_path_syntax="$prefix"
9377 else
9378         cf_path_syntax="$ac_default_prefix"
9379 fi
9380
9381 case ".$cf_temp" in
9382 (.\$\(*\)*|.\'*\'*)
9383         ;;
9384 (..|./*|.\\*)
9385         ;;
9386 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9387         ;;
9388 (.\$\{*prefix\}*|.\$\{*dir\}*)
9389         eval cf_temp="$cf_temp"
9390         case ".$cf_temp" in
9391         (.NONE/*)
9392                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9393                 ;;
9394         esac
9395         ;;
9396 (.no|.NONE/*)
9397         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9398         ;;
9399 (*)
9400         break
9401         ;;
9402 esac
9403
9404                         cf_path_prog="$cf_temp"
9405                 else
9406                         cf_path_prog="`basename "$cf_temp"`"
9407                 fi
9408         elif test -z "$cf_path_args" ; then
9409                 cf_path_args="$cf_temp"
9410         else
9411                 cf_path_args="$cf_path_args $cf_temp"
9412         fi
9413 done
9414 IFS="$cf_save_ifs"
9415
9416 if test -n "$cf_path_prog" ; then
9417
9418 echo "${as_me:-configure}:9418: testing defining path for ${cf_path_prog} ..." 1>&5
9419
9420 cat >>confdefs.h <<EOF
9421 #define INFOCMP_PATH "$cf_path_prog"
9422 EOF
9423
9424         test -n "$cf_path_args" &&
9425 cat >>confdefs.h <<EOF
9426 #define INFOCMP_ARGS "$cf_path_args"
9427 EOF
9428
9429 fi
9430
9431                 if test -z "$INFOCMP"
9432                 then
9433                         { echo "$as_me:9433: WARNING: no infocmp program found for fallbacks" >&5
9434 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
9435                 fi
9436
9437 fi;
9438
9439         test -z "$TIC" && FALLBACK_LIST=
9440         test -z "$INFOCMP" && FALLBACK_LIST=
9441         if test -z "$FALLBACK_LIST"
9442         then
9443                 { echo "$as_me:9443: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
9444 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
9445         fi
9446 fi
9447
9448 USE_FALLBACKS=
9449 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
9450
9451 echo "$as_me:9451: checking if you want modern xterm or antique" >&5
9452 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
9453
9454 # Check whether --with-xterm-new or --without-xterm-new was given.
9455 if test "${with_xterm_new+set}" = set; then
9456   withval="$with_xterm_new"
9457   with_xterm_new=$withval
9458 else
9459   with_xterm_new=yes
9460 fi;
9461 case "$with_xterm_new" in
9462 (no) with_xterm_new=xterm-old;;
9463 (*)      with_xterm_new=xterm-new;;
9464 esac
9465 echo "$as_me:9465: result: $with_xterm_new" >&5
9466 echo "${ECHO_T}$with_xterm_new" >&6
9467 WHICH_XTERM=$with_xterm_new
9468
9469 case $host_os in
9470 (*linux-gnu|*cygwin|*mingw32|*msys)
9471         want_xterm_kbs=DEL
9472         ;;
9473 (*)
9474         want_xterm_kbs=BS
9475         ;;
9476 esac
9477
9478 echo "$as_me:9478: checking if xterm backspace sends BS or DEL" >&5
9479 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
9480
9481 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
9482 if test "${with_xterm_kbs+set}" = set; then
9483   withval="$with_xterm_kbs"
9484   with_xterm_kbs=$withval
9485 else
9486   with_xterm_kbs=auto
9487 fi;
9488 case x$with_xterm_kbs in
9489 (xyes|xno|xBS|xbs|x8)
9490         with_xterm_kbs=BS
9491         ;;
9492 (xDEL|xdel|x127)
9493         with_xterm_kbs=DEL
9494         ;;
9495 (xauto)
9496         with_xterm_kbs=$want_xterm_kbs
9497         ;;
9498 (*)
9499         with_xterm_kbs=$withval
9500         ;;
9501 esac
9502 echo "$as_me:9502: result: $with_xterm_kbs" >&5
9503 echo "${ECHO_T}$with_xterm_kbs" >&6
9504 XTERM_KBS=$with_xterm_kbs
9505
9506 if test "x$with_xterm_kbs" != "x$want_xterm_kbs"
9507 then
9508         { echo "$as_me:9508: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os, have $with_xterm_kbs" >&5
9509 echo "$as_me: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os, have $with_xterm_kbs" >&2;}
9510 fi
9511
9512 MAKE_TERMINFO=
9513 if test "$use_database" = no ; then
9514         TERMINFO="${datadir}/terminfo"
9515         MAKE_TERMINFO="#"
9516 else
9517
9518 echo "$as_me:9518: checking for list of terminfo directories" >&5
9519 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
9520
9521 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
9522 if test "${with_terminfo_dirs+set}" = set; then
9523   withval="$with_terminfo_dirs"
9524
9525 else
9526   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
9527 fi;
9528 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9529 cf_dst_path=
9530 for cf_src_path in $withval
9531 do
9532
9533 if test "x$prefix" != xNONE; then
9534         cf_path_syntax="$prefix"
9535 else
9536         cf_path_syntax="$ac_default_prefix"
9537 fi
9538
9539 case ".$cf_src_path" in
9540 (.\$\(*\)*|.\'*\'*)
9541         ;;
9542 (..|./*|.\\*)
9543         ;;
9544 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9545         ;;
9546 (.\$\{*prefix\}*|.\$\{*dir\}*)
9547         eval cf_src_path="$cf_src_path"
9548         case ".$cf_src_path" in
9549         (.NONE/*)
9550                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9551                 ;;
9552         esac
9553         ;;
9554 (.no|.NONE/*)
9555         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9556         ;;
9557 (*)
9558         { { echo "$as_me:9558: error: expected a pathname, not \"$cf_src_path\"" >&5
9559 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9560    { (exit 1); exit 1; }; }
9561         ;;
9562 esac
9563
9564   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9565   cf_dst_path="${cf_dst_path}${cf_src_path}"
9566 done
9567 IFS="$ac_save_ifs"
9568
9569 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9570 # so we have to check/work around.  We do prefer the result of "eval"...
9571 eval cf_dst_eval="$cf_dst_path"
9572 case "x$cf_dst_eval" in
9573 (xNONE*)
9574         TERMINFO_DIRS=$cf_dst_path
9575         ;;
9576 (*)
9577         TERMINFO_DIRS="$cf_dst_eval"
9578         ;;
9579 esac
9580
9581 echo "$as_me:9581: result: $TERMINFO_DIRS" >&5
9582 echo "${ECHO_T}$TERMINFO_DIRS" >&6
9583 test -n "$TERMINFO_DIRS" &&
9584 cat >>confdefs.h <<EOF
9585 #define TERMINFO_DIRS "$TERMINFO_DIRS"
9586 EOF
9587
9588 case "x$TERMINFO" in
9589 x???:*)
9590         { echo "$as_me:9590: WARNING: ignoring non-directory/file TERMINFO value" >&5
9591 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
9592         unset TERMINFO
9593         ;;
9594 esac
9595
9596 echo "$as_me:9596: checking for default terminfo directory" >&5
9597 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
9598
9599 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
9600 if test "${with_default_terminfo_dir+set}" = set; then
9601   withval="$with_default_terminfo_dir"
9602
9603 else
9604   withval="${TERMINFO:-${datadir}/terminfo}"
9605 fi; if test -n "${datadir}/terminfo" ; then
9606
9607 if test "x$prefix" != xNONE; then
9608         cf_path_syntax="$prefix"
9609 else
9610         cf_path_syntax="$ac_default_prefix"
9611 fi
9612
9613 case ".$withval" in
9614 (.\$\(*\)*|.\'*\'*)
9615         ;;
9616 (..|./*|.\\*)
9617         ;;
9618 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9619         ;;
9620 (.\$\{*prefix\}*|.\$\{*dir\}*)
9621         eval withval="$withval"
9622         case ".$withval" in
9623         (.NONE/*)
9624                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9625                 ;;
9626         esac
9627         ;;
9628 (.no|.NONE/*)
9629         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9630         ;;
9631 (*)
9632         { { echo "$as_me:9632: error: expected a pathname, not \"$withval\"" >&5
9633 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9634    { (exit 1); exit 1; }; }
9635         ;;
9636 esac
9637
9638 fi
9639 eval TERMINFO="$withval"
9640
9641 echo "$as_me:9641: result: $TERMINFO" >&5
9642 echo "${ECHO_T}$TERMINFO" >&6
9643
9644 cat >>confdefs.h <<EOF
9645 #define TERMINFO "$TERMINFO"
9646 EOF
9647
9648 fi
9649
9650 ###     use option --disable-big-core to make tic run on small machines
9651 ###     We need 4Mb, check if we can allocate 50% more than that.
9652 echo "$as_me:9652: checking if big-core option selected" >&5
9653 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9654
9655 # Check whether --enable-big-core or --disable-big-core was given.
9656 if test "${enable_big_core+set}" = set; then
9657   enableval="$enable_big_core"
9658   with_big_core=$enableval
9659 else
9660   if test "$cross_compiling" = yes; then
9661   with_big_core=no
9662 else
9663   cat >"conftest.$ac_ext" <<_ACEOF
9664 #line 9664 "configure"
9665 #include "confdefs.h"
9666
9667 #include <stdlib.h>
9668 #include <string.h>
9669 int main() {
9670         unsigned long n = 6000000L;
9671         char *s = malloc(n);
9672         if (s != 0)
9673                 s[0] = s[n-1] = 0;
9674         ${cf_cv_main_return:-return}(s == 0);
9675 }
9676 _ACEOF
9677 rm -f "conftest$ac_exeext"
9678 if { (eval echo "$as_me:9678: \"$ac_link\"") >&5
9679   (eval $ac_link) 2>&5
9680   ac_status=$?
9681   echo "$as_me:9681: \$? = $ac_status" >&5
9682   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9683   { (eval echo "$as_me:9683: \"$ac_try\"") >&5
9684   (eval $ac_try) 2>&5
9685   ac_status=$?
9686   echo "$as_me:9686: \$? = $ac_status" >&5
9687   (exit "$ac_status"); }; }; then
9688   with_big_core=yes
9689 else
9690   echo "$as_me: program exited with status $ac_status" >&5
9691 echo "$as_me: failed program was:" >&5
9692 cat "conftest.$ac_ext" >&5
9693 with_big_core=no
9694 fi
9695 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9696 fi
9697 fi;
9698 echo "$as_me:9698: result: $with_big_core" >&5
9699 echo "${ECHO_T}$with_big_core" >&6
9700 test "x$with_big_core" = "xyes" &&
9701 cat >>confdefs.h <<\EOF
9702 #define HAVE_BIG_CORE 1
9703 EOF
9704
9705 ### ISO C only guarantees 512-char strings, we have tables which load faster
9706 ### when constructed using "big" strings.  More than the C compiler, the awk
9707 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9708 echo "$as_me:9708: checking if big-strings option selected" >&5
9709 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9710
9711 # Check whether --enable-big-strings or --disable-big-strings was given.
9712 if test "${enable_big_strings+set}" = set; then
9713   enableval="$enable_big_strings"
9714   with_big_strings=$enableval
9715 else
9716
9717         case x$AWK in
9718         (x)
9719                 eval with_big_strings=no
9720                 ;;
9721         (*)
9722                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9723                         | $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
9724                         eval with_big_strings=yes
9725                 else
9726                         eval with_big_strings=no
9727                 fi
9728                 ;;
9729         esac
9730
9731 fi;
9732 echo "$as_me:9732: result: $with_big_strings" >&5
9733 echo "${ECHO_T}$with_big_strings" >&6
9734
9735 USE_BIG_STRINGS=0
9736 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9737
9738 ###     use option --enable-termcap to compile in the termcap fallback support
9739 echo "$as_me:9739: checking if you want termcap-fallback support" >&5
9740 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9741
9742 # Check whether --enable-termcap or --disable-termcap was given.
9743 if test "${enable_termcap+set}" = set; then
9744   enableval="$enable_termcap"
9745   with_termcap=$enableval
9746 else
9747   with_termcap=no
9748 fi;
9749 echo "$as_me:9749: result: $with_termcap" >&5
9750 echo "${ECHO_T}$with_termcap" >&6
9751
9752 NCURSES_USE_TERMCAP=0
9753 if test "x$with_termcap" != "xyes" ; then
9754         if test "$use_database" = no ; then
9755                 if test -z "$with_fallback" ; then
9756                         { { echo "$as_me:9756: error: You have disabled the database w/o specifying fallbacks" >&5
9757 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9758    { (exit 1); exit 1; }; }
9759                 fi
9760         fi
9761
9762 cat >>confdefs.h <<\EOF
9763 #define PURE_TERMINFO 1
9764 EOF
9765
9766 else
9767
9768         if test "$with_ticlib" != no ; then
9769                 { { echo "$as_me:9769: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9770 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9771    { (exit 1); exit 1; }; }
9772         fi
9773
9774         NCURSES_USE_TERMCAP=1
9775         echo "$as_me:9775: checking for list of termcap files" >&5
9776 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9777
9778 # Check whether --with-termpath or --without-termpath was given.
9779 if test "${with_termpath+set}" = set; then
9780   withval="$with_termpath"
9781
9782 else
9783   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9784 fi;
9785 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9786 cf_dst_path=
9787 for cf_src_path in $withval
9788 do
9789
9790 if test "x$prefix" != xNONE; then
9791         cf_path_syntax="$prefix"
9792 else
9793         cf_path_syntax="$ac_default_prefix"
9794 fi
9795
9796 case ".$cf_src_path" in
9797 (.\$\(*\)*|.\'*\'*)
9798         ;;
9799 (..|./*|.\\*)
9800         ;;
9801 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9802         ;;
9803 (.\$\{*prefix\}*|.\$\{*dir\}*)
9804         eval cf_src_path="$cf_src_path"
9805         case ".$cf_src_path" in
9806         (.NONE/*)
9807                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9808                 ;;
9809         esac
9810         ;;
9811 (.no|.NONE/*)
9812         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9813         ;;
9814 (*)
9815         { { echo "$as_me:9815: error: expected a pathname, not \"$cf_src_path\"" >&5
9816 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9817    { (exit 1); exit 1; }; }
9818         ;;
9819 esac
9820
9821   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9822   cf_dst_path="${cf_dst_path}${cf_src_path}"
9823 done
9824 IFS="$ac_save_ifs"
9825
9826 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9827 # so we have to check/work around.  We do prefer the result of "eval"...
9828 eval cf_dst_eval="$cf_dst_path"
9829 case "x$cf_dst_eval" in
9830 (xNONE*)
9831         TERMPATH=$cf_dst_path
9832         ;;
9833 (*)
9834         TERMPATH="$cf_dst_eval"
9835         ;;
9836 esac
9837
9838         echo "$as_me:9838: result: $TERMPATH" >&5
9839 echo "${ECHO_T}$TERMPATH" >&6
9840         test -n "$TERMPATH" &&
9841 cat >>confdefs.h <<EOF
9842 #define TERMPATH "$TERMPATH"
9843 EOF
9844
9845         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9846         echo "$as_me:9846: checking if fast termcap-loader is needed" >&5
9847 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9848
9849 # Check whether --enable-getcap or --disable-getcap was given.
9850 if test "${enable_getcap+set}" = set; then
9851   enableval="$enable_getcap"
9852   with_getcap=$enableval
9853 else
9854   with_getcap=no
9855 fi;
9856         echo "$as_me:9856: result: $with_getcap" >&5
9857 echo "${ECHO_T}$with_getcap" >&6
9858         test "x$with_getcap" = "xyes" &&
9859 cat >>confdefs.h <<\EOF
9860 #define USE_GETCAP 1
9861 EOF
9862
9863         echo "$as_me:9863: checking if translated termcaps will be cached in ~/.terminfo" >&5
9864 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9865
9866 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9867 if test "${enable_getcap_cache+set}" = set; then
9868   enableval="$enable_getcap_cache"
9869   with_getcap_cache=$enableval
9870 else
9871   with_getcap_cache=no
9872 fi;
9873         echo "$as_me:9873: result: $with_getcap_cache" >&5
9874 echo "${ECHO_T}$with_getcap_cache" >&6
9875         test "x$with_getcap_cache" = "xyes" &&
9876 cat >>confdefs.h <<\EOF
9877 #define USE_GETCAP_CACHE 1
9878 EOF
9879
9880 fi
9881
9882 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9883 echo "$as_me:9883: checking if ~/.terminfo is wanted" >&5
9884 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9885
9886 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9887 if test "${enable_home_terminfo+set}" = set; then
9888   enableval="$enable_home_terminfo"
9889   with_home_terminfo=$enableval
9890 else
9891   with_home_terminfo=yes
9892 fi;
9893 echo "$as_me:9893: result: $with_home_terminfo" >&5
9894 echo "${ECHO_T}$with_home_terminfo" >&6
9895 test "x$with_home_terminfo" = "xyes" &&
9896 cat >>confdefs.h <<\EOF
9897 #define USE_HOME_TERMINFO 1
9898 EOF
9899
9900 echo "$as_me:9900: checking if you want to permit root to use ncurses environment variables" >&5
9901 echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
9902
9903 # Check whether --enable-root-environ or --disable-root-environ was given.
9904 if test "${enable_root_environ+set}" = set; then
9905   enableval="$enable_root_environ"
9906   with_root_environ=$enableval
9907 else
9908   with_root_environ=yes
9909 fi;
9910 echo "$as_me:9910: result: $with_root_environ" >&5
9911 echo "${ECHO_T}$with_root_environ" >&6
9912 test "x$with_root_environ" = xyes &&
9913 cat >>confdefs.h <<\EOF
9914 #define USE_ROOT_ENVIRON 1
9915 EOF
9916
9917 echo "$as_me:9917: checking if you want to permit setuid programs to access all files" >&5
9918 echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
9919
9920 # Check whether --enable-root-access or --disable-root-access was given.
9921 if test "${enable_root_access+set}" = set; then
9922   enableval="$enable_root_access"
9923   with_root_access=$enableval
9924 else
9925   with_root_access=yes
9926 fi;
9927 echo "$as_me:9927: result: $with_root_access" >&5
9928 echo "${ECHO_T}$with_root_access" >&6
9929 test "x$with_root_access" = xyes &&
9930 cat >>confdefs.h <<\EOF
9931 #define USE_ROOT_ACCESS 1
9932 EOF
9933
9934 echo "$as_me:9934: checking if you want to permit setuid use of ncurses environment variables" >&5
9935 echo $ECHO_N "checking if you want to permit setuid use of ncurses environment variables... $ECHO_C" >&6
9936
9937 # Check whether --enable-setuid-environ or --disable-setuid-environ was given.
9938 if test "${enable_setuid_environ+set}" = set; then
9939   enableval="$enable_setuid_environ"
9940   with_setuid_environ=$enableval
9941 else
9942   with_setuid_environ=$with_root_environ
9943 fi;
9944 echo "$as_me:9944: result: $with_setuid_environ" >&5
9945 echo "${ECHO_T}$with_setuid_environ" >&6
9946 test "x$with_setuid_environ" = xyes &&
9947 cat >>confdefs.h <<\EOF
9948 #define USE_SETUID_ENVIRON 1
9949 EOF
9950
9951 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9952 ###   to reduce storage requirements for the terminfo database.
9953
9954 for ac_header in \
9955 unistd.h \
9956
9957 do
9958 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9959 echo "$as_me:9959: checking for $ac_header" >&5
9960 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9961 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9962   echo $ECHO_N "(cached) $ECHO_C" >&6
9963 else
9964   cat >"conftest.$ac_ext" <<_ACEOF
9965 #line 9965 "configure"
9966 #include "confdefs.h"
9967 #include <$ac_header>
9968 _ACEOF
9969 if { (eval echo "$as_me:9969: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9970   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9971   ac_status=$?
9972   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9973   rm -f conftest.er1
9974   cat conftest.err >&5
9975   echo "$as_me:9975: \$? = $ac_status" >&5
9976   (exit "$ac_status"); } >/dev/null; then
9977   if test -s conftest.err; then
9978     ac_cpp_err=$ac_c_preproc_warn_flag
9979   else
9980     ac_cpp_err=
9981   fi
9982 else
9983   ac_cpp_err=yes
9984 fi
9985 if test -z "$ac_cpp_err"; then
9986   eval "$as_ac_Header=yes"
9987 else
9988   echo "$as_me: failed program was:" >&5
9989   cat "conftest.$ac_ext" >&5
9990   eval "$as_ac_Header=no"
9991 fi
9992 rm -f conftest.err "conftest.$ac_ext"
9993 fi
9994 echo "$as_me:9994: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9995 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9996 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9997   cat >>confdefs.h <<EOF
9998 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9999 EOF
10000
10001 fi
10002 done
10003
10004 for ac_func in \
10005         remove \
10006         unlink
10007 do
10008 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10009 echo "$as_me:10009: checking for $ac_func" >&5
10010 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10011 if eval "test \"\${$as_ac_var+set}\" = set"; then
10012   echo $ECHO_N "(cached) $ECHO_C" >&6
10013 else
10014   cat >"conftest.$ac_ext" <<_ACEOF
10015 #line 10015 "configure"
10016 #include "confdefs.h"
10017 #define $ac_func autoconf_temporary
10018 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
10019 #undef $ac_func
10020
10021 #ifdef __cplusplus
10022 extern "C"
10023 #endif
10024
10025 /* We use char because int might match the return type of a gcc2
10026    builtin and then its argument prototype would still apply.  */
10027 char $ac_func (void);
10028
10029 int
10030 main (void)
10031 {
10032
10033 /* The GNU C library defines stubs for functions which it implements
10034     to always fail with ENOSYS.  Some functions are actually named
10035     something starting with __ and the normal name is an alias.  */
10036 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10037 #error found stub for $ac_func
10038 #endif
10039
10040         return $ac_func ();
10041   ;
10042   return 0;
10043 }
10044 _ACEOF
10045 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10046 if { (eval echo "$as_me:10046: \"$ac_link\"") >&5
10047   (eval $ac_link) 2>&5
10048   ac_status=$?
10049   echo "$as_me:10049: \$? = $ac_status" >&5
10050   (exit "$ac_status"); } &&
10051          { ac_try='test -s "conftest$ac_exeext"'
10052   { (eval echo "$as_me:10052: \"$ac_try\"") >&5
10053   (eval $ac_try) 2>&5
10054   ac_status=$?
10055   echo "$as_me:10055: \$? = $ac_status" >&5
10056   (exit "$ac_status"); }; }; then
10057   eval "$as_ac_var=yes"
10058 else
10059   echo "$as_me: failed program was:" >&5
10060 cat "conftest.$ac_ext" >&5
10061 eval "$as_ac_var=no"
10062 fi
10063 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10064 fi
10065 echo "$as_me:10065: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10066 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10067 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
10068   cat >>confdefs.h <<EOF
10069 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10070 EOF
10071
10072 fi
10073 done
10074
10075 if test "$cross_compiling" = yes ; then
10076
10077 for ac_func in \
10078                 link \
10079                 symlink
10080 do
10081 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10082 echo "$as_me:10082: checking for $ac_func" >&5
10083 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10084 if eval "test \"\${$as_ac_var+set}\" = set"; then
10085   echo $ECHO_N "(cached) $ECHO_C" >&6
10086 else
10087   cat >"conftest.$ac_ext" <<_ACEOF
10088 #line 10088 "configure"
10089 #include "confdefs.h"
10090 #define $ac_func autoconf_temporary
10091 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
10092 #undef $ac_func
10093
10094 #ifdef __cplusplus
10095 extern "C"
10096 #endif
10097
10098 /* We use char because int might match the return type of a gcc2
10099    builtin and then its argument prototype would still apply.  */
10100 char $ac_func (void);
10101
10102 int
10103 main (void)
10104 {
10105
10106 /* The GNU C library defines stubs for functions which it implements
10107     to always fail with ENOSYS.  Some functions are actually named
10108     something starting with __ and the normal name is an alias.  */
10109 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10110 #error found stub for $ac_func
10111 #endif
10112
10113         return $ac_func ();
10114   ;
10115   return 0;
10116 }
10117 _ACEOF
10118 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10119 if { (eval echo "$as_me:10119: \"$ac_link\"") >&5
10120   (eval $ac_link) 2>&5
10121   ac_status=$?
10122   echo "$as_me:10122: \$? = $ac_status" >&5
10123   (exit "$ac_status"); } &&
10124          { ac_try='test -s "conftest$ac_exeext"'
10125   { (eval echo "$as_me:10125: \"$ac_try\"") >&5
10126   (eval $ac_try) 2>&5
10127   ac_status=$?
10128   echo "$as_me:10128: \$? = $ac_status" >&5
10129   (exit "$ac_status"); }; }; then
10130   eval "$as_ac_var=yes"
10131 else
10132   echo "$as_me: failed program was:" >&5
10133 cat "conftest.$ac_ext" >&5
10134 eval "$as_ac_var=no"
10135 fi
10136 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10137 fi
10138 echo "$as_me:10138: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10139 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10140 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
10141   cat >>confdefs.h <<EOF
10142 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10143 EOF
10144
10145 fi
10146 done
10147
10148 else
10149         echo "$as_me:10149: checking if link/symlink functions work" >&5
10150 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
10151 if test "${cf_cv_link_funcs+set}" = set; then
10152   echo $ECHO_N "(cached) $ECHO_C" >&6
10153 else
10154
10155                 cf_cv_link_funcs=
10156                 for cf_func in link symlink ; do
10157                         if test "$cross_compiling" = yes; then
10158
10159                         eval 'ac_cv_func_'$cf_func'=error'
10160 else
10161   cat >"conftest.$ac_ext" <<_ACEOF
10162 #line 10162 "configure"
10163 #include "confdefs.h"
10164
10165 $ac_includes_default
10166
10167 int main(void)
10168 {
10169         int fail = 0;
10170         char *src = "conftest.tmp";
10171         char *dst = "conftest.chk";
10172         struct stat src_sb, dst_sb;
10173         FILE *fp = fopen(src, "w");
10174         if (fp == 0) { fail = 3; } else {
10175                 fclose(fp); stat(src, &src_sb);
10176                 if ($cf_func(src, dst) < 0) {
10177                         fail = 1;
10178                 } else if (stat(dst, &dst_sb) < 0) {
10179                         fail = 2;
10180                 } else {
10181                         long diff = (dst_sb.st_mtime - src_sb.st_mtime);
10182                         if (diff < 0) diff = -diff;
10183                         if (diff > 2) fail = 3;
10184                 }
10185         }
10186 #ifdef HAVE_UNLINK
10187         unlink(dst); unlink(src);
10188 #else
10189         remove(dst); remove(src);
10190 #endif
10191         ${cf_cv_main_return:-return} (fail);
10192 }
10193
10194 _ACEOF
10195 rm -f "conftest$ac_exeext"
10196 if { (eval echo "$as_me:10196: \"$ac_link\"") >&5
10197   (eval $ac_link) 2>&5
10198   ac_status=$?
10199   echo "$as_me:10199: \$? = $ac_status" >&5
10200   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10201   { (eval echo "$as_me:10201: \"$ac_try\"") >&5
10202   (eval $ac_try) 2>&5
10203   ac_status=$?
10204   echo "$as_me:10204: \$? = $ac_status" >&5
10205   (exit "$ac_status"); }; }; then
10206
10207                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
10208                         eval 'ac_cv_func_'$cf_func'=yes'
10209 else
10210   echo "$as_me: program exited with status $ac_status" >&5
10211 echo "$as_me: failed program was:" >&5
10212 cat "conftest.$ac_ext" >&5
10213
10214                         eval 'ac_cv_func_'$cf_func'=no'
10215 fi
10216 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10217 fi
10218                 done
10219                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
10220
10221 fi
10222 echo "$as_me:10222: result: $cf_cv_link_funcs" >&5
10223 echo "${ECHO_T}$cf_cv_link_funcs" >&6
10224         test "$ac_cv_func_link"    = yes &&
10225 cat >>confdefs.h <<\EOF
10226 #define HAVE_LINK 1
10227 EOF
10228
10229         test "$ac_cv_func_symlink" = yes &&
10230 cat >>confdefs.h <<\EOF
10231 #define HAVE_SYMLINK 1
10232 EOF
10233
10234 fi
10235
10236 with_links=no
10237 with_symlinks=no
10238
10239 # soft links (symbolic links) are useful for some systems where hard links do
10240 # not work, or to make it simpler to copy terminfo trees around.
10241 if test "x$ac_cv_func_symlink" = xyes ; then
10242         echo "$as_me:10242: checking if tic should use symbolic links" >&5
10243 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
10244
10245 # Check whether --enable-symlinks or --disable-symlinks was given.
10246 if test "${enable_symlinks+set}" = set; then
10247   enableval="$enable_symlinks"
10248   with_symlinks=$enableval
10249 else
10250   with_symlinks=no
10251 fi;
10252         echo "$as_me:10252: result: $with_symlinks" >&5
10253 echo "${ECHO_T}$with_symlinks" >&6
10254 fi
10255
10256 # If we have hard links and did not choose to use soft links instead, there is
10257 # no reason to make this choice optional - use the hard links.
10258 if test "$with_symlinks" = no ; then
10259         echo "$as_me:10259: checking if tic should use hard links" >&5
10260 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
10261         if test "x$ac_cv_func_link" = xyes ; then
10262                 with_links=yes
10263         else
10264                 with_links=no
10265         fi
10266         echo "$as_me:10266: result: $with_links" >&5
10267 echo "${ECHO_T}$with_links" >&6
10268 fi
10269
10270 test "x$with_links" = xyes &&
10271 cat >>confdefs.h <<\EOF
10272 #define USE_LINKS 1
10273 EOF
10274
10275 test "x$with_symlinks" = xyes &&
10276 cat >>confdefs.h <<\EOF
10277 #define USE_SYMLINKS 1
10278 EOF
10279
10280 ###   use option --enable-broken-linker to force on use of broken-linker support
10281
10282 echo "$as_me:10282: checking if you want broken-linker support code" >&5
10283 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
10284
10285 # Check whether --enable-broken_linker or --disable-broken_linker was given.
10286 if test "${enable_broken_linker+set}" = set; then
10287   enableval="$enable_broken_linker"
10288   with_broken_linker=$enableval
10289 else
10290   with_broken_linker=no
10291 fi;
10292 echo "$as_me:10292: result: $with_broken_linker" >&5
10293 echo "${ECHO_T}$with_broken_linker" >&6
10294
10295 : "${BROKEN_LINKER:=0}"
10296 if test "x$with_broken_linker" = xyes ; then
10297
10298 cat >>confdefs.h <<\EOF
10299 #define BROKEN_LINKER 1
10300 EOF
10301
10302         BROKEN_LINKER=1
10303 fi
10304
10305 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
10306 echo "$as_me:10306: checking if tputs should process BSD-style prefix padding" >&5
10307 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
10308
10309 # Check whether --enable-bsdpad or --disable-bsdpad was given.
10310 if test "${enable_bsdpad+set}" = set; then
10311   enableval="$enable_bsdpad"
10312   with_bsdpad=$enableval
10313 else
10314   with_bsdpad=no
10315 fi;
10316 echo "$as_me:10316: result: $with_bsdpad" >&5
10317 echo "${ECHO_T}$with_bsdpad" >&6
10318 test "x$with_bsdpad" = xyes &&
10319 cat >>confdefs.h <<\EOF
10320 #define BSD_TPUTS 1
10321 EOF
10322
10323 ###   use option --enable-widec to turn on use of wide-character support
10324 NCURSES_CH_T=chtype
10325 NCURSES_LIBUTF8=0
10326
10327 NEED_WCHAR_H=0
10328 NCURSES_MBSTATE_T=0
10329 NCURSES_WCHAR_T=0
10330 NCURSES_WINT_T=0
10331
10332 # Check to define _XOPEN_SOURCE "automatically"
10333 CPPFLAGS_before_XOPEN="$CPPFLAGS"
10334
10335 echo "$as_me:10335: checking if the POSIX test-macros are already defined" >&5
10336 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
10337 if test "${cf_cv_posix_visible+set}" = set; then
10338   echo $ECHO_N "(cached) $ECHO_C" >&6
10339 else
10340
10341 cat >"conftest.$ac_ext" <<_ACEOF
10342 #line 10342 "configure"
10343 #include "confdefs.h"
10344 #include <stdio.h>
10345 int
10346 main (void)
10347 {
10348
10349 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
10350         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
10351         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
10352         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
10353 #error conflicting symbols found
10354 #endif
10355
10356   ;
10357   return 0;
10358 }
10359 _ACEOF
10360 rm -f "conftest.$ac_objext"
10361 if { (eval echo "$as_me:10361: \"$ac_compile\"") >&5
10362   (eval $ac_compile) 2>&5
10363   ac_status=$?
10364   echo "$as_me:10364: \$? = $ac_status" >&5
10365   (exit "$ac_status"); } &&
10366          { ac_try='test -s "conftest.$ac_objext"'
10367   { (eval echo "$as_me:10367: \"$ac_try\"") >&5
10368   (eval $ac_try) 2>&5
10369   ac_status=$?
10370   echo "$as_me:10370: \$? = $ac_status" >&5
10371   (exit "$ac_status"); }; }; then
10372   cf_cv_posix_visible=no
10373 else
10374   echo "$as_me: failed program was:" >&5
10375 cat "conftest.$ac_ext" >&5
10376 cf_cv_posix_visible=yes
10377 fi
10378 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10379
10380 fi
10381 echo "$as_me:10381: result: $cf_cv_posix_visible" >&5
10382 echo "${ECHO_T}$cf_cv_posix_visible" >&6
10383
10384 if test "$cf_cv_posix_visible" = no; then
10385
10386 cf_XOPEN_SOURCE=600
10387 cf_POSIX_C_SOURCE=199506L
10388 cf_xopen_source=
10389
10390 case "$host_os" in
10391 (aix[4-7]*)
10392         cf_xopen_source="-D_ALL_SOURCE"
10393         ;;
10394 (darwin[0-8].*)
10395         cf_xopen_source="-D_APPLE_C_SOURCE"
10396         ;;
10397 (darwin*)
10398         cf_xopen_source="-D_DARWIN_C_SOURCE"
10399         cf_XOPEN_SOURCE=
10400         ;;
10401 (freebsd*|dragonfly*|midnightbsd*)
10402         # 5.x headers associate
10403         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
10404         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
10405         cf_POSIX_C_SOURCE=200112L
10406         cf_XOPEN_SOURCE=600
10407         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10408         ;;
10409 (hpux11*)
10410         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
10411         ;;
10412 (hpux*)
10413         cf_xopen_source="-D_HPUX_SOURCE"
10414         ;;
10415 (irix[56].*)
10416         cf_xopen_source="-D_SGI_SOURCE"
10417         cf_XOPEN_SOURCE=
10418         ;;
10419 (linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc)
10420
10421 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
10422
10423 echo "$as_me:10423: checking if this is the GNU C library" >&5
10424 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
10425 if test "${cf_cv_gnu_library+set}" = set; then
10426   echo $ECHO_N "(cached) $ECHO_C" >&6
10427 else
10428
10429 cat >"conftest.$ac_ext" <<_ACEOF
10430 #line 10430 "configure"
10431 #include "confdefs.h"
10432 #include <sys/types.h>
10433 int
10434 main (void)
10435 {
10436
10437         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
10438                 return 0;
10439         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
10440                 return 0;
10441         #else
10442         #       error not GNU C library
10443         #endif
10444   ;
10445   return 0;
10446 }
10447 _ACEOF
10448 rm -f "conftest.$ac_objext"
10449 if { (eval echo "$as_me:10449: \"$ac_compile\"") >&5
10450   (eval $ac_compile) 2>&5
10451   ac_status=$?
10452   echo "$as_me:10452: \$? = $ac_status" >&5
10453   (exit "$ac_status"); } &&
10454          { ac_try='test -s "conftest.$ac_objext"'
10455   { (eval echo "$as_me:10455: \"$ac_try\"") >&5
10456   (eval $ac_try) 2>&5
10457   ac_status=$?
10458   echo "$as_me:10458: \$? = $ac_status" >&5
10459   (exit "$ac_status"); }; }; then
10460   cf_cv_gnu_library=yes
10461 else
10462   echo "$as_me: failed program was:" >&5
10463 cat "conftest.$ac_ext" >&5
10464 cf_cv_gnu_library=no
10465 fi
10466 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10467
10468 fi
10469 echo "$as_me:10469: result: $cf_cv_gnu_library" >&5
10470 echo "${ECHO_T}$cf_cv_gnu_library" >&6
10471
10472 if test x$cf_cv_gnu_library = xyes; then
10473
10474         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
10475         # was changed to help a little.  newlib incorporated the change about 4
10476         # years later.
10477         echo "$as_me:10477: checking if _DEFAULT_SOURCE can be used as a basis" >&5
10478 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
10479 if test "${cf_cv_gnu_library_219+set}" = set; then
10480   echo $ECHO_N "(cached) $ECHO_C" >&6
10481 else
10482
10483                 cf_save="$CPPFLAGS"
10484
10485         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10486         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10487
10488                 cat >"conftest.$ac_ext" <<_ACEOF
10489 #line 10489 "configure"
10490 #include "confdefs.h"
10491 #include <sys/types.h>
10492 int
10493 main (void)
10494 {
10495
10496                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
10497                                 return 0;
10498                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
10499                                 return 0;
10500                         #else
10501                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
10502                         #endif
10503   ;
10504   return 0;
10505 }
10506 _ACEOF
10507 rm -f "conftest.$ac_objext"
10508 if { (eval echo "$as_me:10508: \"$ac_compile\"") >&5
10509   (eval $ac_compile) 2>&5
10510   ac_status=$?
10511   echo "$as_me:10511: \$? = $ac_status" >&5
10512   (exit "$ac_status"); } &&
10513          { ac_try='test -s "conftest.$ac_objext"'
10514   { (eval echo "$as_me:10514: \"$ac_try\"") >&5
10515   (eval $ac_try) 2>&5
10516   ac_status=$?
10517   echo "$as_me:10517: \$? = $ac_status" >&5
10518   (exit "$ac_status"); }; }; then
10519   cf_cv_gnu_library_219=yes
10520 else
10521   echo "$as_me: failed program was:" >&5
10522 cat "conftest.$ac_ext" >&5
10523 cf_cv_gnu_library_219=no
10524 fi
10525 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10526                 CPPFLAGS="$cf_save"
10527
10528 fi
10529 echo "$as_me:10529: result: $cf_cv_gnu_library_219" >&5
10530 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
10531
10532         if test "x$cf_cv_gnu_library_219" = xyes; then
10533                 cf_save="$CPPFLAGS"
10534                 echo "$as_me:10534: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
10535 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
10536 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
10537   echo $ECHO_N "(cached) $ECHO_C" >&6
10538 else
10539
10540 cf_fix_cppflags=no
10541 cf_new_cflags=
10542 cf_new_cppflags=
10543 cf_new_extra_cppflags=
10544
10545 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
10546 do
10547 case "$cf_fix_cppflags" in
10548 (no)
10549         case "$cf_add_cflags" in
10550         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10551                 case "$cf_add_cflags" in
10552                 (-D*)
10553                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10554
10555                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10556                                 && test -z "${cf_tst_cflags}" \
10557                                 && cf_fix_cppflags=yes
10558
10559                         if test "$cf_fix_cppflags" = yes ; then
10560
10561         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10562         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10563
10564                                 continue
10565                         elif test "${cf_tst_cflags}" = "\"'" ; then
10566
10567         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10568         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10569
10570                                 continue
10571                         fi
10572                         ;;
10573                 esac
10574                 case "$CPPFLAGS" in
10575                 (*$cf_add_cflags)
10576                         ;;
10577                 (*)
10578                         case "$cf_add_cflags" in
10579                         (-D*)
10580                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10581
10582 CPPFLAGS=`echo "$CPPFLAGS" | \
10583         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10584                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10585
10586                                 ;;
10587                         esac
10588
10589         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10590         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10591
10592                         ;;
10593                 esac
10594                 ;;
10595         (*)
10596
10597         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10598         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10599
10600                 ;;
10601         esac
10602         ;;
10603 (yes)
10604
10605         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10606         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10607
10608         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10609
10610         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10611                 && test -z "${cf_tst_cflags}" \
10612                 && cf_fix_cppflags=no
10613         ;;
10614 esac
10615 done
10616
10617 if test -n "$cf_new_cflags" ; then
10618
10619         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10620         CFLAGS="${CFLAGS}$cf_new_cflags"
10621
10622 fi
10623
10624 if test -n "$cf_new_cppflags" ; then
10625
10626         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10627         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10628
10629 fi
10630
10631 if test -n "$cf_new_extra_cppflags" ; then
10632
10633         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10634         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10635
10636 fi
10637
10638                         cat >"conftest.$ac_ext" <<_ACEOF
10639 #line 10639 "configure"
10640 #include "confdefs.h"
10641
10642                                 #include <limits.h>
10643                                 #include <sys/types.h>
10644
10645 int
10646 main (void)
10647 {
10648
10649                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
10650                                         return 0;
10651                                 #else
10652                                 #       error GNU C library is too old
10653                                 #endif
10654   ;
10655   return 0;
10656 }
10657 _ACEOF
10658 rm -f "conftest.$ac_objext"
10659 if { (eval echo "$as_me:10659: \"$ac_compile\"") >&5
10660   (eval $ac_compile) 2>&5
10661   ac_status=$?
10662   echo "$as_me:10662: \$? = $ac_status" >&5
10663   (exit "$ac_status"); } &&
10664          { ac_try='test -s "conftest.$ac_objext"'
10665   { (eval echo "$as_me:10665: \"$ac_try\"") >&5
10666   (eval $ac_try) 2>&5
10667   ac_status=$?
10668   echo "$as_me:10668: \$? = $ac_status" >&5
10669   (exit "$ac_status"); }; }; then
10670   cf_cv_gnu_dftsrc_219=yes
10671 else
10672   echo "$as_me: failed program was:" >&5
10673 cat "conftest.$ac_ext" >&5
10674 cf_cv_gnu_dftsrc_219=no
10675 fi
10676 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10677
10678 fi
10679 echo "$as_me:10679: result: $cf_cv_gnu_dftsrc_219" >&5
10680 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
10681                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
10682         else
10683                 cf_cv_gnu_dftsrc_219=maybe
10684         fi
10685
10686         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
10687
10688                 echo "$as_me:10688: checking if we must define _GNU_SOURCE" >&5
10689 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10690 if test "${cf_cv_gnu_source+set}" = set; then
10691   echo $ECHO_N "(cached) $ECHO_C" >&6
10692 else
10693
10694                 cat >"conftest.$ac_ext" <<_ACEOF
10695 #line 10695 "configure"
10696 #include "confdefs.h"
10697 #include <sys/types.h>
10698 int
10699 main (void)
10700 {
10701
10702                         #ifndef _XOPEN_SOURCE
10703                         #error  expected _XOPEN_SOURCE to be defined
10704                         #endif
10705   ;
10706   return 0;
10707 }
10708 _ACEOF
10709 rm -f "conftest.$ac_objext"
10710 if { (eval echo "$as_me:10710: \"$ac_compile\"") >&5
10711   (eval $ac_compile) 2>&5
10712   ac_status=$?
10713   echo "$as_me:10713: \$? = $ac_status" >&5
10714   (exit "$ac_status"); } &&
10715          { ac_try='test -s "conftest.$ac_objext"'
10716   { (eval echo "$as_me:10716: \"$ac_try\"") >&5
10717   (eval $ac_try) 2>&5
10718   ac_status=$?
10719   echo "$as_me:10719: \$? = $ac_status" >&5
10720   (exit "$ac_status"); }; }; then
10721   cf_cv_gnu_source=no
10722 else
10723   echo "$as_me: failed program was:" >&5
10724 cat "conftest.$ac_ext" >&5
10725 cf_save="$CPPFLAGS"
10726
10727 cf_fix_cppflags=no
10728 cf_new_cflags=
10729 cf_new_cppflags=
10730 cf_new_extra_cppflags=
10731
10732 for cf_add_cflags in -D_GNU_SOURCE
10733 do
10734 case "$cf_fix_cppflags" in
10735 (no)
10736         case "$cf_add_cflags" in
10737         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10738                 case "$cf_add_cflags" in
10739                 (-D*)
10740                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10741
10742                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10743                                 && test -z "${cf_tst_cflags}" \
10744                                 && cf_fix_cppflags=yes
10745
10746                         if test "$cf_fix_cppflags" = yes ; then
10747
10748         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10749         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10750
10751                                 continue
10752                         elif test "${cf_tst_cflags}" = "\"'" ; then
10753
10754         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10755         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10756
10757                                 continue
10758                         fi
10759                         ;;
10760                 esac
10761                 case "$CPPFLAGS" in
10762                 (*$cf_add_cflags)
10763                         ;;
10764                 (*)
10765                         case "$cf_add_cflags" in
10766                         (-D*)
10767                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10768
10769 CPPFLAGS=`echo "$CPPFLAGS" | \
10770         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10771                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10772
10773                                 ;;
10774                         esac
10775
10776         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10777         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10778
10779                         ;;
10780                 esac
10781                 ;;
10782         (*)
10783
10784         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10785         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10786
10787                 ;;
10788         esac
10789         ;;
10790 (yes)
10791
10792         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10793         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10794
10795         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10796
10797         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10798                 && test -z "${cf_tst_cflags}" \
10799                 && cf_fix_cppflags=no
10800         ;;
10801 esac
10802 done
10803
10804 if test -n "$cf_new_cflags" ; then
10805
10806         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10807         CFLAGS="${CFLAGS}$cf_new_cflags"
10808
10809 fi
10810
10811 if test -n "$cf_new_cppflags" ; then
10812
10813         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10814         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10815
10816 fi
10817
10818 if test -n "$cf_new_extra_cppflags" ; then
10819
10820         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10821         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10822
10823 fi
10824
10825                          cat >"conftest.$ac_ext" <<_ACEOF
10826 #line 10826 "configure"
10827 #include "confdefs.h"
10828 #include <sys/types.h>
10829 int
10830 main (void)
10831 {
10832
10833                                 #ifdef _XOPEN_SOURCE
10834                                 #error  expected _XOPEN_SOURCE to be undefined
10835                                 #endif
10836   ;
10837   return 0;
10838 }
10839 _ACEOF
10840 rm -f "conftest.$ac_objext"
10841 if { (eval echo "$as_me:10841: \"$ac_compile\"") >&5
10842   (eval $ac_compile) 2>&5
10843   ac_status=$?
10844   echo "$as_me:10844: \$? = $ac_status" >&5
10845   (exit "$ac_status"); } &&
10846          { ac_try='test -s "conftest.$ac_objext"'
10847   { (eval echo "$as_me:10847: \"$ac_try\"") >&5
10848   (eval $ac_try) 2>&5
10849   ac_status=$?
10850   echo "$as_me:10850: \$? = $ac_status" >&5
10851   (exit "$ac_status"); }; }; then
10852   cf_cv_gnu_source=no
10853 else
10854   echo "$as_me: failed program was:" >&5
10855 cat "conftest.$ac_ext" >&5
10856 cf_cv_gnu_source=yes
10857 fi
10858 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10859                         CPPFLAGS="$cf_save"
10860
10861 fi
10862 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10863
10864 fi
10865 echo "$as_me:10865: result: $cf_cv_gnu_source" >&5
10866 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10867
10868                 if test "$cf_cv_gnu_source" = yes
10869                 then
10870                 echo "$as_me:10870: checking if we should also define _DEFAULT_SOURCE" >&5
10871 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10872 if test "${cf_cv_default_source+set}" = set; then
10873   echo $ECHO_N "(cached) $ECHO_C" >&6
10874 else
10875
10876         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10877         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10878
10879                         cat >"conftest.$ac_ext" <<_ACEOF
10880 #line 10880 "configure"
10881 #include "confdefs.h"
10882 #include <sys/types.h>
10883 int
10884 main (void)
10885 {
10886
10887                                 #ifdef _DEFAULT_SOURCE
10888                                 #error  expected _DEFAULT_SOURCE to be undefined
10889                                 #endif
10890   ;
10891   return 0;
10892 }
10893 _ACEOF
10894 rm -f "conftest.$ac_objext"
10895 if { (eval echo "$as_me:10895: \"$ac_compile\"") >&5
10896   (eval $ac_compile) 2>&5
10897   ac_status=$?
10898   echo "$as_me:10898: \$? = $ac_status" >&5
10899   (exit "$ac_status"); } &&
10900          { ac_try='test -s "conftest.$ac_objext"'
10901   { (eval echo "$as_me:10901: \"$ac_try\"") >&5
10902   (eval $ac_try) 2>&5
10903   ac_status=$?
10904   echo "$as_me:10904: \$? = $ac_status" >&5
10905   (exit "$ac_status"); }; }; then
10906   cf_cv_default_source=no
10907 else
10908   echo "$as_me: failed program was:" >&5
10909 cat "conftest.$ac_ext" >&5
10910 cf_cv_default_source=yes
10911 fi
10912 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10913
10914 fi
10915 echo "$as_me:10915: result: $cf_cv_default_source" >&5
10916 echo "${ECHO_T}$cf_cv_default_source" >&6
10917                         if test "$cf_cv_default_source" = yes
10918                         then
10919
10920         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10921         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10922
10923                         fi
10924                 fi
10925         fi
10926
10927 fi
10928
10929         ;;
10930 (minix*)
10931         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10932         ;;
10933 (mirbsd*)
10934         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10935         cf_XOPEN_SOURCE=
10936
10937 if test "$cf_cv_posix_visible" = no; then
10938
10939 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10940
10941 cf_save_CFLAGS="$CFLAGS"
10942 cf_save_CPPFLAGS="$CPPFLAGS"
10943
10944 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10945         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10946                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10947
10948 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10949         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10950                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10951
10952 echo "$as_me:10952: checking if we should define _POSIX_C_SOURCE" >&5
10953 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10954 if test "${cf_cv_posix_c_source+set}" = set; then
10955   echo $ECHO_N "(cached) $ECHO_C" >&6
10956 else
10957
10958 echo "${as_me:-configure}:10958: testing if the symbol is already defined go no further ..." 1>&5
10959
10960         cat >"conftest.$ac_ext" <<_ACEOF
10961 #line 10961 "configure"
10962 #include "confdefs.h"
10963 #include <sys/types.h>
10964 int
10965 main (void)
10966 {
10967
10968 #ifndef _POSIX_C_SOURCE
10969 #error _POSIX_C_SOURCE is not defined
10970 #endif
10971   ;
10972   return 0;
10973 }
10974 _ACEOF
10975 rm -f "conftest.$ac_objext"
10976 if { (eval echo "$as_me:10976: \"$ac_compile\"") >&5
10977   (eval $ac_compile) 2>&5
10978   ac_status=$?
10979   echo "$as_me:10979: \$? = $ac_status" >&5
10980   (exit "$ac_status"); } &&
10981          { ac_try='test -s "conftest.$ac_objext"'
10982   { (eval echo "$as_me:10982: \"$ac_try\"") >&5
10983   (eval $ac_try) 2>&5
10984   ac_status=$?
10985   echo "$as_me:10985: \$? = $ac_status" >&5
10986   (exit "$ac_status"); }; }; then
10987   cf_cv_posix_c_source=no
10988 else
10989   echo "$as_me: failed program was:" >&5
10990 cat "conftest.$ac_ext" >&5
10991 cf_want_posix_source=no
10992          case .$cf_POSIX_C_SOURCE in
10993          (.[12]??*)
10994                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10995                 ;;
10996          (.2)
10997                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10998                 cf_want_posix_source=yes
10999                 ;;
11000          (.*)
11001                 cf_want_posix_source=yes
11002                 ;;
11003          esac
11004          if test "$cf_want_posix_source" = yes ; then
11005                 cat >"conftest.$ac_ext" <<_ACEOF
11006 #line 11006 "configure"
11007 #include "confdefs.h"
11008 #include <sys/types.h>
11009 int
11010 main (void)
11011 {
11012
11013 #ifdef _POSIX_SOURCE
11014 #error _POSIX_SOURCE is defined
11015 #endif
11016   ;
11017   return 0;
11018 }
11019 _ACEOF
11020 rm -f "conftest.$ac_objext"
11021 if { (eval echo "$as_me:11021: \"$ac_compile\"") >&5
11022   (eval $ac_compile) 2>&5
11023   ac_status=$?
11024   echo "$as_me:11024: \$? = $ac_status" >&5
11025   (exit "$ac_status"); } &&
11026          { ac_try='test -s "conftest.$ac_objext"'
11027   { (eval echo "$as_me:11027: \"$ac_try\"") >&5
11028   (eval $ac_try) 2>&5
11029   ac_status=$?
11030   echo "$as_me:11030: \$? = $ac_status" >&5
11031   (exit "$ac_status"); }; }; then
11032   :
11033 else
11034   echo "$as_me: failed program was:" >&5
11035 cat "conftest.$ac_ext" >&5
11036 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11037 fi
11038 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11039          fi
11040
11041 echo "${as_me:-configure}:11041: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11042
11043          CFLAGS="$cf_trim_CFLAGS"
11044          CPPFLAGS="$cf_trim_CPPFLAGS"
11045
11046         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11047         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11048
11049 echo "${as_me:-configure}:11049: testing if the second compile does not leave our definition intact error ..." 1>&5
11050
11051          cat >"conftest.$ac_ext" <<_ACEOF
11052 #line 11052 "configure"
11053 #include "confdefs.h"
11054 #include <sys/types.h>
11055 int
11056 main (void)
11057 {
11058
11059 #ifndef _POSIX_C_SOURCE
11060 #error _POSIX_C_SOURCE is not defined
11061 #endif
11062   ;
11063   return 0;
11064 }
11065 _ACEOF
11066 rm -f "conftest.$ac_objext"
11067 if { (eval echo "$as_me:11067: \"$ac_compile\"") >&5
11068   (eval $ac_compile) 2>&5
11069   ac_status=$?
11070   echo "$as_me:11070: \$? = $ac_status" >&5
11071   (exit "$ac_status"); } &&
11072          { ac_try='test -s "conftest.$ac_objext"'
11073   { (eval echo "$as_me:11073: \"$ac_try\"") >&5
11074   (eval $ac_try) 2>&5
11075   ac_status=$?
11076   echo "$as_me:11076: \$? = $ac_status" >&5
11077   (exit "$ac_status"); }; }; then
11078   :
11079 else
11080   echo "$as_me: failed program was:" >&5
11081 cat "conftest.$ac_ext" >&5
11082 cf_cv_posix_c_source=no
11083 fi
11084 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11085          CFLAGS="$cf_save_CFLAGS"
11086          CPPFLAGS="$cf_save_CPPFLAGS"
11087
11088 fi
11089 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11090
11091 fi
11092 echo "$as_me:11092: result: $cf_cv_posix_c_source" >&5
11093 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11094
11095 if test "$cf_cv_posix_c_source" != no ; then
11096         CFLAGS="$cf_trim_CFLAGS"
11097         CPPFLAGS="$cf_trim_CPPFLAGS"
11098
11099 cf_fix_cppflags=no
11100 cf_new_cflags=
11101 cf_new_cppflags=
11102 cf_new_extra_cppflags=
11103
11104 for cf_add_cflags in $cf_cv_posix_c_source
11105 do
11106 case "$cf_fix_cppflags" in
11107 (no)
11108         case "$cf_add_cflags" in
11109         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11110                 case "$cf_add_cflags" in
11111                 (-D*)
11112                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11113
11114                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11115                                 && test -z "${cf_tst_cflags}" \
11116                                 && cf_fix_cppflags=yes
11117
11118                         if test "$cf_fix_cppflags" = yes ; then
11119
11120         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11121         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11122
11123                                 continue
11124                         elif test "${cf_tst_cflags}" = "\"'" ; then
11125
11126         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11127         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11128
11129                                 continue
11130                         fi
11131                         ;;
11132                 esac
11133                 case "$CPPFLAGS" in
11134                 (*$cf_add_cflags)
11135                         ;;
11136                 (*)
11137                         case "$cf_add_cflags" in
11138                         (-D*)
11139                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11140
11141 CPPFLAGS=`echo "$CPPFLAGS" | \
11142         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11143                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11144
11145                                 ;;
11146                         esac
11147
11148         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11149         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11150
11151                         ;;
11152                 esac
11153                 ;;
11154         (*)
11155
11156         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11157         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11158
11159                 ;;
11160         esac
11161         ;;
11162 (yes)
11163
11164         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11165         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11166
11167         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11168
11169         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11170                 && test -z "${cf_tst_cflags}" \
11171                 && cf_fix_cppflags=no
11172         ;;
11173 esac
11174 done
11175
11176 if test -n "$cf_new_cflags" ; then
11177
11178         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11179         CFLAGS="${CFLAGS}$cf_new_cflags"
11180
11181 fi
11182
11183 if test -n "$cf_new_cppflags" ; then
11184
11185         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11186         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11187
11188 fi
11189
11190 if test -n "$cf_new_extra_cppflags" ; then
11191
11192         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11193         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11194
11195 fi
11196
11197 fi
11198
11199 fi # cf_cv_posix_visible
11200
11201         ;;
11202 (netbsd*)
11203         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
11204         ;;
11205 (openbsd[6-9]*)
11206         # OpenBSD 6.x has broken locale support, both compile-time and runtime.
11207         # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
11208         # Abusing the conformance level is a workaround.
11209         { echo "$as_me:11209: WARNING: this system does not provide usable locale support" >&5
11210 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
11211         cf_xopen_source="-D_BSD_SOURCE"
11212         cf_XOPEN_SOURCE=700
11213         ;;
11214 (openbsd[4-5]*)
11215         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
11216         cf_xopen_source="-D_BSD_SOURCE"
11217         cf_XOPEN_SOURCE=600
11218         ;;
11219 (openbsd*)
11220         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
11221         ;;
11222 (osf[45]*)
11223         cf_xopen_source="-D_OSF_SOURCE"
11224         ;;
11225 (nto-qnx*)
11226         cf_xopen_source="-D_QNX_SOURCE"
11227         ;;
11228 (sco*)
11229         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
11230         ;;
11231 (solaris2.*)
11232         cf_xopen_source="-D__EXTENSIONS__"
11233         cf_cv_xopen_source=broken
11234         ;;
11235 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
11236         cf_XOPEN_SOURCE=
11237         cf_POSIX_C_SOURCE=
11238         ;;
11239 (*)
11240
11241 echo "$as_me:11241: checking if we should define _XOPEN_SOURCE" >&5
11242 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11243 if test "${cf_cv_xopen_source+set}" = set; then
11244   echo $ECHO_N "(cached) $ECHO_C" >&6
11245 else
11246
11247         cat >"conftest.$ac_ext" <<_ACEOF
11248 #line 11248 "configure"
11249 #include "confdefs.h"
11250
11251 $ac_includes_default
11252
11253 int
11254 main (void)
11255 {
11256
11257 #ifndef _XOPEN_SOURCE
11258 #error _XOPEN_SOURCE is not defined
11259 #endif
11260
11261   ;
11262   return 0;
11263 }
11264 _ACEOF
11265 rm -f "conftest.$ac_objext"
11266 if { (eval echo "$as_me:11266: \"$ac_compile\"") >&5
11267   (eval $ac_compile) 2>&5
11268   ac_status=$?
11269   echo "$as_me:11269: \$? = $ac_status" >&5
11270   (exit "$ac_status"); } &&
11271          { ac_try='test -s "conftest.$ac_objext"'
11272   { (eval echo "$as_me:11272: \"$ac_try\"") >&5
11273   (eval $ac_try) 2>&5
11274   ac_status=$?
11275   echo "$as_me:11275: \$? = $ac_status" >&5
11276   (exit "$ac_status"); }; }; then
11277   cf_cv_xopen_source=no
11278 else
11279   echo "$as_me: failed program was:" >&5
11280 cat "conftest.$ac_ext" >&5
11281 cf_save="$CPPFLAGS"
11282
11283         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11284         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11285
11286          cat >"conftest.$ac_ext" <<_ACEOF
11287 #line 11287 "configure"
11288 #include "confdefs.h"
11289
11290 $ac_includes_default
11291
11292 int
11293 main (void)
11294 {
11295
11296 #ifndef _XOPEN_SOURCE
11297 #error _XOPEN_SOURCE is not defined
11298 #endif
11299
11300   ;
11301   return 0;
11302 }
11303 _ACEOF
11304 rm -f "conftest.$ac_objext"
11305 if { (eval echo "$as_me:11305: \"$ac_compile\"") >&5
11306   (eval $ac_compile) 2>&5
11307   ac_status=$?
11308   echo "$as_me:11308: \$? = $ac_status" >&5
11309   (exit "$ac_status"); } &&
11310          { ac_try='test -s "conftest.$ac_objext"'
11311   { (eval echo "$as_me:11311: \"$ac_try\"") >&5
11312   (eval $ac_try) 2>&5
11313   ac_status=$?
11314   echo "$as_me:11314: \$? = $ac_status" >&5
11315   (exit "$ac_status"); }; }; then
11316   cf_cv_xopen_source=no
11317 else
11318   echo "$as_me: failed program was:" >&5
11319 cat "conftest.$ac_ext" >&5
11320 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11321 fi
11322 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11323                 CPPFLAGS="$cf_save"
11324
11325 fi
11326 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11327
11328 fi
11329 echo "$as_me:11329: result: $cf_cv_xopen_source" >&5
11330 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11331
11332 if test "$cf_cv_xopen_source" != no ; then
11333
11334 CFLAGS=`echo "$CFLAGS" | \
11335         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11336                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11337
11338 CPPFLAGS=`echo "$CPPFLAGS" | \
11339         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11340                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11341
11342         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11343
11344 for cf_add_cflags in $cf_temp_xopen_source
11345 do
11346         case "x$cf_add_cflags" in
11347         (x-[DU]*)
11348
11349 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11350 while true
11351 do
11352         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'`
11353         test "$CFLAGS" != "$cf_old_cflag" || break
11354
11355         CFLAGS="$cf_old_cflag"
11356 done
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$CPPFLAGS" | 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 "$CPPFLAGS" != "$cf_old_cflag" || break
11363
11364         CPPFLAGS="$cf_old_cflag"
11365 done
11366
11367                 ;;
11368         esac
11369
11370 cf_fix_cppflags=no
11371 cf_new_cflags=
11372 cf_new_cppflags=
11373 cf_new_extra_cppflags=
11374
11375 for cf_add_cflags in $cf_add_cflags
11376 do
11377 case "$cf_fix_cppflags" in
11378 (no)
11379         case "$cf_add_cflags" in
11380         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11381                 case "$cf_add_cflags" in
11382                 (-D*)
11383                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11384
11385                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11386                                 && test -z "${cf_tst_cflags}" \
11387                                 && cf_fix_cppflags=yes
11388
11389                         if test "$cf_fix_cppflags" = yes ; then
11390
11391         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11392         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11393
11394                                 continue
11395                         elif test "${cf_tst_cflags}" = "\"'" ; then
11396
11397         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11398         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11399
11400                                 continue
11401                         fi
11402                         ;;
11403                 esac
11404                 case "$CPPFLAGS" in
11405                 (*$cf_add_cflags)
11406                         ;;
11407                 (*)
11408                         case "$cf_add_cflags" in
11409                         (-D*)
11410                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11411
11412 CPPFLAGS=`echo "$CPPFLAGS" | \
11413         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11414                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11415
11416                                 ;;
11417                         esac
11418
11419         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11420         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11421
11422                         ;;
11423                 esac
11424                 ;;
11425         (*)
11426
11427         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11428         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11429
11430                 ;;
11431         esac
11432         ;;
11433 (yes)
11434
11435         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11436         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11437
11438         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11439
11440         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11441                 && test -z "${cf_tst_cflags}" \
11442                 && cf_fix_cppflags=no
11443         ;;
11444 esac
11445 done
11446
11447 if test -n "$cf_new_cflags" ; then
11448
11449         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11450         CFLAGS="${CFLAGS}$cf_new_cflags"
11451
11452 fi
11453
11454 if test -n "$cf_new_cppflags" ; then
11455
11456         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11457         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11458
11459 fi
11460
11461 if test -n "$cf_new_extra_cppflags" ; then
11462
11463         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11464         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11465
11466 fi
11467
11468 done
11469
11470 fi
11471
11472         cf_save_xopen_cppflags="$CPPFLAGS"
11473
11474 if test "$cf_cv_posix_visible" = no; then
11475
11476 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
11477
11478 cf_save_CFLAGS="$CFLAGS"
11479 cf_save_CPPFLAGS="$CPPFLAGS"
11480
11481 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
11482         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11483                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11484
11485 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
11486         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11487                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11488
11489 echo "$as_me:11489: checking if we should define _POSIX_C_SOURCE" >&5
11490 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11491 if test "${cf_cv_posix_c_source+set}" = set; then
11492   echo $ECHO_N "(cached) $ECHO_C" >&6
11493 else
11494
11495 echo "${as_me:-configure}:11495: testing if the symbol is already defined go no further ..." 1>&5
11496
11497         cat >"conftest.$ac_ext" <<_ACEOF
11498 #line 11498 "configure"
11499 #include "confdefs.h"
11500 #include <sys/types.h>
11501 int
11502 main (void)
11503 {
11504
11505 #ifndef _POSIX_C_SOURCE
11506 #error _POSIX_C_SOURCE is not defined
11507 #endif
11508   ;
11509   return 0;
11510 }
11511 _ACEOF
11512 rm -f "conftest.$ac_objext"
11513 if { (eval echo "$as_me:11513: \"$ac_compile\"") >&5
11514   (eval $ac_compile) 2>&5
11515   ac_status=$?
11516   echo "$as_me:11516: \$? = $ac_status" >&5
11517   (exit "$ac_status"); } &&
11518          { ac_try='test -s "conftest.$ac_objext"'
11519   { (eval echo "$as_me:11519: \"$ac_try\"") >&5
11520   (eval $ac_try) 2>&5
11521   ac_status=$?
11522   echo "$as_me:11522: \$? = $ac_status" >&5
11523   (exit "$ac_status"); }; }; then
11524   cf_cv_posix_c_source=no
11525 else
11526   echo "$as_me: failed program was:" >&5
11527 cat "conftest.$ac_ext" >&5
11528 cf_want_posix_source=no
11529          case .$cf_POSIX_C_SOURCE in
11530          (.[12]??*)
11531                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11532                 ;;
11533          (.2)
11534                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11535                 cf_want_posix_source=yes
11536                 ;;
11537          (.*)
11538                 cf_want_posix_source=yes
11539                 ;;
11540          esac
11541          if test "$cf_want_posix_source" = yes ; then
11542                 cat >"conftest.$ac_ext" <<_ACEOF
11543 #line 11543 "configure"
11544 #include "confdefs.h"
11545 #include <sys/types.h>
11546 int
11547 main (void)
11548 {
11549
11550 #ifdef _POSIX_SOURCE
11551 #error _POSIX_SOURCE is defined
11552 #endif
11553   ;
11554   return 0;
11555 }
11556 _ACEOF
11557 rm -f "conftest.$ac_objext"
11558 if { (eval echo "$as_me:11558: \"$ac_compile\"") >&5
11559   (eval $ac_compile) 2>&5
11560   ac_status=$?
11561   echo "$as_me:11561: \$? = $ac_status" >&5
11562   (exit "$ac_status"); } &&
11563          { ac_try='test -s "conftest.$ac_objext"'
11564   { (eval echo "$as_me:11564: \"$ac_try\"") >&5
11565   (eval $ac_try) 2>&5
11566   ac_status=$?
11567   echo "$as_me:11567: \$? = $ac_status" >&5
11568   (exit "$ac_status"); }; }; then
11569   :
11570 else
11571   echo "$as_me: failed program was:" >&5
11572 cat "conftest.$ac_ext" >&5
11573 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11574 fi
11575 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11576          fi
11577
11578 echo "${as_me:-configure}:11578: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11579
11580          CFLAGS="$cf_trim_CFLAGS"
11581          CPPFLAGS="$cf_trim_CPPFLAGS"
11582
11583         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11584         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11585
11586 echo "${as_me:-configure}:11586: testing if the second compile does not leave our definition intact error ..." 1>&5
11587
11588          cat >"conftest.$ac_ext" <<_ACEOF
11589 #line 11589 "configure"
11590 #include "confdefs.h"
11591 #include <sys/types.h>
11592 int
11593 main (void)
11594 {
11595
11596 #ifndef _POSIX_C_SOURCE
11597 #error _POSIX_C_SOURCE is not defined
11598 #endif
11599   ;
11600   return 0;
11601 }
11602 _ACEOF
11603 rm -f "conftest.$ac_objext"
11604 if { (eval echo "$as_me:11604: \"$ac_compile\"") >&5
11605   (eval $ac_compile) 2>&5
11606   ac_status=$?
11607   echo "$as_me:11607: \$? = $ac_status" >&5
11608   (exit "$ac_status"); } &&
11609          { ac_try='test -s "conftest.$ac_objext"'
11610   { (eval echo "$as_me:11610: \"$ac_try\"") >&5
11611   (eval $ac_try) 2>&5
11612   ac_status=$?
11613   echo "$as_me:11613: \$? = $ac_status" >&5
11614   (exit "$ac_status"); }; }; then
11615   :
11616 else
11617   echo "$as_me: failed program was:" >&5
11618 cat "conftest.$ac_ext" >&5
11619 cf_cv_posix_c_source=no
11620 fi
11621 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11622          CFLAGS="$cf_save_CFLAGS"
11623          CPPFLAGS="$cf_save_CPPFLAGS"
11624
11625 fi
11626 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11627
11628 fi
11629 echo "$as_me:11629: result: $cf_cv_posix_c_source" >&5
11630 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11631
11632 if test "$cf_cv_posix_c_source" != no ; then
11633         CFLAGS="$cf_trim_CFLAGS"
11634         CPPFLAGS="$cf_trim_CPPFLAGS"
11635
11636 cf_fix_cppflags=no
11637 cf_new_cflags=
11638 cf_new_cppflags=
11639 cf_new_extra_cppflags=
11640
11641 for cf_add_cflags in $cf_cv_posix_c_source
11642 do
11643 case "$cf_fix_cppflags" in
11644 (no)
11645         case "$cf_add_cflags" in
11646         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11647                 case "$cf_add_cflags" in
11648                 (-D*)
11649                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11650
11651                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11652                                 && test -z "${cf_tst_cflags}" \
11653                                 && cf_fix_cppflags=yes
11654
11655                         if test "$cf_fix_cppflags" = yes ; then
11656
11657         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11658         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11659
11660                                 continue
11661                         elif test "${cf_tst_cflags}" = "\"'" ; then
11662
11663         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11664         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11665
11666                                 continue
11667                         fi
11668                         ;;
11669                 esac
11670                 case "$CPPFLAGS" in
11671                 (*$cf_add_cflags)
11672                         ;;
11673                 (*)
11674                         case "$cf_add_cflags" in
11675                         (-D*)
11676                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11677
11678 CPPFLAGS=`echo "$CPPFLAGS" | \
11679         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11680                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11681
11682                                 ;;
11683                         esac
11684
11685         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11686         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11687
11688                         ;;
11689                 esac
11690                 ;;
11691         (*)
11692
11693         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11694         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11695
11696                 ;;
11697         esac
11698         ;;
11699 (yes)
11700
11701         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11702         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11703
11704         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11705
11706         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11707                 && test -z "${cf_tst_cflags}" \
11708                 && cf_fix_cppflags=no
11709         ;;
11710 esac
11711 done
11712
11713 if test -n "$cf_new_cflags" ; then
11714
11715         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11716         CFLAGS="${CFLAGS}$cf_new_cflags"
11717
11718 fi
11719
11720 if test -n "$cf_new_cppflags" ; then
11721
11722         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11723         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11724
11725 fi
11726
11727 if test -n "$cf_new_extra_cppflags" ; then
11728
11729         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11730         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11731
11732 fi
11733
11734 fi
11735
11736 fi # cf_cv_posix_visible
11737
11738         # Some of these niche implementations use copy/paste, double-check...
11739         if test "$cf_cv_xopen_source" = no ; then
11740                 test -n "$verbose" && echo "    checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE" 1>&6
11741
11742 echo "${as_me:-configure}:11742: testing checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE ..." 1>&5
11743
11744                 cat >"conftest.$ac_ext" <<_ACEOF
11745 #line 11745 "configure"
11746 #include "confdefs.h"
11747
11748 $ac_includes_default
11749
11750 int
11751 main (void)
11752 {
11753
11754 #ifndef _XOPEN_SOURCE
11755 #error _XOPEN_SOURCE is not defined
11756 #endif
11757
11758   ;
11759   return 0;
11760 }
11761 _ACEOF
11762 rm -f "conftest.$ac_objext"
11763 if { (eval echo "$as_me:11763: \"$ac_compile\"") >&5
11764   (eval $ac_compile) 2>&5
11765   ac_status=$?
11766   echo "$as_me:11766: \$? = $ac_status" >&5
11767   (exit "$ac_status"); } &&
11768          { ac_try='test -s "conftest.$ac_objext"'
11769   { (eval echo "$as_me:11769: \"$ac_try\"") >&5
11770   (eval $ac_try) 2>&5
11771   ac_status=$?
11772   echo "$as_me:11772: \$? = $ac_status" >&5
11773   (exit "$ac_status"); }; }; then
11774   :
11775 else
11776   echo "$as_me: failed program was:" >&5
11777 cat "conftest.$ac_ext" >&5
11778
11779                         { echo "$as_me:11779: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
11780 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
11781                         CPPFLAGS="$cf_save_xopen_cppflags"
11782 fi
11783 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11784         fi
11785         ;;
11786 esac
11787
11788 if test -n "$cf_xopen_source" ; then
11789
11790 for cf_add_cflags in $cf_xopen_source
11791 do
11792         case "x$cf_add_cflags" in
11793         (x-[DU]*)
11794
11795 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11796 while true
11797 do
11798         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'`
11799         test "$CFLAGS" != "$cf_old_cflag" || break
11800         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CFLAGS" 1>&6
11801
11802 echo "${as_me:-configure}:11802: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
11803
11804         CFLAGS="$cf_old_cflag"
11805 done
11806
11807 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11808 while true
11809 do
11810         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'`
11811         test "$CPPFLAGS" != "$cf_old_cflag" || break
11812         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CPPFLAGS" 1>&6
11813
11814 echo "${as_me:-configure}:11814: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
11815
11816         CPPFLAGS="$cf_old_cflag"
11817 done
11818
11819                 ;;
11820         esac
11821
11822 cf_fix_cppflags=no
11823 cf_new_cflags=
11824 cf_new_cppflags=
11825 cf_new_extra_cppflags=
11826
11827 for cf_add_cflags in $cf_add_cflags
11828 do
11829 case "$cf_fix_cppflags" in
11830 (no)
11831         case "$cf_add_cflags" in
11832         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11833                 case "$cf_add_cflags" in
11834                 (-D*)
11835                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11836
11837                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11838                                 && test -z "${cf_tst_cflags}" \
11839                                 && cf_fix_cppflags=yes
11840
11841                         if test "$cf_fix_cppflags" = yes ; then
11842
11843         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11844         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11845
11846                                 continue
11847                         elif test "${cf_tst_cflags}" = "\"'" ; then
11848
11849         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11850         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11851
11852                                 continue
11853                         fi
11854                         ;;
11855                 esac
11856                 case "$CPPFLAGS" in
11857                 (*$cf_add_cflags)
11858                         ;;
11859                 (*)
11860                         case "$cf_add_cflags" in
11861                         (-D*)
11862                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11863
11864 CPPFLAGS=`echo "$CPPFLAGS" | \
11865         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11866                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11867
11868                                 ;;
11869                         esac
11870
11871         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11872         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11873
11874                         ;;
11875                 esac
11876                 ;;
11877         (*)
11878
11879         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11880         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11881
11882                 ;;
11883         esac
11884         ;;
11885 (yes)
11886
11887         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11888         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11889
11890         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11891
11892         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11893                 && test -z "${cf_tst_cflags}" \
11894                 && cf_fix_cppflags=no
11895         ;;
11896 esac
11897 done
11898
11899 if test -n "$cf_new_cflags" ; then
11900         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11901
11902 echo "${as_me:-configure}:11902: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11903
11904         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11905         CFLAGS="${CFLAGS}$cf_new_cflags"
11906
11907 fi
11908
11909 if test -n "$cf_new_cppflags" ; then
11910         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11911
11912 echo "${as_me:-configure}:11912: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11913
11914         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11915         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11916
11917 fi
11918
11919 if test -n "$cf_new_extra_cppflags" ; then
11920         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11921
11922 echo "${as_me:-configure}:11922: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11923
11924         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11925         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11926
11927 fi
11928
11929 done
11930
11931 fi
11932
11933 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11934         echo "$as_me:11934: checking if _XOPEN_SOURCE really is set" >&5
11935 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11936         cat >"conftest.$ac_ext" <<_ACEOF
11937 #line 11937 "configure"
11938 #include "confdefs.h"
11939 #include <stdlib.h>
11940 int
11941 main (void)
11942 {
11943
11944 #ifndef _XOPEN_SOURCE
11945 #error _XOPEN_SOURCE is not defined
11946 #endif
11947   ;
11948   return 0;
11949 }
11950 _ACEOF
11951 rm -f "conftest.$ac_objext"
11952 if { (eval echo "$as_me:11952: \"$ac_compile\"") >&5
11953   (eval $ac_compile) 2>&5
11954   ac_status=$?
11955   echo "$as_me:11955: \$? = $ac_status" >&5
11956   (exit "$ac_status"); } &&
11957          { ac_try='test -s "conftest.$ac_objext"'
11958   { (eval echo "$as_me:11958: \"$ac_try\"") >&5
11959   (eval $ac_try) 2>&5
11960   ac_status=$?
11961   echo "$as_me:11961: \$? = $ac_status" >&5
11962   (exit "$ac_status"); }; }; then
11963   cf_XOPEN_SOURCE_set=yes
11964 else
11965   echo "$as_me: failed program was:" >&5
11966 cat "conftest.$ac_ext" >&5
11967 cf_XOPEN_SOURCE_set=no
11968 fi
11969 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11970         echo "$as_me:11970: result: $cf_XOPEN_SOURCE_set" >&5
11971 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11972         if test "$cf_XOPEN_SOURCE_set" = yes
11973         then
11974                 cat >"conftest.$ac_ext" <<_ACEOF
11975 #line 11975 "configure"
11976 #include "confdefs.h"
11977 #include <stdlib.h>
11978 int
11979 main (void)
11980 {
11981
11982 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11983 #error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11984 #endif
11985   ;
11986   return 0;
11987 }
11988 _ACEOF
11989 rm -f "conftest.$ac_objext"
11990 if { (eval echo "$as_me:11990: \"$ac_compile\"") >&5
11991   (eval $ac_compile) 2>&5
11992   ac_status=$?
11993   echo "$as_me:11993: \$? = $ac_status" >&5
11994   (exit "$ac_status"); } &&
11995          { ac_try='test -s "conftest.$ac_objext"'
11996   { (eval echo "$as_me:11996: \"$ac_try\"") >&5
11997   (eval $ac_try) 2>&5
11998   ac_status=$?
11999   echo "$as_me:11999: \$? = $ac_status" >&5
12000   (exit "$ac_status"); }; }; then
12001   cf_XOPEN_SOURCE_set_ok=yes
12002 else
12003   echo "$as_me: failed program was:" >&5
12004 cat "conftest.$ac_ext" >&5
12005 cf_XOPEN_SOURCE_set_ok=no
12006 fi
12007 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12008                 if test "$cf_XOPEN_SOURCE_set_ok" = no
12009                 then
12010                         { echo "$as_me:12010: WARNING: _XOPEN_SOURCE is lower than requested" >&5
12011 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
12012                 fi
12013         else
12014
12015 echo "$as_me:12015: checking if we should define _XOPEN_SOURCE" >&5
12016 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
12017 if test "${cf_cv_xopen_source+set}" = set; then
12018   echo $ECHO_N "(cached) $ECHO_C" >&6
12019 else
12020
12021         cat >"conftest.$ac_ext" <<_ACEOF
12022 #line 12022 "configure"
12023 #include "confdefs.h"
12024
12025 $ac_includes_default
12026
12027 int
12028 main (void)
12029 {
12030
12031 #ifndef _XOPEN_SOURCE
12032 #error _XOPEN_SOURCE is not defined
12033 #endif
12034
12035   ;
12036   return 0;
12037 }
12038 _ACEOF
12039 rm -f "conftest.$ac_objext"
12040 if { (eval echo "$as_me:12040: \"$ac_compile\"") >&5
12041   (eval $ac_compile) 2>&5
12042   ac_status=$?
12043   echo "$as_me:12043: \$? = $ac_status" >&5
12044   (exit "$ac_status"); } &&
12045          { ac_try='test -s "conftest.$ac_objext"'
12046   { (eval echo "$as_me:12046: \"$ac_try\"") >&5
12047   (eval $ac_try) 2>&5
12048   ac_status=$?
12049   echo "$as_me:12049: \$? = $ac_status" >&5
12050   (exit "$ac_status"); }; }; then
12051   cf_cv_xopen_source=no
12052 else
12053   echo "$as_me: failed program was:" >&5
12054 cat "conftest.$ac_ext" >&5
12055 cf_save="$CPPFLAGS"
12056
12057         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12058         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12059
12060          cat >"conftest.$ac_ext" <<_ACEOF
12061 #line 12061 "configure"
12062 #include "confdefs.h"
12063
12064 $ac_includes_default
12065
12066 int
12067 main (void)
12068 {
12069
12070 #ifndef _XOPEN_SOURCE
12071 #error _XOPEN_SOURCE is not defined
12072 #endif
12073
12074   ;
12075   return 0;
12076 }
12077 _ACEOF
12078 rm -f "conftest.$ac_objext"
12079 if { (eval echo "$as_me:12079: \"$ac_compile\"") >&5
12080   (eval $ac_compile) 2>&5
12081   ac_status=$?
12082   echo "$as_me:12082: \$? = $ac_status" >&5
12083   (exit "$ac_status"); } &&
12084          { ac_try='test -s "conftest.$ac_objext"'
12085   { (eval echo "$as_me:12085: \"$ac_try\"") >&5
12086   (eval $ac_try) 2>&5
12087   ac_status=$?
12088   echo "$as_me:12088: \$? = $ac_status" >&5
12089   (exit "$ac_status"); }; }; then
12090   cf_cv_xopen_source=no
12091 else
12092   echo "$as_me: failed program was:" >&5
12093 cat "conftest.$ac_ext" >&5
12094 cf_cv_xopen_source=$cf_XOPEN_SOURCE
12095 fi
12096 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12097                 CPPFLAGS="$cf_save"
12098
12099 fi
12100 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12101
12102 fi
12103 echo "$as_me:12103: result: $cf_cv_xopen_source" >&5
12104 echo "${ECHO_T}$cf_cv_xopen_source" >&6
12105
12106 if test "$cf_cv_xopen_source" != no ; then
12107
12108 CFLAGS=`echo "$CFLAGS" | \
12109         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
12110                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
12111
12112 CPPFLAGS=`echo "$CPPFLAGS" | \
12113         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
12114                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
12115
12116         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
12117
12118 for cf_add_cflags in $cf_temp_xopen_source
12119 do
12120         case "x$cf_add_cflags" in
12121         (x-[DU]*)
12122
12123 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12124 while true
12125 do
12126         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'`
12127         test "$CFLAGS" != "$cf_old_cflag" || break
12128
12129         CFLAGS="$cf_old_cflag"
12130 done
12131
12132 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12133 while true
12134 do
12135         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'`
12136         test "$CPPFLAGS" != "$cf_old_cflag" || break
12137
12138         CPPFLAGS="$cf_old_cflag"
12139 done
12140
12141                 ;;
12142         esac
12143
12144 cf_fix_cppflags=no
12145 cf_new_cflags=
12146 cf_new_cppflags=
12147 cf_new_extra_cppflags=
12148
12149 for cf_add_cflags in $cf_add_cflags
12150 do
12151 case "$cf_fix_cppflags" in
12152 (no)
12153         case "$cf_add_cflags" in
12154         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12155                 case "$cf_add_cflags" in
12156                 (-D*)
12157                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12158
12159                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12160                                 && test -z "${cf_tst_cflags}" \
12161                                 && cf_fix_cppflags=yes
12162
12163                         if test "$cf_fix_cppflags" = yes ; then
12164
12165         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12166         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12167
12168                                 continue
12169                         elif test "${cf_tst_cflags}" = "\"'" ; then
12170
12171         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12172         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12173
12174                                 continue
12175                         fi
12176                         ;;
12177                 esac
12178                 case "$CPPFLAGS" in
12179                 (*$cf_add_cflags)
12180                         ;;
12181                 (*)
12182                         case "$cf_add_cflags" in
12183                         (-D*)
12184                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12185
12186 CPPFLAGS=`echo "$CPPFLAGS" | \
12187         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12188                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12189
12190                                 ;;
12191                         esac
12192
12193         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12194         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12195
12196                         ;;
12197                 esac
12198                 ;;
12199         (*)
12200
12201         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12202         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12203
12204                 ;;
12205         esac
12206         ;;
12207 (yes)
12208
12209         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12210         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12211
12212         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12213
12214         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12215                 && test -z "${cf_tst_cflags}" \
12216                 && cf_fix_cppflags=no
12217         ;;
12218 esac
12219 done
12220
12221 if test -n "$cf_new_cflags" ; then
12222
12223         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12224         CFLAGS="${CFLAGS}$cf_new_cflags"
12225
12226 fi
12227
12228 if test -n "$cf_new_cppflags" ; then
12229
12230         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12231         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12232
12233 fi
12234
12235 if test -n "$cf_new_extra_cppflags" ; then
12236
12237         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12238         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12239
12240 fi
12241
12242 done
12243
12244 fi
12245
12246         fi
12247 fi
12248 fi # cf_cv_posix_visible
12249
12250 CPPFLAGS_after_XOPEN="$CPPFLAGS"
12251
12252 # Work around breakage on OS X
12253
12254 echo "$as_me:12254: checking if SIGWINCH is defined" >&5
12255 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
12256 if test "${cf_cv_define_sigwinch+set}" = set; then
12257   echo $ECHO_N "(cached) $ECHO_C" >&6
12258 else
12259
12260         cat >"conftest.$ac_ext" <<_ACEOF
12261 #line 12261 "configure"
12262 #include "confdefs.h"
12263
12264 #include <sys/types.h>
12265 #include <sys/signal.h>
12266
12267 int
12268 main (void)
12269 {
12270 int x = SIGWINCH; (void)x
12271   ;
12272   return 0;
12273 }
12274 _ACEOF
12275 rm -f "conftest.$ac_objext"
12276 if { (eval echo "$as_me:12276: \"$ac_compile\"") >&5
12277   (eval $ac_compile) 2>&5
12278   ac_status=$?
12279   echo "$as_me:12279: \$? = $ac_status" >&5
12280   (exit "$ac_status"); } &&
12281          { ac_try='test -s "conftest.$ac_objext"'
12282   { (eval echo "$as_me:12282: \"$ac_try\"") >&5
12283   (eval $ac_try) 2>&5
12284   ac_status=$?
12285   echo "$as_me:12285: \$? = $ac_status" >&5
12286   (exit "$ac_status"); }; }; then
12287   cf_cv_define_sigwinch=yes
12288 else
12289   echo "$as_me: failed program was:" >&5
12290 cat "conftest.$ac_ext" >&5
12291 cat >"conftest.$ac_ext" <<_ACEOF
12292 #line 12292 "configure"
12293 #include "confdefs.h"
12294
12295 #undef _XOPEN_SOURCE
12296 #undef _POSIX_SOURCE
12297 #undef _POSIX_C_SOURCE
12298 #include <sys/types.h>
12299 #include <sys/signal.h>
12300
12301 int
12302 main (void)
12303 {
12304 int x = SIGWINCH; (void)x
12305   ;
12306   return 0;
12307 }
12308 _ACEOF
12309 rm -f "conftest.$ac_objext"
12310 if { (eval echo "$as_me:12310: \"$ac_compile\"") >&5
12311   (eval $ac_compile) 2>&5
12312   ac_status=$?
12313   echo "$as_me:12313: \$? = $ac_status" >&5
12314   (exit "$ac_status"); } &&
12315          { ac_try='test -s "conftest.$ac_objext"'
12316   { (eval echo "$as_me:12316: \"$ac_try\"") >&5
12317   (eval $ac_try) 2>&5
12318   ac_status=$?
12319   echo "$as_me:12319: \$? = $ac_status" >&5
12320   (exit "$ac_status"); }; }; then
12321   cf_cv_define_sigwinch=maybe
12322 else
12323   echo "$as_me: failed program was:" >&5
12324 cat "conftest.$ac_ext" >&5
12325 cf_cv_define_sigwinch=no
12326 fi
12327 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12328
12329 fi
12330 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12331
12332 fi
12333 echo "$as_me:12333: result: $cf_cv_define_sigwinch" >&5
12334 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
12335
12336 if test "$cf_cv_define_sigwinch" = maybe ; then
12337 echo "$as_me:12337: checking for actual SIGWINCH definition" >&5
12338 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
12339 if test "${cf_cv_fixup_sigwinch+set}" = set; then
12340   echo $ECHO_N "(cached) $ECHO_C" >&6
12341 else
12342
12343 cf_cv_fixup_sigwinch=unknown
12344 cf_sigwinch=32
12345 while test "$cf_sigwinch" != 1
12346 do
12347         cat >"conftest.$ac_ext" <<_ACEOF
12348 #line 12348 "configure"
12349 #include "confdefs.h"
12350
12351 #undef _XOPEN_SOURCE
12352 #undef _POSIX_SOURCE
12353 #undef _POSIX_C_SOURCE
12354 #include <sys/types.h>
12355 #include <sys/signal.h>
12356
12357 int
12358 main (void)
12359 {
12360
12361 #if SIGWINCH != $cf_sigwinch
12362 #error SIGWINCH is not $cf_sigwinch
12363 #endif
12364 int x = SIGWINCH; (void)x
12365   ;
12366   return 0;
12367 }
12368 _ACEOF
12369 rm -f "conftest.$ac_objext"
12370 if { (eval echo "$as_me:12370: \"$ac_compile\"") >&5
12371   (eval $ac_compile) 2>&5
12372   ac_status=$?
12373   echo "$as_me:12373: \$? = $ac_status" >&5
12374   (exit "$ac_status"); } &&
12375          { ac_try='test -s "conftest.$ac_objext"'
12376   { (eval echo "$as_me:12376: \"$ac_try\"") >&5
12377   (eval $ac_try) 2>&5
12378   ac_status=$?
12379   echo "$as_me:12379: \$? = $ac_status" >&5
12380   (exit "$ac_status"); }; }; then
12381   cf_cv_fixup_sigwinch=$cf_sigwinch
12382          break
12383 else
12384   echo "$as_me: failed program was:" >&5
12385 cat "conftest.$ac_ext" >&5
12386 fi
12387 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12388
12389 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
12390 done
12391
12392 fi
12393 echo "$as_me:12393: result: $cf_cv_fixup_sigwinch" >&5
12394 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
12395
12396         if test "$cf_cv_fixup_sigwinch" != unknown ; then
12397                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
12398         fi
12399 fi
12400
12401 # Checks for CODESET support.
12402
12403 echo "$as_me:12403: checking for nl_langinfo and CODESET" >&5
12404 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
12405 if test "${am_cv_langinfo_codeset+set}" = set; then
12406   echo $ECHO_N "(cached) $ECHO_C" >&6
12407 else
12408   cat >"conftest.$ac_ext" <<_ACEOF
12409 #line 12409 "configure"
12410 #include "confdefs.h"
12411
12412 $ac_includes_default
12413 #include <langinfo.h>
12414 int
12415 main (void)
12416 {
12417 char* cs = nl_langinfo(CODESET); (void)cs
12418   ;
12419   return 0;
12420 }
12421 _ACEOF
12422 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12423 if { (eval echo "$as_me:12423: \"$ac_link\"") >&5
12424   (eval $ac_link) 2>&5
12425   ac_status=$?
12426   echo "$as_me:12426: \$? = $ac_status" >&5
12427   (exit "$ac_status"); } &&
12428          { ac_try='test -s "conftest$ac_exeext"'
12429   { (eval echo "$as_me:12429: \"$ac_try\"") >&5
12430   (eval $ac_try) 2>&5
12431   ac_status=$?
12432   echo "$as_me:12432: \$? = $ac_status" >&5
12433   (exit "$ac_status"); }; }; then
12434   am_cv_langinfo_codeset=yes
12435 else
12436   echo "$as_me: failed program was:" >&5
12437 cat "conftest.$ac_ext" >&5
12438 am_cv_langinfo_codeset=no
12439 fi
12440 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12441
12442 fi
12443 echo "$as_me:12443: result: $am_cv_langinfo_codeset" >&5
12444 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
12445         if test "$am_cv_langinfo_codeset" = yes; then
12446
12447 cat >>confdefs.h <<\EOF
12448 #define HAVE_LANGINFO_CODESET 1
12449 EOF
12450
12451         fi
12452
12453 # use these variables to work around a defect in gcc's fixincludes.
12454 NCURSES_OK_WCHAR_T=
12455 NCURSES_OK_WINT_T=
12456
12457 echo "$as_me:12457: checking if you want wide-character code" >&5
12458 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
12459
12460 # Check whether --enable-widec or --disable-widec was given.
12461 if test "${enable_widec+set}" = set; then
12462   enableval="$enable_widec"
12463   with_widec=$enableval
12464 else
12465   with_widec=$cf_dft_widec
12466 fi;
12467 echo "$as_me:12467: result: $with_widec" >&5
12468 echo "${ECHO_T}$with_widec" >&6
12469
12470 NCURSES_WCWIDTH_GRAPHICS=1
12471
12472 if test "x$with_widec" = xyes ; then
12473         if test "x$disable_lib_suffixes" = xno ; then
12474                 LIB_SUFFIX="w${LIB_SUFFIX}"
12475         fi
12476
12477 cat >>confdefs.h <<\EOF
12478 #define USE_WIDEC_SUPPORT 1
12479 EOF
12480
12481 cat >>confdefs.h <<\EOF
12482 #define NCURSES_WIDECHAR 1
12483 EOF
12484
12485         case "$CPPFLAGS" in
12486         (*_XOPEN_SOURCE=*)
12487                 ;;
12488         (*)
12489                 { echo "$as_me:12489: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&5
12490 echo "$as_me: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&2;}
12491                 # CPPFLAGS="$CPPFLAGS -DNCURSES_WIDECHAR"
12492                 CPPFLAGS_after_XOPEN="$CPPFLAGS_after_XOPEN -DNCURSES_WIDECHAR"
12493                 ;;
12494         esac
12495
12496 for ac_header in \
12497 wchar.h \
12498 wctype.h \
12499
12500 do
12501 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12502 echo "$as_me:12502: checking for $ac_header" >&5
12503 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12504 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12505   echo $ECHO_N "(cached) $ECHO_C" >&6
12506 else
12507   cat >"conftest.$ac_ext" <<_ACEOF
12508 #line 12508 "configure"
12509 #include "confdefs.h"
12510 #include <$ac_header>
12511 _ACEOF
12512 if { (eval echo "$as_me:12512: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12513   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12514   ac_status=$?
12515   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12516   rm -f conftest.er1
12517   cat conftest.err >&5
12518   echo "$as_me:12518: \$? = $ac_status" >&5
12519   (exit "$ac_status"); } >/dev/null; then
12520   if test -s conftest.err; then
12521     ac_cpp_err=$ac_c_preproc_warn_flag
12522   else
12523     ac_cpp_err=
12524   fi
12525 else
12526   ac_cpp_err=yes
12527 fi
12528 if test -z "$ac_cpp_err"; then
12529   eval "$as_ac_Header=yes"
12530 else
12531   echo "$as_me: failed program was:" >&5
12532   cat "conftest.$ac_ext" >&5
12533   eval "$as_ac_Header=no"
12534 fi
12535 rm -f conftest.err "conftest.$ac_ext"
12536 fi
12537 echo "$as_me:12537: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12538 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12539 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12540   cat >>confdefs.h <<EOF
12541 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12542 EOF
12543
12544 fi
12545 done
12546
12547 echo "$as_me:12547: checking if wchar.h can be used as is" >&5
12548 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
12549 if test "${cf_cv_wchar_h_okay+set}" = set; then
12550   echo $ECHO_N "(cached) $ECHO_C" >&6
12551 else
12552
12553 cat >"conftest.$ac_ext" <<_ACEOF
12554 #line 12554 "configure"
12555 #include "confdefs.h"
12556
12557 $ac_includes_default
12558 #ifdef HAVE_WCHAR_H
12559 #include <wchar.h>
12560 #endif
12561 #ifdef HAVE_WCTYPE_H
12562 #include <wctype.h>
12563 #endif
12564
12565 int
12566 main (void)
12567 {
12568
12569         wint_t foo = 0;
12570         int bar = iswpunct(foo)
12571   ;
12572   return 0;
12573 }
12574 _ACEOF
12575 rm -f "conftest.$ac_objext"
12576 if { (eval echo "$as_me:12576: \"$ac_compile\"") >&5
12577   (eval $ac_compile) 2>&5
12578   ac_status=$?
12579   echo "$as_me:12579: \$? = $ac_status" >&5
12580   (exit "$ac_status"); } &&
12581          { ac_try='test -s "conftest.$ac_objext"'
12582   { (eval echo "$as_me:12582: \"$ac_try\"") >&5
12583   (eval $ac_try) 2>&5
12584   ac_status=$?
12585   echo "$as_me:12585: \$? = $ac_status" >&5
12586   (exit "$ac_status"); }; }; then
12587   cf_cv_wchar_h_okay=yes
12588 else
12589   echo "$as_me: failed program was:" >&5
12590 cat "conftest.$ac_ext" >&5
12591 cf_cv_wchar_h_okay=no
12592 fi
12593 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12594 fi
12595 echo "$as_me:12595: result: $cf_cv_wchar_h_okay" >&5
12596 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
12597
12598 if test "$cf_cv_wchar_h_okay" = no
12599 then
12600
12601 echo "$as_me:12601: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
12602 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
12603 cat >"conftest.$ac_ext" <<_ACEOF
12604 #line 12604 "configure"
12605 #include "confdefs.h"
12606 #include <sys/types.h>
12607
12608 int
12609 main (void)
12610 {
12611
12612 #ifndef _XOPEN_SOURCE_EXTENDED
12613 #error _XOPEN_SOURCE_EXTENDED is not defined
12614 #endif
12615   ;
12616   return 0;
12617 }
12618 _ACEOF
12619 rm -f "conftest.$ac_objext"
12620 if { (eval echo "$as_me:12620: \"$ac_compile\"") >&5
12621   (eval $ac_compile) 2>&5
12622   ac_status=$?
12623   echo "$as_me:12623: \$? = $ac_status" >&5
12624   (exit "$ac_status"); } &&
12625          { ac_try='test -s "conftest.$ac_objext"'
12626   { (eval echo "$as_me:12626: \"$ac_try\"") >&5
12627   (eval $ac_try) 2>&5
12628   ac_status=$?
12629   echo "$as_me:12629: \$? = $ac_status" >&5
12630   (exit "$ac_status"); }; }; then
12631   cf_result=no
12632 else
12633   echo "$as_me: failed program was:" >&5
12634 cat "conftest.$ac_ext" >&5
12635 cf_result=yes
12636 fi
12637 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12638 echo "$as_me:12638: result: $cf_result" >&5
12639 echo "${ECHO_T}$cf_result" >&6
12640
12641 if test "$cf_result" = yes ; then
12642         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
12643 elif test "x" != "x" ; then
12644         echo "$as_me:12644: checking checking for compatible value versus " >&5
12645 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
12646         cat >"conftest.$ac_ext" <<_ACEOF
12647 #line 12647 "configure"
12648 #include "confdefs.h"
12649 #include <sys/types.h>
12650
12651 int
12652 main (void)
12653 {
12654
12655 #if _XOPEN_SOURCE_EXTENDED- < 0
12656 #error _XOPEN_SOURCE_EXTENDED- is negative
12657 #endif
12658   ;
12659   return 0;
12660 }
12661 _ACEOF
12662 rm -f "conftest.$ac_objext"
12663 if { (eval echo "$as_me:12663: \"$ac_compile\"") >&5
12664   (eval $ac_compile) 2>&5
12665   ac_status=$?
12666   echo "$as_me:12666: \$? = $ac_status" >&5
12667   (exit "$ac_status"); } &&
12668          { ac_try='test -s "conftest.$ac_objext"'
12669   { (eval echo "$as_me:12669: \"$ac_try\"") >&5
12670   (eval $ac_try) 2>&5
12671   ac_status=$?
12672   echo "$as_me:12672: \$? = $ac_status" >&5
12673   (exit "$ac_status"); }; }; then
12674   cf_result=yes
12675 else
12676   echo "$as_me: failed program was:" >&5
12677 cat "conftest.$ac_ext" >&5
12678 cf_result=no
12679 fi
12680 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12681         echo "$as_me:12681: result: $cf_result" >&5
12682 echo "${ECHO_T}$cf_result" >&6
12683         if test "$cf_result" = no ; then
12684                 # perhaps we can override it - try...
12685                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
12686         fi
12687 fi
12688
12689 fi
12690
12691 echo "$as_me:12691: checking if wcwidth agrees graphics are single-width" >&5
12692 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
12693 if test "${cf_cv_wcwidth_graphics+set}" = set; then
12694   echo $ECHO_N "(cached) $ECHO_C" >&6
12695 else
12696
12697 cat >conftest.in <<CF_EOF
12698 -       VT100 symbols
12699 0x250c  upper left corner
12700 0x2514  lower left corner
12701 0x2510  upper right corner
12702 0x2518  lower right corner
12703 0x251c  tee pointing left
12704 0x2524  tee pointing right
12705 0x2534  tee pointing up
12706 0x252c  tee pointing down
12707 0x2500  horizontal line
12708 0x2502  vertical line
12709 0x253c  large plus or crossover
12710 0x23ba  scan line 1
12711 0x23bd  scan line 9
12712 0x25c6  diamond
12713 0x2592  checker board (stipple)
12714 0x00b0  degree symbol
12715 0x00b1  plus/minus
12716 0x00b7  bullet
12717 -       Teletype 5410v1 symbols
12718 0x2190  arrow pointing left
12719 0x2192  arrow pointing right
12720 0x2193  arrow pointing down
12721 0x2191  arrow pointing up
12722 0x2592  board of squares
12723 0x2603  lantern symbol
12724 0x25ae  solid square block
12725 -       these defaults were invented for ncurses
12726 0x23bb  scan line 3
12727 0x23bc  scan line 7
12728 0x2264  less-than-or-equal-to
12729 0x2265  greater-than-or-equal-to
12730 0x03c0  greek pi
12731 0x2260  not-equal
12732 0x00a3  pound-sterling symbol
12733 -       thick-line-drawing
12734 0x250f  upper left corner
12735 0x2517  lower left corner
12736 0x2513  upper right corner
12737 0x251b  lower right corner
12738 0x2523  tee pointing left
12739 0x252b  tee pointing right
12740 0x253b  tee pointing up
12741 0x2533  tee pointing down
12742 0x2501  horizontal line
12743 0x2503  vertical line
12744 0x254b  large plus or crossover
12745 -       double-line-drawing
12746 0x2554  upper left corner
12747 0x255a  lower left corner
12748 0x2557  upper right corner
12749 0x255d  lower right corner
12750 0x2563  tee pointing left
12751 0x2560  tee pointing right
12752 0x2569  tee pointing up
12753 0x2566  tee pointing down
12754 0x2550  horizontal line
12755 0x2551  vertical line
12756 0x256c  large plus or crossover
12757 CF_EOF
12758 if test "$cross_compiling" = yes; then
12759   cf_cv_wcwidth_graphics=unknown
12760 else
12761   cat >"conftest.$ac_ext" <<_ACEOF
12762 #line 12762 "configure"
12763 #include "confdefs.h"
12764
12765 $ac_includes_default
12766
12767 #include <locale.h>
12768 #include <wchar.h>
12769
12770 #define MY_LEN 80
12771
12772 int
12773 main(void)
12774 {
12775         FILE *fp;
12776         int value;
12777         char buffer[MY_LEN + 1];
12778         char notes[MY_LEN + 1];
12779         int totals = 0;
12780         int passed = 0;
12781
12782         if (setlocale(LC_ALL, "en_US.UTF8") ||
12783                 setlocale(LC_ALL, "en_US.UTF-8") ||
12784                 setlocale(LC_ALL, "en_US.utf8") ||
12785                 setlocale(LC_ALL, "en_US.utf-8")) {
12786                 if ((fp = fopen("conftest.in", "r")) != 0) {
12787                         while (fgets(buffer, MY_LEN, fp) != 0) {
12788                                 if (*buffer == '-') {
12789                                         fprintf(stderr, "\\t%s", buffer);
12790                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
12791                                         ++totals;
12792                                         if (wcwidth(value) == 1)
12793                                                 ++passed;
12794                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
12795                                 } else {
12796                                         fprintf(stderr, "?\\t%s", buffer);
12797                                 }
12798                         }
12799                 }
12800         }
12801         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
12802         return (totals == passed) ? 0 : 1;
12803 }
12804
12805 _ACEOF
12806 rm -f "conftest$ac_exeext"
12807 if { (eval echo "$as_me:12807: \"$ac_link\"") >&5
12808   (eval $ac_link) 2>&5
12809   ac_status=$?
12810   echo "$as_me:12810: \$? = $ac_status" >&5
12811   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12812   { (eval echo "$as_me:12812: \"$ac_try\"") >&5
12813   (eval $ac_try) 2>&5
12814   ac_status=$?
12815   echo "$as_me:12815: \$? = $ac_status" >&5
12816   (exit "$ac_status"); }; }; then
12817   cf_cv_wcwidth_graphics=yes
12818 else
12819   echo "$as_me: program exited with status $ac_status" >&5
12820 echo "$as_me: failed program was:" >&5
12821 cat "conftest.$ac_ext" >&5
12822 cf_cv_wcwidth_graphics=no
12823 fi
12824 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12825 fi
12826
12827 fi
12828 echo "$as_me:12828: result: $cf_cv_wcwidth_graphics" >&5
12829 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
12830
12831         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
12832
12833         # with_overwrite=no
12834         NCURSES_CH_T=cchar_t
12835
12836 for ac_func in putwc btowc wctob wmemchr mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
12837 do
12838 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12839 echo "$as_me:12839: checking for $ac_func" >&5
12840 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12841 if eval "test \"\${$as_ac_var+set}\" = set"; then
12842   echo $ECHO_N "(cached) $ECHO_C" >&6
12843 else
12844   cat >"conftest.$ac_ext" <<_ACEOF
12845 #line 12845 "configure"
12846 #include "confdefs.h"
12847 #define $ac_func autoconf_temporary
12848 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
12849 #undef $ac_func
12850
12851 #ifdef __cplusplus
12852 extern "C"
12853 #endif
12854
12855 /* We use char because int might match the return type of a gcc2
12856    builtin and then its argument prototype would still apply.  */
12857 char $ac_func (void);
12858
12859 int
12860 main (void)
12861 {
12862
12863 /* The GNU C library defines stubs for functions which it implements
12864     to always fail with ENOSYS.  Some functions are actually named
12865     something starting with __ and the normal name is an alias.  */
12866 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12867 #error found stub for $ac_func
12868 #endif
12869
12870         return $ac_func ();
12871   ;
12872   return 0;
12873 }
12874 _ACEOF
12875 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12876 if { (eval echo "$as_me:12876: \"$ac_link\"") >&5
12877   (eval $ac_link) 2>&5
12878   ac_status=$?
12879   echo "$as_me:12879: \$? = $ac_status" >&5
12880   (exit "$ac_status"); } &&
12881          { ac_try='test -s "conftest$ac_exeext"'
12882   { (eval echo "$as_me:12882: \"$ac_try\"") >&5
12883   (eval $ac_try) 2>&5
12884   ac_status=$?
12885   echo "$as_me:12885: \$? = $ac_status" >&5
12886   (exit "$ac_status"); }; }; then
12887   eval "$as_ac_var=yes"
12888 else
12889   echo "$as_me: failed program was:" >&5
12890 cat "conftest.$ac_ext" >&5
12891 eval "$as_ac_var=no"
12892 fi
12893 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12894 fi
12895 echo "$as_me:12895: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12896 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12897 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12898   cat >>confdefs.h <<EOF
12899 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12900 EOF
12901
12902 fi
12903 done
12904
12905         if test "x$ac_cv_func_putwc" != xyes ; then
12906
12907 for ac_header in wchar.h
12908 do
12909 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12910 echo "$as_me:12910: checking for $ac_header" >&5
12911 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12912 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12913   echo $ECHO_N "(cached) $ECHO_C" >&6
12914 else
12915   cat >"conftest.$ac_ext" <<_ACEOF
12916 #line 12916 "configure"
12917 #include "confdefs.h"
12918 #include <$ac_header>
12919 _ACEOF
12920 if { (eval echo "$as_me:12920: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12921   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12922   ac_status=$?
12923   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12924   rm -f conftest.er1
12925   cat conftest.err >&5
12926   echo "$as_me:12926: \$? = $ac_status" >&5
12927   (exit "$ac_status"); } >/dev/null; then
12928   if test -s conftest.err; then
12929     ac_cpp_err=$ac_c_preproc_warn_flag
12930   else
12931     ac_cpp_err=
12932   fi
12933 else
12934   ac_cpp_err=yes
12935 fi
12936 if test -z "$ac_cpp_err"; then
12937   eval "$as_ac_Header=yes"
12938 else
12939   echo "$as_me: failed program was:" >&5
12940   cat "conftest.$ac_ext" >&5
12941   eval "$as_ac_Header=no"
12942 fi
12943 rm -f conftest.err "conftest.$ac_ext"
12944 fi
12945 echo "$as_me:12945: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12946 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12947 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12948   cat >>confdefs.h <<EOF
12949 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12950 EOF
12951
12952 fi
12953 done
12954
12955 echo "$as_me:12955: checking for multibyte character support" >&5
12956 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12957 if test "${cf_cv_utf8_lib+set}" = set; then
12958   echo $ECHO_N "(cached) $ECHO_C" >&6
12959 else
12960
12961         cf_save_LIBS="$LIBS"
12962         cat >"conftest.$ac_ext" <<_ACEOF
12963 #line 12963 "configure"
12964 #include "confdefs.h"
12965
12966 $ac_includes_default
12967 #ifdef HAVE_WCHAR_H
12968 #include <wchar.h>
12969 #endif
12970
12971 int
12972 main (void)
12973 {
12974 putwc(0,0);
12975   ;
12976   return 0;
12977 }
12978 _ACEOF
12979 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12980 if { (eval echo "$as_me:12980: \"$ac_link\"") >&5
12981   (eval $ac_link) 2>&5
12982   ac_status=$?
12983   echo "$as_me:12983: \$? = $ac_status" >&5
12984   (exit "$ac_status"); } &&
12985          { ac_try='test -s "conftest$ac_exeext"'
12986   { (eval echo "$as_me:12986: \"$ac_try\"") >&5
12987   (eval $ac_try) 2>&5
12988   ac_status=$?
12989   echo "$as_me:12989: \$? = $ac_status" >&5
12990   (exit "$ac_status"); }; }; then
12991   cf_cv_utf8_lib=yes
12992 else
12993   echo "$as_me: failed program was:" >&5
12994 cat "conftest.$ac_ext" >&5
12995
12996 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12997 # will be set on completion of the AC_TRY_LINK below.
12998 cf_cv_header_path_utf8=
12999 cf_cv_library_path_utf8=
13000
13001 echo "${as_me:-configure}:13001: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
13002
13003 cf_save_LIBS="$LIBS"
13004
13005 cat >"conftest.$ac_ext" <<_ACEOF
13006 #line 13006 "configure"
13007 #include "confdefs.h"
13008
13009 #include <libutf8.h>
13010 int
13011 main (void)
13012 {
13013 putwc(0,0);
13014   ;
13015   return 0;
13016 }
13017 _ACEOF
13018 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13019 if { (eval echo "$as_me:13019: \"$ac_link\"") >&5
13020   (eval $ac_link) 2>&5
13021   ac_status=$?
13022   echo "$as_me:13022: \$? = $ac_status" >&5
13023   (exit "$ac_status"); } &&
13024          { ac_try='test -s "conftest$ac_exeext"'
13025   { (eval echo "$as_me:13025: \"$ac_try\"") >&5
13026   (eval $ac_try) 2>&5
13027   ac_status=$?
13028   echo "$as_me:13028: \$? = $ac_status" >&5
13029   (exit "$ac_status"); }; }; then
13030
13031         cf_cv_find_linkage_utf8=yes
13032         cf_cv_header_path_utf8=/usr/include
13033         cf_cv_library_path_utf8=/usr/lib
13034
13035 else
13036   echo "$as_me: failed program was:" >&5
13037 cat "conftest.$ac_ext" >&5
13038
13039 LIBS="-lutf8  $cf_save_LIBS"
13040
13041 cat >"conftest.$ac_ext" <<_ACEOF
13042 #line 13042 "configure"
13043 #include "confdefs.h"
13044
13045 #include <libutf8.h>
13046 int
13047 main (void)
13048 {
13049 putwc(0,0);
13050   ;
13051   return 0;
13052 }
13053 _ACEOF
13054 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13055 if { (eval echo "$as_me:13055: \"$ac_link\"") >&5
13056   (eval $ac_link) 2>&5
13057   ac_status=$?
13058   echo "$as_me:13058: \$? = $ac_status" >&5
13059   (exit "$ac_status"); } &&
13060          { ac_try='test -s "conftest$ac_exeext"'
13061   { (eval echo "$as_me:13061: \"$ac_try\"") >&5
13062   (eval $ac_try) 2>&5
13063   ac_status=$?
13064   echo "$as_me:13064: \$? = $ac_status" >&5
13065   (exit "$ac_status"); }; }; then
13066
13067         cf_cv_find_linkage_utf8=yes
13068         cf_cv_header_path_utf8=/usr/include
13069         cf_cv_library_path_utf8=/usr/lib
13070         cf_cv_library_file_utf8="-lutf8"
13071
13072 else
13073   echo "$as_me: failed program was:" >&5
13074 cat "conftest.$ac_ext" >&5
13075
13076         cf_cv_find_linkage_utf8=no
13077         LIBS="$cf_save_LIBS"
13078
13079         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
13080
13081 echo "${as_me:-configure}:13081: testing find linkage for utf8 library ..." 1>&5
13082
13083 echo "${as_me:-configure}:13083: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
13084
13085         cf_save_CPPFLAGS="$CPPFLAGS"
13086         cf_test_CPPFLAGS="$CPPFLAGS"
13087
13088 cf_search=
13089
13090 # collect the current set of include-directories from compiler flags
13091 cf_header_path_list=""
13092 if test -n "${CFLAGS}${CPPFLAGS}" ; then
13093         for cf_header_path in $CPPFLAGS $CFLAGS
13094         do
13095                 case "$cf_header_path" in
13096                 (-I*)
13097                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
13098
13099 test "x$cf_header_path" != "xNONE" && \
13100 test -d "$cf_header_path" && \
13101  {
13102         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
13103         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
13104         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
13105         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
13106         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
13107         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
13108 }
13109
13110                         cf_header_path_list="$cf_header_path_list $cf_search"
13111                         ;;
13112                 esac
13113         done
13114 fi
13115
13116 # add the variations for the package we are looking for
13117
13118 cf_search=
13119
13120 test "x$prefix" != "xNONE" && \
13121 test -d "$prefix" && \
13122  {
13123         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
13124         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
13125         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
13126         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
13127         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
13128         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
13129 }
13130
13131 for cf_subdir_prefix in \
13132         /usr \
13133         /usr/local \
13134         /usr/pkg \
13135         /opt \
13136         /opt/local \
13137         $HOME
13138 do
13139
13140 test "x$cf_subdir_prefix" != "x$prefix" && \
13141 test -d "$cf_subdir_prefix" && \
13142 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13143         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
13144         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
13145         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
13146         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
13147         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
13148         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
13149 }
13150
13151 done
13152
13153 test "$includedir" != NONE && \
13154 test "$includedir" != "/usr/include" && \
13155 test -d "$includedir" && {
13156         test -d "$includedir" &&    cf_search="$cf_search $includedir"
13157         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
13158 }
13159
13160 test "$oldincludedir" != NONE && \
13161 test "$oldincludedir" != "/usr/include" && \
13162 test -d "$oldincludedir" && {
13163         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
13164         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
13165 }
13166
13167 cf_search="$cf_search $cf_header_path_list"
13168
13169         for cf_cv_header_path_utf8 in $cf_search
13170         do
13171                 if test -d "$cf_cv_header_path_utf8" ; then
13172                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
13173
13174 echo "${as_me:-configure}:13174: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
13175
13176                         CPPFLAGS="$cf_save_CPPFLAGS"
13177
13178         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13179         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
13180
13181                         cat >"conftest.$ac_ext" <<_ACEOF
13182 #line 13182 "configure"
13183 #include "confdefs.h"
13184
13185 #include <libutf8.h>
13186 int
13187 main (void)
13188 {
13189 putwc(0,0);
13190   ;
13191   return 0;
13192 }
13193 _ACEOF
13194 rm -f "conftest.$ac_objext"
13195 if { (eval echo "$as_me:13195: \"$ac_compile\"") >&5
13196   (eval $ac_compile) 2>&5
13197   ac_status=$?
13198   echo "$as_me:13198: \$? = $ac_status" >&5
13199   (exit "$ac_status"); } &&
13200          { ac_try='test -s "conftest.$ac_objext"'
13201   { (eval echo "$as_me:13201: \"$ac_try\"") >&5
13202   (eval $ac_try) 2>&5
13203   ac_status=$?
13204   echo "$as_me:13204: \$? = $ac_status" >&5
13205   (exit "$ac_status"); }; }; then
13206
13207                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
13208
13209 echo "${as_me:-configure}:13209: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
13210
13211                                 cf_cv_find_linkage_utf8=maybe
13212                                 cf_test_CPPFLAGS="$CPPFLAGS"
13213                                 break
13214 else
13215   echo "$as_me: failed program was:" >&5
13216 cat "conftest.$ac_ext" >&5
13217
13218                                 CPPFLAGS="$cf_save_CPPFLAGS"
13219
13220 fi
13221 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13222                 fi
13223         done
13224
13225         if test "$cf_cv_find_linkage_utf8" = maybe ; then
13226
13227 echo "${as_me:-configure}:13227: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
13228
13229                 cf_save_LIBS="$LIBS"
13230                 cf_save_LDFLAGS="$LDFLAGS"
13231
13232                 if test "$cf_cv_find_linkage_utf8" != yes ; then
13233
13234 cf_search=
13235 cf_library_path_list=""
13236 if test -n "${LDFLAGS}${LIBS}" ; then
13237         for cf_library_path in $LDFLAGS $LIBS
13238         do
13239                 case "$cf_library_path" in
13240                 (-L*)
13241                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
13242
13243 test "x$cf_library_path" != "xNONE" && \
13244 test -d "$cf_library_path" && \
13245  {
13246         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
13247         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
13248         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
13249         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
13250         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
13251         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
13252 }
13253
13254                         cf_library_path_list="$cf_library_path_list $cf_search"
13255                         ;;
13256                 esac
13257         done
13258 fi
13259
13260 cf_search=
13261
13262 test "x$prefix" != "xNONE" && \
13263 test -d "$prefix" && \
13264  {
13265         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
13266         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
13267         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
13268         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
13269         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
13270         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
13271 }
13272
13273 for cf_subdir_prefix in \
13274         /usr \
13275         /usr/local \
13276         /usr/pkg \
13277         /opt \
13278         /opt/local \
13279         $HOME
13280 do
13281
13282 test "x$cf_subdir_prefix" != "x$prefix" && \
13283 test -d "$cf_subdir_prefix" && \
13284 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13285         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
13286         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
13287         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
13288         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
13289         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
13290         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
13291 }
13292
13293 done
13294
13295 cf_search="$cf_library_path_list $cf_search"
13296
13297                         for cf_cv_library_path_utf8 in $cf_search
13298                         do
13299                                 if test -d "$cf_cv_library_path_utf8" ; then
13300                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
13301
13302 echo "${as_me:-configure}:13302: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
13303
13304                                         CPPFLAGS="$cf_test_CPPFLAGS"
13305                                         LIBS="-lutf8  $cf_save_LIBS"
13306                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
13307                                         cat >"conftest.$ac_ext" <<_ACEOF
13308 #line 13308 "configure"
13309 #include "confdefs.h"
13310
13311 #include <libutf8.h>
13312 int
13313 main (void)
13314 {
13315 putwc(0,0);
13316   ;
13317   return 0;
13318 }
13319 _ACEOF
13320 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13321 if { (eval echo "$as_me:13321: \"$ac_link\"") >&5
13322   (eval $ac_link) 2>&5
13323   ac_status=$?
13324   echo "$as_me:13324: \$? = $ac_status" >&5
13325   (exit "$ac_status"); } &&
13326          { ac_try='test -s "conftest$ac_exeext"'
13327   { (eval echo "$as_me:13327: \"$ac_try\"") >&5
13328   (eval $ac_try) 2>&5
13329   ac_status=$?
13330   echo "$as_me:13330: \$? = $ac_status" >&5
13331   (exit "$ac_status"); }; }; then
13332
13333                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
13334
13335 echo "${as_me:-configure}:13335: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
13336
13337                                         cf_cv_find_linkage_utf8=yes
13338                                         cf_cv_library_file_utf8="-lutf8"
13339                                         break
13340 else
13341   echo "$as_me: failed program was:" >&5
13342 cat "conftest.$ac_ext" >&5
13343
13344                                         CPPFLAGS="$cf_save_CPPFLAGS"
13345                                         LIBS="$cf_save_LIBS"
13346                                         LDFLAGS="$cf_save_LDFLAGS"
13347
13348 fi
13349 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13350                                 fi
13351                         done
13352                         CPPFLAGS="$cf_save_CPPFLAGS"
13353                         LDFLAGS="$cf_save_LDFLAGS"
13354                 fi
13355
13356         else
13357                 cf_cv_find_linkage_utf8=no
13358         fi
13359
13360 fi
13361 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13362
13363 fi
13364 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13365
13366 LIBS="$cf_save_LIBS"
13367
13368 if test "$cf_cv_find_linkage_utf8" = yes ; then
13369 cf_cv_utf8_lib=add-on
13370 else
13371 cf_cv_utf8_lib=no
13372 fi
13373
13374 fi
13375 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13376 fi
13377 echo "$as_me:13377: result: $cf_cv_utf8_lib" >&5
13378 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
13379
13380 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
13381 # ncurses/ncursesw:
13382 if test "$cf_cv_utf8_lib" = "add-on" ; then
13383
13384 cat >>confdefs.h <<\EOF
13385 #define HAVE_LIBUTF8_H 1
13386 EOF
13387
13388 if test -n "$cf_cv_header_path_utf8" ; then
13389   for cf_add_incdir in $cf_cv_header_path_utf8
13390   do
13391         while test "$cf_add_incdir" != /usr/include
13392         do
13393           if test -d "$cf_add_incdir"
13394           then
13395                 cf_have_incdir=no
13396                 if test -n "$CFLAGS$CPPFLAGS" ; then
13397                   # a loop is needed to ensure we can add subdirs of existing dirs
13398                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13399                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13400                           cf_have_incdir=yes; break
13401                         fi
13402                   done
13403                 fi
13404
13405                 if test "$cf_have_incdir" = no ; then
13406                   if test "$cf_add_incdir" = /usr/local/include ; then
13407                         if test "$GCC" = yes
13408                         then
13409                           cf_save_CPPFLAGS=$CPPFLAGS
13410
13411         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13412         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
13413
13414                           cat >"conftest.$ac_ext" <<_ACEOF
13415 #line 13415 "configure"
13416 #include "confdefs.h"
13417 #include <stdio.h>
13418 int
13419 main (void)
13420 {
13421 printf("Hello")
13422   ;
13423   return 0;
13424 }
13425 _ACEOF
13426 rm -f "conftest.$ac_objext"
13427 if { (eval echo "$as_me:13427: \"$ac_compile\"") >&5
13428   (eval $ac_compile) 2>&5
13429   ac_status=$?
13430   echo "$as_me:13430: \$? = $ac_status" >&5
13431   (exit "$ac_status"); } &&
13432          { ac_try='test -s "conftest.$ac_objext"'
13433   { (eval echo "$as_me:13433: \"$ac_try\"") >&5
13434   (eval $ac_try) 2>&5
13435   ac_status=$?
13436   echo "$as_me:13436: \$? = $ac_status" >&5
13437   (exit "$ac_status"); }; }; then
13438   :
13439 else
13440   echo "$as_me: failed program was:" >&5
13441 cat "conftest.$ac_ext" >&5
13442 cf_have_incdir=yes
13443 fi
13444 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13445                           CPPFLAGS=$cf_save_CPPFLAGS
13446                         fi
13447                   fi
13448                 fi
13449
13450                 if test "$cf_have_incdir" = no ; then
13451                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
13452
13453 echo "${as_me:-configure}:13453: testing adding $cf_add_incdir to include-path ..." 1>&5
13454
13455                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13456
13457                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
13458                   test "$cf_top_incdir" = "$cf_add_incdir" && break
13459                   cf_add_incdir="$cf_top_incdir"
13460                 else
13461                   break
13462                 fi
13463           else
13464                 break
13465           fi
13466         done
13467   done
13468 fi
13469
13470 if test -n "$cf_cv_library_path_utf8" ; then
13471         for cf_add_libdir in $cf_cv_library_path_utf8
13472         do
13473                 if test "$cf_add_libdir" = /usr/lib ; then
13474                         :
13475                 elif test -d "$cf_add_libdir"
13476                 then
13477                         cf_have_libdir=no
13478                         if test -n "$LDFLAGS$LIBS" ; then
13479                                 # a loop is needed to ensure we can add subdirs of existing dirs
13480                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
13481                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13482                                                 cf_have_libdir=yes; break
13483                                         fi
13484                                 done
13485                         fi
13486                         if test "$cf_have_libdir" = no ; then
13487                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
13488
13489 echo "${as_me:-configure}:13489: testing adding $cf_add_libdir to library-path ..." 1>&5
13490
13491                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13492                         fi
13493                 fi
13494         done
13495 fi
13496
13497 cf_add_libs="$LIBS"
13498 # reverse order
13499 cf_add_0lib=
13500 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13501 # filter duplicates
13502 for cf_add_1lib in $cf_add_0lib; do
13503         for cf_add_2lib in $cf_add_libs; do
13504                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13505                         cf_add_1lib=
13506                         break
13507                 fi
13508         done
13509         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13510 done
13511 LIBS="$cf_add_libs"
13512
13513 fi
13514
13515                 if test "$cf_cv_utf8_lib" != no ; then
13516                         NCURSES_LIBUTF8=1
13517                 fi
13518         fi
13519
13520 # This is needed on Tru64 5.0 to declare mbstate_t
13521 echo "$as_me:13521: checking if we must include wchar.h to declare mbstate_t" >&5
13522 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
13523 if test "${cf_cv_mbstate_t+set}" = set; then
13524   echo $ECHO_N "(cached) $ECHO_C" >&6
13525 else
13526
13527 cat >"conftest.$ac_ext" <<_ACEOF
13528 #line 13528 "configure"
13529 #include "confdefs.h"
13530
13531 #include <stdlib.h>
13532 #include <stdarg.h>
13533 #include <stdio.h>
13534 #ifdef HAVE_LIBUTF8_H
13535 #include <libutf8.h>
13536 #endif
13537 int
13538 main (void)
13539 {
13540 mbstate_t state
13541   ;
13542   return 0;
13543 }
13544 _ACEOF
13545 rm -f "conftest.$ac_objext"
13546 if { (eval echo "$as_me:13546: \"$ac_compile\"") >&5
13547   (eval $ac_compile) 2>&5
13548   ac_status=$?
13549   echo "$as_me:13549: \$? = $ac_status" >&5
13550   (exit "$ac_status"); } &&
13551          { ac_try='test -s "conftest.$ac_objext"'
13552   { (eval echo "$as_me:13552: \"$ac_try\"") >&5
13553   (eval $ac_try) 2>&5
13554   ac_status=$?
13555   echo "$as_me:13555: \$? = $ac_status" >&5
13556   (exit "$ac_status"); }; }; then
13557   cf_cv_mbstate_t=no
13558 else
13559   echo "$as_me: failed program was:" >&5
13560 cat "conftest.$ac_ext" >&5
13561 cat >"conftest.$ac_ext" <<_ACEOF
13562 #line 13562 "configure"
13563 #include "confdefs.h"
13564
13565 #include <stdlib.h>
13566 #include <stdarg.h>
13567 #include <stdio.h>
13568 #include <wchar.h>
13569 #ifdef HAVE_LIBUTF8_H
13570 #include <libutf8.h>
13571 #endif
13572 int
13573 main (void)
13574 {
13575 mbstate_t value
13576   ;
13577   return 0;
13578 }
13579 _ACEOF
13580 rm -f "conftest.$ac_objext"
13581 if { (eval echo "$as_me:13581: \"$ac_compile\"") >&5
13582   (eval $ac_compile) 2>&5
13583   ac_status=$?
13584   echo "$as_me:13584: \$? = $ac_status" >&5
13585   (exit "$ac_status"); } &&
13586          { ac_try='test -s "conftest.$ac_objext"'
13587   { (eval echo "$as_me:13587: \"$ac_try\"") >&5
13588   (eval $ac_try) 2>&5
13589   ac_status=$?
13590   echo "$as_me:13590: \$? = $ac_status" >&5
13591   (exit "$ac_status"); }; }; then
13592   cf_cv_mbstate_t=yes
13593 else
13594   echo "$as_me: failed program was:" >&5
13595 cat "conftest.$ac_ext" >&5
13596 cf_cv_mbstate_t=unknown
13597 fi
13598 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13599 fi
13600 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13601 fi
13602 echo "$as_me:13602: result: $cf_cv_mbstate_t" >&5
13603 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
13604
13605 if test "$cf_cv_mbstate_t" = yes ; then
13606
13607 cat >>confdefs.h <<\EOF
13608 #define NEED_WCHAR_H 1
13609 EOF
13610
13611         NEED_WCHAR_H=1
13612 fi
13613
13614 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
13615 if test "$cf_cv_mbstate_t" = unknown ; then
13616         NCURSES_MBSTATE_T=1
13617 fi
13618
13619 # This is needed on Tru64 5.0 to declare wchar_t
13620 echo "$as_me:13620: checking if we must include wchar.h to declare wchar_t" >&5
13621 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
13622 if test "${cf_cv_wchar_t+set}" = set; then
13623   echo $ECHO_N "(cached) $ECHO_C" >&6
13624 else
13625
13626 cat >"conftest.$ac_ext" <<_ACEOF
13627 #line 13627 "configure"
13628 #include "confdefs.h"
13629
13630 #include <stdlib.h>
13631 #include <stdarg.h>
13632 #include <stdio.h>
13633 #ifdef HAVE_LIBUTF8_H
13634 #include <libutf8.h>
13635 #endif
13636 int
13637 main (void)
13638 {
13639 wchar_t state
13640   ;
13641   return 0;
13642 }
13643 _ACEOF
13644 rm -f "conftest.$ac_objext"
13645 if { (eval echo "$as_me:13645: \"$ac_compile\"") >&5
13646   (eval $ac_compile) 2>&5
13647   ac_status=$?
13648   echo "$as_me:13648: \$? = $ac_status" >&5
13649   (exit "$ac_status"); } &&
13650          { ac_try='test -s "conftest.$ac_objext"'
13651   { (eval echo "$as_me:13651: \"$ac_try\"") >&5
13652   (eval $ac_try) 2>&5
13653   ac_status=$?
13654   echo "$as_me:13654: \$? = $ac_status" >&5
13655   (exit "$ac_status"); }; }; then
13656   cf_cv_wchar_t=no
13657 else
13658   echo "$as_me: failed program was:" >&5
13659 cat "conftest.$ac_ext" >&5
13660 cat >"conftest.$ac_ext" <<_ACEOF
13661 #line 13661 "configure"
13662 #include "confdefs.h"
13663
13664 #include <stdlib.h>
13665 #include <stdarg.h>
13666 #include <stdio.h>
13667 #include <wchar.h>
13668 #ifdef HAVE_LIBUTF8_H
13669 #include <libutf8.h>
13670 #endif
13671 int
13672 main (void)
13673 {
13674 wchar_t value
13675   ;
13676   return 0;
13677 }
13678 _ACEOF
13679 rm -f "conftest.$ac_objext"
13680 if { (eval echo "$as_me:13680: \"$ac_compile\"") >&5
13681   (eval $ac_compile) 2>&5
13682   ac_status=$?
13683   echo "$as_me:13683: \$? = $ac_status" >&5
13684   (exit "$ac_status"); } &&
13685          { ac_try='test -s "conftest.$ac_objext"'
13686   { (eval echo "$as_me:13686: \"$ac_try\"") >&5
13687   (eval $ac_try) 2>&5
13688   ac_status=$?
13689   echo "$as_me:13689: \$? = $ac_status" >&5
13690   (exit "$ac_status"); }; }; then
13691   cf_cv_wchar_t=yes
13692 else
13693   echo "$as_me: failed program was:" >&5
13694 cat "conftest.$ac_ext" >&5
13695 cf_cv_wchar_t=unknown
13696 fi
13697 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13698 fi
13699 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13700 fi
13701 echo "$as_me:13701: result: $cf_cv_wchar_t" >&5
13702 echo "${ECHO_T}$cf_cv_wchar_t" >&6
13703
13704 if test "$cf_cv_wchar_t" = yes ; then
13705
13706 cat >>confdefs.h <<\EOF
13707 #define NEED_WCHAR_H 1
13708 EOF
13709
13710         NEED_WCHAR_H=1
13711 fi
13712
13713 # if we do not find wchar_t in either place, use substitution to provide a fallback.
13714 if test "$cf_cv_wchar_t" = unknown ; then
13715         NCURSES_WCHAR_T=1
13716 fi
13717
13718 # if we find wchar_t in either place, use substitution to provide a fallback.
13719 if test "$cf_cv_wchar_t" != unknown ; then
13720         NCURSES_OK_WCHAR_T=1
13721 fi
13722
13723 # This is needed on Tru64 5.0 to declare wint_t
13724 echo "$as_me:13724: checking if we must include wchar.h to declare wint_t" >&5
13725 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
13726 if test "${cf_cv_wint_t+set}" = set; then
13727   echo $ECHO_N "(cached) $ECHO_C" >&6
13728 else
13729
13730 cat >"conftest.$ac_ext" <<_ACEOF
13731 #line 13731 "configure"
13732 #include "confdefs.h"
13733
13734 #include <stdlib.h>
13735 #include <stdarg.h>
13736 #include <stdio.h>
13737 #ifdef HAVE_LIBUTF8_H
13738 #include <libutf8.h>
13739 #endif
13740 int
13741 main (void)
13742 {
13743 wint_t state
13744   ;
13745   return 0;
13746 }
13747 _ACEOF
13748 rm -f "conftest.$ac_objext"
13749 if { (eval echo "$as_me:13749: \"$ac_compile\"") >&5
13750   (eval $ac_compile) 2>&5
13751   ac_status=$?
13752   echo "$as_me:13752: \$? = $ac_status" >&5
13753   (exit "$ac_status"); } &&
13754          { ac_try='test -s "conftest.$ac_objext"'
13755   { (eval echo "$as_me:13755: \"$ac_try\"") >&5
13756   (eval $ac_try) 2>&5
13757   ac_status=$?
13758   echo "$as_me:13758: \$? = $ac_status" >&5
13759   (exit "$ac_status"); }; }; then
13760   cf_cv_wint_t=no
13761 else
13762   echo "$as_me: failed program was:" >&5
13763 cat "conftest.$ac_ext" >&5
13764 cat >"conftest.$ac_ext" <<_ACEOF
13765 #line 13765 "configure"
13766 #include "confdefs.h"
13767
13768 #include <stdlib.h>
13769 #include <stdarg.h>
13770 #include <stdio.h>
13771 #include <wchar.h>
13772 #ifdef HAVE_LIBUTF8_H
13773 #include <libutf8.h>
13774 #endif
13775 int
13776 main (void)
13777 {
13778 wint_t value
13779   ;
13780   return 0;
13781 }
13782 _ACEOF
13783 rm -f "conftest.$ac_objext"
13784 if { (eval echo "$as_me:13784: \"$ac_compile\"") >&5
13785   (eval $ac_compile) 2>&5
13786   ac_status=$?
13787   echo "$as_me:13787: \$? = $ac_status" >&5
13788   (exit "$ac_status"); } &&
13789          { ac_try='test -s "conftest.$ac_objext"'
13790   { (eval echo "$as_me:13790: \"$ac_try\"") >&5
13791   (eval $ac_try) 2>&5
13792   ac_status=$?
13793   echo "$as_me:13793: \$? = $ac_status" >&5
13794   (exit "$ac_status"); }; }; then
13795   cf_cv_wint_t=yes
13796 else
13797   echo "$as_me: failed program was:" >&5
13798 cat "conftest.$ac_ext" >&5
13799 cf_cv_wint_t=unknown
13800 fi
13801 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13802 fi
13803 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13804 fi
13805 echo "$as_me:13805: result: $cf_cv_wint_t" >&5
13806 echo "${ECHO_T}$cf_cv_wint_t" >&6
13807
13808 if test "$cf_cv_wint_t" = yes ; then
13809
13810 cat >>confdefs.h <<\EOF
13811 #define NEED_WCHAR_H 1
13812 EOF
13813
13814         NEED_WCHAR_H=1
13815 fi
13816
13817 # if we do not find wint_t in either place, use substitution to provide a fallback.
13818 if test "$cf_cv_wint_t" = unknown ; then
13819         NCURSES_WINT_T=1
13820 fi
13821
13822 # if we find wint_t in either place, use substitution to provide a fallback.
13823 if test "$cf_cv_wint_t" != unknown ; then
13824         NCURSES_OK_WINT_T=1
13825 fi
13826
13827         if test "$NCURSES_MBSTATE_T" != 0; then
13828
13829 cat >>confdefs.h <<\EOF
13830 #define NEED_MBSTATE_T_DEF 1
13831 EOF
13832
13833         fi
13834 fi
13835
13836 ###   use option --disable-lp64 to allow long chtype
13837 echo "$as_me:13837: checking whether to enable _LP64 definition in curses.h" >&5
13838 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
13839
13840 # Check whether --enable-lp64 or --disable-lp64 was given.
13841 if test "${enable_lp64+set}" = set; then
13842   enableval="$enable_lp64"
13843   with_lp64=$enableval
13844 else
13845   with_lp64=$cf_dft_with_lp64
13846 fi;
13847 echo "$as_me:13847: result: $with_lp64" >&5
13848 echo "${ECHO_T}$with_lp64" >&6
13849
13850 if test "x$with_lp64" = xyes ; then
13851         cf_cv_enable_lp64=1
13852 else
13853         cf_cv_enable_lp64=0
13854 fi
13855
13856 # Check whether --enable-largefile or --disable-largefile was given.
13857 if test "${enable_largefile+set}" = set; then
13858   enableval="$enable_largefile"
13859
13860 fi;
13861 if test "$enable_largefile" != no; then
13862
13863   echo "$as_me:13863: checking for special C compiler options needed for large files" >&5
13864 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13865 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13866   echo $ECHO_N "(cached) $ECHO_C" >&6
13867 else
13868   ac_cv_sys_largefile_CC=no
13869      if test "$GCC" != yes; then
13870        ac_save_CC=$CC
13871        while :; do
13872          # IRIX 6.2 and later do not support large files by default,
13873          # so use the C compiler's -n32 option if that helps.
13874          cat >"conftest.$ac_ext" <<_ACEOF
13875 #line 13875 "configure"
13876 #include "confdefs.h"
13877 #include <sys/types.h>
13878  /* Check that off_t can represent 2**63 - 1 correctly.
13879     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13880     since some C++ compilers masquerading as C compilers
13881     incorrectly reject 9223372036854775807.  */
13882 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13883   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13884                        && LARGE_OFF_T % 2147483647 == 1)
13885                       ? 1 : -1];
13886 int
13887 main (void)
13888 {
13889
13890   ;
13891   return 0;
13892 }
13893 _ACEOF
13894          rm -f "conftest.$ac_objext"
13895 if { (eval echo "$as_me:13895: \"$ac_compile\"") >&5
13896   (eval $ac_compile) 2>&5
13897   ac_status=$?
13898   echo "$as_me:13898: \$? = $ac_status" >&5
13899   (exit "$ac_status"); } &&
13900          { ac_try='test -s "conftest.$ac_objext"'
13901   { (eval echo "$as_me:13901: \"$ac_try\"") >&5
13902   (eval $ac_try) 2>&5
13903   ac_status=$?
13904   echo "$as_me:13904: \$? = $ac_status" >&5
13905   (exit "$ac_status"); }; }; then
13906   break
13907 else
13908   echo "$as_me: failed program was:" >&5
13909 cat "conftest.$ac_ext" >&5
13910 fi
13911 rm -f "conftest.$ac_objext"
13912          CC="$CC -n32"
13913          rm -f "conftest.$ac_objext"
13914 if { (eval echo "$as_me:13914: \"$ac_compile\"") >&5
13915   (eval $ac_compile) 2>&5
13916   ac_status=$?
13917   echo "$as_me:13917: \$? = $ac_status" >&5
13918   (exit "$ac_status"); } &&
13919          { ac_try='test -s "conftest.$ac_objext"'
13920   { (eval echo "$as_me:13920: \"$ac_try\"") >&5
13921   (eval $ac_try) 2>&5
13922   ac_status=$?
13923   echo "$as_me:13923: \$? = $ac_status" >&5
13924   (exit "$ac_status"); }; }; then
13925   ac_cv_sys_largefile_CC=' -n32'; break
13926 else
13927   echo "$as_me: failed program was:" >&5
13928 cat "conftest.$ac_ext" >&5
13929 fi
13930 rm -f "conftest.$ac_objext"
13931          break
13932        done
13933        CC=$ac_save_CC
13934        rm -f "conftest.$ac_ext"
13935     fi
13936 fi
13937 echo "$as_me:13937: result: $ac_cv_sys_largefile_CC" >&5
13938 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13939   if test "$ac_cv_sys_largefile_CC" != no; then
13940     CC=$CC$ac_cv_sys_largefile_CC
13941   fi
13942
13943   echo "$as_me:13943: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13944 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13945 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13946   echo $ECHO_N "(cached) $ECHO_C" >&6
13947 else
13948   while :; do
13949   ac_cv_sys_file_offset_bits=no
13950   cat >"conftest.$ac_ext" <<_ACEOF
13951 #line 13951 "configure"
13952 #include "confdefs.h"
13953 #include <sys/types.h>
13954  /* Check that off_t can represent 2**63 - 1 correctly.
13955     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13956     since some C++ compilers masquerading as C compilers
13957     incorrectly reject 9223372036854775807.  */
13958 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13959   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13960                        && LARGE_OFF_T % 2147483647 == 1)
13961                       ? 1 : -1];
13962 int
13963 main (void)
13964 {
13965
13966   ;
13967   return 0;
13968 }
13969 _ACEOF
13970 rm -f "conftest.$ac_objext"
13971 if { (eval echo "$as_me:13971: \"$ac_compile\"") >&5
13972   (eval $ac_compile) 2>&5
13973   ac_status=$?
13974   echo "$as_me:13974: \$? = $ac_status" >&5
13975   (exit "$ac_status"); } &&
13976          { ac_try='test -s "conftest.$ac_objext"'
13977   { (eval echo "$as_me:13977: \"$ac_try\"") >&5
13978   (eval $ac_try) 2>&5
13979   ac_status=$?
13980   echo "$as_me:13980: \$? = $ac_status" >&5
13981   (exit "$ac_status"); }; }; then
13982   break
13983 else
13984   echo "$as_me: failed program was:" >&5
13985 cat "conftest.$ac_ext" >&5
13986 fi
13987 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13988   cat >"conftest.$ac_ext" <<_ACEOF
13989 #line 13989 "configure"
13990 #include "confdefs.h"
13991 #define _FILE_OFFSET_BITS 64
13992 #include <sys/types.h>
13993  /* Check that off_t can represent 2**63 - 1 correctly.
13994     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13995     since some C++ compilers masquerading as C compilers
13996     incorrectly reject 9223372036854775807.  */
13997 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13998   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13999                        && LARGE_OFF_T % 2147483647 == 1)
14000                       ? 1 : -1];
14001 int
14002 main (void)
14003 {
14004
14005   ;
14006   return 0;
14007 }
14008 _ACEOF
14009 rm -f "conftest.$ac_objext"
14010 if { (eval echo "$as_me:14010: \"$ac_compile\"") >&5
14011   (eval $ac_compile) 2>&5
14012   ac_status=$?
14013   echo "$as_me:14013: \$? = $ac_status" >&5
14014   (exit "$ac_status"); } &&
14015          { ac_try='test -s "conftest.$ac_objext"'
14016   { (eval echo "$as_me:14016: \"$ac_try\"") >&5
14017   (eval $ac_try) 2>&5
14018   ac_status=$?
14019   echo "$as_me:14019: \$? = $ac_status" >&5
14020   (exit "$ac_status"); }; }; then
14021   ac_cv_sys_file_offset_bits=64; break
14022 else
14023   echo "$as_me: failed program was:" >&5
14024 cat "conftest.$ac_ext" >&5
14025 fi
14026 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14027   break
14028 done
14029 fi
14030 echo "$as_me:14030: result: $ac_cv_sys_file_offset_bits" >&5
14031 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
14032 if test "$ac_cv_sys_file_offset_bits" != no; then
14033
14034 cat >>confdefs.h <<EOF
14035 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14036 EOF
14037
14038 fi
14039 rm -rf conftest*
14040   echo "$as_me:14040: checking for _LARGE_FILES value needed for large files" >&5
14041 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
14042 if test "${ac_cv_sys_large_files+set}" = set; then
14043   echo $ECHO_N "(cached) $ECHO_C" >&6
14044 else
14045   while :; do
14046   ac_cv_sys_large_files=no
14047   cat >"conftest.$ac_ext" <<_ACEOF
14048 #line 14048 "configure"
14049 #include "confdefs.h"
14050 #include <sys/types.h>
14051  /* Check that off_t can represent 2**63 - 1 correctly.
14052     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14053     since some C++ compilers masquerading as C compilers
14054     incorrectly reject 9223372036854775807.  */
14055 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14056   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14057                        && LARGE_OFF_T % 2147483647 == 1)
14058                       ? 1 : -1];
14059 int
14060 main (void)
14061 {
14062
14063   ;
14064   return 0;
14065 }
14066 _ACEOF
14067 rm -f "conftest.$ac_objext"
14068 if { (eval echo "$as_me:14068: \"$ac_compile\"") >&5
14069   (eval $ac_compile) 2>&5
14070   ac_status=$?
14071   echo "$as_me:14071: \$? = $ac_status" >&5
14072   (exit "$ac_status"); } &&
14073          { ac_try='test -s "conftest.$ac_objext"'
14074   { (eval echo "$as_me:14074: \"$ac_try\"") >&5
14075   (eval $ac_try) 2>&5
14076   ac_status=$?
14077   echo "$as_me:14077: \$? = $ac_status" >&5
14078   (exit "$ac_status"); }; }; then
14079   break
14080 else
14081   echo "$as_me: failed program was:" >&5
14082 cat "conftest.$ac_ext" >&5
14083 fi
14084 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14085   cat >"conftest.$ac_ext" <<_ACEOF
14086 #line 14086 "configure"
14087 #include "confdefs.h"
14088 #define _LARGE_FILES 1
14089 #include <sys/types.h>
14090  /* Check that off_t can represent 2**63 - 1 correctly.
14091     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14092     since some C++ compilers masquerading as C compilers
14093     incorrectly reject 9223372036854775807.  */
14094 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14095   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14096                        && LARGE_OFF_T % 2147483647 == 1)
14097                       ? 1 : -1];
14098 int
14099 main (void)
14100 {
14101
14102   ;
14103   return 0;
14104 }
14105 _ACEOF
14106 rm -f "conftest.$ac_objext"
14107 if { (eval echo "$as_me:14107: \"$ac_compile\"") >&5
14108   (eval $ac_compile) 2>&5
14109   ac_status=$?
14110   echo "$as_me:14110: \$? = $ac_status" >&5
14111   (exit "$ac_status"); } &&
14112          { ac_try='test -s "conftest.$ac_objext"'
14113   { (eval echo "$as_me:14113: \"$ac_try\"") >&5
14114   (eval $ac_try) 2>&5
14115   ac_status=$?
14116   echo "$as_me:14116: \$? = $ac_status" >&5
14117   (exit "$ac_status"); }; }; then
14118   ac_cv_sys_large_files=1; break
14119 else
14120   echo "$as_me: failed program was:" >&5
14121 cat "conftest.$ac_ext" >&5
14122 fi
14123 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14124   break
14125 done
14126 fi
14127 echo "$as_me:14127: result: $ac_cv_sys_large_files" >&5
14128 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14129 if test "$ac_cv_sys_large_files" != no; then
14130
14131 cat >>confdefs.h <<EOF
14132 #define _LARGE_FILES $ac_cv_sys_large_files
14133 EOF
14134
14135 fi
14136 rm -rf conftest*
14137 fi
14138
14139         if test "$enable_largefile" != no ; then
14140         echo "$as_me:14140: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14141 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14142 if test "${ac_cv_sys_largefile_source+set}" = set; then
14143   echo $ECHO_N "(cached) $ECHO_C" >&6
14144 else
14145   while :; do
14146   ac_cv_sys_largefile_source=no
14147   cat >"conftest.$ac_ext" <<_ACEOF
14148 #line 14148 "configure"
14149 #include "confdefs.h"
14150 #include <stdio.h>
14151 int
14152 main (void)
14153 {
14154 return !fseeko;
14155   ;
14156   return 0;
14157 }
14158 _ACEOF
14159 rm -f "conftest.$ac_objext"
14160 if { (eval echo "$as_me:14160: \"$ac_compile\"") >&5
14161   (eval $ac_compile) 2>&5
14162   ac_status=$?
14163   echo "$as_me:14163: \$? = $ac_status" >&5
14164   (exit "$ac_status"); } &&
14165          { ac_try='test -s "conftest.$ac_objext"'
14166   { (eval echo "$as_me:14166: \"$ac_try\"") >&5
14167   (eval $ac_try) 2>&5
14168   ac_status=$?
14169   echo "$as_me:14169: \$? = $ac_status" >&5
14170   (exit "$ac_status"); }; }; then
14171   break
14172 else
14173   echo "$as_me: failed program was:" >&5
14174 cat "conftest.$ac_ext" >&5
14175 fi
14176 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14177   cat >"conftest.$ac_ext" <<_ACEOF
14178 #line 14178 "configure"
14179 #include "confdefs.h"
14180 #define _LARGEFILE_SOURCE 1
14181 #include <stdio.h>
14182 int
14183 main (void)
14184 {
14185 return !fseeko;
14186   ;
14187   return 0;
14188 }
14189 _ACEOF
14190 rm -f "conftest.$ac_objext"
14191 if { (eval echo "$as_me:14191: \"$ac_compile\"") >&5
14192   (eval $ac_compile) 2>&5
14193   ac_status=$?
14194   echo "$as_me:14194: \$? = $ac_status" >&5
14195   (exit "$ac_status"); } &&
14196          { ac_try='test -s "conftest.$ac_objext"'
14197   { (eval echo "$as_me:14197: \"$ac_try\"") >&5
14198   (eval $ac_try) 2>&5
14199   ac_status=$?
14200   echo "$as_me:14200: \$? = $ac_status" >&5
14201   (exit "$ac_status"); }; }; then
14202   ac_cv_sys_largefile_source=1; break
14203 else
14204   echo "$as_me: failed program was:" >&5
14205 cat "conftest.$ac_ext" >&5
14206 fi
14207 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14208   break
14209 done
14210 fi
14211 echo "$as_me:14211: result: $ac_cv_sys_largefile_source" >&5
14212 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14213 if test "$ac_cv_sys_largefile_source" != no; then
14214
14215 cat >>confdefs.h <<EOF
14216 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14217 EOF
14218
14219 fi
14220 rm -rf conftest*
14221
14222 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14223 # in glibc 2.1.3, but that breaks too many other things.
14224 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14225 echo "$as_me:14225: checking for fseeko" >&5
14226 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14227 if test "${ac_cv_func_fseeko+set}" = set; then
14228   echo $ECHO_N "(cached) $ECHO_C" >&6
14229 else
14230   cat >"conftest.$ac_ext" <<_ACEOF
14231 #line 14231 "configure"
14232 #include "confdefs.h"
14233 #include <stdio.h>
14234 int
14235 main (void)
14236 {
14237 return fseeko && fseeko (stdin, 0, 0);
14238   ;
14239   return 0;
14240 }
14241 _ACEOF
14242 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14243 if { (eval echo "$as_me:14243: \"$ac_link\"") >&5
14244   (eval $ac_link) 2>&5
14245   ac_status=$?
14246   echo "$as_me:14246: \$? = $ac_status" >&5
14247   (exit "$ac_status"); } &&
14248          { ac_try='test -s "conftest$ac_exeext"'
14249   { (eval echo "$as_me:14249: \"$ac_try\"") >&5
14250   (eval $ac_try) 2>&5
14251   ac_status=$?
14252   echo "$as_me:14252: \$? = $ac_status" >&5
14253   (exit "$ac_status"); }; }; then
14254   ac_cv_func_fseeko=yes
14255 else
14256   echo "$as_me: failed program was:" >&5
14257 cat "conftest.$ac_ext" >&5
14258 ac_cv_func_fseeko=no
14259 fi
14260 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14261 fi
14262 echo "$as_me:14262: result: $ac_cv_func_fseeko" >&5
14263 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14264 if test $ac_cv_func_fseeko = yes; then
14265
14266 cat >>confdefs.h <<\EOF
14267 #define HAVE_FSEEKO 1
14268 EOF
14269
14270 fi
14271
14272         # Normally we would collect these definitions in the config.h,
14273         # but (like _XOPEN_SOURCE), some environments rely on having these
14274         # defined before any of the system headers are included.  Another
14275         # case comes up with C++, e.g., on AIX the compiler compiles the
14276         # header files by themselves before looking at the body files it is
14277         # told to compile.  For ncurses, those header files do not include
14278         # the config.h
14279         if test "$ac_cv_sys_large_files" != no
14280         then
14281
14282         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14283         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14284
14285         fi
14286         if test "$ac_cv_sys_largefile_source" != no
14287         then
14288
14289         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14290         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14291
14292         fi
14293         if test "$ac_cv_sys_file_offset_bits" != no
14294         then
14295
14296         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14297         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14298
14299         fi
14300
14301         echo "$as_me:14301: checking whether to use struct dirent64" >&5
14302 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14303 if test "${cf_cv_struct_dirent64+set}" = set; then
14304   echo $ECHO_N "(cached) $ECHO_C" >&6
14305 else
14306
14307                 cat >"conftest.$ac_ext" <<_ACEOF
14308 #line 14308 "configure"
14309 #include "confdefs.h"
14310
14311 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14312 #include <sys/types.h>
14313 #include <dirent.h>
14314
14315 int
14316 main (void)
14317 {
14318
14319                 /* if transitional largefile support is setup, this is true */
14320                 extern struct dirent64 * readdir(DIR *);
14321                 struct dirent64 *x = readdir((DIR *)0);
14322                 struct dirent *y = readdir((DIR *)0);
14323                 int z = x - y;
14324                 (void)z;
14325
14326   ;
14327   return 0;
14328 }
14329 _ACEOF
14330 rm -f "conftest.$ac_objext"
14331 if { (eval echo "$as_me:14331: \"$ac_compile\"") >&5
14332   (eval $ac_compile) 2>&5
14333   ac_status=$?
14334   echo "$as_me:14334: \$? = $ac_status" >&5
14335   (exit "$ac_status"); } &&
14336          { ac_try='test -s "conftest.$ac_objext"'
14337   { (eval echo "$as_me:14337: \"$ac_try\"") >&5
14338   (eval $ac_try) 2>&5
14339   ac_status=$?
14340   echo "$as_me:14340: \$? = $ac_status" >&5
14341   (exit "$ac_status"); }; }; then
14342   cf_cv_struct_dirent64=yes
14343 else
14344   echo "$as_me: failed program was:" >&5
14345 cat "conftest.$ac_ext" >&5
14346 cf_cv_struct_dirent64=no
14347 fi
14348 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14349
14350 fi
14351 echo "$as_me:14351: result: $cf_cv_struct_dirent64" >&5
14352 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14353         test "$cf_cv_struct_dirent64" = yes &&
14354 cat >>confdefs.h <<\EOF
14355 #define HAVE_STRUCT_DIRENT64 1
14356 EOF
14357
14358         fi
14359
14360 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
14361 echo "$as_me:14361: checking if you want tparm not to use X/Open fixed-parameter list" >&5
14362 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
14363
14364 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
14365 if test "${enable_tparm_varargs+set}" = set; then
14366   enableval="$enable_tparm_varargs"
14367   with_tparm_varargs=$enableval
14368 else
14369   with_tparm_varargs=yes
14370 fi;
14371 echo "$as_me:14371: result: $with_tparm_varargs" >&5
14372 echo "${ECHO_T}$with_tparm_varargs" >&6
14373 NCURSES_TPARM_VARARGS=0
14374 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
14375
14376 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
14377 if test "$with_ticlib" != no ; then
14378 echo "$as_me:14378: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
14379 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
14380
14381 # Check whether --enable-tic-depends or --disable-tic-depends was given.
14382 if test "${enable_tic_depends+set}" = set; then
14383   enableval="$enable_tic_depends"
14384   with_tic_depends=$enableval
14385 else
14386   with_tic_depends=yes
14387 fi;
14388 echo "$as_me:14388: result: $with_tic_depends" >&5
14389 echo "${ECHO_T}$with_tic_depends" >&6
14390 else
14391         with_tic_depends=no
14392 fi
14393
14394 ###   use option --enable-wattr-macros to enable wattr* macros in curses.h
14395 echo "$as_me:14395: checking if you want to enable wattr* macros" >&5
14396 echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6
14397
14398 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
14399 if test "${enable_wattr_macros+set}" = set; then
14400   enableval="$enable_wattr_macros"
14401   with_wattr_macros=$enableval
14402 else
14403   with_wattr_macros=no
14404 fi;
14405 if [ "x$with_wattr_macros" != xyes ]; then
14406         NCURSES_WATTR_MACROS=0
14407         echo "$as_me:14407: result: no" >&5
14408 echo "${ECHO_T}no" >&6
14409 else
14410         NCURSES_WATTR_MACROS=1
14411         echo "$as_me:14411: result: yes" >&5
14412 echo "${ECHO_T}yes" >&6
14413 fi
14414
14415 echo "$as_me:14415: checking for X11 rgb file" >&5
14416 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
14417
14418 # Check whether --with-x11-rgb or --without-x11-rgb was given.
14419 if test "${with_x11_rgb+set}" = set; then
14420   withval="$with_x11_rgb"
14421   RGB_PATH=$withval
14422 else
14423   RGB_PATH=auto
14424 fi;
14425
14426 if test "x$RGB_PATH" = xauto
14427 then
14428         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
14429         for cf_path in \
14430                 /opt/local/share/X11/rgb.txt \
14431                 /opt/X11/share/X11/rgb.txt \
14432                 /usr/share/X11/rgb.txt \
14433                 /usr/X11/share/X11/rgb.txt \
14434                 /usr/X11/lib/X11/rgb.txt \
14435                 /usr/lib/X11/rgb.txt \
14436                 /etc/X11/rgb.txt \
14437                 /usr/pkg/lib/X11/rgb.txt \
14438                 /usr/X11R7/lib/X11/rgb.txt \
14439                 /usr/X11R6/lib/X11/rgb.txt \
14440                 /usr/X11R5/lib/X11/rgb.txt \
14441                 /usr/X11R4/lib/X11/rgb.txt \
14442                 /usr/local/lib/X11/rgb.txt \
14443                 /usr/local/share/X11/rgb.txt \
14444                 /usr/lib64/X11/rgb.txt
14445         do
14446                 if test -f "$cf_path" ; then
14447                         RGB_PATH="$cf_path"
14448                         break
14449                 fi
14450         done
14451 else
14452         cf_path=$RGB_PATH
14453
14454 if test "x$prefix" != xNONE; then
14455         cf_path_syntax="$prefix"
14456 else
14457         cf_path_syntax="$ac_default_prefix"
14458 fi
14459
14460 case ".$cf_path" in
14461 (.\$\(*\)*|.\'*\'*)
14462         ;;
14463 (..|./*|.\\*)
14464         ;;
14465 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
14466         ;;
14467 (.\$\{*prefix\}*|.\$\{*dir\}*)
14468         eval cf_path="$cf_path"
14469         case ".$cf_path" in
14470         (.NONE/*)
14471                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14472                 ;;
14473         esac
14474         ;;
14475 (.no|.NONE/*)
14476         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14477         ;;
14478 (*)
14479         { { echo "$as_me:14479: error: expected a pathname, not \"$cf_path\"" >&5
14480 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
14481    { (exit 1); exit 1; }; }
14482         ;;
14483 esac
14484
14485 fi
14486
14487 echo "$as_me:14487: result: $RGB_PATH" >&5
14488 echo "${ECHO_T}$RGB_PATH" >&6
14489
14490 cat >>confdefs.h <<EOF
14491 #define RGB_PATH "$cf_path"
14492 EOF
14493
14494 no_x11_rgb=
14495 if test "$RGB_PATH" = no
14496 then
14497         no_x11_rgb="#"
14498 fi
14499
14500 ###   use option --with-bool to override bool's type
14501 echo "$as_me:14501: checking for type of bool" >&5
14502 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
14503
14504 # Check whether --with-bool or --without-bool was given.
14505 if test "${with_bool+set}" = set; then
14506   withval="$with_bool"
14507   NCURSES_BOOL="$withval"
14508 else
14509   NCURSES_BOOL=auto
14510 fi;
14511 echo "$as_me:14511: result: $NCURSES_BOOL" >&5
14512 echo "${ECHO_T}$NCURSES_BOOL" >&6
14513
14514 echo "$as_me:14514: checking for alternate terminal capabilities file" >&5
14515 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
14516
14517 # Check whether --with-caps or --without-caps was given.
14518 if test "${with_caps+set}" = set; then
14519   withval="$with_caps"
14520   TERMINFO_CAPS=Caps.$withval
14521 else
14522   TERMINFO_CAPS=Caps
14523 fi;
14524 if test ! -f "${srcdir}/include/${TERMINFO_CAPS}"
14525 then
14526         { echo "$as_me:14526: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&5
14527 echo "$as_me: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&2;}
14528         TERMINFO_CAPS=Caps
14529 fi
14530 echo "$as_me:14530: result: $TERMINFO_CAPS" >&5
14531 echo "${ECHO_T}$TERMINFO_CAPS" >&6
14532
14533 ###   use option --with-chtype to override chtype's type
14534 echo "$as_me:14534: checking for type of chtype" >&5
14535 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14536
14537 # Check whether --with-chtype or --without-chtype was given.
14538 if test "${with_chtype+set}" = set; then
14539   withval="$with_chtype"
14540   NCURSES_CHTYPE="$withval"
14541 else
14542   NCURSES_CHTYPE=$cf_dft_chtype
14543 fi;
14544 echo "$as_me:14544: result: $NCURSES_CHTYPE" >&5
14545 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
14546
14547 ###   use option --with-ospeed to override ospeed's type
14548 echo "$as_me:14548: checking for type of ospeed" >&5
14549 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
14550
14551 # Check whether --with-ospeed or --without-ospeed was given.
14552 if test "${with_ospeed+set}" = set; then
14553   withval="$with_ospeed"
14554   NCURSES_OSPEED="$withval"
14555 else
14556   NCURSES_OSPEED=short
14557 fi;
14558 echo "$as_me:14558: result: $NCURSES_OSPEED" >&5
14559 echo "${ECHO_T}$NCURSES_OSPEED" >&6
14560
14561 ###   use option --with-mmask-t to override mmask_t's type
14562 echo "$as_me:14562: checking for type of mmask_t" >&5
14563 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
14564
14565 # Check whether --with-mmask-t or --without-mmask-t was given.
14566 if test "${with_mmask_t+set}" = set; then
14567   withval="$with_mmask_t"
14568   NCURSES_MMASK_T="$withval"
14569 else
14570   NCURSES_MMASK_T=$cf_dft_mmask_t
14571 fi;
14572 echo "$as_me:14572: result: $NCURSES_MMASK_T" >&5
14573 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
14574
14575 ###   use option --with-ccharw-max to override CCHARW_MAX size
14576 echo "$as_me:14576: checking for size CCHARW_MAX" >&5
14577 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
14578
14579 # Check whether --with-ccharw-max or --without-ccharw-max was given.
14580 if test "${with_ccharw_max+set}" = set; then
14581   withval="$with_ccharw_max"
14582   NCURSES_CCHARW_MAX="$withval"
14583 else
14584   NCURSES_CCHARW_MAX=$cf_dft_ccharw_max
14585 fi;
14586 echo "$as_me:14586: result: $NCURSES_CCHARW_MAX" >&5
14587 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
14588
14589 echo "$as_me:14589: checking for signed char" >&5
14590 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14591 if test "${ac_cv_type_signed_char+set}" = set; then
14592   echo $ECHO_N "(cached) $ECHO_C" >&6
14593 else
14594   cat >"conftest.$ac_ext" <<_ACEOF
14595 #line 14595 "configure"
14596 #include "confdefs.h"
14597 $ac_includes_default
14598 int
14599 main (void)
14600 {
14601 if ((signed char *) 0)
14602   return 0;
14603 if (sizeof (signed char))
14604   return 0;
14605   ;
14606   return 0;
14607 }
14608 _ACEOF
14609 rm -f "conftest.$ac_objext"
14610 if { (eval echo "$as_me:14610: \"$ac_compile\"") >&5
14611   (eval $ac_compile) 2>&5
14612   ac_status=$?
14613   echo "$as_me:14613: \$? = $ac_status" >&5
14614   (exit "$ac_status"); } &&
14615          { ac_try='test -s "conftest.$ac_objext"'
14616   { (eval echo "$as_me:14616: \"$ac_try\"") >&5
14617   (eval $ac_try) 2>&5
14618   ac_status=$?
14619   echo "$as_me:14619: \$? = $ac_status" >&5
14620   (exit "$ac_status"); }; }; then
14621   ac_cv_type_signed_char=yes
14622 else
14623   echo "$as_me: failed program was:" >&5
14624 cat "conftest.$ac_ext" >&5
14625 ac_cv_type_signed_char=no
14626 fi
14627 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14628 fi
14629 echo "$as_me:14629: result: $ac_cv_type_signed_char" >&5
14630 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14631
14632 echo "$as_me:14632: checking size of signed char" >&5
14633 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14634 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14635   echo $ECHO_N "(cached) $ECHO_C" >&6
14636 else
14637   if test "$ac_cv_type_signed_char" = yes; then
14638   if test "$cross_compiling" = yes; then
14639   # Depending upon the size, compute the lo and hi bounds.
14640 cat >"conftest.$ac_ext" <<_ACEOF
14641 #line 14641 "configure"
14642 #include "confdefs.h"
14643 $ac_includes_default
14644 int
14645 main (void)
14646 {
14647 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14648   ;
14649   return 0;
14650 }
14651 _ACEOF
14652 rm -f "conftest.$ac_objext"
14653 if { (eval echo "$as_me:14653: \"$ac_compile\"") >&5
14654   (eval $ac_compile) 2>&5
14655   ac_status=$?
14656   echo "$as_me:14656: \$? = $ac_status" >&5
14657   (exit "$ac_status"); } &&
14658          { ac_try='test -s "conftest.$ac_objext"'
14659   { (eval echo "$as_me:14659: \"$ac_try\"") >&5
14660   (eval $ac_try) 2>&5
14661   ac_status=$?
14662   echo "$as_me:14662: \$? = $ac_status" >&5
14663   (exit "$ac_status"); }; }; then
14664   ac_lo=0 ac_mid=0
14665   while :; do
14666     cat >"conftest.$ac_ext" <<_ACEOF
14667 #line 14667 "configure"
14668 #include "confdefs.h"
14669 $ac_includes_default
14670 int
14671 main (void)
14672 {
14673 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14674   ;
14675   return 0;
14676 }
14677 _ACEOF
14678 rm -f "conftest.$ac_objext"
14679 if { (eval echo "$as_me:14679: \"$ac_compile\"") >&5
14680   (eval $ac_compile) 2>&5
14681   ac_status=$?
14682   echo "$as_me:14682: \$? = $ac_status" >&5
14683   (exit "$ac_status"); } &&
14684          { ac_try='test -s "conftest.$ac_objext"'
14685   { (eval echo "$as_me:14685: \"$ac_try\"") >&5
14686   (eval $ac_try) 2>&5
14687   ac_status=$?
14688   echo "$as_me:14688: \$? = $ac_status" >&5
14689   (exit "$ac_status"); }; }; then
14690   ac_hi=$ac_mid; break
14691 else
14692   echo "$as_me: failed program was:" >&5
14693 cat "conftest.$ac_ext" >&5
14694 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
14695 fi
14696 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14697   done
14698 else
14699   echo "$as_me: failed program was:" >&5
14700 cat "conftest.$ac_ext" >&5
14701 ac_hi=-1 ac_mid=-1
14702   while :; do
14703     cat >"conftest.$ac_ext" <<_ACEOF
14704 #line 14704 "configure"
14705 #include "confdefs.h"
14706 $ac_includes_default
14707 int
14708 main (void)
14709 {
14710 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14711   ;
14712   return 0;
14713 }
14714 _ACEOF
14715 rm -f "conftest.$ac_objext"
14716 if { (eval echo "$as_me:14716: \"$ac_compile\"") >&5
14717   (eval $ac_compile) 2>&5
14718   ac_status=$?
14719   echo "$as_me:14719: \$? = $ac_status" >&5
14720   (exit "$ac_status"); } &&
14721          { ac_try='test -s "conftest.$ac_objext"'
14722   { (eval echo "$as_me:14722: \"$ac_try\"") >&5
14723   (eval $ac_try) 2>&5
14724   ac_status=$?
14725   echo "$as_me:14725: \$? = $ac_status" >&5
14726   (exit "$ac_status"); }; }; then
14727   ac_lo=$ac_mid; break
14728 else
14729   echo "$as_me: failed program was:" >&5
14730 cat "conftest.$ac_ext" >&5
14731 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
14732 fi
14733 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14734   done
14735 fi
14736 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14737 # Binary search between lo and hi bounds.
14738 while test "x$ac_lo" != "x$ac_hi"; do
14739   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14740   cat >"conftest.$ac_ext" <<_ACEOF
14741 #line 14741 "configure"
14742 #include "confdefs.h"
14743 $ac_includes_default
14744 int
14745 main (void)
14746 {
14747 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14748   ;
14749   return 0;
14750 }
14751 _ACEOF
14752 rm -f "conftest.$ac_objext"
14753 if { (eval echo "$as_me:14753: \"$ac_compile\"") >&5
14754   (eval $ac_compile) 2>&5
14755   ac_status=$?
14756   echo "$as_me:14756: \$? = $ac_status" >&5
14757   (exit "$ac_status"); } &&
14758          { ac_try='test -s "conftest.$ac_objext"'
14759   { (eval echo "$as_me:14759: \"$ac_try\"") >&5
14760   (eval $ac_try) 2>&5
14761   ac_status=$?
14762   echo "$as_me:14762: \$? = $ac_status" >&5
14763   (exit "$ac_status"); }; }; then
14764   ac_hi=$ac_mid
14765 else
14766   echo "$as_me: failed program was:" >&5
14767 cat "conftest.$ac_ext" >&5
14768 ac_lo=`expr "$ac_mid" + 1`
14769 fi
14770 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14771 done
14772 ac_cv_sizeof_signed_char=$ac_lo
14773 else
14774   if test "$cross_compiling" = yes; then
14775   { { echo "$as_me:14775: error: cannot run test program while cross compiling" >&5
14776 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14777    { (exit 1); exit 1; }; }
14778 else
14779   cat >"conftest.$ac_ext" <<_ACEOF
14780 #line 14780 "configure"
14781 #include "confdefs.h"
14782 $ac_includes_default
14783 int
14784 main (void)
14785 {
14786 FILE *f = fopen ("conftest.val", "w");
14787 if (!f)
14788   $ac_main_return (1);
14789 fprintf (f, "%ld", (long)(sizeof (signed char)));
14790 fclose (f);
14791   ;
14792   return 0;
14793 }
14794 _ACEOF
14795 rm -f "conftest$ac_exeext"
14796 if { (eval echo "$as_me:14796: \"$ac_link\"") >&5
14797   (eval $ac_link) 2>&5
14798   ac_status=$?
14799   echo "$as_me:14799: \$? = $ac_status" >&5
14800   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14801   { (eval echo "$as_me:14801: \"$ac_try\"") >&5
14802   (eval $ac_try) 2>&5
14803   ac_status=$?
14804   echo "$as_me:14804: \$? = $ac_status" >&5
14805   (exit "$ac_status"); }; }; then
14806   ac_cv_sizeof_signed_char=`cat conftest.val`
14807 else
14808   echo "$as_me: program exited with status $ac_status" >&5
14809 echo "$as_me: failed program was:" >&5
14810 cat "conftest.$ac_ext" >&5
14811 fi
14812 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14813 fi
14814 fi
14815 rm -f conftest.val
14816 else
14817   ac_cv_sizeof_signed_char=0
14818 fi
14819 fi
14820 echo "$as_me:14820: result: $ac_cv_sizeof_signed_char" >&5
14821 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14822 cat >>confdefs.h <<EOF
14823 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14824 EOF
14825
14826 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14827         NCURSES_SBOOL="signed char"
14828 else
14829         NCURSES_SBOOL="char"
14830 fi
14831 echo "$as_me:14831: checking whether to use signed chars for Boolean array in term.h" >&5
14832 echo $ECHO_N "checking whether to use signed chars for Boolean array in term.h... $ECHO_C" >&6
14833
14834 # Check whether --enable-signed-char or --disable-signed-char was given.
14835 if test "${enable_signed_char+set}" = set; then
14836   enableval="$enable_signed_char"
14837   with_signed_char=$enableval
14838 else
14839   with_signed_char=$cf_dft_signed_char
14840 fi;
14841 echo "$as_me:14841: result: $with_signed_char" >&5
14842 echo "${ECHO_T}$with_signed_char" >&6
14843 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14844
14845 ###   use option --with-tparm-arg to override tparm's argument type
14846 echo "$as_me:14846: checking for type of tparm args" >&5
14847 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14848
14849 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14850 if test "${with_tparm_arg+set}" = set; then
14851   withval="$with_tparm_arg"
14852   NCURSES_TPARM_ARG="$withval"
14853 else
14854   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14855 fi;
14856 echo "$as_me:14856: result: $NCURSES_TPARM_ARG" >&5
14857 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14858
14859 ### Enable compiling-in rcs id's
14860 echo "$as_me:14860: checking if RCS identifiers should be compiled-in" >&5
14861 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14862
14863 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14864 if test "${with_rcs_ids+set}" = set; then
14865   withval="$with_rcs_ids"
14866   with_rcs_ids=$withval
14867 else
14868   with_rcs_ids=no
14869 fi;
14870 echo "$as_me:14870: result: $with_rcs_ids" >&5
14871 echo "${ECHO_T}$with_rcs_ids" >&6
14872 test "x$with_rcs_ids" = xyes &&
14873 cat >>confdefs.h <<\EOF
14874 #define USE_RCS_IDS 1
14875 EOF
14876
14877 ###############################################################################
14878
14879 echo "$as_me:14879: checking format of man-pages" >&5
14880 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14881
14882 # Check whether --with-manpage-format or --without-manpage-format was given.
14883 if test "${with_manpage_format+set}" = set; then
14884   withval="$with_manpage_format"
14885   MANPAGE_FORMAT=$withval
14886 else
14887   MANPAGE_FORMAT=unknown
14888 fi;
14889
14890 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14891 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14892
14893 cf_unknown=
14894
14895 case "$MANPAGE_FORMAT" in
14896 (unknown)
14897         if test -z "$MANPATH" ; then
14898                 MANPATH="/usr/man:/usr/share/man"
14899         fi
14900
14901         # look for the 'date' man-page (it is most likely to be installed!)
14902         MANPAGE_FORMAT=
14903         cf_preform="no"
14904         cf_catonly="yes"
14905         cf_example="date"
14906
14907         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14908         for cf_dir in $MANPATH; do
14909                 test -z "$cf_dir" && cf_dir=/usr/man
14910                 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
14911                 do
14912                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14913                         if test "x$cf_test" = "x$cf_name" ; then
14914
14915                                 case "$cf_name" in
14916                                 (*.bz2) MANPAGE_FORMAT="$MANPAGE_FORMAT bzip2";;
14917                                 (*.xz)  MANPAGE_FORMAT="$MANPAGE_FORMAT xz";;
14918                                 (*.gz)  MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14919                                 (*.Z)   MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14920                                 (*.0)   MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14921                                 (*)     MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14922                                 esac
14923
14924                                 case "$cf_name" in
14925                                 ($cf_dir/man*)
14926                                         cf_catonly=no
14927                                         ;;
14928                                 ($cf_dir/cat*)
14929                                         cf_preform=yes
14930                                         ;;
14931                                 esac
14932                                 break
14933                         fi
14934
14935                         # if we found a match in either man* or cat*, stop looking
14936                         if test -n "$MANPAGE_FORMAT" ; then
14937                                 cf_found=no
14938                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14939                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14940                                 case "$cf_name" in
14941                                 ($cf_dir/cat*)
14942                                         cf_found=yes
14943                                         ;;
14944                                 esac
14945                                 test "$cf_found" = yes && break
14946                         fi
14947                 done
14948                 # only check the first directory in $MANPATH where we find manpages
14949                 if test -n "$MANPAGE_FORMAT" ; then
14950                         break
14951                 fi
14952         done
14953         # if we did not find the example, just assume it is normal
14954         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14955         IFS="$ac_save_ifs"
14956         ;;
14957 (*)
14958         for cf_option in $MANPAGE_FORMAT; do
14959         case "$cf_option" in
14960         (xz|bzip2|gzip|compress|BSDI|normal|formatted|catonly)
14961                 ;;
14962         (*)
14963                 cf_unknown="$cf_unknown $cf_option"
14964                 ;;
14965         esac
14966         done
14967         ;;
14968 esac
14969
14970 echo "$as_me:14970: result: $MANPAGE_FORMAT" >&5
14971 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14972 if test -n "$cf_unknown" ; then
14973         { echo "$as_me:14973: WARNING: Unexpected manpage-format $cf_unknown" >&5
14974 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14975 fi
14976
14977 cf_manpage_format=no
14978 cf_manpage_inboth=no
14979 cf_manpage_so_strip=
14980 cf_manpage_compress=
14981
14982 for cf_item in $MANPAGE_FORMAT
14983 do
14984 case "$cf_item" in
14985 (catonly)
14986         cf_manpage_format=yes
14987         cf_manpage_inboth=no
14988         ;;
14989 (formatted)
14990         cf_manpage_format=yes
14991         cf_manpage_inboth=yes
14992         ;;
14993 (compress)
14994         cf_manpage_so_strip="Z"
14995         cf_manpage_compress=compress
14996         ;;
14997 (gzip)
14998         cf_manpage_so_strip="gz"
14999         cf_manpage_compress=gzip
15000         ;;
15001 (bzip2)
15002         cf_manpage_so_strip="bz2"
15003         cf_manpage_compress=bzip2
15004         ;;
15005 (xz)
15006         cf_manpage_so_strip="xz"
15007         cf_manpage_compress=xz
15008         ;;
15009 esac
15010 done
15011
15012 echo "$as_me:15012: checking for manpage renaming" >&5
15013 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
15014
15015 # Check whether --with-manpage-renames or --without-manpage-renames was given.
15016 if test "${with_manpage_renames+set}" = set; then
15017   withval="$with_manpage_renames"
15018   MANPAGE_RENAMES=$withval
15019 else
15020   MANPAGE_RENAMES=yes
15021 fi;
15022
15023 case ".$MANPAGE_RENAMES" in
15024 (.no)
15025         ;;
15026 (.|.yes)
15027         # Debian 'man' program?
15028         if test -f /etc/debian_version ; then
15029                 MANPAGE_RENAMES=man/man_db.renames
15030         else
15031                 MANPAGE_RENAMES=no
15032         fi
15033         ;;
15034 esac
15035
15036 if test "$MANPAGE_RENAMES" = man/man_db.renames ; then
15037         MANPAGE_RENAMES=`pwd`/$MANPAGE_RENAMES
15038 elif test "$MANPAGE_RENAMES" = no ; then
15039         :
15040 elif test ! -f "$MANPAGE_RENAMES" ; then
15041         { { echo "$as_me:15041: error: not a filename: $MANPAGE_RENAMES" >&5
15042 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
15043    { (exit 1); exit 1; }; }
15044 fi
15045
15046 echo "$as_me:15046: result: $MANPAGE_RENAMES" >&5
15047 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
15048
15049 echo "$as_me:15049: checking if manpage aliases will be installed" >&5
15050 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
15051
15052 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
15053 if test "${with_manpage_aliases+set}" = set; then
15054   withval="$with_manpage_aliases"
15055   MANPAGE_ALIASES=$withval
15056 else
15057   MANPAGE_ALIASES=yes
15058 fi;
15059
15060 echo "$as_me:15060: result: $MANPAGE_ALIASES" >&5
15061 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
15062
15063 case "x$LN_S" in
15064 (xln*)
15065         cf_use_symlinks=yes
15066         ;;
15067 (*)
15068         cf_use_symlinks=no
15069         ;;
15070 esac
15071
15072 MANPAGE_SYMLINKS=no
15073 if test "$MANPAGE_ALIASES" = yes ; then
15074 echo "$as_me:15074: checking if manpage symlinks should be used" >&5
15075 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
15076
15077 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
15078 if test "${with_manpage_symlinks+set}" = set; then
15079   withval="$with_manpage_symlinks"
15080   MANPAGE_SYMLINKS=$withval
15081 else
15082   MANPAGE_SYMLINKS=$cf_use_symlinks
15083 fi;
15084
15085 if test "$cf_use_symlinks" = no; then
15086 if test "$MANPAGE_SYMLINKS" = yes ; then
15087         { echo "$as_me:15087: WARNING: cannot make symlinks" >&5
15088 echo "$as_me: WARNING: cannot make symlinks" >&2;}
15089         MANPAGE_SYMLINKS=no
15090 fi
15091 fi
15092
15093 echo "$as_me:15093: result: $MANPAGE_SYMLINKS" >&5
15094 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
15095 fi
15096
15097 echo "$as_me:15097: checking for manpage tbl" >&5
15098 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
15099
15100 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
15101 if test "${with_manpage_tbl+set}" = set; then
15102   withval="$with_manpage_tbl"
15103   MANPAGE_TBL=$withval
15104 else
15105   MANPAGE_TBL=no
15106 fi;
15107
15108 echo "$as_me:15108: result: $MANPAGE_TBL" >&5
15109 echo "${ECHO_T}$MANPAGE_TBL" >&6
15110
15111 if test "$prefix" = "NONE" ; then
15112         cf_prefix="$ac_default_prefix"
15113 else
15114         cf_prefix="$prefix"
15115 fi
15116
15117 test ! -d man && mkdir man
15118
15119 cf_edit_man=./edit_man.sh
15120 cf_man_alias=`pwd`/man_alias.sed
15121
15122 cat >$cf_edit_man <<CF_EOF
15123 #! $SHELL
15124 # this script is generated by the configure-script CF_MAN_PAGES macro.
15125
15126 prefix="$cf_prefix"
15127 datarootdir="$datarootdir"
15128 datadir="$datadir"
15129
15130 NCURSES_MAJOR="$NCURSES_MAJOR"
15131 NCURSES_MINOR="$NCURSES_MINOR"
15132 NCURSES_PATCH="$NCURSES_PATCH"
15133
15134 NCURSES_OSPEED="$NCURSES_OSPEED"
15135 TERMINFO="$TERMINFO"
15136 TERMINFO_DIRS="$TERMINFO_DIRS"
15137
15138 INSTALL="$INSTALL"
15139 INSTALL_DATA="$INSTALL_DATA"
15140
15141 transform="$program_transform_name"
15142
15143 TMP=\${TMPDIR:=/tmp}/man\$\$
15144 trap "rm -f \$TMP; exit 1" 1 2 3 15
15145 trap "rm -f \$TMP" 0
15146
15147 form=\$1
15148 shift || exit 1
15149
15150 verb=\$1
15151 shift || exit 1
15152
15153 mandir=\$1
15154 shift || exit 1
15155
15156 srcdir=\$1
15157 top_srcdir=\$srcdir/..
15158 shift || exit 1
15159
15160 if test "\$form" = normal ; then
15161         if test "$cf_manpage_format" = yes ; then
15162         if test "$cf_manpage_inboth" = no ; then
15163                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15164                 exit $?
15165         fi
15166         fi
15167         cf_subdir=\$mandir/man
15168         cf_tables=$MANPAGE_TBL
15169 else
15170         cf_subdir=\$mandir/cat
15171         cf_tables=yes
15172 fi
15173
15174 # process the list of source-files
15175 for i in "\$@" ; do
15176 case \$i in
15177 (*.orig|*.rej) ;;
15178 (*.[0-9]*)
15179         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
15180         if test "\$verb" = installing ; then
15181         if test ! -d "\$cf_subdir\${section}" ; then
15182                 mkdir -p "\$cf_subdir\$section"
15183         fi
15184         fi
15185
15186         # replace variables in man page
15187         if test ! -f "$cf_man_alias" ; then
15188 cat >>$cf_man_alias <<-CF_EOF2
15189                 s,@DATADIR@,\$datadir,g
15190                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
15191                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
15192                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
15193                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
15194                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
15195                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
15196 CF_EOF
15197
15198         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
15199         do
15200                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15201                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
15202 cat >>$cf_edit_man <<-CF_EOF
15203                 s,@$cf_NAME@,$cf_name,g
15204 CF_EOF
15205         done
15206
15207 cat >>$cf_edit_man <<CF_EOF
15208 CF_EOF2
15209                 echo "...made $cf_man_alias"
15210         fi
15211
15212         aliases=
15213         cf_source=\`basename "\$i"\`
15214         cf_full_alias=\$cf_source
15215         test ! -f "\$cf_full_alias" && cf_full_alias="\$srcdir/\$cf_full_alias"
15216         if test ! -f "\$cf_full_alias" ; then
15217                 echo ".. skipped \$cf_source"
15218                 continue
15219         fi
15220 CF_EOF
15221
15222 if test "$MANPAGE_ALIASES" != no ; then
15223 cat >>$cf_edit_man <<CF_EOF
15224         nCurses=ignore.3x
15225         cf_part_alias=\`echo \$cf_full_alias| sed -e 's,^.*/,,'\`
15226         test "$with_curses_h" = yes && nCurses=ncurses.3x
15227         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\`
15228 CF_EOF
15229 fi
15230
15231 if test "$MANPAGE_RENAMES" = no ; then
15232 cat >>$cf_edit_man <<CF_EOF
15233         # perform program transformations for section 1 man pages
15234         if test \$section = 1 ; then
15235                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
15236         else
15237                 cf_target=\$cf_subdir\${section}/\$cf_source
15238         fi
15239 CF_EOF
15240 else
15241 cat >>$cf_edit_man <<CF_EOF
15242         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
15243         if test -z "\$cf_target" ; then
15244                 echo "? missing rename for \$cf_source"
15245                 cf_target="\$cf_source"
15246         fi
15247         cf_target="\$cf_subdir\${section}/\${cf_target}"
15248
15249 CF_EOF
15250 fi
15251
15252 cat >>$cf_edit_man <<CF_EOF
15253         sed     -f "$cf_man_alias" \\
15254 CF_EOF
15255
15256 if test "$MANPAGE_RENAMES" != no ; then
15257 cat >>$cf_edit_man <<CF_EOF
15258                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
15259 CF_EOF
15260 else
15261 cat >>$cf_edit_man <<CF_EOF
15262                 < "\$i" >\$TMP
15263 CF_EOF
15264 fi
15265
15266 cat >>$cf_edit_man <<CF_EOF
15267 if test \$cf_tables = yes ; then
15268         tbl \$TMP >\$TMP.out
15269         mv \$TMP.out \$TMP
15270 fi
15271 CF_EOF
15272
15273 if test "$with_overwrite" != yes ; then
15274 cat >>$cf_edit_man <<CF_EOF
15275         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
15276         mv \$TMP.out \$TMP
15277 CF_EOF
15278 fi
15279
15280 if test "$with_curses_h" != yes ; then
15281 cat >>$cf_edit_man <<CF_EOF
15282         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
15283         mv \$TMP.out \$TMP
15284 CF_EOF
15285 fi
15286
15287 cat >>$cf_edit_man <<CF_EOF
15288         if test "\$form" = format ; then
15289                 nroff -man \$TMP >\$TMP.out
15290                 mv \$TMP.out \$TMP
15291         fi
15292 CF_EOF
15293
15294 if test -n "$cf_manpage_compress" ; then
15295 cat >>$cf_edit_man <<CF_EOF
15296         if test "\$verb" = installing ; then
15297         if ( "$cf_manpage_compress" -f \$TMP )
15298         then
15299                 mv \$TMP.$cf_manpage_so_strip \$TMP
15300         fi
15301         fi
15302         cf_target="\$cf_target.$cf_manpage_so_strip"
15303 CF_EOF
15304 fi
15305
15306 case "$MANPAGE_FORMAT" in
15307 (*BSDI*)
15308 cat >>$cf_edit_man <<CF_EOF
15309         if test "\$form" = format ; then
15310                 # BSDI installs only .0 suffixes in the cat directories
15311                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
15312         fi
15313 CF_EOF
15314   ;;
15315 esac
15316
15317 cat >>$cf_edit_man <<CF_EOF
15318         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
15319         extra_suffix=
15320         if test -n "$EXTRA_SUFFIX" ; then
15321                 case \$cf_target in
15322                 (*${EXTRA_SUFFIX}\$suffix)
15323                         extra_suffix="$EXTRA_SUFFIX"
15324                         ;;
15325                 esac
15326         fi
15327         if test "\$verb" = installing ; then
15328                 echo "\$verb \$cf_target"
15329                 \$INSTALL_DATA \$TMP "\$cf_target"
15330                 test -d "\$cf_subdir\${section}" &&
15331                 test -n "\$aliases" && (
15332                         cd "\$cf_subdir\${section}" && (
15333                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
15334                                 test -n "$cf_manpage_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_manpage_so_strip\$%%'\`
15335                                 cf_target=\`basename "\$cf_target"\`
15336                                 for cf_alias in \$aliases
15337                                 do
15338                                         if test "\$section" = 1 ; then
15339                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15340                                         fi
15341                                         cf_alias="\${cf_alias}\${extra_suffix}"
15342
15343                                         if test "$MANPAGE_SYMLINKS" = yes ; then
15344                                                 if test -f "\$cf_alias\${suffix}" ; then
15345                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
15346                                                         then
15347                                                                 continue
15348                                                         fi
15349                                                 fi
15350                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15351 CF_EOF
15352 case "x$LN_S" in
15353 (*-f)
15354 cat >>$cf_edit_man <<CF_EOF
15355                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15356 CF_EOF
15357         ;;
15358 (*)
15359 cat >>$cf_edit_man <<CF_EOF
15360                                                 rm -f "\$cf_alias\${suffix}"
15361                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15362 CF_EOF
15363         ;;
15364 esac
15365 cat >>$cf_edit_man <<CF_EOF
15366                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
15367                                                 echo ".so \$cf_source" >\$TMP
15368 CF_EOF
15369 if test -n "$cf_manpage_compress" ; then
15370 cat >>$cf_edit_man <<CF_EOF
15371                                                 if test -n "$cf_manpage_so_strip" ; then
15372                                                         "$cf_manpage_compress" -f \$TMP
15373                                                         mv \$TMP.$cf_manpage_so_strip \$TMP
15374                                                 fi
15375 CF_EOF
15376 fi
15377 cat >>$cf_edit_man <<CF_EOF
15378                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15379                                                 rm -f "\$cf_alias\${suffix}"
15380                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
15381                                         fi
15382                                 done
15383                         )
15384                 )
15385         elif test "\$verb" = removing ; then
15386                 test -f "\$cf_target" && (
15387                         echo "\$verb \$cf_target"
15388                         rm -f "\$cf_target"
15389                 )
15390                 test -d "\$cf_subdir\${section}" &&
15391                 test -n "\$aliases" && (
15392                         cd "\$cf_subdir\${section}" && (
15393                                 for cf_alias in \$aliases
15394                                 do
15395                                         if test "\$section" = 1 ; then
15396                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15397                                         fi
15398                                         cf_alias="\${cf_alias}\${extra_suffix}"
15399
15400                                         echo ".. \$verb alias \$cf_alias\${suffix}"
15401                                         rm -f "\$cf_alias\${suffix}"
15402                                 done
15403                         )
15404                 )
15405         else
15406 #               echo ".hy 0"
15407                 cat \$TMP
15408         fi
15409         ;;
15410 esac
15411 done
15412
15413 if test "$cf_manpage_inboth" = yes ; then
15414 if test "\$form" != format ; then
15415         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15416 fi
15417 fi
15418
15419 exit 0
15420 CF_EOF
15421 chmod 755 "$cf_edit_man"
15422
15423 ###############################################################################
15424
15425 ### Note that some functions (such as const) are normally disabled anyway.
15426 echo "$as_me:15426: checking if you want to build with function extensions" >&5
15427 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15428
15429 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15430 if test "${enable_ext_funcs+set}" = set; then
15431   enableval="$enable_ext_funcs"
15432   with_ext_funcs=$enableval
15433 else
15434   with_ext_funcs=yes
15435 fi;
15436 echo "$as_me:15436: result: $with_ext_funcs" >&5
15437 echo "${ECHO_T}$with_ext_funcs" >&6
15438 if test "x$with_ext_funcs" = xyes ; then
15439         NCURSES_EXT_FUNCS=1
15440
15441 cat >>confdefs.h <<\EOF
15442 #define NCURSES_EXT_FUNCS 1
15443 EOF
15444
15445 cat >>confdefs.h <<\EOF
15446 #define HAVE_ASSUME_DEFAULT_COLORS 1
15447 EOF
15448
15449 cat >>confdefs.h <<\EOF
15450 #define HAVE_CURSES_VERSION 1
15451 EOF
15452
15453 cat >>confdefs.h <<\EOF
15454 #define HAVE_HAS_KEY 1
15455 EOF
15456
15457 cat >>confdefs.h <<\EOF
15458 #define HAVE_RESIZETERM 1
15459 EOF
15460
15461 cat >>confdefs.h <<\EOF
15462 #define HAVE_RESIZE_TERM 1
15463 EOF
15464
15465 cat >>confdefs.h <<\EOF
15466 #define HAVE_TERM_ENTRY_H 1
15467 EOF
15468
15469 cat >>confdefs.h <<\EOF
15470 #define HAVE_USE_DEFAULT_COLORS 1
15471 EOF
15472
15473 cat >>confdefs.h <<\EOF
15474 #define HAVE_USE_SCREEN 1
15475 EOF
15476
15477 cat >>confdefs.h <<\EOF
15478 #define HAVE_USE_WINDOW 1
15479 EOF
15480
15481 cat >>confdefs.h <<\EOF
15482 #define HAVE_WRESIZE 1
15483 EOF
15484
15485         GENERATED_EXT_FUNCS=generated
15486         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
15487 else
15488         NCURSES_EXT_FUNCS=0
15489         GENERATED_EXT_FUNCS=
15490 fi
15491
15492 echo "$as_me:15492: checking if you want to build with SCREEN extensions" >&5
15493 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
15494
15495 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
15496 if test "${enable_sp_funcs+set}" = set; then
15497   enableval="$enable_sp_funcs"
15498   with_sp_funcs=$enableval
15499 else
15500   with_sp_funcs=$cf_dft_ext_spfuncs
15501 fi;
15502 echo "$as_me:15502: result: $with_sp_funcs" >&5
15503 echo "${ECHO_T}$with_sp_funcs" >&6
15504 if test "x$with_sp_funcs" = xyes ; then
15505         NCURSES_SP_FUNCS=1
15506
15507 cat >>confdefs.h <<\EOF
15508 #define NCURSES_SP_FUNCS 1
15509 EOF
15510
15511 cat >>confdefs.h <<\EOF
15512 #define HAVE_TPUTS_SP 1
15513 EOF
15514
15515         GENERATED_SP_FUNCS=generated
15516 else
15517         NCURSES_SP_FUNCS=0
15518         GENERATED_SP_FUNCS=
15519 fi
15520
15521 echo "$as_me:15521: checking if you want to build with terminal-driver" >&5
15522 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
15523
15524 # Check whether --enable-term-driver or --disable-term-driver was given.
15525 if test "${enable_term_driver+set}" = set; then
15526   enableval="$enable_term_driver"
15527   with_term_driver=$enableval
15528 else
15529   with_term_driver=no
15530 fi;
15531 echo "$as_me:15531: result: $with_term_driver" >&5
15532 echo "${ECHO_T}$with_term_driver" >&6
15533 if test "x$with_term_driver" = xyes ; then
15534
15535 cat >>confdefs.h <<\EOF
15536 #define USE_TERM_DRIVER 1
15537 EOF
15538
15539         if test "x$with_termlib" != xno ; then
15540                 { { echo "$as_me:15540: error: The term-driver option conflicts with the termlib option" >&5
15541 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15542    { (exit 1); exit 1; }; }
15543         fi
15544         if test "x$with_sp_funcs" != xyes ; then
15545                 { { echo "$as_me:15545: error: The term-driver option relies upon sp-funcs" >&5
15546 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15547    { (exit 1); exit 1; }; }
15548         fi
15549 fi
15550
15551 ###   use option --enable-const to turn on use of const beyond that in XSI.
15552 echo "$as_me:15552: checking for extended use of const keyword" >&5
15553 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15554
15555 # Check whether --enable-const or --disable-const was given.
15556 if test "${enable_const+set}" = set; then
15557   enableval="$enable_const"
15558   with_ext_const=$enableval
15559 else
15560   with_ext_const=$cf_dft_ext_const
15561 fi;
15562 echo "$as_me:15562: result: $with_ext_const" >&5
15563 echo "${ECHO_T}$with_ext_const" >&6
15564 NCURSES_CONST='/*nothing*/'
15565 if test "x$with_ext_const" = xyes ; then
15566         NCURSES_CONST=const
15567 fi
15568
15569 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
15570 echo "$as_me:15570: checking if you want to use extended colors" >&5
15571 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15572
15573 # Check whether --enable-ext-colors or --disable-ext-colors was given.
15574 if test "${enable_ext_colors+set}" = set; then
15575   enableval="$enable_ext_colors"
15576   with_ext_colors=$enableval
15577 else
15578   with_ext_colors=$cf_dft_ext_colors
15579 fi;
15580 echo "$as_me:15580: result: $with_ext_colors" >&5
15581 echo "${ECHO_T}$with_ext_colors" >&6
15582 NCURSES_EXT_COLORS=0
15583 if test "x$with_ext_colors" = xyes ; then
15584         if test "x$with_widec" != xyes ; then
15585                 { echo "$as_me:15585: WARNING: This option applies only to wide-character library" >&5
15586 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15587         else
15588                 # cannot be ABI 5 since it changes sizeof(cchar_t)
15589
15590 if test "${with_abi_version+set}" != set; then
15591         case "$cf_cv_rel_version" in
15592         (5.*)
15593                 cf_cv_rel_version=6.0
15594                 cf_cv_abi_version=6
15595                 cf_cv_abi_default=6
15596                 { echo "$as_me:15596: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15597 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
15598                 ;;
15599         esac
15600 fi
15601
15602                 NCURSES_EXT_COLORS=1
15603
15604 cat >>confdefs.h <<\EOF
15605 #define NCURSES_EXT_COLORS 1
15606 EOF
15607
15608 cat >>confdefs.h <<\EOF
15609 #define HAVE_ALLOC_PAIR 1
15610 EOF
15611
15612 cat >>confdefs.h <<\EOF
15613 #define HAVE_INIT_EXTENDED_COLOR 1
15614 EOF
15615
15616 cat >>confdefs.h <<\EOF
15617 #define HAVE_RESET_COLOR_PAIRS 1
15618 EOF
15619
15620         fi
15621 fi
15622
15623 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
15624 echo "$as_me:15624: checking if you want to use extended mouse encoding" >&5
15625 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15626
15627 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15628 if test "${enable_ext_mouse+set}" = set; then
15629   enableval="$enable_ext_mouse"
15630   with_ext_mouse=$enableval
15631 else
15632   with_ext_mouse=$cf_dft_ext_mouse
15633 fi;
15634 echo "$as_me:15634: result: $with_ext_mouse" >&5
15635 echo "${ECHO_T}$with_ext_mouse" >&6
15636 if test "x$with_ext_mouse" = xyes ; then
15637
15638 if test "${with_abi_version+set}" != set; then
15639         case "$cf_cv_rel_version" in
15640         (5.*)
15641                 cf_cv_rel_version=6.0
15642                 cf_cv_abi_version=6
15643                 cf_cv_abi_default=6
15644                 { echo "$as_me:15644: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15645 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
15646                 ;;
15647         esac
15648 fi
15649
15650 fi
15651
15652 if test $cf_cv_abi_default -le 5 ; then
15653         NCURSES_MOUSE_VERSION=1
15654 elif test $cf_cv_abi_default -le 6 ; then
15655         NCURSES_MOUSE_VERSION=2
15656 else
15657         NCURSES_MOUSE_VERSION=3
15658 fi
15659
15660 ###   use option --enable-ext-putwin to turn on extended screendumps
15661 echo "$as_me:15661: checking if you want to use extended putwin/screendump" >&5
15662 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15663
15664 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15665 if test "${enable_ext_putwin+set}" = set; then
15666   enableval="$enable_ext_putwin"
15667   with_ext_putwin=$enableval
15668 else
15669   with_ext_putwin=$cf_dft_ext_putwin
15670 fi;
15671 echo "$as_me:15671: result: $with_ext_putwin" >&5
15672 echo "${ECHO_T}$with_ext_putwin" >&6
15673 if test "x$with_ext_putwin" = xyes ; then
15674
15675 cat >>confdefs.h <<\EOF
15676 #define NCURSES_EXT_PUTWIN 1
15677 EOF
15678
15679 fi
15680
15681 echo "$as_me:15681: checking if you want \$NCURSES_NO_PADDING code" >&5
15682 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15683
15684 # Check whether --enable-no-padding or --disable-no-padding was given.
15685 if test "${enable_no_padding+set}" = set; then
15686   enableval="$enable_no_padding"
15687   with_no_padding=$enableval
15688 else
15689   with_no_padding=$with_ext_funcs
15690 fi;
15691 echo "$as_me:15691: result: $with_no_padding" >&5
15692 echo "${ECHO_T}$with_no_padding" >&6
15693 test "x$with_no_padding" = xyes &&
15694 cat >>confdefs.h <<\EOF
15695 #define NCURSES_NO_PADDING 1
15696 EOF
15697
15698 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15699 echo "$as_me:15699: checking if you want SIGWINCH handler" >&5
15700 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15701
15702 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15703 if test "${enable_sigwinch+set}" = set; then
15704   enableval="$enable_sigwinch"
15705   with_sigwinch=$enableval
15706 else
15707   with_sigwinch=$with_ext_funcs
15708 fi;
15709 echo "$as_me:15709: result: $with_sigwinch" >&5
15710 echo "${ECHO_T}$with_sigwinch" >&6
15711 test "x$with_sigwinch" = xyes &&
15712 cat >>confdefs.h <<\EOF
15713 #define USE_SIGWINCH 1
15714 EOF
15715
15716 ###   use option --enable-tcap-names to allow user to define new capabilities
15717 echo "$as_me:15717: checking if you want user-definable terminal capabilities like termcap" >&5
15718 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15719
15720 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15721 if test "${enable_tcap_names+set}" = set; then
15722   enableval="$enable_tcap_names"
15723   with_tcap_names=$enableval
15724 else
15725   with_tcap_names=$with_ext_funcs
15726 fi;
15727 echo "$as_me:15727: result: $with_tcap_names" >&5
15728 echo "${ECHO_T}$with_tcap_names" >&6
15729 NCURSES_XNAMES=0
15730 if test "x$with_tcap_names" = xyes; then
15731         NCURSES_XNAMES=1
15732
15733 cat >>confdefs.h <<\EOF
15734 #define NCURSES_XNAMES 1
15735 EOF
15736
15737 fi
15738
15739 ##############################################################################
15740
15741 echo "$as_me:15741: checking if you want to link with the pthread library" >&5
15742 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15743
15744 # Check whether --with-pthread or --without-pthread was given.
15745 if test "${with_pthread+set}" = set; then
15746   withval="$with_pthread"
15747   with_pthread=$withval
15748 else
15749   with_pthread=no
15750 fi;
15751 echo "$as_me:15751: result: $with_pthread" >&5
15752 echo "${ECHO_T}$with_pthread" >&6
15753
15754 if test "$with_pthread" != no ; then
15755         echo "$as_me:15755: checking for pthread.h" >&5
15756 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15757 if test "${ac_cv_header_pthread_h+set}" = set; then
15758   echo $ECHO_N "(cached) $ECHO_C" >&6
15759 else
15760   cat >"conftest.$ac_ext" <<_ACEOF
15761 #line 15761 "configure"
15762 #include "confdefs.h"
15763 #include <pthread.h>
15764 _ACEOF
15765 if { (eval echo "$as_me:15765: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15766   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15767   ac_status=$?
15768   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15769   rm -f conftest.er1
15770   cat conftest.err >&5
15771   echo "$as_me:15771: \$? = $ac_status" >&5
15772   (exit "$ac_status"); } >/dev/null; then
15773   if test -s conftest.err; then
15774     ac_cpp_err=$ac_c_preproc_warn_flag
15775   else
15776     ac_cpp_err=
15777   fi
15778 else
15779   ac_cpp_err=yes
15780 fi
15781 if test -z "$ac_cpp_err"; then
15782   ac_cv_header_pthread_h=yes
15783 else
15784   echo "$as_me: failed program was:" >&5
15785   cat "conftest.$ac_ext" >&5
15786   ac_cv_header_pthread_h=no
15787 fi
15788 rm -f conftest.err "conftest.$ac_ext"
15789 fi
15790 echo "$as_me:15790: result: $ac_cv_header_pthread_h" >&5
15791 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15792 if test "$ac_cv_header_pthread_h" = yes; then
15793
15794 cat >>confdefs.h <<\EOF
15795 #define HAVE_PTHREADS_H 1
15796 EOF
15797
15798         for cf_lib_pthread in pthread c_r
15799         do
15800             echo "$as_me:15800: checking if we can link with the $cf_lib_pthread library" >&5
15801 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15802             cf_save_LIBS="$LIBS"
15803
15804 cf_add_libs="$LIBS"
15805 # reverse order
15806 cf_add_0lib=
15807 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15808 # filter duplicates
15809 for cf_add_1lib in $cf_add_0lib; do
15810         for cf_add_2lib in $cf_add_libs; do
15811                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15812                         cf_add_1lib=
15813                         break
15814                 fi
15815         done
15816         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15817 done
15818 LIBS="$cf_add_libs"
15819
15820             cat >"conftest.$ac_ext" <<_ACEOF
15821 #line 15821 "configure"
15822 #include "confdefs.h"
15823
15824 #include <pthread.h>
15825
15826 int
15827 main (void)
15828 {
15829
15830                 int rc = pthread_create(0,0,0,0);
15831                 int r2 = pthread_mutexattr_settype(0, 0);
15832
15833   ;
15834   return 0;
15835 }
15836 _ACEOF
15837 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15838 if { (eval echo "$as_me:15838: \"$ac_link\"") >&5
15839   (eval $ac_link) 2>&5
15840   ac_status=$?
15841   echo "$as_me:15841: \$? = $ac_status" >&5
15842   (exit "$ac_status"); } &&
15843          { ac_try='test -s "conftest$ac_exeext"'
15844   { (eval echo "$as_me:15844: \"$ac_try\"") >&5
15845   (eval $ac_try) 2>&5
15846   ac_status=$?
15847   echo "$as_me:15847: \$? = $ac_status" >&5
15848   (exit "$ac_status"); }; }; then
15849   with_pthread=yes
15850 else
15851   echo "$as_me: failed program was:" >&5
15852 cat "conftest.$ac_ext" >&5
15853 with_pthread=no
15854 fi
15855 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15856             LIBS="$cf_save_LIBS"
15857             echo "$as_me:15857: result: $with_pthread" >&5
15858 echo "${ECHO_T}$with_pthread" >&6
15859             test "$with_pthread" = yes && break
15860         done
15861
15862         if test "$with_pthread" = yes ; then
15863
15864 cf_add_libs="$LIBS"
15865 # reverse order
15866 cf_add_0lib=
15867 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15868 # filter duplicates
15869 for cf_add_1lib in $cf_add_0lib; do
15870         for cf_add_2lib in $cf_add_libs; do
15871                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15872                         cf_add_1lib=
15873                         break
15874                 fi
15875         done
15876         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15877 done
15878 LIBS="$cf_add_libs"
15879
15880 cat >>confdefs.h <<\EOF
15881 #define HAVE_LIBPTHREADS 1
15882 EOF
15883
15884         else
15885             { { echo "$as_me:15885: error: Cannot link with pthread library" >&5
15886 echo "$as_me: error: Cannot link with pthread library" >&2;}
15887    { (exit 1); exit 1; }; }
15888         fi
15889
15890 fi
15891
15892 fi
15893
15894 if test "x$with_pthread" != xno; then
15895         echo "$as_me:15895: checking for pthread_kill" >&5
15896 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15897 if test "${ac_cv_func_pthread_kill+set}" = set; then
15898   echo $ECHO_N "(cached) $ECHO_C" >&6
15899 else
15900   cat >"conftest.$ac_ext" <<_ACEOF
15901 #line 15901 "configure"
15902 #include "confdefs.h"
15903 #define pthread_kill autoconf_temporary
15904 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15905 #undef pthread_kill
15906
15907 #ifdef __cplusplus
15908 extern "C"
15909 #endif
15910
15911 /* We use char because int might match the return type of a gcc2
15912    builtin and then its argument prototype would still apply.  */
15913 char pthread_kill (void);
15914
15915 int
15916 main (void)
15917 {
15918
15919 /* The GNU C library defines stubs for functions which it implements
15920     to always fail with ENOSYS.  Some functions are actually named
15921     something starting with __ and the normal name is an alias.  */
15922 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15923 #error found stub for pthread_kill
15924 #endif
15925
15926         return pthread_kill ();
15927   ;
15928   return 0;
15929 }
15930 _ACEOF
15931 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15932 if { (eval echo "$as_me:15932: \"$ac_link\"") >&5
15933   (eval $ac_link) 2>&5
15934   ac_status=$?
15935   echo "$as_me:15935: \$? = $ac_status" >&5
15936   (exit "$ac_status"); } &&
15937          { ac_try='test -s "conftest$ac_exeext"'
15938   { (eval echo "$as_me:15938: \"$ac_try\"") >&5
15939   (eval $ac_try) 2>&5
15940   ac_status=$?
15941   echo "$as_me:15941: \$? = $ac_status" >&5
15942   (exit "$ac_status"); }; }; then
15943   ac_cv_func_pthread_kill=yes
15944 else
15945   echo "$as_me: failed program was:" >&5
15946 cat "conftest.$ac_ext" >&5
15947 ac_cv_func_pthread_kill=no
15948 fi
15949 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15950 fi
15951 echo "$as_me:15951: result: $ac_cv_func_pthread_kill" >&5
15952 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15953 if test "$ac_cv_func_pthread_kill" = yes; then
15954
15955                 echo "$as_me:15955: checking if you want to allow EINTR in wgetch with pthreads" >&5
15956 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15957
15958 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15959 if test "${enable_pthreads_eintr+set}" = set; then
15960   enableval="$enable_pthreads_eintr"
15961   use_pthreads_eintr=$enableval
15962 else
15963   use_pthreads_eintr=no
15964 fi;
15965                 echo "$as_me:15965: result: $use_pthreads_eintr" >&5
15966 echo "${ECHO_T}$use_pthreads_eintr" >&6
15967                 if test "x$use_pthreads_eintr" = xyes ; then
15968
15969 cat >>confdefs.h <<\EOF
15970 #define USE_PTHREADS_EINTR 1
15971 EOF
15972
15973                 fi
15974 fi
15975
15976         echo "$as_me:15976: checking if you want to use weak-symbols for pthreads" >&5
15977 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15978
15979 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15980 if test "${enable_weak_symbols+set}" = set; then
15981   enableval="$enable_weak_symbols"
15982   use_weak_symbols=$enableval
15983 else
15984   use_weak_symbols=no
15985 fi;
15986         echo "$as_me:15986: result: $use_weak_symbols" >&5
15987 echo "${ECHO_T}$use_weak_symbols" >&6
15988         if test "x$use_weak_symbols" = xyes ; then
15989
15990 echo "$as_me:15990: checking if $CC supports weak symbols" >&5
15991 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15992 if test "${cf_cv_weak_symbols+set}" = set; then
15993   echo $ECHO_N "(cached) $ECHO_C" >&6
15994 else
15995
15996 cat >"conftest.$ac_ext" <<_ACEOF
15997 #line 15997 "configure"
15998 #include "confdefs.h"
15999
16000 #include <stdio.h>
16001 int
16002 main (void)
16003 {
16004
16005 #if defined(__GNUC__)
16006 #  if defined __USE_ISOC99
16007 #    define _cat_pragma(exp)    _Pragma(#exp)
16008 #    define _weak_pragma(exp)   _cat_pragma(weak name)
16009 #  else
16010 #    define _weak_pragma(exp)
16011 #  endif
16012 #  define _declare(name)        __extension__ extern __typeof__(name) name
16013 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
16014 #endif
16015
16016 weak_symbol(fopen);
16017
16018   ;
16019   return 0;
16020 }
16021 _ACEOF
16022 rm -f "conftest.$ac_objext"
16023 if { (eval echo "$as_me:16023: \"$ac_compile\"") >&5
16024   (eval $ac_compile) 2>&5
16025   ac_status=$?
16026   echo "$as_me:16026: \$? = $ac_status" >&5
16027   (exit "$ac_status"); } &&
16028          { ac_try='test -s "conftest.$ac_objext"'
16029   { (eval echo "$as_me:16029: \"$ac_try\"") >&5
16030   (eval $ac_try) 2>&5
16031   ac_status=$?
16032   echo "$as_me:16032: \$? = $ac_status" >&5
16033   (exit "$ac_status"); }; }; then
16034   cf_cv_weak_symbols=yes
16035 else
16036   echo "$as_me: failed program was:" >&5
16037 cat "conftest.$ac_ext" >&5
16038 cf_cv_weak_symbols=no
16039 fi
16040 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16041
16042 fi
16043 echo "$as_me:16043: result: $cf_cv_weak_symbols" >&5
16044 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
16045
16046         else
16047                 cf_cv_weak_symbols=no
16048         fi
16049
16050         if test "x$cf_cv_weak_symbols" = xyes ; then
16051
16052 cat >>confdefs.h <<\EOF
16053 #define USE_WEAK_SYMBOLS 1
16054 EOF
16055
16056         fi
16057 fi
16058
16059 PTHREAD=
16060 if test "x$with_pthread" = "xyes" ; then
16061
16062 cat >>confdefs.h <<\EOF
16063 #define USE_PTHREADS 1
16064 EOF
16065
16066         enable_reentrant=yes
16067         if test "x$cf_cv_weak_symbols" = xyes ; then
16068                 PTHREAD=-lpthread
16069
16070 cf_add_libs="$PRIVATE_LIBS"
16071 # reverse order
16072 cf_add_0lib=
16073 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16074 # filter duplicates
16075 for cf_add_1lib in $cf_add_0lib; do
16076         for cf_add_2lib in $cf_add_libs; do
16077                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16078                         cf_add_1lib=
16079                         break
16080                 fi
16081         done
16082         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16083 done
16084 PRIVATE_LIBS="$cf_add_libs"
16085
16086         fi
16087 fi
16088
16089 # Reentrant code has to be opaque; there's little advantage to making ncurses
16090 # opaque outside of that, so there is no --enable-opaque option.  We can use
16091 # this option without --with-pthreads, but this will be always set for
16092 # pthreads.
16093 echo "$as_me:16093: checking if you want reentrant code" >&5
16094 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
16095
16096 # Check whether --enable-reentrant or --disable-reentrant was given.
16097 if test "${enable_reentrant+set}" = set; then
16098   enableval="$enable_reentrant"
16099   with_reentrant=$enableval
16100 else
16101   with_reentrant=no
16102 fi;
16103 echo "$as_me:16103: result: $with_reentrant" >&5
16104 echo "${ECHO_T}$with_reentrant" >&6
16105 if test "x$with_reentrant" = xyes ; then
16106         cf_cv_enable_reentrant=1
16107         cf_cv_enable_opaque="NCURSES_INTERNALS"
16108         NCURSES_SIZE_T=int
16109         if test "x$cf_cv_weak_symbols" = xyes ; then
16110
16111 # remove pthread library from $LIBS
16112 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
16113
16114 cf_add_libs="$TEST_LIBS"
16115 # reverse order
16116 cf_add_0lib=
16117 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16118 # filter duplicates
16119 for cf_add_1lib in $cf_add_0lib; do
16120         for cf_add_2lib in $cf_add_libs; do
16121                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16122                         cf_add_1lib=
16123                         break
16124                 fi
16125         done
16126         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16127 done
16128 TEST_LIBS="$cf_add_libs"
16129
16130 cf_add_libs="$TEST_LIBS2"
16131 # reverse order
16132 cf_add_0lib=
16133 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16134 # filter duplicates
16135 for cf_add_1lib in $cf_add_0lib; do
16136         for cf_add_2lib in $cf_add_libs; do
16137                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16138                         cf_add_1lib=
16139                         break
16140                 fi
16141         done
16142         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16143 done
16144 TEST_LIBS2="$cf_add_libs"
16145
16146 cf_add_libs="$PRIVATE_LIBS"
16147 # reverse order
16148 cf_add_0lib=
16149 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16150 # filter duplicates
16151 for cf_add_1lib in $cf_add_0lib; do
16152         for cf_add_2lib in $cf_add_libs; do
16153                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16154                         cf_add_1lib=
16155                         break
16156                 fi
16157         done
16158         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16159 done
16160 PRIVATE_LIBS="$cf_add_libs"
16161
16162         else
16163                 # when not using weak symbols but with_reentrant,
16164                 # add 't' to the library suffix on all platforms
16165                 # except cygwin, where we only do that if ALSO
16166                 # compiling with full thread support.
16167                 case "$host" in
16168                 (*cygwin* | *msys*)
16169                         if test "$with_pthread" = "yes" ; then
16170                                 if test "x$disable_lib_suffixes" = "xno" ; then
16171                                         LIB_SUFFIX="t${LIB_SUFFIX}"
16172                                 fi
16173                         fi ;;
16174                 (*)
16175                         if test "x$disable_lib_suffixes" = "xno" ; then
16176                                 LIB_SUFFIX="t${LIB_SUFFIX}"
16177                         fi
16178                         ;;
16179                 esac
16180         fi
16181
16182 cat >>confdefs.h <<\EOF
16183 #define USE_REENTRANT 1
16184 EOF
16185
16186 if test "${with_abi_version+set}" != set; then
16187         case "$cf_cv_rel_version" in
16188         (5.*)
16189                 cf_cv_rel_version=6.0
16190                 cf_cv_abi_version=6
16191                 cf_cv_abi_default=6
16192                 { echo "$as_me:16192: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
16193 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
16194                 ;;
16195         esac
16196 fi
16197
16198 else
16199         cf_cv_enable_reentrant=0
16200         cf_cv_enable_opaque="NCURSES_OPAQUE"
16201         NCURSES_SIZE_T=$cf_dft_ordinate_type
16202 fi
16203
16204 echo "$as_me:16204: checking whether curses library structures should be opaque" >&5
16205 echo $ECHO_N "checking whether curses library structures should be opaque... $ECHO_C" >&6
16206
16207 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
16208 if test "${enable_opaque_curses+set}" = set; then
16209   enableval="$enable_opaque_curses"
16210   test "$enableval" != yes && enableval=no
16211         if test "$enableval" != "no" ; then
16212     enable_opaque_curses=yes
16213         else
16214
16215          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16216          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16217
16218         fi
16219 else
16220   enableval=no
16221
16222          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16223          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16224
16225 fi;
16226 echo "$as_me:16226: result: $enable_opaque_curses" >&5
16227 echo "${ECHO_T}$enable_opaque_curses" >&6
16228
16229 test "$cf_cv_enable_reentrant" = 1 && \
16230 test "$enable_opaque_curses" = no && \
16231 { { echo "$as_me:16231: error: reentrant configuration requires opaque library" >&5
16232 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
16233    { (exit 1); exit 1; }; }
16234
16235 echo "$as_me:16235: checking whether form library structures should be opaque" >&5
16236 echo $ECHO_N "checking whether form library structures should be opaque... $ECHO_C" >&6
16237
16238 # Check whether --enable-opaque-form or --disable-opaque-form was given.
16239 if test "${enable_opaque_form+set}" = set; then
16240   enableval="$enable_opaque_form"
16241   enable_opaque_form=yes
16242 else
16243   enable_opaque_form=$cf_dft_opaque_curses
16244 fi;
16245 echo "$as_me:16245: result: $enable_opaque_form" >&5
16246 echo "${ECHO_T}$enable_opaque_form" >&6
16247
16248 echo "$as_me:16248: checking whether menu library structures should be opaque" >&5
16249 echo $ECHO_N "checking whether menu library structures should be opaque... $ECHO_C" >&6
16250
16251 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
16252 if test "${enable_opaque_menu+set}" = set; then
16253   enableval="$enable_opaque_menu"
16254   enable_opaque_menu=yes
16255 else
16256   enable_opaque_menu=$cf_dft_opaque_curses
16257 fi;
16258 echo "$as_me:16258: result: $enable_opaque_menu" >&5
16259 echo "${ECHO_T}$enable_opaque_menu" >&6
16260
16261 echo "$as_me:16261: checking whether panel library structures should be opaque" >&5
16262 echo $ECHO_N "checking whether panel library structures should be opaque... $ECHO_C" >&6
16263
16264 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
16265 if test "${enable_opaque_panel+set}" = set; then
16266   enableval="$enable_opaque_panel"
16267   enable_opaque_panel=yes
16268 else
16269   enable_opaque_panel=$cf_dft_opaque_curses
16270 fi;
16271 echo "$as_me:16271: result: $enable_opaque_panel" >&5
16272 echo "${ECHO_T}$enable_opaque_panel" >&6
16273
16274 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
16275 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
16276 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
16277 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
16278
16279 ### Allow using a different wrap-prefix
16280 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
16281         echo "$as_me:16281: checking for prefix used to wrap public variables" >&5
16282 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
16283
16284 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
16285 if test "${with_wrap_prefix+set}" = set; then
16286   withval="$with_wrap_prefix"
16287   NCURSES_WRAP_PREFIX=$withval
16288 else
16289   NCURSES_WRAP_PREFIX=_nc_
16290 fi;
16291         echo "$as_me:16291: result: $NCURSES_WRAP_PREFIX" >&5
16292 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
16293 else
16294         NCURSES_WRAP_PREFIX=_nc_
16295 fi
16296
16297 cat >>confdefs.h <<EOF
16298 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
16299 EOF
16300
16301 ###############################################################################
16302 # These options are relatively safe to experiment with.
16303
16304 echo "$as_me:16304: checking if you want all development code" >&5
16305 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
16306
16307 # Check whether --with-develop or --without-develop was given.
16308 if test "${with_develop+set}" = set; then
16309   withval="$with_develop"
16310   with_develop=$withval
16311 else
16312   with_develop=no
16313 fi;
16314 echo "$as_me:16314: result: $with_develop" >&5
16315 echo "${ECHO_T}$with_develop" >&6
16316
16317 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
16318 echo "$as_me:16318: checking if you want hard-tabs code" >&5
16319 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
16320
16321 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
16322 if test "${enable_hard_tabs+set}" = set; then
16323   enableval="$enable_hard_tabs"
16324
16325 else
16326   enable_hard_tabs=$with_develop
16327 fi;
16328 echo "$as_me:16328: result: $enable_hard_tabs" >&5
16329 echo "${ECHO_T}$enable_hard_tabs" >&6
16330 test "x$enable_hard_tabs" = xyes &&
16331 cat >>confdefs.h <<\EOF
16332 #define USE_HARD_TABS 1
16333 EOF
16334
16335 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
16336 echo "$as_me:16336: checking if you want limited support for xmc" >&5
16337 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
16338
16339 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
16340 if test "${enable_xmc_glitch+set}" = set; then
16341   enableval="$enable_xmc_glitch"
16342
16343 else
16344   enable_xmc_glitch=$with_develop
16345 fi;
16346 echo "$as_me:16346: result: $enable_xmc_glitch" >&5
16347 echo "${ECHO_T}$enable_xmc_glitch" >&6
16348 test "x$enable_xmc_glitch" = xyes &&
16349 cat >>confdefs.h <<\EOF
16350 #define USE_XMC_SUPPORT 1
16351 EOF
16352
16353 ###############################################################################
16354 # These are just experimental, probably should not be in a package:
16355
16356 echo "$as_me:16356: checking if you do not want to assume colors are white-on-black" >&5
16357 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
16358
16359 # Check whether --enable-assumed-color or --disable-assumed-color was given.
16360 if test "${enable_assumed_color+set}" = set; then
16361   enableval="$enable_assumed_color"
16362   with_assumed_color=$enableval
16363 else
16364   with_assumed_color=yes
16365 fi;
16366 echo "$as_me:16366: result: $with_assumed_color" >&5
16367 echo "${ECHO_T}$with_assumed_color" >&6
16368 test "x$with_assumed_color" = xyes &&
16369 cat >>confdefs.h <<\EOF
16370 #define USE_ASSUMED_COLOR 1
16371 EOF
16372
16373 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
16374 echo "$as_me:16374: checking if you want hashmap scrolling-optimization code" >&5
16375 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
16376
16377 # Check whether --enable-hashmap or --disable-hashmap was given.
16378 if test "${enable_hashmap+set}" = set; then
16379   enableval="$enable_hashmap"
16380   with_hashmap=$enableval
16381 else
16382   with_hashmap=yes
16383 fi;
16384 echo "$as_me:16384: result: $with_hashmap" >&5
16385 echo "${ECHO_T}$with_hashmap" >&6
16386 test "x$with_hashmap" = xyes &&
16387 cat >>confdefs.h <<\EOF
16388 #define USE_HASHMAP 1
16389 EOF
16390
16391 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
16392 echo "$as_me:16392: checking if you want code to check screensize" >&5
16393 echo $ECHO_N "checking if you want code to check screensize... $ECHO_C" >&6
16394
16395 # Check whether --enable-check-size or --disable-check-size was given.
16396 if test "${enable_check_size+set}" = set; then
16397   enableval="$enable_check_size"
16398   with_check_size=$enableval
16399 else
16400   with_check_size=no
16401 fi;
16402 echo "$as_me:16402: result: $with_check_size" >&5
16403 echo "${ECHO_T}$with_check_size" >&6
16404 test "x$with_check_size" = xyes &&
16405 cat >>confdefs.h <<\EOF
16406 #define USE_CHECK_SIZE 1
16407 EOF
16408
16409 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
16410 echo "$as_me:16410: checking if you want colorfgbg code" >&5
16411 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
16412
16413 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
16414 if test "${enable_colorfgbg+set}" = set; then
16415   enableval="$enable_colorfgbg"
16416   with_colorfgbg=$enableval
16417 else
16418   with_colorfgbg=no
16419 fi;
16420 echo "$as_me:16420: result: $with_colorfgbg" >&5
16421 echo "${ECHO_T}$with_colorfgbg" >&6
16422 test "x$with_colorfgbg" = xyes &&
16423 cat >>confdefs.h <<\EOF
16424 #define USE_COLORFGBG 1
16425 EOF
16426
16427 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
16428 echo "$as_me:16428: checking if you want to use gcc -fvisibility option" >&5
16429 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
16430
16431 # Check whether --enable-fvisibility or --disable-fvisibility was given.
16432 if test "${enable_fvisibility+set}" = set; then
16433   enableval="$enable_fvisibility"
16434   cf_with_fvisibility=$enableval
16435 else
16436   cf_with_fvisibility=no
16437 fi;
16438 echo "$as_me:16438: result: $cf_with_fvisibility" >&5
16439 echo "${ECHO_T}$cf_with_fvisibility" >&6
16440
16441 NCURSES_IMPEXP=
16442 NCURSES_CXX_IMPEXP=
16443 if test "x$cf_with_fvisibility" = xyes; then
16444
16445 echo "$as_me:16445: checking if $CC -fvisibility=hidden option works" >&5
16446 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
16447 if test "${cf_cv_fvisibility_hidden+set}" = set; then
16448   echo $ECHO_N "(cached) $ECHO_C" >&6
16449 else
16450
16451     cf_save_cflags="$CFLAGS"
16452     CFLAGS="$CFLAGS -fvisibility=hidden"
16453     cat >"conftest.$ac_ext" <<_ACEOF
16454 #line 16454 "configure"
16455 #include "confdefs.h"
16456
16457 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16458
16459 int
16460 main (void)
16461 {
16462
16463         if (somefunc()) return 1;
16464
16465   ;
16466   return 0;
16467 }
16468 _ACEOF
16469 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16470 if { (eval echo "$as_me:16470: \"$ac_link\"") >&5
16471   (eval $ac_link) 2>&5
16472   ac_status=$?
16473   echo "$as_me:16473: \$? = $ac_status" >&5
16474   (exit "$ac_status"); } &&
16475          { ac_try='test -s "conftest$ac_exeext"'
16476   { (eval echo "$as_me:16476: \"$ac_try\"") >&5
16477   (eval $ac_try) 2>&5
16478   ac_status=$?
16479   echo "$as_me:16479: \$? = $ac_status" >&5
16480   (exit "$ac_status"); }; }; then
16481   cf_cv_fvisibility_hidden=yes
16482 else
16483   echo "$as_me: failed program was:" >&5
16484 cat "conftest.$ac_ext" >&5
16485 cf_cv_fvisibility_hidden=no
16486 fi
16487 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16488     CFLAGS=$cf_save_cflags
16489
16490 fi
16491 echo "$as_me:16491: result: $cf_cv_fvisibility_hidden" >&5
16492 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
16493
16494         if test "x$cf_cv_fvisibility_hidden" = xyes
16495         then
16496
16497 cf_fix_cppflags=no
16498 cf_new_cflags=
16499 cf_new_cppflags=
16500 cf_new_extra_cppflags=
16501
16502 for cf_add_cflags in -fvisibility=hidden
16503 do
16504 case "$cf_fix_cppflags" in
16505 (no)
16506         case "$cf_add_cflags" in
16507         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16508                 case "$cf_add_cflags" in
16509                 (-D*)
16510                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16511
16512                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16513                                 && test -z "${cf_tst_cflags}" \
16514                                 && cf_fix_cppflags=yes
16515
16516                         if test "$cf_fix_cppflags" = yes ; then
16517
16518         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16519         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16520
16521                                 continue
16522                         elif test "${cf_tst_cflags}" = "\"'" ; then
16523
16524         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16525         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16526
16527                                 continue
16528                         fi
16529                         ;;
16530                 esac
16531                 case "$CPPFLAGS" in
16532                 (*$cf_add_cflags)
16533                         ;;
16534                 (*)
16535                         case "$cf_add_cflags" in
16536                         (-D*)
16537                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16538
16539 CPPFLAGS=`echo "$CPPFLAGS" | \
16540         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16541                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16542
16543                                 ;;
16544                         esac
16545
16546         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16547         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16548
16549                         ;;
16550                 esac
16551                 ;;
16552         (*)
16553
16554         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16555         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16556
16557                 ;;
16558         esac
16559         ;;
16560 (yes)
16561
16562         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16563         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16564
16565         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16566
16567         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16568                 && test -z "${cf_tst_cflags}" \
16569                 && cf_fix_cppflags=no
16570         ;;
16571 esac
16572 done
16573
16574 if test -n "$cf_new_cflags" ; then
16575
16576         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16577         CFLAGS="${CFLAGS}$cf_new_cflags"
16578
16579 fi
16580
16581 if test -n "$cf_new_cppflags" ; then
16582
16583         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16584         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16585
16586 fi
16587
16588 if test -n "$cf_new_extra_cppflags" ; then
16589
16590         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16591         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16592
16593 fi
16594
16595                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16596         fi
16597         if test -n "$CXX"
16598         then
16599                 ac_ext=cc
16600 ac_cpp='$CXXCPP $CPPFLAGS'
16601 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16602 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16603 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16604 ac_main_return="return"
16605
16606 echo "$as_me:16606: checking if $CXX -fvisibility=hidden option works" >&5
16607 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16608 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16609   echo $ECHO_N "(cached) $ECHO_C" >&6
16610 else
16611
16612     cf_save_cflags="$CXXFLAGS"
16613     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16614     cat >"conftest.$ac_ext" <<_ACEOF
16615 #line 16615 "configure"
16616 #include "confdefs.h"
16617
16618 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16619
16620 int
16621 main (void)
16622 {
16623
16624         if (somefunc()) return 1;
16625
16626   ;
16627   return 0;
16628 }
16629 _ACEOF
16630 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16631 if { (eval echo "$as_me:16631: \"$ac_link\"") >&5
16632   (eval $ac_link) 2>&5
16633   ac_status=$?
16634   echo "$as_me:16634: \$? = $ac_status" >&5
16635   (exit "$ac_status"); } &&
16636          { ac_try='test -s "conftest$ac_exeext"'
16637   { (eval echo "$as_me:16637: \"$ac_try\"") >&5
16638   (eval $ac_try) 2>&5
16639   ac_status=$?
16640   echo "$as_me:16640: \$? = $ac_status" >&5
16641   (exit "$ac_status"); }; }; then
16642   cf_cv_fvisibility_hidden2=yes
16643 else
16644   echo "$as_me: failed program was:" >&5
16645 cat "conftest.$ac_ext" >&5
16646 cf_cv_fvisibility_hidden2=no
16647 fi
16648 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16649     CXXFLAGS=$cf_save_cflags
16650
16651 fi
16652 echo "$as_me:16652: result: $cf_cv_fvisibility_hidden2" >&5
16653 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16654
16655                 if test "x$cf_cv_fvisibility_hidden2" = xyes
16656                 then
16657
16658 cf_save_CXXFLAGS="$CFLAGS"
16659 CFLAGS="$CXXFLAGS"
16660
16661 cf_fix_cppflags=no
16662 cf_new_cflags=
16663 cf_new_cppflags=
16664 cf_new_extra_cppflags=
16665
16666 for cf_add_cflags in -fvisibility=hidden
16667 do
16668 case "$cf_fix_cppflags" in
16669 (no)
16670         case "$cf_add_cflags" in
16671         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16672                 case "$cf_add_cflags" in
16673                 (-D*)
16674                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16675
16676                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16677                                 && test -z "${cf_tst_cflags}" \
16678                                 && cf_fix_cppflags=yes
16679
16680                         if test "$cf_fix_cppflags" = yes ; then
16681
16682         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16683         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16684
16685                                 continue
16686                         elif test "${cf_tst_cflags}" = "\"'" ; then
16687
16688         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16689         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16690
16691                                 continue
16692                         fi
16693                         ;;
16694                 esac
16695                 case "$CPPFLAGS" in
16696                 (*$cf_add_cflags)
16697                         ;;
16698                 (*)
16699                         case "$cf_add_cflags" in
16700                         (-D*)
16701                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16702
16703 CPPFLAGS=`echo "$CPPFLAGS" | \
16704         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16705                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16706
16707                                 ;;
16708                         esac
16709
16710         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16711         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16712
16713                         ;;
16714                 esac
16715                 ;;
16716         (*)
16717
16718         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16719         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16720
16721                 ;;
16722         esac
16723         ;;
16724 (yes)
16725
16726         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16727         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16728
16729         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16730
16731         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16732                 && test -z "${cf_tst_cflags}" \
16733                 && cf_fix_cppflags=no
16734         ;;
16735 esac
16736 done
16737
16738 if test -n "$cf_new_cflags" ; then
16739
16740         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16741         CFLAGS="${CFLAGS}$cf_new_cflags"
16742
16743 fi
16744
16745 if test -n "$cf_new_cppflags" ; then
16746
16747         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16748         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16749
16750 fi
16751
16752 if test -n "$cf_new_extra_cppflags" ; then
16753
16754         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16755         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16756
16757 fi
16758
16759 CXXFLAGS="$CFLAGS"
16760 CFLAGS="$cf_save_CXXFLAGS"
16761
16762                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16763                 fi
16764                 ac_ext=c
16765 ac_cpp='$CPP $CPPFLAGS'
16766 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16767 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16768 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16769 ac_main_return="return"
16770
16771         fi
16772 fi
16773
16774 ###   use option --enable-interop to turn on use of bindings used for interop
16775 echo "$as_me:16775: checking if you want interop bindings" >&5
16776 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16777
16778 # Check whether --enable-interop or --disable-interop was given.
16779 if test "${enable_interop+set}" = set; then
16780   enableval="$enable_interop"
16781   with_exp_interop=$enableval
16782 else
16783   with_exp_interop=$cf_dft_interop
16784 fi;
16785 echo "$as_me:16785: result: $with_exp_interop" >&5
16786 echo "${ECHO_T}$with_exp_interop" >&6
16787
16788 NCURSES_INTEROP_FUNCS=0
16789 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16790
16791 echo "$as_me:16791: checking if you want experimental safe-sprintf code" >&5
16792 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16793
16794 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16795 if test "${enable_safe_sprintf+set}" = set; then
16796   enableval="$enable_safe_sprintf"
16797   with_safe_sprintf=$enableval
16798 else
16799   with_safe_sprintf=no
16800 fi;
16801 echo "$as_me:16801: result: $with_safe_sprintf" >&5
16802 echo "${ECHO_T}$with_safe_sprintf" >&6
16803
16804 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16805 # when hashmap is used scroll hints are useless
16806 if test "$with_hashmap" = no ; then
16807 echo "$as_me:16807: checking if you want to experiment without scrolling-hints code" >&5
16808 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16809
16810 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16811 if test "${enable_scroll_hints+set}" = set; then
16812   enableval="$enable_scroll_hints"
16813   with_scroll_hints=$enableval
16814 else
16815   with_scroll_hints=yes
16816 fi;
16817 echo "$as_me:16817: result: $with_scroll_hints" >&5
16818 echo "${ECHO_T}$with_scroll_hints" >&6
16819 test "x$with_scroll_hints" = xyes &&
16820 cat >>confdefs.h <<\EOF
16821 #define USE_SCROLL_HINTS 1
16822 EOF
16823
16824 fi
16825
16826 echo "$as_me:16826: checking if you want wgetch-events code" >&5
16827 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16828
16829 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16830 if test "${enable_wgetch_events+set}" = set; then
16831   enableval="$enable_wgetch_events"
16832   with_wgetch_events=$enableval
16833 else
16834   with_wgetch_events=no
16835 fi;
16836 echo "$as_me:16836: result: $with_wgetch_events" >&5
16837 echo "${ECHO_T}$with_wgetch_events" >&6
16838 if test "x$with_wgetch_events" = xyes ; then
16839
16840 cat >>confdefs.h <<\EOF
16841 #define NCURSES_WGETCH_EVENTS 1
16842 EOF
16843
16844         NCURSES_WGETCH_EVENTS=1
16845 else
16846         NCURSES_WGETCH_EVENTS=0
16847 fi
16848
16849 case "$cf_cv_system_name" in
16850 (*mingw32*|*mingw64*|*-msvc*)
16851         echo "$as_me:16851: checking if you want experimental-Windows driver" >&5
16852 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16853
16854 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16855 if test "${enable_exp_win32+set}" = set; then
16856   enableval="$enable_exp_win32"
16857   with_exp_win32=$enableval
16858 else
16859   with_exp_win32=no
16860 fi;
16861         echo "$as_me:16861: result: $with_exp_win32" >&5
16862 echo "${ECHO_T}$with_exp_win32" >&6
16863         if test "x$with_exp_win32" = xyes
16864         then
16865
16866 cat >>confdefs.h <<\EOF
16867 #define EXP_WIN32_DRIVER 1
16868 EOF
16869
16870                 EXP_WIN32_DRIVER=1
16871                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16872         else
16873                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16874                 EXP_WIN32_DRIVER=0
16875         fi
16876         ;;
16877 (*)
16878         EXP_WIN32_DRIVER=0
16879         INTERNALS_HDR=
16880         ;;
16881 esac
16882
16883 ###############################################################################
16884
16885 ###     use option --disable-echo to suppress full display compiling commands
16886
16887 echo "$as_me:16887: checking if you want to see long compiling messages" >&5
16888 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16889
16890 # Check whether --enable-echo or --disable-echo was given.
16891 if test "${enable_echo+set}" = set; then
16892   enableval="$enable_echo"
16893   test "$enableval" != no && enableval=yes
16894         if test "$enableval" != "yes" ; then
16895
16896         ECHO_LT='--silent'
16897         ECHO_LD='@echo linking $@;'
16898         RULE_CC='@echo compiling $<'
16899         SHOW_CC='@echo compiling $@'
16900         ECHO_CC='@'
16901
16902         else
16903
16904         ECHO_LT=''
16905         ECHO_LD=''
16906         RULE_CC=''
16907         SHOW_CC=''
16908         ECHO_CC=''
16909
16910         fi
16911 else
16912   enableval=yes
16913
16914         ECHO_LT=''
16915         ECHO_LD=''
16916         RULE_CC=''
16917         SHOW_CC=''
16918         ECHO_CC=''
16919
16920 fi;
16921 echo "$as_me:16921: result: $enableval" >&5
16922 echo "${ECHO_T}$enableval" >&6
16923
16924 if test "x$enable_echo" = xyes; then
16925         ECHO_LINK=
16926 else
16927         ECHO_LINK='@ echo linking $@ ... ;'
16928         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16929         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16930 fi
16931
16932 # --disable-stripping is used for debugging
16933
16934 echo "$as_me:16934: checking if you want to install stripped executables" >&5
16935 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16936
16937 # Check whether --enable-stripping or --disable-stripping was given.
16938 if test "${enable_stripping+set}" = set; then
16939   enableval="$enable_stripping"
16940   test "$enableval" != no && enableval=yes
16941         if test "$enableval" != "yes" ; then
16942     enable_stripping=no
16943         else
16944                 enable_stripping=yes
16945         fi
16946 else
16947   enableval=yes
16948         enable_stripping=yes
16949
16950 fi;
16951 echo "$as_me:16951: result: $enable_stripping" >&5
16952 echo "${ECHO_T}$enable_stripping" >&6
16953
16954 if test "$enable_stripping" = yes
16955 then
16956         INSTALL_OPT_S="-s"
16957 else
16958         INSTALL_OPT_S=
16959 fi
16960
16961 : "${INSTALL:=install}"
16962 echo "$as_me:16962: checking if install accepts -p option" >&5
16963 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16964 if test "${cf_cv_install_p+set}" = set; then
16965   echo $ECHO_N "(cached) $ECHO_C" >&6
16966 else
16967
16968         rm -rf ./conftest*
16969         date >conftest.in
16970         mkdir conftest.out
16971         sleep 3
16972         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16973         then
16974                 if test -f conftest.out/conftest.in
16975                 then
16976                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16977                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16978                         if test -s conftest.err
16979                         then
16980                                 cf_cv_install_p=no
16981                         else
16982                                 cf_cv_install_p=yes
16983                         fi
16984                 else
16985                         cf_cv_install_p=no
16986                 fi
16987         else
16988                 cf_cv_install_p=no
16989         fi
16990         rm -rf ./conftest*
16991
16992 fi
16993 echo "$as_me:16993: result: $cf_cv_install_p" >&5
16994 echo "${ECHO_T}$cf_cv_install_p" >&6
16995
16996 echo "$as_me:16996: checking if install needs to be told about ownership" >&5
16997 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16998 case `$ac_config_guess` in
16999 (*minix)
17000         with_install_o=yes
17001         ;;
17002 (*)
17003         with_install_o=no
17004         ;;
17005 esac
17006
17007 echo "$as_me:17007: result: $with_install_o" >&5
17008 echo "${ECHO_T}$with_install_o" >&6
17009 if test "x$with_install_o" = xyes
17010 then
17011         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'`"
17012 else
17013         INSTALL_OPT_O=
17014 fi
17015
17016 if test -n "$INSTALL_OPT_S"
17017 then
17018         echo "$as_me:17018: checking if you want to specify strip-program" >&5
17019 echo $ECHO_N "checking if you want to specify strip-program... $ECHO_C" >&6
17020
17021 # Check whether --with-strip-program or --without-strip-program was given.
17022 if test "${with_strip_program+set}" = set; then
17023   withval="$with_strip_program"
17024   with_strip_program=$withval
17025 else
17026   with_strip_program=no
17027 fi;
17028         echo "$as_me:17028: result: $with_strip_program" >&5
17029 echo "${ECHO_T}$with_strip_program" >&6
17030         if test "$with_strip_program" != no
17031         then
17032                 echo "$as_me:17032: checking if strip-program is supported with this installer" >&5
17033 echo $ECHO_N "checking if strip-program is supported with this installer... $ECHO_C" >&6
17034                 cf_install_program=`echo "$INSTALL" | sed -e 's%[ ]*[ ]-.%%'`
17035                 check_install_strip=no
17036                 if test -f "$cf_install_program"
17037                 then
17038                         check_install_version=`"$cf_install_program" --version 2>/dev/null | head -n 1 | grep coreutils`
17039                         if test -n "$check_install_version"
17040                         then
17041                                 check_install_strip="option"
17042                         else
17043                                 for check_strip_variable in STRIPBIN STRIP
17044                                 do
17045                                         if strings "$cf_install_program" | grep "^$check_strip_variable$" >/dev/null
17046                                         then
17047                                                 check_install_strip="environ"
17048                                                 break
17049                                         fi
17050                                 done
17051                         fi
17052                 fi
17053                 echo "$as_me:17053: result: $check_install_strip" >&5
17054 echo "${ECHO_T}$check_install_strip" >&6
17055                 case "$check_install_strip" in
17056                 (no)
17057                         { echo "$as_me:17057: WARNING: $cf_install_program does not support strip program option" >&5
17058 echo "$as_me: WARNING: $cf_install_program does not support strip program option" >&2;}
17059                         with_strip_program=no
17060                         ;;
17061                 (environ)
17062                         cat >install.tmp <<-CF_EOF
17063                         #! $SHELL
17064                         STRIPBIN="$with_strip_program" \\
17065                         STRIP="$with_strip_program" \\
17066                         $INSTALL "$@"
17067                         CF_EOF
17068                         INSTALL="`pwd`/install.tmp"
17069                         chmod +x "$INSTALL"
17070                         test -n "$verbose" && echo "    created $INSTALL" 1>&6
17071
17072 echo "${as_me:-configure}:17072: testing created $INSTALL ..." 1>&5
17073
17074                         ;;
17075                 (option)
17076                         INSTALL_OPT_S="$INSTALL_OPT_S --strip-program=\"$with_strip_program\""
17077                         ;;
17078                 esac
17079         fi
17080 fi
17081
17082 # If we're avoiding relinking of shared libraries during install, that is to
17083 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
17084 # the install program has "-p" (for preserving timestamps).
17085 cf_cv_do_reranlib=yes
17086 if test "x$cf_cv_install_p" = xyes
17087 then
17088         if test "x$cf_cv_do_relink" != xyes
17089         then
17090                 cf_cv_do_reranlib=no
17091                 INSTALL_OPT_P="-p"
17092                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
17093         fi
17094 fi
17095
17096 ###     use option --enable-warnings to turn on all gcc warnings
17097
17098 echo "$as_me:17098: checking if you want to use C11 _Noreturn feature" >&5
17099 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
17100
17101 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
17102 if test "${enable_stdnoreturn+set}" = set; then
17103   enableval="$enable_stdnoreturn"
17104   test "$enableval" != yes && enableval=no
17105         if test "$enableval" != "no" ; then
17106     enable_stdnoreturn=yes
17107         else
17108                 enable_stdnoreturn=no
17109         fi
17110 else
17111   enableval=no
17112         enable_stdnoreturn=no
17113
17114 fi;
17115 echo "$as_me:17115: result: $enable_stdnoreturn" >&5
17116 echo "${ECHO_T}$enable_stdnoreturn" >&6
17117
17118 if test $enable_stdnoreturn = yes; then
17119 echo "$as_me:17119: checking for C11 _Noreturn feature" >&5
17120 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
17121 if test "${cf_cv_c11_noreturn+set}" = set; then
17122   echo $ECHO_N "(cached) $ECHO_C" >&6
17123 else
17124   cat >"conftest.$ac_ext" <<_ACEOF
17125 #line 17125 "configure"
17126 #include "confdefs.h"
17127
17128 $ac_includes_default
17129 #include <stdnoreturn.h>
17130 static _Noreturn void giveup(void) { exit(0); }
17131
17132 int
17133 main (void)
17134 {
17135 if (feof(stdin)) giveup()
17136   ;
17137   return 0;
17138 }
17139 _ACEOF
17140 rm -f "conftest.$ac_objext"
17141 if { (eval echo "$as_me:17141: \"$ac_compile\"") >&5
17142   (eval $ac_compile) 2>&5
17143   ac_status=$?
17144   echo "$as_me:17144: \$? = $ac_status" >&5
17145   (exit "$ac_status"); } &&
17146          { ac_try='test -s "conftest.$ac_objext"'
17147   { (eval echo "$as_me:17147: \"$ac_try\"") >&5
17148   (eval $ac_try) 2>&5
17149   ac_status=$?
17150   echo "$as_me:17150: \$? = $ac_status" >&5
17151   (exit "$ac_status"); }; }; then
17152   cf_cv_c11_noreturn=yes
17153 else
17154   echo "$as_me: failed program was:" >&5
17155 cat "conftest.$ac_ext" >&5
17156 cf_cv_c11_noreturn=no
17157 fi
17158 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17159
17160 fi
17161 echo "$as_me:17161: result: $cf_cv_c11_noreturn" >&5
17162 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
17163 else
17164         cf_cv_c11_noreturn=no,
17165 fi
17166
17167 if test "$cf_cv_c11_noreturn" = yes; then
17168
17169 cat >>confdefs.h <<\EOF
17170 #define HAVE_STDNORETURN_H 1
17171 EOF
17172
17173 cat >>confdefs.h <<EOF
17174 #define STDC_NORETURN _Noreturn
17175 EOF
17176
17177         HAVE_STDNORETURN_H=1
17178 else
17179         HAVE_STDNORETURN_H=0
17180 fi
17181
17182 if test "$GCC" = yes || test "$GXX" = yes
17183 then
17184
17185 if test "$GCC" = yes || test "$GXX" = yes
17186 then
17187         case $CFLAGS in
17188         (*-Werror=*)
17189                 cf_temp_flags=
17190                 for cf_temp_scan in $CFLAGS
17191                 do
17192                         case "x$cf_temp_scan" in
17193                         (x-Werror=format*)
17194
17195         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17196         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17197
17198                                 ;;
17199                         (x-Werror=*)
17200
17201         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17202         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17203
17204                                 ;;
17205                         (*)
17206
17207         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17208         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17209
17210                                 ;;
17211                         esac
17212                 done
17213                 if test "x$CFLAGS" != "x$cf_temp_flags"
17214                 then
17215                         test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
17216
17217 echo "${as_me:-configure}:17217: testing repairing CFLAGS: $CFLAGS ..." 1>&5
17218
17219                         CFLAGS="$cf_temp_flags"
17220                         test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
17221
17222 echo "${as_me:-configure}:17222: testing ... fixed $CFLAGS ..." 1>&5
17223
17224                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17225
17226 echo "${as_me:-configure}:17226: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17227
17228                 fi
17229                 ;;
17230         esac
17231 fi
17232
17233 if test "$GCC" = yes || test "$GXX" = yes
17234 then
17235         case $CPPFLAGS in
17236         (*-Werror=*)
17237                 cf_temp_flags=
17238                 for cf_temp_scan in $CPPFLAGS
17239                 do
17240                         case "x$cf_temp_scan" in
17241                         (x-Werror=format*)
17242
17243         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17244         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17245
17246                                 ;;
17247                         (x-Werror=*)
17248
17249         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17250         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17251
17252                                 ;;
17253                         (*)
17254
17255         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17256         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17257
17258                                 ;;
17259                         esac
17260                 done
17261                 if test "x$CPPFLAGS" != "x$cf_temp_flags"
17262                 then
17263                         test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
17264
17265 echo "${as_me:-configure}:17265: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
17266
17267                         CPPFLAGS="$cf_temp_flags"
17268                         test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
17269
17270 echo "${as_me:-configure}:17270: testing ... fixed $CPPFLAGS ..." 1>&5
17271
17272                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17273
17274 echo "${as_me:-configure}:17274: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17275
17276                 fi
17277                 ;;
17278         esac
17279 fi
17280
17281 if test "$GCC" = yes || test "$GXX" = yes
17282 then
17283         case $LDFLAGS in
17284         (*-Werror=*)
17285                 cf_temp_flags=
17286                 for cf_temp_scan in $LDFLAGS
17287                 do
17288                         case "x$cf_temp_scan" in
17289                         (x-Werror=format*)
17290
17291         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17292         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17293
17294                                 ;;
17295                         (x-Werror=*)
17296
17297         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17298         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17299
17300                                 ;;
17301                         (*)
17302
17303         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17304         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17305
17306                                 ;;
17307                         esac
17308                 done
17309                 if test "x$LDFLAGS" != "x$cf_temp_flags"
17310                 then
17311                         test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
17312
17313 echo "${as_me:-configure}:17313: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
17314
17315                         LDFLAGS="$cf_temp_flags"
17316                         test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
17317
17318 echo "${as_me:-configure}:17318: testing ... fixed $LDFLAGS ..." 1>&5
17319
17320                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17321
17322 echo "${as_me:-configure}:17322: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17323
17324                 fi
17325                 ;;
17326         esac
17327 fi
17328
17329 echo "$as_me:17329: checking if you want to turn on gcc warnings" >&5
17330 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
17331
17332 # Check whether --enable-warnings or --disable-warnings was given.
17333 if test "${enable_warnings+set}" = set; then
17334   enableval="$enable_warnings"
17335   test "$enableval" != yes && enableval=no
17336         if test "$enableval" != "no" ; then
17337     enable_warnings=yes
17338         else
17339                 enable_warnings=no
17340         fi
17341 else
17342   enableval=no
17343         enable_warnings=no
17344
17345 fi;
17346 echo "$as_me:17346: result: $enable_warnings" >&5
17347 echo "${ECHO_T}$enable_warnings" >&6
17348 if test "$enable_warnings" = "yes"
17349 then
17350
17351 if test "x$have_x" = xyes; then
17352
17353 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
17354 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
17355 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
17356 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
17357 for cf_X_CFLAGS in $X_CFLAGS
17358 do
17359         case "x$cf_X_CFLAGS" in
17360         x-[IUD]*)
17361                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
17362                 ;;
17363         *)
17364                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
17365                 ;;
17366         esac
17367 done
17368
17369 cat >"conftest.$ac_ext" <<_ACEOF
17370 #line 17370 "configure"
17371 #include "confdefs.h"
17372
17373 #include <stdlib.h>
17374 #include <X11/Intrinsic.h>
17375
17376 int
17377 main (void)
17378 {
17379 String foo = malloc(1); free((void*)foo)
17380   ;
17381   return 0;
17382 }
17383 _ACEOF
17384 rm -f "conftest.$ac_objext"
17385 if { (eval echo "$as_me:17385: \"$ac_compile\"") >&5
17386   (eval $ac_compile) 2>&5
17387   ac_status=$?
17388   echo "$as_me:17388: \$? = $ac_status" >&5
17389   (exit "$ac_status"); } &&
17390          { ac_try='test -s "conftest.$ac_objext"'
17391   { (eval echo "$as_me:17391: \"$ac_try\"") >&5
17392   (eval $ac_try) 2>&5
17393   ac_status=$?
17394   echo "$as_me:17394: \$? = $ac_status" >&5
17395   (exit "$ac_status"); }; }; then
17396
17397 echo "$as_me:17397: checking for X11/Xt const-feature" >&5
17398 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
17399 if test "${cf_cv_const_x_string+set}" = set; then
17400   echo $ECHO_N "(cached) $ECHO_C" >&6
17401 else
17402
17403         cat >"conftest.$ac_ext" <<_ACEOF
17404 #line 17404 "configure"
17405 #include "confdefs.h"
17406
17407 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
17408 #undef  XTSTRINGDEFINES /* X11R5 and later */
17409 #include <stdlib.h>
17410 #include <X11/Intrinsic.h>
17411
17412 int
17413 main (void)
17414 {
17415 String foo = malloc(1); *foo = 0
17416   ;
17417   return 0;
17418 }
17419 _ACEOF
17420 rm -f "conftest.$ac_objext"
17421 if { (eval echo "$as_me:17421: \"$ac_compile\"") >&5
17422   (eval $ac_compile) 2>&5
17423   ac_status=$?
17424   echo "$as_me:17424: \$? = $ac_status" >&5
17425   (exit "$ac_status"); } &&
17426          { ac_try='test -s "conftest.$ac_objext"'
17427   { (eval echo "$as_me:17427: \"$ac_try\"") >&5
17428   (eval $ac_try) 2>&5
17429   ac_status=$?
17430   echo "$as_me:17430: \$? = $ac_status" >&5
17431   (exit "$ac_status"); }; }; then
17432
17433                         cf_cv_const_x_string=no
17434
17435 else
17436   echo "$as_me: failed program was:" >&5
17437 cat "conftest.$ac_ext" >&5
17438
17439                         cf_cv_const_x_string=yes
17440
17441 fi
17442 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17443
17444 fi
17445 echo "$as_me:17445: result: $cf_cv_const_x_string" >&5
17446 echo "${ECHO_T}$cf_cv_const_x_string" >&6
17447
17448 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
17449 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
17450 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
17451
17452 case "$cf_cv_const_x_string" in
17453 (no)
17454
17455         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17456         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
17457
17458         ;;
17459 (*)
17460
17461         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17462         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
17463
17464         ;;
17465 esac
17466
17467 else
17468   echo "$as_me: failed program was:" >&5
17469 cat "conftest.$ac_ext" >&5
17470 fi
17471 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17472  fi
17473 cat > "conftest.$ac_ext" <<EOF
17474 #line 17474 "${as_me:-configure}"
17475 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17476 EOF
17477 if test "$INTEL_COMPILER" = yes
17478 then
17479 # The "-wdXXX" options suppress warnings:
17480 # remark #1419: external declaration in primary source file
17481 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17482 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17483 # remark #193: zero used for undefined preprocessing identifier
17484 # remark #593: variable "curs_sb_left_arrow" was set but never used
17485 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17486 # remark #869: parameter "tw" was never referenced
17487 # remark #981: operands are evaluated in unspecified order
17488 # warning #279: controlling expression is constant
17489
17490         { echo "$as_me:17490: checking for $CC warning options..." >&5
17491 echo "$as_me: checking for $CC warning options..." >&6;}
17492         cf_save_CFLAGS="$CFLAGS"
17493         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
17494         for cf_opt in \
17495                 wd1419 \
17496                 wd1683 \
17497                 wd1684 \
17498                 wd193 \
17499                 wd593 \
17500                 wd279 \
17501                 wd810 \
17502                 wd869 \
17503                 wd981
17504         do
17505                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17506                 if { (eval echo "$as_me:17506: \"$ac_compile\"") >&5
17507   (eval $ac_compile) 2>&5
17508   ac_status=$?
17509   echo "$as_me:17509: \$? = $ac_status" >&5
17510   (exit "$ac_status"); }; then
17511                         test -n "$verbose" && echo "$as_me:17511: result: ... -$cf_opt" >&5
17512 echo "${ECHO_T}... -$cf_opt" >&6
17513                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17514                 fi
17515         done
17516         CFLAGS="$cf_save_CFLAGS"
17517 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
17518 then
17519         { echo "$as_me:17519: checking for $CC warning options..." >&5
17520 echo "$as_me: checking for $CC warning options..." >&6;}
17521         cf_save_CFLAGS="$CFLAGS"
17522         cf_warn_CONST=""
17523         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17524         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17525         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17526         for cf_opt in W Wall \
17527                 Wbad-function-cast \
17528                 Wcast-align \
17529                 Wcast-qual \
17530                 Wdeclaration-after-statement \
17531                 Wextra \
17532                 Winline \
17533                 Wmissing-declarations \
17534                 Wmissing-prototypes \
17535                 Wnested-externs \
17536                 Wpointer-arith \
17537                 Wshadow \
17538                 Wstrict-prototypes \
17539                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
17540         do
17541                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17542                 if { (eval echo "$as_me:17542: \"$ac_compile\"") >&5
17543   (eval $ac_compile) 2>&5
17544   ac_status=$?
17545   echo "$as_me:17545: \$? = $ac_status" >&5
17546   (exit "$ac_status"); }; then
17547                         test -n "$verbose" && echo "$as_me:17547: result: ... -$cf_opt" >&5
17548 echo "${ECHO_T}... -$cf_opt" >&6
17549                         case "$cf_opt" in
17550                         (Winline)
17551                                 case "$GCC_VERSION" in
17552                                 ([34].*)
17553                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17554
17555 echo "${as_me:-configure}:17555: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17556
17557                                         continue;;
17558                                 esac
17559                                 ;;
17560                         (Wpointer-arith)
17561                                 case "$GCC_VERSION" in
17562                                 ([12].*)
17563                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17564
17565 echo "${as_me:-configure}:17565: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17566
17567                                         continue;;
17568                                 esac
17569                                 ;;
17570                         esac
17571                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17572                 fi
17573         done
17574         CFLAGS="$cf_save_CFLAGS"
17575 fi
17576 rm -rf ./conftest*
17577
17578 fi
17579
17580 if test "$GCC" = yes || test "$GXX" = yes
17581 then
17582 cat > conftest.i <<EOF
17583 #ifndef GCC_PRINTF
17584 #define GCC_PRINTF 0
17585 #endif
17586 #ifndef GCC_SCANF
17587 #define GCC_SCANF 0
17588 #endif
17589 #ifndef GCC_NORETURN
17590 #define GCC_NORETURN /* nothing */
17591 #endif
17592 #ifndef GCC_UNUSED
17593 #define GCC_UNUSED /* nothing */
17594 #endif
17595 EOF
17596 if test "$GCC" = yes
17597 then
17598         { echo "$as_me:17598: checking for $CC __attribute__ directives..." >&5
17599 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
17600 cat > "conftest.$ac_ext" <<EOF
17601 #line 17601 "${as_me:-configure}"
17602 #include <stdio.h>
17603 #include "confdefs.h"
17604 #include "conftest.h"
17605 #include "conftest.i"
17606 #if     GCC_PRINTF
17607 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17608 #else
17609 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17610 #endif
17611 #if     GCC_SCANF
17612 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
17613 #else
17614 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
17615 #endif
17616 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17617 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
17618 extern GCC_NORETURN void foo(void);
17619 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
17620 EOF
17621         cf_printf_attribute=no
17622         cf_scanf_attribute=no
17623         for cf_attribute in scanf printf unused noreturn
17624         do
17625
17626 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17627
17628                 cf_directive="__attribute__(($cf_attribute))"
17629                 echo "checking for $CC $cf_directive" 1>&5
17630
17631                 case "$cf_attribute" in
17632                 (printf)
17633                         cf_printf_attribute=yes
17634                         cat >conftest.h <<EOF
17635 #define GCC_$cf_ATTRIBUTE 1
17636 EOF
17637                         ;;
17638                 (scanf)
17639                         cf_scanf_attribute=yes
17640                         cat >conftest.h <<EOF
17641 #define GCC_$cf_ATTRIBUTE 1
17642 EOF
17643                         ;;
17644                 (*)
17645                         cat >conftest.h <<EOF
17646 #define GCC_$cf_ATTRIBUTE $cf_directive
17647 EOF
17648                         ;;
17649                 esac
17650
17651                 if { (eval echo "$as_me:17651: \"$ac_compile\"") >&5
17652   (eval $ac_compile) 2>&5
17653   ac_status=$?
17654   echo "$as_me:17654: \$? = $ac_status" >&5
17655   (exit "$ac_status"); }; then
17656                         test -n "$verbose" && echo "$as_me:17656: result: ... $cf_attribute" >&5
17657 echo "${ECHO_T}... $cf_attribute" >&6
17658                         cat conftest.h >>confdefs.h
17659                         case "$cf_attribute" in
17660                         (noreturn)
17661
17662 cat >>confdefs.h <<EOF
17663 #define GCC_NORETURN $cf_directive
17664 EOF
17665
17666                                 ;;
17667                         (printf)
17668                                 cf_value='/* nothing */'
17669                                 if test "$cf_printf_attribute" != no ; then
17670                                         cf_value='__attribute__((format(printf,fmt,var)))'
17671
17672 cat >>confdefs.h <<\EOF
17673 #define GCC_PRINTF 1
17674 EOF
17675
17676                                 fi
17677
17678 cat >>confdefs.h <<EOF
17679 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17680 EOF
17681
17682                                 ;;
17683                         (scanf)
17684                                 cf_value='/* nothing */'
17685                                 if test "$cf_scanf_attribute" != no ; then
17686                                         cf_value='__attribute__((format(scanf,fmt,var)))'
17687
17688 cat >>confdefs.h <<\EOF
17689 #define GCC_SCANF 1
17690 EOF
17691
17692                                 fi
17693
17694 cat >>confdefs.h <<EOF
17695 #define GCC_SCANFLIKE(fmt,var) $cf_value
17696 EOF
17697
17698                                 ;;
17699                         (unused)
17700
17701 cat >>confdefs.h <<EOF
17702 #define GCC_UNUSED $cf_directive
17703 EOF
17704
17705                                 ;;
17706                         esac
17707                 fi
17708         done
17709 else
17710         ${FGREP-fgrep} define conftest.i >>confdefs.h
17711 fi
17712 rm -rf ./conftest*
17713 fi
17714
17715 fi
17716
17717 if test "x$enable_warnings" = "xyes"; then
17718
17719         ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
17720
17721         if test "x$cf_with_cxx" = xyes ; then
17722
17723 INTEL_CPLUSPLUS=no
17724
17725 if test "$GCC" = yes ; then
17726         case "$host_os" in
17727         (linux*|gnu*)
17728                 echo "$as_me:17728: checking if this is really Intel C++ compiler" >&5
17729 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
17730                 cf_save_CFLAGS="$CXXFLAGS"
17731                 CXXFLAGS="$CXXFLAGS -no-gcc"
17732                 cat >"conftest.$ac_ext" <<_ACEOF
17733 #line 17733 "configure"
17734 #include "confdefs.h"
17735
17736 int
17737 main (void)
17738 {
17739
17740 #ifdef __INTEL_COMPILER
17741 #else
17742 #error __INTEL_COMPILER is not defined
17743 #endif
17744
17745   ;
17746   return 0;
17747 }
17748 _ACEOF
17749 rm -f "conftest.$ac_objext"
17750 if { (eval echo "$as_me:17750: \"$ac_compile\"") >&5
17751   (eval $ac_compile) 2>&5
17752   ac_status=$?
17753   echo "$as_me:17753: \$? = $ac_status" >&5
17754   (exit "$ac_status"); } &&
17755          { ac_try='test -s "conftest.$ac_objext"'
17756   { (eval echo "$as_me:17756: \"$ac_try\"") >&5
17757   (eval $ac_try) 2>&5
17758   ac_status=$?
17759   echo "$as_me:17759: \$? = $ac_status" >&5
17760   (exit "$ac_status"); }; }; then
17761   INTEL_CPLUSPLUS=yes
17762 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17763
17764 else
17765   echo "$as_me: failed program was:" >&5
17766 cat "conftest.$ac_ext" >&5
17767 fi
17768 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17769                 CXXFLAGS="$cf_save_CFLAGS"
17770                 echo "$as_me:17770: result: $INTEL_CPLUSPLUS" >&5
17771 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17772                 ;;
17773         esac
17774 fi
17775
17776 CLANG_CPLUSPLUS=no
17777
17778 if test "$GCC" = yes ; then
17779         echo "$as_me:17779: checking if this is really Clang C++ compiler" >&5
17780 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17781         cf_save_CFLAGS="$CXXFLAGS"
17782         cat >"conftest.$ac_ext" <<_ACEOF
17783 #line 17783 "configure"
17784 #include "confdefs.h"
17785
17786 int
17787 main (void)
17788 {
17789
17790 #ifdef __clang__
17791 #else
17792 #error __clang__ is not defined
17793 #endif
17794
17795   ;
17796   return 0;
17797 }
17798 _ACEOF
17799 rm -f "conftest.$ac_objext"
17800 if { (eval echo "$as_me:17800: \"$ac_compile\"") >&5
17801   (eval $ac_compile) 2>&5
17802   ac_status=$?
17803   echo "$as_me:17803: \$? = $ac_status" >&5
17804   (exit "$ac_status"); } &&
17805          { ac_try='test -s "conftest.$ac_objext"'
17806   { (eval echo "$as_me:17806: \"$ac_try\"") >&5
17807   (eval $ac_try) 2>&5
17808   ac_status=$?
17809   echo "$as_me:17809: \$? = $ac_status" >&5
17810   (exit "$ac_status"); }; }; then
17811   CLANG_CPLUSPLUS=yes
17812
17813 else
17814   echo "$as_me: failed program was:" >&5
17815 cat "conftest.$ac_ext" >&5
17816 fi
17817 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17818         CXXFLAGS="$cf_save_CFLAGS"
17819         echo "$as_me:17819: result: $CLANG_CPLUSPLUS" >&5
17820 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17821 fi
17822
17823 CLANG_VERSION=none
17824
17825 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17826         case "$CC" in
17827         (c[1-9][0-9]|*/c[1-9][0-9])
17828                 { echo "$as_me:17828: WARNING: replacing broken compiler alias $CC" >&5
17829 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17830                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17831                 CC=clang
17832                 ;;
17833         esac
17834
17835         echo "$as_me:17835: checking version of $CC" >&5
17836 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17837         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.].*//'`"
17838         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17839         echo "$as_me:17839: result: $CLANG_VERSION" >&5
17840 echo "${ECHO_T}$CLANG_VERSION" >&6
17841
17842         for cf_clang_opt in \
17843                 -Qunused-arguments \
17844                 -Wno-error=implicit-function-declaration
17845         do
17846                 echo "$as_me:17846: checking if option $cf_clang_opt works" >&5
17847 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17848                 cf_save_CFLAGS="$CFLAGS"
17849                 CFLAGS="$CFLAGS $cf_clang_opt"
17850                 cat >"conftest.$ac_ext" <<_ACEOF
17851 #line 17851 "configure"
17852 #include "confdefs.h"
17853
17854                         #include <stdio.h>
17855 int
17856 main (void)
17857 {
17858
17859                         printf("hello!\\n");
17860   ;
17861   return 0;
17862 }
17863 _ACEOF
17864 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17865 if { (eval echo "$as_me:17865: \"$ac_link\"") >&5
17866   (eval $ac_link) 2>&5
17867   ac_status=$?
17868   echo "$as_me:17868: \$? = $ac_status" >&5
17869   (exit "$ac_status"); } &&
17870          { ac_try='test -s "conftest$ac_exeext"'
17871   { (eval echo "$as_me:17871: \"$ac_try\"") >&5
17872   (eval $ac_try) 2>&5
17873   ac_status=$?
17874   echo "$as_me:17874: \$? = $ac_status" >&5
17875   (exit "$ac_status"); }; }; then
17876
17877                         cf_clang_optok=yes
17878 else
17879   echo "$as_me: failed program was:" >&5
17880 cat "conftest.$ac_ext" >&5
17881
17882                         cf_clang_optok=no
17883 fi
17884 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17885                 echo "$as_me:17885: result: $cf_clang_optok" >&5
17886 echo "${ECHO_T}$cf_clang_optok" >&6
17887                 CFLAGS="$cf_save_CFLAGS"
17888                 if test "$cf_clang_optok" = yes; then
17889                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17890
17891 echo "${as_me:-configure}:17891: testing adding option $cf_clang_opt ..." 1>&5
17892
17893         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17894         CFLAGS="${CFLAGS}$cf_clang_opt"
17895
17896                 fi
17897         done
17898 fi
17899
17900 ac_ext=cc
17901 ac_cpp='$CXXCPP $CPPFLAGS'
17902 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17903 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17904 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17905 ac_main_return="return"
17906
17907 cat > conftest.$ac_ext <<EOF
17908 #line 17908 "configure"
17909 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17910 EOF
17911
17912 if test "$INTEL_CPLUSPLUS" = yes
17913 then
17914 # The "-wdXXX" options suppress warnings:
17915 # remark #1419: external declaration in primary source file
17916 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17917 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17918 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17919 # remark #193: zero used for undefined preprocessing identifier
17920 # remark #593: variable "curs_sb_left_arrow" was set but never used
17921 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17922 # remark #869: parameter "tw" was never referenced
17923 # remark #981: operands are evaluated in unspecified order
17924 # warning #269: invalid format string conversion
17925
17926         { echo "$as_me:17926: checking for $CC warning options..." >&5
17927 echo "$as_me: checking for $CC warning options..." >&6;}
17928         cf_save_CXXFLAGS="$CXXFLAGS"
17929         EXTRA_CXXFLAGS="-Wall"
17930         for cf_opt in \
17931                 wd1419 \
17932                 wd1682 \
17933                 wd1683 \
17934                 wd1684 \
17935                 wd193 \
17936                 wd279 \
17937                 wd593 \
17938                 wd810 \
17939                 wd869 \
17940                 wd981
17941         do
17942                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17943                 if { (eval echo "$as_me:17943: \"$ac_compile\"") >&5
17944   (eval $ac_compile) 2>&5
17945   ac_status=$?
17946   echo "$as_me:17946: \$? = $ac_status" >&5
17947   (exit "$ac_status"); }; then
17948                         test -n "$verbose" && echo "$as_me:17948: result: ... -$cf_opt" >&5
17949 echo "${ECHO_T}... -$cf_opt" >&6
17950                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17951                 fi
17952         done
17953         CXXFLAGS="$cf_save_CXXFLAGS"
17954
17955 elif test "$GXX" = yes
17956 then
17957         { echo "$as_me:17957: checking for $CXX warning options..." >&5
17958 echo "$as_me: checking for $CXX warning options..." >&6;}
17959         cf_save_CXXFLAGS="$CXXFLAGS"
17960         EXTRA_CXXFLAGS="-W -Wall"
17961         cf_gxx_extra_warnings=""
17962         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17963         case "$GXX_VERSION" in
17964         ([1-2].*)
17965                 ;;
17966         (*)
17967                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17968                 ;;
17969         esac
17970         for cf_opt in \
17971                 Wabi \
17972                 fabi-version=0 \
17973                 Wextra \
17974                 Wignored-qualifiers \
17975                 Wlogical-op \
17976                 Woverloaded-virtual \
17977                 Wsign-promo \
17978                 Wsynth \
17979                 Wold-style-cast \
17980                 Wcast-align \
17981                 Wcast-qual \
17982                 Wpointer-arith \
17983                 Wshadow \
17984                 Wundef $cf_gxx_extra_warnings Wno-unused
17985         do
17986                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17987                 if { (eval echo "$as_me:17987: \"$ac_compile\"") >&5
17988   (eval $ac_compile) 2>&5
17989   ac_status=$?
17990   echo "$as_me:17990: \$? = $ac_status" >&5
17991   (exit "$ac_status"); }; then
17992                         test -n "$verbose" && echo "$as_me:17992: result: ... -$cf_opt" >&5
17993 echo "${ECHO_T}... -$cf_opt" >&6
17994                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17995                 else
17996                         test -n "$verbose" && echo "$as_me:17996: result: ... no -$cf_opt" >&5
17997 echo "${ECHO_T}... no -$cf_opt" >&6
17998                 fi
17999         done
18000         CXXFLAGS="$cf_save_CXXFLAGS"
18001 fi
18002
18003 rm -rf ./conftest*
18004 ac_ext=c
18005 ac_cpp='$CPP $CPPFLAGS'
18006 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
18007 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
18008 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18009 ac_main_return="return"
18010
18011         fi
18012 fi
18013
18014 echo "$as_me:18014: checking if you want to work around bogus compiler/loader warnings" >&5
18015 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
18016
18017 # Check whether --enable-string-hacks or --disable-string-hacks was given.
18018 if test "${enable_string_hacks+set}" = set; then
18019   enableval="$enable_string_hacks"
18020   enable_string_hacks=$enableval
18021 else
18022   enable_string_hacks=no
18023 fi;
18024 echo "$as_me:18024: result: $enable_string_hacks" >&5
18025 echo "${ECHO_T}$enable_string_hacks" >&6
18026
18027 if test "x$enable_string_hacks" = "xyes"; then
18028
18029 cat >>confdefs.h <<\EOF
18030 #define USE_STRING_HACKS 1
18031 EOF
18032
18033         { echo "$as_me:18033: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
18034 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
18035         echo "$as_me:18035: checking for strlcat" >&5
18036 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
18037 if test "${ac_cv_func_strlcat+set}" = set; then
18038   echo $ECHO_N "(cached) $ECHO_C" >&6
18039 else
18040   cat >"conftest.$ac_ext" <<_ACEOF
18041 #line 18041 "configure"
18042 #include "confdefs.h"
18043 #define strlcat autoconf_temporary
18044 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18045 #undef strlcat
18046
18047 #ifdef __cplusplus
18048 extern "C"
18049 #endif
18050
18051 /* We use char because int might match the return type of a gcc2
18052    builtin and then its argument prototype would still apply.  */
18053 char strlcat (void);
18054
18055 int
18056 main (void)
18057 {
18058
18059 /* The GNU C library defines stubs for functions which it implements
18060     to always fail with ENOSYS.  Some functions are actually named
18061     something starting with __ and the normal name is an alias.  */
18062 #if defined (__stub_strlcat) || defined (__stub___strlcat)
18063 #error found stub for strlcat
18064 #endif
18065
18066         return strlcat ();
18067   ;
18068   return 0;
18069 }
18070 _ACEOF
18071 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18072 if { (eval echo "$as_me:18072: \"$ac_link\"") >&5
18073   (eval $ac_link) 2>&5
18074   ac_status=$?
18075   echo "$as_me:18075: \$? = $ac_status" >&5
18076   (exit "$ac_status"); } &&
18077          { ac_try='test -s "conftest$ac_exeext"'
18078   { (eval echo "$as_me:18078: \"$ac_try\"") >&5
18079   (eval $ac_try) 2>&5
18080   ac_status=$?
18081   echo "$as_me:18081: \$? = $ac_status" >&5
18082   (exit "$ac_status"); }; }; then
18083   ac_cv_func_strlcat=yes
18084 else
18085   echo "$as_me: failed program was:" >&5
18086 cat "conftest.$ac_ext" >&5
18087 ac_cv_func_strlcat=no
18088 fi
18089 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18090 fi
18091 echo "$as_me:18091: result: $ac_cv_func_strlcat" >&5
18092 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
18093 if test "$ac_cv_func_strlcat" = yes; then
18094
18095 cat >>confdefs.h <<\EOF
18096 #define HAVE_STRLCAT 1
18097 EOF
18098
18099 else
18100
18101                 echo "$as_me:18101: checking for strlcat in -lbsd" >&5
18102 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
18103 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
18104   echo $ECHO_N "(cached) $ECHO_C" >&6
18105 else
18106   ac_check_lib_save_LIBS=$LIBS
18107 LIBS="-lbsd  $LIBS"
18108 cat >"conftest.$ac_ext" <<_ACEOF
18109 #line 18109 "configure"
18110 #include "confdefs.h"
18111
18112 /* Override any gcc2 internal prototype to avoid an error.  */
18113 #ifdef __cplusplus
18114 extern "C"
18115 #endif
18116 /* We use char because int might match the return type of a gcc2
18117    builtin and then its argument prototype would still apply.  */
18118 char strlcat ();
18119 int
18120 main (void)
18121 {
18122 strlcat ();
18123   ;
18124   return 0;
18125 }
18126 _ACEOF
18127 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18128 if { (eval echo "$as_me:18128: \"$ac_link\"") >&5
18129   (eval $ac_link) 2>&5
18130   ac_status=$?
18131   echo "$as_me:18131: \$? = $ac_status" >&5
18132   (exit "$ac_status"); } &&
18133          { ac_try='test -s "conftest$ac_exeext"'
18134   { (eval echo "$as_me:18134: \"$ac_try\"") >&5
18135   (eval $ac_try) 2>&5
18136   ac_status=$?
18137   echo "$as_me:18137: \$? = $ac_status" >&5
18138   (exit "$ac_status"); }; }; then
18139   ac_cv_lib_bsd_strlcat=yes
18140 else
18141   echo "$as_me: failed program was:" >&5
18142 cat "conftest.$ac_ext" >&5
18143 ac_cv_lib_bsd_strlcat=no
18144 fi
18145 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18146 LIBS=$ac_check_lib_save_LIBS
18147 fi
18148 echo "$as_me:18148: result: $ac_cv_lib_bsd_strlcat" >&5
18149 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
18150 if test "$ac_cv_lib_bsd_strlcat" = yes; then
18151
18152 cf_add_libs="$LIBS"
18153 # reverse order
18154 cf_add_0lib=
18155 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18156 # filter duplicates
18157 for cf_add_1lib in $cf_add_0lib; do
18158         for cf_add_2lib in $cf_add_libs; do
18159                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18160                         cf_add_1lib=
18161                         break
18162                 fi
18163         done
18164         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18165 done
18166 LIBS="$cf_add_libs"
18167
18168 for ac_header in bsd/string.h
18169 do
18170 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18171 echo "$as_me:18171: checking for $ac_header" >&5
18172 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18173 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18174   echo $ECHO_N "(cached) $ECHO_C" >&6
18175 else
18176   cat >"conftest.$ac_ext" <<_ACEOF
18177 #line 18177 "configure"
18178 #include "confdefs.h"
18179 #include <$ac_header>
18180 _ACEOF
18181 if { (eval echo "$as_me:18181: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18182   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18183   ac_status=$?
18184   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18185   rm -f conftest.er1
18186   cat conftest.err >&5
18187   echo "$as_me:18187: \$? = $ac_status" >&5
18188   (exit "$ac_status"); } >/dev/null; then
18189   if test -s conftest.err; then
18190     ac_cpp_err=$ac_c_preproc_warn_flag
18191   else
18192     ac_cpp_err=
18193   fi
18194 else
18195   ac_cpp_err=yes
18196 fi
18197 if test -z "$ac_cpp_err"; then
18198   eval "$as_ac_Header=yes"
18199 else
18200   echo "$as_me: failed program was:" >&5
18201   cat "conftest.$ac_ext" >&5
18202   eval "$as_ac_Header=no"
18203 fi
18204 rm -f conftest.err "conftest.$ac_ext"
18205 fi
18206 echo "$as_me:18206: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18207 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18208 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18209   cat >>confdefs.h <<EOF
18210 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18211 EOF
18212
18213 fi
18214 done
18215
18216 cat >>confdefs.h <<\EOF
18217 #define HAVE_STRLCAT 1
18218 EOF
18219
18220 fi
18221
18222 fi
18223
18224 for ac_func in strlcpy snprintf
18225 do
18226 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18227 echo "$as_me:18227: checking for $ac_func" >&5
18228 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18229 if eval "test \"\${$as_ac_var+set}\" = set"; then
18230   echo $ECHO_N "(cached) $ECHO_C" >&6
18231 else
18232   cat >"conftest.$ac_ext" <<_ACEOF
18233 #line 18233 "configure"
18234 #include "confdefs.h"
18235 #define $ac_func autoconf_temporary
18236 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18237 #undef $ac_func
18238
18239 #ifdef __cplusplus
18240 extern "C"
18241 #endif
18242
18243 /* We use char because int might match the return type of a gcc2
18244    builtin and then its argument prototype would still apply.  */
18245 char $ac_func (void);
18246
18247 int
18248 main (void)
18249 {
18250
18251 /* The GNU C library defines stubs for functions which it implements
18252     to always fail with ENOSYS.  Some functions are actually named
18253     something starting with __ and the normal name is an alias.  */
18254 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18255 #error found stub for $ac_func
18256 #endif
18257
18258         return $ac_func ();
18259   ;
18260   return 0;
18261 }
18262 _ACEOF
18263 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18264 if { (eval echo "$as_me:18264: \"$ac_link\"") >&5
18265   (eval $ac_link) 2>&5
18266   ac_status=$?
18267   echo "$as_me:18267: \$? = $ac_status" >&5
18268   (exit "$ac_status"); } &&
18269          { ac_try='test -s "conftest$ac_exeext"'
18270   { (eval echo "$as_me:18270: \"$ac_try\"") >&5
18271   (eval $ac_try) 2>&5
18272   ac_status=$?
18273   echo "$as_me:18273: \$? = $ac_status" >&5
18274   (exit "$ac_status"); }; }; then
18275   eval "$as_ac_var=yes"
18276 else
18277   echo "$as_me: failed program was:" >&5
18278 cat "conftest.$ac_ext" >&5
18279 eval "$as_ac_var=no"
18280 fi
18281 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18282 fi
18283 echo "$as_me:18283: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18284 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18285 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18286   cat >>confdefs.h <<EOF
18287 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18288 EOF
18289
18290 fi
18291 done
18292
18293 fi
18294
18295 ###     use option --enable-assertions to turn on generation of assertion code
18296 echo "$as_me:18296: checking if you want to enable runtime assertions" >&5
18297 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
18298
18299 # Check whether --enable-assertions or --disable-assertions was given.
18300 if test "${enable_assertions+set}" = set; then
18301   enableval="$enable_assertions"
18302   with_assertions=$enableval
18303 else
18304   with_assertions=no
18305 fi;
18306 echo "$as_me:18306: result: $with_assertions" >&5
18307 echo "${ECHO_T}$with_assertions" >&6
18308 if test -n "$GCC"
18309 then
18310         if test "$with_assertions" = no
18311         then
18312                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
18313         else
18314
18315         ADAFLAGS="$ADAFLAGS -gnata"
18316
18317         fi
18318 fi
18319
18320 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
18321
18322 echo "$as_me:18322: checking if you want to use dmalloc for testing" >&5
18323 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
18324
18325 # Check whether --with-dmalloc or --without-dmalloc was given.
18326 if test "${with_dmalloc+set}" = set; then
18327   withval="$with_dmalloc"
18328   case "x$withval" in
18329         (x|xno) ;;
18330         (*)
18331                 : "${with_cflags:=-g}"
18332                 : "${enable_leaks:=no}"
18333                 with_dmalloc=yes
18334
18335 cat >>confdefs.h <<EOF
18336 #define USE_DMALLOC 1
18337 EOF
18338
18339                 ;;
18340         esac
18341 else
18342   with_dmalloc=
18343 fi;
18344 echo "$as_me:18344: result: ${with_dmalloc:-no}" >&5
18345 echo "${ECHO_T}${with_dmalloc:-no}" >&6
18346
18347 case ".$with_cflags" in
18348 (.*-g*)
18349         case .$CFLAGS in
18350         (.*-g*)
18351                 ;;
18352         (*)
18353
18354 cf_fix_cppflags=no
18355 cf_new_cflags=
18356 cf_new_cppflags=
18357 cf_new_extra_cppflags=
18358
18359 for cf_add_cflags in -g
18360 do
18361 case "$cf_fix_cppflags" in
18362 (no)
18363         case "$cf_add_cflags" in
18364         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18365                 case "$cf_add_cflags" in
18366                 (-D*)
18367                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18368
18369                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18370                                 && test -z "${cf_tst_cflags}" \
18371                                 && cf_fix_cppflags=yes
18372
18373                         if test "$cf_fix_cppflags" = yes ; then
18374
18375         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18376         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18377
18378                                 continue
18379                         elif test "${cf_tst_cflags}" = "\"'" ; then
18380
18381         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18382         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18383
18384                                 continue
18385                         fi
18386                         ;;
18387                 esac
18388                 case "$CPPFLAGS" in
18389                 (*$cf_add_cflags)
18390                         ;;
18391                 (*)
18392                         case "$cf_add_cflags" in
18393                         (-D*)
18394                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18395
18396 CPPFLAGS=`echo "$CPPFLAGS" | \
18397         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18398                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18399
18400                                 ;;
18401                         esac
18402
18403         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18404         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18405
18406                         ;;
18407                 esac
18408                 ;;
18409         (*)
18410
18411         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18412         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18413
18414                 ;;
18415         esac
18416         ;;
18417 (yes)
18418
18419         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18420         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18421
18422         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18423
18424         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18425                 && test -z "${cf_tst_cflags}" \
18426                 && cf_fix_cppflags=no
18427         ;;
18428 esac
18429 done
18430
18431 if test -n "$cf_new_cflags" ; then
18432
18433         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18434         CFLAGS="${CFLAGS}$cf_new_cflags"
18435
18436 fi
18437
18438 if test -n "$cf_new_cppflags" ; then
18439
18440         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18441         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18442
18443 fi
18444
18445 if test -n "$cf_new_extra_cppflags" ; then
18446
18447         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18448         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18449
18450 fi
18451
18452                 ;;
18453         esac
18454         ;;
18455 esac
18456
18457 if test "$with_dmalloc" = yes ; then
18458         echo "$as_me:18458: checking for dmalloc.h" >&5
18459 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
18460 if test "${ac_cv_header_dmalloc_h+set}" = set; then
18461   echo $ECHO_N "(cached) $ECHO_C" >&6
18462 else
18463   cat >"conftest.$ac_ext" <<_ACEOF
18464 #line 18464 "configure"
18465 #include "confdefs.h"
18466 #include <dmalloc.h>
18467 _ACEOF
18468 if { (eval echo "$as_me:18468: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18469   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18470   ac_status=$?
18471   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18472   rm -f conftest.er1
18473   cat conftest.err >&5
18474   echo "$as_me:18474: \$? = $ac_status" >&5
18475   (exit "$ac_status"); } >/dev/null; then
18476   if test -s conftest.err; then
18477     ac_cpp_err=$ac_c_preproc_warn_flag
18478   else
18479     ac_cpp_err=
18480   fi
18481 else
18482   ac_cpp_err=yes
18483 fi
18484 if test -z "$ac_cpp_err"; then
18485   ac_cv_header_dmalloc_h=yes
18486 else
18487   echo "$as_me: failed program was:" >&5
18488   cat "conftest.$ac_ext" >&5
18489   ac_cv_header_dmalloc_h=no
18490 fi
18491 rm -f conftest.err "conftest.$ac_ext"
18492 fi
18493 echo "$as_me:18493: result: $ac_cv_header_dmalloc_h" >&5
18494 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
18495 if test "$ac_cv_header_dmalloc_h" = yes; then
18496
18497 echo "$as_me:18497: checking for dmalloc_debug in -ldmalloc" >&5
18498 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
18499 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
18500   echo $ECHO_N "(cached) $ECHO_C" >&6
18501 else
18502   ac_check_lib_save_LIBS=$LIBS
18503 LIBS="-ldmalloc  $LIBS"
18504 cat >"conftest.$ac_ext" <<_ACEOF
18505 #line 18505 "configure"
18506 #include "confdefs.h"
18507
18508 /* Override any gcc2 internal prototype to avoid an error.  */
18509 #ifdef __cplusplus
18510 extern "C"
18511 #endif
18512 /* We use char because int might match the return type of a gcc2
18513    builtin and then its argument prototype would still apply.  */
18514 char dmalloc_debug ();
18515 int
18516 main (void)
18517 {
18518 dmalloc_debug ();
18519   ;
18520   return 0;
18521 }
18522 _ACEOF
18523 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18524 if { (eval echo "$as_me:18524: \"$ac_link\"") >&5
18525   (eval $ac_link) 2>&5
18526   ac_status=$?
18527   echo "$as_me:18527: \$? = $ac_status" >&5
18528   (exit "$ac_status"); } &&
18529          { ac_try='test -s "conftest$ac_exeext"'
18530   { (eval echo "$as_me:18530: \"$ac_try\"") >&5
18531   (eval $ac_try) 2>&5
18532   ac_status=$?
18533   echo "$as_me:18533: \$? = $ac_status" >&5
18534   (exit "$ac_status"); }; }; then
18535   ac_cv_lib_dmalloc_dmalloc_debug=yes
18536 else
18537   echo "$as_me: failed program was:" >&5
18538 cat "conftest.$ac_ext" >&5
18539 ac_cv_lib_dmalloc_dmalloc_debug=no
18540 fi
18541 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18542 LIBS=$ac_check_lib_save_LIBS
18543 fi
18544 echo "$as_me:18544: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18545 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18546 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
18547   cat >>confdefs.h <<EOF
18548 #define HAVE_LIBDMALLOC 1
18549 EOF
18550
18551   LIBS="-ldmalloc $LIBS"
18552
18553 fi
18554
18555 fi
18556
18557 fi
18558
18559 echo "$as_me:18559: checking if you want to use dbmalloc for testing" >&5
18560 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18561
18562 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18563 if test "${with_dbmalloc+set}" = set; then
18564   withval="$with_dbmalloc"
18565   case "x$withval" in
18566         (x|xno) ;;
18567         (*)
18568                 : "${with_cflags:=-g}"
18569                 : "${enable_leaks:=no}"
18570                 with_dbmalloc=yes
18571
18572 cat >>confdefs.h <<EOF
18573 #define USE_DBMALLOC 1
18574 EOF
18575
18576                 ;;
18577         esac
18578 else
18579   with_dbmalloc=
18580 fi;
18581 echo "$as_me:18581: result: ${with_dbmalloc:-no}" >&5
18582 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18583
18584 case ".$with_cflags" in
18585 (.*-g*)
18586         case .$CFLAGS in
18587         (.*-g*)
18588                 ;;
18589         (*)
18590
18591 cf_fix_cppflags=no
18592 cf_new_cflags=
18593 cf_new_cppflags=
18594 cf_new_extra_cppflags=
18595
18596 for cf_add_cflags in -g
18597 do
18598 case "$cf_fix_cppflags" in
18599 (no)
18600         case "$cf_add_cflags" in
18601         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18602                 case "$cf_add_cflags" in
18603                 (-D*)
18604                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18605
18606                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18607                                 && test -z "${cf_tst_cflags}" \
18608                                 && cf_fix_cppflags=yes
18609
18610                         if test "$cf_fix_cppflags" = yes ; then
18611
18612         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18613         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18614
18615                                 continue
18616                         elif test "${cf_tst_cflags}" = "\"'" ; then
18617
18618         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18619         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18620
18621                                 continue
18622                         fi
18623                         ;;
18624                 esac
18625                 case "$CPPFLAGS" in
18626                 (*$cf_add_cflags)
18627                         ;;
18628                 (*)
18629                         case "$cf_add_cflags" in
18630                         (-D*)
18631                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18632
18633 CPPFLAGS=`echo "$CPPFLAGS" | \
18634         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18635                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18636
18637                                 ;;
18638                         esac
18639
18640         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18641         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18642
18643                         ;;
18644                 esac
18645                 ;;
18646         (*)
18647
18648         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18649         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18650
18651                 ;;
18652         esac
18653         ;;
18654 (yes)
18655
18656         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18657         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18658
18659         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18660
18661         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18662                 && test -z "${cf_tst_cflags}" \
18663                 && cf_fix_cppflags=no
18664         ;;
18665 esac
18666 done
18667
18668 if test -n "$cf_new_cflags" ; then
18669
18670         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18671         CFLAGS="${CFLAGS}$cf_new_cflags"
18672
18673 fi
18674
18675 if test -n "$cf_new_cppflags" ; then
18676
18677         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18678         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18679
18680 fi
18681
18682 if test -n "$cf_new_extra_cppflags" ; then
18683
18684         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18685         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18686
18687 fi
18688
18689                 ;;
18690         esac
18691         ;;
18692 esac
18693
18694 if test "$with_dbmalloc" = yes ; then
18695         echo "$as_me:18695: checking for dbmalloc.h" >&5
18696 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18697 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18698   echo $ECHO_N "(cached) $ECHO_C" >&6
18699 else
18700   cat >"conftest.$ac_ext" <<_ACEOF
18701 #line 18701 "configure"
18702 #include "confdefs.h"
18703 #include <dbmalloc.h>
18704 _ACEOF
18705 if { (eval echo "$as_me:18705: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18706   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18707   ac_status=$?
18708   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18709   rm -f conftest.er1
18710   cat conftest.err >&5
18711   echo "$as_me:18711: \$? = $ac_status" >&5
18712   (exit "$ac_status"); } >/dev/null; then
18713   if test -s conftest.err; then
18714     ac_cpp_err=$ac_c_preproc_warn_flag
18715   else
18716     ac_cpp_err=
18717   fi
18718 else
18719   ac_cpp_err=yes
18720 fi
18721 if test -z "$ac_cpp_err"; then
18722   ac_cv_header_dbmalloc_h=yes
18723 else
18724   echo "$as_me: failed program was:" >&5
18725   cat "conftest.$ac_ext" >&5
18726   ac_cv_header_dbmalloc_h=no
18727 fi
18728 rm -f conftest.err "conftest.$ac_ext"
18729 fi
18730 echo "$as_me:18730: result: $ac_cv_header_dbmalloc_h" >&5
18731 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18732 if test "$ac_cv_header_dbmalloc_h" = yes; then
18733
18734 echo "$as_me:18734: checking for debug_malloc in -ldbmalloc" >&5
18735 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18736 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18737   echo $ECHO_N "(cached) $ECHO_C" >&6
18738 else
18739   ac_check_lib_save_LIBS=$LIBS
18740 LIBS="-ldbmalloc  $LIBS"
18741 cat >"conftest.$ac_ext" <<_ACEOF
18742 #line 18742 "configure"
18743 #include "confdefs.h"
18744
18745 /* Override any gcc2 internal prototype to avoid an error.  */
18746 #ifdef __cplusplus
18747 extern "C"
18748 #endif
18749 /* We use char because int might match the return type of a gcc2
18750    builtin and then its argument prototype would still apply.  */
18751 char debug_malloc ();
18752 int
18753 main (void)
18754 {
18755 debug_malloc ();
18756   ;
18757   return 0;
18758 }
18759 _ACEOF
18760 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18761 if { (eval echo "$as_me:18761: \"$ac_link\"") >&5
18762   (eval $ac_link) 2>&5
18763   ac_status=$?
18764   echo "$as_me:18764: \$? = $ac_status" >&5
18765   (exit "$ac_status"); } &&
18766          { ac_try='test -s "conftest$ac_exeext"'
18767   { (eval echo "$as_me:18767: \"$ac_try\"") >&5
18768   (eval $ac_try) 2>&5
18769   ac_status=$?
18770   echo "$as_me:18770: \$? = $ac_status" >&5
18771   (exit "$ac_status"); }; }; then
18772   ac_cv_lib_dbmalloc_debug_malloc=yes
18773 else
18774   echo "$as_me: failed program was:" >&5
18775 cat "conftest.$ac_ext" >&5
18776 ac_cv_lib_dbmalloc_debug_malloc=no
18777 fi
18778 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18779 LIBS=$ac_check_lib_save_LIBS
18780 fi
18781 echo "$as_me:18781: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18782 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18783 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
18784   cat >>confdefs.h <<EOF
18785 #define HAVE_LIBDBMALLOC 1
18786 EOF
18787
18788   LIBS="-ldbmalloc $LIBS"
18789
18790 fi
18791
18792 fi
18793
18794 fi
18795
18796 echo "$as_me:18796: checking if you want to use valgrind for testing" >&5
18797 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18798
18799 # Check whether --with-valgrind or --without-valgrind was given.
18800 if test "${with_valgrind+set}" = set; then
18801   withval="$with_valgrind"
18802   case "x$withval" in
18803         (x|xno) ;;
18804         (*)
18805                 : "${with_cflags:=-g}"
18806                 : "${enable_leaks:=no}"
18807                 with_valgrind=yes
18808
18809 cat >>confdefs.h <<EOF
18810 #define USE_VALGRIND 1
18811 EOF
18812
18813                 ;;
18814         esac
18815 else
18816   with_valgrind=
18817 fi;
18818 echo "$as_me:18818: result: ${with_valgrind:-no}" >&5
18819 echo "${ECHO_T}${with_valgrind:-no}" >&6
18820
18821 case ".$with_cflags" in
18822 (.*-g*)
18823         case .$CFLAGS in
18824         (.*-g*)
18825                 ;;
18826         (*)
18827
18828 cf_fix_cppflags=no
18829 cf_new_cflags=
18830 cf_new_cppflags=
18831 cf_new_extra_cppflags=
18832
18833 for cf_add_cflags in -g
18834 do
18835 case "$cf_fix_cppflags" in
18836 (no)
18837         case "$cf_add_cflags" in
18838         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18839                 case "$cf_add_cflags" in
18840                 (-D*)
18841                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18842
18843                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18844                                 && test -z "${cf_tst_cflags}" \
18845                                 && cf_fix_cppflags=yes
18846
18847                         if test "$cf_fix_cppflags" = yes ; then
18848
18849         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18850         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18851
18852                                 continue
18853                         elif test "${cf_tst_cflags}" = "\"'" ; then
18854
18855         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18856         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18857
18858                                 continue
18859                         fi
18860                         ;;
18861                 esac
18862                 case "$CPPFLAGS" in
18863                 (*$cf_add_cflags)
18864                         ;;
18865                 (*)
18866                         case "$cf_add_cflags" in
18867                         (-D*)
18868                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18869
18870 CPPFLAGS=`echo "$CPPFLAGS" | \
18871         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18872                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18873
18874                                 ;;
18875                         esac
18876
18877         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18878         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18879
18880                         ;;
18881                 esac
18882                 ;;
18883         (*)
18884
18885         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18886         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18887
18888                 ;;
18889         esac
18890         ;;
18891 (yes)
18892
18893         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18894         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18895
18896         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18897
18898         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18899                 && test -z "${cf_tst_cflags}" \
18900                 && cf_fix_cppflags=no
18901         ;;
18902 esac
18903 done
18904
18905 if test -n "$cf_new_cflags" ; then
18906
18907         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18908         CFLAGS="${CFLAGS}$cf_new_cflags"
18909
18910 fi
18911
18912 if test -n "$cf_new_cppflags" ; then
18913
18914         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18915         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18916
18917 fi
18918
18919 if test -n "$cf_new_extra_cppflags" ; then
18920
18921         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18922         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18923
18924 fi
18925
18926                 ;;
18927         esac
18928         ;;
18929 esac
18930
18931 echo "$as_me:18931: checking if you want to perform memory-leak testing" >&5
18932 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18933
18934 # Check whether --enable-leaks or --disable-leaks was given.
18935 if test "${enable_leaks+set}" = set; then
18936   enableval="$enable_leaks"
18937   enable_leaks=$enableval
18938 else
18939   enable_leaks=yes
18940 fi;
18941 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18942 echo "$as_me:18942: result: $with_no_leaks" >&5
18943 echo "${ECHO_T}$with_no_leaks" >&6
18944
18945 if test "$enable_leaks" = no ; then
18946
18947 cat >>confdefs.h <<\EOF
18948 #define NO_LEAKS 1
18949 EOF
18950
18951 cat >>confdefs.h <<\EOF
18952 #define YY_NO_LEAKS 1
18953 EOF
18954
18955 fi
18956
18957 cat >>confdefs.h <<\EOF
18958 #define HAVE_NC_ALLOC_H 1
18959 EOF
18960
18961 ###     use option --enable-expanded to generate certain macros as functions
18962
18963 # Check whether --enable-expanded or --disable-expanded was given.
18964 if test "${enable_expanded+set}" = set; then
18965   enableval="$enable_expanded"
18966   test "x$enableval" = xyes &&
18967 cat >>confdefs.h <<\EOF
18968 #define NCURSES_EXPANDED 1
18969 EOF
18970
18971 fi;
18972
18973 ###     use option --disable-macros to suppress macros in favor of functions
18974
18975 # Check whether --enable-macros or --disable-macros was given.
18976 if test "${enable_macros+set}" = set; then
18977   enableval="$enable_macros"
18978   test "$enableval" = no &&
18979 cat >>confdefs.h <<\EOF
18980 #define NCURSES_NOMACROS 1
18981 EOF
18982
18983 fi;
18984
18985 # Normally we only add trace() to the debug-library.  Allow this to be
18986 # extended to all models of the ncurses library:
18987 cf_all_traces=no
18988 case "$CFLAGS $CPPFLAGS" in
18989 (*-DTRACE*)
18990         cf_all_traces=yes
18991         ;;
18992 esac
18993
18994 echo "$as_me:18994: checking whether to add trace feature to all models" >&5
18995 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18996
18997 # Check whether --with-trace or --without-trace was given.
18998 if test "${with_trace+set}" = set; then
18999   withval="$with_trace"
19000   cf_with_trace=$withval
19001 else
19002   cf_with_trace=$cf_all_traces
19003 fi;
19004 echo "$as_me:19004: result: $cf_with_trace" >&5
19005 echo "${ECHO_T}$cf_with_trace" >&6
19006
19007 if test "x$cf_with_trace" = xyes ; then
19008         LIB_TRACING=all
19009         ADA_TRACE=TRUE
19010
19011 cf_fix_cppflags=no
19012 cf_new_cflags=
19013 cf_new_cppflags=
19014 cf_new_extra_cppflags=
19015
19016 for cf_add_cflags in -DTRACE
19017 do
19018 case "$cf_fix_cppflags" in
19019 (no)
19020         case "$cf_add_cflags" in
19021         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19022                 case "$cf_add_cflags" in
19023                 (-D*)
19024                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19025
19026                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19027                                 && test -z "${cf_tst_cflags}" \
19028                                 && cf_fix_cppflags=yes
19029
19030                         if test "$cf_fix_cppflags" = yes ; then
19031
19032         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19033         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19034
19035                                 continue
19036                         elif test "${cf_tst_cflags}" = "\"'" ; then
19037
19038         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19039         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19040
19041                                 continue
19042                         fi
19043                         ;;
19044                 esac
19045                 case "$CPPFLAGS" in
19046                 (*$cf_add_cflags)
19047                         ;;
19048                 (*)
19049                         case "$cf_add_cflags" in
19050                         (-D*)
19051                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19052
19053 CPPFLAGS=`echo "$CPPFLAGS" | \
19054         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19055                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19056
19057                                 ;;
19058                         esac
19059
19060         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19061         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19062
19063                         ;;
19064                 esac
19065                 ;;
19066         (*)
19067
19068         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19069         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19070
19071                 ;;
19072         esac
19073         ;;
19074 (yes)
19075
19076         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19077         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19078
19079         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
19080
19081         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19082                 && test -z "${cf_tst_cflags}" \
19083                 && cf_fix_cppflags=no
19084         ;;
19085 esac
19086 done
19087
19088 if test -n "$cf_new_cflags" ; then
19089
19090         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19091         CFLAGS="${CFLAGS}$cf_new_cflags"
19092
19093 fi
19094
19095 if test -n "$cf_new_cppflags" ; then
19096
19097         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19098         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19099
19100 fi
19101
19102 if test -n "$cf_new_extra_cppflags" ; then
19103
19104         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19105         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19106
19107 fi
19108
19109 cat >>confdefs.h <<\EOF
19110 #define HAVE__TRACEF 1
19111 EOF
19112
19113 else
19114         LIB_TRACING=DEBUG
19115         ADA_TRACE=FALSE
19116 fi
19117
19118 echo "$as_me:19118: checking if we want to use GNAT projects" >&5
19119 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
19120
19121 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
19122 if test "${enable_gnat_projects+set}" = set; then
19123   enableval="$enable_gnat_projects"
19124   test "$enableval" != no && enableval=yes
19125         if test "$enableval" != "yes" ; then
19126     enable_gnat_projects=no
19127         else
19128                 enable_gnat_projects=yes
19129         fi
19130 else
19131   enableval=yes
19132         enable_gnat_projects=yes
19133
19134 fi;
19135 echo "$as_me:19135: result: $enable_gnat_projects" >&5
19136 echo "${ECHO_T}$enable_gnat_projects" >&6
19137
19138 ###     Checks for libraries.
19139 case "$cf_cv_system_name" in
19140 (*mingw32*|*mingw64*)
19141         # Note: WINVER may be a problem with Windows 10
19142         if test "x$with_exp_win32" = xyes ; then
19143                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
19144         else
19145                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
19146         fi
19147
19148 echo "$as_me:19148: checking if ssp library is needed" >&5
19149 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
19150 if test "${cf_cv_need_libssp+set}" = set; then
19151   echo $ECHO_N "(cached) $ECHO_C" >&6
19152 else
19153
19154 cat >"conftest.$ac_ext" <<_ACEOF
19155 #line 19155 "configure"
19156 #include "confdefs.h"
19157
19158 #include <sys/types.h>
19159 #include <dirent.h>
19160
19161 int
19162 main (void)
19163 {
19164
19165        DIR *dp = opendir(".");
19166
19167   ;
19168   return 0;
19169 }
19170 _ACEOF
19171 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19172 if { (eval echo "$as_me:19172: \"$ac_link\"") >&5
19173   (eval $ac_link) 2>&5
19174   ac_status=$?
19175   echo "$as_me:19175: \$? = $ac_status" >&5
19176   (exit "$ac_status"); } &&
19177          { ac_try='test -s "conftest$ac_exeext"'
19178   { (eval echo "$as_me:19178: \"$ac_try\"") >&5
19179   (eval $ac_try) 2>&5
19180   ac_status=$?
19181   echo "$as_me:19181: \$? = $ac_status" >&5
19182   (exit "$ac_status"); }; }; then
19183   cf_cv_need_libssp=no
19184 else
19185   echo "$as_me: failed program was:" >&5
19186 cat "conftest.$ac_ext" >&5
19187
19188         cf_save_LIBS="$LIBS"
19189         LIBS="$LIBS -lssp"
19190         cat >"conftest.$ac_ext" <<_ACEOF
19191 #line 19191 "configure"
19192 #include "confdefs.h"
19193
19194 #include <sys/types.h>
19195 #include <dirent.h>
19196
19197 int
19198 main (void)
19199 {
19200
19201                    DIR *dp = opendir(".");
19202
19203   ;
19204   return 0;
19205 }
19206 _ACEOF
19207 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19208 if { (eval echo "$as_me:19208: \"$ac_link\"") >&5
19209   (eval $ac_link) 2>&5
19210   ac_status=$?
19211   echo "$as_me:19211: \$? = $ac_status" >&5
19212   (exit "$ac_status"); } &&
19213          { ac_try='test -s "conftest$ac_exeext"'
19214   { (eval echo "$as_me:19214: \"$ac_try\"") >&5
19215   (eval $ac_try) 2>&5
19216   ac_status=$?
19217   echo "$as_me:19217: \$? = $ac_status" >&5
19218   (exit "$ac_status"); }; }; then
19219   cf_cv_need_libssp=yes
19220 else
19221   echo "$as_me: failed program was:" >&5
19222 cat "conftest.$ac_ext" >&5
19223 cf_cv_need_libssp=maybe
19224 fi
19225 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19226         LIBS="$cf_save_LIBS"
19227
19228 fi
19229 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19230 fi
19231 echo "$as_me:19231: result: $cf_cv_need_libssp" >&5
19232 echo "${ECHO_T}$cf_cv_need_libssp" >&6
19233
19234 if test "x$cf_cv_need_libssp" = xyes
19235 then
19236
19237 cf_add_libs="$LIBS"
19238 # reverse order
19239 cf_add_0lib=
19240 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19241 # filter duplicates
19242 for cf_add_1lib in $cf_add_0lib; do
19243         for cf_add_2lib in $cf_add_libs; do
19244                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19245                         cf_add_1lib=
19246                         break
19247                 fi
19248         done
19249         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19250 done
19251 LIBS="$cf_add_libs"
19252
19253 fi
19254
19255         ;;
19256 (*)
19257         ;;
19258 esac
19259
19260 echo "$as_me:19260: checking if -lm needed for math functions" >&5
19261 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
19262 if test "${cf_cv_need_libm+set}" = set; then
19263   echo $ECHO_N "(cached) $ECHO_C" >&6
19264 else
19265
19266         cat >"conftest.$ac_ext" <<_ACEOF
19267 #line 19267 "configure"
19268 #include "confdefs.h"
19269
19270                 #include <stdio.h>
19271                 #include <stdlib.h>
19272                 #include <math.h>
19273
19274 int
19275 main (void)
19276 {
19277 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19278   ;
19279   return 0;
19280 }
19281 _ACEOF
19282 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19283 if { (eval echo "$as_me:19283: \"$ac_link\"") >&5
19284   (eval $ac_link) 2>&5
19285   ac_status=$?
19286   echo "$as_me:19286: \$? = $ac_status" >&5
19287   (exit "$ac_status"); } &&
19288          { ac_try='test -s "conftest$ac_exeext"'
19289   { (eval echo "$as_me:19289: \"$ac_try\"") >&5
19290   (eval $ac_try) 2>&5
19291   ac_status=$?
19292   echo "$as_me:19292: \$? = $ac_status" >&5
19293   (exit "$ac_status"); }; }; then
19294   cf_cv_need_libm=no
19295 else
19296   echo "$as_me: failed program was:" >&5
19297 cat "conftest.$ac_ext" >&5
19298 cf_cv_need_libm=yes
19299 fi
19300 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19301 fi
19302 echo "$as_me:19302: result: $cf_cv_need_libm" >&5
19303 echo "${ECHO_T}$cf_cv_need_libm" >&6
19304
19305 if test "$cf_cv_need_libm" = yes
19306 then
19307
19308         cf_save_LIBS="$LIBS"
19309         LIBS="$LIBS -lm"
19310         echo "$as_me:19310: checking if -lm is available for math functions" >&5
19311 echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6
19312 if test "${cf_cv_have_libm+set}" = set; then
19313   echo $ECHO_N "(cached) $ECHO_C" >&6
19314 else
19315
19316         cat >"conftest.$ac_ext" <<_ACEOF
19317 #line 19317 "configure"
19318 #include "confdefs.h"
19319
19320                 #include <stdio.h>
19321                 #include <stdlib.h>
19322                 #include <math.h>
19323
19324 int
19325 main (void)
19326 {
19327 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19328   ;
19329   return 0;
19330 }
19331 _ACEOF
19332 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19333 if { (eval echo "$as_me:19333: \"$ac_link\"") >&5
19334   (eval $ac_link) 2>&5
19335   ac_status=$?
19336   echo "$as_me:19336: \$? = $ac_status" >&5
19337   (exit "$ac_status"); } &&
19338          { ac_try='test -s "conftest$ac_exeext"'
19339   { (eval echo "$as_me:19339: \"$ac_try\"") >&5
19340   (eval $ac_try) 2>&5
19341   ac_status=$?
19342   echo "$as_me:19342: \$? = $ac_status" >&5
19343   (exit "$ac_status"); }; }; then
19344   cf_cv_have_libm=yes
19345 else
19346   echo "$as_me: failed program was:" >&5
19347 cat "conftest.$ac_ext" >&5
19348 cf_cv_have_libm=no
19349 fi
19350 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19351 fi
19352 echo "$as_me:19352: result: $cf_cv_have_libm" >&5
19353 echo "${ECHO_T}$cf_cv_have_libm" >&6
19354         LIBS="$cf_save_LIBS"
19355
19356         if test "$cf_cv_have_libm" = yes
19357         then
19358                 MATH_LIB=-lm
19359         fi
19360 else
19361         cf_cv_have_libm=yes
19362 fi
19363
19364 if test "$cf_cv_have_libm" = yes
19365 then
19366
19367 cat >>confdefs.h <<\EOF
19368 #define HAVE_MATH_FUNCS 1
19369 EOF
19370
19371 fi
19372
19373 ###     Checks for header files.
19374 echo "$as_me:19374: checking whether time.h and sys/time.h may both be included" >&5
19375 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
19376 if test "${ac_cv_header_time+set}" = set; then
19377   echo $ECHO_N "(cached) $ECHO_C" >&6
19378 else
19379   cat >"conftest.$ac_ext" <<_ACEOF
19380 #line 19380 "configure"
19381 #include "confdefs.h"
19382 #include <sys/types.h>
19383 #include <sys/time.h>
19384 #include <time.h>
19385
19386 int
19387 main (void)
19388 {
19389 if ((struct tm *) 0)
19390 return 0;
19391   ;
19392   return 0;
19393 }
19394 _ACEOF
19395 rm -f "conftest.$ac_objext"
19396 if { (eval echo "$as_me:19396: \"$ac_compile\"") >&5
19397   (eval $ac_compile) 2>&5
19398   ac_status=$?
19399   echo "$as_me:19399: \$? = $ac_status" >&5
19400   (exit "$ac_status"); } &&
19401          { ac_try='test -s "conftest.$ac_objext"'
19402   { (eval echo "$as_me:19402: \"$ac_try\"") >&5
19403   (eval $ac_try) 2>&5
19404   ac_status=$?
19405   echo "$as_me:19405: \$? = $ac_status" >&5
19406   (exit "$ac_status"); }; }; then
19407   ac_cv_header_time=yes
19408 else
19409   echo "$as_me: failed program was:" >&5
19410 cat "conftest.$ac_ext" >&5
19411 ac_cv_header_time=no
19412 fi
19413 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19414 fi
19415 echo "$as_me:19415: result: $ac_cv_header_time" >&5
19416 echo "${ECHO_T}$ac_cv_header_time" >&6
19417 if test $ac_cv_header_time = yes; then
19418
19419 cat >>confdefs.h <<\EOF
19420 #define TIME_WITH_SYS_TIME 1
19421 EOF
19422
19423 fi
19424
19425 cf_regex_func=no
19426 cf_regex_libs=
19427 case "$host_os" in
19428 (mingw*)
19429         # -lsystre -ltre -lintl -liconv
19430         echo "$as_me:19430: checking for regcomp in -lsystre" >&5
19431 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19432 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
19433   echo $ECHO_N "(cached) $ECHO_C" >&6
19434 else
19435   ac_check_lib_save_LIBS=$LIBS
19436 LIBS="-lsystre  $LIBS"
19437 cat >"conftest.$ac_ext" <<_ACEOF
19438 #line 19438 "configure"
19439 #include "confdefs.h"
19440
19441 /* Override any gcc2 internal prototype to avoid an error.  */
19442 #ifdef __cplusplus
19443 extern "C"
19444 #endif
19445 /* We use char because int might match the return type of a gcc2
19446    builtin and then its argument prototype would still apply.  */
19447 char regcomp ();
19448 int
19449 main (void)
19450 {
19451 regcomp ();
19452   ;
19453   return 0;
19454 }
19455 _ACEOF
19456 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19457 if { (eval echo "$as_me:19457: \"$ac_link\"") >&5
19458   (eval $ac_link) 2>&5
19459   ac_status=$?
19460   echo "$as_me:19460: \$? = $ac_status" >&5
19461   (exit "$ac_status"); } &&
19462          { ac_try='test -s "conftest$ac_exeext"'
19463   { (eval echo "$as_me:19463: \"$ac_try\"") >&5
19464   (eval $ac_try) 2>&5
19465   ac_status=$?
19466   echo "$as_me:19466: \$? = $ac_status" >&5
19467   (exit "$ac_status"); }; }; then
19468   ac_cv_lib_systre_regcomp=yes
19469 else
19470   echo "$as_me: failed program was:" >&5
19471 cat "conftest.$ac_ext" >&5
19472 ac_cv_lib_systre_regcomp=no
19473 fi
19474 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19475 LIBS=$ac_check_lib_save_LIBS
19476 fi
19477 echo "$as_me:19477: result: $ac_cv_lib_systre_regcomp" >&5
19478 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19479 if test "$ac_cv_lib_systre_regcomp" = yes; then
19480
19481                 echo "$as_me:19481: checking for libiconv_open in -liconv" >&5
19482 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19483 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19484   echo $ECHO_N "(cached) $ECHO_C" >&6
19485 else
19486   ac_check_lib_save_LIBS=$LIBS
19487 LIBS="-liconv  $LIBS"
19488 cat >"conftest.$ac_ext" <<_ACEOF
19489 #line 19489 "configure"
19490 #include "confdefs.h"
19491
19492 /* Override any gcc2 internal prototype to avoid an error.  */
19493 #ifdef __cplusplus
19494 extern "C"
19495 #endif
19496 /* We use char because int might match the return type of a gcc2
19497    builtin and then its argument prototype would still apply.  */
19498 char libiconv_open ();
19499 int
19500 main (void)
19501 {
19502 libiconv_open ();
19503   ;
19504   return 0;
19505 }
19506 _ACEOF
19507 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19508 if { (eval echo "$as_me:19508: \"$ac_link\"") >&5
19509   (eval $ac_link) 2>&5
19510   ac_status=$?
19511   echo "$as_me:19511: \$? = $ac_status" >&5
19512   (exit "$ac_status"); } &&
19513          { ac_try='test -s "conftest$ac_exeext"'
19514   { (eval echo "$as_me:19514: \"$ac_try\"") >&5
19515   (eval $ac_try) 2>&5
19516   ac_status=$?
19517   echo "$as_me:19517: \$? = $ac_status" >&5
19518   (exit "$ac_status"); }; }; then
19519   ac_cv_lib_iconv_libiconv_open=yes
19520 else
19521   echo "$as_me: failed program was:" >&5
19522 cat "conftest.$ac_ext" >&5
19523 ac_cv_lib_iconv_libiconv_open=no
19524 fi
19525 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19526 LIBS=$ac_check_lib_save_LIBS
19527 fi
19528 echo "$as_me:19528: result: $ac_cv_lib_iconv_libiconv_open" >&5
19529 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19530 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19531
19532 cf_add_libs="$LIBS"
19533 # reverse order
19534 cf_add_0lib=
19535 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19536 # filter duplicates
19537 for cf_add_1lib in $cf_add_0lib; do
19538         for cf_add_2lib in $cf_add_libs; do
19539                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19540                         cf_add_1lib=
19541                         break
19542                 fi
19543         done
19544         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19545 done
19546 LIBS="$cf_add_libs"
19547
19548 fi
19549
19550                 echo "$as_me:19550: checking for libintl_gettext in -lintl" >&5
19551 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19552 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19553   echo $ECHO_N "(cached) $ECHO_C" >&6
19554 else
19555   ac_check_lib_save_LIBS=$LIBS
19556 LIBS="-lintl  $LIBS"
19557 cat >"conftest.$ac_ext" <<_ACEOF
19558 #line 19558 "configure"
19559 #include "confdefs.h"
19560
19561 /* Override any gcc2 internal prototype to avoid an error.  */
19562 #ifdef __cplusplus
19563 extern "C"
19564 #endif
19565 /* We use char because int might match the return type of a gcc2
19566    builtin and then its argument prototype would still apply.  */
19567 char libintl_gettext ();
19568 int
19569 main (void)
19570 {
19571 libintl_gettext ();
19572   ;
19573   return 0;
19574 }
19575 _ACEOF
19576 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19577 if { (eval echo "$as_me:19577: \"$ac_link\"") >&5
19578   (eval $ac_link) 2>&5
19579   ac_status=$?
19580   echo "$as_me:19580: \$? = $ac_status" >&5
19581   (exit "$ac_status"); } &&
19582          { ac_try='test -s "conftest$ac_exeext"'
19583   { (eval echo "$as_me:19583: \"$ac_try\"") >&5
19584   (eval $ac_try) 2>&5
19585   ac_status=$?
19586   echo "$as_me:19586: \$? = $ac_status" >&5
19587   (exit "$ac_status"); }; }; then
19588   ac_cv_lib_intl_libintl_gettext=yes
19589 else
19590   echo "$as_me: failed program was:" >&5
19591 cat "conftest.$ac_ext" >&5
19592 ac_cv_lib_intl_libintl_gettext=no
19593 fi
19594 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19595 LIBS=$ac_check_lib_save_LIBS
19596 fi
19597 echo "$as_me:19597: result: $ac_cv_lib_intl_libintl_gettext" >&5
19598 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19599 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19600
19601 cf_add_libs="$LIBS"
19602 # reverse order
19603 cf_add_0lib=
19604 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19605 # filter duplicates
19606 for cf_add_1lib in $cf_add_0lib; do
19607         for cf_add_2lib in $cf_add_libs; do
19608                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19609                         cf_add_1lib=
19610                         break
19611                 fi
19612         done
19613         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19614 done
19615 LIBS="$cf_add_libs"
19616
19617 fi
19618
19619                 echo "$as_me:19619: checking for tre_regcomp in -ltre" >&5
19620 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19621 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19622   echo $ECHO_N "(cached) $ECHO_C" >&6
19623 else
19624   ac_check_lib_save_LIBS=$LIBS
19625 LIBS="-ltre  $LIBS"
19626 cat >"conftest.$ac_ext" <<_ACEOF
19627 #line 19627 "configure"
19628 #include "confdefs.h"
19629
19630 /* Override any gcc2 internal prototype to avoid an error.  */
19631 #ifdef __cplusplus
19632 extern "C"
19633 #endif
19634 /* We use char because int might match the return type of a gcc2
19635    builtin and then its argument prototype would still apply.  */
19636 char tre_regcomp ();
19637 int
19638 main (void)
19639 {
19640 tre_regcomp ();
19641   ;
19642   return 0;
19643 }
19644 _ACEOF
19645 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19646 if { (eval echo "$as_me:19646: \"$ac_link\"") >&5
19647   (eval $ac_link) 2>&5
19648   ac_status=$?
19649   echo "$as_me:19649: \$? = $ac_status" >&5
19650   (exit "$ac_status"); } &&
19651          { ac_try='test -s "conftest$ac_exeext"'
19652   { (eval echo "$as_me:19652: \"$ac_try\"") >&5
19653   (eval $ac_try) 2>&5
19654   ac_status=$?
19655   echo "$as_me:19655: \$? = $ac_status" >&5
19656   (exit "$ac_status"); }; }; then
19657   ac_cv_lib_tre_tre_regcomp=yes
19658 else
19659   echo "$as_me: failed program was:" >&5
19660 cat "conftest.$ac_ext" >&5
19661 ac_cv_lib_tre_tre_regcomp=no
19662 fi
19663 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19664 LIBS=$ac_check_lib_save_LIBS
19665 fi
19666 echo "$as_me:19666: result: $ac_cv_lib_tre_tre_regcomp" >&5
19667 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19668 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19669
19670 cf_add_libs="$LIBS"
19671 # reverse order
19672 cf_add_0lib=
19673 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19674 # filter duplicates
19675 for cf_add_1lib in $cf_add_0lib; do
19676         for cf_add_2lib in $cf_add_libs; do
19677                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19678                         cf_add_1lib=
19679                         break
19680                 fi
19681         done
19682         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19683 done
19684 LIBS="$cf_add_libs"
19685
19686 fi
19687
19688 cf_add_libs="$LIBS"
19689 # reverse order
19690 cf_add_0lib=
19691 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19692 # filter duplicates
19693 for cf_add_1lib in $cf_add_0lib; do
19694         for cf_add_2lib in $cf_add_libs; do
19695                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19696                         cf_add_1lib=
19697                         break
19698                 fi
19699         done
19700         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19701 done
19702 LIBS="$cf_add_libs"
19703
19704                 cf_regex_func=regcomp
19705
19706 else
19707
19708                 echo "$as_me:19708: checking for regcomp in -lgnurx" >&5
19709 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19710 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19711   echo $ECHO_N "(cached) $ECHO_C" >&6
19712 else
19713   ac_check_lib_save_LIBS=$LIBS
19714 LIBS="-lgnurx  $LIBS"
19715 cat >"conftest.$ac_ext" <<_ACEOF
19716 #line 19716 "configure"
19717 #include "confdefs.h"
19718
19719 /* Override any gcc2 internal prototype to avoid an error.  */
19720 #ifdef __cplusplus
19721 extern "C"
19722 #endif
19723 /* We use char because int might match the return type of a gcc2
19724    builtin and then its argument prototype would still apply.  */
19725 char regcomp ();
19726 int
19727 main (void)
19728 {
19729 regcomp ();
19730   ;
19731   return 0;
19732 }
19733 _ACEOF
19734 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19735 if { (eval echo "$as_me:19735: \"$ac_link\"") >&5
19736   (eval $ac_link) 2>&5
19737   ac_status=$?
19738   echo "$as_me:19738: \$? = $ac_status" >&5
19739   (exit "$ac_status"); } &&
19740          { ac_try='test -s "conftest$ac_exeext"'
19741   { (eval echo "$as_me:19741: \"$ac_try\"") >&5
19742   (eval $ac_try) 2>&5
19743   ac_status=$?
19744   echo "$as_me:19744: \$? = $ac_status" >&5
19745   (exit "$ac_status"); }; }; then
19746   ac_cv_lib_gnurx_regcomp=yes
19747 else
19748   echo "$as_me: failed program was:" >&5
19749 cat "conftest.$ac_ext" >&5
19750 ac_cv_lib_gnurx_regcomp=no
19751 fi
19752 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19753 LIBS=$ac_check_lib_save_LIBS
19754 fi
19755 echo "$as_me:19755: result: $ac_cv_lib_gnurx_regcomp" >&5
19756 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19757 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19758
19759 cf_add_libs="$LIBS"
19760 # reverse order
19761 cf_add_0lib=
19762 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19763 # filter duplicates
19764 for cf_add_1lib in $cf_add_0lib; do
19765         for cf_add_2lib in $cf_add_libs; do
19766                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19767                         cf_add_1lib=
19768                         break
19769                 fi
19770         done
19771         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19772 done
19773 LIBS="$cf_add_libs"
19774
19775                         cf_regex_func=regcomp
19776 fi
19777
19778 fi
19779
19780         ;;
19781 (*)
19782         cf_regex_libs="regex re"
19783         echo "$as_me:19783: checking for regcomp" >&5
19784 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19785 if test "${ac_cv_func_regcomp+set}" = set; then
19786   echo $ECHO_N "(cached) $ECHO_C" >&6
19787 else
19788   cat >"conftest.$ac_ext" <<_ACEOF
19789 #line 19789 "configure"
19790 #include "confdefs.h"
19791 #define regcomp autoconf_temporary
19792 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19793 #undef regcomp
19794
19795 #ifdef __cplusplus
19796 extern "C"
19797 #endif
19798
19799 /* We use char because int might match the return type of a gcc2
19800    builtin and then its argument prototype would still apply.  */
19801 char regcomp (void);
19802
19803 int
19804 main (void)
19805 {
19806
19807 /* The GNU C library defines stubs for functions which it implements
19808     to always fail with ENOSYS.  Some functions are actually named
19809     something starting with __ and the normal name is an alias.  */
19810 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19811 #error found stub for regcomp
19812 #endif
19813
19814         return regcomp ();
19815   ;
19816   return 0;
19817 }
19818 _ACEOF
19819 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19820 if { (eval echo "$as_me:19820: \"$ac_link\"") >&5
19821   (eval $ac_link) 2>&5
19822   ac_status=$?
19823   echo "$as_me:19823: \$? = $ac_status" >&5
19824   (exit "$ac_status"); } &&
19825          { ac_try='test -s "conftest$ac_exeext"'
19826   { (eval echo "$as_me:19826: \"$ac_try\"") >&5
19827   (eval $ac_try) 2>&5
19828   ac_status=$?
19829   echo "$as_me:19829: \$? = $ac_status" >&5
19830   (exit "$ac_status"); }; }; then
19831   ac_cv_func_regcomp=yes
19832 else
19833   echo "$as_me: failed program was:" >&5
19834 cat "conftest.$ac_ext" >&5
19835 ac_cv_func_regcomp=no
19836 fi
19837 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19838 fi
19839 echo "$as_me:19839: result: $ac_cv_func_regcomp" >&5
19840 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19841 if test "$ac_cv_func_regcomp" = yes; then
19842   cf_regex_func=regcomp
19843 else
19844
19845                 for cf_regex_lib in $cf_regex_libs
19846                 do
19847                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19848 echo "$as_me:19848: checking for regcomp in -l$cf_regex_lib" >&5
19849 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19850 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19851   echo $ECHO_N "(cached) $ECHO_C" >&6
19852 else
19853   ac_check_lib_save_LIBS=$LIBS
19854 LIBS="-l$cf_regex_lib  $LIBS"
19855 cat >"conftest.$ac_ext" <<_ACEOF
19856 #line 19856 "configure"
19857 #include "confdefs.h"
19858
19859 /* Override any gcc2 internal prototype to avoid an error.  */
19860 #ifdef __cplusplus
19861 extern "C"
19862 #endif
19863 /* We use char because int might match the return type of a gcc2
19864    builtin and then its argument prototype would still apply.  */
19865 char regcomp ();
19866 int
19867 main (void)
19868 {
19869 regcomp ();
19870   ;
19871   return 0;
19872 }
19873 _ACEOF
19874 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19875 if { (eval echo "$as_me:19875: \"$ac_link\"") >&5
19876   (eval $ac_link) 2>&5
19877   ac_status=$?
19878   echo "$as_me:19878: \$? = $ac_status" >&5
19879   (exit "$ac_status"); } &&
19880          { ac_try='test -s "conftest$ac_exeext"'
19881   { (eval echo "$as_me:19881: \"$ac_try\"") >&5
19882   (eval $ac_try) 2>&5
19883   ac_status=$?
19884   echo "$as_me:19884: \$? = $ac_status" >&5
19885   (exit "$ac_status"); }; }; then
19886   eval "$as_ac_Lib=yes"
19887 else
19888   echo "$as_me: failed program was:" >&5
19889 cat "conftest.$ac_ext" >&5
19890 eval "$as_ac_Lib=no"
19891 fi
19892 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19893 LIBS=$ac_check_lib_save_LIBS
19894 fi
19895 echo "$as_me:19895: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19896 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19897 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19898
19899 cf_add_libs="$LIBS"
19900 # reverse order
19901 cf_add_0lib=
19902 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19903 # filter duplicates
19904 for cf_add_1lib in $cf_add_0lib; do
19905         for cf_add_2lib in $cf_add_libs; do
19906                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19907                         cf_add_1lib=
19908                         break
19909                 fi
19910         done
19911         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19912 done
19913 LIBS="$cf_add_libs"
19914
19915                                         cf_regex_func=regcomp
19916                                         break
19917 fi
19918
19919                 done
19920
19921 fi
19922
19923         ;;
19924 esac
19925
19926 if test "$cf_regex_func" = no ; then
19927         echo "$as_me:19927: checking for compile" >&5
19928 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19929 if test "${ac_cv_func_compile+set}" = set; then
19930   echo $ECHO_N "(cached) $ECHO_C" >&6
19931 else
19932   cat >"conftest.$ac_ext" <<_ACEOF
19933 #line 19933 "configure"
19934 #include "confdefs.h"
19935 #define compile autoconf_temporary
19936 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19937 #undef compile
19938
19939 #ifdef __cplusplus
19940 extern "C"
19941 #endif
19942
19943 /* We use char because int might match the return type of a gcc2
19944    builtin and then its argument prototype would still apply.  */
19945 char compile (void);
19946
19947 int
19948 main (void)
19949 {
19950
19951 /* The GNU C library defines stubs for functions which it implements
19952     to always fail with ENOSYS.  Some functions are actually named
19953     something starting with __ and the normal name is an alias.  */
19954 #if defined (__stub_compile) || defined (__stub___compile)
19955 #error found stub for compile
19956 #endif
19957
19958         return compile ();
19959   ;
19960   return 0;
19961 }
19962 _ACEOF
19963 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19964 if { (eval echo "$as_me:19964: \"$ac_link\"") >&5
19965   (eval $ac_link) 2>&5
19966   ac_status=$?
19967   echo "$as_me:19967: \$? = $ac_status" >&5
19968   (exit "$ac_status"); } &&
19969          { ac_try='test -s "conftest$ac_exeext"'
19970   { (eval echo "$as_me:19970: \"$ac_try\"") >&5
19971   (eval $ac_try) 2>&5
19972   ac_status=$?
19973   echo "$as_me:19973: \$? = $ac_status" >&5
19974   (exit "$ac_status"); }; }; then
19975   ac_cv_func_compile=yes
19976 else
19977   echo "$as_me: failed program was:" >&5
19978 cat "conftest.$ac_ext" >&5
19979 ac_cv_func_compile=no
19980 fi
19981 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19982 fi
19983 echo "$as_me:19983: result: $ac_cv_func_compile" >&5
19984 echo "${ECHO_T}$ac_cv_func_compile" >&6
19985 if test "$ac_cv_func_compile" = yes; then
19986   cf_regex_func=compile
19987 else
19988
19989                 echo "$as_me:19989: checking for compile in -lgen" >&5
19990 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19991 if test "${ac_cv_lib_gen_compile+set}" = set; then
19992   echo $ECHO_N "(cached) $ECHO_C" >&6
19993 else
19994   ac_check_lib_save_LIBS=$LIBS
19995 LIBS="-lgen  $LIBS"
19996 cat >"conftest.$ac_ext" <<_ACEOF
19997 #line 19997 "configure"
19998 #include "confdefs.h"
19999
20000 /* Override any gcc2 internal prototype to avoid an error.  */
20001 #ifdef __cplusplus
20002 extern "C"
20003 #endif
20004 /* We use char because int might match the return type of a gcc2
20005    builtin and then its argument prototype would still apply.  */
20006 char compile ();
20007 int
20008 main (void)
20009 {
20010 compile ();
20011   ;
20012   return 0;
20013 }
20014 _ACEOF
20015 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20016 if { (eval echo "$as_me:20016: \"$ac_link\"") >&5
20017   (eval $ac_link) 2>&5
20018   ac_status=$?
20019   echo "$as_me:20019: \$? = $ac_status" >&5
20020   (exit "$ac_status"); } &&
20021          { ac_try='test -s "conftest$ac_exeext"'
20022   { (eval echo "$as_me:20022: \"$ac_try\"") >&5
20023   (eval $ac_try) 2>&5
20024   ac_status=$?
20025   echo "$as_me:20025: \$? = $ac_status" >&5
20026   (exit "$ac_status"); }; }; then
20027   ac_cv_lib_gen_compile=yes
20028 else
20029   echo "$as_me: failed program was:" >&5
20030 cat "conftest.$ac_ext" >&5
20031 ac_cv_lib_gen_compile=no
20032 fi
20033 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20034 LIBS=$ac_check_lib_save_LIBS
20035 fi
20036 echo "$as_me:20036: result: $ac_cv_lib_gen_compile" >&5
20037 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
20038 if test "$ac_cv_lib_gen_compile" = yes; then
20039
20040 cf_add_libs="$LIBS"
20041 # reverse order
20042 cf_add_0lib=
20043 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20044 # filter duplicates
20045 for cf_add_1lib in $cf_add_0lib; do
20046         for cf_add_2lib in $cf_add_libs; do
20047                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20048                         cf_add_1lib=
20049                         break
20050                 fi
20051         done
20052         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20053 done
20054 LIBS="$cf_add_libs"
20055
20056                                 cf_regex_func=compile
20057 fi
20058
20059 fi
20060
20061 fi
20062
20063 if test "$cf_regex_func" = no ; then
20064         { echo "$as_me:20064: WARNING: cannot find regular expression library" >&5
20065 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
20066 fi
20067
20068 echo "$as_me:20068: checking for regular-expression headers" >&5
20069 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
20070 if test "${cf_cv_regex_hdrs+set}" = set; then
20071   echo $ECHO_N "(cached) $ECHO_C" >&6
20072 else
20073
20074 cf_cv_regex_hdrs=no
20075 case "$cf_regex_func" in
20076 (compile)
20077         for cf_regex_hdr in regexp.h regexpr.h
20078         do
20079                 cat >"conftest.$ac_ext" <<_ACEOF
20080 #line 20080 "configure"
20081 #include "confdefs.h"
20082 #include <$cf_regex_hdr>
20083 int
20084 main (void)
20085 {
20086
20087                         char *p = compile("", "", "", 0);
20088                         int x = step("", "");
20089                         (void)p;
20090                         (void)x;
20091
20092   ;
20093   return 0;
20094 }
20095 _ACEOF
20096 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20097 if { (eval echo "$as_me:20097: \"$ac_link\"") >&5
20098   (eval $ac_link) 2>&5
20099   ac_status=$?
20100   echo "$as_me:20100: \$? = $ac_status" >&5
20101   (exit "$ac_status"); } &&
20102          { ac_try='test -s "conftest$ac_exeext"'
20103   { (eval echo "$as_me:20103: \"$ac_try\"") >&5
20104   (eval $ac_try) 2>&5
20105   ac_status=$?
20106   echo "$as_me:20106: \$? = $ac_status" >&5
20107   (exit "$ac_status"); }; }; then
20108
20109                         cf_cv_regex_hdrs=$cf_regex_hdr
20110                         break
20111
20112 else
20113   echo "$as_me: failed program was:" >&5
20114 cat "conftest.$ac_ext" >&5
20115 fi
20116 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20117         done
20118         ;;
20119 (*)
20120         for cf_regex_hdr in regex.h
20121         do
20122                 cat >"conftest.$ac_ext" <<_ACEOF
20123 #line 20123 "configure"
20124 #include "confdefs.h"
20125 #include <sys/types.h>
20126 #include <$cf_regex_hdr>
20127 int
20128 main (void)
20129 {
20130
20131                         regex_t *p = 0;
20132                         int x = regcomp(p, "", 0);
20133                         int y = regexec(p, "", 0, 0, 0);
20134                         (void)x;
20135                         (void)y;
20136                         regfree(p);
20137
20138   ;
20139   return 0;
20140 }
20141 _ACEOF
20142 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20143 if { (eval echo "$as_me:20143: \"$ac_link\"") >&5
20144   (eval $ac_link) 2>&5
20145   ac_status=$?
20146   echo "$as_me:20146: \$? = $ac_status" >&5
20147   (exit "$ac_status"); } &&
20148          { ac_try='test -s "conftest$ac_exeext"'
20149   { (eval echo "$as_me:20149: \"$ac_try\"") >&5
20150   (eval $ac_try) 2>&5
20151   ac_status=$?
20152   echo "$as_me:20152: \$? = $ac_status" >&5
20153   (exit "$ac_status"); }; }; then
20154
20155                         cf_cv_regex_hdrs=$cf_regex_hdr
20156                         break
20157
20158 else
20159   echo "$as_me: failed program was:" >&5
20160 cat "conftest.$ac_ext" >&5
20161 fi
20162 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20163         done
20164         ;;
20165 esac
20166
20167 fi
20168 echo "$as_me:20168: result: $cf_cv_regex_hdrs" >&5
20169 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
20170
20171 case "$cf_cv_regex_hdrs" in
20172         (no)            { echo "$as_me:20172: WARNING: no regular expression header found" >&5
20173 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
20174         (regex.h)
20175 cat >>confdefs.h <<\EOF
20176 #define HAVE_REGEX_H_FUNCS 1
20177 EOF
20178  ;;
20179         (regexp.h)
20180 cat >>confdefs.h <<\EOF
20181 #define HAVE_REGEXP_H_FUNCS 1
20182 EOF
20183  ;;
20184         (regexpr.h)
20185 cat >>confdefs.h <<\EOF
20186 #define HAVE_REGEXPR_H_FUNCS 1
20187 EOF
20188  ;;
20189 esac
20190
20191 for ac_header in \
20192 fcntl.h \
20193 getopt.h \
20194 limits.h \
20195 locale.h \
20196 math.h \
20197 poll.h \
20198 sys/auxv.h \
20199 sys/ioctl.h \
20200 sys/param.h \
20201 sys/poll.h \
20202 sys/select.h \
20203 sys/time.h \
20204 sys/times.h \
20205 unistd.h \
20206 wctype.h \
20207
20208 do
20209 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20210 echo "$as_me:20210: checking for $ac_header" >&5
20211 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20212 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20213   echo $ECHO_N "(cached) $ECHO_C" >&6
20214 else
20215   cat >"conftest.$ac_ext" <<_ACEOF
20216 #line 20216 "configure"
20217 #include "confdefs.h"
20218 #include <$ac_header>
20219 _ACEOF
20220 if { (eval echo "$as_me:20220: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20221   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20222   ac_status=$?
20223   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20224   rm -f conftest.er1
20225   cat conftest.err >&5
20226   echo "$as_me:20226: \$? = $ac_status" >&5
20227   (exit "$ac_status"); } >/dev/null; then
20228   if test -s conftest.err; then
20229     ac_cpp_err=$ac_c_preproc_warn_flag
20230   else
20231     ac_cpp_err=
20232   fi
20233 else
20234   ac_cpp_err=yes
20235 fi
20236 if test -z "$ac_cpp_err"; then
20237   eval "$as_ac_Header=yes"
20238 else
20239   echo "$as_me: failed program was:" >&5
20240   cat "conftest.$ac_ext" >&5
20241   eval "$as_ac_Header=no"
20242 fi
20243 rm -f conftest.err "conftest.$ac_ext"
20244 fi
20245 echo "$as_me:20245: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20246 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20247 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20248   cat >>confdefs.h <<EOF
20249 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20250 EOF
20251
20252 fi
20253 done
20254
20255 for ac_header in unistd.h getopt.h
20256 do
20257 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20258 echo "$as_me:20258: checking for $ac_header" >&5
20259 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20260 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20261   echo $ECHO_N "(cached) $ECHO_C" >&6
20262 else
20263   cat >"conftest.$ac_ext" <<_ACEOF
20264 #line 20264 "configure"
20265 #include "confdefs.h"
20266 #include <$ac_header>
20267 _ACEOF
20268 if { (eval echo "$as_me:20268: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20269   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20270   ac_status=$?
20271   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20272   rm -f conftest.er1
20273   cat conftest.err >&5
20274   echo "$as_me:20274: \$? = $ac_status" >&5
20275   (exit "$ac_status"); } >/dev/null; then
20276   if test -s conftest.err; then
20277     ac_cpp_err=$ac_c_preproc_warn_flag
20278   else
20279     ac_cpp_err=
20280   fi
20281 else
20282   ac_cpp_err=yes
20283 fi
20284 if test -z "$ac_cpp_err"; then
20285   eval "$as_ac_Header=yes"
20286 else
20287   echo "$as_me: failed program was:" >&5
20288   cat "conftest.$ac_ext" >&5
20289   eval "$as_ac_Header=no"
20290 fi
20291 rm -f conftest.err "conftest.$ac_ext"
20292 fi
20293 echo "$as_me:20293: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20294 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20295 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20296   cat >>confdefs.h <<EOF
20297 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20298 EOF
20299
20300 fi
20301 done
20302
20303 echo "$as_me:20303: checking for header declaring getopt variables" >&5
20304 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
20305 if test "${cf_cv_getopt_header+set}" = set; then
20306   echo $ECHO_N "(cached) $ECHO_C" >&6
20307 else
20308
20309 cf_cv_getopt_header=none
20310 for cf_header in stdio.h stdlib.h unistd.h getopt.h
20311 do
20312 cat >"conftest.$ac_ext" <<_ACEOF
20313 #line 20313 "configure"
20314 #include "confdefs.h"
20315
20316 #include <$cf_header>
20317 int
20318 main (void)
20319 {
20320 int x = optind; char *y = optarg; (void)x; (void)y
20321   ;
20322   return 0;
20323 }
20324 _ACEOF
20325 rm -f "conftest.$ac_objext"
20326 if { (eval echo "$as_me:20326: \"$ac_compile\"") >&5
20327   (eval $ac_compile) 2>&5
20328   ac_status=$?
20329   echo "$as_me:20329: \$? = $ac_status" >&5
20330   (exit "$ac_status"); } &&
20331          { ac_try='test -s "conftest.$ac_objext"'
20332   { (eval echo "$as_me:20332: \"$ac_try\"") >&5
20333   (eval $ac_try) 2>&5
20334   ac_status=$?
20335   echo "$as_me:20335: \$? = $ac_status" >&5
20336   (exit "$ac_status"); }; }; then
20337   cf_cv_getopt_header=$cf_header
20338  break
20339 else
20340   echo "$as_me: failed program was:" >&5
20341 cat "conftest.$ac_ext" >&5
20342 fi
20343 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20344 done
20345
20346 fi
20347 echo "$as_me:20347: result: $cf_cv_getopt_header" >&5
20348 echo "${ECHO_T}$cf_cv_getopt_header" >&6
20349 if test "$cf_cv_getopt_header" != none ; then
20350
20351 cat >>confdefs.h <<\EOF
20352 #define HAVE_GETOPT_HEADER 1
20353 EOF
20354
20355 fi
20356 if test "$cf_cv_getopt_header" = getopt.h ; then
20357
20358 cat >>confdefs.h <<\EOF
20359 #define NEED_GETOPT_H 1
20360 EOF
20361
20362 fi
20363
20364 echo "$as_me:20364: checking if external environ is declared" >&5
20365 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
20366 if test "${cf_cv_dcl_environ+set}" = set; then
20367   echo $ECHO_N "(cached) $ECHO_C" >&6
20368 else
20369
20370     cat >"conftest.$ac_ext" <<_ACEOF
20371 #line 20371 "configure"
20372 #include "confdefs.h"
20373
20374 $ac_includes_default
20375 int
20376 main (void)
20377 {
20378 void* x = (void*) environ; (void)x
20379   ;
20380   return 0;
20381 }
20382 _ACEOF
20383 rm -f "conftest.$ac_objext"
20384 if { (eval echo "$as_me:20384: \"$ac_compile\"") >&5
20385   (eval $ac_compile) 2>&5
20386   ac_status=$?
20387   echo "$as_me:20387: \$? = $ac_status" >&5
20388   (exit "$ac_status"); } &&
20389          { ac_try='test -s "conftest.$ac_objext"'
20390   { (eval echo "$as_me:20390: \"$ac_try\"") >&5
20391   (eval $ac_try) 2>&5
20392   ac_status=$?
20393   echo "$as_me:20393: \$? = $ac_status" >&5
20394   (exit "$ac_status"); }; }; then
20395   cf_cv_dcl_environ=yes
20396 else
20397   echo "$as_me: failed program was:" >&5
20398 cat "conftest.$ac_ext" >&5
20399 cf_cv_dcl_environ=no
20400 fi
20401 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20402
20403 fi
20404 echo "$as_me:20404: result: $cf_cv_dcl_environ" >&5
20405 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20406
20407 if test "$cf_cv_dcl_environ" = no ; then
20408
20409 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20410
20411     cat >>confdefs.h <<EOF
20412 #define $cf_result 1
20413 EOF
20414
20415 fi
20416
20417 # It's possible (for near-UNIX clones) that the data doesn't exist
20418
20419 echo "$as_me:20419: checking if external environ exists" >&5
20420 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20421 if test "${cf_cv_have_environ+set}" = set; then
20422   echo $ECHO_N "(cached) $ECHO_C" >&6
20423 else
20424
20425         cat >"conftest.$ac_ext" <<_ACEOF
20426 #line 20426 "configure"
20427 #include "confdefs.h"
20428
20429 #undef environ
20430 extern int environ;
20431
20432 int
20433 main (void)
20434 {
20435 environ = 2
20436   ;
20437   return 0;
20438 }
20439 _ACEOF
20440 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20441 if { (eval echo "$as_me:20441: \"$ac_link\"") >&5
20442   (eval $ac_link) 2>&5
20443   ac_status=$?
20444   echo "$as_me:20444: \$? = $ac_status" >&5
20445   (exit "$ac_status"); } &&
20446          { ac_try='test -s "conftest$ac_exeext"'
20447   { (eval echo "$as_me:20447: \"$ac_try\"") >&5
20448   (eval $ac_try) 2>&5
20449   ac_status=$?
20450   echo "$as_me:20450: \$? = $ac_status" >&5
20451   (exit "$ac_status"); }; }; then
20452   cf_cv_have_environ=yes
20453 else
20454   echo "$as_me: failed program was:" >&5
20455 cat "conftest.$ac_ext" >&5
20456 cf_cv_have_environ=no
20457 fi
20458 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20459
20460 fi
20461 echo "$as_me:20461: result: $cf_cv_have_environ" >&5
20462 echo "${ECHO_T}$cf_cv_have_environ" >&6
20463
20464 if test "$cf_cv_have_environ" = yes ; then
20465
20466 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20467
20468         cat >>confdefs.h <<EOF
20469 #define $cf_result 1
20470 EOF
20471
20472 fi
20473
20474 echo "$as_me:20474: checking for getenv" >&5
20475 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20476 if test "${ac_cv_func_getenv+set}" = set; then
20477   echo $ECHO_N "(cached) $ECHO_C" >&6
20478 else
20479   cat >"conftest.$ac_ext" <<_ACEOF
20480 #line 20480 "configure"
20481 #include "confdefs.h"
20482 #define getenv autoconf_temporary
20483 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20484 #undef getenv
20485
20486 #ifdef __cplusplus
20487 extern "C"
20488 #endif
20489
20490 /* We use char because int might match the return type of a gcc2
20491    builtin and then its argument prototype would still apply.  */
20492 char getenv (void);
20493
20494 int
20495 main (void)
20496 {
20497
20498 /* The GNU C library defines stubs for functions which it implements
20499     to always fail with ENOSYS.  Some functions are actually named
20500     something starting with __ and the normal name is an alias.  */
20501 #if defined (__stub_getenv) || defined (__stub___getenv)
20502 #error found stub for getenv
20503 #endif
20504
20505         return getenv ();
20506   ;
20507   return 0;
20508 }
20509 _ACEOF
20510 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20511 if { (eval echo "$as_me:20511: \"$ac_link\"") >&5
20512   (eval $ac_link) 2>&5
20513   ac_status=$?
20514   echo "$as_me:20514: \$? = $ac_status" >&5
20515   (exit "$ac_status"); } &&
20516          { ac_try='test -s "conftest$ac_exeext"'
20517   { (eval echo "$as_me:20517: \"$ac_try\"") >&5
20518   (eval $ac_try) 2>&5
20519   ac_status=$?
20520   echo "$as_me:20520: \$? = $ac_status" >&5
20521   (exit "$ac_status"); }; }; then
20522   ac_cv_func_getenv=yes
20523 else
20524   echo "$as_me: failed program was:" >&5
20525 cat "conftest.$ac_ext" >&5
20526 ac_cv_func_getenv=no
20527 fi
20528 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20529 fi
20530 echo "$as_me:20530: result: $ac_cv_func_getenv" >&5
20531 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20532
20533 for ac_func in putenv setenv strdup
20534 do
20535 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20536 echo "$as_me:20536: checking for $ac_func" >&5
20537 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20538 if eval "test \"\${$as_ac_var+set}\" = set"; then
20539   echo $ECHO_N "(cached) $ECHO_C" >&6
20540 else
20541   cat >"conftest.$ac_ext" <<_ACEOF
20542 #line 20542 "configure"
20543 #include "confdefs.h"
20544 #define $ac_func autoconf_temporary
20545 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20546 #undef $ac_func
20547
20548 #ifdef __cplusplus
20549 extern "C"
20550 #endif
20551
20552 /* We use char because int might match the return type of a gcc2
20553    builtin and then its argument prototype would still apply.  */
20554 char $ac_func (void);
20555
20556 int
20557 main (void)
20558 {
20559
20560 /* The GNU C library defines stubs for functions which it implements
20561     to always fail with ENOSYS.  Some functions are actually named
20562     something starting with __ and the normal name is an alias.  */
20563 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20564 #error found stub for $ac_func
20565 #endif
20566
20567         return $ac_func ();
20568   ;
20569   return 0;
20570 }
20571 _ACEOF
20572 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20573 if { (eval echo "$as_me:20573: \"$ac_link\"") >&5
20574   (eval $ac_link) 2>&5
20575   ac_status=$?
20576   echo "$as_me:20576: \$? = $ac_status" >&5
20577   (exit "$ac_status"); } &&
20578          { ac_try='test -s "conftest$ac_exeext"'
20579   { (eval echo "$as_me:20579: \"$ac_try\"") >&5
20580   (eval $ac_try) 2>&5
20581   ac_status=$?
20582   echo "$as_me:20582: \$? = $ac_status" >&5
20583   (exit "$ac_status"); }; }; then
20584   eval "$as_ac_var=yes"
20585 else
20586   echo "$as_me: failed program was:" >&5
20587 cat "conftest.$ac_ext" >&5
20588 eval "$as_ac_var=no"
20589 fi
20590 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20591 fi
20592 echo "$as_me:20592: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20593 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20594 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20595   cat >>confdefs.h <<EOF
20596 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20597 EOF
20598
20599 fi
20600 done
20601
20602 echo "$as_me:20602: checking if getenv returns consistent values" >&5
20603 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20604 if test "${cf_cv_consistent_getenv+set}" = set; then
20605   echo $ECHO_N "(cached) $ECHO_C" >&6
20606 else
20607
20608 if test "$cross_compiling" = yes; then
20609   cf_cv_consistent_getenv=unknown
20610 else
20611   cat >"conftest.$ac_ext" <<_ACEOF
20612 #line 20612 "configure"
20613 #include "confdefs.h"
20614
20615 $ac_includes_default
20616
20617 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20618 extern char **environ;  /* POSIX, but some systems are not... */
20619 #endif
20620
20621 #if defined(HAVE_STRDUP)
20622 #define str_alloc(s) strdup(s)
20623 #else
20624 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20625 #endif
20626
20627 static void set_value(const char *name, const char *value)
20628 {
20629 #if defined(HAVE_SETENV)
20630         setenv(name, value, 1);
20631 #elif defined(HAVE_PUTENV)
20632         char buffer[1024];
20633         sprintf(buffer, "%s=%s", name, value);
20634         putenv(str_alloc(buffer));
20635 #else
20636 #error neither putenv/setenv found
20637 #endif
20638 }
20639 int main(void)
20640 {
20641         int pass;
20642         size_t numenv, limit, j;
20643         char **mynames;
20644         char **myvalues;
20645         char **mypointer;
20646         char *equals;
20647         for (numenv = 0; environ[numenv]; ++numenv) ;
20648         limit = numenv + 10;
20649         mynames = (char **) calloc(limit + 1, sizeof(char *));
20650         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20651         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20652 #if defined(HAVE_ENVIRON)
20653         for (j = 0; environ[j]; ++j) {
20654                 mynames[j] = str_alloc(environ[j]);
20655                 equals = strchr(mynames[j], '=');
20656                 if (equals != 0) {
20657                         *equals++ = '\\0';
20658                         myvalues[j] = str_alloc(equals);
20659                 } else {
20660                         myvalues[j] = str_alloc("");
20661                 }
20662         }
20663 #endif
20664         for (j = numenv; j < limit; ++j) {
20665                 char name[80];
20666                 char value[80];
20667                 size_t found;
20668                 size_t k = 0;
20669                 do {
20670                         size_t jk;
20671                         found = 0;
20672                         sprintf(name, "TERM%lu", (unsigned long) k);
20673                         for (jk = 0; jk < j; ++jk) {
20674                                 if (!strcmp(name, mynames[jk])) {
20675                                         found = 1;
20676                                         ++k;
20677                                         break;
20678                                 }
20679                         }
20680                 } while (found);
20681                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20682                 set_value(name, value);
20683                 mynames[j] = str_alloc(name);
20684                 myvalues[j] = str_alloc(value);
20685         }
20686         for (pass = 0; pass < 3; ++pass) {
20687                 for (j = 0; j < limit; ++j) {
20688                         char *value = getenv(mynames[j]);
20689                         if (pass) {
20690                                 if (value == 0) {
20691                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20692                                         ${cf_cv_main_return:-return}(1);
20693                                 } else if (value != mypointer[j]) {
20694                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20695                                         ${cf_cv_main_return:-return}(1);
20696                                 } else if (strcmp(value, myvalues[j])) {
20697                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20698                                         ${cf_cv_main_return:-return}(1);
20699                                 }
20700                         } else {
20701                                 size_t k;
20702                                 mypointer[j] = value;
20703                                 for (k = 0; k < j; ++k) {
20704                                         if (mypointer[j] == mypointer[k]) {
20705                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20706                                                 ${cf_cv_main_return:-return}(1);
20707                                         }
20708                                 }
20709                         }
20710                 }
20711         }
20712         ${cf_cv_main_return:-return}(0);
20713 }
20714
20715 _ACEOF
20716 rm -f "conftest$ac_exeext"
20717 if { (eval echo "$as_me:20717: \"$ac_link\"") >&5
20718   (eval $ac_link) 2>&5
20719   ac_status=$?
20720   echo "$as_me:20720: \$? = $ac_status" >&5
20721   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20722   { (eval echo "$as_me:20722: \"$ac_try\"") >&5
20723   (eval $ac_try) 2>&5
20724   ac_status=$?
20725   echo "$as_me:20725: \$? = $ac_status" >&5
20726   (exit "$ac_status"); }; }; then
20727   cf_cv_consistent_getenv=yes
20728 else
20729   echo "$as_me: program exited with status $ac_status" >&5
20730 echo "$as_me: failed program was:" >&5
20731 cat "conftest.$ac_ext" >&5
20732 cf_cv_consistent_getenv=no
20733 fi
20734 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20735 fi
20736
20737 fi
20738 echo "$as_me:20738: result: $cf_cv_consistent_getenv" >&5
20739 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20740
20741 if test "x$cf_cv_consistent_getenv" = xno
20742 then
20743
20744 cat >>confdefs.h <<\EOF
20745 #define HAVE_CONSISTENT_GETENV 1
20746 EOF
20747
20748 fi
20749
20750 if test "x$cf_cv_consistent_getenv" = xno && \
20751         test "x$cf_with_trace" = xyes
20752 then
20753         { echo "$as_me:20753: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20754 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20755 fi
20756
20757 echo "$as_me:20757: checking if sys/time.h works with sys/select.h" >&5
20758 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20759 if test "${cf_cv_sys_time_select+set}" = set; then
20760   echo $ECHO_N "(cached) $ECHO_C" >&6
20761 else
20762
20763 cat >"conftest.$ac_ext" <<_ACEOF
20764 #line 20764 "configure"
20765 #include "confdefs.h"
20766
20767 #include <sys/types.h>
20768 #ifdef HAVE_SYS_TIME_H
20769 #include <sys/time.h>
20770 #endif
20771 #ifdef HAVE_SYS_SELECT_H
20772 #include <sys/select.h>
20773 #endif
20774
20775 int
20776 main (void)
20777 {
20778
20779   ;
20780   return 0;
20781 }
20782 _ACEOF
20783 rm -f "conftest.$ac_objext"
20784 if { (eval echo "$as_me:20784: \"$ac_compile\"") >&5
20785   (eval $ac_compile) 2>&5
20786   ac_status=$?
20787   echo "$as_me:20787: \$? = $ac_status" >&5
20788   (exit "$ac_status"); } &&
20789          { ac_try='test -s "conftest.$ac_objext"'
20790   { (eval echo "$as_me:20790: \"$ac_try\"") >&5
20791   (eval $ac_try) 2>&5
20792   ac_status=$?
20793   echo "$as_me:20793: \$? = $ac_status" >&5
20794   (exit "$ac_status"); }; }; then
20795   cf_cv_sys_time_select=yes
20796 else
20797   echo "$as_me: failed program was:" >&5
20798 cat "conftest.$ac_ext" >&5
20799 cf_cv_sys_time_select=no
20800 fi
20801 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20802
20803 fi
20804
20805 echo "$as_me:20805: result: $cf_cv_sys_time_select" >&5
20806 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20807 test "$cf_cv_sys_time_select" = yes &&
20808 cat >>confdefs.h <<\EOF
20809 #define HAVE_SYS_TIME_SELECT 1
20810 EOF
20811
20812 ###     checks for compiler characteristics
20813 ac_ext=c
20814 ac_cpp='$CPP $CPPFLAGS'
20815 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20816 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20817 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20818 ac_main_return="return"
20819
20820 echo "$as_me:20820: checking for an ANSI C-conforming const" >&5
20821 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20822 if test "${ac_cv_c_const+set}" = set; then
20823   echo $ECHO_N "(cached) $ECHO_C" >&6
20824 else
20825   cat >"conftest.$ac_ext" <<_ACEOF
20826 #line 20826 "configure"
20827 #include "confdefs.h"
20828
20829 int
20830 main (void)
20831 {
20832 /* FIXME: Include the comments suggested by Paul. */
20833 #ifndef __cplusplus
20834   /* Ultrix mips cc rejects this.  */
20835   typedef int charset[2];
20836   const charset x;
20837   /* SunOS 4.1.1 cc rejects this.  */
20838   char const *const *ccp;
20839   char **p;
20840   /* NEC SVR4.0.2 mips cc rejects this.  */
20841   struct point {int x, y;};
20842   static struct point const zero = {0,0};
20843   /* AIX XL C 1.02.0.0 rejects this.
20844      It does not let you subtract one const X* pointer from another in
20845      an arm of an if-expression whose if-part is not a constant
20846      expression */
20847   const char *g = "string";
20848   ccp = &g + (g ? g-g : 0);
20849   /* HPUX 7.0 cc rejects these. */
20850   ++ccp;
20851   p = (char**) ccp;
20852   ccp = (char const *const *) p;
20853   { /* SCO 3.2v4 cc rejects this.  */
20854     char *t;
20855     char const *s = 0 ? (char *) 0 : (char const *) 0;
20856
20857     *t++ = 0;
20858   }
20859   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20860     int x[] = {25, 17};
20861     const int *foo = &x[0];
20862     ++foo;
20863   }
20864   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20865     typedef const int *iptr;
20866     iptr p = 0;
20867     ++p;
20868   }
20869   { /* AIX XL C 1.02.0.0 rejects this saying
20870        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20871     struct s { int j; const int *ap[3]; };
20872     struct s *b; b->j = 5;
20873   }
20874   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20875     const int foo = 10;
20876   }
20877 #endif
20878
20879   ;
20880   return 0;
20881 }
20882 _ACEOF
20883 rm -f "conftest.$ac_objext"
20884 if { (eval echo "$as_me:20884: \"$ac_compile\"") >&5
20885   (eval $ac_compile) 2>&5
20886   ac_status=$?
20887   echo "$as_me:20887: \$? = $ac_status" >&5
20888   (exit "$ac_status"); } &&
20889          { ac_try='test -s "conftest.$ac_objext"'
20890   { (eval echo "$as_me:20890: \"$ac_try\"") >&5
20891   (eval $ac_try) 2>&5
20892   ac_status=$?
20893   echo "$as_me:20893: \$? = $ac_status" >&5
20894   (exit "$ac_status"); }; }; then
20895   ac_cv_c_const=yes
20896 else
20897   echo "$as_me: failed program was:" >&5
20898 cat "conftest.$ac_ext" >&5
20899 ac_cv_c_const=no
20900 fi
20901 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20902 fi
20903 echo "$as_me:20903: result: $ac_cv_c_const" >&5
20904 echo "${ECHO_T}$ac_cv_c_const" >&6
20905 if test $ac_cv_c_const = no; then
20906
20907 cat >>confdefs.h <<\EOF
20908 #define const
20909 EOF
20910
20911 fi
20912
20913 echo "$as_me:20913: checking for inline" >&5
20914 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20915 if test "${ac_cv_c_inline+set}" = set; then
20916   echo $ECHO_N "(cached) $ECHO_C" >&6
20917 else
20918   ac_cv_c_inline=no
20919 for ac_kw in inline __inline__ __inline; do
20920   cat >"conftest.$ac_ext" <<_ACEOF
20921 #line 20921 "configure"
20922 #include "confdefs.h"
20923 #ifndef __cplusplus
20924 static $ac_kw int static_foo () {return 0; }
20925 $ac_kw int foo () {return 0; }
20926 #endif
20927
20928 _ACEOF
20929 rm -f "conftest.$ac_objext"
20930 if { (eval echo "$as_me:20930: \"$ac_compile\"") >&5
20931   (eval $ac_compile) 2>&5
20932   ac_status=$?
20933   echo "$as_me:20933: \$? = $ac_status" >&5
20934   (exit "$ac_status"); } &&
20935          { ac_try='test -s "conftest.$ac_objext"'
20936   { (eval echo "$as_me:20936: \"$ac_try\"") >&5
20937   (eval $ac_try) 2>&5
20938   ac_status=$?
20939   echo "$as_me:20939: \$? = $ac_status" >&5
20940   (exit "$ac_status"); }; }; then
20941   ac_cv_c_inline=$ac_kw; break
20942 else
20943   echo "$as_me: failed program was:" >&5
20944 cat "conftest.$ac_ext" >&5
20945 fi
20946 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20947 done
20948
20949 fi
20950 echo "$as_me:20950: result: $ac_cv_c_inline" >&5
20951 echo "${ECHO_T}$ac_cv_c_inline" >&6
20952 case $ac_cv_c_inline in
20953   inline | yes) ;;
20954   no)
20955 cat >>confdefs.h <<\EOF
20956 #define inline
20957 EOF
20958  ;;
20959   *)  cat >>confdefs.h <<EOF
20960 #define inline $ac_cv_c_inline
20961 EOF
20962  ;;
20963 esac
20964
20965 NCURSES_INLINE=
20966 if test "$ac_cv_c_inline" != no ; then
20967         NCURSES_INLINE=inline
20968         if test "$INTEL_COMPILER" = yes
20969         then
20970                 :
20971         elif test "$CLANG_COMPILER" = yes
20972         then
20973                 :
20974         elif test "$GCC" = yes
20975         then
20976                 echo "$as_me:20976: checking if $CC supports options to tune inlining" >&5
20977 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20978 if test "${cf_cv_gcc_inline+set}" = set; then
20979   echo $ECHO_N "(cached) $ECHO_C" >&6
20980 else
20981
20982                 cf_save_CFLAGS=$CFLAGS
20983                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20984                 cat >"conftest.$ac_ext" <<_ACEOF
20985 #line 20985 "configure"
20986 #include "confdefs.h"
20987 inline int foo(void) { return 1; }
20988 int
20989 main (void)
20990 {
20991 ${cf_cv_main_return:-return} foo()
20992   ;
20993   return 0;
20994 }
20995 _ACEOF
20996 rm -f "conftest.$ac_objext"
20997 if { (eval echo "$as_me:20997: \"$ac_compile\"") >&5
20998   (eval $ac_compile) 2>&5
20999   ac_status=$?
21000   echo "$as_me:21000: \$? = $ac_status" >&5
21001   (exit "$ac_status"); } &&
21002          { ac_try='test -s "conftest.$ac_objext"'
21003   { (eval echo "$as_me:21003: \"$ac_try\"") >&5
21004   (eval $ac_try) 2>&5
21005   ac_status=$?
21006   echo "$as_me:21006: \$? = $ac_status" >&5
21007   (exit "$ac_status"); }; }; then
21008   cf_cv_gcc_inline=yes
21009 else
21010   echo "$as_me: failed program was:" >&5
21011 cat "conftest.$ac_ext" >&5
21012 cf_cv_gcc_inline=no
21013 fi
21014 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21015                 CFLAGS=$cf_save_CFLAGS
21016
21017 fi
21018 echo "$as_me:21018: result: $cf_cv_gcc_inline" >&5
21019 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
21020                 if test "$cf_cv_gcc_inline" = yes ; then
21021
21022 cf_fix_cppflags=no
21023 cf_new_cflags=
21024 cf_new_cppflags=
21025 cf_new_extra_cppflags=
21026
21027 for cf_add_cflags in --param max-inline-insns-single=1200
21028 do
21029 case "$cf_fix_cppflags" in
21030 (no)
21031         case "$cf_add_cflags" in
21032         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21033                 case "$cf_add_cflags" in
21034                 (-D*)
21035                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21036
21037                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21038                                 && test -z "${cf_tst_cflags}" \
21039                                 && cf_fix_cppflags=yes
21040
21041                         if test "$cf_fix_cppflags" = yes ; then
21042
21043         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21044         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21045
21046                                 continue
21047                         elif test "${cf_tst_cflags}" = "\"'" ; then
21048
21049         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21050         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21051
21052                                 continue
21053                         fi
21054                         ;;
21055                 esac
21056                 case "$CPPFLAGS" in
21057                 (*$cf_add_cflags)
21058                         ;;
21059                 (*)
21060                         case "$cf_add_cflags" in
21061                         (-D*)
21062                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21063
21064 CPPFLAGS=`echo "$CPPFLAGS" | \
21065         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21066                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21067
21068                                 ;;
21069                         esac
21070
21071         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21072         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21073
21074                         ;;
21075                 esac
21076                 ;;
21077         (*)
21078
21079         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21080         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21081
21082                 ;;
21083         esac
21084         ;;
21085 (yes)
21086
21087         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21088         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21089
21090         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21091
21092         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21093                 && test -z "${cf_tst_cflags}" \
21094                 && cf_fix_cppflags=no
21095         ;;
21096 esac
21097 done
21098
21099 if test -n "$cf_new_cflags" ; then
21100
21101         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21102         CFLAGS="${CFLAGS}$cf_new_cflags"
21103
21104 fi
21105
21106 if test -n "$cf_new_cppflags" ; then
21107
21108         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21109         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21110
21111 fi
21112
21113 if test -n "$cf_new_extra_cppflags" ; then
21114
21115         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21116         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21117
21118 fi
21119
21120                 fi
21121         fi
21122 fi
21123
21124 echo "$as_me:21124: checking for signal global datatype" >&5
21125 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
21126 if test "${cf_cv_sig_atomic_t+set}" = set; then
21127   echo $ECHO_N "(cached) $ECHO_C" >&6
21128 else
21129
21130         for cf_type in \
21131                 "volatile sig_atomic_t" \
21132                 "sig_atomic_t" \
21133                 "int"
21134         do
21135         cat >"conftest.$ac_ext" <<_ACEOF
21136 #line 21136 "configure"
21137 #include "confdefs.h"
21138
21139 #include <sys/types.h>
21140 #include <signal.h>
21141 #include <stdio.h>
21142
21143 extern $cf_type x;
21144 $cf_type x;
21145 static void handler(int sig)
21146 {
21147         (void)sig;
21148         x = 5;
21149 }
21150 int
21151 main (void)
21152 {
21153 signal(SIGINT, handler);
21154                  x = 1
21155   ;
21156   return 0;
21157 }
21158 _ACEOF
21159 rm -f "conftest.$ac_objext"
21160 if { (eval echo "$as_me:21160: \"$ac_compile\"") >&5
21161   (eval $ac_compile) 2>&5
21162   ac_status=$?
21163   echo "$as_me:21163: \$? = $ac_status" >&5
21164   (exit "$ac_status"); } &&
21165          { ac_try='test -s "conftest.$ac_objext"'
21166   { (eval echo "$as_me:21166: \"$ac_try\"") >&5
21167   (eval $ac_try) 2>&5
21168   ac_status=$?
21169   echo "$as_me:21169: \$? = $ac_status" >&5
21170   (exit "$ac_status"); }; }; then
21171   cf_cv_sig_atomic_t=$cf_type
21172 else
21173   echo "$as_me: failed program was:" >&5
21174 cat "conftest.$ac_ext" >&5
21175 cf_cv_sig_atomic_t=no
21176 fi
21177 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21178                 test "$cf_cv_sig_atomic_t" != no && break
21179         done
21180
21181 fi
21182
21183 echo "$as_me:21183: result: $cf_cv_sig_atomic_t" >&5
21184 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
21185 test "$cf_cv_sig_atomic_t" != no &&
21186 cat >>confdefs.h <<EOF
21187 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
21188 EOF
21189
21190 if test "$NCURSES_CHTYPE" = auto ; then
21191
21192 echo "$as_me:21192: checking for type of chtype" >&5
21193 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
21194 if test "${cf_cv_typeof_chtype+set}" = set; then
21195   echo $ECHO_N "(cached) $ECHO_C" >&6
21196 else
21197
21198                 if test "$cross_compiling" = yes; then
21199   cf_cv_typeof_chtype=long
21200 else
21201   cat >"conftest.$ac_ext" <<_ACEOF
21202 #line 21202 "configure"
21203 #include "confdefs.h"
21204
21205 $ac_includes_default
21206 #define WANT_BITS 31
21207 int main(void)
21208 {
21209         FILE *fp = fopen("cf_test.out", "w");
21210         if (fp != 0) {
21211                 char *result = "long";
21212                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
21213                         int n;
21214                         unsigned int x, y;
21215                         for (n = 0; n < WANT_BITS; n++) {
21216                                 x = (1 << n);
21217                                 y = (x >> n);
21218                                 if (y != 1 || x == 0) {
21219                                         x = 0;
21220                                         break;
21221                                 }
21222                         }
21223                         /*
21224                          * If x is nonzero, an int is big enough for the bits
21225                          * that we want.
21226                          */
21227                         result = (x != 0) ? "int" : "long";
21228                 }
21229                 fputs(result, fp);
21230                 fclose(fp);
21231         }
21232         ${cf_cv_main_return:-return}(0);
21233 }
21234
21235 _ACEOF
21236 rm -f "conftest$ac_exeext"
21237 if { (eval echo "$as_me:21237: \"$ac_link\"") >&5
21238   (eval $ac_link) 2>&5
21239   ac_status=$?
21240   echo "$as_me:21240: \$? = $ac_status" >&5
21241   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21242   { (eval echo "$as_me:21242: \"$ac_try\"") >&5
21243   (eval $ac_try) 2>&5
21244   ac_status=$?
21245   echo "$as_me:21245: \$? = $ac_status" >&5
21246   (exit "$ac_status"); }; }; then
21247   cf_cv_typeof_chtype=`cat cf_test.out`
21248 else
21249   echo "$as_me: program exited with status $ac_status" >&5
21250 echo "$as_me: failed program was:" >&5
21251 cat "conftest.$ac_ext" >&5
21252 cf_cv_typeof_chtype=long
21253 fi
21254 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21255 fi
21256                 rm -f cf_test.out
21257
21258 fi
21259
21260 echo "$as_me:21260: result: $cf_cv_typeof_chtype" >&5
21261 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
21262
21263 cat >>confdefs.h <<EOF
21264 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
21265 EOF
21266
21267 else
21268         cf_cv_typeof_chtype=$NCURSES_CHTYPE
21269 fi
21270 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
21271
21272 echo "$as_me:21272: checking if unsigned literals are legal" >&5
21273 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
21274 if test "${cf_cv_unsigned_literals+set}" = set; then
21275   echo $ECHO_N "(cached) $ECHO_C" >&6
21276 else
21277
21278         cat >"conftest.$ac_ext" <<_ACEOF
21279 #line 21279 "configure"
21280 #include "confdefs.h"
21281
21282 int
21283 main (void)
21284 {
21285 long x = 1L + 1UL + 1U + 1
21286   ;
21287   return 0;
21288 }
21289 _ACEOF
21290 rm -f "conftest.$ac_objext"
21291 if { (eval echo "$as_me:21291: \"$ac_compile\"") >&5
21292   (eval $ac_compile) 2>&5
21293   ac_status=$?
21294   echo "$as_me:21294: \$? = $ac_status" >&5
21295   (exit "$ac_status"); } &&
21296          { ac_try='test -s "conftest.$ac_objext"'
21297   { (eval echo "$as_me:21297: \"$ac_try\"") >&5
21298   (eval $ac_try) 2>&5
21299   ac_status=$?
21300   echo "$as_me:21300: \$? = $ac_status" >&5
21301   (exit "$ac_status"); }; }; then
21302   cf_cv_unsigned_literals=yes
21303 else
21304   echo "$as_me: failed program was:" >&5
21305 cat "conftest.$ac_ext" >&5
21306 cf_cv_unsigned_literals=no
21307 fi
21308 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21309
21310 fi
21311
21312 echo "$as_me:21312: result: $cf_cv_unsigned_literals" >&5
21313 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
21314
21315 cf_cv_1UL="1"
21316 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
21317 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
21318
21319 if test "$NCURSES_MMASK_T" = auto ; then
21320         cf_cv_typeof_mmask_t=long
21321 else
21322         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
21323 fi
21324 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
21325
21326 ###     Checks for external-data
21327
21328 echo "$as_me:21328: checking if external errno is declared" >&5
21329 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
21330 if test "${cf_cv_dcl_errno+set}" = set; then
21331   echo $ECHO_N "(cached) $ECHO_C" >&6
21332 else
21333
21334         cat >"conftest.$ac_ext" <<_ACEOF
21335 #line 21335 "configure"
21336 #include "confdefs.h"
21337
21338 $ac_includes_default
21339 #include <errno.h>
21340 int
21341 main (void)
21342 {
21343 int x = (int) errno; (void)x
21344   ;
21345   return 0;
21346 }
21347 _ACEOF
21348 rm -f "conftest.$ac_objext"
21349 if { (eval echo "$as_me:21349: \"$ac_compile\"") >&5
21350   (eval $ac_compile) 2>&5
21351   ac_status=$?
21352   echo "$as_me:21352: \$? = $ac_status" >&5
21353   (exit "$ac_status"); } &&
21354          { ac_try='test -s "conftest.$ac_objext"'
21355   { (eval echo "$as_me:21355: \"$ac_try\"") >&5
21356   (eval $ac_try) 2>&5
21357   ac_status=$?
21358   echo "$as_me:21358: \$? = $ac_status" >&5
21359   (exit "$ac_status"); }; }; then
21360   cf_cv_dcl_errno=yes
21361 else
21362   echo "$as_me: failed program was:" >&5
21363 cat "conftest.$ac_ext" >&5
21364 cf_cv_dcl_errno=no
21365 fi
21366 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21367
21368 fi
21369 echo "$as_me:21369: result: $cf_cv_dcl_errno" >&5
21370 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
21371
21372 if test "$cf_cv_dcl_errno" = no ; then
21373
21374 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21375
21376         cat >>confdefs.h <<EOF
21377 #define $cf_result 1
21378 EOF
21379
21380 fi
21381
21382 # It's possible (for near-UNIX clones) that the data doesn't exist
21383
21384 echo "$as_me:21384: checking if external errno exists" >&5
21385 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21386 if test "${cf_cv_have_errno+set}" = set; then
21387   echo $ECHO_N "(cached) $ECHO_C" >&6
21388 else
21389
21390         cat >"conftest.$ac_ext" <<_ACEOF
21391 #line 21391 "configure"
21392 #include "confdefs.h"
21393
21394 #undef errno
21395 extern int errno;
21396
21397 int
21398 main (void)
21399 {
21400 errno = 2
21401   ;
21402   return 0;
21403 }
21404 _ACEOF
21405 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21406 if { (eval echo "$as_me:21406: \"$ac_link\"") >&5
21407   (eval $ac_link) 2>&5
21408   ac_status=$?
21409   echo "$as_me:21409: \$? = $ac_status" >&5
21410   (exit "$ac_status"); } &&
21411          { ac_try='test -s "conftest$ac_exeext"'
21412   { (eval echo "$as_me:21412: \"$ac_try\"") >&5
21413   (eval $ac_try) 2>&5
21414   ac_status=$?
21415   echo "$as_me:21415: \$? = $ac_status" >&5
21416   (exit "$ac_status"); }; }; then
21417   cf_cv_have_errno=yes
21418 else
21419   echo "$as_me: failed program was:" >&5
21420 cat "conftest.$ac_ext" >&5
21421 cf_cv_have_errno=no
21422 fi
21423 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21424
21425 fi
21426 echo "$as_me:21426: result: $cf_cv_have_errno" >&5
21427 echo "${ECHO_T}$cf_cv_have_errno" >&6
21428
21429 if test "$cf_cv_have_errno" = yes ; then
21430
21431 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21432
21433         cat >>confdefs.h <<EOF
21434 #define $cf_result 1
21435 EOF
21436
21437 fi
21438
21439 echo "$as_me:21439: checking if data-only library module links" >&5
21440 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21441 if test "${cf_cv_link_dataonly+set}" = set; then
21442   echo $ECHO_N "(cached) $ECHO_C" >&6
21443 else
21444
21445         rm -f conftest.a
21446         cat >conftest.$ac_ext <<EOF
21447 #line 21447 "configure"
21448 int     testdata[3] = { 123, 456, 789 };
21449 EOF
21450         if { (eval echo "$as_me:21450: \"$ac_compile\"") >&5
21451   (eval $ac_compile) 2>&5
21452   ac_status=$?
21453   echo "$as_me:21453: \$? = $ac_status" >&5
21454   (exit "$ac_status"); } ; then
21455                 mv conftest.o data.o && \
21456                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
21457         fi
21458         rm -f conftest.$ac_ext data.o
21459         cat >conftest.$ac_ext <<EOF
21460 #line 21460 "configure"
21461 int     testfunc(void)
21462 {
21463 #if defined(NeXT)
21464         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
21465 #else
21466         extern int testdata[3];
21467         return testdata[0] == 123
21468            &&  testdata[1] == 456
21469            &&  testdata[2] == 789;
21470 #endif
21471 }
21472 EOF
21473         if { (eval echo "$as_me:21473: \"$ac_compile\"") >&5
21474   (eval $ac_compile) 2>&5
21475   ac_status=$?
21476   echo "$as_me:21476: \$? = $ac_status" >&5
21477   (exit "$ac_status"); }; then
21478                 mv conftest.o func.o && \
21479                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
21480         fi
21481         rm -f conftest.$ac_ext func.o
21482         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21483         cf_saveLIBS="$LIBS"
21484         LIBS="conftest.a $LIBS"
21485         if test "$cross_compiling" = yes; then
21486   cf_cv_link_dataonly=unknown
21487 else
21488   cat >"conftest.$ac_ext" <<_ACEOF
21489 #line 21489 "configure"
21490 #include "confdefs.h"
21491
21492         int main(void)
21493         {
21494                 extern int testfunc();
21495                 ${cf_cv_main_return:-return} (!testfunc());
21496         }
21497
21498 _ACEOF
21499 rm -f "conftest$ac_exeext"
21500 if { (eval echo "$as_me:21500: \"$ac_link\"") >&5
21501   (eval $ac_link) 2>&5
21502   ac_status=$?
21503   echo "$as_me:21503: \$? = $ac_status" >&5
21504   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21505   { (eval echo "$as_me:21505: \"$ac_try\"") >&5
21506   (eval $ac_try) 2>&5
21507   ac_status=$?
21508   echo "$as_me:21508: \$? = $ac_status" >&5
21509   (exit "$ac_status"); }; }; then
21510   cf_cv_link_dataonly=yes
21511 else
21512   echo "$as_me: program exited with status $ac_status" >&5
21513 echo "$as_me: failed program was:" >&5
21514 cat "conftest.$ac_ext" >&5
21515 cf_cv_link_dataonly=no
21516 fi
21517 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21518 fi
21519         LIBS="$cf_saveLIBS"
21520
21521 fi
21522
21523 echo "$as_me:21523: result: $cf_cv_link_dataonly" >&5
21524 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21525
21526 if test "$cf_cv_link_dataonly" = no ; then
21527
21528 cat >>confdefs.h <<\EOF
21529 #define BROKEN_LINKER 1
21530 EOF
21531
21532         BROKEN_LINKER=1
21533 fi
21534
21535 ###     Checks for library functions.
21536
21537 echo "$as_me:21537: checking for clock_gettime" >&5
21538 echo $ECHO_N "checking for clock_gettime... $ECHO_C" >&6
21539 if test "${cf_cv_func_clock_gettime+set}" = set; then
21540   echo $ECHO_N "(cached) $ECHO_C" >&6
21541 else
21542
21543                 cat >"conftest.$ac_ext" <<_ACEOF
21544 #line 21544 "configure"
21545 #include "confdefs.h"
21546 #include <time.h>
21547 int
21548 main (void)
21549 {
21550 struct timespec ts;
21551                 int rc = clock_gettime(CLOCK_REALTIME, &ts); (void) rc; (void)ts
21552   ;
21553   return 0;
21554 }
21555 _ACEOF
21556 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21557 if { (eval echo "$as_me:21557: \"$ac_link\"") >&5
21558   (eval $ac_link) 2>&5
21559   ac_status=$?
21560   echo "$as_me:21560: \$? = $ac_status" >&5
21561   (exit "$ac_status"); } &&
21562          { ac_try='test -s "conftest$ac_exeext"'
21563   { (eval echo "$as_me:21563: \"$ac_try\"") >&5
21564   (eval $ac_try) 2>&5
21565   ac_status=$?
21566   echo "$as_me:21566: \$? = $ac_status" >&5
21567   (exit "$ac_status"); }; }; then
21568   cf_cv_func_clock_gettime=yes
21569 else
21570   echo "$as_me: failed program was:" >&5
21571 cat "conftest.$ac_ext" >&5
21572 cf_cv_func_clock_gettime=no
21573 fi
21574 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21575
21576 fi
21577 echo "$as_me:21577: result: $cf_cv_func_clock_gettime" >&5
21578 echo "${ECHO_T}$cf_cv_func_clock_gettime" >&6
21579
21580 if test "$cf_cv_func_clock_gettime" = yes
21581 then
21582
21583 cat >>confdefs.h <<\EOF
21584 #define HAVE_CLOCK_GETTIME 1
21585 EOF
21586
21587 else
21588 echo "$as_me:21588: checking for gettimeofday" >&5
21589 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
21590 if test "${ac_cv_func_gettimeofday+set}" = set; then
21591   echo $ECHO_N "(cached) $ECHO_C" >&6
21592 else
21593   cat >"conftest.$ac_ext" <<_ACEOF
21594 #line 21594 "configure"
21595 #include "confdefs.h"
21596 #define gettimeofday autoconf_temporary
21597 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21598 #undef gettimeofday
21599
21600 #ifdef __cplusplus
21601 extern "C"
21602 #endif
21603
21604 /* We use char because int might match the return type of a gcc2
21605    builtin and then its argument prototype would still apply.  */
21606 char gettimeofday (void);
21607
21608 int
21609 main (void)
21610 {
21611
21612 /* The GNU C library defines stubs for functions which it implements
21613     to always fail with ENOSYS.  Some functions are actually named
21614     something starting with __ and the normal name is an alias.  */
21615 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
21616 #error found stub for gettimeofday
21617 #endif
21618
21619         return gettimeofday ();
21620   ;
21621   return 0;
21622 }
21623 _ACEOF
21624 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21625 if { (eval echo "$as_me:21625: \"$ac_link\"") >&5
21626   (eval $ac_link) 2>&5
21627   ac_status=$?
21628   echo "$as_me:21628: \$? = $ac_status" >&5
21629   (exit "$ac_status"); } &&
21630          { ac_try='test -s "conftest$ac_exeext"'
21631   { (eval echo "$as_me:21631: \"$ac_try\"") >&5
21632   (eval $ac_try) 2>&5
21633   ac_status=$?
21634   echo "$as_me:21634: \$? = $ac_status" >&5
21635   (exit "$ac_status"); }; }; then
21636   ac_cv_func_gettimeofday=yes
21637 else
21638   echo "$as_me: failed program was:" >&5
21639 cat "conftest.$ac_ext" >&5
21640 ac_cv_func_gettimeofday=no
21641 fi
21642 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21643 fi
21644 echo "$as_me:21644: result: $ac_cv_func_gettimeofday" >&5
21645 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
21646 if test "$ac_cv_func_gettimeofday" = yes; then
21647
21648 cat >>confdefs.h <<\EOF
21649 #define HAVE_GETTIMEOFDAY 1
21650 EOF
21651
21652 else
21653
21654 echo "$as_me:21654: checking for gettimeofday in -lbsd" >&5
21655 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
21656 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
21657   echo $ECHO_N "(cached) $ECHO_C" >&6
21658 else
21659   ac_check_lib_save_LIBS=$LIBS
21660 LIBS="-lbsd  $LIBS"
21661 cat >"conftest.$ac_ext" <<_ACEOF
21662 #line 21662 "configure"
21663 #include "confdefs.h"
21664
21665 /* Override any gcc2 internal prototype to avoid an error.  */
21666 #ifdef __cplusplus
21667 extern "C"
21668 #endif
21669 /* We use char because int might match the return type of a gcc2
21670    builtin and then its argument prototype would still apply.  */
21671 char gettimeofday ();
21672 int
21673 main (void)
21674 {
21675 gettimeofday ();
21676   ;
21677   return 0;
21678 }
21679 _ACEOF
21680 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21681 if { (eval echo "$as_me:21681: \"$ac_link\"") >&5
21682   (eval $ac_link) 2>&5
21683   ac_status=$?
21684   echo "$as_me:21684: \$? = $ac_status" >&5
21685   (exit "$ac_status"); } &&
21686          { ac_try='test -s "conftest$ac_exeext"'
21687   { (eval echo "$as_me:21687: \"$ac_try\"") >&5
21688   (eval $ac_try) 2>&5
21689   ac_status=$?
21690   echo "$as_me:21690: \$? = $ac_status" >&5
21691   (exit "$ac_status"); }; }; then
21692   ac_cv_lib_bsd_gettimeofday=yes
21693 else
21694   echo "$as_me: failed program was:" >&5
21695 cat "conftest.$ac_ext" >&5
21696 ac_cv_lib_bsd_gettimeofday=no
21697 fi
21698 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21699 LIBS=$ac_check_lib_save_LIBS
21700 fi
21701 echo "$as_me:21701: result: $ac_cv_lib_bsd_gettimeofday" >&5
21702 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
21703 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
21704
21705 cat >>confdefs.h <<\EOF
21706 #define HAVE_GETTIMEOFDAY 1
21707 EOF
21708
21709 cf_add_libs="$LIBS"
21710 # reverse order
21711 cf_add_0lib=
21712 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21713 # filter duplicates
21714 for cf_add_1lib in $cf_add_0lib; do
21715         for cf_add_2lib in $cf_add_libs; do
21716                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21717                         cf_add_1lib=
21718                         break
21719                 fi
21720         done
21721         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21722 done
21723 LIBS="$cf_add_libs"
21724
21725 fi
21726
21727 fi
21728 fi
21729
21730 for ac_func in \
21731 fpathconf \
21732 getcwd \
21733 getauxval \
21734 getegid \
21735 geteuid \
21736 getopt \
21737 getuid \
21738 issetugid \
21739 localeconv \
21740 poll \
21741 putenv \
21742 remove \
21743 select \
21744 setbuf \
21745 setbuffer \
21746 setenv \
21747 setfsuid \
21748 setvbuf \
21749 sigaction \
21750 sigvec \
21751 snprintf \
21752 strdup \
21753 strstr \
21754 sysconf \
21755 tcgetpgrp \
21756 times \
21757 tsearch \
21758 vsnprintf \
21759
21760 do
21761 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21762 echo "$as_me:21762: checking for $ac_func" >&5
21763 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21764 if eval "test \"\${$as_ac_var+set}\" = set"; then
21765   echo $ECHO_N "(cached) $ECHO_C" >&6
21766 else
21767   cat >"conftest.$ac_ext" <<_ACEOF
21768 #line 21768 "configure"
21769 #include "confdefs.h"
21770 #define $ac_func autoconf_temporary
21771 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21772 #undef $ac_func
21773
21774 #ifdef __cplusplus
21775 extern "C"
21776 #endif
21777
21778 /* We use char because int might match the return type of a gcc2
21779    builtin and then its argument prototype would still apply.  */
21780 char $ac_func (void);
21781
21782 int
21783 main (void)
21784 {
21785
21786 /* The GNU C library defines stubs for functions which it implements
21787     to always fail with ENOSYS.  Some functions are actually named
21788     something starting with __ and the normal name is an alias.  */
21789 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21790 #error found stub for $ac_func
21791 #endif
21792
21793         return $ac_func ();
21794   ;
21795   return 0;
21796 }
21797 _ACEOF
21798 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21799 if { (eval echo "$as_me:21799: \"$ac_link\"") >&5
21800   (eval $ac_link) 2>&5
21801   ac_status=$?
21802   echo "$as_me:21802: \$? = $ac_status" >&5
21803   (exit "$ac_status"); } &&
21804          { ac_try='test -s "conftest$ac_exeext"'
21805   { (eval echo "$as_me:21805: \"$ac_try\"") >&5
21806   (eval $ac_try) 2>&5
21807   ac_status=$?
21808   echo "$as_me:21808: \$? = $ac_status" >&5
21809   (exit "$ac_status"); }; }; then
21810   eval "$as_ac_var=yes"
21811 else
21812   echo "$as_me: failed program was:" >&5
21813 cat "conftest.$ac_ext" >&5
21814 eval "$as_ac_var=no"
21815 fi
21816 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21817 fi
21818 echo "$as_me:21818: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21819 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21820 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21821   cat >>confdefs.h <<EOF
21822 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21823 EOF
21824
21825 fi
21826 done
21827
21828 echo "$as_me:21828: checking if _PATH_TTYS is defined in ttyent.h" >&5
21829 echo $ECHO_N "checking if _PATH_TTYS is defined in ttyent.h... $ECHO_C" >&6
21830 if test "${cf_cv_PATH_TTYS+set}" = set; then
21831   echo $ECHO_N "(cached) $ECHO_C" >&6
21832 else
21833
21834 cat >"conftest.$ac_ext" <<_ACEOF
21835 #line 21835 "configure"
21836 #include "confdefs.h"
21837
21838 #include <stdio.h>
21839 #include <ttyent.h>
21840 int
21841 main (void)
21842 {
21843
21844 FILE *fp = fopen(_PATH_TTYS, "r"); (void)fp
21845   ;
21846   return 0;
21847 }
21848 _ACEOF
21849 rm -f "conftest.$ac_objext"
21850 if { (eval echo "$as_me:21850: \"$ac_compile\"") >&5
21851   (eval $ac_compile) 2>&5
21852   ac_status=$?
21853   echo "$as_me:21853: \$? = $ac_status" >&5
21854   (exit "$ac_status"); } &&
21855          { ac_try='test -s "conftest.$ac_objext"'
21856   { (eval echo "$as_me:21856: \"$ac_try\"") >&5
21857   (eval $ac_try) 2>&5
21858   ac_status=$?
21859   echo "$as_me:21859: \$? = $ac_status" >&5
21860   (exit "$ac_status"); }; }; then
21861   cf_cv_PATH_TTYS=yes
21862 else
21863   echo "$as_me: failed program was:" >&5
21864 cat "conftest.$ac_ext" >&5
21865 cf_cv_PATH_TTYS=no
21866 fi
21867 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21868 fi
21869 echo "$as_me:21869: result: $cf_cv_PATH_TTYS" >&5
21870 echo "${ECHO_T}$cf_cv_PATH_TTYS" >&6
21871
21872 if test $cf_cv_PATH_TTYS = no
21873 then
21874         for cf_ttys in /etc/ttytype /etc/ttys
21875         do
21876                 if test -f $cf_ttys
21877                 then
21878                         cf_cv_PATH_TTYS=maybe
21879
21880 cat >>confdefs.h <<\EOF
21881 #define _PATH_TTYS $cf_ttys
21882 EOF
21883
21884                         break
21885                 fi
21886         done
21887 fi
21888
21889 if test $cf_cv_PATH_TTYS != no
21890 then
21891         echo "$as_me:21891: checking if _PATH_TTYS file exists" >&5
21892 echo $ECHO_N "checking if _PATH_TTYS file exists... $ECHO_C" >&6
21893 if test "${cf_cv_have_PATH_TTYS+set}" = set; then
21894   echo $ECHO_N "(cached) $ECHO_C" >&6
21895 else
21896
21897                 if test "$cross_compiling" = yes; then
21898   cf_cv_have_PATH_TTYS=unknown
21899 else
21900   cat >"conftest.$ac_ext" <<_ACEOF
21901 #line 21901 "configure"
21902 #include "confdefs.h"
21903
21904 $ac_includes_default
21905
21906 #include <ttyent.h>
21907
21908 int main(void) {
21909         FILE *fp = fopen(_PATH_TTYS, "r");
21910         ${cf_cv_main_return:-return} (fp == 0);
21911 }
21912 _ACEOF
21913 rm -f "conftest$ac_exeext"
21914 if { (eval echo "$as_me:21914: \"$ac_link\"") >&5
21915   (eval $ac_link) 2>&5
21916   ac_status=$?
21917   echo "$as_me:21917: \$? = $ac_status" >&5
21918   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21919   { (eval echo "$as_me:21919: \"$ac_try\"") >&5
21920   (eval $ac_try) 2>&5
21921   ac_status=$?
21922   echo "$as_me:21922: \$? = $ac_status" >&5
21923   (exit "$ac_status"); }; }; then
21924   cf_cv_have_PATH_TTYS=yes
21925 else
21926   echo "$as_me: program exited with status $ac_status" >&5
21927 echo "$as_me: failed program was:" >&5
21928 cat "conftest.$ac_ext" >&5
21929 cf_cv_have_PATH_TTYS=no
21930 fi
21931 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21932 fi
21933 fi
21934 echo "$as_me:21934: result: $cf_cv_have_PATH_TTYS" >&5
21935 echo "${ECHO_T}$cf_cv_have_PATH_TTYS" >&6
21936         test "$cf_cv_have_PATH_TTYS" = no && cf_cv_PATH_TTYS=no
21937 fi
21938
21939 if test $cf_cv_PATH_TTYS != no
21940 then
21941
21942 cat >>confdefs.h <<\EOF
21943 #define HAVE_PATH_TTYS 1
21944 EOF
21945
21946         echo "$as_me:21946: checking for getttynam" >&5
21947 echo $ECHO_N "checking for getttynam... $ECHO_C" >&6
21948 if test "${cf_cv_func_getttynam+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 #include <ttyent.h>
21956 int
21957 main (void)
21958 {
21959 struct ttyent *fp = getttynam("/dev/tty"); (void)fp
21960   ;
21961   return 0;
21962 }
21963 _ACEOF
21964 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21965 if { (eval echo "$as_me:21965: \"$ac_link\"") >&5
21966   (eval $ac_link) 2>&5
21967   ac_status=$?
21968   echo "$as_me:21968: \$? = $ac_status" >&5
21969   (exit "$ac_status"); } &&
21970          { ac_try='test -s "conftest$ac_exeext"'
21971   { (eval echo "$as_me:21971: \"$ac_try\"") >&5
21972   (eval $ac_try) 2>&5
21973   ac_status=$?
21974   echo "$as_me:21974: \$? = $ac_status" >&5
21975   (exit "$ac_status"); }; }; then
21976   cf_cv_func_getttynam=yes
21977 else
21978   echo "$as_me: failed program was:" >&5
21979 cat "conftest.$ac_ext" >&5
21980 cf_cv_func_getttynam=no
21981 fi
21982 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21983 fi
21984 echo "$as_me:21984: result: $cf_cv_func_getttynam" >&5
21985 echo "${ECHO_T}$cf_cv_func_getttynam" >&6
21986         test "$cf_cv_func_getttynam" = yes && cat >>confdefs.h <<\EOF
21987 #define HAVE_GETTTYNAM 1
21988 EOF
21989
21990 fi
21991
21992 if test "x$ac_cv_func_getopt" = xno && \
21993    test "x$cf_with_progs$cf_with_tests" != xnono; then
21994         { { echo "$as_me:21994: error: getopt is required for building programs" >&5
21995 echo "$as_me: error: getopt is required for building programs" >&2;}
21996    { (exit 1); exit 1; }; }
21997 fi
21998
21999 if test "x$with_safe_sprintf" = xyes
22000 then
22001         if test "x$ac_cv_func_vsnprintf" = xyes
22002         then
22003                 { echo "$as_me:22003: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
22004 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
22005         else
22006
22007 cat >>confdefs.h <<\EOF
22008 #define USE_SAFE_SPRINTF 1
22009 EOF
22010
22011         fi
22012 fi
22013
22014 if test "x$with_getcap" = "xyes" ; then
22015
22016 echo "$as_me:22016: checking for terminal-capability database functions" >&5
22017 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
22018 if test "${cf_cv_cgetent+set}" = set; then
22019   echo $ECHO_N "(cached) $ECHO_C" >&6
22020 else
22021
22022 cat >"conftest.$ac_ext" <<_ACEOF
22023 #line 22023 "configure"
22024 #include "confdefs.h"
22025
22026 $ac_includes_default
22027 int
22028 main (void)
22029 {
22030
22031         char temp[128];
22032         char *buf = temp;
22033         char *db_array = temp;
22034         cgetent(&buf, &db_array, "vt100");
22035         cgetcap(buf, "tc", '=');
22036         cgetmatch(buf, "tc");
22037
22038   ;
22039   return 0;
22040 }
22041 _ACEOF
22042 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22043 if { (eval echo "$as_me:22043: \"$ac_link\"") >&5
22044   (eval $ac_link) 2>&5
22045   ac_status=$?
22046   echo "$as_me:22046: \$? = $ac_status" >&5
22047   (exit "$ac_status"); } &&
22048          { ac_try='test -s "conftest$ac_exeext"'
22049   { (eval echo "$as_me:22049: \"$ac_try\"") >&5
22050   (eval $ac_try) 2>&5
22051   ac_status=$?
22052   echo "$as_me:22052: \$? = $ac_status" >&5
22053   (exit "$ac_status"); }; }; then
22054   cf_cv_cgetent=yes
22055 else
22056   echo "$as_me: failed program was:" >&5
22057 cat "conftest.$ac_ext" >&5
22058 cf_cv_cgetent=no
22059 fi
22060 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22061
22062 fi
22063 echo "$as_me:22063: result: $cf_cv_cgetent" >&5
22064 echo "${ECHO_T}$cf_cv_cgetent" >&6
22065
22066 if test "$cf_cv_cgetent" = yes
22067 then
22068
22069 cat >>confdefs.h <<\EOF
22070 #define HAVE_BSD_CGETENT 1
22071 EOF
22072
22073 echo "$as_me:22073: checking if cgetent uses const parameter" >&5
22074 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
22075 if test "${cf_cv_cgetent_const+set}" = set; then
22076   echo $ECHO_N "(cached) $ECHO_C" >&6
22077 else
22078
22079 cat >"conftest.$ac_ext" <<_ACEOF
22080 #line 22080 "configure"
22081 #include "confdefs.h"
22082
22083 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
22084 $ac_includes_default
22085 int
22086 main (void)
22087 {
22088
22089         char temp[128];
22090         char *buf = temp;
22091 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
22092         const char *db_array = temp;
22093         cgetent(&buf, &db_array, "vt100");
22094 #endif
22095         cgetcap(buf, "tc", '=');
22096         cgetmatch(buf, "tc");
22097
22098   ;
22099   return 0;
22100 }
22101 _ACEOF
22102 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22103 if { (eval echo "$as_me:22103: \"$ac_link\"") >&5
22104   (eval $ac_link) 2>&5
22105   ac_status=$?
22106   echo "$as_me:22106: \$? = $ac_status" >&5
22107   (exit "$ac_status"); } &&
22108          { ac_try='test -s "conftest$ac_exeext"'
22109   { (eval echo "$as_me:22109: \"$ac_try\"") >&5
22110   (eval $ac_try) 2>&5
22111   ac_status=$?
22112   echo "$as_me:22112: \$? = $ac_status" >&5
22113   (exit "$ac_status"); }; }; then
22114   cf_cv_cgetent_const=yes
22115 else
22116   echo "$as_me: failed program was:" >&5
22117 cat "conftest.$ac_ext" >&5
22118 cf_cv_cgetent_const=no
22119 fi
22120 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22121
22122 fi
22123 echo "$as_me:22123: result: $cf_cv_cgetent_const" >&5
22124 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
22125         if test "$cf_cv_cgetent_const" = yes
22126         then
22127
22128 cat >>confdefs.h <<EOF
22129 #define CGETENT_CONST const
22130 EOF
22131
22132         fi
22133 fi
22134
22135 fi
22136
22137 echo "$as_me:22137: checking for isascii" >&5
22138 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
22139 if test "${cf_cv_have_isascii+set}" = set; then
22140   echo $ECHO_N "(cached) $ECHO_C" >&6
22141 else
22142
22143         cat >"conftest.$ac_ext" <<_ACEOF
22144 #line 22144 "configure"
22145 #include "confdefs.h"
22146 #include <ctype.h>
22147 int
22148 main (void)
22149 {
22150 int x = isascii(' ')
22151   ;
22152   return 0;
22153 }
22154 _ACEOF
22155 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22156 if { (eval echo "$as_me:22156: \"$ac_link\"") >&5
22157   (eval $ac_link) 2>&5
22158   ac_status=$?
22159   echo "$as_me:22159: \$? = $ac_status" >&5
22160   (exit "$ac_status"); } &&
22161          { ac_try='test -s "conftest$ac_exeext"'
22162   { (eval echo "$as_me:22162: \"$ac_try\"") >&5
22163   (eval $ac_try) 2>&5
22164   ac_status=$?
22165   echo "$as_me:22165: \$? = $ac_status" >&5
22166   (exit "$ac_status"); }; }; then
22167   cf_cv_have_isascii=yes
22168 else
22169   echo "$as_me: failed program was:" >&5
22170 cat "conftest.$ac_ext" >&5
22171 cf_cv_have_isascii=no
22172 fi
22173 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22174
22175 fi
22176 echo "$as_me:22176: result: $cf_cv_have_isascii" >&5
22177 echo "${ECHO_T}$cf_cv_have_isascii" >&6
22178 test "$cf_cv_have_isascii" = yes &&
22179 cat >>confdefs.h <<\EOF
22180 #define HAVE_ISASCII 1
22181 EOF
22182
22183 if test "$ac_cv_func_sigaction" = yes; then
22184 echo "$as_me:22184: checking whether sigaction needs _POSIX_SOURCE" >&5
22185 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
22186 cat >"conftest.$ac_ext" <<_ACEOF
22187 #line 22187 "configure"
22188 #include "confdefs.h"
22189
22190 #include <sys/types.h>
22191 #include <signal.h>
22192 int
22193 main (void)
22194 {
22195 struct sigaction act
22196   ;
22197   return 0;
22198 }
22199 _ACEOF
22200 rm -f "conftest.$ac_objext"
22201 if { (eval echo "$as_me:22201: \"$ac_compile\"") >&5
22202   (eval $ac_compile) 2>&5
22203   ac_status=$?
22204   echo "$as_me:22204: \$? = $ac_status" >&5
22205   (exit "$ac_status"); } &&
22206          { ac_try='test -s "conftest.$ac_objext"'
22207   { (eval echo "$as_me:22207: \"$ac_try\"") >&5
22208   (eval $ac_try) 2>&5
22209   ac_status=$?
22210   echo "$as_me:22210: \$? = $ac_status" >&5
22211   (exit "$ac_status"); }; }; then
22212   sigact_bad=no
22213 else
22214   echo "$as_me: failed program was:" >&5
22215 cat "conftest.$ac_ext" >&5
22216
22217 cat >"conftest.$ac_ext" <<_ACEOF
22218 #line 22218 "configure"
22219 #include "confdefs.h"
22220
22221 #define _POSIX_SOURCE
22222 #include <sys/types.h>
22223 #include <signal.h>
22224 int
22225 main (void)
22226 {
22227 struct sigaction act
22228   ;
22229   return 0;
22230 }
22231 _ACEOF
22232 rm -f "conftest.$ac_objext"
22233 if { (eval echo "$as_me:22233: \"$ac_compile\"") >&5
22234   (eval $ac_compile) 2>&5
22235   ac_status=$?
22236   echo "$as_me:22236: \$? = $ac_status" >&5
22237   (exit "$ac_status"); } &&
22238          { ac_try='test -s "conftest.$ac_objext"'
22239   { (eval echo "$as_me:22239: \"$ac_try\"") >&5
22240   (eval $ac_try) 2>&5
22241   ac_status=$?
22242   echo "$as_me:22242: \$? = $ac_status" >&5
22243   (exit "$ac_status"); }; }; then
22244   sigact_bad=yes
22245
22246 cat >>confdefs.h <<\EOF
22247 #define _POSIX_SOURCE 1
22248 EOF
22249
22250 else
22251   echo "$as_me: failed program was:" >&5
22252 cat "conftest.$ac_ext" >&5
22253 sigact_bad=unknown
22254 fi
22255 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22256 fi
22257 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22258 echo "$as_me:22258: result: $sigact_bad" >&5
22259 echo "${ECHO_T}$sigact_bad" >&6
22260 fi
22261
22262 echo "$as_me:22262: checking if nanosleep really works" >&5
22263 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
22264 if test "${cf_cv_func_nanosleep+set}" = set; then
22265   echo $ECHO_N "(cached) $ECHO_C" >&6
22266 else
22267
22268 if test "$cross_compiling" = yes; then
22269   cf_cv_func_nanosleep=unknown
22270 else
22271   cat >"conftest.$ac_ext" <<_ACEOF
22272 #line 22272 "configure"
22273 #include "confdefs.h"
22274
22275 $ac_includes_default
22276
22277 #include <errno.h>
22278 #include <time.h>
22279
22280 #ifdef HAVE_SYS_TIME_H
22281 #include <sys/time.h>
22282 #endif
22283
22284 int main(void) {
22285         struct timespec ts1, ts2;
22286         int code;
22287         ts1.tv_sec  = 0;
22288         ts1.tv_nsec = 750000000;
22289         ts2.tv_sec  = 0;
22290         ts2.tv_nsec = 0;
22291         errno = 0;
22292         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
22293         ${cf_cv_main_return:-return}(code != 0);
22294 }
22295
22296 _ACEOF
22297 rm -f "conftest$ac_exeext"
22298 if { (eval echo "$as_me:22298: \"$ac_link\"") >&5
22299   (eval $ac_link) 2>&5
22300   ac_status=$?
22301   echo "$as_me:22301: \$? = $ac_status" >&5
22302   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22303   { (eval echo "$as_me:22303: \"$ac_try\"") >&5
22304   (eval $ac_try) 2>&5
22305   ac_status=$?
22306   echo "$as_me:22306: \$? = $ac_status" >&5
22307   (exit "$ac_status"); }; }; then
22308   cf_cv_func_nanosleep=yes
22309 else
22310   echo "$as_me: program exited with status $ac_status" >&5
22311 echo "$as_me: failed program was:" >&5
22312 cat "conftest.$ac_ext" >&5
22313 cf_cv_func_nanosleep=no
22314 fi
22315 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22316 fi
22317 fi
22318 echo "$as_me:22318: result: $cf_cv_func_nanosleep" >&5
22319 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
22320
22321 test "$cf_cv_func_nanosleep" = "yes" &&
22322 cat >>confdefs.h <<\EOF
22323 #define HAVE_NANOSLEEP 1
22324 EOF
22325
22326 for ac_header in \
22327 termio.h \
22328 termios.h \
22329 unistd.h \
22330 sys/ioctl.h \
22331 sys/termio.h \
22332
22333 do
22334 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22335 echo "$as_me:22335: checking for $ac_header" >&5
22336 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22337 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22338   echo $ECHO_N "(cached) $ECHO_C" >&6
22339 else
22340   cat >"conftest.$ac_ext" <<_ACEOF
22341 #line 22341 "configure"
22342 #include "confdefs.h"
22343 #include <$ac_header>
22344 _ACEOF
22345 if { (eval echo "$as_me:22345: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22346   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22347   ac_status=$?
22348   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22349   rm -f conftest.er1
22350   cat conftest.err >&5
22351   echo "$as_me:22351: \$? = $ac_status" >&5
22352   (exit "$ac_status"); } >/dev/null; then
22353   if test -s conftest.err; then
22354     ac_cpp_err=$ac_c_preproc_warn_flag
22355   else
22356     ac_cpp_err=
22357   fi
22358 else
22359   ac_cpp_err=yes
22360 fi
22361 if test -z "$ac_cpp_err"; then
22362   eval "$as_ac_Header=yes"
22363 else
22364   echo "$as_me: failed program was:" >&5
22365   cat "conftest.$ac_ext" >&5
22366   eval "$as_ac_Header=no"
22367 fi
22368 rm -f conftest.err "conftest.$ac_ext"
22369 fi
22370 echo "$as_me:22370: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22371 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22372 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22373   cat >>confdefs.h <<EOF
22374 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22375 EOF
22376
22377 fi
22378 done
22379
22380 if test "$ac_cv_header_termios_h" = yes ; then
22381         case "$CFLAGS $CPPFLAGS" in
22382         (*-D_POSIX_SOURCE*)
22383                 termios_bad=dunno ;;
22384         (*)     termios_bad=maybe ;;
22385         esac
22386         if test "$termios_bad" = maybe ; then
22387         echo "$as_me:22387: checking whether termios.h needs _POSIX_SOURCE" >&5
22388 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
22389         cat >"conftest.$ac_ext" <<_ACEOF
22390 #line 22390 "configure"
22391 #include "confdefs.h"
22392 #include <termios.h>
22393 int
22394 main (void)
22395 {
22396 struct termios foo; int x = foo.c_iflag = 1; (void)x
22397   ;
22398   return 0;
22399 }
22400 _ACEOF
22401 rm -f "conftest.$ac_objext"
22402 if { (eval echo "$as_me:22402: \"$ac_compile\"") >&5
22403   (eval $ac_compile) 2>&5
22404   ac_status=$?
22405   echo "$as_me:22405: \$? = $ac_status" >&5
22406   (exit "$ac_status"); } &&
22407          { ac_try='test -s "conftest.$ac_objext"'
22408   { (eval echo "$as_me:22408: \"$ac_try\"") >&5
22409   (eval $ac_try) 2>&5
22410   ac_status=$?
22411   echo "$as_me:22411: \$? = $ac_status" >&5
22412   (exit "$ac_status"); }; }; then
22413   termios_bad=no
22414 else
22415   echo "$as_me: failed program was:" >&5
22416 cat "conftest.$ac_ext" >&5
22417
22418                 cat >"conftest.$ac_ext" <<_ACEOF
22419 #line 22419 "configure"
22420 #include "confdefs.h"
22421
22422 #define _POSIX_SOURCE
22423 #include <termios.h>
22424 int
22425 main (void)
22426 {
22427 struct termios foo; int x = foo.c_iflag = 2; (void)x
22428   ;
22429   return 0;
22430 }
22431 _ACEOF
22432 rm -f "conftest.$ac_objext"
22433 if { (eval echo "$as_me:22433: \"$ac_compile\"") >&5
22434   (eval $ac_compile) 2>&5
22435   ac_status=$?
22436   echo "$as_me:22436: \$? = $ac_status" >&5
22437   (exit "$ac_status"); } &&
22438          { ac_try='test -s "conftest.$ac_objext"'
22439   { (eval echo "$as_me:22439: \"$ac_try\"") >&5
22440   (eval $ac_try) 2>&5
22441   ac_status=$?
22442   echo "$as_me:22442: \$? = $ac_status" >&5
22443   (exit "$ac_status"); }; }; then
22444   termios_bad=unknown
22445 else
22446   echo "$as_me: failed program was:" >&5
22447 cat "conftest.$ac_ext" >&5
22448 termios_bad=yes
22449 cat >>confdefs.h <<\EOF
22450 #define _POSIX_SOURCE 1
22451 EOF
22452
22453 fi
22454 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22455
22456 fi
22457 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22458         echo "$as_me:22458: result: $termios_bad" >&5
22459 echo "${ECHO_T}$termios_bad" >&6
22460         fi
22461 fi
22462
22463 echo "$as_me:22463: checking for tcgetattr" >&5
22464 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
22465 if test "${cf_cv_have_tcgetattr+set}" = set; then
22466   echo $ECHO_N "(cached) $ECHO_C" >&6
22467 else
22468
22469 cat >"conftest.$ac_ext" <<_ACEOF
22470 #line 22470 "configure"
22471 #include "confdefs.h"
22472
22473 #include <sys/types.h>
22474 #ifdef HAVE_UNISTD_H
22475 #include <unistd.h>
22476 #endif
22477 #ifdef HAVE_TERMIOS_H
22478 #include <termios.h>
22479 #define TTY struct termios
22480 #else
22481 #ifdef HAVE_TERMIO_H
22482 #include <termio.h>
22483 #define TTY struct termio
22484 #endif
22485 #endif
22486
22487 int
22488 main (void)
22489 {
22490
22491 TTY foo;
22492 tcgetattr(1, &foo);
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_have_tcgetattr=yes
22510 else
22511   echo "$as_me: failed program was:" >&5
22512 cat "conftest.$ac_ext" >&5
22513 cf_cv_have_tcgetattr=no
22514 fi
22515 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22516 fi
22517 echo "$as_me:22517: result: $cf_cv_have_tcgetattr" >&5
22518 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
22519 test "$cf_cv_have_tcgetattr" = yes &&
22520 cat >>confdefs.h <<\EOF
22521 #define HAVE_TCGETATTR 1
22522 EOF
22523
22524 echo "$as_me:22524: checking for vsscanf function or workaround" >&5
22525 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
22526 if test "${cf_cv_func_vsscanf+set}" = set; then
22527   echo $ECHO_N "(cached) $ECHO_C" >&6
22528 else
22529
22530 cat >"conftest.$ac_ext" <<_ACEOF
22531 #line 22531 "configure"
22532 #include "confdefs.h"
22533
22534 #include <stdarg.h>
22535 #include <stdio.h>
22536 int
22537 main (void)
22538 {
22539
22540         va_list ap;
22541         vsscanf("from", "%d", ap)
22542   ;
22543   return 0;
22544 }
22545 _ACEOF
22546 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22547 if { (eval echo "$as_me:22547: \"$ac_link\"") >&5
22548   (eval $ac_link) 2>&5
22549   ac_status=$?
22550   echo "$as_me:22550: \$? = $ac_status" >&5
22551   (exit "$ac_status"); } &&
22552          { ac_try='test -s "conftest$ac_exeext"'
22553   { (eval echo "$as_me:22553: \"$ac_try\"") >&5
22554   (eval $ac_try) 2>&5
22555   ac_status=$?
22556   echo "$as_me:22556: \$? = $ac_status" >&5
22557   (exit "$ac_status"); }; }; then
22558   cf_cv_func_vsscanf=vsscanf
22559 else
22560   echo "$as_me: failed program was:" >&5
22561 cat "conftest.$ac_ext" >&5
22562
22563 cat >"conftest.$ac_ext" <<_ACEOF
22564 #line 22564 "configure"
22565 #include "confdefs.h"
22566
22567 #include <stdarg.h>
22568 #include <stdio.h>
22569 int
22570 main (void)
22571 {
22572
22573         FILE strbuf;
22574         char *str = "from";
22575
22576         strbuf._flag = _IOREAD;
22577         strbuf._ptr = strbuf._base = (unsigned char *) str;
22578         strbuf._cnt = strlen(str);
22579         strbuf._file = _NFILE;
22580         return (vfscanf(&strbuf, "%d", ap))
22581   ;
22582   return 0;
22583 }
22584 _ACEOF
22585 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22586 if { (eval echo "$as_me:22586: \"$ac_link\"") >&5
22587   (eval $ac_link) 2>&5
22588   ac_status=$?
22589   echo "$as_me:22589: \$? = $ac_status" >&5
22590   (exit "$ac_status"); } &&
22591          { ac_try='test -s "conftest$ac_exeext"'
22592   { (eval echo "$as_me:22592: \"$ac_try\"") >&5
22593   (eval $ac_try) 2>&5
22594   ac_status=$?
22595   echo "$as_me:22595: \$? = $ac_status" >&5
22596   (exit "$ac_status"); }; }; then
22597   cf_cv_func_vsscanf=vfscanf
22598 else
22599   echo "$as_me: failed program was:" >&5
22600 cat "conftest.$ac_ext" >&5
22601
22602 cat >"conftest.$ac_ext" <<_ACEOF
22603 #line 22603 "configure"
22604 #include "confdefs.h"
22605
22606 #include <stdarg.h>
22607 #include <stdio.h>
22608 int
22609 main (void)
22610 {
22611
22612         FILE strbuf;
22613         char *str = "from";
22614
22615         strbuf._flag = _IOREAD;
22616         strbuf._ptr = strbuf._base = (unsigned char *) str;
22617         strbuf._cnt = strlen(str);
22618         strbuf._file = _NFILE;
22619         return (_doscan(&strbuf, "%d", ap))
22620   ;
22621   return 0;
22622 }
22623 _ACEOF
22624 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22625 if { (eval echo "$as_me:22625: \"$ac_link\"") >&5
22626   (eval $ac_link) 2>&5
22627   ac_status=$?
22628   echo "$as_me:22628: \$? = $ac_status" >&5
22629   (exit "$ac_status"); } &&
22630          { ac_try='test -s "conftest$ac_exeext"'
22631   { (eval echo "$as_me:22631: \"$ac_try\"") >&5
22632   (eval $ac_try) 2>&5
22633   ac_status=$?
22634   echo "$as_me:22634: \$? = $ac_status" >&5
22635   (exit "$ac_status"); }; }; then
22636   cf_cv_func_vsscanf=_doscan
22637 else
22638   echo "$as_me: failed program was:" >&5
22639 cat "conftest.$ac_ext" >&5
22640
22641 cf_cv_func_vsscanf=no
22642 fi
22643 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22644 fi
22645 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22646 fi
22647 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22648 fi
22649 echo "$as_me:22649: result: $cf_cv_func_vsscanf" >&5
22650 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
22651
22652 case "$cf_cv_func_vsscanf" in
22653 (vsscanf)
22654 cat >>confdefs.h <<\EOF
22655 #define HAVE_VSSCANF 1
22656 EOF
22657 ;;
22658 (vfscanf)
22659 cat >>confdefs.h <<\EOF
22660 #define HAVE_VFSCANF 1
22661 EOF
22662 ;;
22663 (_doscan)
22664 cat >>confdefs.h <<\EOF
22665 #define HAVE__DOSCAN 1
22666 EOF
22667 ;;
22668 esac
22669
22670 for ac_header in \
22671 unistd.h \
22672
22673 do
22674 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22675 echo "$as_me:22675: checking for $ac_header" >&5
22676 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22677 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22678   echo $ECHO_N "(cached) $ECHO_C" >&6
22679 else
22680   cat >"conftest.$ac_ext" <<_ACEOF
22681 #line 22681 "configure"
22682 #include "confdefs.h"
22683 #include <$ac_header>
22684 _ACEOF
22685 if { (eval echo "$as_me:22685: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22686   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22687   ac_status=$?
22688   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22689   rm -f conftest.er1
22690   cat conftest.err >&5
22691   echo "$as_me:22691: \$? = $ac_status" >&5
22692   (exit "$ac_status"); } >/dev/null; then
22693   if test -s conftest.err; then
22694     ac_cpp_err=$ac_c_preproc_warn_flag
22695   else
22696     ac_cpp_err=
22697   fi
22698 else
22699   ac_cpp_err=yes
22700 fi
22701 if test -z "$ac_cpp_err"; then
22702   eval "$as_ac_Header=yes"
22703 else
22704   echo "$as_me: failed program was:" >&5
22705   cat "conftest.$ac_ext" >&5
22706   eval "$as_ac_Header=no"
22707 fi
22708 rm -f conftest.err "conftest.$ac_ext"
22709 fi
22710 echo "$as_me:22710: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22711 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22712 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22713   cat >>confdefs.h <<EOF
22714 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22715 EOF
22716
22717 fi
22718 done
22719
22720 echo "$as_me:22720: checking for working mkstemp" >&5
22721 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
22722 if test "${cf_cv_func_mkstemp+set}" = set; then
22723   echo $ECHO_N "(cached) $ECHO_C" >&6
22724 else
22725
22726 rm -rf ./conftest*
22727 if test "$cross_compiling" = yes; then
22728   cf_cv_func_mkstemp=maybe
22729 else
22730   cat >"conftest.$ac_ext" <<_ACEOF
22731 #line 22731 "configure"
22732 #include "confdefs.h"
22733
22734 $ac_includes_default
22735
22736 int main(void)
22737 {
22738         char *tmpl = "conftestXXXXXX";
22739         char name[2][80];
22740         int n;
22741         int result = 0;
22742         int fd;
22743         struct stat sb;
22744
22745         umask(077);
22746         for (n = 0; n < 2; ++n) {
22747                 strcpy(name[n], tmpl);
22748                 if ((fd = mkstemp(name[n])) >= 0) {
22749                         if (!strcmp(name[n], tmpl)
22750                          || stat(name[n], &sb) != 0
22751                          || (sb.st_mode & S_IFMT) != S_IFREG
22752                          || (sb.st_mode & 077) != 0) {
22753                                 result = 1;
22754                         }
22755                         close(fd);
22756                 }
22757         }
22758         if (result == 0
22759          && !strcmp(name[0], name[1]))
22760                 result = 1;
22761         ${cf_cv_main_return:-return}(result);
22762 }
22763
22764 _ACEOF
22765 rm -f "conftest$ac_exeext"
22766 if { (eval echo "$as_me:22766: \"$ac_link\"") >&5
22767   (eval $ac_link) 2>&5
22768   ac_status=$?
22769   echo "$as_me:22769: \$? = $ac_status" >&5
22770   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22771   { (eval echo "$as_me:22771: \"$ac_try\"") >&5
22772   (eval $ac_try) 2>&5
22773   ac_status=$?
22774   echo "$as_me:22774: \$? = $ac_status" >&5
22775   (exit "$ac_status"); }; }; then
22776   cf_cv_func_mkstemp=yes
22777
22778 else
22779   echo "$as_me: program exited with status $ac_status" >&5
22780 echo "$as_me: failed program was:" >&5
22781 cat "conftest.$ac_ext" >&5
22782 cf_cv_func_mkstemp=no
22783
22784 fi
22785 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22786 fi
22787
22788 fi
22789 echo "$as_me:22789: result: $cf_cv_func_mkstemp" >&5
22790 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
22791 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
22792         echo "$as_me:22792: checking for mkstemp" >&5
22793 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
22794 if test "${ac_cv_func_mkstemp+set}" = set; then
22795   echo $ECHO_N "(cached) $ECHO_C" >&6
22796 else
22797   cat >"conftest.$ac_ext" <<_ACEOF
22798 #line 22798 "configure"
22799 #include "confdefs.h"
22800 #define mkstemp autoconf_temporary
22801 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22802 #undef mkstemp
22803
22804 #ifdef __cplusplus
22805 extern "C"
22806 #endif
22807
22808 /* We use char because int might match the return type of a gcc2
22809    builtin and then its argument prototype would still apply.  */
22810 char mkstemp (void);
22811
22812 int
22813 main (void)
22814 {
22815
22816 /* The GNU C library defines stubs for functions which it implements
22817     to always fail with ENOSYS.  Some functions are actually named
22818     something starting with __ and the normal name is an alias.  */
22819 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
22820 #error found stub for mkstemp
22821 #endif
22822
22823         return mkstemp ();
22824   ;
22825   return 0;
22826 }
22827 _ACEOF
22828 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22829 if { (eval echo "$as_me:22829: \"$ac_link\"") >&5
22830   (eval $ac_link) 2>&5
22831   ac_status=$?
22832   echo "$as_me:22832: \$? = $ac_status" >&5
22833   (exit "$ac_status"); } &&
22834          { ac_try='test -s "conftest$ac_exeext"'
22835   { (eval echo "$as_me:22835: \"$ac_try\"") >&5
22836   (eval $ac_try) 2>&5
22837   ac_status=$?
22838   echo "$as_me:22838: \$? = $ac_status" >&5
22839   (exit "$ac_status"); }; }; then
22840   ac_cv_func_mkstemp=yes
22841 else
22842   echo "$as_me: failed program was:" >&5
22843 cat "conftest.$ac_ext" >&5
22844 ac_cv_func_mkstemp=no
22845 fi
22846 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22847 fi
22848 echo "$as_me:22848: result: $ac_cv_func_mkstemp" >&5
22849 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22850
22851 fi
22852 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22853
22854 cat >>confdefs.h <<\EOF
22855 #define HAVE_MKSTEMP 1
22856 EOF
22857
22858 fi
22859
22860 # setup for prototype of fallback for vsscanf()
22861
22862 if test "$cf_cv_func_vsscanf" = vsscanf ; then
22863         HAVE_VSSCANF=1
22864 else
22865         HAVE_VSSCANF=0
22866 fi
22867
22868 if test "x$cross_compiling" = xyes ; then
22869         { echo "$as_me:22869: WARNING: cross compiling: assume setvbuf params not reversed" >&5
22870 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22871 else
22872         echo "$as_me:22872: checking whether setvbuf arguments are reversed" >&5
22873 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22874 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22875   echo $ECHO_N "(cached) $ECHO_C" >&6
22876 else
22877   if test "$cross_compiling" = yes; then
22878   { { echo "$as_me:22878: error: cannot run test program while cross compiling" >&5
22879 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22880    { (exit 1); exit 1; }; }
22881 else
22882   cat >"conftest.$ac_ext" <<_ACEOF
22883 #line 22883 "configure"
22884 #include "confdefs.h"
22885 #include <stdio.h>
22886 /* If setvbuf has the reversed format, exit 0. */
22887 int
22888 main (void)
22889 {
22890   /* This call has the arguments reversed.
22891      A reversed system may check and see that the address of main
22892      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
22893   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22894     $ac_main_return(1);
22895   putc('\r', stdout);
22896   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22897 }
22898 _ACEOF
22899 rm -f "conftest$ac_exeext"
22900 if { (eval echo "$as_me:22900: \"$ac_link\"") >&5
22901   (eval $ac_link) 2>&5
22902   ac_status=$?
22903   echo "$as_me:22903: \$? = $ac_status" >&5
22904   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22905   { (eval echo "$as_me:22905: \"$ac_try\"") >&5
22906   (eval $ac_try) 2>&5
22907   ac_status=$?
22908   echo "$as_me:22908: \$? = $ac_status" >&5
22909   (exit "$ac_status"); }; }; then
22910   ac_cv_func_setvbuf_reversed=yes
22911 else
22912   echo "$as_me: program exited with status $ac_status" >&5
22913 echo "$as_me: failed program was:" >&5
22914 cat "conftest.$ac_ext" >&5
22915 ac_cv_func_setvbuf_reversed=no
22916 fi
22917 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22918 fi
22919 rm -f core ./core.* ./*.core
22920 fi
22921 echo "$as_me:22921: result: $ac_cv_func_setvbuf_reversed" >&5
22922 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
22923 if test $ac_cv_func_setvbuf_reversed = yes; then
22924
22925 cat >>confdefs.h <<\EOF
22926 #define SETVBUF_REVERSED 1
22927 EOF
22928
22929 fi
22930
22931 fi
22932 echo "$as_me:22932: checking for intptr_t" >&5
22933 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
22934 if test "${ac_cv_type_intptr_t+set}" = set; then
22935   echo $ECHO_N "(cached) $ECHO_C" >&6
22936 else
22937   cat >"conftest.$ac_ext" <<_ACEOF
22938 #line 22938 "configure"
22939 #include "confdefs.h"
22940 $ac_includes_default
22941 int
22942 main (void)
22943 {
22944 if ((intptr_t *) 0)
22945   return 0;
22946 if (sizeof (intptr_t))
22947   return 0;
22948   ;
22949   return 0;
22950 }
22951 _ACEOF
22952 rm -f "conftest.$ac_objext"
22953 if { (eval echo "$as_me:22953: \"$ac_compile\"") >&5
22954   (eval $ac_compile) 2>&5
22955   ac_status=$?
22956   echo "$as_me:22956: \$? = $ac_status" >&5
22957   (exit "$ac_status"); } &&
22958          { ac_try='test -s "conftest.$ac_objext"'
22959   { (eval echo "$as_me:22959: \"$ac_try\"") >&5
22960   (eval $ac_try) 2>&5
22961   ac_status=$?
22962   echo "$as_me:22962: \$? = $ac_status" >&5
22963   (exit "$ac_status"); }; }; then
22964   ac_cv_type_intptr_t=yes
22965 else
22966   echo "$as_me: failed program was:" >&5
22967 cat "conftest.$ac_ext" >&5
22968 ac_cv_type_intptr_t=no
22969 fi
22970 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22971 fi
22972 echo "$as_me:22972: result: $ac_cv_type_intptr_t" >&5
22973 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
22974 if test "$ac_cv_type_intptr_t" = yes; then
22975   :
22976 else
22977
22978 cat >>confdefs.h <<EOF
22979 #define intptr_t long
22980 EOF
22981
22982 fi
22983
22984 echo "$as_me:22984: checking for ssize_t" >&5
22985 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22986 if test "${ac_cv_type_ssize_t+set}" = set; then
22987   echo $ECHO_N "(cached) $ECHO_C" >&6
22988 else
22989   cat >"conftest.$ac_ext" <<_ACEOF
22990 #line 22990 "configure"
22991 #include "confdefs.h"
22992 $ac_includes_default
22993 int
22994 main (void)
22995 {
22996 if ((ssize_t *) 0)
22997   return 0;
22998 if (sizeof (ssize_t))
22999   return 0;
23000   ;
23001   return 0;
23002 }
23003 _ACEOF
23004 rm -f "conftest.$ac_objext"
23005 if { (eval echo "$as_me:23005: \"$ac_compile\"") >&5
23006   (eval $ac_compile) 2>&5
23007   ac_status=$?
23008   echo "$as_me:23008: \$? = $ac_status" >&5
23009   (exit "$ac_status"); } &&
23010          { ac_try='test -s "conftest.$ac_objext"'
23011   { (eval echo "$as_me:23011: \"$ac_try\"") >&5
23012   (eval $ac_try) 2>&5
23013   ac_status=$?
23014   echo "$as_me:23014: \$? = $ac_status" >&5
23015   (exit "$ac_status"); }; }; then
23016   ac_cv_type_ssize_t=yes
23017 else
23018   echo "$as_me: failed program was:" >&5
23019 cat "conftest.$ac_ext" >&5
23020 ac_cv_type_ssize_t=no
23021 fi
23022 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23023 fi
23024 echo "$as_me:23024: result: $ac_cv_type_ssize_t" >&5
23025 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
23026 if test "$ac_cv_type_ssize_t" = yes; then
23027   :
23028 else
23029
23030 cat >>confdefs.h <<EOF
23031 #define ssize_t int
23032 EOF
23033
23034 fi
23035
23036 echo "$as_me:23036: checking for type sigaction_t" >&5
23037 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
23038 if test "${cf_cv_type_sigaction+set}" = set; then
23039   echo $ECHO_N "(cached) $ECHO_C" >&6
23040 else
23041
23042         cat >"conftest.$ac_ext" <<_ACEOF
23043 #line 23043 "configure"
23044 #include "confdefs.h"
23045
23046 #include <signal.h>
23047 int
23048 main (void)
23049 {
23050 sigaction_t x
23051   ;
23052   return 0;
23053 }
23054 _ACEOF
23055 rm -f "conftest.$ac_objext"
23056 if { (eval echo "$as_me:23056: \"$ac_compile\"") >&5
23057   (eval $ac_compile) 2>&5
23058   ac_status=$?
23059   echo "$as_me:23059: \$? = $ac_status" >&5
23060   (exit "$ac_status"); } &&
23061          { ac_try='test -s "conftest.$ac_objext"'
23062   { (eval echo "$as_me:23062: \"$ac_try\"") >&5
23063   (eval $ac_try) 2>&5
23064   ac_status=$?
23065   echo "$as_me:23065: \$? = $ac_status" >&5
23066   (exit "$ac_status"); }; }; then
23067   cf_cv_type_sigaction=yes
23068 else
23069   echo "$as_me: failed program was:" >&5
23070 cat "conftest.$ac_ext" >&5
23071 cf_cv_type_sigaction=no
23072 fi
23073 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23074 fi
23075
23076 echo "$as_me:23076: result: $cf_cv_type_sigaction" >&5
23077 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
23078 test "$cf_cv_type_sigaction" = yes &&
23079 cat >>confdefs.h <<\EOF
23080 #define HAVE_TYPE_SIGACTION 1
23081 EOF
23082
23083 echo "$as_me:23083: checking declaration of size-change" >&5
23084 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
23085 if test "${cf_cv_sizechange+set}" = set; then
23086   echo $ECHO_N "(cached) $ECHO_C" >&6
23087 else
23088
23089         cf_cv_sizechange=unknown
23090         cf_save_CPPFLAGS="$CPPFLAGS"
23091
23092 for cf_opts in "" "NEED_PTEM_H"
23093 do
23094
23095         CPPFLAGS="$cf_save_CPPFLAGS"
23096         if test -n "$cf_opts"
23097         then
23098
23099         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23100         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
23101
23102         fi
23103         cat >"conftest.$ac_ext" <<_ACEOF
23104 #line 23104 "configure"
23105 #include "confdefs.h"
23106 #include <sys/types.h>
23107 #ifdef HAVE_TERMIOS_H
23108 #include <termios.h>
23109 #else
23110 #ifdef HAVE_TERMIO_H
23111 #include <termio.h>
23112 #endif
23113 #endif
23114
23115 #ifdef NEED_PTEM_H
23116 /* This is a workaround for SCO:  they neglected to define struct winsize in
23117  * termios.h -- it is only in termio.h and ptem.h
23118  */
23119 #include <sys/stream.h>
23120 #include <sys/ptem.h>
23121 #endif
23122
23123 #ifdef HAVE_SYS_IOCTL_H
23124 #include <sys/ioctl.h>
23125 #endif
23126
23127 int
23128 main (void)
23129 {
23130
23131 #ifdef TIOCGSIZE
23132         struct ttysize win;     /* SunOS 3.0... */
23133         int y = win.ts_lines = 2;
23134         int x = win.ts_cols = 1;
23135         (void)y;
23136         (void)x;
23137 #else
23138 #ifdef TIOCGWINSZ
23139         struct winsize win;     /* everything else */
23140         int y = win.ws_row = 2;
23141         int x = win.ws_col = 1;
23142         (void)y;
23143         (void)x;
23144 #else
23145         no TIOCGSIZE or TIOCGWINSZ
23146 #endif /* TIOCGWINSZ */
23147 #endif /* TIOCGSIZE */
23148
23149   ;
23150   return 0;
23151 }
23152 _ACEOF
23153 rm -f "conftest.$ac_objext"
23154 if { (eval echo "$as_me:23154: \"$ac_compile\"") >&5
23155   (eval $ac_compile) 2>&5
23156   ac_status=$?
23157   echo "$as_me:23157: \$? = $ac_status" >&5
23158   (exit "$ac_status"); } &&
23159          { ac_try='test -s "conftest.$ac_objext"'
23160   { (eval echo "$as_me:23160: \"$ac_try\"") >&5
23161   (eval $ac_try) 2>&5
23162   ac_status=$?
23163   echo "$as_me:23163: \$? = $ac_status" >&5
23164   (exit "$ac_status"); }; }; then
23165   cf_cv_sizechange=yes
23166 else
23167   echo "$as_me: failed program was:" >&5
23168 cat "conftest.$ac_ext" >&5
23169 cf_cv_sizechange=no
23170 fi
23171 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23172
23173         CPPFLAGS="$cf_save_CPPFLAGS"
23174         if test "$cf_cv_sizechange" = yes ; then
23175                 echo "size-change succeeded ($cf_opts)" >&5
23176                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
23177                 break
23178         fi
23179 done
23180
23181 fi
23182 echo "$as_me:23182: result: $cf_cv_sizechange" >&5
23183 echo "${ECHO_T}$cf_cv_sizechange" >&6
23184 if test "$cf_cv_sizechange" != no ; then
23185
23186 cat >>confdefs.h <<\EOF
23187 #define HAVE_SIZECHANGE 1
23188 EOF
23189
23190         case "$cf_cv_sizechange" in
23191         (NEED*)
23192                 cat >>confdefs.h <<EOF
23193 #define $cf_cv_sizechange  1
23194 EOF
23195
23196                 ;;
23197         esac
23198 fi
23199
23200 echo "$as_me:23200: checking for memmove" >&5
23201 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
23202 if test "${ac_cv_func_memmove+set}" = set; then
23203   echo $ECHO_N "(cached) $ECHO_C" >&6
23204 else
23205   cat >"conftest.$ac_ext" <<_ACEOF
23206 #line 23206 "configure"
23207 #include "confdefs.h"
23208 #define memmove autoconf_temporary
23209 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23210 #undef memmove
23211
23212 #ifdef __cplusplus
23213 extern "C"
23214 #endif
23215
23216 /* We use char because int might match the return type of a gcc2
23217    builtin and then its argument prototype would still apply.  */
23218 char memmove (void);
23219
23220 int
23221 main (void)
23222 {
23223
23224 /* The GNU C library defines stubs for functions which it implements
23225     to always fail with ENOSYS.  Some functions are actually named
23226     something starting with __ and the normal name is an alias.  */
23227 #if defined (__stub_memmove) || defined (__stub___memmove)
23228 #error found stub for memmove
23229 #endif
23230
23231         return memmove ();
23232   ;
23233   return 0;
23234 }
23235 _ACEOF
23236 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23237 if { (eval echo "$as_me:23237: \"$ac_link\"") >&5
23238   (eval $ac_link) 2>&5
23239   ac_status=$?
23240   echo "$as_me:23240: \$? = $ac_status" >&5
23241   (exit "$ac_status"); } &&
23242          { ac_try='test -s "conftest$ac_exeext"'
23243   { (eval echo "$as_me:23243: \"$ac_try\"") >&5
23244   (eval $ac_try) 2>&5
23245   ac_status=$?
23246   echo "$as_me:23246: \$? = $ac_status" >&5
23247   (exit "$ac_status"); }; }; then
23248   ac_cv_func_memmove=yes
23249 else
23250   echo "$as_me: failed program was:" >&5
23251 cat "conftest.$ac_ext" >&5
23252 ac_cv_func_memmove=no
23253 fi
23254 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23255 fi
23256 echo "$as_me:23256: result: $ac_cv_func_memmove" >&5
23257 echo "${ECHO_T}$ac_cv_func_memmove" >&6
23258 if test "$ac_cv_func_memmove" = yes; then
23259   :
23260 else
23261
23262 echo "$as_me:23262: checking for bcopy" >&5
23263 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
23264 if test "${ac_cv_func_bcopy+set}" = set; then
23265   echo $ECHO_N "(cached) $ECHO_C" >&6
23266 else
23267   cat >"conftest.$ac_ext" <<_ACEOF
23268 #line 23268 "configure"
23269 #include "confdefs.h"
23270 #define bcopy autoconf_temporary
23271 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23272 #undef bcopy
23273
23274 #ifdef __cplusplus
23275 extern "C"
23276 #endif
23277
23278 /* We use char because int might match the return type of a gcc2
23279    builtin and then its argument prototype would still apply.  */
23280 char bcopy (void);
23281
23282 int
23283 main (void)
23284 {
23285
23286 /* The GNU C library defines stubs for functions which it implements
23287     to always fail with ENOSYS.  Some functions are actually named
23288     something starting with __ and the normal name is an alias.  */
23289 #if defined (__stub_bcopy) || defined (__stub___bcopy)
23290 #error found stub for bcopy
23291 #endif
23292
23293         return bcopy ();
23294   ;
23295   return 0;
23296 }
23297 _ACEOF
23298 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23299 if { (eval echo "$as_me:23299: \"$ac_link\"") >&5
23300   (eval $ac_link) 2>&5
23301   ac_status=$?
23302   echo "$as_me:23302: \$? = $ac_status" >&5
23303   (exit "$ac_status"); } &&
23304          { ac_try='test -s "conftest$ac_exeext"'
23305   { (eval echo "$as_me:23305: \"$ac_try\"") >&5
23306   (eval $ac_try) 2>&5
23307   ac_status=$?
23308   echo "$as_me:23308: \$? = $ac_status" >&5
23309   (exit "$ac_status"); }; }; then
23310   ac_cv_func_bcopy=yes
23311 else
23312   echo "$as_me: failed program was:" >&5
23313 cat "conftest.$ac_ext" >&5
23314 ac_cv_func_bcopy=no
23315 fi
23316 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23317 fi
23318 echo "$as_me:23318: result: $ac_cv_func_bcopy" >&5
23319 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
23320 if test "$ac_cv_func_bcopy" = yes; then
23321
23322         echo "$as_me:23322: checking if bcopy does overlapping moves" >&5
23323 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
23324 if test "${cf_cv_good_bcopy+set}" = set; then
23325   echo $ECHO_N "(cached) $ECHO_C" >&6
23326 else
23327
23328                 if test "$cross_compiling" = yes; then
23329   cf_cv_good_bcopy=unknown
23330 else
23331   cat >"conftest.$ac_ext" <<_ACEOF
23332 #line 23332 "configure"
23333 #include "confdefs.h"
23334
23335 $ac_includes_default
23336
23337 int main(void) {
23338         static char data[] = "abcdefghijklmnopqrstuwwxyz";
23339         char temp[40];
23340         bcopy(data, temp, sizeof(data));
23341         bcopy(temp+10, temp, 15);
23342         bcopy(temp+5, temp+15, 10);
23343         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
23344 }
23345
23346 _ACEOF
23347 rm -f "conftest$ac_exeext"
23348 if { (eval echo "$as_me:23348: \"$ac_link\"") >&5
23349   (eval $ac_link) 2>&5
23350   ac_status=$?
23351   echo "$as_me:23351: \$? = $ac_status" >&5
23352   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23353   { (eval echo "$as_me:23353: \"$ac_try\"") >&5
23354   (eval $ac_try) 2>&5
23355   ac_status=$?
23356   echo "$as_me:23356: \$? = $ac_status" >&5
23357   (exit "$ac_status"); }; }; then
23358   cf_cv_good_bcopy=yes
23359 else
23360   echo "$as_me: program exited with status $ac_status" >&5
23361 echo "$as_me: failed program was:" >&5
23362 cat "conftest.$ac_ext" >&5
23363 cf_cv_good_bcopy=no
23364 fi
23365 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23366 fi
23367
23368 fi
23369 echo "$as_me:23369: result: $cf_cv_good_bcopy" >&5
23370 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
23371
23372 else
23373   cf_cv_good_bcopy=no
23374 fi
23375
23376         if test "$cf_cv_good_bcopy" = yes ; then
23377
23378 cat >>confdefs.h <<\EOF
23379 #define USE_OK_BCOPY 1
23380 EOF
23381
23382         else
23383
23384 cat >>confdefs.h <<\EOF
23385 #define USE_MY_MEMMOVE 1
23386 EOF
23387
23388         fi
23389
23390 fi
23391
23392 tty >/dev/null 2>&1 || {
23393 for ac_func in posix_openpt
23394 do
23395 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23396 echo "$as_me:23396: checking for $ac_func" >&5
23397 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23398 if eval "test \"\${$as_ac_var+set}\" = set"; then
23399   echo $ECHO_N "(cached) $ECHO_C" >&6
23400 else
23401   cat >"conftest.$ac_ext" <<_ACEOF
23402 #line 23402 "configure"
23403 #include "confdefs.h"
23404 #define $ac_func autoconf_temporary
23405 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23406 #undef $ac_func
23407
23408 #ifdef __cplusplus
23409 extern "C"
23410 #endif
23411
23412 /* We use char because int might match the return type of a gcc2
23413    builtin and then its argument prototype would still apply.  */
23414 char $ac_func (void);
23415
23416 int
23417 main (void)
23418 {
23419
23420 /* The GNU C library defines stubs for functions which it implements
23421     to always fail with ENOSYS.  Some functions are actually named
23422     something starting with __ and the normal name is an alias.  */
23423 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23424 #error found stub for $ac_func
23425 #endif
23426
23427         return $ac_func ();
23428   ;
23429   return 0;
23430 }
23431 _ACEOF
23432 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23433 if { (eval echo "$as_me:23433: \"$ac_link\"") >&5
23434   (eval $ac_link) 2>&5
23435   ac_status=$?
23436   echo "$as_me:23436: \$? = $ac_status" >&5
23437   (exit "$ac_status"); } &&
23438          { ac_try='test -s "conftest$ac_exeext"'
23439   { (eval echo "$as_me:23439: \"$ac_try\"") >&5
23440   (eval $ac_try) 2>&5
23441   ac_status=$?
23442   echo "$as_me:23442: \$? = $ac_status" >&5
23443   (exit "$ac_status"); }; }; then
23444   eval "$as_ac_var=yes"
23445 else
23446   echo "$as_me: failed program was:" >&5
23447 cat "conftest.$ac_ext" >&5
23448 eval "$as_ac_var=no"
23449 fi
23450 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23451 fi
23452 echo "$as_me:23452: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23453 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23454 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23455   cat >>confdefs.h <<EOF
23456 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23457 EOF
23458
23459 fi
23460 done
23461  }
23462 echo "$as_me:23462: checking if poll really works" >&5
23463 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
23464 if test "${cf_cv_working_poll+set}" = set; then
23465   echo $ECHO_N "(cached) $ECHO_C" >&6
23466 else
23467
23468 if test "$cross_compiling" = yes; then
23469   cf_cv_working_poll=unknown
23470 else
23471   cat >"conftest.$ac_ext" <<_ACEOF
23472 #line 23472 "configure"
23473 #include "confdefs.h"
23474
23475 $ac_includes_default
23476
23477 #include <fcntl.h>
23478
23479 #ifdef HAVE_POLL_H
23480 #include <poll.h>
23481 #else
23482 #include <sys/poll.h>
23483 #endif
23484
23485 int main(void) {
23486         struct pollfd myfds;
23487         int ret;
23488
23489         /* check for Darwin bug with respect to "devices" */
23490         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
23491         if (myfds.fd < 0)
23492                 myfds.fd = 0;
23493         myfds.events = POLLIN;
23494         myfds.revents = 0;
23495
23496         ret = poll(&myfds, 1, 100);
23497
23498         if (ret < 0 || (myfds.revents & POLLNVAL)) {
23499                 ret = -1;
23500         } else {
23501                 int fd = 0;
23502                 if (!isatty(fd)) {
23503                         fd = open("/dev/tty", 2);       /* O_RDWR */
23504                 }
23505 #ifdef HAVE_POSIX_OPENPT
23506                 if (fd < 0) {
23507                         fd = posix_openpt(O_RDWR);
23508                 }
23509 #endif
23510
23511                 if (fd >= 0) {
23512                         /* also check with standard input */
23513                         myfds.fd = fd;
23514                         myfds.events = POLLIN;
23515                         myfds.revents = 0;
23516                         ret = poll(&myfds, 1, 100);
23517                 } else {
23518                         ret = -1;
23519                 }
23520         }
23521         ${cf_cv_main_return:-return}(ret < 0);
23522 }
23523 _ACEOF
23524 rm -f "conftest$ac_exeext"
23525 if { (eval echo "$as_me:23525: \"$ac_link\"") >&5
23526   (eval $ac_link) 2>&5
23527   ac_status=$?
23528   echo "$as_me:23528: \$? = $ac_status" >&5
23529   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23530   { (eval echo "$as_me:23530: \"$ac_try\"") >&5
23531   (eval $ac_try) 2>&5
23532   ac_status=$?
23533   echo "$as_me:23533: \$? = $ac_status" >&5
23534   (exit "$ac_status"); }; }; then
23535   cf_cv_working_poll=yes
23536 else
23537   echo "$as_me: program exited with status $ac_status" >&5
23538 echo "$as_me: failed program was:" >&5
23539 cat "conftest.$ac_ext" >&5
23540 cf_cv_working_poll=no
23541 fi
23542 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23543 fi
23544 fi
23545 echo "$as_me:23545: result: $cf_cv_working_poll" >&5
23546 echo "${ECHO_T}$cf_cv_working_poll" >&6
23547 test "$cf_cv_working_poll" = "yes" &&
23548 cat >>confdefs.h <<\EOF
23549 #define HAVE_WORKING_POLL 1
23550 EOF
23551
23552 echo "$as_me:23552: checking for va_copy" >&5
23553 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
23554 if test "${cf_cv_have_va_copy+set}" = set; then
23555   echo $ECHO_N "(cached) $ECHO_C" >&6
23556 else
23557
23558 cat >"conftest.$ac_ext" <<_ACEOF
23559 #line 23559 "configure"
23560 #include "confdefs.h"
23561
23562 #include <stdarg.h>
23563
23564 int
23565 main (void)
23566 {
23567
23568         static va_list dst;
23569         static va_list src;
23570         va_copy(dst, src)
23571   ;
23572   return 0;
23573 }
23574 _ACEOF
23575 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23576 if { (eval echo "$as_me:23576: \"$ac_link\"") >&5
23577   (eval $ac_link) 2>&5
23578   ac_status=$?
23579   echo "$as_me:23579: \$? = $ac_status" >&5
23580   (exit "$ac_status"); } &&
23581          { ac_try='test -s "conftest$ac_exeext"'
23582   { (eval echo "$as_me:23582: \"$ac_try\"") >&5
23583   (eval $ac_try) 2>&5
23584   ac_status=$?
23585   echo "$as_me:23585: \$? = $ac_status" >&5
23586   (exit "$ac_status"); }; }; then
23587   cf_cv_have_va_copy=yes
23588 else
23589   echo "$as_me: failed program was:" >&5
23590 cat "conftest.$ac_ext" >&5
23591 cf_cv_have_va_copy=no
23592 fi
23593 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23594 fi
23595 echo "$as_me:23595: result: $cf_cv_have_va_copy" >&5
23596 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
23597
23598 if test "$cf_cv_have_va_copy" = yes;
23599 then
23600
23601 cat >>confdefs.h <<\EOF
23602 #define HAVE_VA_COPY 1
23603 EOF
23604
23605 else # !cf_cv_have_va_copy
23606
23607 echo "$as_me:23607: checking for __va_copy" >&5
23608 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
23609 if test "${cf_cv_have___va_copy+set}" = set; then
23610   echo $ECHO_N "(cached) $ECHO_C" >&6
23611 else
23612
23613 cat >"conftest.$ac_ext" <<_ACEOF
23614 #line 23614 "configure"
23615 #include "confdefs.h"
23616
23617 #include <stdarg.h>
23618
23619 int
23620 main (void)
23621 {
23622
23623         static va_list dst;
23624         static va_list src;
23625         __va_copy(dst, src)
23626   ;
23627   return 0;
23628 }
23629 _ACEOF
23630 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23631 if { (eval echo "$as_me:23631: \"$ac_link\"") >&5
23632   (eval $ac_link) 2>&5
23633   ac_status=$?
23634   echo "$as_me:23634: \$? = $ac_status" >&5
23635   (exit "$ac_status"); } &&
23636          { ac_try='test -s "conftest$ac_exeext"'
23637   { (eval echo "$as_me:23637: \"$ac_try\"") >&5
23638   (eval $ac_try) 2>&5
23639   ac_status=$?
23640   echo "$as_me:23640: \$? = $ac_status" >&5
23641   (exit "$ac_status"); }; }; then
23642   cf_cv_have___va_copy=yes
23643 else
23644   echo "$as_me: failed program was:" >&5
23645 cat "conftest.$ac_ext" >&5
23646 cf_cv_have___va_copy=no
23647 fi
23648 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23649 fi
23650 echo "$as_me:23650: result: $cf_cv_have___va_copy" >&5
23651 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
23652
23653 if test "$cf_cv_have___va_copy" = yes
23654 then
23655
23656 cat >>confdefs.h <<\EOF
23657 #define HAVE___VA_COPY 1
23658 EOF
23659
23660 else # !cf_cv_have___va_copy
23661
23662 echo "$as_me:23662: checking for __builtin_va_copy" >&5
23663 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
23664 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
23665   echo $ECHO_N "(cached) $ECHO_C" >&6
23666 else
23667
23668 cat >"conftest.$ac_ext" <<_ACEOF
23669 #line 23669 "configure"
23670 #include "confdefs.h"
23671
23672 #include <stdarg.h>
23673
23674 int
23675 main (void)
23676 {
23677
23678         static va_list dst;
23679         static va_list src;
23680         __builtin_va_copy(dst, src)
23681   ;
23682   return 0;
23683 }
23684 _ACEOF
23685 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23686 if { (eval echo "$as_me:23686: \"$ac_link\"") >&5
23687   (eval $ac_link) 2>&5
23688   ac_status=$?
23689   echo "$as_me:23689: \$? = $ac_status" >&5
23690   (exit "$ac_status"); } &&
23691          { ac_try='test -s "conftest$ac_exeext"'
23692   { (eval echo "$as_me:23692: \"$ac_try\"") >&5
23693   (eval $ac_try) 2>&5
23694   ac_status=$?
23695   echo "$as_me:23695: \$? = $ac_status" >&5
23696   (exit "$ac_status"); }; }; then
23697   cf_cv_have___builtin_va_copy=yes
23698 else
23699   echo "$as_me: failed program was:" >&5
23700 cat "conftest.$ac_ext" >&5
23701 cf_cv_have___builtin_va_copy=no
23702 fi
23703 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23704 fi
23705 echo "$as_me:23705: result: $cf_cv_have___builtin_va_copy" >&5
23706 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
23707
23708 test "$cf_cv_have___builtin_va_copy" = yes &&
23709
23710 cat >>confdefs.h <<\EOF
23711 #define HAVE___BUILTIN_VA_COPY 1
23712 EOF
23713
23714 fi # cf_cv_have___va_copy
23715
23716 fi # cf_cv_have_va_copy
23717
23718 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
23719 (*yes*)
23720         ;;
23721
23722 (*)
23723         echo "$as_me:23723: checking if we can simply copy va_list" >&5
23724 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
23725 if test "${cf_cv_pointer_va_list+set}" = set; then
23726   echo $ECHO_N "(cached) $ECHO_C" >&6
23727 else
23728
23729 cat >"conftest.$ac_ext" <<_ACEOF
23730 #line 23730 "configure"
23731 #include "confdefs.h"
23732
23733 #include <stdarg.h>
23734
23735 int
23736 main (void)
23737 {
23738
23739         va_list dst;
23740         va_list src;
23741         dst = src
23742   ;
23743   return 0;
23744 }
23745 _ACEOF
23746 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23747 if { (eval echo "$as_me:23747: \"$ac_link\"") >&5
23748   (eval $ac_link) 2>&5
23749   ac_status=$?
23750   echo "$as_me:23750: \$? = $ac_status" >&5
23751   (exit "$ac_status"); } &&
23752          { ac_try='test -s "conftest$ac_exeext"'
23753   { (eval echo "$as_me:23753: \"$ac_try\"") >&5
23754   (eval $ac_try) 2>&5
23755   ac_status=$?
23756   echo "$as_me:23756: \$? = $ac_status" >&5
23757   (exit "$ac_status"); }; }; then
23758   cf_cv_pointer_va_list=yes
23759 else
23760   echo "$as_me: failed program was:" >&5
23761 cat "conftest.$ac_ext" >&5
23762 cf_cv_pointer_va_list=no
23763 fi
23764 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23765 fi
23766 echo "$as_me:23766: result: $cf_cv_pointer_va_list" >&5
23767 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
23768
23769         if test "$cf_cv_pointer_va_list" = no
23770         then
23771                 echo "$as_me:23771: checking if we can copy va_list indirectly" >&5
23772 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
23773 if test "${cf_cv_array_va_list+set}" = set; then
23774   echo $ECHO_N "(cached) $ECHO_C" >&6
23775 else
23776
23777 cat >"conftest.$ac_ext" <<_ACEOF
23778 #line 23778 "configure"
23779 #include "confdefs.h"
23780
23781 #include <stdarg.h>
23782
23783 int
23784 main (void)
23785 {
23786
23787         va_list dst;
23788         va_list src;
23789         *dst = *src
23790   ;
23791   return 0;
23792 }
23793 _ACEOF
23794 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23795 if { (eval echo "$as_me:23795: \"$ac_link\"") >&5
23796   (eval $ac_link) 2>&5
23797   ac_status=$?
23798   echo "$as_me:23798: \$? = $ac_status" >&5
23799   (exit "$ac_status"); } &&
23800          { ac_try='test -s "conftest$ac_exeext"'
23801   { (eval echo "$as_me:23801: \"$ac_try\"") >&5
23802   (eval $ac_try) 2>&5
23803   ac_status=$?
23804   echo "$as_me:23804: \$? = $ac_status" >&5
23805   (exit "$ac_status"); }; }; then
23806   cf_cv_array_va_list=yes
23807 else
23808   echo "$as_me: failed program was:" >&5
23809 cat "conftest.$ac_ext" >&5
23810 cf_cv_array_va_list=no
23811 fi
23812 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23813 fi
23814 echo "$as_me:23814: result: $cf_cv_array_va_list" >&5
23815 echo "${ECHO_T}$cf_cv_array_va_list" >&6
23816                 test "$cf_cv_array_va_list" = yes &&
23817 cat >>confdefs.h <<\EOF
23818 #define ARRAY_VA_LIST 1
23819 EOF
23820
23821         fi
23822         ;;
23823 esac
23824
23825 echo "$as_me:23825: checking for pid_t" >&5
23826 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23827 if test "${ac_cv_type_pid_t+set}" = set; then
23828   echo $ECHO_N "(cached) $ECHO_C" >&6
23829 else
23830   cat >"conftest.$ac_ext" <<_ACEOF
23831 #line 23831 "configure"
23832 #include "confdefs.h"
23833 $ac_includes_default
23834 int
23835 main (void)
23836 {
23837 if ((pid_t *) 0)
23838   return 0;
23839 if (sizeof (pid_t))
23840   return 0;
23841   ;
23842   return 0;
23843 }
23844 _ACEOF
23845 rm -f "conftest.$ac_objext"
23846 if { (eval echo "$as_me:23846: \"$ac_compile\"") >&5
23847   (eval $ac_compile) 2>&5
23848   ac_status=$?
23849   echo "$as_me:23849: \$? = $ac_status" >&5
23850   (exit "$ac_status"); } &&
23851          { ac_try='test -s "conftest.$ac_objext"'
23852   { (eval echo "$as_me:23852: \"$ac_try\"") >&5
23853   (eval $ac_try) 2>&5
23854   ac_status=$?
23855   echo "$as_me:23855: \$? = $ac_status" >&5
23856   (exit "$ac_status"); }; }; then
23857   ac_cv_type_pid_t=yes
23858 else
23859   echo "$as_me: failed program was:" >&5
23860 cat "conftest.$ac_ext" >&5
23861 ac_cv_type_pid_t=no
23862 fi
23863 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23864 fi
23865 echo "$as_me:23865: result: $ac_cv_type_pid_t" >&5
23866 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
23867 if test "$ac_cv_type_pid_t" = yes; then
23868   :
23869 else
23870
23871 cat >>confdefs.h <<EOF
23872 #define pid_t int
23873 EOF
23874
23875 fi
23876
23877 for ac_header in unistd.h vfork.h
23878 do
23879 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23880 echo "$as_me:23880: checking for $ac_header" >&5
23881 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23882 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23883   echo $ECHO_N "(cached) $ECHO_C" >&6
23884 else
23885   cat >"conftest.$ac_ext" <<_ACEOF
23886 #line 23886 "configure"
23887 #include "confdefs.h"
23888 #include <$ac_header>
23889 _ACEOF
23890 if { (eval echo "$as_me:23890: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23891   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23892   ac_status=$?
23893   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23894   rm -f conftest.er1
23895   cat conftest.err >&5
23896   echo "$as_me:23896: \$? = $ac_status" >&5
23897   (exit "$ac_status"); } >/dev/null; then
23898   if test -s conftest.err; then
23899     ac_cpp_err=$ac_c_preproc_warn_flag
23900   else
23901     ac_cpp_err=
23902   fi
23903 else
23904   ac_cpp_err=yes
23905 fi
23906 if test -z "$ac_cpp_err"; then
23907   eval "$as_ac_Header=yes"
23908 else
23909   echo "$as_me: failed program was:" >&5
23910   cat "conftest.$ac_ext" >&5
23911   eval "$as_ac_Header=no"
23912 fi
23913 rm -f conftest.err "conftest.$ac_ext"
23914 fi
23915 echo "$as_me:23915: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23916 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23917 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23918   cat >>confdefs.h <<EOF
23919 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23920 EOF
23921
23922 fi
23923 done
23924
23925 for ac_func in fork vfork
23926 do
23927 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23928 echo "$as_me:23928: checking for $ac_func" >&5
23929 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23930 if eval "test \"\${$as_ac_var+set}\" = set"; then
23931   echo $ECHO_N "(cached) $ECHO_C" >&6
23932 else
23933   cat >"conftest.$ac_ext" <<_ACEOF
23934 #line 23934 "configure"
23935 #include "confdefs.h"
23936 #define $ac_func autoconf_temporary
23937 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23938 #undef $ac_func
23939
23940 #ifdef __cplusplus
23941 extern "C"
23942 #endif
23943
23944 /* We use char because int might match the return type of a gcc2
23945    builtin and then its argument prototype would still apply.  */
23946 char $ac_func (void);
23947
23948 int
23949 main (void)
23950 {
23951
23952 /* The GNU C library defines stubs for functions which it implements
23953     to always fail with ENOSYS.  Some functions are actually named
23954     something starting with __ and the normal name is an alias.  */
23955 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23956 #error found stub for $ac_func
23957 #endif
23958
23959         return $ac_func ();
23960   ;
23961   return 0;
23962 }
23963 _ACEOF
23964 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23965 if { (eval echo "$as_me:23965: \"$ac_link\"") >&5
23966   (eval $ac_link) 2>&5
23967   ac_status=$?
23968   echo "$as_me:23968: \$? = $ac_status" >&5
23969   (exit "$ac_status"); } &&
23970          { ac_try='test -s "conftest$ac_exeext"'
23971   { (eval echo "$as_me:23971: \"$ac_try\"") >&5
23972   (eval $ac_try) 2>&5
23973   ac_status=$?
23974   echo "$as_me:23974: \$? = $ac_status" >&5
23975   (exit "$ac_status"); }; }; then
23976   eval "$as_ac_var=yes"
23977 else
23978   echo "$as_me: failed program was:" >&5
23979 cat "conftest.$ac_ext" >&5
23980 eval "$as_ac_var=no"
23981 fi
23982 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23983 fi
23984 echo "$as_me:23984: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23985 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23986 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23987   cat >>confdefs.h <<EOF
23988 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23989 EOF
23990
23991 fi
23992 done
23993
23994 ac_cv_func_fork_works=$ac_cv_func_fork
23995 if test "x$ac_cv_func_fork" = xyes; then
23996   echo "$as_me:23996: checking for working fork" >&5
23997 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23998 if test "${ac_cv_func_fork_works+set}" = set; then
23999   echo $ECHO_N "(cached) $ECHO_C" >&6
24000 else
24001   if test "$cross_compiling" = yes; then
24002   ac_cv_func_fork_works=cross
24003 else
24004   cat >"conftest.$ac_ext" <<_ACEOF
24005 /* By Rüdiger Kuhlmann. */
24006       #include <sys/types.h>
24007       #if HAVE_UNISTD_H
24008       # include <unistd.h>
24009       #endif
24010       /* Some systems only have a dummy stub for fork() */
24011       int main (void)
24012       {
24013         if (fork() < 0)
24014           $ac_main_return (1);
24015         $ac_main_return (0);
24016       }
24017 _ACEOF
24018 rm -f "conftest$ac_exeext"
24019 if { (eval echo "$as_me:24019: \"$ac_link\"") >&5
24020   (eval $ac_link) 2>&5
24021   ac_status=$?
24022   echo "$as_me:24022: \$? = $ac_status" >&5
24023   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24024   { (eval echo "$as_me:24024: \"$ac_try\"") >&5
24025   (eval $ac_try) 2>&5
24026   ac_status=$?
24027   echo "$as_me:24027: \$? = $ac_status" >&5
24028   (exit "$ac_status"); }; }; then
24029   ac_cv_func_fork_works=yes
24030 else
24031   echo "$as_me: program exited with status $ac_status" >&5
24032 echo "$as_me: failed program was:" >&5
24033 cat "conftest.$ac_ext" >&5
24034 ac_cv_func_fork_works=no
24035 fi
24036 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24037 fi
24038 fi
24039 echo "$as_me:24039: result: $ac_cv_func_fork_works" >&5
24040 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
24041
24042 fi
24043 if test "x$ac_cv_func_fork_works" = xcross; then
24044   case $host in
24045     *-*-amigaos* | *-*-msdosdjgpp*)
24046       # Override, as these systems have only a dummy fork() stub
24047       ac_cv_func_fork_works=no
24048       ;;
24049     *)
24050       ac_cv_func_fork_works=yes
24051       ;;
24052   esac
24053   { echo "$as_me:24053: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
24054 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
24055 fi
24056 ac_cv_func_vfork_works=$ac_cv_func_vfork
24057 if test "x$ac_cv_func_vfork" = xyes; then
24058   echo "$as_me:24058: checking for working vfork" >&5
24059 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
24060 if test "${ac_cv_func_vfork_works+set}" = set; then
24061   echo $ECHO_N "(cached) $ECHO_C" >&6
24062 else
24063   if test "$cross_compiling" = yes; then
24064   ac_cv_func_vfork_works=cross
24065 else
24066   cat >"conftest.$ac_ext" <<_ACEOF
24067 #line 24067 "configure"
24068 #include "confdefs.h"
24069 /* Thanks to Paul Eggert for this test.  */
24070 #include <stdio.h>
24071 #include <sys/types.h>
24072 #include <sys/stat.h>
24073 #if HAVE_UNISTD_H
24074 # include <unistd.h>
24075 #endif
24076 #if HAVE_VFORK_H
24077 # include <vfork.h>
24078 #endif
24079 /* On some sparc systems, changes by the child to local and incoming
24080    argument registers are propagated back to the parent.  The compiler
24081    is told about this with #include <vfork.h>, but some compilers
24082    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
24083    static variable whose address is put into a register that is
24084    clobbered by the vfork.  */
24085 static
24086 sparc_address_test (int arg)
24087 {
24088   static pid_t child;
24089   if (!child) {
24090     child = vfork ();
24091     if (child < 0) {
24092       perror ("vfork");
24093       _exit(2);
24094     }
24095     if (!child) {
24096       arg = getpid();
24097       write(-1, "", 0);
24098       _exit (arg);
24099     }
24100   }
24101 }
24102
24103 int
24104 main (void)
24105 {
24106   pid_t parent = getpid ();
24107   pid_t child;
24108
24109   sparc_address_test ();
24110
24111   child = vfork ();
24112
24113   if (child == 0) {
24114     /* Here is another test for sparc vfork register problems.  This
24115        test uses lots of local variables, at least as many local
24116        variables as main has allocated so far including compiler
24117        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
24118        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
24119        reuse the register of parent for one of the local variables,
24120        since it will think that parent can't possibly be used any more
24121        in this routine.  Assigning to the local variable will thus
24122        munge parent in the parent process.  */
24123     pid_t
24124       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
24125       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
24126     /* Convince the compiler that p..p7 are live; otherwise, it might
24127        use the same hardware register for all 8 local variables.  */
24128     if (p != p1 || p != p2 || p != p3 || p != p4
24129         || p != p5 || p != p6 || p != p7)
24130       _exit(1);
24131
24132     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
24133        from child file descriptors.  If the child closes a descriptor
24134        before it execs or exits, this munges the parent's descriptor
24135        as well.  Test for this by closing stdout in the child.  */
24136     _exit(close(fileno(stdout)) != 0);
24137   } else {
24138     int status;
24139     struct stat st;
24140
24141     while (wait(&status) != child)
24142       ;
24143     $ac_main_return(
24144          /* Was there some problem with vforking?  */
24145          child < 0
24146
24147          /* Did the child fail?  (This shouldn't happen.)  */
24148          || status
24149
24150          /* Did the vfork/compiler bug occur?  */
24151          || parent != getpid()
24152
24153          /* Did the file descriptor bug occur?  */
24154          || fstat(fileno(stdout), &st) != 0
24155          );
24156   }
24157 }
24158 _ACEOF
24159 rm -f "conftest$ac_exeext"
24160 if { (eval echo "$as_me:24160: \"$ac_link\"") >&5
24161   (eval $ac_link) 2>&5
24162   ac_status=$?
24163   echo "$as_me:24163: \$? = $ac_status" >&5
24164   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24165   { (eval echo "$as_me:24165: \"$ac_try\"") >&5
24166   (eval $ac_try) 2>&5
24167   ac_status=$?
24168   echo "$as_me:24168: \$? = $ac_status" >&5
24169   (exit "$ac_status"); }; }; then
24170   ac_cv_func_vfork_works=yes
24171 else
24172   echo "$as_me: program exited with status $ac_status" >&5
24173 echo "$as_me: failed program was:" >&5
24174 cat "conftest.$ac_ext" >&5
24175 ac_cv_func_vfork_works=no
24176 fi
24177 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24178 fi
24179 fi
24180 echo "$as_me:24180: result: $ac_cv_func_vfork_works" >&5
24181 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
24182
24183 fi;
24184 if test "x$ac_cv_func_fork_works" = xcross; then
24185   ac_cv_func_vfork_works=ac_cv_func_vfork
24186   { echo "$as_me:24186: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
24187 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
24188 fi
24189
24190 if test "x$ac_cv_func_vfork_works" = xyes; then
24191
24192 cat >>confdefs.h <<\EOF
24193 #define HAVE_WORKING_VFORK 1
24194 EOF
24195
24196 else
24197
24198 cat >>confdefs.h <<\EOF
24199 #define vfork fork
24200 EOF
24201
24202 fi
24203 if test "x$ac_cv_func_fork_works" = xyes; then
24204
24205 cat >>confdefs.h <<\EOF
24206 #define HAVE_WORKING_FORK 1
24207 EOF
24208
24209 fi
24210
24211 echo "$as_me:24211: checking if fopen accepts explicit binary mode" >&5
24212 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
24213 if test "${cf_cv_fopen_bin_r+set}" = set; then
24214   echo $ECHO_N "(cached) $ECHO_C" >&6
24215 else
24216
24217         if test "$cross_compiling" = yes; then
24218   cf_cv_fopen_bin_r=unknown
24219 else
24220   cat >"conftest.$ac_ext" <<_ACEOF
24221 #line 24221 "configure"
24222 #include "confdefs.h"
24223
24224 $ac_includes_default
24225
24226 int main(void)
24227 {
24228         FILE *fp = fopen("conftest.tmp", "wb");
24229         int rc = 0;
24230         if (fp != 0) {
24231                 int p, q;
24232                 for (p = 0; p < 256; ++p) {
24233                         fputc(p, fp);
24234                 }
24235                 fclose(fp);
24236                 fp = fopen("conftest.tmp", "rb");
24237                 if (fp != 0) {
24238                         for (p = 0; p < 256; ++p) {
24239                                 q = fgetc(fp);
24240                                 if (q != p) {
24241                                         rc = 1;
24242                                         break;
24243                                 }
24244                         }
24245                 } else {
24246                         rc = 1;
24247                 }
24248         } else {
24249                 rc = 1;
24250         }
24251         ${cf_cv_main_return:-return} (rc);
24252 }
24253
24254 _ACEOF
24255 rm -f "conftest$ac_exeext"
24256 if { (eval echo "$as_me:24256: \"$ac_link\"") >&5
24257   (eval $ac_link) 2>&5
24258   ac_status=$?
24259   echo "$as_me:24259: \$? = $ac_status" >&5
24260   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24261   { (eval echo "$as_me:24261: \"$ac_try\"") >&5
24262   (eval $ac_try) 2>&5
24263   ac_status=$?
24264   echo "$as_me:24264: \$? = $ac_status" >&5
24265   (exit "$ac_status"); }; }; then
24266   cf_cv_fopen_bin_r=yes
24267 else
24268   echo "$as_me: program exited with status $ac_status" >&5
24269 echo "$as_me: failed program was:" >&5
24270 cat "conftest.$ac_ext" >&5
24271 cf_cv_fopen_bin_r=no
24272 fi
24273 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24274 fi
24275
24276 fi
24277 echo "$as_me:24277: result: $cf_cv_fopen_bin_r" >&5
24278 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
24279 test "x$cf_cv_fopen_bin_r" != xno &&
24280 cat >>confdefs.h <<\EOF
24281 #define USE_FOPEN_BIN_R 1
24282 EOF
24283
24284 # special check for test/ditto.c
24285
24286 echo "$as_me:24286: checking for openpty in -lutil" >&5
24287 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
24288 if test "${ac_cv_lib_util_openpty+set}" = set; then
24289   echo $ECHO_N "(cached) $ECHO_C" >&6
24290 else
24291   ac_check_lib_save_LIBS=$LIBS
24292 LIBS="-lutil  $LIBS"
24293 cat >"conftest.$ac_ext" <<_ACEOF
24294 #line 24294 "configure"
24295 #include "confdefs.h"
24296
24297 /* Override any gcc2 internal prototype to avoid an error.  */
24298 #ifdef __cplusplus
24299 extern "C"
24300 #endif
24301 /* We use char because int might match the return type of a gcc2
24302    builtin and then its argument prototype would still apply.  */
24303 char openpty ();
24304 int
24305 main (void)
24306 {
24307 openpty ();
24308   ;
24309   return 0;
24310 }
24311 _ACEOF
24312 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24313 if { (eval echo "$as_me:24313: \"$ac_link\"") >&5
24314   (eval $ac_link) 2>&5
24315   ac_status=$?
24316   echo "$as_me:24316: \$? = $ac_status" >&5
24317   (exit "$ac_status"); } &&
24318          { ac_try='test -s "conftest$ac_exeext"'
24319   { (eval echo "$as_me:24319: \"$ac_try\"") >&5
24320   (eval $ac_try) 2>&5
24321   ac_status=$?
24322   echo "$as_me:24322: \$? = $ac_status" >&5
24323   (exit "$ac_status"); }; }; then
24324   ac_cv_lib_util_openpty=yes
24325 else
24326   echo "$as_me: failed program was:" >&5
24327 cat "conftest.$ac_ext" >&5
24328 ac_cv_lib_util_openpty=no
24329 fi
24330 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24331 LIBS=$ac_check_lib_save_LIBS
24332 fi
24333 echo "$as_me:24333: result: $ac_cv_lib_util_openpty" >&5
24334 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
24335 if test "$ac_cv_lib_util_openpty" = yes; then
24336   cf_cv_lib_util=yes
24337 else
24338   cf_cv_lib_util=no
24339 fi
24340
24341 echo "$as_me:24341: checking for openpty header" >&5
24342 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
24343 if test "${cf_cv_func_openpty+set}" = set; then
24344   echo $ECHO_N "(cached) $ECHO_C" >&6
24345 else
24346
24347         cf_save_LIBS="$LIBS"
24348         test "$cf_cv_lib_util" = yes && {
24349 cf_add_libs="$LIBS"
24350 # reverse order
24351 cf_add_0lib=
24352 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24353 # filter duplicates
24354 for cf_add_1lib in $cf_add_0lib; do
24355         for cf_add_2lib in $cf_add_libs; do
24356                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24357                         cf_add_1lib=
24358                         break
24359                 fi
24360         done
24361         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24362 done
24363 LIBS="$cf_add_libs"
24364  }
24365         for cf_header in pty.h libutil.h util.h
24366         do
24367         cat >"conftest.$ac_ext" <<_ACEOF
24368 #line 24368 "configure"
24369 #include "confdefs.h"
24370
24371 #include <$cf_header>
24372
24373 int
24374 main (void)
24375 {
24376
24377         int x = openpty((int *)0, (int *)0, (char *)0,
24378                                    (struct termios *)0, (struct winsize *)0);
24379
24380   ;
24381   return 0;
24382 }
24383 _ACEOF
24384 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24385 if { (eval echo "$as_me:24385: \"$ac_link\"") >&5
24386   (eval $ac_link) 2>&5
24387   ac_status=$?
24388   echo "$as_me:24388: \$? = $ac_status" >&5
24389   (exit "$ac_status"); } &&
24390          { ac_try='test -s "conftest$ac_exeext"'
24391   { (eval echo "$as_me:24391: \"$ac_try\"") >&5
24392   (eval $ac_try) 2>&5
24393   ac_status=$?
24394   echo "$as_me:24394: \$? = $ac_status" >&5
24395   (exit "$ac_status"); }; }; then
24396
24397                 cf_cv_func_openpty=$cf_header
24398                 break
24399
24400 else
24401   echo "$as_me: failed program was:" >&5
24402 cat "conftest.$ac_ext" >&5
24403
24404                 cf_cv_func_openpty=no
24405
24406 fi
24407 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24408         done
24409         LIBS="$cf_save_LIBS"
24410
24411 fi
24412 echo "$as_me:24412: result: $cf_cv_func_openpty" >&5
24413 echo "${ECHO_T}$cf_cv_func_openpty" >&6
24414
24415 if test "$cf_cv_func_openpty" != no ; then
24416
24417 cat >>confdefs.h <<EOF
24418 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
24419 EOF
24420
24421 cat >>confdefs.h <<\EOF
24422 #define USE_XTERM_PTY 1
24423 EOF
24424
24425         if test "x$cf_cv_lib_util" = xyes ; then
24426
24427 cf_add_libs="$TEST_LIBS"
24428 # reverse order
24429 cf_add_0lib=
24430 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24431 # filter duplicates
24432 for cf_add_1lib in $cf_add_0lib; do
24433         for cf_add_2lib in $cf_add_libs; do
24434                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24435                         cf_add_1lib=
24436                         break
24437                 fi
24438         done
24439         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24440 done
24441 TEST_LIBS="$cf_add_libs"
24442
24443         fi
24444 fi
24445
24446 if test "$with_hashed_db" != no ; then
24447
24448 cat >>confdefs.h <<\EOF
24449 #define USE_HASHED_DB 1
24450 EOF
24451
24452 case $with_hashed_db in
24453 (yes|*able*)
24454         ;;
24455 (*)
24456         if test -d "$with_hashed_db" ; then
24457
24458 if test -n "$with_hashed_db/include" ; then
24459   for cf_add_incdir in $with_hashed_db/include
24460   do
24461         while test "$cf_add_incdir" != /usr/include
24462         do
24463           if test -d "$cf_add_incdir"
24464           then
24465                 cf_have_incdir=no
24466                 if test -n "$CFLAGS$CPPFLAGS" ; then
24467                   # a loop is needed to ensure we can add subdirs of existing dirs
24468                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24469                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24470                           cf_have_incdir=yes; break
24471                         fi
24472                   done
24473                 fi
24474
24475                 if test "$cf_have_incdir" = no ; then
24476                   if test "$cf_add_incdir" = /usr/local/include ; then
24477                         if test "$GCC" = yes
24478                         then
24479                           cf_save_CPPFLAGS=$CPPFLAGS
24480
24481         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24482         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24483
24484                           cat >"conftest.$ac_ext" <<_ACEOF
24485 #line 24485 "configure"
24486 #include "confdefs.h"
24487 #include <stdio.h>
24488 int
24489 main (void)
24490 {
24491 printf("Hello")
24492   ;
24493   return 0;
24494 }
24495 _ACEOF
24496 rm -f "conftest.$ac_objext"
24497 if { (eval echo "$as_me:24497: \"$ac_compile\"") >&5
24498   (eval $ac_compile) 2>&5
24499   ac_status=$?
24500   echo "$as_me:24500: \$? = $ac_status" >&5
24501   (exit "$ac_status"); } &&
24502          { ac_try='test -s "conftest.$ac_objext"'
24503   { (eval echo "$as_me:24503: \"$ac_try\"") >&5
24504   (eval $ac_try) 2>&5
24505   ac_status=$?
24506   echo "$as_me:24506: \$? = $ac_status" >&5
24507   (exit "$ac_status"); }; }; then
24508   :
24509 else
24510   echo "$as_me: failed program was:" >&5
24511 cat "conftest.$ac_ext" >&5
24512 cf_have_incdir=yes
24513 fi
24514 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24515                           CPPFLAGS=$cf_save_CPPFLAGS
24516                         fi
24517                   fi
24518                 fi
24519
24520                 if test "$cf_have_incdir" = no ; then
24521                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24522
24523 echo "${as_me:-configure}:24523: testing adding $cf_add_incdir to include-path ..." 1>&5
24524
24525                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24526
24527                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24528                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24529                   cf_add_incdir="$cf_top_incdir"
24530                 else
24531                   break
24532                 fi
24533           else
24534                 break
24535           fi
24536         done
24537   done
24538 fi
24539
24540 if test -n "$with_hashed_db/lib" ; then
24541         for cf_add_libdir in $with_hashed_db/lib
24542         do
24543                 if test "$cf_add_libdir" = /usr/lib ; then
24544                         :
24545                 elif test -d "$cf_add_libdir"
24546                 then
24547                         cf_have_libdir=no
24548                         if test -n "$LDFLAGS$LIBS" ; then
24549                                 # a loop is needed to ensure we can add subdirs of existing dirs
24550                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24551                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24552                                                 cf_have_libdir=yes; break
24553                                         fi
24554                                 done
24555                         fi
24556                         if test "$cf_have_libdir" = no ; then
24557                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24558
24559 echo "${as_me:-configure}:24559: testing adding $cf_add_libdir to library-path ..." 1>&5
24560
24561                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24562                         fi
24563                 fi
24564         done
24565 fi
24566
24567         else
24568                 case "$with_hashed_db" in
24569                 (./*|../*|/*)
24570                         { echo "$as_me:24570: WARNING: no such directory $with_hashed_db" >&5
24571 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
24572                         ;;
24573                 (*)
24574
24575 cf_search=
24576
24577 test "x$prefix" != "xNONE" && \
24578 test -d "$prefix" && \
24579  {
24580         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
24581         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
24582         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
24583         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
24584         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
24585         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
24586 }
24587
24588 for cf_subdir_prefix in \
24589         /usr \
24590         /usr/local \
24591         /usr/pkg \
24592         /opt \
24593         /opt/local \
24594         $HOME
24595 do
24596
24597 test "x$cf_subdir_prefix" != "x$prefix" && \
24598 test -d "$cf_subdir_prefix" && \
24599 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24600         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
24601         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
24602         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
24603         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
24604         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
24605         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"
24606 }
24607
24608 done
24609
24610         for cf_item in $cf_search
24611         do
24612                 case "$cf_item" in
24613                 (*/$with_hashed_db)
24614
24615 if test -n "$cf_item" ; then
24616   for cf_add_incdir in $cf_item
24617   do
24618         while test "$cf_add_incdir" != /usr/include
24619         do
24620           if test -d "$cf_add_incdir"
24621           then
24622                 cf_have_incdir=no
24623                 if test -n "$CFLAGS$CPPFLAGS" ; then
24624                   # a loop is needed to ensure we can add subdirs of existing dirs
24625                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24626                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24627                           cf_have_incdir=yes; break
24628                         fi
24629                   done
24630                 fi
24631
24632                 if test "$cf_have_incdir" = no ; then
24633                   if test "$cf_add_incdir" = /usr/local/include ; then
24634                         if test "$GCC" = yes
24635                         then
24636                           cf_save_CPPFLAGS=$CPPFLAGS
24637
24638         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24639         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24640
24641                           cat >"conftest.$ac_ext" <<_ACEOF
24642 #line 24642 "configure"
24643 #include "confdefs.h"
24644 #include <stdio.h>
24645 int
24646 main (void)
24647 {
24648 printf("Hello")
24649   ;
24650   return 0;
24651 }
24652 _ACEOF
24653 rm -f "conftest.$ac_objext"
24654 if { (eval echo "$as_me:24654: \"$ac_compile\"") >&5
24655   (eval $ac_compile) 2>&5
24656   ac_status=$?
24657   echo "$as_me:24657: \$? = $ac_status" >&5
24658   (exit "$ac_status"); } &&
24659          { ac_try='test -s "conftest.$ac_objext"'
24660   { (eval echo "$as_me:24660: \"$ac_try\"") >&5
24661   (eval $ac_try) 2>&5
24662   ac_status=$?
24663   echo "$as_me:24663: \$? = $ac_status" >&5
24664   (exit "$ac_status"); }; }; then
24665   :
24666 else
24667   echo "$as_me: failed program was:" >&5
24668 cat "conftest.$ac_ext" >&5
24669 cf_have_incdir=yes
24670 fi
24671 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24672                           CPPFLAGS=$cf_save_CPPFLAGS
24673                         fi
24674                   fi
24675                 fi
24676
24677                 if test "$cf_have_incdir" = no ; then
24678                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24679
24680 echo "${as_me:-configure}:24680: testing adding $cf_add_incdir to include-path ..." 1>&5
24681
24682                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24683
24684                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24685                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24686                   cf_add_incdir="$cf_top_incdir"
24687                 else
24688                   break
24689                 fi
24690           else
24691                 break
24692           fi
24693         done
24694   done
24695 fi
24696
24697                         ;;
24698                 esac
24699         done
24700
24701 cf_search=
24702
24703 test "x$prefix" != "xNONE" && \
24704 test -d "$prefix" && \
24705  {
24706         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
24707         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
24708         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
24709         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
24710         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
24711         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
24712 }
24713
24714 for cf_subdir_prefix in \
24715         /usr \
24716         /usr/local \
24717         /usr/pkg \
24718         /opt \
24719         /opt/local \
24720         $HOME
24721 do
24722
24723 test "x$cf_subdir_prefix" != "x$prefix" && \
24724 test -d "$cf_subdir_prefix" && \
24725 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24726         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
24727         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
24728         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
24729         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
24730         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
24731         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"
24732 }
24733
24734 done
24735
24736         for cf_item in $cf_search
24737         do
24738                 case "$cf_item" in
24739                 (*/$with_hashed_db)
24740
24741 if test -n "$cf_item" ; then
24742         for cf_add_libdir in $cf_item
24743         do
24744                 if test "$cf_add_libdir" = /usr/lib ; then
24745                         :
24746                 elif test -d "$cf_add_libdir"
24747                 then
24748                         cf_have_libdir=no
24749                         if test -n "$LDFLAGS$LIBS" ; then
24750                                 # a loop is needed to ensure we can add subdirs of existing dirs
24751                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24752                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24753                                                 cf_have_libdir=yes; break
24754                                         fi
24755                                 done
24756                         fi
24757                         if test "$cf_have_libdir" = no ; then
24758                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24759
24760 echo "${as_me:-configure}:24760: testing adding $cf_add_libdir to library-path ..." 1>&5
24761
24762                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24763                         fi
24764                 fi
24765         done
24766 fi
24767
24768                         ;;
24769                 esac
24770         done
24771
24772                         ;;
24773                 esac
24774         fi
24775 esac
24776
24777 echo "$as_me:24777: checking for db.h" >&5
24778 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
24779 if test "${ac_cv_header_db_h+set}" = set; then
24780   echo $ECHO_N "(cached) $ECHO_C" >&6
24781 else
24782   cat >"conftest.$ac_ext" <<_ACEOF
24783 #line 24783 "configure"
24784 #include "confdefs.h"
24785 #include <db.h>
24786 _ACEOF
24787 if { (eval echo "$as_me:24787: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24788   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24789   ac_status=$?
24790   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24791   rm -f conftest.er1
24792   cat conftest.err >&5
24793   echo "$as_me:24793: \$? = $ac_status" >&5
24794   (exit "$ac_status"); } >/dev/null; then
24795   if test -s conftest.err; then
24796     ac_cpp_err=$ac_c_preproc_warn_flag
24797   else
24798     ac_cpp_err=
24799   fi
24800 else
24801   ac_cpp_err=yes
24802 fi
24803 if test -z "$ac_cpp_err"; then
24804   ac_cv_header_db_h=yes
24805 else
24806   echo "$as_me: failed program was:" >&5
24807   cat "conftest.$ac_ext" >&5
24808   ac_cv_header_db_h=no
24809 fi
24810 rm -f conftest.err "conftest.$ac_ext"
24811 fi
24812 echo "$as_me:24812: result: $ac_cv_header_db_h" >&5
24813 echo "${ECHO_T}$ac_cv_header_db_h" >&6
24814 if test "$ac_cv_header_db_h" = yes; then
24815
24816 echo "$as_me:24816: checking for version of db" >&5
24817 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
24818 if test "${cf_cv_hashed_db_version+set}" = set; then
24819   echo $ECHO_N "(cached) $ECHO_C" >&6
24820 else
24821
24822 cf_cv_hashed_db_version=unknown
24823
24824 for cf_db_version in 1 2 3 4 5 6
24825 do
24826
24827 echo "${as_me:-configure}:24827: testing checking for db version $cf_db_version ..." 1>&5
24828
24829         cat >"conftest.$ac_ext" <<_ACEOF
24830 #line 24830 "configure"
24831 #include "confdefs.h"
24832
24833 $ac_includes_default
24834 #include <db.h>
24835
24836 #ifdef DB_VERSION_MAJOR
24837         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
24838 #if $cf_db_version == DB_VERSION_MAJOR
24839         /* ok */
24840 #else
24841         #error $cf_db_version is not DB_VERSION_MAJOR
24842 #endif
24843 #else
24844 #if $cf_db_version == 1
24845         /* ok: assuming this is DB 1.8.5 */
24846 #else
24847         #error $cf_db_version is not 1
24848 #endif
24849 #endif
24850
24851 int
24852 main (void)
24853 {
24854 DBT *foo = 0
24855   ;
24856   return 0;
24857 }
24858 _ACEOF
24859 rm -f "conftest.$ac_objext"
24860 if { (eval echo "$as_me:24860: \"$ac_compile\"") >&5
24861   (eval $ac_compile) 2>&5
24862   ac_status=$?
24863   echo "$as_me:24863: \$? = $ac_status" >&5
24864   (exit "$ac_status"); } &&
24865          { ac_try='test -s "conftest.$ac_objext"'
24866   { (eval echo "$as_me:24866: \"$ac_try\"") >&5
24867   (eval $ac_try) 2>&5
24868   ac_status=$?
24869   echo "$as_me:24869: \$? = $ac_status" >&5
24870   (exit "$ac_status"); }; }; then
24871
24872         cf_cv_hashed_db_version=$cf_db_version
24873         break
24874
24875 else
24876   echo "$as_me: failed program was:" >&5
24877 cat "conftest.$ac_ext" >&5
24878 fi
24879 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24880 done
24881
24882 fi
24883 echo "$as_me:24883: result: $cf_cv_hashed_db_version" >&5
24884 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
24885
24886 if test "$cf_cv_hashed_db_version" = unknown ; then
24887         { { echo "$as_me:24887: error: Cannot determine version of db" >&5
24888 echo "$as_me: error: Cannot determine version of db" >&2;}
24889    { (exit 1); exit 1; }; }
24890 else
24891
24892 echo "$as_me:24892: checking for db libraries" >&5
24893 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
24894 if test "${cf_cv_hashed_db_libs+set}" = set; then
24895   echo $ECHO_N "(cached) $ECHO_C" >&6
24896 else
24897
24898 cf_cv_hashed_db_libs=unknown
24899 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
24900 do
24901         cf_save_libs="$LIBS"
24902         if test -n "$cf_db_libs"; then
24903
24904 cf_add_libs="$LIBS"
24905 # reverse order
24906 cf_add_0lib=
24907 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24908 # filter duplicates
24909 for cf_add_1lib in $cf_add_0lib; do
24910         for cf_add_2lib in $cf_add_libs; do
24911                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24912                         cf_add_1lib=
24913                         break
24914                 fi
24915         done
24916         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24917 done
24918 LIBS="$cf_add_libs"
24919
24920         fi
24921
24922 echo "${as_me:-configure}:24922: testing checking for library $cf_db_libs ..." 1>&5
24923
24924         cat >"conftest.$ac_ext" <<_ACEOF
24925 #line 24925 "configure"
24926 #include "confdefs.h"
24927
24928 $ac_includes_default
24929 #include <db.h>
24930
24931 int
24932 main (void)
24933 {
24934
24935         char *path = "/tmp/foo";
24936 #ifdef DB_VERSION_MAJOR
24937 #if DB_VERSION_MAJOR >= 4
24938         DB *result = 0;
24939         db_create(&result, NULL, 0);
24940         result->open(result,
24941                 NULL,
24942                 path,
24943                 path,
24944                 DB_HASH,
24945                 DB_CREATE,
24946                 0644);
24947 #elif DB_VERSION_MAJOR >= 3
24948         DB *result = 0;
24949         db_create(&result, NULL, 0);
24950         result->open(result,
24951                 path,
24952                 path,
24953                 DB_HASH,
24954                 DB_CREATE,
24955                 0644);
24956 #elif DB_VERSION_MAJOR >= 2
24957         DB *result = 0;
24958         db_open(path,
24959                 DB_HASH,
24960                 DB_CREATE,
24961                 0644,
24962                 (DB_ENV *) 0,
24963                 (DB_INFO *) 0,
24964                 &result);
24965 #endif /* DB_VERSION_MAJOR */
24966 #else
24967         DB *result = dbopen(path,
24968                      2,
24969                      0644,
24970                      DB_HASH,
24971                      0);
24972 #endif
24973         ${cf_cv_main_return:-return}(result != 0)
24974
24975   ;
24976   return 0;
24977 }
24978 _ACEOF
24979 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24980 if { (eval echo "$as_me:24980: \"$ac_link\"") >&5
24981   (eval $ac_link) 2>&5
24982   ac_status=$?
24983   echo "$as_me:24983: \$? = $ac_status" >&5
24984   (exit "$ac_status"); } &&
24985          { ac_try='test -s "conftest$ac_exeext"'
24986   { (eval echo "$as_me:24986: \"$ac_try\"") >&5
24987   (eval $ac_try) 2>&5
24988   ac_status=$?
24989   echo "$as_me:24989: \$? = $ac_status" >&5
24990   (exit "$ac_status"); }; }; then
24991
24992         if test -n "$cf_db_libs" ; then
24993                 cf_cv_hashed_db_libs=$cf_db_libs
24994         else
24995                 cf_cv_hashed_db_libs=default
24996         fi
24997         LIBS="$cf_save_libs"
24998         break
24999
25000 else
25001   echo "$as_me: failed program was:" >&5
25002 cat "conftest.$ac_ext" >&5
25003 fi
25004 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25005         LIBS="$cf_save_libs"
25006 done
25007
25008 fi
25009 echo "$as_me:25009: result: $cf_cv_hashed_db_libs" >&5
25010 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
25011
25012         if test "$cf_cv_hashed_db_libs" = unknown ; then
25013                 { { echo "$as_me:25013: error: Cannot determine library for db" >&5
25014 echo "$as_me: error: Cannot determine library for db" >&2;}
25015    { (exit 1); exit 1; }; }
25016         elif test "$cf_cv_hashed_db_libs" != default ; then
25017
25018 cf_add_libs="$LIBS"
25019 # reverse order
25020 cf_add_0lib=
25021 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25022 # filter duplicates
25023 for cf_add_1lib in $cf_add_0lib; do
25024         for cf_add_2lib in $cf_add_libs; do
25025                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25026                         cf_add_1lib=
25027                         break
25028                 fi
25029         done
25030         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25031 done
25032 LIBS="$cf_add_libs"
25033
25034         fi
25035 fi
25036
25037 else
25038
25039         { { echo "$as_me:25039: error: Cannot find db.h" >&5
25040 echo "$as_me: error: Cannot find db.h" >&2;}
25041    { (exit 1); exit 1; }; }
25042
25043 fi
25044
25045 fi
25046
25047 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
25048         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
25049         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
25050 fi
25051
25052 # Just in case, check if the C compiler has a bool type.
25053
25054 echo "$as_me:25054: checking if we should include stdbool.h" >&5
25055 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25056
25057 if test "${cf_cv_header_stdbool_h+set}" = set; then
25058   echo $ECHO_N "(cached) $ECHO_C" >&6
25059 else
25060
25061         cat >"conftest.$ac_ext" <<_ACEOF
25062 #line 25062 "configure"
25063 #include "confdefs.h"
25064
25065 int
25066 main (void)
25067 {
25068 bool foo = false
25069   ;
25070   return 0;
25071 }
25072 _ACEOF
25073 rm -f "conftest.$ac_objext"
25074 if { (eval echo "$as_me:25074: \"$ac_compile\"") >&5
25075   (eval $ac_compile) 2>&5
25076   ac_status=$?
25077   echo "$as_me:25077: \$? = $ac_status" >&5
25078   (exit "$ac_status"); } &&
25079          { ac_try='test -s "conftest.$ac_objext"'
25080   { (eval echo "$as_me:25080: \"$ac_try\"") >&5
25081   (eval $ac_try) 2>&5
25082   ac_status=$?
25083   echo "$as_me:25083: \$? = $ac_status" >&5
25084   (exit "$ac_status"); }; }; then
25085   cf_cv_header_stdbool_h=0
25086 else
25087   echo "$as_me: failed program was:" >&5
25088 cat "conftest.$ac_ext" >&5
25089 cat >"conftest.$ac_ext" <<_ACEOF
25090 #line 25090 "configure"
25091 #include "confdefs.h"
25092
25093 #ifndef __BEOS__
25094 #include <stdbool.h>
25095 #endif
25096
25097 int
25098 main (void)
25099 {
25100 bool foo = false
25101   ;
25102   return 0;
25103 }
25104 _ACEOF
25105 rm -f "conftest.$ac_objext"
25106 if { (eval echo "$as_me:25106: \"$ac_compile\"") >&5
25107   (eval $ac_compile) 2>&5
25108   ac_status=$?
25109   echo "$as_me:25109: \$? = $ac_status" >&5
25110   (exit "$ac_status"); } &&
25111          { ac_try='test -s "conftest.$ac_objext"'
25112   { (eval echo "$as_me:25112: \"$ac_try\"") >&5
25113   (eval $ac_try) 2>&5
25114   ac_status=$?
25115   echo "$as_me:25115: \$? = $ac_status" >&5
25116   (exit "$ac_status"); }; }; then
25117   cf_cv_header_stdbool_h=1
25118 else
25119   echo "$as_me: failed program was:" >&5
25120 cat "conftest.$ac_ext" >&5
25121 cf_cv_header_stdbool_h=0
25122 fi
25123 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25124 fi
25125 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25126 fi
25127
25128 if test "$cf_cv_header_stdbool_h" = 1
25129 then    echo "$as_me:25129: result: yes" >&5
25130 echo "${ECHO_T}yes" >&6
25131 else    echo "$as_me:25131: result: no" >&5
25132 echo "${ECHO_T}no" >&6
25133 fi
25134
25135 echo "$as_me:25135: checking for builtin bool type" >&5
25136 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25137
25138 if test "${cf_cv_cc_bool_type+set}" = set; then
25139   echo $ECHO_N "(cached) $ECHO_C" >&6
25140 else
25141
25142         cat >"conftest.$ac_ext" <<_ACEOF
25143 #line 25143 "configure"
25144 #include "confdefs.h"
25145
25146 #include <stdio.h>
25147 #include <sys/types.h>
25148
25149 int
25150 main (void)
25151 {
25152 bool x = false
25153   ;
25154   return 0;
25155 }
25156 _ACEOF
25157 rm -f "conftest.$ac_objext"
25158 if { (eval echo "$as_me:25158: \"$ac_compile\"") >&5
25159   (eval $ac_compile) 2>&5
25160   ac_status=$?
25161   echo "$as_me:25161: \$? = $ac_status" >&5
25162   (exit "$ac_status"); } &&
25163          { ac_try='test -s "conftest.$ac_objext"'
25164   { (eval echo "$as_me:25164: \"$ac_try\"") >&5
25165   (eval $ac_try) 2>&5
25166   ac_status=$?
25167   echo "$as_me:25167: \$? = $ac_status" >&5
25168   (exit "$ac_status"); }; }; then
25169   cf_cv_cc_bool_type=1
25170 else
25171   echo "$as_me: failed program was:" >&5
25172 cat "conftest.$ac_ext" >&5
25173 cf_cv_cc_bool_type=0
25174 fi
25175 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25176
25177 fi
25178
25179 if test "$cf_cv_cc_bool_type" = 1
25180 then    echo "$as_me:25180: result: yes" >&5
25181 echo "${ECHO_T}yes" >&6
25182 else    echo "$as_me:25182: result: no" >&5
25183 echo "${ECHO_T}no" >&6
25184 fi
25185
25186 # Check for C++ compiler characteristics (and ensure that it's there!)
25187 if test -n "$CXX" ; then
25188         ac_ext=cc
25189 ac_cpp='$CXXCPP $CPPFLAGS'
25190 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25191 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25192 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25193 ac_main_return="return"
25194
25195 if test -n "$GXX" ; then
25196
25197         cf_save="$LIBS"
25198         LIBS="$LIBS $CXXLIBS"
25199         echo "$as_me:25199: checking if we already have C++ library" >&5
25200 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
25201         cat >"conftest.$ac_ext" <<_ACEOF
25202 #line 25202 "configure"
25203 #include "confdefs.h"
25204
25205                         #include <iostream>
25206 int
25207 main (void)
25208 {
25209
25210                         std::cout << "Hello World!" << std::endl;
25211   ;
25212   return 0;
25213 }
25214 _ACEOF
25215 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25216 if { (eval echo "$as_me:25216: \"$ac_link\"") >&5
25217   (eval $ac_link) 2>&5
25218   ac_status=$?
25219   echo "$as_me:25219: \$? = $ac_status" >&5
25220   (exit "$ac_status"); } &&
25221          { ac_try='test -s "conftest$ac_exeext"'
25222   { (eval echo "$as_me:25222: \"$ac_try\"") >&5
25223   (eval $ac_try) 2>&5
25224   ac_status=$?
25225   echo "$as_me:25225: \$? = $ac_status" >&5
25226   (exit "$ac_status"); }; }; then
25227   cf_have_libstdcpp=yes
25228 else
25229   echo "$as_me: failed program was:" >&5
25230 cat "conftest.$ac_ext" >&5
25231 cf_have_libstdcpp=no
25232 fi
25233 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25234         echo "$as_me:25234: result: $cf_have_libstdcpp" >&5
25235 echo "${ECHO_T}$cf_have_libstdcpp" >&6
25236         LIBS="$cf_save"
25237
25238         if test "$cf_have_libstdcpp" != yes
25239         then
25240                 case "$cf_cv_system_name" in
25241                 (os2*)
25242                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
25243                                 cf_stdcpp_libname=stdcpp
25244                         else
25245                                 cf_stdcpp_libname=stdc++
25246                         fi
25247                         ;;
25248                 (*)
25249                         cf_stdcpp_libname=stdc++
25250                         ;;
25251                 esac
25252
25253                 echo "$as_me:25253: checking for library $cf_stdcpp_libname" >&5
25254 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
25255 if test "${cf_cv_libstdcpp+set}" = set; then
25256   echo $ECHO_N "(cached) $ECHO_C" >&6
25257 else
25258
25259                         cf_save="$LIBS"
25260                         LIBS="$LIBS $CXXLIBS"
25261
25262 cf_add_libs="$LIBS"
25263 # reverse order
25264 cf_add_0lib=
25265 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25266 # filter duplicates
25267 for cf_add_1lib in $cf_add_0lib; do
25268         for cf_add_2lib in $cf_add_libs; do
25269                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25270                         cf_add_1lib=
25271                         break
25272                 fi
25273         done
25274         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25275 done
25276 LIBS="$cf_add_libs"
25277
25278                 cat >"conftest.$ac_ext" <<_ACEOF
25279 #line 25279 "configure"
25280 #include "confdefs.h"
25281
25282                                 #include <iostream>
25283 int
25284 main (void)
25285 {
25286
25287                                 std::cout << "Hello World!" << std::endl;
25288   ;
25289   return 0;
25290 }
25291 _ACEOF
25292 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25293 if { (eval echo "$as_me:25293: \"$ac_link\"") >&5
25294   (eval $ac_link) 2>&5
25295   ac_status=$?
25296   echo "$as_me:25296: \$? = $ac_status" >&5
25297   (exit "$ac_status"); } &&
25298          { ac_try='test -s "conftest$ac_exeext"'
25299   { (eval echo "$as_me:25299: \"$ac_try\"") >&5
25300   (eval $ac_try) 2>&5
25301   ac_status=$?
25302   echo "$as_me:25302: \$? = $ac_status" >&5
25303   (exit "$ac_status"); }; }; then
25304   cf_cv_libstdcpp=yes
25305 else
25306   echo "$as_me: failed program was:" >&5
25307 cat "conftest.$ac_ext" >&5
25308 cf_cv_libstdcpp=no
25309 fi
25310 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25311                         LIBS="$cf_save"
25312
25313 fi
25314 echo "$as_me:25314: result: $cf_cv_libstdcpp" >&5
25315 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
25316                 test "$cf_cv_libstdcpp" = yes && {
25317 cf_add_libs="$CXXLIBS"
25318 # reverse order
25319 cf_add_0lib=
25320 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25321 # filter duplicates
25322 for cf_add_1lib in $cf_add_0lib; do
25323         for cf_add_2lib in $cf_add_libs; do
25324                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25325                         cf_add_1lib=
25326                         break
25327                 fi
25328         done
25329         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25330 done
25331 CXXLIBS="$cf_add_libs"
25332  }
25333         fi
25334 fi
25335
25336         echo "$as_me:25336: checking whether $CXX understands -c and -o together" >&5
25337 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
25338 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
25339   echo $ECHO_N "(cached) $ECHO_C" >&6
25340 else
25341
25342 cat > conftest.$ac_ext <<CF_EOF
25343 int main(void)
25344 {
25345         ${cf_cv_main_return:-return}(0);
25346 }
25347 CF_EOF
25348 # We do the test twice because some compilers refuse to overwrite an
25349 # existing .o file with -o, though they will create one.
25350 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
25351 if { (eval echo "$as_me:25351: \"$ac_try\"") >&5
25352   (eval $ac_try) 2>&5
25353   ac_status=$?
25354   echo "$as_me:25354: \$? = $ac_status" >&5
25355   (exit "$ac_status"); } &&
25356   test -f conftest2.$ac_objext && { (eval echo "$as_me:25356: \"$ac_try\"") >&5
25357   (eval $ac_try) 2>&5
25358   ac_status=$?
25359   echo "$as_me:25359: \$? = $ac_status" >&5
25360   (exit "$ac_status"); };
25361 then
25362   eval cf_cv_prog_CXX_c_o=yes
25363 else
25364   eval cf_cv_prog_CXX_c_o=no
25365 fi
25366 rm -rf ./conftest*
25367
25368 fi
25369 if test "$cf_cv_prog_CXX_c_o" = yes; then
25370   echo "$as_me:25370: result: yes" >&5
25371 echo "${ECHO_T}yes" >&6
25372 else
25373   echo "$as_me:25373: result: no" >&5
25374 echo "${ECHO_T}no" >&6
25375 fi
25376
25377         case "$GXX_VERSION" in
25378         (1.*|2.[0-6]*|[1-9][0-9].*)
25379                 cf_cxx_library=yes
25380                 ;;
25381         (*-2.7*|2.7*)
25382
25383 cf_cxx_library=unknown
25384 case "$cf_cv_system_name" in
25385 (os2*)
25386         cf_gpp_libname=gpp
25387         ;;
25388 (*)
25389         cf_gpp_libname=g++
25390         ;;
25391 esac
25392 if test "$GXX" = yes; then
25393         echo "$as_me:25393: checking for lib$cf_gpp_libname" >&5
25394 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
25395         cf_save="$LIBS"
25396
25397 cf_add_libs="$LIBS"
25398 # reverse order
25399 cf_add_0lib=
25400 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25401 # filter duplicates
25402 for cf_add_1lib in $cf_add_0lib; do
25403         for cf_add_2lib in $cf_add_libs; do
25404                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25405                         cf_add_1lib=
25406                         break
25407                 fi
25408         done
25409         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25410 done
25411 LIBS="$cf_add_libs"
25412
25413         cat >"conftest.$ac_ext" <<_ACEOF
25414 #line 25414 "configure"
25415 #include "confdefs.h"
25416
25417 #include <$cf_gpp_libname/builtin.h>
25418
25419 int
25420 main (void)
25421 {
25422 two_arg_error_handler_t foo2 = lib_error_handler
25423   ;
25424   return 0;
25425 }
25426 _ACEOF
25427 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25428 if { (eval echo "$as_me:25428: \"$ac_link\"") >&5
25429   (eval $ac_link) 2>&5
25430   ac_status=$?
25431   echo "$as_me:25431: \$? = $ac_status" >&5
25432   (exit "$ac_status"); } &&
25433          { ac_try='test -s "conftest$ac_exeext"'
25434   { (eval echo "$as_me:25434: \"$ac_try\"") >&5
25435   (eval $ac_try) 2>&5
25436   ac_status=$?
25437   echo "$as_me:25437: \$? = $ac_status" >&5
25438   (exit "$ac_status"); }; }; then
25439   cf_cxx_library=yes
25440
25441 cf_add_libs="$CXXLIBS"
25442 # reverse order
25443 cf_add_0lib=
25444 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25445 # filter duplicates
25446 for cf_add_1lib in $cf_add_0lib; do
25447         for cf_add_2lib in $cf_add_libs; do
25448                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25449                         cf_add_1lib=
25450                         break
25451                 fi
25452         done
25453         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25454 done
25455 CXXLIBS="$cf_add_libs"
25456
25457          if test "$cf_gpp_libname" = cpp ; then
25458
25459 cat >>confdefs.h <<\EOF
25460 #define HAVE_GPP_BUILTIN_H 1
25461 EOF
25462
25463          else
25464
25465 cat >>confdefs.h <<\EOF
25466 #define HAVE_GXX_BUILTIN_H 1
25467 EOF
25468
25469          fi
25470 else
25471   echo "$as_me: failed program was:" >&5
25472 cat "conftest.$ac_ext" >&5
25473 cat >"conftest.$ac_ext" <<_ACEOF
25474 #line 25474 "configure"
25475 #include "confdefs.h"
25476
25477 #include <builtin.h>
25478
25479 int
25480 main (void)
25481 {
25482 two_arg_error_handler_t foo2 = lib_error_handler
25483   ;
25484   return 0;
25485 }
25486 _ACEOF
25487 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25488 if { (eval echo "$as_me:25488: \"$ac_link\"") >&5
25489   (eval $ac_link) 2>&5
25490   ac_status=$?
25491   echo "$as_me:25491: \$? = $ac_status" >&5
25492   (exit "$ac_status"); } &&
25493          { ac_try='test -s "conftest$ac_exeext"'
25494   { (eval echo "$as_me:25494: \"$ac_try\"") >&5
25495   (eval $ac_try) 2>&5
25496   ac_status=$?
25497   echo "$as_me:25497: \$? = $ac_status" >&5
25498   (exit "$ac_status"); }; }; then
25499   cf_cxx_library=yes
25500
25501 cf_add_libs="$CXXLIBS"
25502 # reverse order
25503 cf_add_0lib=
25504 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25505 # filter duplicates
25506 for cf_add_1lib in $cf_add_0lib; do
25507         for cf_add_2lib in $cf_add_libs; do
25508                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25509                         cf_add_1lib=
25510                         break
25511                 fi
25512         done
25513         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25514 done
25515 CXXLIBS="$cf_add_libs"
25516
25517 cat >>confdefs.h <<\EOF
25518 #define HAVE_BUILTIN_H 1
25519 EOF
25520
25521 else
25522   echo "$as_me: failed program was:" >&5
25523 cat "conftest.$ac_ext" >&5
25524 cf_cxx_library=no
25525 fi
25526 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25527 fi
25528 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25529         LIBS="$cf_save"
25530         echo "$as_me:25530: result: $cf_cxx_library" >&5
25531 echo "${ECHO_T}$cf_cxx_library" >&6
25532 fi
25533
25534                 ;;
25535         (*)
25536                 cf_cxx_library=no
25537                 ;;
25538         esac
25539
25540         ac_ext=cc
25541 ac_cpp='$CXXCPP $CPPFLAGS'
25542 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25543 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25544 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25545 ac_main_return="return"
25546 echo "$as_me:25546: checking how to run the C++ preprocessor" >&5
25547 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
25548 if test -z "$CXXCPP"; then
25549   if test "${ac_cv_prog_CXXCPP+set}" = set; then
25550   echo $ECHO_N "(cached) $ECHO_C" >&6
25551 else
25552       # Double quotes because CXXCPP needs to be expanded
25553     for CXXCPP in "$CXX -E" "/lib/cpp"
25554     do
25555       ac_preproc_ok=false
25556 for ac_cxx_preproc_warn_flag in '' yes
25557 do
25558   # Use a header file that comes with gcc, so configuring glibc
25559   # with a fresh cross-compiler works.
25560   # On the NeXT, cc -E runs the code through the compiler's parser,
25561   # not just through cpp. "Syntax error" is here to catch this case.
25562   cat >"conftest.$ac_ext" <<_ACEOF
25563 #line 25563 "configure"
25564 #include "confdefs.h"
25565 #include <assert.h>
25566                      Syntax error
25567 _ACEOF
25568 if { (eval echo "$as_me:25568: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25569   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25570   ac_status=$?
25571   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25572   rm -f conftest.er1
25573   cat conftest.err >&5
25574   echo "$as_me:25574: \$? = $ac_status" >&5
25575   (exit "$ac_status"); } >/dev/null; then
25576   if test -s conftest.err; then
25577     ac_cpp_err=$ac_cxx_preproc_warn_flag
25578   else
25579     ac_cpp_err=
25580   fi
25581 else
25582   ac_cpp_err=yes
25583 fi
25584 if test -z "$ac_cpp_err"; then
25585   :
25586 else
25587   echo "$as_me: failed program was:" >&5
25588   cat "conftest.$ac_ext" >&5
25589   # Broken: fails on valid input.
25590 continue
25591 fi
25592 rm -f conftest.err "conftest.$ac_ext"
25593
25594   # OK, works on sane cases.  Now check whether non-existent headers
25595   # can be detected and how.
25596   cat >"conftest.$ac_ext" <<_ACEOF
25597 #line 25597 "configure"
25598 #include "confdefs.h"
25599 #include <ac_nonexistent.h>
25600 _ACEOF
25601 if { (eval echo "$as_me:25601: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25602   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25603   ac_status=$?
25604   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25605   rm -f conftest.er1
25606   cat conftest.err >&5
25607   echo "$as_me:25607: \$? = $ac_status" >&5
25608   (exit "$ac_status"); } >/dev/null; then
25609   if test -s conftest.err; then
25610     ac_cpp_err=$ac_cxx_preproc_warn_flag
25611   else
25612     ac_cpp_err=
25613   fi
25614 else
25615   ac_cpp_err=yes
25616 fi
25617 if test -z "$ac_cpp_err"; then
25618   # Broken: success on invalid input.
25619 continue
25620 else
25621   echo "$as_me: failed program was:" >&5
25622   cat "conftest.$ac_ext" >&5
25623   # Passes both tests.
25624 ac_preproc_ok=:
25625 break
25626 fi
25627 rm -f conftest.err "conftest.$ac_ext"
25628
25629 done
25630 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25631 rm -f conftest.err "conftest.$ac_ext"
25632 if $ac_preproc_ok; then
25633   break
25634 fi
25635
25636     done
25637     ac_cv_prog_CXXCPP=$CXXCPP
25638
25639 fi
25640   CXXCPP=$ac_cv_prog_CXXCPP
25641 else
25642   ac_cv_prog_CXXCPP=$CXXCPP
25643 fi
25644 echo "$as_me:25644: result: $CXXCPP" >&5
25645 echo "${ECHO_T}$CXXCPP" >&6
25646 ac_preproc_ok=false
25647 for ac_cxx_preproc_warn_flag in '' yes
25648 do
25649   # Use a header file that comes with gcc, so configuring glibc
25650   # with a fresh cross-compiler works.
25651   # On the NeXT, cc -E runs the code through the compiler's parser,
25652   # not just through cpp. "Syntax error" is here to catch this case.
25653   cat >"conftest.$ac_ext" <<_ACEOF
25654 #line 25654 "configure"
25655 #include "confdefs.h"
25656 #include <assert.h>
25657                      Syntax error
25658 _ACEOF
25659 if { (eval echo "$as_me:25659: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25660   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25661   ac_status=$?
25662   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25663   rm -f conftest.er1
25664   cat conftest.err >&5
25665   echo "$as_me:25665: \$? = $ac_status" >&5
25666   (exit "$ac_status"); } >/dev/null; then
25667   if test -s conftest.err; then
25668     ac_cpp_err=$ac_cxx_preproc_warn_flag
25669   else
25670     ac_cpp_err=
25671   fi
25672 else
25673   ac_cpp_err=yes
25674 fi
25675 if test -z "$ac_cpp_err"; then
25676   :
25677 else
25678   echo "$as_me: failed program was:" >&5
25679   cat "conftest.$ac_ext" >&5
25680   # Broken: fails on valid input.
25681 continue
25682 fi
25683 rm -f conftest.err "conftest.$ac_ext"
25684
25685   # OK, works on sane cases.  Now check whether non-existent headers
25686   # can be detected and how.
25687   cat >"conftest.$ac_ext" <<_ACEOF
25688 #line 25688 "configure"
25689 #include "confdefs.h"
25690 #include <ac_nonexistent.h>
25691 _ACEOF
25692 if { (eval echo "$as_me:25692: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25693   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25694   ac_status=$?
25695   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25696   rm -f conftest.er1
25697   cat conftest.err >&5
25698   echo "$as_me:25698: \$? = $ac_status" >&5
25699   (exit "$ac_status"); } >/dev/null; then
25700   if test -s conftest.err; then
25701     ac_cpp_err=$ac_cxx_preproc_warn_flag
25702   else
25703     ac_cpp_err=
25704   fi
25705 else
25706   ac_cpp_err=yes
25707 fi
25708 if test -z "$ac_cpp_err"; then
25709   # Broken: success on invalid input.
25710 continue
25711 else
25712   echo "$as_me: failed program was:" >&5
25713   cat "conftest.$ac_ext" >&5
25714   # Passes both tests.
25715 ac_preproc_ok=:
25716 break
25717 fi
25718 rm -f conftest.err "conftest.$ac_ext"
25719
25720 done
25721 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25722 rm -f conftest.err "conftest.$ac_ext"
25723 if $ac_preproc_ok; then
25724   :
25725 else
25726   { { echo "$as_me:25726: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
25727 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
25728    { (exit 1); exit 1; }; }
25729 fi
25730
25731 ac_ext=cc
25732 ac_cpp='$CXXCPP $CPPFLAGS'
25733 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25734 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25735 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25736 ac_main_return="return"
25737
25738 for ac_header in typeinfo
25739 do
25740 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25741 echo "$as_me:25741: checking for $ac_header" >&5
25742 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25743 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25744   echo $ECHO_N "(cached) $ECHO_C" >&6
25745 else
25746   cat >"conftest.$ac_ext" <<_ACEOF
25747 #line 25747 "configure"
25748 #include "confdefs.h"
25749 #include <$ac_header>
25750 _ACEOF
25751 if { (eval echo "$as_me:25751: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25752   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25753   ac_status=$?
25754   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25755   rm -f conftest.er1
25756   cat conftest.err >&5
25757   echo "$as_me:25757: \$? = $ac_status" >&5
25758   (exit "$ac_status"); } >/dev/null; then
25759   if test -s conftest.err; then
25760     ac_cpp_err=$ac_cxx_preproc_warn_flag
25761   else
25762     ac_cpp_err=
25763   fi
25764 else
25765   ac_cpp_err=yes
25766 fi
25767 if test -z "$ac_cpp_err"; then
25768   eval "$as_ac_Header=yes"
25769 else
25770   echo "$as_me: failed program was:" >&5
25771   cat "conftest.$ac_ext" >&5
25772   eval "$as_ac_Header=no"
25773 fi
25774 rm -f conftest.err "conftest.$ac_ext"
25775 fi
25776 echo "$as_me:25776: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25777 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25778 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25779   cat >>confdefs.h <<EOF
25780 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25781 EOF
25782
25783 fi
25784 done
25785
25786 for ac_header in iostream
25787 do
25788 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25789 echo "$as_me:25789: checking for $ac_header" >&5
25790 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25791 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25792   echo $ECHO_N "(cached) $ECHO_C" >&6
25793 else
25794   cat >"conftest.$ac_ext" <<_ACEOF
25795 #line 25795 "configure"
25796 #include "confdefs.h"
25797 #include <$ac_header>
25798 _ACEOF
25799 if { (eval echo "$as_me:25799: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25800   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25801   ac_status=$?
25802   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25803   rm -f conftest.er1
25804   cat conftest.err >&5
25805   echo "$as_me:25805: \$? = $ac_status" >&5
25806   (exit "$ac_status"); } >/dev/null; then
25807   if test -s conftest.err; then
25808     ac_cpp_err=$ac_cxx_preproc_warn_flag
25809   else
25810     ac_cpp_err=
25811   fi
25812 else
25813   ac_cpp_err=yes
25814 fi
25815 if test -z "$ac_cpp_err"; then
25816   eval "$as_ac_Header=yes"
25817 else
25818   echo "$as_me: failed program was:" >&5
25819   cat "conftest.$ac_ext" >&5
25820   eval "$as_ac_Header=no"
25821 fi
25822 rm -f conftest.err "conftest.$ac_ext"
25823 fi
25824 echo "$as_me:25824: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25825 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25826 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25827   cat >>confdefs.h <<EOF
25828 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25829 EOF
25830
25831 fi
25832 done
25833
25834 if test x"$ac_cv_header_iostream" = xyes ; then
25835         echo "$as_me:25835: checking if iostream uses std-namespace" >&5
25836 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
25837         cat >"conftest.$ac_ext" <<_ACEOF
25838 #line 25838 "configure"
25839 #include "confdefs.h"
25840
25841 #include <iostream>
25842 using std::endl;
25843 using std::cerr;
25844 int
25845 main (void)
25846 {
25847
25848 cerr << "testing" << endl;
25849
25850   ;
25851   return 0;
25852 }
25853 _ACEOF
25854 rm -f "conftest.$ac_objext"
25855 if { (eval echo "$as_me:25855: \"$ac_compile\"") >&5
25856   (eval $ac_compile) 2>&5
25857   ac_status=$?
25858   echo "$as_me:25858: \$? = $ac_status" >&5
25859   (exit "$ac_status"); } &&
25860          { ac_try='test -s "conftest.$ac_objext"'
25861   { (eval echo "$as_me:25861: \"$ac_try\"") >&5
25862   (eval $ac_try) 2>&5
25863   ac_status=$?
25864   echo "$as_me:25864: \$? = $ac_status" >&5
25865   (exit "$ac_status"); }; }; then
25866   cf_iostream_namespace=yes
25867 else
25868   echo "$as_me: failed program was:" >&5
25869 cat "conftest.$ac_ext" >&5
25870 cf_iostream_namespace=no
25871 fi
25872 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25873         echo "$as_me:25873: result: $cf_iostream_namespace" >&5
25874 echo "${ECHO_T}$cf_iostream_namespace" >&6
25875         if test "$cf_iostream_namespace" = yes ; then
25876
25877 cat >>confdefs.h <<\EOF
25878 #define IOSTREAM_NAMESPACE 1
25879 EOF
25880
25881         fi
25882 fi
25883
25884 echo "$as_me:25884: checking if we should include stdbool.h" >&5
25885 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25886
25887 if test "${cf_cv_header_stdbool_h+set}" = set; then
25888   echo $ECHO_N "(cached) $ECHO_C" >&6
25889 else
25890
25891         cat >"conftest.$ac_ext" <<_ACEOF
25892 #line 25892 "configure"
25893 #include "confdefs.h"
25894
25895 int
25896 main (void)
25897 {
25898 bool foo = false
25899   ;
25900   return 0;
25901 }
25902 _ACEOF
25903 rm -f "conftest.$ac_objext"
25904 if { (eval echo "$as_me:25904: \"$ac_compile\"") >&5
25905   (eval $ac_compile) 2>&5
25906   ac_status=$?
25907   echo "$as_me:25907: \$? = $ac_status" >&5
25908   (exit "$ac_status"); } &&
25909          { ac_try='test -s "conftest.$ac_objext"'
25910   { (eval echo "$as_me:25910: \"$ac_try\"") >&5
25911   (eval $ac_try) 2>&5
25912   ac_status=$?
25913   echo "$as_me:25913: \$? = $ac_status" >&5
25914   (exit "$ac_status"); }; }; then
25915   cf_cv_header_stdbool_h=0
25916 else
25917   echo "$as_me: failed program was:" >&5
25918 cat "conftest.$ac_ext" >&5
25919 cat >"conftest.$ac_ext" <<_ACEOF
25920 #line 25920 "configure"
25921 #include "confdefs.h"
25922
25923 #ifndef __BEOS__
25924 #include <stdbool.h>
25925 #endif
25926
25927 int
25928 main (void)
25929 {
25930 bool foo = false
25931   ;
25932   return 0;
25933 }
25934 _ACEOF
25935 rm -f "conftest.$ac_objext"
25936 if { (eval echo "$as_me:25936: \"$ac_compile\"") >&5
25937   (eval $ac_compile) 2>&5
25938   ac_status=$?
25939   echo "$as_me:25939: \$? = $ac_status" >&5
25940   (exit "$ac_status"); } &&
25941          { ac_try='test -s "conftest.$ac_objext"'
25942   { (eval echo "$as_me:25942: \"$ac_try\"") >&5
25943   (eval $ac_try) 2>&5
25944   ac_status=$?
25945   echo "$as_me:25945: \$? = $ac_status" >&5
25946   (exit "$ac_status"); }; }; then
25947   cf_cv_header_stdbool_h=1
25948 else
25949   echo "$as_me: failed program was:" >&5
25950 cat "conftest.$ac_ext" >&5
25951 cf_cv_header_stdbool_h=0
25952 fi
25953 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25954 fi
25955 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25956 fi
25957
25958 if test "$cf_cv_header_stdbool_h" = 1
25959 then    echo "$as_me:25959: result: yes" >&5
25960 echo "${ECHO_T}yes" >&6
25961 else    echo "$as_me:25961: result: no" >&5
25962 echo "${ECHO_T}no" >&6
25963 fi
25964
25965 echo "$as_me:25965: checking for builtin bool type" >&5
25966 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25967
25968 if test "${cf_cv_builtin_bool+set}" = set; then
25969   echo $ECHO_N "(cached) $ECHO_C" >&6
25970 else
25971
25972         cat >"conftest.$ac_ext" <<_ACEOF
25973 #line 25973 "configure"
25974 #include "confdefs.h"
25975
25976 #include <stdio.h>
25977 #include <sys/types.h>
25978
25979 int
25980 main (void)
25981 {
25982 bool x = false
25983   ;
25984   return 0;
25985 }
25986 _ACEOF
25987 rm -f "conftest.$ac_objext"
25988 if { (eval echo "$as_me:25988: \"$ac_compile\"") >&5
25989   (eval $ac_compile) 2>&5
25990   ac_status=$?
25991   echo "$as_me:25991: \$? = $ac_status" >&5
25992   (exit "$ac_status"); } &&
25993          { ac_try='test -s "conftest.$ac_objext"'
25994   { (eval echo "$as_me:25994: \"$ac_try\"") >&5
25995   (eval $ac_try) 2>&5
25996   ac_status=$?
25997   echo "$as_me:25997: \$? = $ac_status" >&5
25998   (exit "$ac_status"); }; }; then
25999   cf_cv_builtin_bool=1
26000 else
26001   echo "$as_me: failed program was:" >&5
26002 cat "conftest.$ac_ext" >&5
26003 cf_cv_builtin_bool=0
26004 fi
26005 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26006
26007 fi
26008
26009 if test "$cf_cv_builtin_bool" = 1
26010 then    echo "$as_me:26010: result: yes" >&5
26011 echo "${ECHO_T}yes" >&6
26012 else    echo "$as_me:26012: result: no" >&5
26013 echo "${ECHO_T}no" >&6
26014 fi
26015
26016 echo "$as_me:26016: checking for bool" >&5
26017 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26018 if test "${ac_cv_type_bool+set}" = set; then
26019   echo $ECHO_N "(cached) $ECHO_C" >&6
26020 else
26021   cat >"conftest.$ac_ext" <<_ACEOF
26022 #line 26022 "configure"
26023 #include "confdefs.h"
26024
26025 $ac_includes_default
26026
26027 #if defined(__cplusplus)
26028
26029 #ifdef HAVE_GXX_BUILTIN_H
26030 #include <g++/builtin.h>
26031 #elif HAVE_GPP_BUILTIN_H
26032 #include <gpp/builtin.h>
26033 #elif HAVE_BUILTIN_H
26034 #include <builtin.h>
26035 #endif
26036
26037 #else
26038
26039 #if $cf_cv_header_stdbool_h
26040 #include <stdbool.h>
26041 #endif
26042
26043 #endif
26044
26045 int
26046 main (void)
26047 {
26048 if ((bool *) 0)
26049   return 0;
26050 if (sizeof (bool))
26051   return 0;
26052   ;
26053   return 0;
26054 }
26055 _ACEOF
26056 rm -f "conftest.$ac_objext"
26057 if { (eval echo "$as_me:26057: \"$ac_compile\"") >&5
26058   (eval $ac_compile) 2>&5
26059   ac_status=$?
26060   echo "$as_me:26060: \$? = $ac_status" >&5
26061   (exit "$ac_status"); } &&
26062          { ac_try='test -s "conftest.$ac_objext"'
26063   { (eval echo "$as_me:26063: \"$ac_try\"") >&5
26064   (eval $ac_try) 2>&5
26065   ac_status=$?
26066   echo "$as_me:26066: \$? = $ac_status" >&5
26067   (exit "$ac_status"); }; }; then
26068   ac_cv_type_bool=yes
26069 else
26070   echo "$as_me: failed program was:" >&5
26071 cat "conftest.$ac_ext" >&5
26072 ac_cv_type_bool=no
26073 fi
26074 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26075 fi
26076 echo "$as_me:26076: result: $ac_cv_type_bool" >&5
26077 echo "${ECHO_T}$ac_cv_type_bool" >&6
26078
26079 echo "$as_me:26079: checking size of bool" >&5
26080 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26081 if test "${ac_cv_sizeof_bool+set}" = set; then
26082   echo $ECHO_N "(cached) $ECHO_C" >&6
26083 else
26084   if test "$ac_cv_type_bool" = yes; then
26085   if test "$cross_compiling" = yes; then
26086   # Depending upon the size, compute the lo and hi bounds.
26087 cat >"conftest.$ac_ext" <<_ACEOF
26088 #line 26088 "configure"
26089 #include "confdefs.h"
26090
26091 $ac_includes_default
26092
26093 #if defined(__cplusplus)
26094
26095 #ifdef HAVE_GXX_BUILTIN_H
26096 #include <g++/builtin.h>
26097 #elif HAVE_GPP_BUILTIN_H
26098 #include <gpp/builtin.h>
26099 #elif HAVE_BUILTIN_H
26100 #include <builtin.h>
26101 #endif
26102
26103 #else
26104
26105 #if $cf_cv_header_stdbool_h
26106 #include <stdbool.h>
26107 #endif
26108
26109 #endif
26110
26111 int
26112 main (void)
26113 {
26114 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26115   ;
26116   return 0;
26117 }
26118 _ACEOF
26119 rm -f "conftest.$ac_objext"
26120 if { (eval echo "$as_me:26120: \"$ac_compile\"") >&5
26121   (eval $ac_compile) 2>&5
26122   ac_status=$?
26123   echo "$as_me:26123: \$? = $ac_status" >&5
26124   (exit "$ac_status"); } &&
26125          { ac_try='test -s "conftest.$ac_objext"'
26126   { (eval echo "$as_me:26126: \"$ac_try\"") >&5
26127   (eval $ac_try) 2>&5
26128   ac_status=$?
26129   echo "$as_me:26129: \$? = $ac_status" >&5
26130   (exit "$ac_status"); }; }; then
26131   ac_lo=0 ac_mid=0
26132   while :; do
26133     cat >"conftest.$ac_ext" <<_ACEOF
26134 #line 26134 "configure"
26135 #include "confdefs.h"
26136
26137 $ac_includes_default
26138
26139 #if defined(__cplusplus)
26140
26141 #ifdef HAVE_GXX_BUILTIN_H
26142 #include <g++/builtin.h>
26143 #elif HAVE_GPP_BUILTIN_H
26144 #include <gpp/builtin.h>
26145 #elif HAVE_BUILTIN_H
26146 #include <builtin.h>
26147 #endif
26148
26149 #else
26150
26151 #if $cf_cv_header_stdbool_h
26152 #include <stdbool.h>
26153 #endif
26154
26155 #endif
26156
26157 int
26158 main (void)
26159 {
26160 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26161   ;
26162   return 0;
26163 }
26164 _ACEOF
26165 rm -f "conftest.$ac_objext"
26166 if { (eval echo "$as_me:26166: \"$ac_compile\"") >&5
26167   (eval $ac_compile) 2>&5
26168   ac_status=$?
26169   echo "$as_me:26169: \$? = $ac_status" >&5
26170   (exit "$ac_status"); } &&
26171          { ac_try='test -s "conftest.$ac_objext"'
26172   { (eval echo "$as_me:26172: \"$ac_try\"") >&5
26173   (eval $ac_try) 2>&5
26174   ac_status=$?
26175   echo "$as_me:26175: \$? = $ac_status" >&5
26176   (exit "$ac_status"); }; }; then
26177   ac_hi=$ac_mid; break
26178 else
26179   echo "$as_me: failed program was:" >&5
26180 cat "conftest.$ac_ext" >&5
26181 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26182 fi
26183 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26184   done
26185 else
26186   echo "$as_me: failed program was:" >&5
26187 cat "conftest.$ac_ext" >&5
26188 ac_hi=-1 ac_mid=-1
26189   while :; do
26190     cat >"conftest.$ac_ext" <<_ACEOF
26191 #line 26191 "configure"
26192 #include "confdefs.h"
26193
26194 $ac_includes_default
26195
26196 #if defined(__cplusplus)
26197
26198 #ifdef HAVE_GXX_BUILTIN_H
26199 #include <g++/builtin.h>
26200 #elif HAVE_GPP_BUILTIN_H
26201 #include <gpp/builtin.h>
26202 #elif HAVE_BUILTIN_H
26203 #include <builtin.h>
26204 #endif
26205
26206 #else
26207
26208 #if $cf_cv_header_stdbool_h
26209 #include <stdbool.h>
26210 #endif
26211
26212 #endif
26213
26214 int
26215 main (void)
26216 {
26217 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26218   ;
26219   return 0;
26220 }
26221 _ACEOF
26222 rm -f "conftest.$ac_objext"
26223 if { (eval echo "$as_me:26223: \"$ac_compile\"") >&5
26224   (eval $ac_compile) 2>&5
26225   ac_status=$?
26226   echo "$as_me:26226: \$? = $ac_status" >&5
26227   (exit "$ac_status"); } &&
26228          { ac_try='test -s "conftest.$ac_objext"'
26229   { (eval echo "$as_me:26229: \"$ac_try\"") >&5
26230   (eval $ac_try) 2>&5
26231   ac_status=$?
26232   echo "$as_me:26232: \$? = $ac_status" >&5
26233   (exit "$ac_status"); }; }; then
26234   ac_lo=$ac_mid; break
26235 else
26236   echo "$as_me: failed program was:" >&5
26237 cat "conftest.$ac_ext" >&5
26238 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26239 fi
26240 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26241   done
26242 fi
26243 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26244 # Binary search between lo and hi bounds.
26245 while test "x$ac_lo" != "x$ac_hi"; do
26246   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26247   cat >"conftest.$ac_ext" <<_ACEOF
26248 #line 26248 "configure"
26249 #include "confdefs.h"
26250
26251 $ac_includes_default
26252
26253 #if defined(__cplusplus)
26254
26255 #ifdef HAVE_GXX_BUILTIN_H
26256 #include <g++/builtin.h>
26257 #elif HAVE_GPP_BUILTIN_H
26258 #include <gpp/builtin.h>
26259 #elif HAVE_BUILTIN_H
26260 #include <builtin.h>
26261 #endif
26262
26263 #else
26264
26265 #if $cf_cv_header_stdbool_h
26266 #include <stdbool.h>
26267 #endif
26268
26269 #endif
26270
26271 int
26272 main (void)
26273 {
26274 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26275   ;
26276   return 0;
26277 }
26278 _ACEOF
26279 rm -f "conftest.$ac_objext"
26280 if { (eval echo "$as_me:26280: \"$ac_compile\"") >&5
26281   (eval $ac_compile) 2>&5
26282   ac_status=$?
26283   echo "$as_me:26283: \$? = $ac_status" >&5
26284   (exit "$ac_status"); } &&
26285          { ac_try='test -s "conftest.$ac_objext"'
26286   { (eval echo "$as_me:26286: \"$ac_try\"") >&5
26287   (eval $ac_try) 2>&5
26288   ac_status=$?
26289   echo "$as_me:26289: \$? = $ac_status" >&5
26290   (exit "$ac_status"); }; }; then
26291   ac_hi=$ac_mid
26292 else
26293   echo "$as_me: failed program was:" >&5
26294 cat "conftest.$ac_ext" >&5
26295 ac_lo=`expr "$ac_mid" + 1`
26296 fi
26297 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26298 done
26299 ac_cv_sizeof_bool=$ac_lo
26300 else
26301   if test "$cross_compiling" = yes; then
26302   { { echo "$as_me:26302: error: cannot run test program while cross compiling" >&5
26303 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26304    { (exit 1); exit 1; }; }
26305 else
26306   cat >"conftest.$ac_ext" <<_ACEOF
26307 #line 26307 "configure"
26308 #include "confdefs.h"
26309
26310 $ac_includes_default
26311
26312 #if defined(__cplusplus)
26313
26314 #ifdef HAVE_GXX_BUILTIN_H
26315 #include <g++/builtin.h>
26316 #elif HAVE_GPP_BUILTIN_H
26317 #include <gpp/builtin.h>
26318 #elif HAVE_BUILTIN_H
26319 #include <builtin.h>
26320 #endif
26321
26322 #else
26323
26324 #if $cf_cv_header_stdbool_h
26325 #include <stdbool.h>
26326 #endif
26327
26328 #endif
26329
26330 int
26331 main (void)
26332 {
26333 FILE *f = fopen ("conftest.val", "w");
26334 if (!f)
26335   $ac_main_return (1);
26336 fprintf (f, "%ld", (long)(sizeof (bool)));
26337 fclose (f);
26338   ;
26339   return 0;
26340 }
26341 _ACEOF
26342 rm -f "conftest$ac_exeext"
26343 if { (eval echo "$as_me:26343: \"$ac_link\"") >&5
26344   (eval $ac_link) 2>&5
26345   ac_status=$?
26346   echo "$as_me:26346: \$? = $ac_status" >&5
26347   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26348   { (eval echo "$as_me:26348: \"$ac_try\"") >&5
26349   (eval $ac_try) 2>&5
26350   ac_status=$?
26351   echo "$as_me:26351: \$? = $ac_status" >&5
26352   (exit "$ac_status"); }; }; then
26353   ac_cv_sizeof_bool=`cat conftest.val`
26354 else
26355   echo "$as_me: program exited with status $ac_status" >&5
26356 echo "$as_me: failed program was:" >&5
26357 cat "conftest.$ac_ext" >&5
26358 fi
26359 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26360 fi
26361 fi
26362 rm -f conftest.val
26363 else
26364   ac_cv_sizeof_bool=0
26365 fi
26366 fi
26367 echo "$as_me:26367: result: $ac_cv_sizeof_bool" >&5
26368 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26369 cat >>confdefs.h <<EOF
26370 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26371 EOF
26372
26373 echo "$as_me:26373: checking for type of bool" >&5
26374 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26375 if test "${cf_cv_type_of_bool+set}" = set; then
26376   echo $ECHO_N "(cached) $ECHO_C" >&6
26377 else
26378
26379         rm -f cf_test.out
26380         if test "$cross_compiling" = yes; then
26381
26382                 case x$ac_cv_sizeof_bool in
26383                 (x1) cf_cv_type_of_bool="unsigned char";;
26384                 (x2) cf_cv_type_of_bool="unsigned short";;
26385                 (x4) cf_cv_type_of_bool="unsigned int";;
26386                 (x8) cf_cv_type_of_bool="unsigned long";;
26387                 (*)  cf_cv_type_of_bool=unknown;;
26388                 esac
26389
26390 else
26391   cat >"conftest.$ac_ext" <<_ACEOF
26392 #line 26392 "configure"
26393 #include "confdefs.h"
26394
26395 $ac_includes_default
26396
26397 #if defined(__cplusplus)
26398
26399 #ifdef HAVE_GXX_BUILTIN_H
26400 #include <g++/builtin.h>
26401 #elif HAVE_GPP_BUILTIN_H
26402 #include <gpp/builtin.h>
26403 #elif HAVE_BUILTIN_H
26404 #include <builtin.h>
26405 #endif
26406
26407 #else
26408
26409 #if $cf_cv_header_stdbool_h
26410 #include <stdbool.h>
26411 #endif
26412
26413 #endif
26414
26415 int main(void)
26416 {
26417         FILE *fp = fopen("cf_test.out", "w");
26418         if (fp != 0) {
26419                 bool x = true;
26420                 if ((bool)(-x) >= 0)
26421                         fputs("unsigned ", fp);
26422                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26423                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26424                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26425                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26426                 fclose(fp);
26427         }
26428         ${cf_cv_main_return:-return}(0);
26429 }
26430
26431 _ACEOF
26432 rm -f "conftest$ac_exeext"
26433 if { (eval echo "$as_me:26433: \"$ac_link\"") >&5
26434   (eval $ac_link) 2>&5
26435   ac_status=$?
26436   echo "$as_me:26436: \$? = $ac_status" >&5
26437   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26438   { (eval echo "$as_me:26438: \"$ac_try\"") >&5
26439   (eval $ac_try) 2>&5
26440   ac_status=$?
26441   echo "$as_me:26441: \$? = $ac_status" >&5
26442   (exit "$ac_status"); }; }; then
26443   cf_cv_type_of_bool=`cat cf_test.out`
26444                  if test -z "$cf_cv_type_of_bool"; then
26445                    cf_cv_type_of_bool=unknown
26446                  fi
26447 else
26448   echo "$as_me: program exited with status $ac_status" >&5
26449 echo "$as_me: failed program was:" >&5
26450 cat "conftest.$ac_ext" >&5
26451 cf_cv_type_of_bool=unknown
26452 fi
26453 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26454 fi
26455         rm -f cf_test.out
26456
26457 fi
26458 echo "$as_me:26458: result: $cf_cv_type_of_bool" >&5
26459 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26460
26461 if test "$cf_cv_type_of_bool" = unknown ; then
26462         case .$NCURSES_BOOL in
26463         (.auto|.) NCURSES_BOOL=unsigned;;
26464         esac
26465         { echo "$as_me:26465: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26466 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26467         cf_cv_type_of_bool=$NCURSES_BOOL
26468 fi
26469
26470 echo "$as_me:26470: checking for special defines needed for etip.h" >&5
26471 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
26472 cf_save_CXXFLAGS="$CXXFLAGS"
26473 cf_result="none"
26474
26475 # etip.h includes ncurses.h which includes ncurses_dll.h
26476 # But ncurses_dll.h is generated - fix here.
26477 test -d include || mkdir include
26478 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
26479
26480 for cf_math in "" MATH_H
26481 do
26482 for cf_excp in "" MATH_EXCEPTION
26483 do
26484         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
26485         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
26486         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
26487 cat >"conftest.$ac_ext" <<_ACEOF
26488 #line 26488 "configure"
26489 #include "confdefs.h"
26490
26491 #include <etip.h.in>
26492
26493 int
26494 main (void)
26495 {
26496
26497   ;
26498   return 0;
26499 }
26500 _ACEOF
26501 rm -f "conftest.$ac_objext"
26502 if { (eval echo "$as_me:26502: \"$ac_compile\"") >&5
26503   (eval $ac_compile) 2>&5
26504   ac_status=$?
26505   echo "$as_me:26505: \$? = $ac_status" >&5
26506   (exit "$ac_status"); } &&
26507          { ac_try='test -s "conftest.$ac_objext"'
26508   { (eval echo "$as_me:26508: \"$ac_try\"") >&5
26509   (eval $ac_try) 2>&5
26510   ac_status=$?
26511   echo "$as_me:26511: \$? = $ac_status" >&5
26512   (exit "$ac_status"); }; }; then
26513
26514         test -n "$cf_math" && cat >>confdefs.h <<EOF
26515 #define ETIP_NEEDS_${cf_math} 1
26516 EOF
26517
26518         test -n "$cf_excp" && cat >>confdefs.h <<EOF
26519 #define ETIP_NEEDS_${cf_excp} 1
26520 EOF
26521
26522         cf_result="$cf_math $cf_excp"
26523         break 2
26524
26525 else
26526   echo "$as_me: failed program was:" >&5
26527 cat "conftest.$ac_ext" >&5
26528 fi
26529 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26530 done
26531 done
26532 echo "$as_me:26532: result: ${cf_result:-(none)}" >&5
26533 echo "${ECHO_T}${cf_result:-(none)}" >&6
26534 CXXFLAGS="$cf_save_CXXFLAGS"
26535
26536 if test -n "$CXX"; then
26537 echo "$as_me:26537: checking if $CXX accepts override keyword" >&5
26538 echo $ECHO_N "checking if $CXX accepts override keyword... $ECHO_C" >&6
26539 if test "${cf_cv_cpp_override+set}" = set; then
26540   echo $ECHO_N "(cached) $ECHO_C" >&6
26541 else
26542
26543         ac_ext=cc
26544 ac_cpp='$CXXCPP $CPPFLAGS'
26545 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26546 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26547 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26548 ac_main_return="return"
26549
26550         if test "$cross_compiling" = yes; then
26551   cf_cv_cpp_override=unknown
26552 else
26553   cat >"conftest.$ac_ext" <<_ACEOF
26554 #line 26554 "configure"
26555 #include "confdefs.h"
26556
26557 class base
26558 {
26559 public:
26560         virtual int foo(float x) = 0;
26561 };
26562
26563 class derived: public base
26564 {
26565 public:
26566         int foo(float x) override { return x != 0.0 ? 1 : 0; }
26567 };
26568
26569 int main(void) { }
26570
26571 _ACEOF
26572 rm -f "conftest$ac_exeext"
26573 if { (eval echo "$as_me:26573: \"$ac_link\"") >&5
26574   (eval $ac_link) 2>&5
26575   ac_status=$?
26576   echo "$as_me:26576: \$? = $ac_status" >&5
26577   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26578   { (eval echo "$as_me:26578: \"$ac_try\"") >&5
26579   (eval $ac_try) 2>&5
26580   ac_status=$?
26581   echo "$as_me:26581: \$? = $ac_status" >&5
26582   (exit "$ac_status"); }; }; then
26583   cf_cv_cpp_override=yes
26584 else
26585   echo "$as_me: program exited with status $ac_status" >&5
26586 echo "$as_me: failed program was:" >&5
26587 cat "conftest.$ac_ext" >&5
26588 cf_cv_cpp_override=no
26589 fi
26590 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26591 fi
26592         ac_ext=cc
26593 ac_cpp='$CXXCPP $CPPFLAGS'
26594 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26595 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26596 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26597 ac_main_return="return"
26598
26599 fi
26600 echo "$as_me:26600: result: $cf_cv_cpp_override" >&5
26601 echo "${ECHO_T}$cf_cv_cpp_override" >&6
26602 fi
26603 test "$cf_cv_cpp_override" = yes &&
26604 cat >>confdefs.h <<\EOF
26605 #define CPP_HAS_OVERRIDE 1
26606 EOF
26607
26608 if test -n "$CXX"; then
26609 echo "$as_me:26609: checking if $CXX accepts parameter initialization" >&5
26610 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
26611 if test "${cf_cv_cpp_param_init+set}" = set; then
26612   echo $ECHO_N "(cached) $ECHO_C" >&6
26613 else
26614
26615         ac_ext=cc
26616 ac_cpp='$CXXCPP $CPPFLAGS'
26617 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26618 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26619 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26620 ac_main_return="return"
26621
26622         if test "$cross_compiling" = yes; then
26623   cf_cv_cpp_param_init=unknown
26624 else
26625   cat >"conftest.$ac_ext" <<_ACEOF
26626 #line 26626 "configure"
26627 #include "confdefs.h"
26628
26629 class TEST {
26630 private:
26631         int value;
26632 public:
26633         TEST(int x = 1);
26634         ~TEST();
26635 };
26636
26637 TEST::TEST(int x = 1)   // some compilers do not like second initializer
26638 {
26639         value = x;
26640 }
26641 int main(void) { }
26642
26643 _ACEOF
26644 rm -f "conftest$ac_exeext"
26645 if { (eval echo "$as_me:26645: \"$ac_link\"") >&5
26646   (eval $ac_link) 2>&5
26647   ac_status=$?
26648   echo "$as_me:26648: \$? = $ac_status" >&5
26649   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26650   { (eval echo "$as_me:26650: \"$ac_try\"") >&5
26651   (eval $ac_try) 2>&5
26652   ac_status=$?
26653   echo "$as_me:26653: \$? = $ac_status" >&5
26654   (exit "$ac_status"); }; }; then
26655   cf_cv_cpp_param_init=yes
26656 else
26657   echo "$as_me: program exited with status $ac_status" >&5
26658 echo "$as_me: failed program was:" >&5
26659 cat "conftest.$ac_ext" >&5
26660 cf_cv_cpp_param_init=no
26661 fi
26662 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26663 fi
26664         ac_ext=cc
26665 ac_cpp='$CXXCPP $CPPFLAGS'
26666 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26667 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26668 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26669 ac_main_return="return"
26670
26671 fi
26672 echo "$as_me:26672: result: $cf_cv_cpp_param_init" >&5
26673 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
26674 fi
26675 test "$cf_cv_cpp_param_init" = yes &&
26676 cat >>confdefs.h <<\EOF
26677 #define CPP_HAS_PARAM_INIT 1
26678 EOF
26679
26680 if test -n "$CXX"; then
26681
26682 echo "$as_me:26682: checking if $CXX accepts static_cast" >&5
26683 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
26684 if test "${cf_cv_cpp_static_cast+set}" = set; then
26685   echo $ECHO_N "(cached) $ECHO_C" >&6
26686 else
26687
26688         ac_ext=cc
26689 ac_cpp='$CXXCPP $CPPFLAGS'
26690 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26691 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26692 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26693 ac_main_return="return"
26694
26695         cat >"conftest.$ac_ext" <<_ACEOF
26696 #line 26696 "configure"
26697 #include "confdefs.h"
26698
26699 class NCursesPanel
26700 {
26701 public:
26702   NCursesPanel(int nlines,
26703                int ncols,
26704                int begin_y = 0,
26705                int begin_x = 0)
26706   {
26707   }
26708   NCursesPanel();
26709   ~NCursesPanel();
26710 };
26711
26712 template<class T> class NCursesUserPanel : public NCursesPanel
26713 {
26714 public:
26715   NCursesUserPanel (int nlines,
26716                     int ncols,
26717                     int begin_y = 0,
26718                     int begin_x = 0,
26719                     const T* p_UserData = static_cast<T*>(0))
26720     : NCursesPanel (nlines, ncols, begin_y, begin_x)
26721   {
26722   };
26723   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
26724   {
26725   };
26726
26727   virtual ~NCursesUserPanel() {};
26728 };
26729
26730 int
26731 main (void)
26732 {
26733
26734         const char* p_UserData = static_cast<char*>(0)
26735   ;
26736   return 0;
26737 }
26738 _ACEOF
26739 rm -f "conftest.$ac_objext"
26740 if { (eval echo "$as_me:26740: \"$ac_compile\"") >&5
26741   (eval $ac_compile) 2>&5
26742   ac_status=$?
26743   echo "$as_me:26743: \$? = $ac_status" >&5
26744   (exit "$ac_status"); } &&
26745          { ac_try='test -s "conftest.$ac_objext"'
26746   { (eval echo "$as_me:26746: \"$ac_try\"") >&5
26747   (eval $ac_try) 2>&5
26748   ac_status=$?
26749   echo "$as_me:26749: \$? = $ac_status" >&5
26750   (exit "$ac_status"); }; }; then
26751   cf_cv_cpp_static_cast=yes
26752 else
26753   echo "$as_me: failed program was:" >&5
26754 cat "conftest.$ac_ext" >&5
26755 cf_cv_cpp_static_cast=no
26756 fi
26757 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26758
26759         ac_ext=cc
26760 ac_cpp='$CXXCPP $CPPFLAGS'
26761 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26762 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26763 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26764 ac_main_return="return"
26765
26766 fi
26767 echo "$as_me:26767: result: $cf_cv_cpp_static_cast" >&5
26768 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
26769
26770 fi
26771
26772 test "$cf_cv_cpp_static_cast" = yes &&
26773 cat >>confdefs.h <<\EOF
26774 #define CPP_HAS_STATIC_CAST 1
26775 EOF
26776
26777         CXX_AR='$(AR)'
26778         CXX_ARFLAGS='$(ARFLAGS)'
26779         case "$cf_cv_system_name" in
26780         (irix*)
26781             if test "$GXX" != yes ; then
26782                 CXX_AR='$(CXX)'
26783                 CXX_ARFLAGS='-ar -o'
26784             fi
26785             ;;
26786         (sco3.2v5*)
26787             CXXLDFLAGS="-u main"
26788             ;;
26789         (solaris2*)
26790             if test "$GXX" != yes ; then
26791                 CXX_AR='$(CXX)'
26792                 CXX_ARFLAGS='-xar -o'
26793             fi
26794             ;;
26795         esac
26796
26797 else
26798         cf_cxx_library=no
26799         cf_cv_builtin_bool=1
26800
26801         # Just because we are not configuring against C++ right now does not
26802         # mean that a user will not want to use C++.  Some distributors disable
26803         # the C++ portion of this configuration as a shortcut (or just to avoid
26804         # compiling the demo in the c++ directory).  So we need a reasonable
26805         # default for the 'bool' type.
26806         #
26807         # Caveat: since the storage of the bool type is not standardized, it
26808         # may change.
26809
26810         if test "$NCURSES_BOOL" != auto ; then
26811                 cf_cv_type_of_bool=$NCURSES_BOOL
26812                 cf_cv_header_stdbool_h=0
26813         else
26814                 if test "$cf_cv_header_stdbool_h" = 1 ; then
26815
26816 echo "$as_me:26816: checking for bool" >&5
26817 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26818 if test "${ac_cv_type_bool+set}" = set; then
26819   echo $ECHO_N "(cached) $ECHO_C" >&6
26820 else
26821   cat >"conftest.$ac_ext" <<_ACEOF
26822 #line 26822 "configure"
26823 #include "confdefs.h"
26824
26825 $ac_includes_default
26826
26827 #if defined(__cplusplus)
26828
26829 #ifdef HAVE_GXX_BUILTIN_H
26830 #include <g++/builtin.h>
26831 #elif HAVE_GPP_BUILTIN_H
26832 #include <gpp/builtin.h>
26833 #elif HAVE_BUILTIN_H
26834 #include <builtin.h>
26835 #endif
26836
26837 #else
26838
26839 #if $cf_cv_header_stdbool_h
26840 #include <stdbool.h>
26841 #endif
26842
26843 #endif
26844
26845 int
26846 main (void)
26847 {
26848 if ((bool *) 0)
26849   return 0;
26850 if (sizeof (bool))
26851   return 0;
26852   ;
26853   return 0;
26854 }
26855 _ACEOF
26856 rm -f "conftest.$ac_objext"
26857 if { (eval echo "$as_me:26857: \"$ac_compile\"") >&5
26858   (eval $ac_compile) 2>&5
26859   ac_status=$?
26860   echo "$as_me:26860: \$? = $ac_status" >&5
26861   (exit "$ac_status"); } &&
26862          { ac_try='test -s "conftest.$ac_objext"'
26863   { (eval echo "$as_me:26863: \"$ac_try\"") >&5
26864   (eval $ac_try) 2>&5
26865   ac_status=$?
26866   echo "$as_me:26866: \$? = $ac_status" >&5
26867   (exit "$ac_status"); }; }; then
26868   ac_cv_type_bool=yes
26869 else
26870   echo "$as_me: failed program was:" >&5
26871 cat "conftest.$ac_ext" >&5
26872 ac_cv_type_bool=no
26873 fi
26874 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26875 fi
26876 echo "$as_me:26876: result: $ac_cv_type_bool" >&5
26877 echo "${ECHO_T}$ac_cv_type_bool" >&6
26878
26879 echo "$as_me:26879: checking size of bool" >&5
26880 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26881 if test "${ac_cv_sizeof_bool+set}" = set; then
26882   echo $ECHO_N "(cached) $ECHO_C" >&6
26883 else
26884   if test "$ac_cv_type_bool" = yes; then
26885   if test "$cross_compiling" = yes; then
26886   # Depending upon the size, compute the lo and hi bounds.
26887 cat >"conftest.$ac_ext" <<_ACEOF
26888 #line 26888 "configure"
26889 #include "confdefs.h"
26890
26891 $ac_includes_default
26892
26893 #if defined(__cplusplus)
26894
26895 #ifdef HAVE_GXX_BUILTIN_H
26896 #include <g++/builtin.h>
26897 #elif HAVE_GPP_BUILTIN_H
26898 #include <gpp/builtin.h>
26899 #elif HAVE_BUILTIN_H
26900 #include <builtin.h>
26901 #endif
26902
26903 #else
26904
26905 #if $cf_cv_header_stdbool_h
26906 #include <stdbool.h>
26907 #endif
26908
26909 #endif
26910
26911 int
26912 main (void)
26913 {
26914 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26915   ;
26916   return 0;
26917 }
26918 _ACEOF
26919 rm -f "conftest.$ac_objext"
26920 if { (eval echo "$as_me:26920: \"$ac_compile\"") >&5
26921   (eval $ac_compile) 2>&5
26922   ac_status=$?
26923   echo "$as_me:26923: \$? = $ac_status" >&5
26924   (exit "$ac_status"); } &&
26925          { ac_try='test -s "conftest.$ac_objext"'
26926   { (eval echo "$as_me:26926: \"$ac_try\"") >&5
26927   (eval $ac_try) 2>&5
26928   ac_status=$?
26929   echo "$as_me:26929: \$? = $ac_status" >&5
26930   (exit "$ac_status"); }; }; then
26931   ac_lo=0 ac_mid=0
26932   while :; do
26933     cat >"conftest.$ac_ext" <<_ACEOF
26934 #line 26934 "configure"
26935 #include "confdefs.h"
26936
26937 $ac_includes_default
26938
26939 #if defined(__cplusplus)
26940
26941 #ifdef HAVE_GXX_BUILTIN_H
26942 #include <g++/builtin.h>
26943 #elif HAVE_GPP_BUILTIN_H
26944 #include <gpp/builtin.h>
26945 #elif HAVE_BUILTIN_H
26946 #include <builtin.h>
26947 #endif
26948
26949 #else
26950
26951 #if $cf_cv_header_stdbool_h
26952 #include <stdbool.h>
26953 #endif
26954
26955 #endif
26956
26957 int
26958 main (void)
26959 {
26960 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26961   ;
26962   return 0;
26963 }
26964 _ACEOF
26965 rm -f "conftest.$ac_objext"
26966 if { (eval echo "$as_me:26966: \"$ac_compile\"") >&5
26967   (eval $ac_compile) 2>&5
26968   ac_status=$?
26969   echo "$as_me:26969: \$? = $ac_status" >&5
26970   (exit "$ac_status"); } &&
26971          { ac_try='test -s "conftest.$ac_objext"'
26972   { (eval echo "$as_me:26972: \"$ac_try\"") >&5
26973   (eval $ac_try) 2>&5
26974   ac_status=$?
26975   echo "$as_me:26975: \$? = $ac_status" >&5
26976   (exit "$ac_status"); }; }; then
26977   ac_hi=$ac_mid; break
26978 else
26979   echo "$as_me: failed program was:" >&5
26980 cat "conftest.$ac_ext" >&5
26981 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26982 fi
26983 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26984   done
26985 else
26986   echo "$as_me: failed program was:" >&5
26987 cat "conftest.$ac_ext" >&5
26988 ac_hi=-1 ac_mid=-1
26989   while :; do
26990     cat >"conftest.$ac_ext" <<_ACEOF
26991 #line 26991 "configure"
26992 #include "confdefs.h"
26993
26994 $ac_includes_default
26995
26996 #if defined(__cplusplus)
26997
26998 #ifdef HAVE_GXX_BUILTIN_H
26999 #include <g++/builtin.h>
27000 #elif HAVE_GPP_BUILTIN_H
27001 #include <gpp/builtin.h>
27002 #elif HAVE_BUILTIN_H
27003 #include <builtin.h>
27004 #endif
27005
27006 #else
27007
27008 #if $cf_cv_header_stdbool_h
27009 #include <stdbool.h>
27010 #endif
27011
27012 #endif
27013
27014 int
27015 main (void)
27016 {
27017 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
27018   ;
27019   return 0;
27020 }
27021 _ACEOF
27022 rm -f "conftest.$ac_objext"
27023 if { (eval echo "$as_me:27023: \"$ac_compile\"") >&5
27024   (eval $ac_compile) 2>&5
27025   ac_status=$?
27026   echo "$as_me:27026: \$? = $ac_status" >&5
27027   (exit "$ac_status"); } &&
27028          { ac_try='test -s "conftest.$ac_objext"'
27029   { (eval echo "$as_me:27029: \"$ac_try\"") >&5
27030   (eval $ac_try) 2>&5
27031   ac_status=$?
27032   echo "$as_me:27032: \$? = $ac_status" >&5
27033   (exit "$ac_status"); }; }; then
27034   ac_lo=$ac_mid; break
27035 else
27036   echo "$as_me: failed program was:" >&5
27037 cat "conftest.$ac_ext" >&5
27038 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27039 fi
27040 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27041   done
27042 fi
27043 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27044 # Binary search between lo and hi bounds.
27045 while test "x$ac_lo" != "x$ac_hi"; do
27046   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27047   cat >"conftest.$ac_ext" <<_ACEOF
27048 #line 27048 "configure"
27049 #include "confdefs.h"
27050
27051 $ac_includes_default
27052
27053 #if defined(__cplusplus)
27054
27055 #ifdef HAVE_GXX_BUILTIN_H
27056 #include <g++/builtin.h>
27057 #elif HAVE_GPP_BUILTIN_H
27058 #include <gpp/builtin.h>
27059 #elif HAVE_BUILTIN_H
27060 #include <builtin.h>
27061 #endif
27062
27063 #else
27064
27065 #if $cf_cv_header_stdbool_h
27066 #include <stdbool.h>
27067 #endif
27068
27069 #endif
27070
27071 int
27072 main (void)
27073 {
27074 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
27075   ;
27076   return 0;
27077 }
27078 _ACEOF
27079 rm -f "conftest.$ac_objext"
27080 if { (eval echo "$as_me:27080: \"$ac_compile\"") >&5
27081   (eval $ac_compile) 2>&5
27082   ac_status=$?
27083   echo "$as_me:27083: \$? = $ac_status" >&5
27084   (exit "$ac_status"); } &&
27085          { ac_try='test -s "conftest.$ac_objext"'
27086   { (eval echo "$as_me:27086: \"$ac_try\"") >&5
27087   (eval $ac_try) 2>&5
27088   ac_status=$?
27089   echo "$as_me:27089: \$? = $ac_status" >&5
27090   (exit "$ac_status"); }; }; then
27091   ac_hi=$ac_mid
27092 else
27093   echo "$as_me: failed program was:" >&5
27094 cat "conftest.$ac_ext" >&5
27095 ac_lo=`expr "$ac_mid" + 1`
27096 fi
27097 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27098 done
27099 ac_cv_sizeof_bool=$ac_lo
27100 else
27101   if test "$cross_compiling" = yes; then
27102   { { echo "$as_me:27102: error: cannot run test program while cross compiling" >&5
27103 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27104    { (exit 1); exit 1; }; }
27105 else
27106   cat >"conftest.$ac_ext" <<_ACEOF
27107 #line 27107 "configure"
27108 #include "confdefs.h"
27109
27110 $ac_includes_default
27111
27112 #if defined(__cplusplus)
27113
27114 #ifdef HAVE_GXX_BUILTIN_H
27115 #include <g++/builtin.h>
27116 #elif HAVE_GPP_BUILTIN_H
27117 #include <gpp/builtin.h>
27118 #elif HAVE_BUILTIN_H
27119 #include <builtin.h>
27120 #endif
27121
27122 #else
27123
27124 #if $cf_cv_header_stdbool_h
27125 #include <stdbool.h>
27126 #endif
27127
27128 #endif
27129
27130 int
27131 main (void)
27132 {
27133 FILE *f = fopen ("conftest.val", "w");
27134 if (!f)
27135   $ac_main_return (1);
27136 fprintf (f, "%ld", (long)(sizeof (bool)));
27137 fclose (f);
27138   ;
27139   return 0;
27140 }
27141 _ACEOF
27142 rm -f "conftest$ac_exeext"
27143 if { (eval echo "$as_me:27143: \"$ac_link\"") >&5
27144   (eval $ac_link) 2>&5
27145   ac_status=$?
27146   echo "$as_me:27146: \$? = $ac_status" >&5
27147   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27148   { (eval echo "$as_me:27148: \"$ac_try\"") >&5
27149   (eval $ac_try) 2>&5
27150   ac_status=$?
27151   echo "$as_me:27151: \$? = $ac_status" >&5
27152   (exit "$ac_status"); }; }; then
27153   ac_cv_sizeof_bool=`cat conftest.val`
27154 else
27155   echo "$as_me: program exited with status $ac_status" >&5
27156 echo "$as_me: failed program was:" >&5
27157 cat "conftest.$ac_ext" >&5
27158 fi
27159 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27160 fi
27161 fi
27162 rm -f conftest.val
27163 else
27164   ac_cv_sizeof_bool=0
27165 fi
27166 fi
27167 echo "$as_me:27167: result: $ac_cv_sizeof_bool" >&5
27168 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
27169 cat >>confdefs.h <<EOF
27170 #define SIZEOF_BOOL $ac_cv_sizeof_bool
27171 EOF
27172
27173 echo "$as_me:27173: checking for type of bool" >&5
27174 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
27175 if test "${cf_cv_type_of_bool+set}" = set; then
27176   echo $ECHO_N "(cached) $ECHO_C" >&6
27177 else
27178
27179         rm -f cf_test.out
27180         if test "$cross_compiling" = yes; then
27181
27182                 case x$ac_cv_sizeof_bool in
27183                 (x1) cf_cv_type_of_bool="unsigned char";;
27184                 (x2) cf_cv_type_of_bool="unsigned short";;
27185                 (x4) cf_cv_type_of_bool="unsigned int";;
27186                 (x8) cf_cv_type_of_bool="unsigned long";;
27187                 (*)  cf_cv_type_of_bool=unknown;;
27188                 esac
27189
27190 else
27191   cat >"conftest.$ac_ext" <<_ACEOF
27192 #line 27192 "configure"
27193 #include "confdefs.h"
27194
27195 $ac_includes_default
27196
27197 #if defined(__cplusplus)
27198
27199 #ifdef HAVE_GXX_BUILTIN_H
27200 #include <g++/builtin.h>
27201 #elif HAVE_GPP_BUILTIN_H
27202 #include <gpp/builtin.h>
27203 #elif HAVE_BUILTIN_H
27204 #include <builtin.h>
27205 #endif
27206
27207 #else
27208
27209 #if $cf_cv_header_stdbool_h
27210 #include <stdbool.h>
27211 #endif
27212
27213 #endif
27214
27215 int main(void)
27216 {
27217         FILE *fp = fopen("cf_test.out", "w");
27218         if (fp != 0) {
27219                 bool x = true;
27220                 if ((bool)(-x) >= 0)
27221                         fputs("unsigned ", fp);
27222                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
27223                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
27224                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
27225                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
27226                 fclose(fp);
27227         }
27228         ${cf_cv_main_return:-return}(0);
27229 }
27230
27231 _ACEOF
27232 rm -f "conftest$ac_exeext"
27233 if { (eval echo "$as_me:27233: \"$ac_link\"") >&5
27234   (eval $ac_link) 2>&5
27235   ac_status=$?
27236   echo "$as_me:27236: \$? = $ac_status" >&5
27237   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27238   { (eval echo "$as_me:27238: \"$ac_try\"") >&5
27239   (eval $ac_try) 2>&5
27240   ac_status=$?
27241   echo "$as_me:27241: \$? = $ac_status" >&5
27242   (exit "$ac_status"); }; }; then
27243   cf_cv_type_of_bool=`cat cf_test.out`
27244                  if test -z "$cf_cv_type_of_bool"; then
27245                    cf_cv_type_of_bool=unknown
27246                  fi
27247 else
27248   echo "$as_me: program exited with status $ac_status" >&5
27249 echo "$as_me: failed program was:" >&5
27250 cat "conftest.$ac_ext" >&5
27251 cf_cv_type_of_bool=unknown
27252 fi
27253 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27254 fi
27255         rm -f cf_test.out
27256
27257 fi
27258 echo "$as_me:27258: result: $cf_cv_type_of_bool" >&5
27259 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27260
27261 if test "$cf_cv_type_of_bool" = unknown ; then
27262         case .$NCURSES_BOOL in
27263         (.auto|.) NCURSES_BOOL=unsigned;;
27264         esac
27265         { echo "$as_me:27265: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
27266 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
27267         cf_cv_type_of_bool=$NCURSES_BOOL
27268 fi
27269
27270                 else
27271                         echo "$as_me:27271: checking for fallback type of bool" >&5
27272 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
27273                         case "$host_cpu" in
27274                         (i?86)  cf_cv_type_of_bool=char ;;
27275                         (*)     cf_cv_type_of_bool=int  ;;
27276                         esac
27277                         echo "$as_me:27277: result: $cf_cv_type_of_bool" >&5
27278 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27279                 fi
27280         fi
27281 fi
27282
27283 # If the C compiler did not declare bool, and we did not determine that the C++
27284 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
27285 # ncurses library use the same type as C++ bool.  Note that this allows one to
27286 # specify the type of bool in a configure-script option and postpone
27287 # integration with the C++ compiler provided that the types are compatible.
27288 USE_CXX_BOOL=1
27289 if test "$cf_cv_cc_bool_type" = 1
27290 then
27291         # oops: C has a bool.  Unlikely, but C++ could differ.
27292         USE_CXX_BOOL=0
27293 elif test "$cf_cv_builtin_bool" = 0
27294 then
27295         # C++ has no bool
27296         USE_CXX_BOOL=0
27297 else
27298         # this is the normal case
27299         USE_CXX_BOOL='defined(__cplusplus)'
27300 fi
27301
27302 if test -f "${srcdir}/Ada95/Makefile.in" ; then
27303
27304         if test "$cf_with_ada" != "no" ; then
27305                 if test "$with_libtool" != "no"; then
27306                         { echo "$as_me:27306: WARNING: libtool does not support Ada - disabling feature" >&5
27307 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
27308                         cf_with_ada=no
27309                 fi
27310         fi
27311
27312         if test "$cf_with_ada" != "no" ; then
27313
27314 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
27315 do
27316
27317 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27318
27319         unset ac_cv_path_cf_TEMP_gnat
27320         unset cf_TEMP_gnat
27321         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
27322 set dummy $cf_prog_gnat; ac_word=$2
27323 echo "$as_me:27323: checking for $ac_word" >&5
27324 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27325 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
27326   echo $ECHO_N "(cached) $ECHO_C" >&6
27327 else
27328   case $cf_TEMP_gnat in
27329   [\\/]* | ?:[\\/]*)
27330   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
27331   ;;
27332   *)
27333   ac_save_IFS=$IFS; IFS=$ac_path_separator
27334 ac_dummy="$PATH"
27335 for ac_dir in $ac_dummy; do
27336   IFS=$ac_save_IFS
27337   test -z "$ac_dir" && ac_dir=.
27338   if $as_executable_p "$ac_dir/$ac_word"; then
27339    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
27340    echo "$as_me:27340: found $ac_dir/$ac_word" >&5
27341    break
27342 fi
27343 done
27344
27345   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
27346   ;;
27347 esac
27348 fi
27349 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
27350
27351 if test -n "$cf_TEMP_gnat"; then
27352   echo "$as_me:27352: result: $cf_TEMP_gnat" >&5
27353 echo "${ECHO_T}$cf_TEMP_gnat" >&6
27354 else
27355   echo "$as_me:27355: result: no" >&5
27356 echo "${ECHO_T}no" >&6
27357 fi
27358
27359         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
27360
27361         if test "x$cf_TEMP_gnat" != xno; then
27362                 unset cf_cv_gnat_version
27363                 unset cf_TEMP_gnat
27364
27365 echo "$as_me:27365: checking for $cf_prog_gnat version" >&5
27366 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
27367 if test "${cf_cv_gnat_version+set}" = set; then
27368   echo $ECHO_N "(cached) $ECHO_C" >&6
27369 else
27370
27371 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
27372         grep '[0-9].[0-9][0-9]*' |\
27373         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27374
27375 fi
27376 echo "$as_me:27376: result: $cf_cv_gnat_version" >&5
27377 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27378 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27379 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
27380
27381         fi
27382         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
27383
27384         unset cf_TEMP_gnat
27385         unset cf_cv_gnat_version
27386         unset ac_cv_path_cf_TEMP_gnat
27387 done
27388
27389 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
27390         cf_ada_make=
27391         cf_cv_prog_gnat_correct=no
27392 else
27393         cf_ada_make=gnatmake
27394         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
27395                 # gprconfig is newer than gnatmake; we can continue...
27396                 cf_ada_config="##"
27397         else
27398                 rm -rf ./conftest* ./*~conftest*
27399                 if mkdir conftest.src
27400                 then
27401                         cf_ada_config=""
27402                         cd conftest.src
27403                         for cf_gprconfig in Ada C
27404                         do
27405                                 echo "$as_me:27405: checking for gprconfig name for $cf_gprconfig" >&5
27406 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
27407                                 if test "$cf_gprconfig" = C
27408                                 then
27409                                         for cf_gprconfig_param in \
27410                                                 "$cf_gprconfig,,,,GNATGCC" \
27411                                                 "$cf_gprconfig,,,,GCC" \
27412                                                 "$cf_gprconfig"
27413                                         do
27414                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27415                                                 test -n "$cf_gprconfig_value" && break
27416                                         done
27417                                 else
27418                                         cf_gprconfig_param=$cf_gprconfig
27419                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27420                                 fi
27421                                 if test -n "$cf_gprconfig_value"
27422                                 then
27423                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
27424                                         echo "$as_me:27424: result: $cf_gprconfig_value" >&5
27425 echo "${ECHO_T}$cf_gprconfig_value" >&6
27426                                 else
27427                                         echo "$as_me:27427: result: missing" >&5
27428 echo "${ECHO_T}missing" >&6
27429                                         cf_ada_config="#"
27430                                         break
27431                                 fi
27432                         done
27433                         cd ..
27434                         rm -rf ./conftest* ./*~conftest*
27435                 fi
27436         fi
27437         if test "x$cf_ada_config" != "x#"
27438         then
27439
27440 echo "$as_me:27440: checking for gnat version" >&5
27441 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
27442 if test "${cf_cv_gnat_version+set}" = set; then
27443   echo $ECHO_N "(cached) $ECHO_C" >&6
27444 else
27445
27446 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
27447         grep '[0-9].[0-9][0-9]*' |\
27448         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27449
27450 fi
27451 echo "$as_me:27451: result: $cf_cv_gnat_version" >&5
27452 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27453 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27454
27455 case "$cf_cv_gnat_version" in
27456 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27457         cf_cv_prog_gnat_correct=yes
27458         ;;
27459 (*)
27460         { echo "$as_me:27460: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
27461 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
27462         cf_cv_prog_gnat_correct=no
27463         ;;
27464 esac
27465
27466                 # Extract the first word of "m4", so it can be a program name with args.
27467 set dummy m4; ac_word=$2
27468 echo "$as_me:27468: checking for $ac_word" >&5
27469 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27470 if test "${ac_cv_prog_M4_exists+set}" = set; then
27471   echo $ECHO_N "(cached) $ECHO_C" >&6
27472 else
27473   if test -n "$M4_exists"; then
27474   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
27475 else
27476   ac_save_IFS=$IFS; IFS=$ac_path_separator
27477 ac_dummy="$PATH"
27478 for ac_dir in $ac_dummy; do
27479   IFS=$ac_save_IFS
27480   test -z "$ac_dir" && ac_dir=.
27481   $as_executable_p "$ac_dir/$ac_word" || continue
27482 ac_cv_prog_M4_exists="yes"
27483 echo "$as_me:27483: found $ac_dir/$ac_word" >&5
27484 break
27485 done
27486
27487   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
27488 fi
27489 fi
27490 M4_exists=$ac_cv_prog_M4_exists
27491 if test -n "$M4_exists"; then
27492   echo "$as_me:27492: result: $M4_exists" >&5
27493 echo "${ECHO_T}$M4_exists" >&6
27494 else
27495   echo "$as_me:27495: result: no" >&5
27496 echo "${ECHO_T}no" >&6
27497 fi
27498
27499                 if test "$ac_cv_prog_M4_exists" = no; then
27500                         cf_cv_prog_gnat_correct=no
27501                         { echo "$as_me:27501: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
27502 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
27503                 fi
27504                 if test "$cf_cv_prog_gnat_correct" = yes; then
27505                         echo "$as_me:27505: checking if GNAT works" >&5
27506 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
27507
27508 rm -rf ./conftest* ./*~conftest*
27509 cat >>conftest.ads <<CF_EOF
27510 procedure conftest;
27511 CF_EOF
27512 cat >>conftest.adb <<CF_EOF
27513 with Text_IO;
27514 with GNAT.OS_Lib;
27515 procedure conftest is
27516 begin
27517    Text_IO.Put ("Hello World");
27518    Text_IO.New_Line;
27519    GNAT.OS_Lib.OS_Exit (0);
27520 end conftest;
27521 CF_EOF
27522 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27523    if ( ./conftest 1>&5 2>&1 ) ; then
27524       cf_cv_prog_gnat_correct=yes
27525    else
27526       cf_cv_prog_gnat_correct=no
27527    fi
27528 else
27529    cf_cv_prog_gnat_correct=no
27530 fi
27531 rm -rf ./conftest* ./*~conftest*
27532
27533                         echo "$as_me:27533: result: $cf_cv_prog_gnat_correct" >&5
27534 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
27535                 fi
27536         else
27537                 cf_cv_prog_gnat_correct=no
27538         fi
27539 fi
27540
27541                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
27542
27543         ADAFLAGS="$ADAFLAGS -gnatpn"
27544
27545         echo "$as_me:27545: checking optimization options for ADAFLAGS" >&5
27546 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
27547         case "$CFLAGS" in
27548         (*-g*)
27549
27550         ADAFLAGS="$ADAFLAGS -g"
27551
27552                 ;;
27553         esac
27554         case "$CFLAGS" in
27555         (*-O*)
27556                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
27557
27558         ADAFLAGS="$ADAFLAGS $cf_O_flag"
27559
27560                 ;;
27561         esac
27562         echo "$as_me:27562: result: $ADAFLAGS" >&5
27563 echo "${ECHO_T}$ADAFLAGS" >&6
27564
27565 echo "$as_me:27565: checking if GNATPREP supports -T option" >&5
27566 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
27567 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
27568   echo $ECHO_N "(cached) $ECHO_C" >&6
27569 else
27570
27571 cf_cv_gnatprep_opt_t=no
27572 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
27573
27574 fi
27575 echo "$as_me:27575: result: $cf_cv_gnatprep_opt_t" >&5
27576 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
27577 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
27578
27579 echo "$as_me:27579: checking if GNAT supports generics" >&5
27580 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
27581 case "$cf_cv_gnat_version" in
27582 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27583         cf_gnat_generics=yes
27584         ;;
27585 (*)
27586         cf_gnat_generics=no
27587         ;;
27588 esac
27589 echo "$as_me:27589: result: $cf_gnat_generics" >&5
27590 echo "${ECHO_T}$cf_gnat_generics" >&6
27591
27592 if test "$cf_gnat_generics" = yes
27593 then
27594         cf_compile_generics=generics
27595         cf_generic_objects="\${GENOBJS}"
27596 else
27597         cf_compile_generics=
27598         cf_generic_objects=
27599 fi
27600
27601 echo "$as_me:27601: checking if GNAT supports SIGINT" >&5
27602 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
27603 if test "${cf_cv_gnat_sigint+set}" = set; then
27604   echo $ECHO_N "(cached) $ECHO_C" >&6
27605 else
27606
27607 rm -rf ./conftest* ./*~conftest*
27608 cat >>conftest.ads <<CF_EOF
27609 with Ada.Interrupts.Names;
27610
27611 package ConfTest is
27612
27613    pragma Warnings (Off);  --  the next pragma exists since 3.11p
27614    pragma Unreserve_All_Interrupts;
27615    pragma Warnings (On);
27616
27617    protected Process is
27618       procedure Stop;
27619       function Continue return Boolean;
27620       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
27621    private
27622       Done : Boolean := False;
27623    end Process;
27624
27625 end ConfTest;
27626 CF_EOF
27627 cat >>conftest.adb <<CF_EOF
27628 package body ConfTest is
27629    protected body Process is
27630       procedure Stop is
27631       begin
27632          Done := True;
27633       end Stop;
27634       function Continue return Boolean is
27635       begin
27636          return not Done;
27637       end Continue;
27638    end Process;
27639 end ConfTest;
27640 CF_EOF
27641 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27642       cf_cv_gnat_sigint=yes
27643 else
27644    cf_cv_gnat_sigint=no
27645 fi
27646 rm -rf ./conftest* ./*~conftest*
27647
27648 fi
27649 echo "$as_me:27649: result: $cf_cv_gnat_sigint" >&5
27650 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
27651
27652 if test "$cf_cv_gnat_sigint" = yes ; then
27653         USE_GNAT_SIGINT=""
27654 else
27655         USE_GNAT_SIGINT="#"
27656 fi
27657
27658 cf_gnat_libraries=no
27659 cf_gnat_projects=no
27660
27661 if test "$enable_gnat_projects" != no ; then
27662 echo "$as_me:27662: checking if GNAT supports project files" >&5
27663 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
27664 case "$cf_cv_gnat_version" in
27665 (3.[0-9]*)
27666         ;;
27667 (*)
27668         case "$cf_cv_system_name" in
27669         (cygwin*|msys*)
27670                 ;;
27671         (*)
27672                 rm -rf ./conftest* ./*~conftest*
27673                 if mkdir conftest.src conftest.bin conftest.lib
27674                 then
27675                         cd conftest.src
27676                         rm -rf ./conftest* ./*~conftest*
27677                         cat >>library.gpr <<CF_EOF
27678 project Library is
27679   Kind := External ("LIB_KIND");
27680   for Library_Name use "ConfTest";
27681   for Object_Dir use ".";
27682   for Library_ALI_Dir use External("LIBRARY_DIR");
27683   for Library_Version use External ("SONAME");
27684   for Library_Kind use Kind;
27685   for Library_Dir use External("BUILD_DIR");
27686   Source_Dir := External ("SOURCE_DIR");
27687   for Source_Dirs use (Source_Dir);
27688 end Library;
27689 CF_EOF
27690                         cat >>confpackage.ads <<CF_EOF
27691 package ConfPackage is
27692    procedure conftest;
27693 end ConfPackage;
27694 CF_EOF
27695                         cat >>confpackage.adb <<CF_EOF
27696 with Text_IO;
27697 package body ConfPackage is
27698    procedure conftest is
27699    begin
27700       Text_IO.Put ("Hello World");
27701       Text_IO.New_Line;
27702    end conftest;
27703 end ConfPackage;
27704 CF_EOF
27705                         if ( "$cf_ada_make" $ADAFLAGS \
27706                                         -Plibrary.gpr \
27707                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
27708                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
27709                                         -XSOURCE_DIR="`pwd`" \
27710                                         -XSONAME=libConfTest.so.1 \
27711                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
27712                                 cf_gnat_projects=yes
27713                         fi
27714                         cd ..
27715                 fi
27716                 if test -f conftest.lib/confpackage.ali
27717                 then
27718                         cf_gnat_libraries=yes
27719                 fi
27720                 rm -rf ./conftest* ./*~conftest*
27721                 ;;
27722         esac
27723         ;;
27724 esac
27725 echo "$as_me:27725: result: $cf_gnat_projects" >&5
27726 echo "${ECHO_T}$cf_gnat_projects" >&6
27727 fi # enable_gnat_projects
27728
27729 if test "$cf_gnat_projects" = yes
27730 then
27731         echo "$as_me:27731: checking if GNAT supports libraries" >&5
27732 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
27733         echo "$as_me:27733: result: $cf_gnat_libraries" >&5
27734 echo "${ECHO_T}$cf_gnat_libraries" >&6
27735 fi
27736
27737 USE_OLD_MAKERULES=""
27738 USE_GNAT_PROJECTS="#"
27739 USE_GNAT_MAKE_GPR="#"
27740 USE_GNAT_GPRBUILD="#"
27741
27742 if test "$cf_gnat_projects" = yes
27743 then
27744         USE_OLD_MAKERULES="#"
27745         USE_GNAT_PROJECTS=""
27746         if test "$cf_cv_VERSION_GPRBUILD" != no
27747         then
27748                 USE_GNAT_GPRBUILD=""
27749         elif test "$cf_cv_VERSION_GNATMAKE" != no
27750         then
27751                 USE_GNAT_MAKE_GPR=""
27752         else
27753                 { echo "$as_me:27753: WARNING: use old makefile rules since tools are missing" >&5
27754 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
27755         fi
27756 fi
27757
27758 if test "$cf_gnat_libraries" = yes
27759 then
27760         USE_GNAT_LIBRARIES=""
27761 else
27762         USE_GNAT_LIBRARIES="#"
27763 fi
27764
27765 echo "$as_me:27765: checking for Ada95 compiler" >&5
27766 echo $ECHO_N "checking for Ada95 compiler... $ECHO_C" >&6
27767
27768 # Check whether --with-ada-compiler or --without-ada-compiler was given.
27769 if test "${with_ada_compiler+set}" = set; then
27770   withval="$with_ada_compiler"
27771   cf_ada_compiler=$withval
27772 else
27773   cf_ada_compiler=gnatmake
27774 fi;
27775
27776 echo "$as_me:27776: result: $cf_ada_compiler" >&5
27777 echo "${ECHO_T}$cf_ada_compiler" >&6
27778
27779                         cf_ada_package=terminal_interface
27780
27781 echo "$as_me:27781: checking for Ada95 include directory" >&5
27782 echo $ECHO_N "checking for Ada95 include directory... $ECHO_C" >&6
27783
27784 # Check whether --with-ada-include or --without-ada-include was given.
27785 if test "${with_ada_include+set}" = set; then
27786   withval="$with_ada_include"
27787
27788 else
27789   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
27790 fi; if test -n "$prefix/share/ada/adainclude" ; then
27791
27792 if test "x$prefix" != xNONE; then
27793         cf_path_syntax="$prefix"
27794 else
27795         cf_path_syntax="$ac_default_prefix"
27796 fi
27797
27798 case ".$withval" in
27799 (.\$\(*\)*|.\'*\'*)
27800         ;;
27801 (..|./*|.\\*)
27802         ;;
27803 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27804         ;;
27805 (.\$\{*prefix\}*|.\$\{*dir\}*)
27806         eval withval="$withval"
27807         case ".$withval" in
27808         (.NONE/*)
27809                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27810                 ;;
27811         esac
27812         ;;
27813 (.no|.NONE/*)
27814         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27815         ;;
27816 (*)
27817         { { echo "$as_me:27817: error: expected a pathname, not \"$withval\"" >&5
27818 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27819    { (exit 1); exit 1; }; }
27820         ;;
27821 esac
27822
27823 fi
27824 eval ADA_INCLUDE="$withval"
27825
27826 echo "$as_me:27826: result: $ADA_INCLUDE" >&5
27827 echo "${ECHO_T}$ADA_INCLUDE" >&6
27828
27829 echo "$as_me:27829: checking for Ada95 object directory" >&5
27830 echo $ECHO_N "checking for Ada95 object directory... $ECHO_C" >&6
27831
27832 # Check whether --with-ada-objects or --without-ada-objects was given.
27833 if test "${with_ada_objects+set}" = set; then
27834   withval="$with_ada_objects"
27835
27836 else
27837   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
27838 fi; if test -n "$prefix/lib/ada/adalib" ; then
27839
27840 if test "x$prefix" != xNONE; then
27841         cf_path_syntax="$prefix"
27842 else
27843         cf_path_syntax="$ac_default_prefix"
27844 fi
27845
27846 case ".$withval" in
27847 (.\$\(*\)*|.\'*\'*)
27848         ;;
27849 (..|./*|.\\*)
27850         ;;
27851 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27852         ;;
27853 (.\$\{*prefix\}*|.\$\{*dir\}*)
27854         eval withval="$withval"
27855         case ".$withval" in
27856         (.NONE/*)
27857                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27858                 ;;
27859         esac
27860         ;;
27861 (.no|.NONE/*)
27862         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27863         ;;
27864 (*)
27865         { { echo "$as_me:27865: error: expected a pathname, not \"$withval\"" >&5
27866 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27867    { (exit 1); exit 1; }; }
27868         ;;
27869 esac
27870
27871 fi
27872 eval ADA_OBJECTS="$withval"
27873
27874 echo "$as_me:27874: result: $ADA_OBJECTS" >&5
27875 echo "${ECHO_T}$ADA_OBJECTS" >&6
27876
27877 echo "$as_me:27877: checking whether to build an Ada95 shared library" >&5
27878 echo $ECHO_N "checking whether to build an Ada95 shared library... $ECHO_C" >&6
27879
27880 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
27881 if test "${with_ada_sharedlib+set}" = set; then
27882   withval="$with_ada_sharedlib"
27883   with_ada_sharedlib=$withval
27884 else
27885   with_ada_sharedlib=no
27886 fi;
27887 cf_ada_sharedlib_warn=no
27888
27889 if test "x$with_ada_sharedlib" != xno
27890 then
27891         if test "x$cf_gnat_projects" != xyes
27892         then
27893                 with_ada_sharedlib=no
27894                 cf_ada_sharedlib_warn=yes
27895         fi
27896 fi
27897
27898 echo "$as_me:27898: result: $with_ada_sharedlib" >&5
27899 echo "${ECHO_T}$with_ada_sharedlib" >&6
27900 if test "x$cf_ada_sharedlib_warn" != xno
27901 then
27902         { echo "$as_me:27902: WARNING: disabling Ada95 shared library since GNAT projects are not supported" >&5
27903 echo "$as_me: WARNING: disabling Ada95 shared library since GNAT projects are not supported" >&2;}
27904 fi
27905
27906 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
27907 MAKE_ADA_SHAREDLIB="#"
27908
27909 if test "x$with_ada_sharedlib" != xno
27910 then
27911         MAKE_ADA_SHAREDLIB=
27912         if test "x$with_ada_sharedlib" != xyes
27913         then
27914                 ADA_SHAREDLIB="$with_ada_sharedlib"
27915         fi
27916 fi
27917
27918                         # allow the Ada binding to be renamed
27919
27920 echo "$as_me:27920: checking for Ada95 curses library name" >&5
27921 echo $ECHO_N "checking for Ada95 curses library name... $ECHO_C" >&6
27922
27923 # Check whether --with-ada-libname or --without-ada-libname was given.
27924 if test "${with_ada_libname+set}" = set; then
27925   withval="$with_ada_libname"
27926   ADA_LIBNAME=$withval
27927 else
27928   ADA_LIBNAME=AdaCurses
27929 fi;
27930 case "x$ADA_LIBNAME" in
27931 (x|xyes|xno)
27932         ADA_LIBNAME=AdaCurses
27933         ;;
27934 esac
27935
27936 echo "$as_me:27936: result: $ADA_LIBNAME" >&5
27937 echo "${ECHO_T}$ADA_LIBNAME" >&6
27938
27939                 fi
27940         fi
27941 else
27942         cf_with_ada=no
27943 fi
27944
27945 # do this "late" to avoid conflict with header-checks
27946 if test "x$with_widec" = xyes ; then
27947         echo "$as_me:27947: checking for wchar_t" >&5
27948 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
27949 if test "${ac_cv_type_wchar_t+set}" = set; then
27950   echo $ECHO_N "(cached) $ECHO_C" >&6
27951 else
27952   cat >"conftest.$ac_ext" <<_ACEOF
27953 #line 27953 "configure"
27954 #include "confdefs.h"
27955 $ac_includes_default
27956 int
27957 main (void)
27958 {
27959 if ((wchar_t *) 0)
27960   return 0;
27961 if (sizeof (wchar_t))
27962   return 0;
27963   ;
27964   return 0;
27965 }
27966 _ACEOF
27967 rm -f "conftest.$ac_objext"
27968 if { (eval echo "$as_me:27968: \"$ac_compile\"") >&5
27969   (eval $ac_compile) 2>&5
27970   ac_status=$?
27971   echo "$as_me:27971: \$? = $ac_status" >&5
27972   (exit "$ac_status"); } &&
27973          { ac_try='test -s "conftest.$ac_objext"'
27974   { (eval echo "$as_me:27974: \"$ac_try\"") >&5
27975   (eval $ac_try) 2>&5
27976   ac_status=$?
27977   echo "$as_me:27977: \$? = $ac_status" >&5
27978   (exit "$ac_status"); }; }; then
27979   ac_cv_type_wchar_t=yes
27980 else
27981   echo "$as_me: failed program was:" >&5
27982 cat "conftest.$ac_ext" >&5
27983 ac_cv_type_wchar_t=no
27984 fi
27985 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27986 fi
27987 echo "$as_me:27987: result: $ac_cv_type_wchar_t" >&5
27988 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
27989
27990 echo "$as_me:27990: checking size of wchar_t" >&5
27991 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
27992 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
27993   echo $ECHO_N "(cached) $ECHO_C" >&6
27994 else
27995   if test "$ac_cv_type_wchar_t" = yes; then
27996   if test "$cross_compiling" = yes; then
27997   # Depending upon the size, compute the lo and hi bounds.
27998 cat >"conftest.$ac_ext" <<_ACEOF
27999 #line 27999 "configure"
28000 #include "confdefs.h"
28001 $ac_includes_default
28002 int
28003 main (void)
28004 {
28005 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
28006   ;
28007   return 0;
28008 }
28009 _ACEOF
28010 rm -f "conftest.$ac_objext"
28011 if { (eval echo "$as_me:28011: \"$ac_compile\"") >&5
28012   (eval $ac_compile) 2>&5
28013   ac_status=$?
28014   echo "$as_me:28014: \$? = $ac_status" >&5
28015   (exit "$ac_status"); } &&
28016          { ac_try='test -s "conftest.$ac_objext"'
28017   { (eval echo "$as_me:28017: \"$ac_try\"") >&5
28018   (eval $ac_try) 2>&5
28019   ac_status=$?
28020   echo "$as_me:28020: \$? = $ac_status" >&5
28021   (exit "$ac_status"); }; }; then
28022   ac_lo=0 ac_mid=0
28023   while :; do
28024     cat >"conftest.$ac_ext" <<_ACEOF
28025 #line 28025 "configure"
28026 #include "confdefs.h"
28027 $ac_includes_default
28028 int
28029 main (void)
28030 {
28031 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
28032   ;
28033   return 0;
28034 }
28035 _ACEOF
28036 rm -f "conftest.$ac_objext"
28037 if { (eval echo "$as_me:28037: \"$ac_compile\"") >&5
28038   (eval $ac_compile) 2>&5
28039   ac_status=$?
28040   echo "$as_me:28040: \$? = $ac_status" >&5
28041   (exit "$ac_status"); } &&
28042          { ac_try='test -s "conftest.$ac_objext"'
28043   { (eval echo "$as_me:28043: \"$ac_try\"") >&5
28044   (eval $ac_try) 2>&5
28045   ac_status=$?
28046   echo "$as_me:28046: \$? = $ac_status" >&5
28047   (exit "$ac_status"); }; }; then
28048   ac_hi=$ac_mid; break
28049 else
28050   echo "$as_me: failed program was:" >&5
28051 cat "conftest.$ac_ext" >&5
28052 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
28053 fi
28054 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28055   done
28056 else
28057   echo "$as_me: failed program was:" >&5
28058 cat "conftest.$ac_ext" >&5
28059 ac_hi=-1 ac_mid=-1
28060   while :; do
28061     cat >"conftest.$ac_ext" <<_ACEOF
28062 #line 28062 "configure"
28063 #include "confdefs.h"
28064 $ac_includes_default
28065 int
28066 main (void)
28067 {
28068 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
28069   ;
28070   return 0;
28071 }
28072 _ACEOF
28073 rm -f "conftest.$ac_objext"
28074 if { (eval echo "$as_me:28074: \"$ac_compile\"") >&5
28075   (eval $ac_compile) 2>&5
28076   ac_status=$?
28077   echo "$as_me:28077: \$? = $ac_status" >&5
28078   (exit "$ac_status"); } &&
28079          { ac_try='test -s "conftest.$ac_objext"'
28080   { (eval echo "$as_me:28080: \"$ac_try\"") >&5
28081   (eval $ac_try) 2>&5
28082   ac_status=$?
28083   echo "$as_me:28083: \$? = $ac_status" >&5
28084   (exit "$ac_status"); }; }; then
28085   ac_lo=$ac_mid; break
28086 else
28087   echo "$as_me: failed program was:" >&5
28088 cat "conftest.$ac_ext" >&5
28089 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
28090 fi
28091 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28092   done
28093 fi
28094 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28095 # Binary search between lo and hi bounds.
28096 while test "x$ac_lo" != "x$ac_hi"; do
28097   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
28098   cat >"conftest.$ac_ext" <<_ACEOF
28099 #line 28099 "configure"
28100 #include "confdefs.h"
28101 $ac_includes_default
28102 int
28103 main (void)
28104 {
28105 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
28106   ;
28107   return 0;
28108 }
28109 _ACEOF
28110 rm -f "conftest.$ac_objext"
28111 if { (eval echo "$as_me:28111: \"$ac_compile\"") >&5
28112   (eval $ac_compile) 2>&5
28113   ac_status=$?
28114   echo "$as_me:28114: \$? = $ac_status" >&5
28115   (exit "$ac_status"); } &&
28116          { ac_try='test -s "conftest.$ac_objext"'
28117   { (eval echo "$as_me:28117: \"$ac_try\"") >&5
28118   (eval $ac_try) 2>&5
28119   ac_status=$?
28120   echo "$as_me:28120: \$? = $ac_status" >&5
28121   (exit "$ac_status"); }; }; then
28122   ac_hi=$ac_mid
28123 else
28124   echo "$as_me: failed program was:" >&5
28125 cat "conftest.$ac_ext" >&5
28126 ac_lo=`expr "$ac_mid" + 1`
28127 fi
28128 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28129 done
28130 ac_cv_sizeof_wchar_t=$ac_lo
28131 else
28132   if test "$cross_compiling" = yes; then
28133   { { echo "$as_me:28133: error: cannot run test program while cross compiling" >&5
28134 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
28135    { (exit 1); exit 1; }; }
28136 else
28137   cat >"conftest.$ac_ext" <<_ACEOF
28138 #line 28138 "configure"
28139 #include "confdefs.h"
28140 $ac_includes_default
28141 int
28142 main (void)
28143 {
28144 FILE *f = fopen ("conftest.val", "w");
28145 if (!f)
28146   $ac_main_return (1);
28147 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
28148 fclose (f);
28149   ;
28150   return 0;
28151 }
28152 _ACEOF
28153 rm -f "conftest$ac_exeext"
28154 if { (eval echo "$as_me:28154: \"$ac_link\"") >&5
28155   (eval $ac_link) 2>&5
28156   ac_status=$?
28157   echo "$as_me:28157: \$? = $ac_status" >&5
28158   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
28159   { (eval echo "$as_me:28159: \"$ac_try\"") >&5
28160   (eval $ac_try) 2>&5
28161   ac_status=$?
28162   echo "$as_me:28162: \$? = $ac_status" >&5
28163   (exit "$ac_status"); }; }; then
28164   ac_cv_sizeof_wchar_t=`cat conftest.val`
28165 else
28166   echo "$as_me: program exited with status $ac_status" >&5
28167 echo "$as_me: failed program was:" >&5
28168 cat "conftest.$ac_ext" >&5
28169 fi
28170 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
28171 fi
28172 fi
28173 rm -f conftest.val
28174 else
28175   ac_cv_sizeof_wchar_t=0
28176 fi
28177 fi
28178 echo "$as_me:28178: result: $ac_cv_sizeof_wchar_t" >&5
28179 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
28180 cat >>confdefs.h <<EOF
28181 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
28182 EOF
28183
28184         # cross-compiling to mingw can run into the problem that attempting to
28185         # link with the regex library fails, causing the test to not set this to
28186         # a number.  "recent" autoconf does not address this problem either -TD
28187         if test -z "$ac_cv_sizeof_wchar_t"
28188         then
28189                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
28190
28191 echo "${as_me:-configure}:28191: testing test failed (assume 2) ..." 1>&5
28192
28193                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
28194                 mv confdefs.tmp confdefs.h
28195                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
28196         fi
28197 fi
28198
28199 ### Construct the ncurses library-subsets, if any, from this set of keywords:
28200 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
28201 ###
28202 ### ticlib modules may be a separate library, otherwise contained in termlib.
28203 ### termlib modules may be a separate library, otherwise contained in ncurses.
28204 ###
28205 ### The of "+" or " " between the tokens controls the way the script
28206 ### chooses to split module lists into libraries.
28207 ###
28208 ### (see CF_LIB_RULES).
28209 echo "$as_me:28209: checking for library subsets" >&5
28210 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
28211 LIB_SUBSETS=
28212
28213 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
28214         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
28215         if test "$with_ticlib" != no ; then
28216                 LIB_SUBSETS="${LIB_SUBSETS} "
28217         else
28218                 LIB_SUBSETS="${LIB_SUBSETS}+"
28219         fi
28220 fi
28221
28222 LIB_SUBSETS="${LIB_SUBSETS}termlib"
28223 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
28224
28225 if test "$with_termlib" != no ; then
28226         LIB_SUBSETS="${LIB_SUBSETS} "
28227 else
28228         LIB_SUBSETS="${LIB_SUBSETS}+"
28229 fi
28230
28231 LIB_SUBSETS="${LIB_SUBSETS}base"
28232
28233 # Most term-driver calls are to tinfo, but some like init_pair are to the
28234 # base library (so it resides in base).
28235 if test "$with_term_driver" != no ; then
28236         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
28237         case "$cf_cv_system_name" in
28238         (*mingw32*|*mingw64*)
28239                 if test "x$with_exp_win32" = xyes ; then
28240                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
28241                 else
28242                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
28243                 fi
28244                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
28245                 ;;
28246         (*)
28247                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
28248                 ;;
28249         esac
28250 elif test "x$with_exp_win32" = xyes ; then
28251         case "$cf_cv_system_name" in
28252         (*mingw32*|*mingw64*)
28253                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
28254                 ;;
28255         (*)
28256                 ;;
28257         esac
28258 fi
28259
28260 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
28261 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
28262
28263 echo "$as_me:28263: result: $LIB_SUBSETS" >&5
28264 echo "${ECHO_T}$LIB_SUBSETS" >&6
28265
28266 ### Construct the list of include-directories to be generated
28267
28268 if test "$srcdir" != "."; then
28269         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
28270 fi
28271 CPPFLAGS="-I../include $CPPFLAGS"
28272 if test "$srcdir" != "."; then
28273         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
28274 fi
28275 CPPFLAGS="-I. $CPPFLAGS"
28276
28277 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
28278 if test "$srcdir" != "."; then
28279         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
28280 fi
28281 if test "$GCC" != yes; then
28282         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28283 elif test "$includedir" != "/usr/include"; then
28284         if test "$includedir" = '${prefix}/include' ; then
28285                 if test x$prefix != x/usr ; then
28286                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28287                 fi
28288         else
28289                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28290         fi
28291 fi
28292
28293 ### Build up pieces for makefile rules
28294 echo "$as_me:28294: checking default library suffix" >&5
28295 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
28296
28297         case $DFT_LWR_MODEL in
28298         (libtool) DFT_ARG_SUFFIX=''   ;;
28299         (normal)  DFT_ARG_SUFFIX=''   ;;
28300         (debug)   DFT_ARG_SUFFIX='_g' ;;
28301         (profile) DFT_ARG_SUFFIX='_p' ;;
28302         (shared)  DFT_ARG_SUFFIX=''   ;;
28303         esac
28304         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
28305 echo "$as_me:28305: result: $DFT_ARG_SUFFIX" >&5
28306 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
28307
28308 echo "$as_me:28308: checking default library-dependency suffix" >&5
28309 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
28310
28311         case X$DFT_LWR_MODEL in
28312         (Xlibtool)
28313                 DFT_LIB_SUFFIX='.la'
28314                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28315                 ;;
28316         (Xdebug)
28317                 case "$cf_cv_system_name" in
28318                 (*-msvc*)
28319                         DFT_LIB_SUFFIX='_g.lib'
28320                         ;;
28321                 (*)
28322                         DFT_LIB_SUFFIX='_g.a'
28323                         ;;
28324                 esac
28325                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28326                 ;;
28327         (Xprofile)
28328                 case "$cf_cv_system_name" in
28329                 (*-msvc*)
28330                         DFT_LIB_SUFFIX='_p.lib'
28331                         ;;
28332                 (*)
28333                         DFT_LIB_SUFFIX='_p.a'
28334                         ;;
28335                 esac
28336                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28337                 ;;
28338         (Xshared)
28339                 case "$cf_cv_system_name" in
28340                 (aix[5-7]*)
28341                         DFT_LIB_SUFFIX='.so'
28342                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28343                         ;;
28344                 (*-msvc*)
28345                         DFT_LIB_SUFFIX='.dll'
28346                         DFT_DEP_SUFFIX='.dll.lib'
28347                         ;;
28348                 (cygwin*|msys*|mingw*)
28349                         DFT_LIB_SUFFIX='.dll'
28350                         DFT_DEP_SUFFIX='.dll.a'
28351                         ;;
28352                 (darwin*)
28353                         DFT_LIB_SUFFIX='.dylib'
28354                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28355                         ;;
28356                 (hpux*)
28357                         case "$target" in
28358                         (ia64*)
28359                                 DFT_LIB_SUFFIX='.so'
28360                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28361                                 ;;
28362                         (*)
28363                                 DFT_LIB_SUFFIX='.sl'
28364                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28365                                 ;;
28366                         esac
28367                         ;;
28368                 (*)
28369                         DFT_LIB_SUFFIX='.so'
28370                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28371                         ;;
28372                 esac
28373                 ;;
28374         (*)
28375                 case "$target" in
28376                 (*-msvc*)
28377                         DFT_LIB_SUFFIX='.lib'
28378                         ;;
28379                 (*)
28380                         DFT_LIB_SUFFIX='.a'
28381                         ;;
28382                 esac
28383                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28384                 ;;
28385         esac
28386         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28387         then
28388                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
28389                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
28390         fi
28391 echo "$as_me:28391: result: $DFT_DEP_SUFFIX" >&5
28392 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
28393
28394 echo "$as_me:28394: checking default object directory" >&5
28395 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
28396
28397         case $DFT_LWR_MODEL in
28398         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
28399         (normal)  DFT_OBJ_SUBDIR='objects' ;;
28400         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
28401         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
28402         (shared)
28403                 case "$cf_cv_system_name" in
28404                 (cygwin|msys)
28405                         DFT_OBJ_SUBDIR='objects' ;;
28406                 (*)
28407                         DFT_OBJ_SUBDIR='obj_s' ;;
28408                 esac
28409         esac
28410 echo "$as_me:28410: result: $DFT_OBJ_SUBDIR" >&5
28411 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
28412
28413 if test "x$cf_with_cxx" = xyes ; then
28414 echo "$as_me:28414: checking c++ library-dependency suffix" >&5
28415 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
28416 if test "$with_libtool" != "no"; then
28417         # libtool thinks it can make c++ shared libraries (perhaps only g++)
28418         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28419 elif test "$with_shared_cxx" != "no"; then
28420         # also for g++ users...
28421         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28422 else
28423         # we normally make a static library because C/C++ library rules differ
28424
28425         case Xnormal in
28426         (Xlibtool)
28427                 CXX_LIB_SUFFIX='.la'
28428                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28429                 ;;
28430         (Xdebug)
28431                 case "$cf_cv_system_name" in
28432                 (*-msvc*)
28433                         CXX_LIB_SUFFIX='_g.lib'
28434                         ;;
28435                 (*)
28436                         CXX_LIB_SUFFIX='_g.a'
28437                         ;;
28438                 esac
28439                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28440                 ;;
28441         (Xprofile)
28442                 case "$cf_cv_system_name" in
28443                 (*-msvc*)
28444                         CXX_LIB_SUFFIX='_p.lib'
28445                         ;;
28446                 (*)
28447                         CXX_LIB_SUFFIX='_p.a'
28448                         ;;
28449                 esac
28450                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28451                 ;;
28452         (Xshared)
28453                 case "$cf_cv_system_name" in
28454                 (aix[5-7]*)
28455                         CXX_LIB_SUFFIX='.so'
28456                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28457                         ;;
28458                 (*-msvc*)
28459                         CXX_LIB_SUFFIX='.dll'
28460                         CXX_DEP_SUFFIX='.dll.lib'
28461                         ;;
28462                 (cygwin*|msys*|mingw*)
28463                         CXX_LIB_SUFFIX='.dll'
28464                         CXX_DEP_SUFFIX='.dll.a'
28465                         ;;
28466                 (darwin*)
28467                         CXX_LIB_SUFFIX='.dylib'
28468                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28469                         ;;
28470                 (hpux*)
28471                         case "$target" in
28472                         (ia64*)
28473                                 CXX_LIB_SUFFIX='.so'
28474                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28475                                 ;;
28476                         (*)
28477                                 CXX_LIB_SUFFIX='.sl'
28478                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28479                                 ;;
28480                         esac
28481                         ;;
28482                 (*)
28483                         CXX_LIB_SUFFIX='.so'
28484                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28485                         ;;
28486                 esac
28487                 ;;
28488         (*)
28489                 case "$target" in
28490                 (*-msvc*)
28491                         CXX_LIB_SUFFIX='.lib'
28492                         ;;
28493                 (*)
28494                         CXX_LIB_SUFFIX='.a'
28495                         ;;
28496                 esac
28497                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28498                 ;;
28499         esac
28500         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28501         then
28502                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
28503                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
28504         fi
28505
28506 fi
28507 echo "$as_me:28507: result: $CXX_LIB_SUFFIX" >&5
28508 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
28509
28510 fi
28511
28512 # do not want -ldl in build except as needed for -lncurses dependency
28513 if test "x$with_dlsym" = xyes ; then
28514 if test "$DFT_LWR_MODEL" = shared || \
28515    test "$DFT_LWR_MODEL" = libtool ; then
28516
28517 # remove dl library from $LIBS
28518 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
28519
28520 fi
28521 fi
28522 ### Set up low-level terminfo dependencies for makefiles.
28523
28524 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
28525 # do not need libdl
28526 TICS_LIST=
28527 if test "x$with_dlsym" = xyes ; then
28528
28529 # remove dl library from $SHLIB_LIST
28530 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
28531
28532 fi
28533
28534 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
28535 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
28536 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
28537 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
28538 then
28539         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
28540 fi
28541
28542 if test "$with_ticlib" != no ; then
28543
28544         if test "x$with_ticlib" != xyes ; then
28545                 TICS_NAME=$with_ticlib
28546                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28547                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28548                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28549                 TICS_LIB_SUFFIX="${with_ticlib}"
28550         else
28551                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
28552                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
28553                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
28554                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
28555         fi
28556         TICS_LDFLAGS="-L${LIB_DIR}"
28557         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
28558 else
28559         TICS_SUFFIX=${DFT_LIB_SUFFIX}
28560         TICS_LDFLAGS="-L${LIB_DIR}"
28561         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28562 fi
28563
28564 if test "$with_termlib" != no ; then
28565
28566         if test "x$with_termlib" != xyes ; then
28567                 TINFO_NAME=$with_termlib
28568                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28569                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28570                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28571                 TINFO_LIB_SUFFIX="${with_termlib}"
28572         else
28573                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28574                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
28575                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
28576                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
28577         fi
28578
28579         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28580         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28581         if test "$DFT_LWR_MODEL" = "libtool"; then
28582                 TEST_ARGS="${TEST_DEPS}"
28583                 TEST_ARG2="${TEST_DEP2}"
28584                 TINFO_LDFLAGS="-L${LIB_DIR}"
28585                 TINFO_LIBS="$TEST_ARGS"
28586                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
28587                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
28588         else
28589                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
28590                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
28591                 if test "x$with_term_driver" != xno ; then
28592                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28593                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
28594                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28595                 else
28596                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28597                         TINFO_LIBS="$TEST_ARGS"
28598                 fi
28599                 TINFO_LDFLAGS="-L${LIB_DIR}"
28600                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28601         fi
28602 else
28603         # the next lines are needed for linking libtic over libncurses
28604         TINFO_NAME=${LIB_NAME}
28605         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28606         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
28607         if test "x$with_tic_depends" = xyes ; then
28608                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28609         else
28610                 TICS_LIST="$SHLIB_LIST"
28611         fi
28612
28613         TINFO_LDFLAGS="-L${LIB_DIR}"
28614         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28615 fi
28616
28617 if test "$DFT_LWR_MODEL" = shared ; then
28618         case "$cf_cv_system_name" in
28619         (cygwin*|msys*)
28620                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
28621                 TINFO_SUFFIX=.dll
28622                 ;;
28623         esac
28624 fi
28625
28626 if test "x$with_dlsym" = xyes ; then
28627
28628 # remove dl library from $TICS_LIST
28629 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
28630
28631 fi
28632
28633 if test "$DFT_LWR_MODEL" = "libtool"; then
28634         OBJEXT=lo
28635 fi
28636
28637 # needed for Ada95
28638 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
28639
28640 case "$DFT_LWR_MODEL" in
28641 (normal|debug|profile)
28642
28643 if test "$GCC" = yes ; then
28644         case "$cf_cv_system_name" in
28645         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
28646                 LDFLAGS_STATIC=
28647                 LDFLAGS_SHARED=
28648                 ;;
28649         (*)     # normally, except when broken
28650                 LDFLAGS_STATIC=-static
28651                 LDFLAGS_SHARED=-dynamic
28652                 ;;
28653         esac
28654 else
28655         case "$cf_cv_system_name" in
28656         (aix[4-7]*)     # from ld manpage
28657                 LDFLAGS_STATIC=-bstatic
28658                 LDFLAGS_SHARED=-bdynamic
28659                 ;;
28660         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
28661                 # We could also use just "archive" and "shared".
28662                 LDFLAGS_STATIC=-Wl,-a,archive_shared
28663                 LDFLAGS_SHARED=-Wl,-a,shared_archive
28664                 ;;
28665         (irix*)         # from ld manpage IRIX64
28666                 LDFLAGS_STATIC=-Bstatic
28667                 LDFLAGS_SHARED=-Bdynamic
28668                 ;;
28669         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
28670                 # alternative "-oldstyle_liblookup" (not in cc manpage)
28671                 LDFLAGS_STATIC=-noso
28672                 LDFLAGS_SHARED=-so_archive
28673                 ;;
28674         (solaris2*)
28675                 LDFLAGS_STATIC=-Bstatic
28676                 LDFLAGS_SHARED=-Bdynamic
28677                 ;;
28678         esac
28679 fi
28680
28681 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
28682 then
28683         echo "$as_me:28683: checking if linker supports switching between static/dynamic" >&5
28684 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
28685
28686         rm -f libconftest.a
28687         cat >conftest.$ac_ext <<EOF
28688 #line 28688 "configure"
28689 #include <stdio.h>
28690 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
28691 EOF
28692         if { (eval echo "$as_me:28692: \"$ac_compile\"") >&5
28693   (eval $ac_compile) 2>&5
28694   ac_status=$?
28695   echo "$as_me:28695: \$? = $ac_status" >&5
28696   (exit "$ac_status"); } ; then
28697                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
28698                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
28699         fi
28700         rm -f conftest.*
28701
28702         cf_save_LIBS="$LIBS"
28703
28704         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
28705         cat >"conftest.$ac_ext" <<_ACEOF
28706 #line 28706 "configure"
28707 #include "confdefs.h"
28708
28709 #line 28709 "configure"
28710 #include <stdio.h>
28711 int cf_ldflags_static(FILE *fp);
28712
28713 int
28714 main (void)
28715 {
28716
28717         return cf_ldflags_static(stdin);
28718
28719   ;
28720   return 0;
28721 }
28722 _ACEOF
28723 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28724 if { (eval echo "$as_me:28724: \"$ac_link\"") >&5
28725   (eval $ac_link) 2>&5
28726   ac_status=$?
28727   echo "$as_me:28727: \$? = $ac_status" >&5
28728   (exit "$ac_status"); } &&
28729          { ac_try='test -s "conftest$ac_exeext"'
28730   { (eval echo "$as_me:28730: \"$ac_try\"") >&5
28731   (eval $ac_try) 2>&5
28732   ac_status=$?
28733   echo "$as_me:28733: \$? = $ac_status" >&5
28734   (exit "$ac_status"); }; }; then
28735
28736         # some linkers simply ignore the -dynamic
28737         case x`file "conftest$ac_exeext" 2>/dev/null` in
28738         (*static*)
28739                 cf_ldflags_static=no
28740                 ;;
28741         (*)
28742                 cf_ldflags_static=yes
28743                 ;;
28744         esac
28745
28746 else
28747   echo "$as_me: failed program was:" >&5
28748 cat "conftest.$ac_ext" >&5
28749 cf_ldflags_static=no
28750 fi
28751 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28752
28753         rm -f libconftest.*
28754         LIBS="$cf_save_LIBS"
28755
28756         echo "$as_me:28756: result: $cf_ldflags_static" >&5
28757 echo "${ECHO_T}$cf_ldflags_static" >&6
28758
28759         if test "$cf_ldflags_static" != yes
28760         then
28761                 LDFLAGS_STATIC=
28762                 LDFLAGS_SHARED=
28763         fi
28764 else
28765         LDFLAGS_STATIC=
28766         LDFLAGS_SHARED=
28767 fi
28768
28769         ;;
28770 esac
28771
28772 echo "$as_me:28772: checking where we will install curses.h" >&5
28773 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
28774
28775 includesubdir=
28776 if test "$with_overwrite" = no && \
28777  { test "x$includedir" = 'x${prefix}/include' || \
28778    test "x$includedir" = "x${prefix}/include"; }
28779 then
28780         includesubdir="/ncurses${USE_LIB_SUFFIX}"
28781 fi
28782 echo "$as_me:28782: result: ${includedir}${includesubdir}" >&5
28783 echo "${ECHO_T}${includedir}${includesubdir}" >&6
28784
28785 ### Resolve a conflict between normal and wide-curses by forcing applications
28786 ### that will need libutf8 to add it to their configure script.
28787 if test "$with_overwrite" != no ; then
28788 if test "$NCURSES_LIBUTF8" = 1 ; then
28789         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
28790         { echo "$as_me:28790: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
28791 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
28792 fi
28793 fi
28794 WITH_OVERWRITE=$with_overwrite
28795
28796 ### At least on MinGW a shared library build without libtool
28797 ### requires adding the additional libs to the link list.
28798 case "$cf_cv_system_name" in
28799 (*mingw32*|*mingw64*)
28800         if test "$DFT_LWR_MODEL" != "libtool"; then
28801            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
28802         fi
28803         ;;
28804 *)      ;;
28805 esac
28806
28807 ### predefined stuff for the test programs
28808
28809 cat >>confdefs.h <<\EOF
28810 #define HAVE_SLK_COLOR 1
28811 EOF
28812
28813 # pkgsrc uses these
28814
28815 echo "$as_me:28815: checking for desired basename for form library" >&5
28816 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
28817
28818 # Check whether --with-form-libname or --without-form-libname was given.
28819 if test "${with_form_libname+set}" = set; then
28820   withval="$with_form_libname"
28821   with_lib_basename=$withval
28822 else
28823   with_lib_basename=form
28824 fi;
28825 FORM_NAME="$with_lib_basename"
28826
28827 case "x$FORM_NAME" in
28828 (x|xno|xnone|xyes)
28829         FORM_NAME=form
28830         ;;
28831 (*)
28832         ;;
28833 esac
28834
28835 echo "$as_me:28835: result: $FORM_NAME" >&5
28836 echo "${ECHO_T}$FORM_NAME" >&6
28837
28838 echo "$as_me:28838: checking for desired basename for menu library" >&5
28839 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
28840
28841 # Check whether --with-menu-libname or --without-menu-libname was given.
28842 if test "${with_menu_libname+set}" = set; then
28843   withval="$with_menu_libname"
28844   with_lib_basename=$withval
28845 else
28846   with_lib_basename=menu
28847 fi;
28848 MENU_NAME="$with_lib_basename"
28849
28850 case "x$MENU_NAME" in
28851 (x|xno|xnone|xyes)
28852         MENU_NAME=menu
28853         ;;
28854 (*)
28855         ;;
28856 esac
28857
28858 echo "$as_me:28858: result: $MENU_NAME" >&5
28859 echo "${ECHO_T}$MENU_NAME" >&6
28860
28861 echo "$as_me:28861: checking for desired basename for panel library" >&5
28862 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
28863
28864 # Check whether --with-panel-libname or --without-panel-libname was given.
28865 if test "${with_panel_libname+set}" = set; then
28866   withval="$with_panel_libname"
28867   with_lib_basename=$withval
28868 else
28869   with_lib_basename=panel
28870 fi;
28871 PANEL_NAME="$with_lib_basename"
28872
28873 case "x$PANEL_NAME" in
28874 (x|xno|xnone|xyes)
28875         PANEL_NAME=panel
28876         ;;
28877 (*)
28878         ;;
28879 esac
28880
28881 echo "$as_me:28881: result: $PANEL_NAME" >&5
28882 echo "${ECHO_T}$PANEL_NAME" >&6
28883
28884 echo "$as_me:28884: checking for desired basename for cxx library" >&5
28885 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
28886
28887 # Check whether --with-cxx-libname or --without-cxx-libname was given.
28888 if test "${with_cxx_libname+set}" = set; then
28889   withval="$with_cxx_libname"
28890   with_lib_basename=$withval
28891 else
28892   with_lib_basename=ncurses++
28893 fi;
28894 CXX_NAME="$with_lib_basename"
28895
28896 case "x$CXX_NAME" in
28897 (x|xno|xnone|xyes)
28898         CXX_NAME=ncurses++
28899         ;;
28900 (*)
28901         ;;
28902 esac
28903
28904 echo "$as_me:28904: result: $CXX_NAME" >&5
28905 echo "${ECHO_T}$CXX_NAME" >&6
28906
28907 ### Construct the list of subdirectories for which we'll customize makefiles
28908 ### with the appropriate compile-rules.
28909
28910 echo "$as_me:28910: checking for src modules" >&5
28911 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
28912
28913 # dependencies and linker-arguments for test-programs
28914 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
28915 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
28916 if test "$DFT_LWR_MODEL" = "libtool"; then
28917         TEST_ARGS="${TEST_DEPS}"
28918         TEST_ARG2="${TEST_DEP2}"
28919 else
28920         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28921         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
28922 fi
28923
28924 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
28925 cf_cv_src_modules=
28926 for cf_dir in $modules_to_build
28927 do
28928         if test -f "$srcdir/$cf_dir/modules" ; then
28929
28930                 if test -z "$cf_cv_src_modules"; then
28931                         cf_cv_src_modules=$cf_dir
28932                 else
28933                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
28934                 fi
28935
28936                 # Make the ncurses_cfg.h file record the library interface files as
28937                 # well.  These are header files that are the same name as their
28938                 # directory.  Ncurses is the only library that does not follow
28939                 # that pattern.
28940                 if test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
28941
28942 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28943
28944                         cat >>confdefs.h <<EOF
28945 #define HAVE_${cf_have_include}_H 1
28946 EOF
28947
28948                         cat >>confdefs.h <<EOF
28949 #define HAVE_LIB${cf_have_include} 1
28950 EOF
28951
28952 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28953
28954 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28955
28956                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28957                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
28958                         if test "$DFT_LWR_MODEL" = "libtool"; then
28959                                 TEST_ARGS="${TEST_DEPS}"
28960                                 TEST_ARG2="${TEST_DEP2}"
28961                         else
28962                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
28963                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
28964                         fi
28965                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
28966                 fi
28967         fi
28968 done
28969 echo "$as_me:28969: result: $cf_cv_src_modules" >&5
28970 echo "${ECHO_T}$cf_cv_src_modules" >&6
28971
28972 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
28973 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
28974
28975 SRC_SUBDIRS=
28976 if test "x$cf_with_manpages" != xno ; then
28977         SRC_SUBDIRS="$SRC_SUBDIRS man"
28978 fi
28979 SRC_SUBDIRS="$SRC_SUBDIRS include"
28980 for cf_dir in $cf_cv_src_modules
28981 do
28982         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
28983 done
28984 if test "x$cf_with_tests" != "xno" ; then
28985         SRC_SUBDIRS="$SRC_SUBDIRS test"
28986 fi
28987 # always make this, to install the ncurses-config script
28988 SRC_SUBDIRS="$SRC_SUBDIRS misc"
28989 if test "$cf_with_cxx_binding" != no; then
28990         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
28991         SRC_SUBDIRS="$SRC_SUBDIRS c++"
28992 fi
28993
28994 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
28995 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
28996
28997 ADA_SUBDIRS=
28998 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
28999         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
29000         ADA_SUBDIRS="gen src"
29001         if test "x$cf_with_tests" != "xno" ; then
29002                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
29003         fi
29004 fi
29005
29006 SUB_MAKEFILES=
29007 for cf_dir in $SRC_SUBDIRS
29008 do
29009         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
29010 done
29011
29012 if test -n "$ADA_SUBDIRS"; then
29013         for cf_dir in $ADA_SUBDIRS
29014         do
29015                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
29016         done
29017
29018 fi
29019
29020 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
29021    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
29022    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
29023    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
29024 fi
29025
29026 DIRS_TO_MAKE="lib"
29027 for cf_item in $cf_list_models
29028 do
29029
29030         case $cf_item in
29031         (libtool) cf_subdir='obj_lo'  ;;
29032         (normal)  cf_subdir='objects' ;;
29033         (debug)   cf_subdir='obj_g' ;;
29034         (profile) cf_subdir='obj_p' ;;
29035         (shared)
29036                 case "$cf_cv_system_name" in
29037                 (cygwin|msys)
29038                         cf_subdir='objects' ;;
29039                 (*)
29040                         cf_subdir='obj_s' ;;
29041                 esac
29042         esac
29043
29044         for cf_item2 in $DIRS_TO_MAKE
29045         do
29046                 test "$cf_item2" = "$cf_subdir" && break
29047         done
29048         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
29049 done
29050 for cf_dir in $DIRS_TO_MAKE
29051 do
29052         test ! -d "$cf_dir" && mkdir "$cf_dir"
29053 done
29054
29055 # symbols that differ when compiling Ada95 by itself.
29056 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
29057
29058 # values to use as strings
29059
29060 cat >>confdefs.h <<EOF
29061 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
29062 EOF
29063
29064 cat >>confdefs.h <<EOF
29065 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
29066 EOF
29067
29068 ### Define substitutions for header files to avoid name-pollution
29069
29070 if test "x$cf_cv_have_tcgetattr" = xyes ; then
29071         HAVE_TCGETATTR=1
29072 else
29073         HAVE_TCGETATTR=0
29074 fi
29075
29076 if test "x$ac_cv_header_stdint_h" = xyes ; then
29077         HAVE_STDINT_H=1
29078 else
29079         HAVE_STDINT_H=0
29080 fi
29081
29082 if test "x$ac_cv_header_termio_h" = xyes ; then
29083         HAVE_TERMIO_H=1
29084 else
29085         HAVE_TERMIO_H=0
29086 fi
29087
29088 if test "x$ac_cv_header_termios_h" = xyes ; then
29089         HAVE_TERMIOS_H=1
29090 else
29091         HAVE_TERMIOS_H=0
29092 fi
29093
29094 ################################################################################
29095 test "x$use_database" = xyes && \
29096 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
29097
29098 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
29099 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
29100
29101 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
29102 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
29103 fi
29104
29105 if test "x$cf_with_tests" != xno ; then
29106         MAKE_TESTS=
29107 else
29108         MAKE_TESTS="#"
29109 fi
29110
29111 ADAHTML_DIR=../../doc/html/ada
29112
29113 # workaround for OS/2 (20151017)
29114 case "$cf_cv_system_name" in
29115 (os2*)
29116         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
29117         ;;
29118 (*)
29119         LIBTOOL_OPTS_CXX=
29120         ;;
29121 esac
29122
29123 # workaround for g++ versus Solaris (20131116)
29124 case "$cf_cv_system_name" in
29125 (solaris2*)
29126         case "x$CPPFLAGS" in
29127         (*-D_XOPEN_SOURCE_EXTENDED*)
29128                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
29129
29130 echo "${as_me:-configure}:29130: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
29131
29132                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
29133                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
29134                 ;;
29135         esac
29136         ;;
29137 esac
29138
29139 # Help to automatically enable the extended curses features when using either
29140 # the *-config or the ".pc" files by adding defines.
29141 echo "$as_me:29141: checking for defines to add to ncurses${USE_CFG_SUFFIX}${cf_config_suffix}-config script" >&5
29142 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}${cf_config_suffix}-config script... $ECHO_C" >&6
29143 PKG_CFLAGS=
29144 for cf_loop1 in $CPPFLAGS_after_XOPEN
29145 do
29146         cf_found=no
29147         for cf_loop2 in $CPPFLAGS_before_XOPEN
29148         do
29149                 if test "x$cf_loop1" = "x$cf_loop2"
29150                 then
29151                         cf_found=yes
29152                         break
29153                 fi
29154         done
29155         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
29156 done
29157 echo "$as_me:29157: result: $PKG_CFLAGS" >&5
29158 echo "${ECHO_T}$PKG_CFLAGS" >&6
29159
29160 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
29161 case "x$NCURSES_OSPEED" in
29162 (*short*)
29163         cf_compatible=1
29164         ;;
29165 (*)
29166         cf_compatible=0
29167         ;;
29168 esac
29169
29170 cat >>confdefs.h <<EOF
29171 #define NCURSES_OSPEED_COMPAT $cf_compatible
29172 EOF
29173
29174 case "x$cf_cv_typeof_chtype" in
29175 (xshort|xint|xlong)
29176         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
29177         ;;
29178 esac
29179
29180 case "x$cf_cv_typeof_mmask_t" in
29181 (xshort|xint|xlong)
29182         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
29183         ;;
29184 esac
29185
29186 # substitute into misc/Makefile to suppress
29187 # (un)install.data from the
29188 # (un)install rules.
29189 if test "x$cf_with_db_install" = "xno"; then
29190         MISC_INSTALL_DATA=
29191         MISC_UNINSTALL_DATA=
29192 else
29193         MISC_INSTALL_DATA=install.data
29194         MISC_UNINSTALL_DATA=uninstall.data
29195 fi
29196
29197 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
29198         MAKE_DATABASE="#"
29199 else
29200         MAKE_DATABASE="$MAKE_TERMINFO"
29201 fi
29202
29203 if test -n "$PACKAGE"
29204 then
29205         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
29206         export PACKAGE
29207         echo "package: $PACKAGE"
29208 fi
29209
29210 UNALTERED_SYMS=
29211 cf_filter_syms=no
29212
29213 if test -n "$RESULTING_SYMS"
29214 then
29215         cf_filter_syms=$cf_dft_filter_syms
29216         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_default" 1>&6
29217
29218 echo "${as_me:-configure}:29218: testing will map symbols to ABI=$cf_cv_abi_default ..." 1>&5
29219
29220 fi
29221
29222 if test "x$WILDCARD_SYMS" = xno
29223 then
29224         cf_filter_syms=yes
29225 fi
29226
29227 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
29228
29229 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
29230 if test "$cf_filter_syms" = yes
29231 then
29232         RESULTING_SYMS=resulting.map
29233 fi
29234
29235 if test "x$cross_compiling" = xyes ; then
29236         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
29237         CHECK_BUILD="#"
29238 else
29239         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
29240         CHECK_BUILD=
29241 fi
29242
29243 # This is used for the *-config script and *.pc data files.
29244
29245 echo "$as_me:29245: checking for linker search path" >&5
29246 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
29247 if test "${cf_cv_ld_searchpath+set}" = set; then
29248   echo $ECHO_N "(cached) $ECHO_C" >&6
29249 else
29250
29251 if test "$cross_compiling" != yes ; then
29252
29253 # GNU binutils' ld does not involve permissions which may stop ldconfig.
29254 cf_pathlist=`${LD:-ld} --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
29255
29256 # The -NX options tell newer versions of Linux ldconfig to not attempt to
29257 # update the cache, which makes it run faster.
29258 test -z "$cf_pathlist" && \
29259         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
29260
29261 test -z "$cf_pathlist" &&
29262         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
29263
29264 # This works with OpenBSD 6.5, which lists only filenames
29265 test -z "$cf_pathlist" &&
29266         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
29267
29268 if test -z "$cf_pathlist"
29269 then
29270         # dyld default path with MacOS
29271         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
29272         then
29273                 # do this to bypass check
29274                 cf_cv_ld_searchpath='$HOME/lib'
29275                 cf_pathlist="/usr/local/lib /lib /usr/lib"
29276         fi
29277 fi
29278
29279 if test -z "$cf_pathlist"
29280 then
29281         # Solaris is "SunOS"
29282         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
29283         then
29284                 case x`(isainfo -b)` in
29285                 (x64)
29286                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
29287                         ;;
29288                 (x32)
29289                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
29290                         cf_pathlist="$cf_pathlist /lib /usr/lib"
29291                         ;;
29292                 (*)
29293                         { echo "$as_me:29293: WARNING: problem with Solaris architecture" >&5
29294 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
29295                         ;;
29296                 esac
29297         fi
29298 fi
29299
29300 if test -z "$cf_pathlist"
29301 then
29302         # HP-UX
29303         if test x"`uname -s`" = xHP-UX
29304         then
29305                 case x`getconf LONG_BIT` in
29306                 (x64)
29307                         cf_pathlist="/usr/lib/hpux64"
29308                         ;;
29309                 (x*)
29310                         cf_pathlist="/usr/lib/hpux32"
29311                         ;;
29312                 esac
29313         fi
29314 fi
29315
29316 fi
29317
29318 # If nothing else, assume it is conventional
29319 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
29320
29321 # Finally, check that this is only directories
29322 for cf_path in $0 $cf_pathlist
29323 do
29324         if test -d "$cf_path"; then
29325                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
29326                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
29327         fi
29328 done
29329
29330 # Ensure that it is nonempty
29331 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
29332
29333 fi
29334 echo "$as_me:29334: result: $cf_cv_ld_searchpath" >&5
29335 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
29336
29337 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
29338
29339 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"
29340 ac_config_commands="$ac_config_commands default"
29341 cat >confcache <<\_ACEOF
29342 # This file is a shell script that caches the results of configure
29343 # tests run on this system so they can be shared between configure
29344 # scripts and configure runs, see configure's option --config-cache.
29345 # It is not useful on other systems.  If it contains results you don't
29346 # want to keep, you may remove or edit it.
29347 #
29348 # config.status only pays attention to the cache file if you give it
29349 # the --recheck option to rerun configure.
29350 #
29351 # `ac_cv_env_foo' variables (set or unset) will be overriden when
29352 # loading this file, other *unset* `ac_cv_foo' will be assigned the
29353 # following values.
29354
29355 _ACEOF
29356
29357 # The following way of writing the cache mishandles newlines in values,
29358 # but we know of no workaround that is simple, portable, and efficient.
29359 # So, don't put newlines in cache variables' values.
29360 # Ultrix sh set writes to stderr and can't be redirected directly,
29361 # and sets the high bit in the cache file unless we assign to the vars.
29362 {
29363   (set) 2>&1 |
29364     case `(ac_space=' '; set | grep ac_space) 2>&1` in
29365     *ac_space=\ *)
29366       # `set' does not quote correctly, so add quotes (double-quote
29367       # substitution turns \\\\ into \\, and sed turns \\ into \).
29368       sed -n \
29369         "s/'/'\\\\''/g;
29370           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29371       ;;
29372     *)
29373       # `set' quotes correctly as required by POSIX, so do not add quotes.
29374       sed -n \
29375         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
29376       ;;
29377     esac;
29378 } |
29379   sed '
29380      t clear
29381      : clear
29382      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29383      t end
29384      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29385      : end' >>confcache
29386 if cmp -s $cache_file confcache; then :; else
29387   if test -w $cache_file; then
29388     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
29389     cat confcache >$cache_file
29390   else
29391     echo "not updating unwritable cache $cache_file"
29392   fi
29393 fi
29394 rm -f confcache
29395
29396 test "x$prefix" = xNONE && prefix=$ac_default_prefix
29397 # Let make expand exec_prefix.
29398 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29399
29400 # VPATH may cause trouble with some makes, so we remove $(srcdir),
29401 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
29402 # trailing colons and then remove the whole line if VPATH becomes empty
29403 # (actually we leave an empty line to preserve line numbers).
29404 if test "x$srcdir" = x.; then
29405   ac_vpsub='/^[         ]*VPATH[        ]*=/{
29406 s/:*\$(srcdir):*/:/;
29407 s/:*\${srcdir}:*/:/;
29408 s/:*@srcdir@:*/:/;
29409 s/^\([^=]*=[    ]*\):*/\1/;
29410 s/:*$//;
29411 s/^[^=]*=[      ]*$//;
29412 }'
29413 fi
29414
29415 DEFS=-DHAVE_CONFIG_H
29416
29417 : "${CONFIG_STATUS=./config.status}"
29418 ac_clean_files_save=$ac_clean_files
29419 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29420 { echo "$as_me:29420: creating $CONFIG_STATUS" >&5
29421 echo "$as_me: creating $CONFIG_STATUS" >&6;}
29422 cat >"$CONFIG_STATUS" <<_ACEOF
29423 #! $SHELL
29424 # Generated automatically by configure.
29425 # Run this file to recreate the current configuration.
29426 # Compiler output produced by configure, useful for debugging
29427 # configure, is in config.log if it exists.
29428
29429 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
29430
29431 debug=false
29432 SHELL=\${CONFIG_SHELL-$SHELL}
29433 ac_cs_invocation="\$0 \$@"
29434
29435 CLICOLOR_FORCE= GREP_OPTIONS=
29436 unset CLICOLOR_FORCE GREP_OPTIONS
29437 _ACEOF
29438
29439 cat >>"$CONFIG_STATUS" <<\_ACEOF
29440 # Be Bourne compatible
29441 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29442   emulate sh
29443   NULLCMD=:
29444 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29445   set -o posix
29446 fi
29447
29448 # Name of the executable.
29449 as_me=`echo "$0" |sed 's,.*[\\/],,'`
29450
29451 if expr a : '\(a\)' >/dev/null 2>&1; then
29452   as_expr="expr"
29453 else
29454   as_expr="false"
29455 fi
29456
29457 rm -f conf$$ conf$$.exe conf$$.file
29458 echo >conf$$.file
29459 if ln -s conf$$.file conf$$ 2>/dev/null; then
29460   # We could just check for DJGPP; but this test a) works b) is more generic
29461   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
29462   if test -f conf$$.exe; then
29463     # Don't use ln at all; we don't have any links
29464     as_ln_s='cp -p'
29465   else
29466     as_ln_s='ln -s'
29467   fi
29468 elif ln conf$$.file conf$$ 2>/dev/null; then
29469   as_ln_s='ln'
29470 else
29471   as_ln_s='cp -p'
29472 fi
29473 rm -f conf$$ conf$$.exe conf$$.file
29474
29475 as_executable_p="test -f"
29476
29477 # Support unset when possible.
29478 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
29479   as_unset="unset"
29480 else
29481   as_unset="false"
29482 fi
29483
29484 # NLS nuisances.
29485 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
29486 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
29487 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
29488 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
29489 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
29490 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
29491 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
29492 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
29493
29494 # IFS
29495 # We need space, tab and new line, in precisely that order.
29496 as_nl='
29497 '
29498 IFS="   $as_nl"
29499
29500 # CDPATH.
29501 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
29502
29503 exec 6>&1
29504
29505 _ACEOF
29506
29507 # Files that config.status was made for.
29508 if test -n "$ac_config_files"; then
29509   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
29510 fi
29511
29512 if test -n "$ac_config_headers"; then
29513   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
29514 fi
29515
29516 if test -n "$ac_config_links"; then
29517   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
29518 fi
29519
29520 if test -n "$ac_config_commands"; then
29521   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
29522 fi
29523
29524 cat >>"$CONFIG_STATUS" <<\EOF
29525
29526 ac_cs_usage="\
29527 \`$as_me' instantiates files from templates according to the
29528 current configuration.
29529
29530 Usage: $0 [OPTIONS] [FILE]...
29531
29532   -h, --help       print this help, then exit
29533   -V, --version    print version number, then exit
29534   -d, --debug      don't remove temporary files
29535       --recheck    update $as_me by reconfiguring in the same conditions
29536   --file=FILE[:TEMPLATE]
29537                    instantiate the configuration file FILE
29538   --header=FILE[:TEMPLATE]
29539                    instantiate the configuration header FILE
29540
29541 Configuration files:
29542 $config_files
29543
29544 Configuration headers:
29545 $config_headers
29546
29547 Configuration commands:
29548 $config_commands
29549
29550 Report bugs to <dickey@invisible-island.net>."
29551 EOF
29552
29553 cat >>"$CONFIG_STATUS" <<EOF
29554 ac_cs_version="\\
29555 config.status
29556 configured by $0, generated by GNU Autoconf 2.52.20230903,
29557   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
29558
29559 Copyright 2003-2022,2023        Thomas E. Dickey
29560 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
29561 Free Software Foundation, Inc.
29562 This config.status script is free software; the Free Software Foundation
29563 gives unlimited permission to copy, distribute and modify it."
29564 srcdir="$srcdir"
29565 INSTALL="$INSTALL"
29566 EOF
29567
29568 cat >>"$CONFIG_STATUS" <<\EOF
29569 # If no file are specified by the user, then we need to provide default
29570 # value.  By we need to know if files were specified by the user.
29571 ac_need_defaults=:
29572 while test $# != 0
29573 do
29574   case $1 in
29575   --*=*)
29576     ac_option=`expr "x$1" : 'x\([^=]*\)='`
29577     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
29578     shift
29579     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
29580     shift
29581     ;;
29582   -*);;
29583   *) # This is not an option, so the user has probably given explicit
29584      # arguments.
29585      ac_need_defaults=false;;
29586   esac
29587
29588   case $1 in
29589   # Handling of the options.
29590 EOF
29591 cat >>"$CONFIG_STATUS" <<EOF
29592   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29593     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
29594     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
29595 EOF
29596 cat >>"$CONFIG_STATUS" <<\EOF
29597   --version | --vers* | -V )
29598     echo "$ac_cs_version"; exit 0 ;;
29599   --he | --h)
29600     # Conflict between --help and --header
29601     { { echo "$as_me:29601: error: ambiguous option: $1
29602 Try \`$0 --help' for more information." >&5
29603 echo "$as_me: error: ambiguous option: $1
29604 Try \`$0 --help' for more information." >&2;}
29605    { (exit 1); exit 1; }; };;
29606   --help | --hel | -h )
29607     echo "$ac_cs_usage"; exit 0 ;;
29608   --debug | --d* | -d )
29609     debug=: ;;
29610   --file | --fil | --fi | --f )
29611     shift
29612     CONFIG_FILES="$CONFIG_FILES $1"
29613     ac_need_defaults=false;;
29614   --header | --heade | --head | --hea )
29615     shift
29616     CONFIG_HEADERS="$CONFIG_HEADERS $1"
29617     ac_need_defaults=false;;
29618
29619   # This is an error.
29620   -*) { { echo "$as_me:29620: error: unrecognized option: $1
29621 Try \`$0 --help' for more information." >&5
29622 echo "$as_me: error: unrecognized option: $1
29623 Try \`$0 --help' for more information." >&2;}
29624    { (exit 1); exit 1; }; } ;;
29625
29626   *) ac_config_targets="$ac_config_targets $1" ;;
29627
29628   esac
29629   shift
29630 done
29631
29632 exec 5>>config.log
29633 cat >&5 << _ACEOF
29634
29635 ## ----------------------- ##
29636 ## Running config.status.  ##
29637 ## ----------------------- ##
29638
29639 This file was extended by $as_me 2.52.20230903, executed with
29640   CONFIG_FILES    = $CONFIG_FILES
29641   CONFIG_HEADERS  = $CONFIG_HEADERS
29642   CONFIG_LINKS    = $CONFIG_LINKS
29643   CONFIG_COMMANDS = $CONFIG_COMMANDS
29644   > "$ac_cs_invocation"
29645 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29646
29647 _ACEOF
29648 EOF
29649
29650 cat >>"$CONFIG_STATUS" <<EOF
29651 #
29652 # INIT-COMMANDS section.
29653 #
29654
29655 ### Special initialization commands, used to pass information from the
29656 ### configuration-run into config.status
29657
29658 ALTERNATE_SYMS="$ALTERNATE_SYMS"
29659 AWK="$AWK"
29660 CXX_NAME="$CXX_NAME"
29661 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
29662 DFT_LWR_MODEL="$DFT_LWR_MODEL"
29663 ECHO_LD="$ECHO_LD"
29664 EXTRA_SUFFIX="$EXTRA_SUFFIX"
29665 FORM_NAME="$FORM_NAME"
29666 LDCONFIG="$LDCONFIG"
29667 LIBTOOL_VERSION="$LIBTOOL_VERSION"
29668 LIB_NAME="$LIB_NAME"
29669 LIB_PREFIX="$LIB_PREFIX"
29670 LIB_SUBSETS="$LIB_SUBSETS"
29671 LIB_SUFFIX="$LIB_SUFFIX"
29672 LIB_TRACING="$LIB_TRACING"
29673 LN_S="$LN_S"
29674 MAKE_TERMINFO="$MAKE_TERMINFO"
29675 MANPAGE_RENAMES="$MANPAGE_RENAMES"
29676 MENU_NAME="$MENU_NAME"
29677 NCURSES_MAJOR="$NCURSES_MAJOR"
29678 NCURSES_MINOR="$NCURSES_MINOR"
29679 NCURSES_OSPEED="$NCURSES_OSPEED"
29680 NCURSES_PATCH="$NCURSES_PATCH"
29681 PANEL_NAME="$PANEL_NAME"
29682 SRC_SUBDIRS="$SRC_SUBDIRS"
29683 TERMINFO="$TERMINFO"
29684 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
29685 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
29686 TICS_NAME="$TICS_NAME"
29687 TICS_SUFFIX="$TICS_SUFFIX"
29688 TIC_PATH="$TIC_PATH"
29689 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
29690 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
29691 TINFO_NAME="$TINFO_NAME"
29692 TINFO_SUFFIX="$TINFO_SUFFIX"
29693 UNALTERED_SYMS="$UNALTERED_SYMS"
29694 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
29695 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
29696 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
29697 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
29698 WILDCARD_SYMS="$WILDCARD_SYMS"
29699 WITH_CURSES_H="$with_curses_h"
29700 WITH_ECHO="${enable_echo:=yes}"
29701 WITH_OVERWRITE="$with_overwrite"
29702 cf_LIST_MODELS="$cf_list_models"
29703 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
29704 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
29705 cf_cv_abi_default="$cf_cv_abi_default"
29706 cf_cv_abi_version="$cf_cv_abi_version"
29707 cf_cv_do_relink="$cf_cv_do_relink"
29708 cf_cv_do_reranlib="$cf_cv_do_reranlib"
29709 cf_cv_do_symlinks="$cf_cv_do_symlinks"
29710 cf_cv_enable_lp64="$cf_cv_enable_lp64"
29711 cf_cv_enable_opaque="$cf_cv_enable_opaque"
29712 cf_cv_make_PHONY="$cf_cv_make_PHONY"
29713 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
29714 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
29715 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
29716 cf_cv_rel_version="$cf_cv_rel_version"
29717 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
29718 cf_cv_shared_soname='$cf_cv_shared_soname'
29719 cf_cv_shlib_version="$cf_cv_shlib_version"
29720 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
29721 cf_cv_system_name="$cf_cv_system_name"
29722 cf_cv_term_driver="$with_term_driver"
29723 cf_with_ada="$cf_with_ada"
29724 cf_with_cxx_binding="$cf_with_cxx_binding"
29725 cf_with_db_install="$cf_with_db_install"
29726 cf_with_manpages="$cf_with_manpages"
29727 cf_with_tests="$cf_with_tests"
29728 host="$host"
29729 target="$target"
29730 verbose="$verbose"
29731 with_shared_cxx="$with_shared_cxx"
29732
29733 EOF
29734
29735 cat >>"$CONFIG_STATUS" <<\EOF
29736 for ac_config_target in $ac_config_targets
29737 do
29738   case "$ac_config_target" in
29739   # Handling of arguments.
29740   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
29741   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
29742   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
29743   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
29744   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
29745   "man/man_db.renames" ) CONFIG_FILES="$CONFIG_FILES man/man_db.renames" ;;
29746   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
29747   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29748   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29749   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
29750   *) { { echo "$as_me:29750: error: invalid argument: $ac_config_target" >&5
29751 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
29752    { (exit 1); exit 1; }; };;
29753   esac
29754 done
29755
29756 # If the user did not use the arguments to specify the items to instantiate,
29757 # then the envvar interface is used.  Set only those that are not.
29758 # We use the long form for the default assignment because of an extremely
29759 # bizarre bug on SunOS 4.1.3.
29760 if "$ac_need_defaults"; then
29761   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29762   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29763   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29764 fi
29765
29766 # Create a temporary directory, and hook for its removal unless debugging.
29767 $debug ||
29768 {
29769   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
29770   trap '{ (exit 1); exit 1; }' 1 2 13 15
29771 }
29772
29773 # Create a (secure) tmp directory for tmp files.
29774 : "${TMPDIR=/tmp}"
29775 {
29776   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
29777   test -n "$tmp" && test -d "$tmp"
29778 }  ||
29779 {
29780   tmp=$TMPDIR/cs$$-$RANDOM
29781   (umask 077 && mkdir "$tmp")
29782 } ||
29783 {
29784    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
29785    { (exit 1); exit 1; }
29786 }
29787
29788 EOF
29789
29790 cat >>"$CONFIG_STATUS" <<EOF
29791
29792 #
29793 # CONFIG_FILES section.
29794 #
29795
29796 # No need to generate the scripts if there are no CONFIG_FILES.
29797 # This happens for instance when ./config.status config.h
29798 if test -n "\$CONFIG_FILES"; then
29799   # Protect against being on the right side of a sed subst in config.status.
29800   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
29801    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
29802 s,@SHELL@,$SHELL,;t t
29803 s,@exec_prefix@,$exec_prefix,;t t
29804 s,@prefix@,$prefix,;t t
29805 s,@program_transform_name@,$program_transform_name,;t t
29806 s,@bindir@,$bindir,;t t
29807 s,@sbindir@,$sbindir,;t t
29808 s,@libexecdir@,$libexecdir,;t t
29809 s,@datarootdir@,$datarootdir,;t t
29810 s,@datadir@,$datadir,;t t
29811 s,@sysconfdir@,$sysconfdir,;t t
29812 s,@sharedstatedir@,$sharedstatedir,;t t
29813 s,@localstatedir@,$localstatedir,;t t
29814 s,@runstatedir@,$runstatedir,;t t
29815 s,@libdir@,$libdir,;t t
29816 s,@includedir@,$includedir,;t t
29817 s,@oldincludedir@,$oldincludedir,;t t
29818 s,@infodir@,$infodir,;t t
29819 s,@mandir@,$mandir,;t t
29820 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
29821 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
29822 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
29823 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
29824 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
29825 s,@build_alias@,$build_alias,;t t
29826 s,@host_alias@,$host_alias,;t t
29827 s,@target_alias@,$target_alias,;t t
29828 s,@ECHO_C@,$ECHO_C,;t t
29829 s,@ECHO_N@,$ECHO_N,;t t
29830 s,@ECHO_T@,$ECHO_T,;t t
29831 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
29832 s,@DEFS@,$DEFS,;t t
29833 s,@LIBS@,$LIBS,;t t
29834 s,@top_builddir@,$top_builddir,;t t
29835 s,@GREP@,$GREP,;t t
29836 s,@EGREP@,$EGREP,;t t
29837 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
29838 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
29839 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
29840 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
29841 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
29842 s,@cf_cv_abi_default@,$cf_cv_abi_default,;t t
29843 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
29844 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
29845 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
29846 s,@VERSION@,$VERSION,;t t
29847 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
29848 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
29849 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
29850 s,@PACKAGE@,$PACKAGE,;t t
29851 s,@build@,$build,;t t
29852 s,@build_cpu@,$build_cpu,;t t
29853 s,@build_vendor@,$build_vendor,;t t
29854 s,@build_os@,$build_os,;t t
29855 s,@host@,$host,;t t
29856 s,@host_cpu@,$host_cpu,;t t
29857 s,@host_vendor@,$host_vendor,;t t
29858 s,@host_os@,$host_os,;t t
29859 s,@target@,$target,;t t
29860 s,@target_cpu@,$target_cpu,;t t
29861 s,@target_vendor@,$target_vendor,;t t
29862 s,@target_os@,$target_os,;t t
29863 s,@FGREP@,$FGREP,;t t
29864 s,@CC@,$CC,;t t
29865 s,@CFLAGS@,$CFLAGS,;t t
29866 s,@LDFLAGS@,$LDFLAGS,;t t
29867 s,@CPPFLAGS@,$CPPFLAGS,;t t
29868 s,@ac_ct_CC@,$ac_ct_CC,;t t
29869 s,@EXEEXT@,$EXEEXT,;t t
29870 s,@OBJEXT@,$OBJEXT,;t t
29871 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
29872 s,@CPP@,$CPP,;t t
29873 s,@LDCONFIG@,$LDCONFIG,;t t
29874 s,@CXX@,$CXX,;t t
29875 s,@CXXFLAGS@,$CXXFLAGS,;t t
29876 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
29877 s,@AWK@,$AWK,;t t
29878 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
29879 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
29880 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
29881 s,@LINT@,$LINT,;t t
29882 s,@LINT_OPTS@,$LINT_OPTS,;t t
29883 s,@LINT_LIBS@,$LINT_LIBS,;t t
29884 s,@LN_S@,$LN_S,;t t
29885 s,@cf_config_suffix@,$cf_config_suffix,;t t
29886 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
29887 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
29888 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
29889 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
29890 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
29891 s,@SET_MAKE@,$SET_MAKE,;t t
29892 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
29893 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
29894 s,@CTAGS@,$CTAGS,;t t
29895 s,@ETAGS@,$ETAGS,;t t
29896 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
29897 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
29898 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
29899 s,@RANLIB@,$RANLIB,;t t
29900 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
29901 s,@LD@,$LD,;t t
29902 s,@ac_ct_LD@,$ac_ct_LD,;t t
29903 s,@AR@,$AR,;t t
29904 s,@ac_ct_AR@,$ac_ct_AR,;t t
29905 s,@NM@,$NM,;t t
29906 s,@ac_ct_NM@,$ac_ct_NM,;t t
29907 s,@ARFLAGS@,$ARFLAGS,;t t
29908 s,@DESTDIR@,$DESTDIR,;t t
29909 s,@BUILD_CC@,$BUILD_CC,;t t
29910 s,@BUILD_CPP@,$BUILD_CPP,;t t
29911 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
29912 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
29913 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
29914 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
29915 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
29916 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
29917 s,@cf_list_models@,$cf_list_models,;t t
29918 s,@ABI_VERSION@,$ABI_VERSION,;t t
29919 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
29920 s,@LIBTOOL@,$LIBTOOL,;t t
29921 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
29922 s,@LT_UNDEF@,$LT_UNDEF,;t t
29923 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
29924 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
29925 s,@LIB_CREATE@,$LIB_CREATE,;t t
29926 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
29927 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
29928 s,@LIB_PREP@,$LIB_PREP,;t t
29929 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
29930 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
29931 s,@LIB_LINK@,$LIB_LINK,;t t
29932 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
29933 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
29934 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
29935 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
29936 s,@TICS_NAME@,$TICS_NAME,;t t
29937 s,@TINFO_NAME@,$TINFO_NAME,;t t
29938 s,@LIB_NAME@,$LIB_NAME,;t t
29939 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
29940 s,@CC_G_OPT@,$CC_G_OPT,;t t
29941 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
29942 s,@LD_MODEL@,$LD_MODEL,;t t
29943 s,@shlibdir@,$shlibdir,;t t
29944 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
29945 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
29946 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
29947 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
29948 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
29949 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
29950 s,@LINK_PROGS@,$LINK_PROGS,;t t
29951 s,@LINK_TESTS@,$LINK_TESTS,;t t
29952 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
29953 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
29954 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
29955 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
29956 s,@RPATH_LIST@,$RPATH_LIST,;t t
29957 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
29958 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
29959 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
29960 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
29961 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
29962 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
29963 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
29964 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
29965 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
29966 s,@TIC@,$TIC,;t t
29967 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
29968 s,@INFOCMP@,$INFOCMP,;t t
29969 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
29970 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
29971 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
29972 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
29973 s,@XTERM_KBS@,$XTERM_KBS,;t t
29974 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
29975 s,@TERMINFO@,$TERMINFO,;t t
29976 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
29977 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
29978 s,@TERMPATH@,$TERMPATH,;t t
29979 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
29980 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
29981 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
29982 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
29983 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
29984 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
29985 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
29986 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
29987 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
29988 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
29989 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
29990 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
29991 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
29992 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
29993 s,@RGB_PATH@,$RGB_PATH,;t t
29994 s,@no_x11_rgb@,$no_x11_rgb,;t t
29995 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
29996 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
29997 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
29998 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
29999 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
30000 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
30001 s,@cf_manpage_format@,$cf_manpage_format,;t t
30002 s,@cf_manpage_inboth@,$cf_manpage_inboth,;t t
30003 s,@cf_manpage_so_strip@,$cf_manpage_so_strip,;t t
30004 s,@cf_manpage_compress@,$cf_manpage_compress,;t t
30005 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
30006 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
30007 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
30008 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
30009 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
30010 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
30011 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
30012 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
30013 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
30014 s,@PTHREAD@,$PTHREAD,;t t
30015 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
30016 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
30017 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
30018 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
30019 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
30020 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
30021 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
30022 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
30023 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
30024 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
30025 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
30026 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
30027 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
30028 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
30029 s,@ECHO_LT@,$ECHO_LT,;t t
30030 s,@ECHO_LD@,$ECHO_LD,;t t
30031 s,@RULE_CC@,$RULE_CC,;t t
30032 s,@SHOW_CC@,$SHOW_CC,;t t
30033 s,@ECHO_CC@,$ECHO_CC,;t t
30034 s,@ECHO_LINK@,$ECHO_LINK,;t t
30035 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
30036 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
30037 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
30038 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
30039 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
30040 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
30041 s,@ADAFLAGS@,$ADAFLAGS,;t t
30042 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
30043 s,@ADA_TRACE@,$ADA_TRACE,;t t
30044 s,@MATH_LIB@,$MATH_LIB,;t t
30045 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
30046 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
30047 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
30048 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
30049 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
30050 s,@TEST_LIBS@,$TEST_LIBS,;t t
30051 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
30052 s,@CXXCPP@,$CXXCPP,;t t
30053 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
30054 s,@CXX_AR@,$CXX_AR,;t t
30055 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
30056 s,@CXXLIBS@,$CXXLIBS,;t t
30057 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
30058 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
30059 s,@M4_exists@,$M4_exists,;t t
30060 s,@cf_ada_make@,$cf_ada_make,;t t
30061 s,@cf_ada_config@,$cf_ada_config,;t t
30062 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
30063 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
30064 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
30065 s,@cf_compile_generics@,$cf_compile_generics,;t t
30066 s,@cf_generic_objects@,$cf_generic_objects,;t t
30067 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
30068 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
30069 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
30070 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
30071 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
30072 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
30073 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
30074 s,@cf_ada_package@,$cf_ada_package,;t t
30075 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
30076 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
30077 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
30078 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
30079 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
30080 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
30081 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
30082 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
30083 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
30084 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
30085 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
30086 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
30087 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
30088 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
30089 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
30090 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
30091 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
30092 s,@TICS_LIBS@,$TICS_LIBS,;t t
30093 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
30094 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
30095 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
30096 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
30097 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
30098 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
30099 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
30100 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
30101 s,@includesubdir@,$includesubdir,;t t
30102 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
30103 s,@TICS_LIST@,$TICS_LIST,;t t
30104 s,@TINFO_LIST@,$TINFO_LIST,;t t
30105 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
30106 s,@FORM_NAME@,$FORM_NAME,;t t
30107 s,@MENU_NAME@,$MENU_NAME,;t t
30108 s,@PANEL_NAME@,$PANEL_NAME,;t t
30109 s,@CXX_NAME@,$CXX_NAME,;t t
30110 s,@TEST_ARGS@,$TEST_ARGS,;t t
30111 s,@TEST_DEPS@,$TEST_DEPS,;t t
30112 s,@TEST_ARG2@,$TEST_ARG2,;t t
30113 s,@TEST_DEP2@,$TEST_DEP2,;t t
30114 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
30115 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
30116 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
30117 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
30118 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
30119 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
30120 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
30121 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
30122 s,@cross_compiling@,$cross_compiling,;t t
30123 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
30124 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
30125 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
30126 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
30127 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
30128 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
30129 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
30130 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
30131 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
30132 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
30133 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
30134 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
30135 CEOF
30136
30137 EOF
30138
30139   cat >>"$CONFIG_STATUS" <<\EOF
30140   # Split the substitutions into bite-sized pieces for seds with
30141   # small command number limits, like on Digital OSF/1 and HP-UX.
30142   ac_max_sed_lines=48
30143   ac_sed_frag=1 # Number of current file.
30144   ac_beg=1 # First line for current file.
30145   ac_end=$ac_max_sed_lines # Line after last line for current file.
30146   ac_more_lines=:
30147   ac_sed_cmds=
30148   while "$ac_more_lines"; do
30149     if test "$ac_beg" -gt 1; then
30150       sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30151     else
30152       sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30153     fi
30154     if test ! -s "$tmp"/subs.frag; then
30155       ac_more_lines=false
30156     else
30157       # The purpose of the label and of the branching condition is to
30158       # speed up the sed processing (if there are no `@' at all, there
30159       # is no need to browse any of the substitutions).
30160       # These are the two extra sed commands mentioned above.
30161       (echo ':t
30162   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
30163       # It is possible to make a multiline substitution using escaped newlines.
30164       # Ensure that we do not split the substitution between script fragments.
30165       ac_BEG=$ac_end
30166       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
30167       sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
30168       if test -s "$tmp"/subs.next; then
30169         grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit
30170         if test ! -s "$tmp"/subs.edit; then
30171           grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
30172           if test ! -s "$tmp"/subs.edit; then
30173             if test "$ac_beg" -gt 1; then
30174               ac_end=`expr "$ac_end" - 1`
30175               continue
30176             fi
30177           fi
30178         fi
30179       fi
30180
30181       if test -z "$ac_sed_cmds"; then
30182         ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30183       else
30184         ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30185       fi
30186       ac_sed_frag=`expr "$ac_sed_frag" + 1`
30187       ac_beg=$ac_end
30188       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
30189     fi
30190   done
30191   if test -z "$ac_sed_cmds"; then
30192     ac_sed_cmds="cat"
30193   fi
30194 fi # test -n "$CONFIG_FILES"
30195
30196 EOF
30197 cat >>"$CONFIG_STATUS" <<\EOF
30198 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
30199   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30200   case "$ac_file" in
30201   - | *:- | *:-:* ) # input from stdin
30202         cat >"$tmp"/stdin
30203         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30204         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30205   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30206         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30207   * )   ac_file_in=$ac_file.in ;;
30208   esac
30209
30210   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
30211   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30212          X"$ac_file" : 'X\(//\)[^/]' \| \
30213          X"$ac_file" : 'X\(//\)$' \| \
30214          X"$ac_file" : 'X\(/\)' \| \
30215          .     : '\(.\)' 2>/dev/null ||
30216 echo X"$ac_file" |
30217     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30218           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30219           /^X\(\/\/\)$/{ s//\1/; q; }
30220           /^X\(\/\).*/{ s//\1/; q; }
30221           s/.*/./; q'`
30222   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30223     { case "$ac_dir" in
30224   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30225   *)                      as_incr_dir=.;;
30226 esac
30227 as_dummy="$ac_dir"
30228 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30229   case $as_mkdir_dir in
30230     # Skip DOS drivespec
30231     ?:) as_incr_dir=$as_mkdir_dir ;;
30232     *)
30233       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30234       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30235     ;;
30236   esac
30237 done; }
30238
30239     ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
30240     # A "../" for each directory in $ac_dir_suffix.
30241     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
30242   else
30243     ac_dir_suffix= ac_dots=
30244   fi
30245
30246   case "$srcdir" in
30247   .)  ac_srcdir=.
30248       if test -z "$ac_dots"; then
30249          ac_top_srcdir=.
30250       else
30251          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
30252       fi ;;
30253   [\\/]* | ?:[\\/]* )
30254       ac_srcdir="$srcdir$ac_dir_suffix";
30255       ac_top_srcdir="$srcdir" ;;
30256   *) # Relative path.
30257     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
30258     ac_top_srcdir="$ac_dots$srcdir" ;;
30259   esac
30260
30261   case $INSTALL in
30262   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30263   *) ac_INSTALL=$ac_dots$INSTALL ;;
30264   esac
30265
30266   if test x"$ac_file" != x-; then
30267     { echo "$as_me:30267: creating $ac_file" >&5
30268 echo "$as_me: creating $ac_file" >&6;}
30269     rm -f "$ac_file"
30270   fi
30271   # Let's still pretend it is `configure' which instantiates (i.e., don't
30272   # use $as_me), people would be surprised to read:
30273   #    /* config.h.  Generated automatically by config.status.  */
30274   configure_input="Generated automatically from `echo $ac_file_in |
30275                                                  sed 's,.*/,,'` by configure."
30276
30277   # First look for the input files in the build tree, otherwise in the
30278   # src tree.
30279   ac_file_inputs=`IFS=:
30280     for f in $ac_file_in; do
30281       case $f in
30282       -) echo "$tmp"/stdin ;;
30283       [\\/$]*)
30284          # Absolute (can't be DOS-style, as IFS=:)
30285          test -f "$f" || { { echo "$as_me:30285: error: cannot find input file: $f" >&5
30286 echo "$as_me: error: cannot find input file: $f" >&2;}
30287    { (exit 1); exit 1; }; }
30288          echo "$f";;
30289       *) # Relative
30290          if test -f "$f"; then
30291            # Build tree
30292            echo "$f"
30293          elif test -f "$srcdir/$f"; then
30294            # Source tree
30295            echo "$srcdir/$f"
30296          else
30297            # /dev/null tree
30298            { { echo "$as_me:30298: error: cannot find input file: $f" >&5
30299 echo "$as_me: error: cannot find input file: $f" >&2;}
30300    { (exit 1); exit 1; }; }
30301          fi;;
30302       esac
30303     done` || { (exit 1); exit 1; }
30304 EOF
30305 cat >>"$CONFIG_STATUS" <<\EOF
30306   ac_warn_datarootdir=no
30307   if test x"$ac_file" != x-; then
30308     for ac_item in $ac_file_inputs
30309     do
30310       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
30311       if test -n "$ac_seen"; then
30312         ac_used=`grep '@datarootdir@' "$ac_item"`
30313         if test -z "$ac_used"; then
30314           { echo "$as_me:30314: WARNING: datarootdir was used implicitly but not set:
30315 $ac_seen" >&5
30316 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
30317 $ac_seen" >&2;}
30318           ac_warn_datarootdir=yes
30319         fi
30320       fi
30321       ac_seen=`grep '${datarootdir}' "$ac_item"`
30322       if test -n "$ac_seen"; then
30323         { echo "$as_me:30323: WARNING: datarootdir was used explicitly but not set:
30324 $ac_seen" >&5
30325 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
30326 $ac_seen" >&2;}
30327         ac_warn_datarootdir=yes
30328       fi
30329     done
30330   fi
30331
30332 if test "x$ac_warn_datarootdir" = xyes; then
30333   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
30334 fi
30335
30336 EOF
30337 cat >>"$CONFIG_STATUS" <<EOF
30338   sed "$ac_vpsub
30339 $extrasub
30340 EOF
30341 cat >>"$CONFIG_STATUS" <<\EOF
30342 :t
30343 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30344 s,@configure_input@,$configure_input,;t t
30345 s,@srcdir@,$ac_srcdir,;t t
30346 s,@top_srcdir@,$ac_top_srcdir,;t t
30347 s,@INSTALL@,$ac_INSTALL,;t t
30348 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
30349   rm -f "$tmp"/stdin
30350 EOF
30351 test -n "${FGREP}" || FGREP="grep -F"
30352 test -n "${EGREP}" || EGREP="grep -E"
30353 cat >>"$CONFIG_STATUS" <<EOF
30354   test -n "\${FGREP}" || FGREP="$FGREP"
30355   test -n "\${EGREP}" || EGREP="$EGREP"
30356 EOF
30357 cat >>"$CONFIG_STATUS" <<\EOF
30358   if test x"$ac_file" != x-; then
30359     cp "$tmp/out" "$ac_file"
30360
30361     for ac_name in prefix exec_prefix datarootdir
30362     do
30363         ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
30364         if test -n "$ac_seen"; then
30365             ac_init=`$EGREP '[  ]*'$ac_name'[   ]*=' "$ac_file"`
30366             if test -z "$ac_init"; then
30367               ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
30368               { echo "$as_me:30368: WARNING: Variable $ac_name is used but was not set:
30369 $ac_seen" >&5
30370 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
30371 $ac_seen" >&2;}
30372             fi
30373         fi
30374     done
30375     $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
30376     $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
30377     if test -s "$tmp"/out; then
30378       ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
30379       { echo "$as_me:30379: WARNING: Some variables may not be substituted:
30380 $ac_seen" >&5
30381 echo "$as_me: WARNING: Some variables may not be substituted:
30382 $ac_seen" >&2;}
30383     fi
30384   else
30385     cat "$tmp"/out
30386   fi
30387   rm -f "$tmp"/out
30388
30389 done
30390 EOF
30391 cat >>"$CONFIG_STATUS" <<\EOF
30392
30393 #
30394 # CONFIG_HEADER section.
30395 #
30396
30397 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
30398 # NAME is the cpp macro being defined and VALUE is the value it is being given.
30399 #
30400 # ac_d sets the value in "#define NAME VALUE" lines.
30401 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
30402 ac_dB='[        ].*$,\1#\2'
30403 ac_dC=' '
30404 ac_dD=',;t'
30405 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
30406 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30407 ac_iB='\([      ]\),\1#\2define\3'
30408 ac_iC=' '
30409 ac_iD='\4,;t'
30410 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
30411 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30412 ac_uB='$,\1#\2define\3'
30413 ac_uC=' '
30414 ac_uD=',;t'
30415
30416 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
30417   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30418   case "$ac_file" in
30419   - | *:- | *:-:* ) # input from stdin
30420         cat >"$tmp"/stdin
30421         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30422         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30423   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30424         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30425   * )   ac_file_in=$ac_file.in ;;
30426   esac
30427
30428   test x"$ac_file" != x- && { echo "$as_me:30428: creating $ac_file" >&5
30429 echo "$as_me: creating $ac_file" >&6;}
30430
30431   # First look for the input files in the build tree, otherwise in the
30432   # src tree.
30433   ac_file_inputs=`IFS=:
30434     for f in $ac_file_in; do
30435       case $f in
30436       -) echo "$tmp"/stdin ;;
30437       [\\/$]*)
30438          # Absolute (can't be DOS-style, as IFS=:)
30439          test -f "$f" || { { echo "$as_me:30439: error: cannot find input file: $f" >&5
30440 echo "$as_me: error: cannot find input file: $f" >&2;}
30441    { (exit 1); exit 1; }; }
30442          echo $f;;
30443       *) # Relative
30444          if test -f "$f"; then
30445            # Build tree
30446            echo $f
30447          elif test -f "$srcdir/$f"; then
30448            # Source tree
30449            echo "$srcdir/$f"
30450          else
30451            # /dev/null tree
30452            { { echo "$as_me:30452: error: cannot find input file: $f" >&5
30453 echo "$as_me: error: cannot find input file: $f" >&2;}
30454    { (exit 1); exit 1; }; }
30455          fi;;
30456       esac
30457     done` || { (exit 1); exit 1; }
30458   # Remove the trailing spaces.
30459   sed 's/[      ]*$//' $ac_file_inputs >"$tmp"/in
30460
30461 EOF
30462
30463 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
30464 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
30465 # be either 'cat' or 'sort'.
30466 cat confdefs.h | uniq >conftest.vals
30467
30468 # Break up conftest.vals because some shells have a limit on
30469 # the size of here documents, and old seds have small limits too.
30470
30471 rm -f conftest.tail
30472 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
30473 while grep . conftest.vals >/dev/null
30474 do
30475   # Write chunks of a limited-size here document to conftest.frag.
30476   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
30477   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
30478   echo 'CEOF' >> "$CONFIG_STATUS"
30479   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
30480   rm -f conftest.vals
30481   mv conftest.tail conftest.vals
30482 done
30483 rm -f conftest.vals
30484
30485 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
30486 # marker @DEFS@.
30487 echo '  cat >> conftest.edit <<CEOF
30488 /@DEFS@/r conftest.frag
30489 /@DEFS@/d
30490 CEOF
30491 sed -f conftest.edit "$tmp"/in > "$tmp"/out
30492 rm -f "$tmp"/in
30493 mv "$tmp"/out "$tmp"/in
30494 rm -f conftest.edit conftest.frag
30495 ' >> "$CONFIG_STATUS"
30496
30497 cat >>"$CONFIG_STATUS" <<\EOF
30498   # Let's still pretend it is `configure' which instantiates (i.e., don't
30499   # use $as_me), people would be surprised to read:
30500   #    /* config.h.  Generated automatically by config.status.  */
30501   if test x"$ac_file" = x-; then
30502     echo "/* Generated automatically by configure.  */" >"$tmp"/config.h
30503   else
30504     echo "/* $ac_file.  Generated automatically by configure.  */" >"$tmp"/config.h
30505   fi
30506   cat "$tmp"/in >>"$tmp"/config.h
30507   rm -f "$tmp"/in
30508   if test x"$ac_file" != x-; then
30509     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
30510       { echo "$as_me:30510: $ac_file is unchanged" >&5
30511 echo "$as_me: $ac_file is unchanged" >&6;}
30512     else
30513       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30514          X"$ac_file" : 'X\(//\)[^/]' \| \
30515          X"$ac_file" : 'X\(//\)$' \| \
30516          X"$ac_file" : 'X\(/\)' \| \
30517          .     : '\(.\)' 2>/dev/null ||
30518 echo X"$ac_file" |
30519     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30520           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30521           /^X\(\/\/\)$/{ s//\1/; q; }
30522           /^X\(\/\).*/{ s//\1/; q; }
30523           s/.*/./; q'`
30524       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30525         { case "$ac_dir" in
30526   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30527   *)                      as_incr_dir=.;;
30528 esac
30529 as_dummy="$ac_dir"
30530 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30531   case $as_mkdir_dir in
30532     # Skip DOS drivespec
30533     ?:) as_incr_dir=$as_mkdir_dir ;;
30534     *)
30535       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30536       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30537     ;;
30538   esac
30539 done; }
30540
30541       fi
30542       rm -f "$ac_file"
30543       mv "$tmp/config.h" "$ac_file"
30544     fi
30545   else
30546     cat "$tmp"/config.h
30547     rm -f "$tmp"/config.h
30548   fi
30549 done
30550 EOF
30551 cat >>"$CONFIG_STATUS" <<\EOF
30552 #
30553 # CONFIG_COMMANDS section.
30554 #
30555 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
30556   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
30557   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
30558
30559   case "$ac_dest" in
30560     default )
30561 if test "x$cf_with_tests" != xno ; then
30562
30563 for cf_dir in test
30564 do
30565         if test ! -d "$srcdir/$cf_dir" ; then
30566                 continue
30567         elif test -f "$srcdir/$cf_dir/programs" ; then
30568                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
30569         fi
30570 done
30571
30572 fi
30573
30574 cf_prefix=$LIB_PREFIX
30575
30576 case "$cf_cv_shlib_version" in
30577 (cygdll|msysdll|mingw|msvcdll)
30578         TINFO_NAME=$TINFO_ARG_SUFFIX
30579         TINFO_SUFFIX=.dll
30580         ;;
30581 esac
30582
30583 if test -n "$TINFO_SUFFIX" ; then
30584         case "$TINFO_SUFFIX" in
30585         (tw*)
30586                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
30587                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30588                 ;;
30589         (t*)
30590                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
30591                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
30592                 ;;
30593         (w*)
30594                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
30595                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
30596                 ;;
30597         esac
30598 fi
30599
30600 for cf_dir in $SRC_SUBDIRS
30601 do
30602         if test ! -d "$srcdir/$cf_dir" ; then
30603                 continue
30604         elif test -f "$srcdir/$cf_dir/modules" ; then
30605
30606                 SHARED_LIB=
30607                 Libs_To_Make=
30608                 cf_awk_program=
30609                 if test -n "${cf_cv_abi_default}" && test "x${cf_cv_abi_default}" != "x5"
30610                 then
30611                         cf_awk_program="$cf_awk_program\
30612 /deprecated in ABI${cf_cv_abi_default}/ { next; }\
30613 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_default}\"); }\
30614 "
30615                 fi
30616
30617                 if test "x$WILDCARD_SYMS" = xno
30618                 then
30619                         cf_awk_program="$cf_awk_program\
30620 /[      ]_\\*;/ { skip=1; next; }\
30621 "
30622                 fi
30623
30624                 if test "x$cf_awk_program" != "x"
30625                 then
30626                         cat >>$cf_dir/Makefile <<CF_EOF
30627
30628 # Generated by CF_LIB_RULES
30629 resulting.map: $UNALTERED_SYMS
30630         $AWK 'BEGIN { skip = 1; last=""; } \
30631 $cf_awk_program \
30632 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
30633  skip = 0; last = \$\$0; } \
30634 END { print last; }' < "$UNALTERED_SYMS" >\$@
30635
30636 distclean::
30637         rm -f resulting.map
30638 CF_EOF
30639                 fi
30640
30641                 for cf_item in $cf_LIST_MODELS
30642                 do
30643
30644         case X$cf_item in
30645         (Xlibtool)
30646                 cf_suffix='.la'
30647                 cf_depsuf=$cf_suffix
30648                 ;;
30649         (Xdebug)
30650                 case "$cf_cv_system_name" in
30651                 (*-msvc*)
30652                         cf_suffix='_g.lib'
30653                         ;;
30654                 (*)
30655                         cf_suffix='_g.a'
30656                         ;;
30657                 esac
30658                 cf_depsuf=$cf_suffix
30659                 ;;
30660         (Xprofile)
30661                 case "$cf_cv_system_name" in
30662                 (*-msvc*)
30663                         cf_suffix='_p.lib'
30664                         ;;
30665                 (*)
30666                         cf_suffix='_p.a'
30667                         ;;
30668                 esac
30669                 cf_depsuf=$cf_suffix
30670                 ;;
30671         (Xshared)
30672                 case "$cf_cv_system_name" in
30673                 (aix[5-7]*)
30674                         cf_suffix='.so'
30675                         cf_depsuf=$cf_suffix
30676                         ;;
30677                 (*-msvc*)
30678                         cf_suffix='.dll'
30679                         cf_depsuf='.dll.lib'
30680                         ;;
30681                 (cygwin*|msys*|mingw*)
30682                         cf_suffix='.dll'
30683                         cf_depsuf='.dll.a'
30684                         ;;
30685                 (darwin*)
30686                         cf_suffix='.dylib'
30687                         cf_depsuf=$cf_suffix
30688                         ;;
30689                 (hpux*)
30690                         case "$target" in
30691                         (ia64*)
30692                                 cf_suffix='.so'
30693                                 cf_depsuf=$cf_suffix
30694                                 ;;
30695                         (*)
30696                                 cf_suffix='.sl'
30697                                 cf_depsuf=$cf_suffix
30698                                 ;;
30699                         esac
30700                         ;;
30701                 (*)
30702                         cf_suffix='.so'
30703                         cf_depsuf=$cf_suffix
30704                         ;;
30705                 esac
30706                 ;;
30707         (*)
30708                 case "$target" in
30709                 (*-msvc*)
30710                         cf_suffix='.lib'
30711                         ;;
30712                 (*)
30713                         cf_suffix='.a'
30714                         ;;
30715                 esac
30716                 cf_depsuf=$cf_suffix
30717                 ;;
30718         esac
30719         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30720         then
30721                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30722                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30723         fi
30724
30725                         if test "$cf_dir" = "c++"
30726                         then
30727
30728 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30729
30730 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30731
30732                         else
30733
30734 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30735
30736 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30737
30738                         fi
30739                         test -z "$cf_libname" && cf_libname="$cf_dir"
30740                         if test "$cf_item" = shared ; then
30741                                 if test -n "${LIB_SUFFIX}"
30742                                 then
30743                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30744                                 else
30745                                         cf_shared_suffix="$cf_suffix"
30746                                 fi
30747                                 if test "$cf_cv_do_symlinks" = yes ; then
30748                                         cf_version_name=
30749
30750                                         case "$cf_cv_shlib_version" in
30751                                         (rel)
30752                                                 cf_version_name=REL_VERSION
30753                                                 ;;
30754                                         (abi)
30755                                                 cf_version_name=ABI_VERSION
30756                                                 ;;
30757                                         esac
30758
30759                                         if test -n "$cf_version_name"
30760                                         then
30761                                                 case "$cf_cv_system_name" in
30762                                                 (darwin*)
30763                                                         # "w", etc?
30764                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
30765                                                         ;;
30766                                                 (*)
30767                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
30768                                                         ;;
30769                                                 esac
30770                                         fi
30771                                         if test -n "${USE_LIB_SUFFIX}"
30772                                         then
30773                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30774                                         else
30775                                                 cf_shared_suffix="$cf_suffix"
30776                                         fi
30777                                 fi
30778                                 # cygwin needs import library, and has unique naming convention
30779                                 # use autodetected ${cf_prefix} for import lib and static lib, but
30780                                 # use 'cyg' prefix for shared lib.
30781                                 case "$cf_cv_shlib_version" in
30782                                 (cygdll)
30783                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30784                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
30785                                         ;;
30786                                 (msysdll)
30787                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30788                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
30789                                         ;;
30790                                 (mingw)
30791                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30792                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
30793                                         ;;
30794                                 (msvcdll)
30795                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30796                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
30797                                         ;;
30798                                 (*)
30799                                         cf_add_lib=
30800                                         ;;
30801                                 esac
30802                                 if test -n "$cf_add_lib"
30803                                 then
30804                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30805                                         continue
30806                                 fi
30807                         fi
30808                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
30809                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30810                 done
30811
30812                 if test "$cf_dir" = ncurses ; then
30813                         cf_subsets="$LIB_SUBSETS"
30814                         cf_r_parts="$cf_subsets"
30815                         cf_liblist="$Libs_To_Make"
30816
30817                         while test -n "$cf_r_parts"
30818                         do
30819                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
30820                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
30821                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
30822                                         cf_add_lib=
30823                                         case "$cf_l_parts" in
30824                                         (*termlib*)
30825                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
30826                                                 ;;
30827                                         (*ticlib*)
30828                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
30829                                                 ;;
30830                                         (*)
30831                                                 break
30832                                                 ;;
30833                                         esac
30834                                         if test -n "$cf_add_lib"; then
30835                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
30836                                         fi
30837                                 else
30838                                         break
30839                                 fi
30840                         done
30841                 else
30842                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
30843                 fi
30844
30845                 if test "$cf_dir" = c++; then
30846                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
30847                                 cf_list=
30848                                 for cf_item in $Libs_To_Make
30849                                 do
30850                                         case "$cf_item" in
30851                                         (*.a)
30852                                                 ;;
30853                                         (*)
30854                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
30855                                                 ;;
30856                                         esac
30857                                         for cf_test in $cf_list
30858                                         do
30859                                                 if test "$cf_test" = "$cf_item"
30860                                                 then
30861                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
30862                                                         cf_item=
30863                                                         break
30864                                                 fi
30865                                         done
30866                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
30867                                 done
30868                                 Libs_To_Make="$cf_list"
30869                         fi
30870                 fi
30871
30872                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
30873                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
30874                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
30875                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
30876
30877                 $AWK -f "$srcdir/mk-0th.awk" \
30878                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
30879                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30880
30881                 for cf_subset in $cf_subsets
30882                 do
30883                         cf_subdirs=
30884                         for cf_item in $cf_LIST_MODELS
30885                         do
30886
30887                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
30888
30889 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30890
30891                         CXX_MODEL=$cf_ITEM
30892                         if test "$CXX_MODEL" = SHARED; then
30893                                 case "$cf_cv_shlib_version" in
30894                                 (cygdll|msysdll|mingw|msvcdll)
30895                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
30896
30897 echo "${as_me:-configure}:30897: testing overriding CXX_MODEL to SHARED ..." 1>&5
30898
30899                                         with_shared_cxx=yes
30900                                         ;;
30901                                 (*)
30902                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
30903                                         ;;
30904                                 esac
30905                         fi
30906
30907         case X$cf_item in
30908         (Xlibtool)
30909                 cf_suffix='.la'
30910                 cf_depsuf=$cf_suffix
30911                 ;;
30912         (Xdebug)
30913                 case "$cf_cv_system_name" in
30914                 (*-msvc*)
30915                         cf_suffix='_g.lib'
30916                         ;;
30917                 (*)
30918                         cf_suffix='_g.a'
30919                         ;;
30920                 esac
30921                 cf_depsuf=$cf_suffix
30922                 ;;
30923         (Xprofile)
30924                 case "$cf_cv_system_name" in
30925                 (*-msvc*)
30926                         cf_suffix='_p.lib'
30927                         ;;
30928                 (*)
30929                         cf_suffix='_p.a'
30930                         ;;
30931                 esac
30932                 cf_depsuf=$cf_suffix
30933                 ;;
30934         (Xshared)
30935                 case "$cf_cv_system_name" in
30936                 (aix[5-7]*)
30937                         cf_suffix='.so'
30938                         cf_depsuf=$cf_suffix
30939                         ;;
30940                 (*-msvc*)
30941                         cf_suffix='.dll'
30942                         cf_depsuf='.dll.lib'
30943                         ;;
30944                 (cygwin*|msys*|mingw*)
30945                         cf_suffix='.dll'
30946                         cf_depsuf='.dll.a'
30947                         ;;
30948                 (darwin*)
30949                         cf_suffix='.dylib'
30950                         cf_depsuf=$cf_suffix
30951                         ;;
30952                 (hpux*)
30953                         case "$target" in
30954                         (ia64*)
30955                                 cf_suffix='.so'
30956                                 cf_depsuf=$cf_suffix
30957                                 ;;
30958                         (*)
30959                                 cf_suffix='.sl'
30960                                 cf_depsuf=$cf_suffix
30961                                 ;;
30962                         esac
30963                         ;;
30964                 (*)
30965                         cf_suffix='.so'
30966                         cf_depsuf=$cf_suffix
30967                         ;;
30968                 esac
30969                 ;;
30970         (*)
30971                 case "$target" in
30972                 (*-msvc*)
30973                         cf_suffix='.lib'
30974                         ;;
30975                 (*)
30976                         cf_suffix='.a'
30977                         ;;
30978                 esac
30979                 cf_depsuf=$cf_suffix
30980                 ;;
30981         esac
30982         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30983         then
30984                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30985                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30986         fi
30987
30988         case $cf_item in
30989         (libtool) cf_subdir='obj_lo'  ;;
30990         (normal)  cf_subdir='objects' ;;
30991         (debug)   cf_subdir='obj_g' ;;
30992         (profile) cf_subdir='obj_p' ;;
30993         (shared)
30994                 case "$cf_cv_system_name" in
30995                 (cygwin|msys)
30996                         cf_subdir='objects' ;;
30997                 (*)
30998                         cf_subdir='obj_s' ;;
30999                 esac
31000         esac
31001
31002                         # Test for case where we build libtinfo with a different name.
31003                         cf_libname=$cf_dir
31004                         if test "$cf_dir" = ncurses ; then
31005                                 case "$cf_subset" in
31006                                 (*base*)
31007                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
31008                                         ;;
31009                                 (*termlib*)
31010                                         cf_libname=$TINFO_LIB_SUFFIX
31011                                         ;;
31012                                 (ticlib*)
31013                                         cf_libname=$TICS_LIB_SUFFIX
31014                                         ;;
31015                                 esac
31016                         elif test "$cf_dir" = c++ ; then
31017
31018 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31019
31020 eval cf_libname="\$${cf_map_lib_basename}_NAME"
31021
31022                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
31023                         else
31024
31025 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31026
31027 eval cf_libname="\$${cf_map_lib_basename}_NAME"
31028
31029                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
31030                         fi
31031                         if test -n "${USE_ARG_SUFFIX}" ; then
31032                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
31033                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
31034                         fi
31035
31036                         # These dependencies really are for development, not
31037                         # builds, but they are useful in porting, too.
31038                         cf_depend="../include/ncurses_cfg.h"
31039                         if test "$srcdir" = "."; then
31040                                 cf_reldir="."
31041                         else
31042                                 cf_reldir="\${srcdir}"
31043                         fi
31044
31045                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
31046                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
31047                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
31048                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
31049                         fi
31050
31051                         cf_dir_suffix=
31052                         old_cf_suffix="$cf_suffix"
31053                         if test "$cf_cv_shlib_version_infix" = yes ; then
31054                         if test -n "$USE_LIB_SUFFIX" ; then
31055                                 case "$USE_LIB_SUFFIX" in
31056                                 (tw*)
31057                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
31058                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
31059                                         cf_dir_suffix=tw$EXTRA_SUFFIX
31060                                         ;;
31061                                 (t*)
31062                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
31063                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
31064                                         cf_dir_suffix=t$EXTRA_SUFFIX
31065                                         ;;
31066                                 (w*)
31067                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
31068                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
31069                                         cf_dir_suffix=w$EXTRA_SUFFIX
31070                                         ;;
31071                                 (*)
31072                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
31073                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
31074                                         cf_dir_suffix=$EXTRA_SUFFIX
31075                                         ;;
31076                                 esac
31077                         fi
31078                         fi
31079
31080                         $AWK -f "$srcdir/mk-1st.awk" \
31081                                 name=${cf_libname}${cf_dir_suffix} \
31082                                 traces=$LIB_TRACING \
31083                                 MODEL=$cf_ITEM \
31084                                 CXX_MODEL=$CXX_MODEL \
31085                                 LIB_SUFFIX=$LIB_SUFFIX \
31086                                 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
31087                                 make_phony="${cf_cv_make_PHONY:-no}" \
31088                                 model=$cf_subdir \
31089                                 prefix=$cf_prefix \
31090                                 suffix=$cf_suffix \
31091                                 subset=$cf_subset \
31092                                 driver=$cf_cv_term_driver \
31093                                 SymLink="$LN_S" \
31094                                 TermlibRoot=$TINFO_NAME \
31095                                 TermlibSuffix=$TINFO_SUFFIX \
31096                                 ShlibVer=$cf_cv_shlib_version \
31097                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
31098                                 ReLink=${cf_cv_do_relink:-no} \
31099                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
31100                                 DoLinks=$cf_cv_do_symlinks \
31101                                 rmSoLocs=$cf_cv_rm_so_locs \
31102                                 ldconfig="$LDCONFIG" \
31103                                 overwrite=$WITH_OVERWRITE \
31104                                 depend="$cf_depend" \
31105                                 host="$host" \
31106                                 libtool_version="$LIBTOOL_VERSION" \
31107                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31108
31109                         cf_suffix="$old_cf_suffix"
31110
31111                         for cf_subdir2 in $cf_subdirs lib
31112                         do
31113                                 test "$cf_subdir" = "$cf_subdir2" && break
31114                         done
31115                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
31116                         $AWK -f "$srcdir/mk-2nd.awk" \
31117                                 name=$cf_dir \
31118                                 traces=$LIB_TRACING \
31119                                 MODEL=$cf_ITEM \
31120                                 model=$cf_subdir \
31121                                 subset=$cf_subset \
31122                                 srcdir=$srcdir \
31123                                 echo=$WITH_ECHO \
31124                                 crenames=$cf_cv_prog_CC_c_o \
31125                                 cxxrenames=$cf_cv_prog_CXX_c_o \
31126                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31127                         cf_subdirs="$cf_subdirs $cf_subdir"
31128                         done
31129                 done
31130         fi
31131
31132         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
31133 done
31134
31135 echo >> Makefile
31136 echo '# generated by CF_LIB_RULES' >> Makefile
31137
31138 if test "x$cf_cv_make_PHONY" = xyes ; then
31139         cat >> Makefile <<-CF_EOF
31140
31141         .PHONY :        libs
31142         .PHONY :        lintlib
31143         .PHONY :        install.includes
31144         .PHONY :        uninstall.includes
31145         .PHONY :        install.libs
31146         .PHONY :        uninstall.libs
31147 CF_EOF
31148 fi
31149
31150 for cf_dir in $SRC_SUBDIRS
31151 do
31152         if test ! -d "$srcdir/$cf_dir" ; then
31153                 continue
31154         fi
31155
31156         if test -f "$cf_dir/Makefile" ; then
31157                 case "$cf_dir" in
31158                 (Ada95)
31159                         echo 'libs \' >> Makefile
31160                         echo 'install.libs \' >> Makefile
31161                         echo 'uninstall.libs ::' >> Makefile
31162                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
31163                         ;;
31164                 esac
31165         fi
31166
31167         if test -f "$srcdir/$cf_dir/modules" ; then
31168
31169                 if test "x$cf_cv_make_PHONY" = xyes ; then
31170                         cat >> Makefile <<-CF_EOF
31171
31172                         .PHONY :        install.$cf_dir
31173                         .PHONY :        uninstall.$cf_dir
31174 CF_EOF
31175                 fi
31176
31177                 echo >> Makefile
31178                 if test -f "$srcdir/$cf_dir/headers" ; then
31179 cat >> Makefile <<CF_EOF
31180 install.includes \\
31181 uninstall.includes \\
31182 CF_EOF
31183                 fi
31184
31185 cat >> Makefile <<CF_EOF
31186 lint \\
31187 libs \\
31188 lintlib \\
31189 install.libs \\
31190 uninstall.libs \\
31191 install.$cf_dir \\
31192 uninstall.$cf_dir ::
31193         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31194 CF_EOF
31195         elif test -f "$srcdir/$cf_dir/headers" ; then
31196 cat >> Makefile <<CF_EOF
31197
31198 libs \\
31199 install.libs \\
31200 uninstall.libs \\
31201 install.includes \\
31202 uninstall.includes ::
31203         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31204 CF_EOF
31205 fi
31206 done
31207
31208 if test "x$cf_cv_make_PHONY" = xyes ; then
31209         cat >> Makefile <<-CF_EOF
31210
31211         .PHONY :        install.data
31212         .PHONY :        uninstall.data
31213 CF_EOF
31214 fi
31215
31216 if test "x$cf_with_db_install" = xyes; then
31217 cat >> Makefile <<CF_EOF
31218
31219 install.libs uninstall.libs \\
31220 install.data uninstall.data ::
31221 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31222 CF_EOF
31223 else
31224 cat >> Makefile <<CF_EOF
31225
31226 install.libs uninstall.libs ::
31227         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31228 CF_EOF
31229 fi
31230
31231 if test "x$cf_with_manpages" = xyes; then
31232
31233 if test "x$cf_cv_make_PHONY" = xyes ; then
31234         cat >> Makefile <<-CF_EOF
31235
31236         .PHONY :        install.man
31237         .PHONY :        uninstall.man
31238 CF_EOF
31239 fi
31240
31241 cat >> Makefile <<CF_EOF
31242
31243 install.man \\
31244 uninstall.man ::
31245         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
31246 CF_EOF
31247 fi
31248
31249 cat >> Makefile <<CF_EOF
31250
31251 distclean ::
31252         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
31253         rm -f headers.sh headers.sed mk_shared_lib.sh
31254         rm -f edit_man.* man_alias.* *.tmp
31255         rm -rf \${DIRS_TO_MAKE}
31256 CF_EOF
31257
31258 rm -f headers.sed headers.sh
31259
31260 echo creating headers.sh
31261 cat >headers.sh <<CF_EOF
31262 #! $SHELL
31263 # This shell script is generated by the 'configure' script.  It is invoked in a
31264 # subdirectory of the build tree.  It generates a sed-script in the parent
31265 # directory that is used to adjust includes for header files that reside in a
31266 # subdirectory of /usr/include, etc.
31267 PRG=""
31268 while test \$# != 3
31269 do
31270 PRG="\$PRG \$1"; shift
31271 done
31272 DST=\$1
31273 REF=\$2
31274 SRC=\$3
31275 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
31276 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
31277 echo installing \$SRC in \$DST
31278 CF_EOF
31279
31280 if test "$WITH_CURSES_H" = yes; then
31281         cat >>headers.sh <<CF_EOF
31282 case \$DST in
31283 (/*/include/*)
31284         END=\`basename \$DST\`
31285         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31286         do
31287                 NAME=\`basename \$i\`
31288                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31289         done
31290         ;;
31291 (*)
31292         echo "" >> \$TMPSED
31293         ;;
31294 esac
31295 CF_EOF
31296
31297 else
31298         cat >>headers.sh <<CF_EOF
31299 case \$DST in
31300 (/*/include/*)
31301         END=\`basename \$DST\`
31302         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31303         do
31304                 NAME=\`basename \$i\`
31305                 if test "\$NAME" = "curses.h"
31306                 then
31307                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31308                         NAME=ncurses.h
31309                 fi
31310                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31311         done
31312         ;;
31313 (*)
31314         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31315         ;;
31316 esac
31317 CF_EOF
31318 fi
31319 cat >>headers.sh <<CF_EOF
31320 rm -f \$TMPSRC
31321 sed -f \$TMPSED \$SRC > \$TMPSRC
31322 NAME=\`basename \$SRC\`
31323 CF_EOF
31324 if test "$WITH_CURSES_H" != yes; then
31325         cat >>headers.sh <<CF_EOF
31326 test "\$NAME" = "curses.h" && NAME=ncurses.h
31327 CF_EOF
31328 fi
31329 cat >>headers.sh <<CF_EOF
31330 # Just in case someone gzip'd manpages, remove the conflicting copy.
31331 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
31332
31333 eval \$PRG \$TMPSRC \$DST/\$NAME
31334 rm -f \$TMPSRC \$TMPSED
31335 CF_EOF
31336
31337 chmod 0755 headers.sh
31338
31339 for cf_dir in $SRC_SUBDIRS
31340 do
31341         if test ! -d "$srcdir/$cf_dir" ; then
31342                 continue
31343         fi
31344
31345         if test -f "$srcdir/$cf_dir/headers" ; then
31346                 $AWK -f "$srcdir/mk-hdr.awk" \
31347                         subset="$LIB_SUBSETS" \
31348                         compat="$WITH_CURSES_H" \
31349                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
31350         fi
31351
31352         if test -f "$srcdir/$cf_dir/modules" ; then
31353                 if test "$cf_dir" != "c++" ; then
31354                         if test "x$cf_cv_make_PHONY" = xyes ; then
31355                                 cat >> $cf_dir/Makefile <<-CF_EOF
31356
31357                                 .PHONY :        depend
31358 CF_EOF
31359                         fi
31360
31361                         cat >>$cf_dir/Makefile <<"CF_EOF"
31362 depend : ${AUTO_SRC}
31363         makedepend -- ${CPPFLAGS} -- ${C_SRC}
31364
31365 # DO NOT DELETE THIS LINE -- make depend depends on it.
31366 CF_EOF
31367                 fi
31368         fi
31369 done
31370
31371 if test "$MANPAGE_RENAMES" != no ; then
31372         # Construct a sed-script to perform renaming within man-pages
31373         test -n "$verbose" && echo "creating edit_man.sed"
31374         test ! -d man && mkdir man
31375         FGREP="${FGREP-grep -F}" $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
31376 fi
31377
31378 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
31379 if test -z "$USE_OLD_MAKERULES" ; then
31380         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
31381 fi
31382 fi
31383  ;;
31384   esac
31385 done
31386 EOF
31387
31388 cat >>"$CONFIG_STATUS" <<\EOF
31389
31390 { (exit 0); exit 0; }
31391 EOF
31392 chmod +x "$CONFIG_STATUS"
31393 ac_clean_files=$ac_clean_files_save
31394
31395 # configure is writing to config.log, and then calls config.status.
31396 # config.status does its own redirection, appending to config.log.
31397 # Unfortunately, on DOS this fails, as config.log is still kept open
31398 # by configure, so config.status won't be able to write to it; its
31399 # output is simply discarded.  So we exec the FD to /dev/null,
31400 # effectively closing config.log, so it can be properly (re)opened and
31401 # appended to by config.status.  When coming back to configure, we
31402 # need to make the FD available again.
31403 if test "$no_create" != yes; then
31404   ac_cs_success=:
31405   exec 5>/dev/null
31406   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
31407   exec 5>>config.log
31408   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31409   # would make configure fail if this is the last instruction.
31410   "$ac_cs_success" || { (exit 1); exit 1; }
31411 fi
31412 ${MAKE:-make} preinstall