]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.4 - patch 20230114
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.755 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20230114.
5 #
6 # Copyright 2003-2022,2023      Thomas E. Dickey
7 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
8 # Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11
12 # Avoid depending upon Character Ranges.
13 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16 as_cr_digits='0123456789'
17 as_cr_alnum=$as_cr_Letters$as_cr_digits
18
19 # Sed expression to map a string onto a valid variable name.
20 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
21
22 # Sed expression to map a string onto a valid CPP name.
23 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
24
25 # Be Bourne compatible
26 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27   emulate sh
28   NULLCMD=:
29 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
30   set -o posix
31 fi
32
33 # Name of the executable.
34 as_me=`echo "$0" |sed 's,.*[\\/],,'`
35
36 if expr a : '\(a\)' >/dev/null 2>&1; then
37   as_expr="expr"
38 else
39   as_expr="false"
40 fi
41
42 rm -f conf$$ conf$$.exe conf$$.file
43 echo >conf$$.file
44 if ln -s conf$$.file conf$$ 2>/dev/null; then
45   # We could just check for DJGPP; but this test a) works b) is more generic
46   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
47   if test -f conf$$.exe; then
48     # Don't use ln at all; we don't have any links
49     as_ln_s='cp -p'
50   else
51     as_ln_s='ln -s'
52   fi
53 elif ln conf$$.file conf$$ 2>/dev/null; then
54   as_ln_s='ln'
55 else
56   as_ln_s='cp -p'
57 fi
58 rm -f conf$$ conf$$.exe conf$$.file
59
60 as_executable_p="test -f"
61
62 # Support unset when possible.
63 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
64   as_unset="unset"
65 else
66   as_unset="false"
67 fi
68
69 # NLS nuisances.
70 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
71 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
72 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
73 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
74 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
75 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
76 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
77 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
78
79 # IFS
80 # We need space, tab and new line, in precisely that order.
81 as_nl='
82 '
83 IFS="   $as_nl"
84
85 # CDPATH.
86 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
87
88 # Name of the host.
89 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
90 # so uname gets run too.
91 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
92
93 exec 6>&1
94
95 #
96 # Initializations.
97 #
98 ac_default_prefix=/usr/local
99 cross_compiling=no
100 subdirs=
101 MFLAGS=
102 MAKEFLAGS=
103 SHELL=${CONFIG_SHELL-/bin/sh}
104
105 # Maximum number of lines to put in a shell here document.
106 # This variable seems obsolete.  It should probably be removed, and
107 # only ac_max_sed_lines should be used.
108 : "${ac_max_here_lines=38}"
109
110 ac_unique_file="ncurses/base/lib_initscr.c"
111 # Factoring default headers for most tests.
112 ac_includes_default="\
113 #include <stdio.h>
114 #if HAVE_SYS_TYPES_H
115 # include <sys/types.h>
116 #endif
117 #if HAVE_SYS_STAT_H
118 # include <sys/stat.h>
119 #endif
120 #if STDC_HEADERS
121 # include <stdlib.h>
122 # include <stddef.h>
123 #else
124 # if HAVE_STDLIB_H
125 #  include <stdlib.h>
126 # endif
127 #endif
128 #if HAVE_STRING_H
129 # if !STDC_HEADERS && HAVE_MEMORY_H
130 #  include <memory.h>
131 # endif
132 # include <string.h>
133 #endif
134 #if HAVE_STRINGS_H
135 # include <strings.h>
136 #endif
137 #if HAVE_INTTYPES_H
138 # include <inttypes.h>
139 #else
140 # if HAVE_STDINT_H
141 #  include <stdint.h>
142 # endif
143 #endif
144 #if HAVE_UNISTD_H
145 # include <unistd.h>
146 #endif"
147
148 # Initialize some variables set by options.
149 ac_init_help=
150 ac_init_version=false
151 # The variables have the same names as the options, with
152 # dashes changed to underlines.
153 cache_file=/dev/null
154 exec_prefix=NONE
155 no_create=
156 no_recursion=
157 prefix=NONE
158 program_prefix=NONE
159 program_suffix=NONE
160 program_transform_name=s,x,x,
161 silent=
162 site=
163 srcdir=
164 verbose=
165 x_includes=NONE
166 x_libraries=NONE
167
168 # Installation directory options.
169 # These are left unexpanded so users can "make install exec_prefix=/foo"
170 # and all the variables that are supposed to be based on exec_prefix
171 # by default will actually change.
172 # Use braces instead of parens because sh, perl, etc. also accept them.
173 bindir='${exec_prefix}/bin'
174 sbindir='${exec_prefix}/sbin'
175 libexecdir='${exec_prefix}/libexec'
176 datarootdir='${prefix}/share'
177 datadir='${datarootdir}'
178 sysconfdir='${prefix}/etc'
179 sharedstatedir='${prefix}/com'
180 localstatedir='${prefix}/var'
181 runstatedir='${localstatedir}/run'
182 libdir='${exec_prefix}/lib'
183 includedir='${prefix}/include'
184 oldincludedir='/usr/include'
185 infodir='${datarootdir}/info'
186 mandir='${datarootdir}/man'
187
188 # Identity of this package.
189 PACKAGE_NAME=
190 PACKAGE_TARNAME=
191 PACKAGE_VERSION=
192 PACKAGE_STRING=
193 PACKAGE_BUGREPORT=
194
195 ac_prev=
196 for ac_option
197 do
198   # If the previous option needs an argument, assign it.
199   if test -n "$ac_prev"; then
200     eval "$ac_prev=\$ac_option"
201     ac_prev=
202     continue
203   fi
204
205   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
206
207   # Accept the important Cygnus configure options, so we can diagnose typos.
208
209   case "$ac_option" in
210
211   -bindir | --bindir | --bindi | --bind | --bin | --bi)
212     ac_prev=bindir ;;
213   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
214     bindir=$ac_optarg ;;
215
216   -build | --build | --buil | --bui | --bu)
217     ac_prev=build_alias ;;
218   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
219     build_alias=$ac_optarg ;;
220
221   -cache-file | --cache-file | --cache-fil | --cache-fi \
222   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
223     ac_prev=cache_file ;;
224   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
225   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
226     cache_file=$ac_optarg ;;
227
228   --config-cache | -C)
229     cache_file=config.cache ;;
230
231   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
232     ac_prev=datadir ;;
233   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
234   | --da=*)
235     datadir=$ac_optarg ;;
236
237   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
238   | --dataroo | --dataro | --datar)
239     ac_prev=datarootdir ;;
240   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
241   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
242     datarootdir=$ac_optarg ;;
243
244   -disable-* | --disable-*)
245     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
246     # Reject names that are not valid shell variable names.
247     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
248       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
249    { (exit 1); exit 1; }; }
250     ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
251     eval "enable_$ac_feature=no" ;;
252
253   -enable-* | --enable-*)
254     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
255     # Reject names that are not valid shell variable names.
256     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
257       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
258    { (exit 1); exit 1; }; }
259     ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
260     case "$ac_option" in
261       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
262       *) ac_optarg=yes ;;
263     esac
264     eval "enable_$ac_feature='$ac_optarg'" ;;
265
266   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
267   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
268   | --exec | --exe | --ex)
269     ac_prev=exec_prefix ;;
270   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
271   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
272   | --exec=* | --exe=* | --ex=*)
273     exec_prefix=$ac_optarg ;;
274
275   -gas | --gas | --ga | --g)
276     # Obsolete; use --with-gas.
277     with_gas=yes ;;
278
279   -help | --help | --hel | --he | -h)
280     ac_init_help=long ;;
281   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
282     ac_init_help=recursive ;;
283   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
284     ac_init_help=short ;;
285
286   -host | --host | --hos | --ho)
287     ac_prev=host_alias ;;
288   -host=* | --host=* | --hos=* | --ho=*)
289     host_alias=$ac_optarg ;;
290
291   -includedir | --includedir | --includedi | --included | --include \
292   | --includ | --inclu | --incl | --inc)
293     ac_prev=includedir ;;
294   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
295   | --includ=* | --inclu=* | --incl=* | --inc=*)
296     includedir=$ac_optarg ;;
297
298   -infodir | --infodir | --infodi | --infod | --info | --inf)
299     ac_prev=infodir ;;
300   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
301     infodir=$ac_optarg ;;
302
303   -libdir | --libdir | --libdi | --libd)
304     ac_prev=libdir ;;
305   -libdir=* | --libdir=* | --libdi=* | --libd=*)
306     libdir=$ac_optarg ;;
307
308   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
309   | --libexe | --libex | --libe)
310     ac_prev=libexecdir ;;
311   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
312   | --libexe=* | --libex=* | --libe=*)
313     libexecdir=$ac_optarg ;;
314
315   -localstatedir | --localstatedir | --localstatedi | --localstated \
316   | --localstate | --localstat | --localsta | --localst \
317   | --locals | --local | --loca | --loc | --lo)
318     ac_prev=localstatedir ;;
319   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
320   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
321   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
322     localstatedir=$ac_optarg ;;
323
324   -runstatedir | --runstatedir | --runstatedi | --runstated \
325   | --runstate | --runstat | --runsta | --runst \
326   | --runs | --run | --ru)
327     ac_prev=runstatedir ;;
328   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
329   | --runstate=* | --runstat=* | --runsta=* | --runst=* \
330   | --runs=* | --run=* | --ru=*)
331     runstatedir=$ac_optarg ;;
332
333   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
334     ac_prev=mandir ;;
335   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
336     mandir=$ac_optarg ;;
337
338   -nfp | --nfp | --nf)
339     # Obsolete; use --without-fp.
340     with_fp=no ;;
341
342   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
343   | --no-cr | --no-c)
344     no_create=yes ;;
345
346   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
347   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
348     no_recursion=yes ;;
349
350   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
351   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
352   | --oldin | --oldi | --old | --ol | --o)
353     ac_prev=oldincludedir ;;
354   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
355   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
356   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
357     oldincludedir=$ac_optarg ;;
358
359   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
360     ac_prev=prefix ;;
361   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
362     prefix=$ac_optarg ;;
363
364   -program-prefix | --program-prefix | --program-prefi | --program-pref \
365   | --program-pre | --program-pr | --program-p)
366     ac_prev=program_prefix ;;
367   -program-prefix=* | --program-prefix=* | --program-prefi=* \
368   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
369     program_prefix=$ac_optarg ;;
370
371   -program-suffix | --program-suffix | --program-suffi | --program-suff \
372   | --program-suf | --program-su | --program-s)
373     ac_prev=program_suffix ;;
374   -program-suffix=* | --program-suffix=* | --program-suffi=* \
375   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
376     program_suffix=$ac_optarg ;;
377
378   -program-transform-name | --program-transform-name \
379   | --program-transform-nam | --program-transform-na \
380   | --program-transform-n | --program-transform- \
381   | --program-transform | --program-transfor \
382   | --program-transfo | --program-transf \
383   | --program-trans | --program-tran \
384   | --progr-tra | --program-tr | --program-t)
385     ac_prev=program_transform_name ;;
386   -program-transform-name=* | --program-transform-name=* \
387   | --program-transform-nam=* | --program-transform-na=* \
388   | --program-transform-n=* | --program-transform-=* \
389   | --program-transform=* | --program-transfor=* \
390   | --program-transfo=* | --program-transf=* \
391   | --program-trans=* | --program-tran=* \
392   | --progr-tra=* | --program-tr=* | --program-t=*)
393     program_transform_name=$ac_optarg ;;
394
395   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
396   | -silent | --silent | --silen | --sile | --sil)
397     silent=yes ;;
398
399   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
400     ac_prev=sbindir ;;
401   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
402   | --sbi=* | --sb=*)
403     sbindir=$ac_optarg ;;
404
405   -sharedstatedir | --sharedstatedir | --sharedstatedi \
406   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
407   | --sharedst | --shareds | --shared | --share | --shar \
408   | --sha | --sh)
409     ac_prev=sharedstatedir ;;
410   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
411   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
412   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
413   | --sha=* | --sh=*)
414     sharedstatedir=$ac_optarg ;;
415
416   -site | --site | --sit)
417     ac_prev=site ;;
418   -site=* | --site=* | --sit=*)
419     site=$ac_optarg ;;
420
421   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
422     ac_prev=srcdir ;;
423   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
424     srcdir=$ac_optarg ;;
425
426   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
427   | --syscon | --sysco | --sysc | --sys | --sy)
428     ac_prev=sysconfdir ;;
429   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
430   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
431     sysconfdir=$ac_optarg ;;
432
433   -target | --target | --targe | --targ | --tar | --ta | --t)
434     ac_prev=target_alias ;;
435   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
436     target_alias=$ac_optarg ;;
437
438   -v | -verbose | --verbose | --verbos | --verbo | --verb)
439     verbose=yes ;;
440
441   -version | --version | --versio | --versi | --vers | -V)
442     ac_init_version=: ;;
443
444   -with-* | --with-*)
445     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
446     # Reject names that are not valid shell variable names.
447     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
448       { echo "$as_me: error: invalid package name: $ac_package" >&2
449    { (exit 1); exit 1; }; }
450     ac_package=`echo "$ac_package" | sed 's/-/_/g'`
451     case "$ac_option" in
452       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
453       *) ac_optarg=yes ;;
454     esac
455     eval "with_$ac_package='$ac_optarg'" ;;
456
457   -without-* | --without-*)
458     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
459     # Reject names that are not valid shell variable names.
460     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
461       { echo "$as_me: error: invalid package name: $ac_package" >&2
462    { (exit 1); exit 1; }; }
463     ac_package=`echo "$ac_package" | sed 's/-/_/g'`
464     eval "with_$ac_package=no" ;;
465
466   --x)
467     # Obsolete; use --with-x.
468     with_x=yes ;;
469
470   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
471   | --x-incl | --x-inc | --x-in | --x-i)
472     ac_prev=x_includes ;;
473   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
474   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
475     x_includes=$ac_optarg ;;
476
477   -x-libraries | --x-libraries | --x-librarie | --x-librari \
478   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
479     ac_prev=x_libraries ;;
480   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
481   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
482     x_libraries=$ac_optarg ;;
483
484   -*) { echo "$as_me: error: unrecognized option: $ac_option
485 Try \`$0 --help' for more information." >&2
486    { (exit 1); exit 1; }; }
487     ;;
488
489   *=*)
490     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
491     # Reject names that are not valid shell variable names.
492     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
493       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
494    { (exit 1); exit 1; }; }
495     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
496     eval "$ac_envvar='$ac_optarg'"
497     export "$ac_envvar" ;;
498
499   *)
500     # FIXME: should be removed in autoconf 3.0.
501     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
502     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
504     : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
505     ;;
506
507   esac
508 done
509
510 if test -n "$ac_prev"; then
511   ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
512   { echo "$as_me: error: missing argument to $ac_option" >&2
513    { (exit 1); exit 1; }; }
514 fi
515
516 # Be sure to have absolute paths.
517 for ac_var in exec_prefix prefix
518 do
519   eval ac_val=$`echo "$ac_var"`
520   case "$ac_val" in
521     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # Be sure to have absolute paths.
528 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
529               localstatedir libdir includedir oldincludedir infodir mandir
530 do
531   eval ac_val=$`echo "$ac_var"`
532   case "$ac_val" in
533     [\\/$]* | ?:[\\/]* ) ;;
534     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
535    { (exit 1); exit 1; }; };;
536   esac
537 done
538
539 # There might be people who depend on the old broken behavior: `$host'
540 # used to hold the argument of --host etc.
541 build=$build_alias
542 host=$host_alias
543 target=$target_alias
544
545 # FIXME: should be removed in autoconf 3.0.
546 if test "x$host_alias" != x; then
547   if test "x$build_alias" = x; then
548     cross_compiling=maybe
549     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
550     If a cross compiler is detected then cross compile mode will be used." >&2
551   elif test "x$build_alias" != "x$host_alias"; then
552     cross_compiling=yes
553   fi
554 fi
555
556 ac_tool_prefix=
557 test -n "$host_alias" && ac_tool_prefix=$host_alias-
558
559 test "$silent" = yes && exec 6>/dev/null
560
561 # Find the source files, if location was not specified.
562 if test -z "$srcdir"; then
563   ac_srcdir_defaulted=yes
564   # Try the directory containing this script, then its parent.
565   ac_prog=$0
566   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
567   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
568   srcdir=$ac_confdir
569   if test ! -r "$srcdir/$ac_unique_file"; then
570     srcdir=..
571   fi
572 else
573   ac_srcdir_defaulted=no
574 fi
575 if test ! -r "$srcdir/$ac_unique_file"; then
576   if test "$ac_srcdir_defaulted" = yes; then
577     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
578    { (exit 1); exit 1; }; }
579   else
580     { echo "$as_me: error: cannot find sources in $srcdir" >&2
581    { (exit 1); exit 1; }; }
582   fi
583 fi
584 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
585 ac_env_build_alias_set=${build_alias+set}
586 ac_env_build_alias_value=$build_alias
587 ac_cv_env_build_alias_set=${build_alias+set}
588 ac_cv_env_build_alias_value=$build_alias
589 ac_env_host_alias_set=${host_alias+set}
590 ac_env_host_alias_value=$host_alias
591 ac_cv_env_host_alias_set=${host_alias+set}
592 ac_cv_env_host_alias_value=$host_alias
593 ac_env_target_alias_set=${target_alias+set}
594 ac_env_target_alias_value=$target_alias
595 ac_cv_env_target_alias_set=${target_alias+set}
596 ac_cv_env_target_alias_value=$target_alias
597 ac_env_CC_set=${CC+set}
598 ac_env_CC_value=$CC
599 ac_cv_env_CC_set=${CC+set}
600 ac_cv_env_CC_value=$CC
601 ac_env_CFLAGS_set=${CFLAGS+set}
602 ac_env_CFLAGS_value=$CFLAGS
603 ac_cv_env_CFLAGS_set=${CFLAGS+set}
604 ac_cv_env_CFLAGS_value=$CFLAGS
605 ac_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_env_LDFLAGS_value=$LDFLAGS
607 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
608 ac_cv_env_LDFLAGS_value=$LDFLAGS
609 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_env_CPPFLAGS_value=$CPPFLAGS
611 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
612 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
613 ac_env_CPP_set=${CPP+set}
614 ac_env_CPP_value=$CPP
615 ac_cv_env_CPP_set=${CPP+set}
616 ac_cv_env_CPP_value=$CPP
617 ac_env_CXX_set=${CXX+set}
618 ac_env_CXX_value=$CXX
619 ac_cv_env_CXX_set=${CXX+set}
620 ac_cv_env_CXX_value=$CXX
621 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
622 ac_env_CXXFLAGS_value=$CXXFLAGS
623 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
624 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
625 ac_env_CXXCPP_set=${CXXCPP+set}
626 ac_env_CXXCPP_value=$CXXCPP
627 ac_cv_env_CXXCPP_set=${CXXCPP+set}
628 ac_cv_env_CXXCPP_value=$CXXCPP
629
630 #
631 # Report the --help message.
632 #
633 if test "$ac_init_help" = "long"; then
634   # Omit some internal or obsolete options to make the list less imposing.
635   # This message is too long to be a string in the A/UX 3.1 sh.
636   cat <<EOF
637 \`configure' configures this package to adapt to many kinds of systems.
638
639 Usage: $0 [OPTION]... [VAR=VALUE]...
640
641 To assign environment variables (e.g., CC, CFLAGS...), specify them as
642 VAR=VALUE.  See below for descriptions of some of the useful variables.
643
644 Defaults for the options are specified in brackets.
645
646 Configuration:
647   -h, --help              display this help and exit
648       --help=short        display options specific to this package
649       --help=recursive    display the short help of all the included packages
650   -V, --version           display version information and exit
651   -q, --quiet, --silent   do not print \`checking...' messages
652       --cache-file=FILE   cache test results in FILE [disabled]
653   -C, --config-cache      alias for \`--cache-file=config.cache'
654   -n, --no-create         do not create output files
655       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
656
657 EOF
658
659   cat <<EOF
660 Installation directories:
661   --prefix=PREFIX         install architecture-independent files in PREFIX
662                           [$ac_default_prefix]
663   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
664                           [PREFIX]
665
666 By default, \`make install' will install all the files in
667 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
668 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
669 for instance \`--prefix=\$HOME'.
670
671 For better control, use the options below.
672
673 Fine tuning of the installation directories:
674   --bindir=DIR            user executables [EPREFIX/bin]
675   --sbindir=DIR           system admin executables [EPREFIX/sbin]
676   --libexecdir=DIR        program executables [EPREFIX/libexec]
677   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
678   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
679   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
680   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
681   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
682   --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
683   --libdir=DIR            object code libraries [EPREFIX/lib]
684   --includedir=DIR        C header files [PREFIX/include]
685   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
686   --infodir=DIR           info documentation [DATAROOTDIR/info]
687   --mandir=DIR            man documentation [DATAROOTDIR/man]
688 EOF
689
690   cat <<\EOF
691
692 Program names:
693   --program-prefix=PREFIX            prepend PREFIX to installed program names
694   --program-suffix=SUFFIX            append SUFFIX to installed program names
695   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
696
697 System types:
698   --build=BUILD           configure for building on BUILD [guessed]
699   --host=HOST       build programs to run on HOST [BUILD]
700   --target=TARGET   configure for building compilers for TARGET [HOST]
701 EOF
702 fi
703
704 if test -n "$ac_init_help"; then
705
706   cat <<\EOF
707
708 Optional Packages:
709   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
710   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
711
712 Optional Features:
713   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
714   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
715
716   --with-rel-version=XXX  override derived release version
717   --with-abi-version=XXX  override derived ABI version
718   --with-system-type=XXX  test: override derived host system-type
719   --with-abi-altered=XXX  override visible ABI version, for packaging
720   --without-ada           suppress check for Ada compiler, don't build demo
721   --without-cxx           do not adjust ncurses bool to match C++
722   --without-cxx-binding   do not build C++ binding and demo
723   --disable-db-install    suppress install of terminal database
724   --without-manpages      suppress install of manpages
725   --without-progs         suppress build/install with programs (e.g., tic)
726   --without-tack          suppress build/install with tack program
727   --without-tests         suppress build/install with test-programs
728   --without-curses-h      install curses.h as ncurses.h only
729   --with-config-suffix=X  suffixes ncursesXX-config file
730   --with-pkg-config{=path} enable/disable use of pkg-config
731   --with-pkg-config-libdir=XXX use given directory for installing pc-files
732   --enable-pc-files       generate and install .pc files for pkg-config
733   --with-pc-suffix        suffixes pc-files
734   --enable-mixed-case     tic should assume mixed-case filenames
735   --with-install-prefix   prefixes actual install-location ($DESTDIR)
736 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
737   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
738   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
739   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
740   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
741   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
742   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
743 Options to Specify the Libraries Built/Used:
744   --disable-libtool-version  enable to use libtool's incompatible naming scheme
745   --with-libtool          generate libraries with libtool
746   --with-shared           generate shared-libraries
747   --with-normal           generate normal-libraries (default)
748   --with-debug            generate debug-libraries (default)
749   --with-profile          generate profile-libraries
750   --with-cxx-shared       generate C++ shared-libraries
751   --with-lib-prefix       override library-prefix
752   --with-termlib          generate separate terminfo library
753   --with-ticlib           generate separate tic library
754   --enable-rpath          use rpath option when generating shared libraries
755   --disable-relink        relink shared libraries during install
756   --with-shlib-version=X  Specify rel or abi version for shared libs
757   --with-libtool-opts=XXX specify additional libtool options
758   --with-export-syms=XXX  limit exported symbols using libtool
759   --with-versioned-syms=X markup versioned symbols using ld
760   --with-gpm              use Alessandro Rubini's GPM library
761   --without-dlsym         do not use dlsym() to load GPM dynamically
762   --with-pcre2            use PCRE2 for regular-expressions
763   --with-sysmouse         use sysmouse (FreeBSD console)
764   --disable-lib-suffixes  disable library suffixes
765   --disable-rpath-hack    don't add rpath options for additional libraries
766   --disable-pkg-ldflags   disable extra LDFLAGS for package-scripts
767 Fine-Tuning Your Configuration:
768   --with-extra-suffix=X   append extra suffix to header/library paths
769   --disable-overwrite     put headers in subdir, omit link to -lcurses
770   --disable-database      do not use terminfo, only fallbacks/termcap
771   --with-database=XXX     specify terminfo source to install
772   --with-hashed-db        specify hashed-database library
773   --with-fallbacks=XXX    specify list of fallback terminal descriptions
774   --with-tic-path=XXX     specify path of tic for fallbacks
775   --with-infocmp-path=XXX     specify path of infocmp for fallbacks
776   --without-xterm-new     specify if xterm terminfo should be old version
777   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
778   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
779   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
780   --disable-big-core      assume machine has little memory
781   --disable-big-strings   assume compiler has only standard-size strings
782   --enable-termcap        compile in termcap fallback support
783   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
784   --enable-getcap         fast termcap load, no xrefs to terminfo
785   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
786   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
787   --disable-root-environ  restrict root use of ncurses environment variables
788   --disable-root-access   restrict file-access when running setuid
789   --enable-symlinks       make tic use symbolic links not hard links
790   --enable-broken_linker  compile with broken-linker support code
791   --enable-bsdpad         recognize BSD-style prefix padding
792   --enable-widec          compile with wide-char/UTF-8 code
793   --disable-lp64          allow chtype to be long (ignore _LP64)
794   --disable-largefile     omit support for large files
795   --disable-tparm-varargs compile tparm() without varargs interface
796   --disable-tic-depends   link tic library without explicit dependency on ncurses library
797   --enable-wattr-macros   enable wattr* macros
798   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
799   --with-bool=TYPE        override fallback type of bool variable
800   --with-caps=alt         compile with alternate Caps file
801   --with-chtype=TYPE      override type of chtype
802   --with-ospeed=TYPE      override type of ospeed variable
803   --with-mmask-t=TYPE     override type of mmask_t
804   --with-ccharw-max=XXX   override size CCHARW_MAX
805   --enable-signed-char    compile using signed Boolean's in term.h
806   --with-tparm-arg=TYPE   override parameter type of tparm
807   --with-rcs-ids          compile-in RCS identifiers
808 Options to Specify How Manpages are Installed:
809   --with-manpage-format   specify manpage-format: gzip/compress/bzip2/xz,
810                           BSDI/normal and optionally formatted/catonly,
811                           e.g., gzip,formatted
812   --with-manpage-renames  specify manpage-renaming
813   --with-manpage-aliases  specify manpage-aliases using .so
814   --with-manpage-symlinks specify manpage-aliases using symlinks
815   --with-manpage-tbl      specify manpage processing with tbl
816 Extensions:
817   --disable-ext-funcs     disable function-extensions
818   --enable-sp-funcs       enable SCREEN-extensions
819   --enable-term-driver    enable terminal-driver
820   --enable-const          compile with extra/non-standard const
821   --enable-ext-colors     compile for 256-color support
822   --enable-ext-mouse      compile for extended mouse-encoding
823   --enable-ext-putwin     compile with extended putwin/screendump
824   --enable-no-padding     compile with $NCURSES_NO_PADDING code
825   --enable-sigwinch       compile with SIGWINCH handler
826   --enable-tcap-names     compile with user-definable terminal capabilities
827 Reentrant Code:
828   --with-pthread          use POSIX thread library
829   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
830   --enable-weak-symbols   enable weak-symbols for pthreads
831   --enable-reentrant      compile with reentrant code
832   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
833   --enable-opaque-form    make form-library structures "opaque"
834   --enable-opaque-menu    make menu-library structures "opaque"
835   --enable-opaque-panel   make panel-library structures "opaque"
836   --with-wrap-prefix=XXX  override prefix used for public variables
837 Development Code:
838   --without-develop       disable development options
839   --enable-hard-tabs      compile with hard-tabs code
840   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
841 Experimental Code:
842   --disable-assumed-color do not assume anything about default-colors
843   --disable-hashmap       compile without hashmap scrolling-optimization
844   --enable-colorfgbg      compile-in experimental $COLORFGBG code
845   --enable-fvisibility    compile with -fvisibility=hidden
846   --enable-interop        compile-in interop bindings
847   --enable-safe-sprintf   compile with experimental safe-sprintf code
848   --disable-scroll-hints  compile without scroll-hints code
849   --enable-wgetch-events  compile with wgetch-events code
850   --enable-exp-win32      compile with experimental-Windows driver
851 Testing/development Options:
852   --disable-echo          do not display "compiling" commands
853   --disable-stripping     do not strip (debug info) installed executables
854   --enable-warnings       test: turn on gcc compiler warnings
855   --enable-stdnoreturn    enable C11 _Noreturn feature for diagnostics
856   --enable-string-hacks   work around bogus compiler/loader warnings
857   --enable-assertions     test: turn on generation of assertion code
858   --with-dmalloc          test: use Gray Watson's dmalloc library
859   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
860   --with-valgrind         test: use valgrind
861   --disable-leaks         test: free permanent memory, analyze leaks
862   --enable-expanded       test: generate functions for certain macros
863   --disable-macros        test: use functions rather than macros
864   --with-trace            test: add trace() function to all models of ncurses
865   --disable-gnat-projects test: disable GNAT projects even if usable
866 Ada Binding Options:
867   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
868   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
869   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
870   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
871   --with-ada-libname=XXX  override default Ada library-name
872   --with-form-libname=XXX override form basename of library
873   --with-menu-libname=XXX override menu basename of library
874   --with-panel-libname=XXX override panel basename of library
875   --with-cxx-libname=XXX override ncurses++ basename of library
876
877 Some influential environment variables:
878   CC          C compiler command
879   CFLAGS      C compiler flags
880   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
881               nonstandard directory <lib dir>
882   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
883               headers in a nonstandard directory <include dir>
884   CPP         C preprocessor
885   CXX         C++ compiler command
886   CXXFLAGS    C++ compiler flags
887   CXXCPP      C++ preprocessor
888
889 Use these variables to override the choices made by `configure' or to help
890 it to find libraries and programs with nonstandard names/locations.
891
892 EOF
893 fi
894
895 if test "$ac_init_help" = "recursive"; then
896   # If there are subdirs, report their specific --help.
897   ac_popdir=`pwd`
898   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
899     cd "$ac_subdir"
900     # A "../" for each directory in /$ac_subdir.
901     ac_dots=`echo "$ac_subdir" |
902              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
903
904     case "$srcdir" in
905     .) # No --srcdir option.  We are building in place.
906       ac_sub_srcdir="$srcdir" ;;
907     [\\/]* | ?:[\\/]* ) # Absolute path.
908       ac_sub_srcdir="$srcdir/$ac_subdir" ;;
909     *) # Relative path.
910       ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
911     esac
912
913     # Check for guested configure; otherwise get Cygnus style configure.
914     if test -f "$ac_sub_srcdir/configure.gnu"; then
915       echo
916       $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
917     elif test -f "$ac_sub_srcdir/configure"; then
918       echo
919       $SHELL "$ac_sub_srcdir/configure" --help=recursive
920     elif test -f "$ac_sub_srcdir/configure.ac" ||
921            test -f "$ac_sub_srcdir/configure.in"; then
922       echo
923       "$ac_configure" --help
924     else
925       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
926     fi
927     cd "$ac_popdir"
928   done
929 fi
930
931 test -n "$ac_init_help" && exit 0
932 if "$ac_init_version"; then
933   cat <<\EOF
934
935 Copyright 2003-2022,2023        Thomas E. Dickey
936 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
937 Free Software Foundation, Inc.
938 This configure script is free software; the Free Software Foundation
939 gives unlimited permission to copy, distribute and modify it.
940 EOF
941   exit 0
942 fi
943 exec 5>config.log
944 cat >&5 <<EOF
945 This file contains any messages produced by compilers while
946 running configure, to aid debugging if configure makes a mistake.
947
948 It was created by $as_me, which was
949 generated by GNU Autoconf 2.52.20230114.  Invocation command line was
950
951   $ $0 $@
952
953 EOF
954 {
955 cat <<_ASUNAME
956 ## ---------- ##
957 ## Platform.  ##
958 ## ---------- ##
959
960 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
961 uname -m = `(uname -m) 2>/dev/null || echo unknown`
962 uname -r = `(uname -r) 2>/dev/null || echo unknown`
963 uname -s = `(uname -s) 2>/dev/null || echo unknown`
964 uname -v = `(uname -v) 2>/dev/null || echo unknown`
965
966 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
967 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
968
969 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
970 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
971 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
972 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
973 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
974 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
975 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
976
977 PATH = $PATH
978
979 _ASUNAME
980 } >&5
981
982 cat >&5 <<EOF
983 ## ------------ ##
984 ## Core tests.  ##
985 ## ------------ ##
986
987 EOF
988
989 # Keep a trace of the command line.
990 # Strip out --no-create and --no-recursion so they do not pile up.
991 # Also quote any args containing shell meta-characters.
992 ac_configure_args=
993 ac_sep=
994 for ac_arg
995 do
996   case "$ac_arg" in
997   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
998   | --no-cr | --no-c) ;;
999   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1000   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
1001   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1002     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
1003     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1004     ac_sep=" " ;;
1005   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
1006      ac_sep=" " ;;
1007   esac
1008   # Get rid of the leading space.
1009 done
1010
1011 # When interrupted or exit'd, cleanup temporary files, and complete
1012 # config.log.  We remove comments because anyway the quotes in there
1013 # would cause problems or look ugly.
1014 trap 'exit_status=$?
1015   # Save into config.log some information that might help in debugging.
1016   echo >&5
1017   echo "## ----------------- ##" >&5
1018   echo "## Cache variables.  ##" >&5
1019   echo "## ----------------- ##" >&5
1020   echo >&5
1021   # The following way of writing the cache mishandles newlines in values,
1022 {
1023   (set) 2>&1 |
1024     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1025     *ac_space=\ *)
1026       sed -n \
1027         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1028           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1029       ;;
1030     *)
1031       sed -n \
1032         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1033       ;;
1034     esac;
1035 } >&5
1036   sed "/^$/d" confdefs.h >conftest.log
1037   if test -s conftest.log; then
1038     echo >&5
1039     echo "## ------------ ##" >&5
1040     echo "## confdefs.h.  ##" >&5
1041     echo "## ------------ ##" >&5
1042     echo >&5
1043     cat conftest.log >&5
1044   fi
1045   (echo; echo) >&5
1046   test "$ac_signal" != 0 &&
1047     echo "$as_me: caught signal $ac_signal" >&5
1048   echo "$as_me: exit $exit_status" >&5
1049   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1050     exit $exit_status
1051      ' 0
1052 for ac_signal in 1 2 13 15; do
1053   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1054 done
1055 ac_signal=0
1056
1057 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1058 rm -rf conftest* confdefs.h
1059 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1060 echo >confdefs.h
1061
1062 # Let the site file select an alternate cache file if it wants to.
1063 # Prefer explicitly selected file to automatically selected ones.
1064 if test -z "$CONFIG_SITE"; then
1065   if test "x$prefix" != xNONE; then
1066     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1067   else
1068     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1069   fi
1070 fi
1071 for ac_site_file in $CONFIG_SITE; do
1072   if test -r "$ac_site_file"; then
1073     { echo "$as_me:1073: loading site script $ac_site_file" >&5
1074 echo "$as_me: loading site script $ac_site_file" >&6;}
1075     cat "$ac_site_file" >&5
1076     . "$ac_site_file"
1077   fi
1078 done
1079
1080 if test -r "$cache_file"; then
1081   # Some versions of bash will fail to source /dev/null (special
1082   # files actually), so we avoid doing that.
1083   if test -f "$cache_file"; then
1084     { echo "$as_me:1084: loading cache $cache_file" >&5
1085 echo "$as_me: loading cache $cache_file" >&6;}
1086     case $cache_file in
1087       [\\/]* | ?:[\\/]* ) . $cache_file;;
1088       *)                      . ./$cache_file;;
1089     esac
1090   fi
1091 else
1092   { echo "$as_me:1092: creating cache $cache_file" >&5
1093 echo "$as_me: creating cache $cache_file" >&6;}
1094   >$cache_file
1095 fi
1096
1097 # Check that the precious variables saved in the cache have kept the same
1098 # value.
1099 ac_cache_corrupted=false
1100 for ac_var in `(set) 2>&1 |
1101                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1102   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1103   eval ac_new_set=\$ac_env_${ac_var}_set
1104   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1105   eval ac_new_val="\$ac_env_${ac_var}_value"
1106   case "$ac_old_set,$ac_new_set" in
1107     set,)
1108       { echo "$as_me:1108: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1109 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1110       ac_cache_corrupted=: ;;
1111     ,set)
1112       { echo "$as_me:1112: error: \`$ac_var' was not set in the previous run" >&5
1113 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1114       ac_cache_corrupted=: ;;
1115     ,);;
1116     *)
1117       if test "x$ac_old_val" != "x$ac_new_val"; then
1118         { echo "$as_me:1118: error: \`$ac_var' has changed since the previous run:" >&5
1119 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1120         { echo "$as_me:1120:   former value:  $ac_old_val" >&5
1121 echo "$as_me:   former value:  $ac_old_val" >&2;}
1122         { echo "$as_me:1122:   current value: $ac_new_val" >&5
1123 echo "$as_me:   current value: $ac_new_val" >&2;}
1124         ac_cache_corrupted=:
1125       fi;;
1126   esac
1127   # Pass precious variables to config.status.  It doesn't matter if
1128   # we pass some twice (in addition to the command line arguments).
1129   if test "$ac_new_set" = set; then
1130     case "$ac_new_val" in
1131     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1132       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1133       ac_configure_args="$ac_configure_args '$ac_arg'"
1134       ;;
1135     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1136        ;;
1137     esac
1138   fi
1139 done
1140 if "$ac_cache_corrupted"; then
1141   { echo "$as_me:1141: error: changes in the environment can compromise the build" >&5
1142 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1143   { { echo "$as_me:1143: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1144 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1145    { (exit 1); exit 1; }; }
1146 fi
1147
1148 ac_ext=c
1149 ac_cpp='$CPP $CPPFLAGS'
1150 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1151 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1152 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1153 ac_main_return="return"
1154
1155 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1156   *c*,-n*) ECHO_N=
1157            ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1158            ECHO_T='     '
1159            ;;
1160   *c*,*  ) ECHO_N=-n
1161            ECHO_C=
1162            ECHO_T=
1163            ;;
1164   *)       ECHO_N=
1165            ECHO_C='\c'
1166            ECHO_T=
1167            ;;
1168 esac
1169 echo "#! $SHELL" >conftest.sh
1170 echo  "exit 0"   >>conftest.sh
1171 chmod +x conftest.sh
1172 if { (echo "$as_me:1172: PATH=\".;.\"; conftest.sh") >&5
1173   (PATH=".;."; conftest.sh) 2>&5
1174   ac_status=$?
1175   echo "$as_me:1175: \$? = $ac_status" >&5
1176   (exit "$ac_status"); }; then
1177   ac_path_separator=';'
1178 else
1179   ac_path_separator=:
1180 fi
1181 PATH_SEPARATOR="$ac_path_separator"
1182 rm -f conftest.sh
1183
1184 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1185
1186 top_builddir=`pwd`
1187
1188 for ac_prog in ggrep grep
1189 do
1190   # Extract the first word of "$ac_prog", so it can be a program name with args.
1191 set dummy $ac_prog; ac_word=$2
1192 echo "$as_me:1192: checking for $ac_word" >&5
1193 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1194 if test "${ac_cv_prog_GREP+set}" = set; then
1195   echo $ECHO_N "(cached) $ECHO_C" >&6
1196 else
1197   if test -n "$GREP"; then
1198   ac_cv_prog_GREP="$GREP" # Let the user override the test.
1199 else
1200   ac_save_IFS=$IFS; IFS=$ac_path_separator
1201 ac_dummy="$PATH"
1202 for ac_dir in $ac_dummy; do
1203   IFS=$ac_save_IFS
1204   test -z "$ac_dir" && ac_dir=.
1205   $as_executable_p "$ac_dir/$ac_word" || continue
1206 ac_cv_prog_GREP="$ac_prog"
1207 echo "$as_me:1207: found $ac_dir/$ac_word" >&5
1208 break
1209 done
1210
1211 fi
1212 fi
1213 GREP=$ac_cv_prog_GREP
1214 if test -n "$GREP"; then
1215   echo "$as_me:1215: result: $GREP" >&5
1216 echo "${ECHO_T}$GREP" >&6
1217 else
1218   echo "$as_me:1218: result: no" >&5
1219 echo "${ECHO_T}no" >&6
1220 fi
1221
1222   test -n "$GREP" && break
1223 done
1224 test -n "$GREP" || GREP=": "
1225
1226 echo "$as_me:1226: checking for egrep" >&5
1227 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1228 if test "${ac_cv_path_EGREP+set}" = set; then
1229   echo $ECHO_N "(cached) $ECHO_C" >&6
1230 else
1231   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
1232    then ac_cv_path_EGREP="$GREP -E"
1233    else
1234      for ac_prog in gegrep egrep
1235 do
1236   # Extract the first word of "$ac_prog", so it can be a program name with args.
1237 set dummy $ac_prog; ac_word=$2
1238 echo "$as_me:1238: checking for $ac_word" >&5
1239 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1240 if test "${ac_cv_path_EGREP+set}" = set; then
1241   echo $ECHO_N "(cached) $ECHO_C" >&6
1242 else
1243   case $EGREP in
1244   [\\/]* | ?:[\\/]*)
1245   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
1246   ;;
1247   *)
1248   ac_save_IFS=$IFS; IFS=$ac_path_separator
1249 ac_dummy="$PATH"
1250 for ac_dir in $ac_dummy; do
1251   IFS=$ac_save_IFS
1252   test -z "$ac_dir" && ac_dir=.
1253   if $as_executable_p "$ac_dir/$ac_word"; then
1254    ac_cv_path_EGREP="$ac_dir/$ac_word"
1255    echo "$as_me:1255: found $ac_dir/$ac_word" >&5
1256    break
1257 fi
1258 done
1259
1260   ;;
1261 esac
1262 fi
1263 EGREP=$ac_cv_path_EGREP
1264
1265 if test -n "$EGREP"; then
1266   echo "$as_me:1266: result: $EGREP" >&5
1267 echo "${ECHO_T}$EGREP" >&6
1268 else
1269   echo "$as_me:1269: result: no" >&5
1270 echo "${ECHO_T}no" >&6
1271 fi
1272
1273   test -n "$EGREP" && break
1274 done
1275 test -n "$EGREP" || EGREP=": "
1276
1277      test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:1277: error: cannot find workable egrep" >&5
1278 echo "$as_me: error: cannot find workable egrep" >&2;}
1279    { (exit 1); exit 1; }; }
1280    fi
1281 fi
1282 echo "$as_me:1282: result: $ac_cv_path_EGREP" >&5
1283 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
1284  EGREP="$ac_cv_path_EGREP"
1285
1286 NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1287 NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1288 NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1289 cf_cv_abi_version=${NCURSES_MAJOR}
1290 cf_cv_abi_default=${NCURSES_MAJOR}
1291 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1292 cf_cv_timestamp=`date`
1293 echo "$as_me:1293: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_default ($cf_cv_timestamp)" >&5
1294 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_default ($cf_cv_timestamp)" >&6
1295
1296 if test -f "$srcdir/VERSION" ; then
1297         echo "$as_me:1297: checking for package version" >&5
1298 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1299
1300         # if there are not enough fields, cut returns the last one...
1301         cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
1302         cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
1303         cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
1304
1305         # this is how CF_BUNDLED_INTL uses $VERSION:
1306         VERSION="$cf_field1"
1307
1308         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1309         test -z "$VERSION_MAJOR" && { { echo "$as_me:1309: error: missing major-version" >&5
1310 echo "$as_me: error: missing major-version" >&2;}
1311    { (exit 1); exit 1; }; }
1312
1313         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1314         test -z "$VERSION_MINOR" && { { echo "$as_me:1314: error: missing minor-version" >&5
1315 echo "$as_me: error: missing minor-version" >&2;}
1316    { (exit 1); exit 1; }; }
1317
1318         echo "$as_me:1318: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1319 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1320
1321         echo "$as_me:1321: checking for package patch date" >&5
1322 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1323         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1324         case .$VERSION_PATCH in
1325         (.)
1326                 { { echo "$as_me:1326: error: missing patch-date $VERSION_PATCH" >&5
1327 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1328    { (exit 1); exit 1; }; }
1329                 ;;
1330         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1331                 ;;
1332         (*)
1333                 { { echo "$as_me:1333: error: illegal patch-date $VERSION_PATCH" >&5
1334 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1335    { (exit 1); exit 1; }; }
1336                 ;;
1337         esac
1338         echo "$as_me:1338: result: $VERSION_PATCH" >&5
1339 echo "${ECHO_T}$VERSION_PATCH" >&6
1340 else
1341         { { echo "$as_me:1341: error: did not find $srcdir/VERSION" >&5
1342 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1343    { (exit 1); exit 1; }; }
1344 fi
1345
1346 # show the actual data that we have for versions:
1347 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1348
1349 echo "${as_me:-configure}:1349: testing ABI VERSION $VERSION ..." 1>&5
1350
1351 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1352
1353 echo "${as_me:-configure}:1353: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1354
1355 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1356
1357 echo "${as_me:-configure}:1357: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1358
1359 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1360
1361 echo "${as_me:-configure}:1361: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1362
1363         cf_PACKAGE=NCURSES
1364         PACKAGE=ncurses
1365
1366 cat >>confdefs.h <<EOF
1367 #define PACKAGE "$PACKAGE"
1368 EOF
1369
1370 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1371
1372         cat >>confdefs.h <<EOF
1373 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1374 EOF
1375
1376         cat >>confdefs.h <<EOF
1377 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1378 EOF
1379
1380 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1381
1382 # Check whether --with-rel-version or --without-rel-version was given.
1383 if test "${with_rel_version+set}" = set; then
1384   withval="$with_rel_version"
1385   { echo "$as_me:1385: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1386 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1387  cf_cv_rel_version=$withval
1388 fi;
1389
1390  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1391  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1392
1393 if test -n "$NCURSES_MAJOR" ; then
1394   case $NCURSES_MAJOR in
1395   ([0-9]*)
1396         ;;
1397   (*)
1398         { { echo "$as_me:1398: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1399 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1400    { (exit 1); exit 1; }; }
1401         ;;
1402   esac
1403 else
1404   { { echo "$as_me:1404: error: Release major-version value is empty" >&5
1405 echo "$as_me: error: Release major-version value is empty" >&2;}
1406    { (exit 1); exit 1; }; }
1407 fi
1408
1409 if test -n "$NCURSES_MINOR" ; then
1410   case $NCURSES_MINOR in
1411   ([0-9]*)
1412         ;;
1413   (*)
1414         { { echo "$as_me:1414: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1415 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1416    { (exit 1); exit 1; }; }
1417         ;;
1418   esac
1419 else
1420   { { echo "$as_me:1420: error: Release minor-version value is empty" >&5
1421 echo "$as_me: error: Release minor-version value is empty" >&2;}
1422    { (exit 1); exit 1; }; }
1423 fi
1424
1425 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1426
1427 # Check whether --with-abi-version or --without-abi-version was given.
1428 if test "${with_abi_version+set}" = set; then
1429   withval="$with_abi_version"
1430
1431         if test "x$cf_cv_abi_version" != "x$withval"
1432         then
1433                 { echo "$as_me:1433: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1434 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1435                 case "$cf_cv_rel_version" in
1436                 (5.*)
1437                         cf_cv_rel_version=$withval.0
1438                         ;;
1439                 (6.*)
1440                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1441                         ;;
1442                 esac
1443         fi
1444         cf_cv_abi_version=$withval
1445 fi;
1446
1447 if test -n "$cf_cv_abi_version" ; then
1448   case $cf_cv_abi_version in
1449   ([0-9]*)
1450         ;;
1451   (*)
1452         { { echo "$as_me:1452: error: ABI version is not a number: $cf_cv_abi_version" >&5
1453 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1454    { (exit 1); exit 1; }; }
1455         ;;
1456   esac
1457 else
1458   { { echo "$as_me:1458: error: ABI version value is empty" >&5
1459 echo "$as_me: error: ABI version value is empty" >&2;}
1460    { (exit 1); exit 1; }; }
1461 fi
1462
1463 cf_cv_abi_default=$cf_cv_abi_version
1464
1465 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1466 then
1467         case "$cf_cv_rel_version" in
1468         (5.*)
1469                 cf_cv_rel_version=$with_abi_version.0
1470                 ;;
1471         esac
1472 fi
1473
1474 ac_aux_dir=
1475 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1476   if test -f "$ac_dir/install-sh"; then
1477     ac_aux_dir=$ac_dir
1478     ac_install_sh="$ac_aux_dir/install-sh -c"
1479     break
1480   elif test -f "$ac_dir/install.sh"; then
1481     ac_aux_dir=$ac_dir
1482     ac_install_sh="$ac_aux_dir/install.sh -c"
1483     break
1484   elif test -f "$ac_dir/shtool"; then
1485     ac_aux_dir=$ac_dir
1486     ac_install_sh="$ac_aux_dir/shtool install -c"
1487     break
1488   fi
1489 done
1490 if test -z "$ac_aux_dir"; then
1491   { { echo "$as_me:1491: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1492 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1493    { (exit 1); exit 1; }; }
1494 fi
1495 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1496 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1497 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1498
1499 # Make sure we can run config.sub.
1500 $ac_config_sub sun4 >/dev/null 2>&1 ||
1501   { { echo "$as_me:1501: error: cannot run $ac_config_sub" >&5
1502 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1503    { (exit 1); exit 1; }; }
1504
1505 echo "$as_me:1505: checking build system type" >&5
1506 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1507 if test "${ac_cv_build+set}" = set; then
1508   echo $ECHO_N "(cached) $ECHO_C" >&6
1509 else
1510   ac_cv_build_alias=$build_alias
1511 test -z "$ac_cv_build_alias" &&
1512   ac_cv_build_alias=`$ac_config_guess`
1513 test -z "$ac_cv_build_alias" &&
1514   { { echo "$as_me:1514: error: cannot guess build type; you must specify one" >&5
1515 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1516    { (exit 1); exit 1; }; }
1517 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1518   { { echo "$as_me:1518: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1519 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1520    { (exit 1); exit 1; }; }
1521
1522 fi
1523 echo "$as_me:1523: result: $ac_cv_build" >&5
1524 echo "${ECHO_T}$ac_cv_build" >&6
1525 build=$ac_cv_build
1526 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1527 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1528 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1529
1530 echo "$as_me:1530: checking host system type" >&5
1531 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1532 if test "${ac_cv_host+set}" = set; then
1533   echo $ECHO_N "(cached) $ECHO_C" >&6
1534 else
1535   ac_cv_host_alias=$host_alias
1536 test -z "$ac_cv_host_alias" &&
1537   ac_cv_host_alias=$ac_cv_build_alias
1538 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1539   { { echo "$as_me:1539: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1540 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1541    { (exit 1); exit 1; }; }
1542
1543 fi
1544 echo "$as_me:1544: result: $ac_cv_host" >&5
1545 echo "${ECHO_T}$ac_cv_host" >&6
1546 host=$ac_cv_host
1547 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1548 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1549 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1550
1551 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1552         echo "$as_me:1552: checking target system type" >&5
1553 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1554 if test "${ac_cv_target+set}" = set; then
1555   echo $ECHO_N "(cached) $ECHO_C" >&6
1556 else
1557   ac_cv_target_alias=$target_alias
1558 test "x$ac_cv_target_alias" = "x" &&
1559   ac_cv_target_alias=$ac_cv_host_alias
1560 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1561   { { echo "$as_me:1561: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1562 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1563    { (exit 1); exit 1; }; }
1564
1565 fi
1566 echo "$as_me:1566: result: $ac_cv_target" >&5
1567 echo "${ECHO_T}$ac_cv_target" >&6
1568 target=$ac_cv_target
1569 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1570 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1571 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1572
1573 # The aliases save the names the user supplied, while $host etc.
1574 # will get canonicalized.
1575 test -n "$target_alias" &&
1576   test "$program_prefix$program_suffix$program_transform_name" = \
1577     NONENONEs,x,x, &&
1578   program_prefix=${target_alias}-
1579         system_name="$host_os"
1580 else
1581         system_name="`(uname -s -r) 2>/dev/null`"
1582         if test -z "$system_name" ; then
1583                 system_name="`(hostname) 2>/dev/null`"
1584         fi
1585 fi
1586 test -n "$system_name" &&
1587 cat >>confdefs.h <<EOF
1588 #define SYSTEM_NAME "$system_name"
1589 EOF
1590
1591 if test "${cf_cv_system_name+set}" = set; then
1592   echo $ECHO_N "(cached) $ECHO_C" >&6
1593 else
1594   cf_cv_system_name="$system_name"
1595 fi
1596
1597 test -z "$system_name" && system_name="$cf_cv_system_name"
1598 test -n "$cf_cv_system_name" && echo "$as_me:1598: result: Configuring for $cf_cv_system_name" >&5
1599 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1600
1601 if test ".$system_name" != ".$cf_cv_system_name" ; then
1602         echo "$as_me:1602: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1603 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1604         { { echo "$as_me:1604: error: \"Please remove config.cache and try again.\"" >&5
1605 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1606    { (exit 1); exit 1; }; }
1607 fi
1608
1609 # Check whether --with-system-type or --without-system-type was given.
1610 if test "${with_system_type+set}" = set; then
1611   withval="$with_system_type"
1612   { echo "$as_me:1612: WARNING: overriding system type to $withval" >&5
1613 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1614         cf_cv_system_name=$withval
1615         host_os=$withval
1616
1617 fi;
1618
1619 ###     Save the given $CFLAGS to allow user-override.
1620 cf_user_CFLAGS="$CFLAGS"
1621
1622 ###     Default install-location
1623 echo "$as_me:1623: checking for fgrep" >&5
1624 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1625 if test "${ac_cv_path_FGREP+set}" = set; then
1626   echo $ECHO_N "(cached) $ECHO_C" >&6
1627 else
1628   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1629    then ac_cv_path_FGREP="$GREP -F"
1630    else
1631      for ac_prog in gfgrep fgrep
1632 do
1633   # Extract the first word of "$ac_prog", so it can be a program name with args.
1634 set dummy $ac_prog; ac_word=$2
1635 echo "$as_me:1635: checking for $ac_word" >&5
1636 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1637 if test "${ac_cv_path_FGREP+set}" = set; then
1638   echo $ECHO_N "(cached) $ECHO_C" >&6
1639 else
1640   case $FGREP in
1641   [\\/]* | ?:[\\/]*)
1642   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1643   ;;
1644   *)
1645   ac_save_IFS=$IFS; IFS=$ac_path_separator
1646 ac_dummy="$PATH"
1647 for ac_dir in $ac_dummy; do
1648   IFS=$ac_save_IFS
1649   test -z "$ac_dir" && ac_dir=.
1650   if $as_executable_p "$ac_dir/$ac_word"; then
1651    ac_cv_path_FGREP="$ac_dir/$ac_word"
1652    echo "$as_me:1652: found $ac_dir/$ac_word" >&5
1653    break
1654 fi
1655 done
1656
1657   ;;
1658 esac
1659 fi
1660 FGREP=$ac_cv_path_FGREP
1661
1662 if test -n "$FGREP"; then
1663   echo "$as_me:1663: result: $FGREP" >&5
1664 echo "${ECHO_T}$FGREP" >&6
1665 else
1666   echo "$as_me:1666: result: no" >&5
1667 echo "${ECHO_T}no" >&6
1668 fi
1669
1670   test -n "$FGREP" && break
1671 done
1672 test -n "$FGREP" || FGREP=": "
1673
1674      test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1674: error: cannot find workable fgrep" >&5
1675 echo "$as_me: error: cannot find workable fgrep" >&2;}
1676    { (exit 1); exit 1; }; }
1677    fi
1678 fi
1679 echo "$as_me:1679: result: $ac_cv_path_FGREP" >&5
1680 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1681  FGREP="$ac_cv_path_FGREP"
1682
1683 echo "$as_me:1683: checking for prefix" >&5
1684 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1685 if test "x$prefix" = "xNONE" ; then
1686         case "$cf_cv_system_name" in
1687                 # non-vendor systems don't have a conflict
1688         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1689                 prefix=/usr
1690                 ;;
1691         (*)     prefix=$ac_default_prefix
1692                 ;;
1693         esac
1694 fi
1695 echo "$as_me:1695: result: $prefix" >&5
1696 echo "${ECHO_T}$prefix" >&6
1697
1698 if test "x$prefix" = "xNONE" ; then
1699 echo "$as_me:1699: checking for default include-directory" >&5
1700 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1701 test -n "$verbose" && echo 1>&6
1702 for cf_symbol in \
1703         "$includedir" \
1704         "$includedir/ncurses" \
1705         "$prefix/include" \
1706         "$prefix/include/ncurses" \
1707         /usr/local/include \
1708         /usr/local/include/ncurses \
1709         /usr/include \
1710         /usr/include/ncurses
1711 do
1712         cf_dir=`eval echo "$cf_symbol"`
1713         if test -f "$cf_dir/curses.h" ; then
1714         if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1715                 includedir="$cf_symbol"
1716                 test -n "$verbose"  && echo $ECHO_N "   found " 1>&6
1717                 break
1718         fi
1719         fi
1720         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1721 done
1722 echo "$as_me:1722: result: $includedir" >&5
1723 echo "${ECHO_T}$includedir" >&6
1724 fi
1725
1726 ### Defaults for ncurses ABI
1727
1728 # ABI 5 defaults:
1729 cf_dft_ccharw_max=5
1730 cf_dft_chtype=auto
1731 cf_dft_ext_colors=no
1732 cf_dft_ext_const=no
1733 cf_dft_ext_mouse=no
1734 cf_dft_ext_putwin=no
1735 cf_dft_ext_spfuncs=no
1736 cf_dft_filter_syms=no
1737 cf_dft_interop=no
1738 cf_dft_mmask_t=auto
1739 cf_dft_opaque_curses=no
1740 cf_dft_ordinate_type=short
1741 cf_dft_signed_char=no
1742 cf_dft_tparm_arg=long
1743 cf_dft_with_lp64=no
1744
1745 # ABI 6 defaults:
1746 case x$cf_cv_abi_default in
1747 (x[6789])
1748         cf_dft_chtype=uint32_t
1749         cf_dft_ext_colors=yes
1750         cf_dft_ext_const=yes
1751         cf_dft_ext_mouse=yes
1752         cf_dft_ext_putwin=yes
1753         cf_dft_ext_spfuncs=yes
1754         cf_dft_filter_syms=yes
1755         cf_dft_interop=yes
1756         cf_dft_mmask_t=uint32_t
1757         cf_dft_tparm_arg=intptr_t
1758         cf_dft_with_lp64=yes
1759         ;;
1760 esac
1761
1762 # ABI 7 defaults:
1763 case x$cf_cv_abi_default in
1764 (x[789])
1765         cf_dft_ccharw_max=6
1766         cf_dft_mmask_t=uint64_t
1767         cf_dft_opaque_curses=yes
1768         cf_dft_ordinate_type=int
1769         cf_dft_signed_char=yes
1770         # also: remove the wgetch-events feature in ABI 7
1771         ;;
1772 esac
1773
1774 ### override ABI version, e.g., packagers
1775
1776 # Check whether --with-abi-altered or --without-abi-altered was given.
1777 if test "${with_abi_altered+set}" = set; then
1778   withval="$with_abi_altered"
1779
1780 if test -n "$withval" ; then
1781   case $withval in
1782   ([0-9]*)
1783         ;;
1784   (*)
1785         { { echo "$as_me:1785: error: ABI altered is not a number: $withval" >&5
1786 echo "$as_me: error: ABI altered is not a number: $withval" >&2;}
1787    { (exit 1); exit 1; }; }
1788         ;;
1789   esac
1790 else
1791   { { echo "$as_me:1791: error: ABI altered value is empty" >&5
1792 echo "$as_me: error: ABI altered value is empty" >&2;}
1793    { (exit 1); exit 1; }; }
1794 fi
1795
1796         if test "$cf_cv_abi_version" != "$withval"
1797         then
1798                 { echo "$as_me:1798: WARNING: altering visible ABI from $cf_cv_abi_version to $withval" >&5
1799 echo "$as_me: WARNING: altering visible ABI from $cf_cv_abi_version to $withval" >&2;}
1800                 cf_cv_abi_version=$withval
1801         fi
1802
1803 fi;
1804
1805 ###     Checks for programs.
1806
1807 # Check whether --with-ada or --without-ada was given.
1808 if test "${with_ada+set}" = set; then
1809   withval="$with_ada"
1810   cf_with_ada=$withval
1811 else
1812   cf_with_ada=yes
1813 fi;
1814
1815 if test "x$cf_with_ada" = xyes
1816 then
1817         cf_prog_cc="gnatgcc gcc cc"
1818 else
1819         cf_prog_cc="gcc cc"
1820 fi
1821
1822 ac_ext=c
1823 ac_cpp='$CPP $CPPFLAGS'
1824 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1825 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1826 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1827 ac_main_return="return"
1828 if test -n "$ac_tool_prefix"; then
1829   for ac_prog in $cf_prog_cc
1830   do
1831     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1832 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1833 echo "$as_me:1833: checking for $ac_word" >&5
1834 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1835 if test "${ac_cv_prog_CC+set}" = set; then
1836   echo $ECHO_N "(cached) $ECHO_C" >&6
1837 else
1838   if test -n "$CC"; then
1839   ac_cv_prog_CC="$CC" # Let the user override the test.
1840 else
1841   ac_save_IFS=$IFS; IFS=$ac_path_separator
1842 ac_dummy="$PATH"
1843 for ac_dir in $ac_dummy; do
1844   IFS=$ac_save_IFS
1845   test -z "$ac_dir" && ac_dir=.
1846   $as_executable_p "$ac_dir/$ac_word" || continue
1847 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1848 echo "$as_me:1848: found $ac_dir/$ac_word" >&5
1849 break
1850 done
1851
1852 fi
1853 fi
1854 CC=$ac_cv_prog_CC
1855 if test -n "$CC"; then
1856   echo "$as_me:1856: result: $CC" >&5
1857 echo "${ECHO_T}$CC" >&6
1858 else
1859   echo "$as_me:1859: result: no" >&5
1860 echo "${ECHO_T}no" >&6
1861 fi
1862
1863     test -n "$CC" && break
1864   done
1865 fi
1866 if test -z "$CC"; then
1867   ac_ct_CC=$CC
1868   for ac_prog in $cf_prog_cc
1869 do
1870   # Extract the first word of "$ac_prog", so it can be a program name with args.
1871 set dummy $ac_prog; ac_word=$2
1872 echo "$as_me:1872: checking for $ac_word" >&5
1873 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1874 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1875   echo $ECHO_N "(cached) $ECHO_C" >&6
1876 else
1877   if test -n "$ac_ct_CC"; then
1878   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1879 else
1880   ac_save_IFS=$IFS; IFS=$ac_path_separator
1881 ac_dummy="$PATH"
1882 for ac_dir in $ac_dummy; do
1883   IFS=$ac_save_IFS
1884   test -z "$ac_dir" && ac_dir=.
1885   $as_executable_p "$ac_dir/$ac_word" || continue
1886 ac_cv_prog_ac_ct_CC="$ac_prog"
1887 echo "$as_me:1887: found $ac_dir/$ac_word" >&5
1888 break
1889 done
1890
1891 fi
1892 fi
1893 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1894 if test -n "$ac_ct_CC"; then
1895   echo "$as_me:1895: result: $ac_ct_CC" >&5
1896 echo "${ECHO_T}$ac_ct_CC" >&6
1897 else
1898   echo "$as_me:1898: result: no" >&5
1899 echo "${ECHO_T}no" >&6
1900 fi
1901
1902   test -n "$ac_ct_CC" && break
1903 done
1904
1905   CC=$ac_ct_CC
1906 fi
1907
1908 test -z "$CC" && { { echo "$as_me:1908: error: no acceptable cc found in \$PATH" >&5
1909 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1910    { (exit 1); exit 1; }; }
1911
1912 # Provide some information about the compiler.
1913 echo "$as_me:1913:" \
1914      "checking for C compiler version" >&5
1915 ac_compiler=`set X $ac_compile; echo "$2"`
1916 { (eval echo "$as_me:1916: \"$ac_compiler --version </dev/null >&5\"") >&5
1917   (eval $ac_compiler --version </dev/null >&5) 2>&5
1918   ac_status=$?
1919   echo "$as_me:1919: \$? = $ac_status" >&5
1920   (exit "$ac_status"); }
1921 { (eval echo "$as_me:1921: \"$ac_compiler -v </dev/null >&5\"") >&5
1922   (eval $ac_compiler -v </dev/null >&5) 2>&5
1923   ac_status=$?
1924   echo "$as_me:1924: \$? = $ac_status" >&5
1925   (exit "$ac_status"); }
1926 { (eval echo "$as_me:1926: \"$ac_compiler -V </dev/null >&5\"") >&5
1927   (eval $ac_compiler -V </dev/null >&5) 2>&5
1928   ac_status=$?
1929   echo "$as_me:1929: \$? = $ac_status" >&5
1930   (exit "$ac_status"); }
1931
1932 cat >"conftest.$ac_ext" <<_ACEOF
1933 #line 1933 "configure"
1934 #include "confdefs.h"
1935
1936 int
1937 main (void)
1938 {
1939
1940   ;
1941   return 0;
1942 }
1943 _ACEOF
1944 ac_clean_files_save=$ac_clean_files
1945 ac_clean_files="$ac_clean_files a.out a.exe"
1946 # Try to create an executable without -o first, disregard a.out.
1947 # It will help us diagnose broken compilers, and finding out an intuition
1948 # of exeext.
1949 echo "$as_me:1949: checking for C compiler default output" >&5
1950 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1951 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1952 if { (eval echo "$as_me:1952: \"$ac_link_default\"") >&5
1953   (eval $ac_link_default) 2>&5
1954   ac_status=$?
1955   echo "$as_me:1955: \$? = $ac_status" >&5
1956   (exit "$ac_status"); }; then
1957   # Find the output, starting from the most likely.  This scheme is
1958 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1959 # resort.
1960 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1961                 ls a.out conftest 2>/dev/null;
1962                 ls a.* conftest.* 2>/dev/null`; do
1963   case $ac_file in
1964     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1965     a.out ) # We found the default executable, but exeext='' is most
1966             # certainly right.
1967             break;;
1968     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1969           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1970           export ac_cv_exeext
1971           break;;
1972     * ) break;;
1973   esac
1974 done
1975 else
1976   echo "$as_me: failed program was:" >&5
1977 cat "conftest.$ac_ext" >&5
1978 { { echo "$as_me:1978: error: C compiler cannot create executables" >&5
1979 echo "$as_me: error: C compiler cannot create executables" >&2;}
1980    { (exit 77); exit 77; }; }
1981 fi
1982
1983 ac_exeext=$ac_cv_exeext
1984 echo "$as_me:1984: result: $ac_file" >&5
1985 echo "${ECHO_T}$ac_file" >&6
1986
1987 # Check the compiler produces executables we can run.  If not, either
1988 # the compiler is broken, or we cross compile.
1989 echo "$as_me:1989: checking whether the C compiler works" >&5
1990 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1991 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1992 # If not cross compiling, check that we can run a simple program.
1993 if test "$cross_compiling" != yes; then
1994   if { ac_try='./$ac_file'
1995   { (eval echo "$as_me:1995: \"$ac_try\"") >&5
1996   (eval $ac_try) 2>&5
1997   ac_status=$?
1998   echo "$as_me:1998: \$? = $ac_status" >&5
1999   (exit "$ac_status"); }; }; then
2000     cross_compiling=no
2001   else
2002     if test "$cross_compiling" = maybe; then
2003         cross_compiling=yes
2004     else
2005         { { echo "$as_me:2005: error: cannot run C compiled programs.
2006 If you meant to cross compile, use \`--host'." >&5
2007 echo "$as_me: error: cannot run C compiled programs.
2008 If you meant to cross compile, use \`--host'." >&2;}
2009    { (exit 1); exit 1; }; }
2010     fi
2011   fi
2012 fi
2013 echo "$as_me:2013: result: yes" >&5
2014 echo "${ECHO_T}yes" >&6
2015
2016 rm -f a.out a.exe "conftest$ac_cv_exeext"
2017 ac_clean_files=$ac_clean_files_save
2018 # Check the compiler produces executables we can run.  If not, either
2019 # the compiler is broken, or we cross compile.
2020 echo "$as_me:2020: checking whether we are cross compiling" >&5
2021 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2022 echo "$as_me:2022: result: $cross_compiling" >&5
2023 echo "${ECHO_T}$cross_compiling" >&6
2024
2025 echo "$as_me:2025: checking for executable suffix" >&5
2026 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
2027 if { (eval echo "$as_me:2027: \"$ac_link\"") >&5
2028   (eval $ac_link) 2>&5
2029   ac_status=$?
2030   echo "$as_me:2030: \$? = $ac_status" >&5
2031   (exit "$ac_status"); }; then
2032   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2033 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2034 # work properly (i.e., refer to `conftest.exe'), while it won't with
2035 # `rm'.
2036 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2037   case $ac_file in
2038     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2039     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2040           export ac_cv_exeext
2041           break;;
2042     * ) break;;
2043   esac
2044 done
2045 else
2046   { { echo "$as_me:2046: error: cannot compute EXEEXT: cannot compile and link" >&5
2047 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
2048    { (exit 1); exit 1; }; }
2049 fi
2050
2051 rm -f "conftest$ac_cv_exeext"
2052 echo "$as_me:2052: result: $ac_cv_exeext" >&5
2053 echo "${ECHO_T}$ac_cv_exeext" >&6
2054
2055 rm -f "conftest.$ac_ext"
2056 EXEEXT=$ac_cv_exeext
2057 ac_exeext=$EXEEXT
2058 echo "$as_me:2058: checking for object suffix" >&5
2059 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2060 if test "${ac_cv_objext+set}" = set; then
2061   echo $ECHO_N "(cached) $ECHO_C" >&6
2062 else
2063   cat >"conftest.$ac_ext" <<_ACEOF
2064 #line 2064 "configure"
2065 #include "confdefs.h"
2066
2067 int
2068 main (void)
2069 {
2070
2071   ;
2072   return 0;
2073 }
2074 _ACEOF
2075 rm -f conftest.o conftest.obj
2076 if { (eval echo "$as_me:2076: \"$ac_compile\"") >&5
2077   (eval $ac_compile) 2>&5
2078   ac_status=$?
2079   echo "$as_me:2079: \$? = $ac_status" >&5
2080   (exit "$ac_status"); }; then
2081   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2082   case $ac_file in
2083     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
2084     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2085        break;;
2086   esac
2087 done
2088 else
2089   echo "$as_me: failed program was:" >&5
2090 cat "conftest.$ac_ext" >&5
2091 { { echo "$as_me:2091: error: cannot compute OBJEXT: cannot compile" >&5
2092 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2093    { (exit 1); exit 1; }; }
2094 fi
2095
2096 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
2097 fi
2098 echo "$as_me:2098: result: $ac_cv_objext" >&5
2099 echo "${ECHO_T}$ac_cv_objext" >&6
2100 OBJEXT=$ac_cv_objext
2101 ac_objext=$OBJEXT
2102 echo "$as_me:2102: checking whether we are using the GNU C compiler" >&5
2103 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2104 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2105   echo $ECHO_N "(cached) $ECHO_C" >&6
2106 else
2107   cat >"conftest.$ac_ext" <<_ACEOF
2108 #line 2108 "configure"
2109 #include "confdefs.h"
2110
2111 int
2112 main (void)
2113 {
2114 #ifndef __GNUC__
2115        choke me
2116 #endif
2117
2118   ;
2119   return 0;
2120 }
2121 _ACEOF
2122 rm -f "conftest.$ac_objext"
2123 if { (eval echo "$as_me:2123: \"$ac_compile\"") >&5
2124   (eval $ac_compile) 2>&5
2125   ac_status=$?
2126   echo "$as_me:2126: \$? = $ac_status" >&5
2127   (exit "$ac_status"); } &&
2128          { ac_try='test -s "conftest.$ac_objext"'
2129   { (eval echo "$as_me:2129: \"$ac_try\"") >&5
2130   (eval $ac_try) 2>&5
2131   ac_status=$?
2132   echo "$as_me:2132: \$? = $ac_status" >&5
2133   (exit "$ac_status"); }; }; then
2134   ac_compiler_gnu=yes
2135 else
2136   echo "$as_me: failed program was:" >&5
2137 cat "conftest.$ac_ext" >&5
2138 ac_compiler_gnu=no
2139 fi
2140 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2141 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2142
2143 fi
2144 echo "$as_me:2144: result: $ac_cv_c_compiler_gnu" >&5
2145 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2146 GCC=`test $ac_compiler_gnu = yes && echo yes`
2147 ac_test_CFLAGS=${CFLAGS+set}
2148 ac_save_CFLAGS=$CFLAGS
2149 CFLAGS="-g"
2150 echo "$as_me:2150: checking whether $CC accepts -g" >&5
2151 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2152 if test "${ac_cv_prog_cc_g+set}" = set; then
2153   echo $ECHO_N "(cached) $ECHO_C" >&6
2154 else
2155   cat >"conftest.$ac_ext" <<_ACEOF
2156 #line 2156 "configure"
2157 #include "confdefs.h"
2158
2159 int
2160 main (void)
2161 {
2162
2163   ;
2164   return 0;
2165 }
2166 _ACEOF
2167 rm -f "conftest.$ac_objext"
2168 if { (eval echo "$as_me:2168: \"$ac_compile\"") >&5
2169   (eval $ac_compile) 2>&5
2170   ac_status=$?
2171   echo "$as_me:2171: \$? = $ac_status" >&5
2172   (exit "$ac_status"); } &&
2173          { ac_try='test -s "conftest.$ac_objext"'
2174   { (eval echo "$as_me:2174: \"$ac_try\"") >&5
2175   (eval $ac_try) 2>&5
2176   ac_status=$?
2177   echo "$as_me:2177: \$? = $ac_status" >&5
2178   (exit "$ac_status"); }; }; then
2179   ac_cv_prog_cc_g=yes
2180 else
2181   echo "$as_me: failed program was:" >&5
2182 cat "conftest.$ac_ext" >&5
2183 ac_cv_prog_cc_g=no
2184 fi
2185 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2186 fi
2187 echo "$as_me:2187: result: $ac_cv_prog_cc_g" >&5
2188 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2189 if test "$ac_test_CFLAGS" = set; then
2190   CFLAGS=$ac_save_CFLAGS
2191 elif test $ac_cv_prog_cc_g = yes; then
2192   if test "$GCC" = yes; then
2193     CFLAGS="-g -O2"
2194   else
2195     CFLAGS="-g"
2196   fi
2197 else
2198   if test "$GCC" = yes; then
2199     CFLAGS="-O2"
2200   else
2201     CFLAGS=
2202   fi
2203 fi
2204 # Some people use a C++ compiler to compile C.  Since we use `exit',
2205 # in C++ we need to declare it.  In case someone uses the same compiler
2206 # for both compiling C and C++ we need to have the C++ compiler decide
2207 # the declaration of exit, since it's the most demanding environment.
2208 cat >"conftest.$ac_ext" <<_ACEOF
2209 #ifndef __cplusplus
2210   choke me
2211 #endif
2212 _ACEOF
2213 rm -f "conftest.$ac_objext"
2214 if { (eval echo "$as_me:2214: \"$ac_compile\"") >&5
2215   (eval $ac_compile) 2>&5
2216   ac_status=$?
2217   echo "$as_me:2217: \$? = $ac_status" >&5
2218   (exit "$ac_status"); } &&
2219          { ac_try='test -s "conftest.$ac_objext"'
2220   { (eval echo "$as_me:2220: \"$ac_try\"") >&5
2221   (eval $ac_try) 2>&5
2222   ac_status=$?
2223   echo "$as_me:2223: \$? = $ac_status" >&5
2224   (exit "$ac_status"); }; }; then
2225   for ac_declaration in \
2226    ''\
2227    '#include <stdlib.h>' \
2228    'extern "C" void std::exit (int) throw (); using std::exit;' \
2229    'extern "C" void std::exit (int); using std::exit;' \
2230    'extern "C" void exit (int) throw ();' \
2231    'extern "C" void exit (int);' \
2232    'void exit (int);'
2233 do
2234   cat >"conftest.$ac_ext" <<_ACEOF
2235 #line 2235 "configure"
2236 #include "confdefs.h"
2237 #include <stdlib.h>
2238 $ac_declaration
2239 int
2240 main (void)
2241 {
2242 exit (42);
2243   ;
2244   return 0;
2245 }
2246 _ACEOF
2247 rm -f "conftest.$ac_objext"
2248 if { (eval echo "$as_me:2248: \"$ac_compile\"") >&5
2249   (eval $ac_compile) 2>&5
2250   ac_status=$?
2251   echo "$as_me:2251: \$? = $ac_status" >&5
2252   (exit "$ac_status"); } &&
2253          { ac_try='test -s "conftest.$ac_objext"'
2254   { (eval echo "$as_me:2254: \"$ac_try\"") >&5
2255   (eval $ac_try) 2>&5
2256   ac_status=$?
2257   echo "$as_me:2257: \$? = $ac_status" >&5
2258   (exit "$ac_status"); }; }; then
2259   :
2260 else
2261   echo "$as_me: failed program was:" >&5
2262 cat "conftest.$ac_ext" >&5
2263 continue
2264 fi
2265 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2266   cat >"conftest.$ac_ext" <<_ACEOF
2267 #line 2267 "configure"
2268 #include "confdefs.h"
2269 $ac_declaration
2270 int
2271 main (void)
2272 {
2273 exit (42);
2274   ;
2275   return 0;
2276 }
2277 _ACEOF
2278 rm -f "conftest.$ac_objext"
2279 if { (eval echo "$as_me:2279: \"$ac_compile\"") >&5
2280   (eval $ac_compile) 2>&5
2281   ac_status=$?
2282   echo "$as_me:2282: \$? = $ac_status" >&5
2283   (exit "$ac_status"); } &&
2284          { ac_try='test -s "conftest.$ac_objext"'
2285   { (eval echo "$as_me:2285: \"$ac_try\"") >&5
2286   (eval $ac_try) 2>&5
2287   ac_status=$?
2288   echo "$as_me:2288: \$? = $ac_status" >&5
2289   (exit "$ac_status"); }; }; then
2290   break
2291 else
2292   echo "$as_me: failed program was:" >&5
2293 cat "conftest.$ac_ext" >&5
2294 fi
2295 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2296 done
2297 rm -rf conftest*
2298 if test -n "$ac_declaration"; then
2299   echo '#ifdef __cplusplus' >>confdefs.h
2300   echo "$ac_declaration"    >>confdefs.h
2301   echo '#endif'             >>confdefs.h
2302 fi
2303
2304 else
2305   echo "$as_me: failed program was:" >&5
2306 cat "conftest.$ac_ext" >&5
2307 fi
2308 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2309 ac_ext=c
2310 ac_cpp='$CPP $CPPFLAGS'
2311 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2312 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2313 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2314 ac_main_return="return"
2315
2316 GCC_VERSION=none
2317 if test "$GCC" = yes ; then
2318         echo "$as_me:2318: checking version of $CC" >&5
2319 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2320         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2321         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2322         echo "$as_me:2322: result: $GCC_VERSION" >&5
2323 echo "${ECHO_T}$GCC_VERSION" >&6
2324 fi
2325
2326 INTEL_COMPILER=no
2327
2328 if test "$GCC" = yes ; then
2329         case "$host_os" in
2330         (linux*|gnu*)
2331                 echo "$as_me:2331: checking if this is really Intel C compiler" >&5
2332 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2333                 cf_save_CFLAGS="$CFLAGS"
2334                 CFLAGS="$CFLAGS -no-gcc"
2335                 cat >"conftest.$ac_ext" <<_ACEOF
2336 #line 2336 "configure"
2337 #include "confdefs.h"
2338
2339 int
2340 main (void)
2341 {
2342
2343 #ifdef __INTEL_COMPILER
2344 #else
2345 make an error
2346 #endif
2347
2348   ;
2349   return 0;
2350 }
2351 _ACEOF
2352 rm -f "conftest.$ac_objext"
2353 if { (eval echo "$as_me:2353: \"$ac_compile\"") >&5
2354   (eval $ac_compile) 2>&5
2355   ac_status=$?
2356   echo "$as_me:2356: \$? = $ac_status" >&5
2357   (exit "$ac_status"); } &&
2358          { ac_try='test -s "conftest.$ac_objext"'
2359   { (eval echo "$as_me:2359: \"$ac_try\"") >&5
2360   (eval $ac_try) 2>&5
2361   ac_status=$?
2362   echo "$as_me:2362: \$? = $ac_status" >&5
2363   (exit "$ac_status"); }; }; then
2364   INTEL_COMPILER=yes
2365 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2366
2367 else
2368   echo "$as_me: failed program was:" >&5
2369 cat "conftest.$ac_ext" >&5
2370 fi
2371 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2372                 CFLAGS="$cf_save_CFLAGS"
2373                 echo "$as_me:2373: result: $INTEL_COMPILER" >&5
2374 echo "${ECHO_T}$INTEL_COMPILER" >&6
2375                 ;;
2376         esac
2377 fi
2378
2379 CLANG_COMPILER=no
2380
2381 if test "$GCC" = yes ; then
2382         echo "$as_me:2382: checking if this is really Clang C compiler" >&5
2383 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2384         cf_save_CFLAGS="$CFLAGS"
2385         cat >"conftest.$ac_ext" <<_ACEOF
2386 #line 2386 "configure"
2387 #include "confdefs.h"
2388
2389 int
2390 main (void)
2391 {
2392
2393 #ifdef __clang__
2394 #else
2395 make an error
2396 #endif
2397
2398   ;
2399   return 0;
2400 }
2401 _ACEOF
2402 rm -f "conftest.$ac_objext"
2403 if { (eval echo "$as_me:2403: \"$ac_compile\"") >&5
2404   (eval $ac_compile) 2>&5
2405   ac_status=$?
2406   echo "$as_me:2406: \$? = $ac_status" >&5
2407   (exit "$ac_status"); } &&
2408          { ac_try='test -s "conftest.$ac_objext"'
2409   { (eval echo "$as_me:2409: \"$ac_try\"") >&5
2410   (eval $ac_try) 2>&5
2411   ac_status=$?
2412   echo "$as_me:2412: \$? = $ac_status" >&5
2413   (exit "$ac_status"); }; }; then
2414   CLANG_COMPILER=yes
2415
2416 else
2417   echo "$as_me: failed program was:" >&5
2418 cat "conftest.$ac_ext" >&5
2419 fi
2420 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2421         CFLAGS="$cf_save_CFLAGS"
2422         echo "$as_me:2422: result: $CLANG_COMPILER" >&5
2423 echo "${ECHO_T}$CLANG_COMPILER" >&6
2424 fi
2425
2426 CLANG_VERSION=none
2427
2428 if test "x$CLANG_COMPILER" = "xyes" ; then
2429         case "$CC" in
2430         (c[1-9][0-9]|*/c[1-9][0-9])
2431                 { echo "$as_me:2431: WARNING: replacing broken compiler alias $CC" >&5
2432 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2433                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2434                 CC=clang
2435                 ;;
2436         esac
2437
2438         echo "$as_me:2438: checking version of $CC" >&5
2439 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2440         CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2441         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2442         echo "$as_me:2442: result: $CLANG_VERSION" >&5
2443 echo "${ECHO_T}$CLANG_VERSION" >&6
2444
2445         for cf_clang_opt in \
2446                 -Qunused-arguments \
2447                 -Wno-error=implicit-function-declaration
2448         do
2449                 echo "$as_me:2449: checking if option $cf_clang_opt works" >&5
2450 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2451                 cf_save_CFLAGS="$CFLAGS"
2452                 CFLAGS="$CFLAGS $cf_clang_opt"
2453                 cat >"conftest.$ac_ext" <<_ACEOF
2454 #line 2454 "configure"
2455 #include "confdefs.h"
2456
2457                         #include <stdio.h>
2458 int
2459 main (void)
2460 {
2461
2462                         printf("hello!\\n");
2463   ;
2464   return 0;
2465 }
2466 _ACEOF
2467 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2468 if { (eval echo "$as_me:2468: \"$ac_link\"") >&5
2469   (eval $ac_link) 2>&5
2470   ac_status=$?
2471   echo "$as_me:2471: \$? = $ac_status" >&5
2472   (exit "$ac_status"); } &&
2473          { ac_try='test -s "conftest$ac_exeext"'
2474   { (eval echo "$as_me:2474: \"$ac_try\"") >&5
2475   (eval $ac_try) 2>&5
2476   ac_status=$?
2477   echo "$as_me:2477: \$? = $ac_status" >&5
2478   (exit "$ac_status"); }; }; then
2479
2480                         cf_clang_optok=yes
2481 else
2482   echo "$as_me: failed program was:" >&5
2483 cat "conftest.$ac_ext" >&5
2484
2485                         cf_clang_optok=no
2486 fi
2487 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2488                 echo "$as_me:2488: result: $cf_clang_optok" >&5
2489 echo "${ECHO_T}$cf_clang_optok" >&6
2490                 CFLAGS="$cf_save_CFLAGS"
2491                 if test "$cf_clang_optok" = yes; then
2492                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2493
2494 echo "${as_me:-configure}:2494: testing adding option $cf_clang_opt ..." 1>&5
2495
2496         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2497         CFLAGS="${CFLAGS}$cf_clang_opt"
2498
2499                 fi
2500         done
2501 fi
2502
2503 echo "$as_me:2503: checking for $CC option to accept ANSI C" >&5
2504 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2505 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2506   echo $ECHO_N "(cached) $ECHO_C" >&6
2507 else
2508   ac_cv_prog_cc_stdc=no
2509 ac_save_CC=$CC
2510 cat >"conftest.$ac_ext" <<_ACEOF
2511 #line 2511 "configure"
2512 #include "confdefs.h"
2513 #include <stdarg.h>
2514 #include <stdio.h>
2515 #include <sys/types.h>
2516 #include <sys/stat.h>
2517 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2518 struct buf { int x; };
2519 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2520 static char *e (char **p, int i)
2521 {
2522   return p[i];
2523 }
2524 static char *f (char * (*g) (char **, int), char **p, ...)
2525 {
2526   char *s;
2527   va_list v;
2528   va_start (v,p);
2529   s = g (p, va_arg (v,int));
2530   va_end (v);
2531   return s;
2532 }
2533 int test (int i, double x);
2534 struct s1 {int (*f) (int a);};
2535 struct s2 {int (*f) (double a);};
2536 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2537 int argc;
2538 char **argv;
2539 int
2540 main (void)
2541 {
2542 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2543   ;
2544   return 0;
2545 }
2546 _ACEOF
2547 # Don't try gcc -ansi; that turns off useful extensions and
2548 # breaks some systems' header files.
2549 # AIX                   -qlanglvl=ansi
2550 # Ultrix and OSF/1      -std1
2551 # HP-UX 10.20 and later -Ae
2552 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2553 # SVR4                  -Xc -D__EXTENSIONS__
2554 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2555 do
2556   CC="$ac_save_CC $ac_arg"
2557   rm -f "conftest.$ac_objext"
2558 if { (eval echo "$as_me:2558: \"$ac_compile\"") >&5
2559   (eval $ac_compile) 2>&5
2560   ac_status=$?
2561   echo "$as_me:2561: \$? = $ac_status" >&5
2562   (exit "$ac_status"); } &&
2563          { ac_try='test -s "conftest.$ac_objext"'
2564   { (eval echo "$as_me:2564: \"$ac_try\"") >&5
2565   (eval $ac_try) 2>&5
2566   ac_status=$?
2567   echo "$as_me:2567: \$? = $ac_status" >&5
2568   (exit "$ac_status"); }; }; then
2569   ac_cv_prog_cc_stdc=$ac_arg
2570 break
2571 else
2572   echo "$as_me: failed program was:" >&5
2573 cat "conftest.$ac_ext" >&5
2574 fi
2575 rm -f "conftest.$ac_objext"
2576 done
2577 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2578 CC=$ac_save_CC
2579
2580 fi
2581
2582 case "x$ac_cv_prog_cc_stdc" in
2583   x|xno)
2584     echo "$as_me:2584: result: none needed" >&5
2585 echo "${ECHO_T}none needed" >&6 ;;
2586   *)
2587     echo "$as_me:2587: result: $ac_cv_prog_cc_stdc" >&5
2588 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2589     CC="$CC $ac_cv_prog_cc_stdc" ;;
2590 esac
2591
2592 # This should have been defined by AC_PROG_CC
2593 : "${CC:=cc}"
2594
2595 echo "$as_me:2595: checking \$CFLAGS variable" >&5
2596 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2597 case "x$CFLAGS" in
2598 (*-[IUD]*)
2599         echo "$as_me:2599: result: broken" >&5
2600 echo "${ECHO_T}broken" >&6
2601         { echo "$as_me:2601: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2602 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2603         cf_flags="$CFLAGS"
2604         CFLAGS=
2605         for cf_arg in $cf_flags
2606         do
2607
2608 cf_fix_cppflags=no
2609 cf_new_cflags=
2610 cf_new_cppflags=
2611 cf_new_extra_cppflags=
2612
2613 for cf_add_cflags in $cf_arg
2614 do
2615 case "$cf_fix_cppflags" in
2616 (no)
2617         case "$cf_add_cflags" in
2618         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2619                 case "$cf_add_cflags" in
2620                 (-D*)
2621                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2622
2623                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2624                                 && test -z "${cf_tst_cflags}" \
2625                                 && cf_fix_cppflags=yes
2626
2627                         if test "$cf_fix_cppflags" = yes ; then
2628
2629         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2630         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2631
2632                                 continue
2633                         elif test "${cf_tst_cflags}" = "\"'" ; then
2634
2635         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2636         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2637
2638                                 continue
2639                         fi
2640                         ;;
2641                 esac
2642                 case "$CPPFLAGS" in
2643                 (*$cf_add_cflags)
2644                         ;;
2645                 (*)
2646                         case "$cf_add_cflags" in
2647                         (-D*)
2648                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2649
2650 CPPFLAGS=`echo "$CPPFLAGS" | \
2651         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2652                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2653
2654                                 ;;
2655                         esac
2656
2657         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2658         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2659
2660                         ;;
2661                 esac
2662                 ;;
2663         (*)
2664
2665         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2666         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2667
2668                 ;;
2669         esac
2670         ;;
2671 (yes)
2672
2673         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2674         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2675
2676         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2677
2678         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2679                 && test -z "${cf_tst_cflags}" \
2680                 && cf_fix_cppflags=no
2681         ;;
2682 esac
2683 done
2684
2685 if test -n "$cf_new_cflags" ; then
2686
2687         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2688         CFLAGS="${CFLAGS}$cf_new_cflags"
2689
2690 fi
2691
2692 if test -n "$cf_new_cppflags" ; then
2693
2694         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2695         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2696
2697 fi
2698
2699 if test -n "$cf_new_extra_cppflags" ; then
2700
2701         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2702         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2703
2704 fi
2705
2706         done
2707         ;;
2708 (*)
2709         echo "$as_me:2709: result: ok" >&5
2710 echo "${ECHO_T}ok" >&6
2711         ;;
2712 esac
2713
2714 echo "$as_me:2714: checking \$CC variable" >&5
2715 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2716 case "$CC" in
2717 (*[\ \  ]-*)
2718         echo "$as_me:2718: result: broken" >&5
2719 echo "${ECHO_T}broken" >&6
2720         { echo "$as_me:2720: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2721 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2722         # humor him...
2723         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2724         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2725         CC="$cf_prog"
2726         for cf_arg in $cf_flags
2727         do
2728                 case "x$cf_arg" in
2729                 (x-[IUDfgOW]*)
2730
2731 cf_fix_cppflags=no
2732 cf_new_cflags=
2733 cf_new_cppflags=
2734 cf_new_extra_cppflags=
2735
2736 for cf_add_cflags in $cf_arg
2737 do
2738 case "$cf_fix_cppflags" in
2739 (no)
2740         case "$cf_add_cflags" in
2741         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2742                 case "$cf_add_cflags" in
2743                 (-D*)
2744                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2745
2746                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2747                                 && test -z "${cf_tst_cflags}" \
2748                                 && cf_fix_cppflags=yes
2749
2750                         if test "$cf_fix_cppflags" = yes ; then
2751
2752         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2753         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2754
2755                                 continue
2756                         elif test "${cf_tst_cflags}" = "\"'" ; then
2757
2758         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2759         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2760
2761                                 continue
2762                         fi
2763                         ;;
2764                 esac
2765                 case "$CPPFLAGS" in
2766                 (*$cf_add_cflags)
2767                         ;;
2768                 (*)
2769                         case "$cf_add_cflags" in
2770                         (-D*)
2771                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2772
2773 CPPFLAGS=`echo "$CPPFLAGS" | \
2774         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2775                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2776
2777                                 ;;
2778                         esac
2779
2780         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2781         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2782
2783                         ;;
2784                 esac
2785                 ;;
2786         (*)
2787
2788         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2789         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2790
2791                 ;;
2792         esac
2793         ;;
2794 (yes)
2795
2796         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2797         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2798
2799         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2800
2801         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2802                 && test -z "${cf_tst_cflags}" \
2803                 && cf_fix_cppflags=no
2804         ;;
2805 esac
2806 done
2807
2808 if test -n "$cf_new_cflags" ; then
2809
2810         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2811         CFLAGS="${CFLAGS}$cf_new_cflags"
2812
2813 fi
2814
2815 if test -n "$cf_new_cppflags" ; then
2816
2817         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2818         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2819
2820 fi
2821
2822 if test -n "$cf_new_extra_cppflags" ; then
2823
2824         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2825         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2826
2827 fi
2828
2829                         ;;
2830                 (*)
2831                         CC="$CC $cf_arg"
2832                         ;;
2833                 esac
2834         done
2835         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2836
2837 echo "${as_me:-configure}:2837: testing resulting CC: '$CC' ..." 1>&5
2838
2839         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2840
2841 echo "${as_me:-configure}:2841: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2842
2843         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2844
2845 echo "${as_me:-configure}:2845: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2846
2847         ;;
2848 (*)
2849         echo "$as_me:2849: result: ok" >&5
2850 echo "${ECHO_T}ok" >&6
2851         ;;
2852 esac
2853
2854 ac_ext=c
2855 ac_cpp='$CPP $CPPFLAGS'
2856 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2857 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2858 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2859 ac_main_return="return"
2860 echo "$as_me:2860: checking how to run the C preprocessor" >&5
2861 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2862 # On Suns, sometimes $CPP names a directory.
2863 if test -n "$CPP" && test -d "$CPP"; then
2864   CPP=
2865 fi
2866 if test -z "$CPP"; then
2867   if test "${ac_cv_prog_CPP+set}" = set; then
2868   echo $ECHO_N "(cached) $ECHO_C" >&6
2869 else
2870       # Double quotes because CPP needs to be expanded
2871     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2872     do
2873       ac_preproc_ok=false
2874 for ac_c_preproc_warn_flag in '' yes
2875 do
2876   # Use a header file that comes with gcc, so configuring glibc
2877   # with a fresh cross-compiler works.
2878   # On the NeXT, cc -E runs the code through the compiler's parser,
2879   # not just through cpp. "Syntax error" is here to catch this case.
2880   cat >"conftest.$ac_ext" <<_ACEOF
2881 #line 2881 "configure"
2882 #include "confdefs.h"
2883 #include <assert.h>
2884                      Syntax error
2885 _ACEOF
2886 if { (eval echo "$as_me:2886: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2887   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2888   ac_status=$?
2889   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2890   rm -f conftest.er1
2891   cat conftest.err >&5
2892   echo "$as_me:2892: \$? = $ac_status" >&5
2893   (exit "$ac_status"); } >/dev/null; then
2894   if test -s conftest.err; then
2895     ac_cpp_err=$ac_c_preproc_warn_flag
2896   else
2897     ac_cpp_err=
2898   fi
2899 else
2900   ac_cpp_err=yes
2901 fi
2902 if test -z "$ac_cpp_err"; then
2903   :
2904 else
2905   echo "$as_me: failed program was:" >&5
2906   cat "conftest.$ac_ext" >&5
2907   # Broken: fails on valid input.
2908 continue
2909 fi
2910 rm -f conftest.err "conftest.$ac_ext"
2911
2912   # OK, works on sane cases.  Now check whether non-existent headers
2913   # can be detected and how.
2914   cat >"conftest.$ac_ext" <<_ACEOF
2915 #line 2915 "configure"
2916 #include "confdefs.h"
2917 #include <ac_nonexistent.h>
2918 _ACEOF
2919 if { (eval echo "$as_me:2919: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2920   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2921   ac_status=$?
2922   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2923   rm -f conftest.er1
2924   cat conftest.err >&5
2925   echo "$as_me:2925: \$? = $ac_status" >&5
2926   (exit "$ac_status"); } >/dev/null; then
2927   if test -s conftest.err; then
2928     ac_cpp_err=$ac_c_preproc_warn_flag
2929   else
2930     ac_cpp_err=
2931   fi
2932 else
2933   ac_cpp_err=yes
2934 fi
2935 if test -z "$ac_cpp_err"; then
2936   # Broken: success on invalid input.
2937 continue
2938 else
2939   echo "$as_me: failed program was:" >&5
2940   cat "conftest.$ac_ext" >&5
2941   # Passes both tests.
2942 ac_preproc_ok=:
2943 break
2944 fi
2945 rm -f conftest.err "conftest.$ac_ext"
2946
2947 done
2948 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2949 rm -f conftest.err "conftest.$ac_ext"
2950 if $ac_preproc_ok; then
2951   break
2952 fi
2953
2954     done
2955     ac_cv_prog_CPP=$CPP
2956
2957 fi
2958   CPP=$ac_cv_prog_CPP
2959 else
2960   ac_cv_prog_CPP=$CPP
2961 fi
2962 echo "$as_me:2962: result: $CPP" >&5
2963 echo "${ECHO_T}$CPP" >&6
2964 ac_preproc_ok=false
2965 for ac_c_preproc_warn_flag in '' yes
2966 do
2967   # Use a header file that comes with gcc, so configuring glibc
2968   # with a fresh cross-compiler works.
2969   # On the NeXT, cc -E runs the code through the compiler's parser,
2970   # not just through cpp. "Syntax error" is here to catch this case.
2971   cat >"conftest.$ac_ext" <<_ACEOF
2972 #line 2972 "configure"
2973 #include "confdefs.h"
2974 #include <assert.h>
2975                      Syntax error
2976 _ACEOF
2977 if { (eval echo "$as_me:2977: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2978   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2979   ac_status=$?
2980   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2981   rm -f conftest.er1
2982   cat conftest.err >&5
2983   echo "$as_me:2983: \$? = $ac_status" >&5
2984   (exit "$ac_status"); } >/dev/null; then
2985   if test -s conftest.err; then
2986     ac_cpp_err=$ac_c_preproc_warn_flag
2987   else
2988     ac_cpp_err=
2989   fi
2990 else
2991   ac_cpp_err=yes
2992 fi
2993 if test -z "$ac_cpp_err"; then
2994   :
2995 else
2996   echo "$as_me: failed program was:" >&5
2997   cat "conftest.$ac_ext" >&5
2998   # Broken: fails on valid input.
2999 continue
3000 fi
3001 rm -f conftest.err "conftest.$ac_ext"
3002
3003   # OK, works on sane cases.  Now check whether non-existent headers
3004   # can be detected and how.
3005   cat >"conftest.$ac_ext" <<_ACEOF
3006 #line 3006 "configure"
3007 #include "confdefs.h"
3008 #include <ac_nonexistent.h>
3009 _ACEOF
3010 if { (eval echo "$as_me:3010: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3011   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3012   ac_status=$?
3013   $EGREP -v '^ *\+' conftest.er1 >conftest.err
3014   rm -f conftest.er1
3015   cat conftest.err >&5
3016   echo "$as_me:3016: \$? = $ac_status" >&5
3017   (exit "$ac_status"); } >/dev/null; then
3018   if test -s conftest.err; then
3019     ac_cpp_err=$ac_c_preproc_warn_flag
3020   else
3021     ac_cpp_err=
3022   fi
3023 else
3024   ac_cpp_err=yes
3025 fi
3026 if test -z "$ac_cpp_err"; then
3027   # Broken: success on invalid input.
3028 continue
3029 else
3030   echo "$as_me: failed program was:" >&5
3031   cat "conftest.$ac_ext" >&5
3032   # Passes both tests.
3033 ac_preproc_ok=:
3034 break
3035 fi
3036 rm -f conftest.err "conftest.$ac_ext"
3037
3038 done
3039 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3040 rm -f conftest.err "conftest.$ac_ext"
3041 if $ac_preproc_ok; then
3042   :
3043 else
3044   { { echo "$as_me:3044: error: C preprocessor \"$CPP\" fails sanity check" >&5
3045 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
3046    { (exit 1); exit 1; }; }
3047 fi
3048
3049 ac_ext=c
3050 ac_cpp='$CPP $CPPFLAGS'
3051 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3052 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3053 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3054 ac_main_return="return"
3055
3056 if test $ac_cv_c_compiler_gnu = yes; then
3057     echo "$as_me:3057: checking whether $CC needs -traditional" >&5
3058 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
3059 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
3060   echo $ECHO_N "(cached) $ECHO_C" >&6
3061 else
3062     ac_pattern="Autoconf.*'x'"
3063   cat >"conftest.$ac_ext" <<_ACEOF
3064 #line 3064 "configure"
3065 #include "confdefs.h"
3066 #include <sgtty.h>
3067 int Autoconf = TIOCGETP;
3068 _ACEOF
3069 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3070   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3071   ac_cv_prog_gcc_traditional=yes
3072 else
3073   ac_cv_prog_gcc_traditional=no
3074 fi
3075 rm -rf conftest*
3076
3077   if test $ac_cv_prog_gcc_traditional = no; then
3078     cat >"conftest.$ac_ext" <<_ACEOF
3079 #line 3079 "configure"
3080 #include "confdefs.h"
3081 #include <termio.h>
3082 int Autoconf = TCGETA;
3083 _ACEOF
3084 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3085   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3086   ac_cv_prog_gcc_traditional=yes
3087 fi
3088 rm -rf conftest*
3089
3090   fi
3091 fi
3092 echo "$as_me:3092: result: $ac_cv_prog_gcc_traditional" >&5
3093 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3094   if test $ac_cv_prog_gcc_traditional = yes; then
3095     CC="$CC -traditional"
3096   fi
3097 fi
3098
3099 echo "$as_me:3099: checking whether $CC understands -c and -o together" >&5
3100 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3101 if test "${cf_cv_prog_CC_c_o+set}" = set; then
3102   echo $ECHO_N "(cached) $ECHO_C" >&6
3103 else
3104
3105 cat > conftest.$ac_ext <<CF_EOF
3106 int main(void)
3107 {
3108         ${cf_cv_main_return:-return}(0);
3109 }
3110 CF_EOF
3111 # We do the test twice because some compilers refuse to overwrite an
3112 # existing .o file with -o, though they will create one.
3113 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3114 if { (eval echo "$as_me:3114: \"$ac_try\"") >&5
3115   (eval $ac_try) 2>&5
3116   ac_status=$?
3117   echo "$as_me:3117: \$? = $ac_status" >&5
3118   (exit "$ac_status"); } &&
3119   test -f conftest2.$ac_objext && { (eval echo "$as_me:3119: \"$ac_try\"") >&5
3120   (eval $ac_try) 2>&5
3121   ac_status=$?
3122   echo "$as_me:3122: \$? = $ac_status" >&5
3123   (exit "$ac_status"); };
3124 then
3125   eval cf_cv_prog_CC_c_o=yes
3126 else
3127   eval cf_cv_prog_CC_c_o=no
3128 fi
3129 rm -rf ./conftest*
3130
3131 fi
3132 if test "$cf_cv_prog_CC_c_o" = yes; then
3133   echo "$as_me:3133: result: yes" >&5
3134 echo "${ECHO_T}yes" >&6
3135 else
3136   echo "$as_me:3136: result: no" >&5
3137 echo "${ECHO_T}no" >&6
3138 fi
3139
3140 if test "$cross_compiling" = yes ; then
3141         LDCONFIG=:
3142 else
3143         case "$cf_cv_system_name" in
3144         (dragonfly*|mirbsd*|freebsd*)
3145                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
3146                 ;;
3147         (*) LDPATH=$PATH:/sbin:/usr/sbin
3148                 # Extract the first word of "ldconfig", so it can be a program name with args.
3149 set dummy ldconfig; ac_word=$2
3150 echo "$as_me:3150: checking for $ac_word" >&5
3151 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3152 if test "${ac_cv_path_LDCONFIG+set}" = set; then
3153   echo $ECHO_N "(cached) $ECHO_C" >&6
3154 else
3155   case $LDCONFIG in
3156   [\\/]* | ?:[\\/]*)
3157   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
3158   ;;
3159   *)
3160   ac_save_IFS=$IFS; IFS=$ac_path_separator
3161 ac_dummy="$LDPATH"
3162 for ac_dir in $ac_dummy; do
3163   IFS=$ac_save_IFS
3164   test -z "$ac_dir" && ac_dir=.
3165   if $as_executable_p "$ac_dir/$ac_word"; then
3166    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
3167    echo "$as_me:3167: found $ac_dir/$ac_word" >&5
3168    break
3169 fi
3170 done
3171
3172   ;;
3173 esac
3174 fi
3175 LDCONFIG=$ac_cv_path_LDCONFIG
3176
3177 if test -n "$LDCONFIG"; then
3178   echo "$as_me:3178: result: $LDCONFIG" >&5
3179 echo "${ECHO_T}$LDCONFIG" >&6
3180 else
3181   echo "$as_me:3181: result: no" >&5
3182 echo "${ECHO_T}no" >&6
3183 fi
3184
3185                 ;;
3186         esac
3187 fi
3188
3189 echo "$as_me:3189: checking if you want to ensure bool is consistent with C++" >&5
3190 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
3191
3192 # Check whether --with-cxx or --without-cxx was given.
3193 if test "${with_cxx+set}" = set; then
3194   withval="$with_cxx"
3195   cf_with_cxx=$withval
3196 else
3197   cf_with_cxx=yes
3198 fi;
3199 echo "$as_me:3199: result: $cf_with_cxx" >&5
3200 echo "${ECHO_T}$cf_with_cxx" >&6
3201 if test "X$cf_with_cxx" = Xno ; then
3202         CXX=""
3203         GXX=""
3204 else
3205         # with autoconf 2.13, we can change the error to a warning:
3206                 ac_ext=cc
3207 ac_cpp='$CXXCPP $CPPFLAGS'
3208 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3209 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3210 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3211 ac_main_return="return"
3212 if test -n "$ac_tool_prefix"; then
3213   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3214   do
3215     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3216 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3217 echo "$as_me:3217: checking for $ac_word" >&5
3218 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3219 if test "${ac_cv_prog_CXX+set}" = set; then
3220   echo $ECHO_N "(cached) $ECHO_C" >&6
3221 else
3222   if test -n "$CXX"; then
3223   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3224 else
3225   ac_save_IFS=$IFS; IFS=$ac_path_separator
3226 ac_dummy="$PATH"
3227 for ac_dir in $ac_dummy; do
3228   IFS=$ac_save_IFS
3229   test -z "$ac_dir" && ac_dir=.
3230   $as_executable_p "$ac_dir/$ac_word" || continue
3231 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3232 echo "$as_me:3232: found $ac_dir/$ac_word" >&5
3233 break
3234 done
3235
3236 fi
3237 fi
3238 CXX=$ac_cv_prog_CXX
3239 if test -n "$CXX"; then
3240   echo "$as_me:3240: result: $CXX" >&5
3241 echo "${ECHO_T}$CXX" >&6
3242 else
3243   echo "$as_me:3243: result: no" >&5
3244 echo "${ECHO_T}no" >&6
3245 fi
3246
3247     test -n "$CXX" && break
3248   done
3249 fi
3250 if test -z "$CXX"; then
3251   ac_ct_CXX=$CXX
3252   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3253 do
3254   # Extract the first word of "$ac_prog", so it can be a program name with args.
3255 set dummy $ac_prog; ac_word=$2
3256 echo "$as_me:3256: checking for $ac_word" >&5
3257 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3258 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3259   echo $ECHO_N "(cached) $ECHO_C" >&6
3260 else
3261   if test -n "$ac_ct_CXX"; then
3262   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3263 else
3264   ac_save_IFS=$IFS; IFS=$ac_path_separator
3265 ac_dummy="$PATH"
3266 for ac_dir in $ac_dummy; do
3267   IFS=$ac_save_IFS
3268   test -z "$ac_dir" && ac_dir=.
3269   $as_executable_p "$ac_dir/$ac_word" || continue
3270 ac_cv_prog_ac_ct_CXX="$ac_prog"
3271 echo "$as_me:3271: found $ac_dir/$ac_word" >&5
3272 break
3273 done
3274
3275 fi
3276 fi
3277 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3278 if test -n "$ac_ct_CXX"; then
3279   echo "$as_me:3279: result: $ac_ct_CXX" >&5
3280 echo "${ECHO_T}$ac_ct_CXX" >&6
3281 else
3282   echo "$as_me:3282: result: no" >&5
3283 echo "${ECHO_T}no" >&6
3284 fi
3285
3286   test -n "$ac_ct_CXX" && break
3287 done
3288 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3289
3290   CXX=$ac_ct_CXX
3291 fi
3292
3293 # Provide some information about the compiler.
3294 echo "$as_me:3294:" \
3295      "checking for C++ compiler version" >&5
3296 ac_compiler=`set X $ac_compile; echo $2`
3297 { (eval echo "$as_me:3297: \"$ac_compiler --version </dev/null >&5\"") >&5
3298   (eval $ac_compiler --version </dev/null >&5) 2>&5
3299   ac_status=$?
3300   echo "$as_me:3300: \$? = $ac_status" >&5
3301   (exit "$ac_status"); }
3302 { (eval echo "$as_me:3302: \"$ac_compiler -v </dev/null >&5\"") >&5
3303   (eval $ac_compiler -v </dev/null >&5) 2>&5
3304   ac_status=$?
3305   echo "$as_me:3305: \$? = $ac_status" >&5
3306   (exit "$ac_status"); }
3307 { (eval echo "$as_me:3307: \"$ac_compiler -V </dev/null >&5\"") >&5
3308   (eval $ac_compiler -V </dev/null >&5) 2>&5
3309   ac_status=$?
3310   echo "$as_me:3310: \$? = $ac_status" >&5
3311   (exit "$ac_status"); }
3312
3313 echo "$as_me:3313: checking whether we are using the GNU C++ compiler" >&5
3314 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3315 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3316   echo $ECHO_N "(cached) $ECHO_C" >&6
3317 else
3318   cat >"conftest.$ac_ext" <<_ACEOF
3319 #line 3319 "configure"
3320 #include "confdefs.h"
3321
3322 int
3323 main (void)
3324 {
3325 #ifndef __GNUC__
3326        choke me
3327 #endif
3328
3329   ;
3330   return 0;
3331 }
3332 _ACEOF
3333 rm -f "conftest.$ac_objext"
3334 if { (eval echo "$as_me:3334: \"$ac_compile\"") >&5
3335   (eval $ac_compile) 2>&5
3336   ac_status=$?
3337   echo "$as_me:3337: \$? = $ac_status" >&5
3338   (exit "$ac_status"); } &&
3339          { ac_try='test -s "conftest.$ac_objext"'
3340   { (eval echo "$as_me:3340: \"$ac_try\"") >&5
3341   (eval $ac_try) 2>&5
3342   ac_status=$?
3343   echo "$as_me:3343: \$? = $ac_status" >&5
3344   (exit "$ac_status"); }; }; then
3345   ac_compiler_gnu=yes
3346 else
3347   echo "$as_me: failed program was:" >&5
3348 cat "conftest.$ac_ext" >&5
3349 ac_compiler_gnu=no
3350 fi
3351 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3352 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3353
3354 fi
3355 echo "$as_me:3355: result: $ac_cv_cxx_compiler_gnu" >&5
3356 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3357 GXX=`test $ac_compiler_gnu = yes && echo yes`
3358 ac_test_CXXFLAGS=${CXXFLAGS+set}
3359 ac_save_CXXFLAGS=$CXXFLAGS
3360 CXXFLAGS="-g"
3361 echo "$as_me:3361: checking whether $CXX accepts -g" >&5
3362 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3363 if test "${ac_cv_prog_cxx_g+set}" = set; then
3364   echo $ECHO_N "(cached) $ECHO_C" >&6
3365 else
3366   cat >"conftest.$ac_ext" <<_ACEOF
3367 #line 3367 "configure"
3368 #include "confdefs.h"
3369
3370 int
3371 main (void)
3372 {
3373
3374   ;
3375   return 0;
3376 }
3377 _ACEOF
3378 rm -f "conftest.$ac_objext"
3379 if { (eval echo "$as_me:3379: \"$ac_compile\"") >&5
3380   (eval $ac_compile) 2>&5
3381   ac_status=$?
3382   echo "$as_me:3382: \$? = $ac_status" >&5
3383   (exit "$ac_status"); } &&
3384          { ac_try='test -s "conftest.$ac_objext"'
3385   { (eval echo "$as_me:3385: \"$ac_try\"") >&5
3386   (eval $ac_try) 2>&5
3387   ac_status=$?
3388   echo "$as_me:3388: \$? = $ac_status" >&5
3389   (exit "$ac_status"); }; }; then
3390   ac_cv_prog_cxx_g=yes
3391 else
3392   echo "$as_me: failed program was:" >&5
3393 cat "conftest.$ac_ext" >&5
3394 ac_cv_prog_cxx_g=no
3395 fi
3396 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3397 fi
3398 echo "$as_me:3398: result: $ac_cv_prog_cxx_g" >&5
3399 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3400 if test "$ac_test_CXXFLAGS" = set; then
3401   CXXFLAGS=$ac_save_CXXFLAGS
3402 elif test $ac_cv_prog_cxx_g = yes; then
3403   if test "$GXX" = yes; then
3404     CXXFLAGS="-g -O2"
3405   else
3406     CXXFLAGS="-g"
3407   fi
3408 else
3409   if test "$GXX" = yes; then
3410     CXXFLAGS="-O2"
3411   else
3412     CXXFLAGS=
3413   fi
3414 fi
3415 for ac_declaration in \
3416    ''\
3417    '#include <stdlib.h>' \
3418    'extern "C" void std::exit (int) throw (); using std::exit;' \
3419    'extern "C" void std::exit (int); using std::exit;' \
3420    'extern "C" void exit (int) throw ();' \
3421    'extern "C" void exit (int);' \
3422    'void exit (int);'
3423 do
3424   cat >"conftest.$ac_ext" <<_ACEOF
3425 #line 3425 "configure"
3426 #include "confdefs.h"
3427 #include <stdlib.h>
3428 $ac_declaration
3429 int
3430 main (void)
3431 {
3432 exit (42);
3433   ;
3434   return 0;
3435 }
3436 _ACEOF
3437 rm -f "conftest.$ac_objext"
3438 if { (eval echo "$as_me:3438: \"$ac_compile\"") >&5
3439   (eval $ac_compile) 2>&5
3440   ac_status=$?
3441   echo "$as_me:3441: \$? = $ac_status" >&5
3442   (exit "$ac_status"); } &&
3443          { ac_try='test -s "conftest.$ac_objext"'
3444   { (eval echo "$as_me:3444: \"$ac_try\"") >&5
3445   (eval $ac_try) 2>&5
3446   ac_status=$?
3447   echo "$as_me:3447: \$? = $ac_status" >&5
3448   (exit "$ac_status"); }; }; then
3449   :
3450 else
3451   echo "$as_me: failed program was:" >&5
3452 cat "conftest.$ac_ext" >&5
3453 continue
3454 fi
3455 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3456   cat >"conftest.$ac_ext" <<_ACEOF
3457 #line 3457 "configure"
3458 #include "confdefs.h"
3459 $ac_declaration
3460 int
3461 main (void)
3462 {
3463 exit (42);
3464   ;
3465   return 0;
3466 }
3467 _ACEOF
3468 rm -f "conftest.$ac_objext"
3469 if { (eval echo "$as_me:3469: \"$ac_compile\"") >&5
3470   (eval $ac_compile) 2>&5
3471   ac_status=$?
3472   echo "$as_me:3472: \$? = $ac_status" >&5
3473   (exit "$ac_status"); } &&
3474          { ac_try='test -s "conftest.$ac_objext"'
3475   { (eval echo "$as_me:3475: \"$ac_try\"") >&5
3476   (eval $ac_try) 2>&5
3477   ac_status=$?
3478   echo "$as_me:3478: \$? = $ac_status" >&5
3479   (exit "$ac_status"); }; }; then
3480   break
3481 else
3482   echo "$as_me: failed program was:" >&5
3483 cat "conftest.$ac_ext" >&5
3484 fi
3485 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3486 done
3487 rm -rf conftest*
3488 if test -n "$ac_declaration"; then
3489   echo '#ifdef __cplusplus' >>confdefs.h
3490   echo "$ac_declaration"    >>confdefs.h
3491   echo '#endif'             >>confdefs.h
3492 fi
3493
3494 ac_ext=c
3495 ac_cpp='$CPP $CPPFLAGS'
3496 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3497 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3498 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3499 ac_main_return="return"
3500
3501         ac_ext=cc
3502 ac_cpp='$CXXCPP $CPPFLAGS'
3503 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3504 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3505 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3506 ac_main_return="return"
3507
3508         if test "x$cf_with_cxx" != xno
3509         then
3510                 # Several of the C++ configurations do not work, particularly when
3511                 # cross-compiling (20140913 -TD)
3512                 echo "$as_me:3512: checking if $CXX works" >&5
3513 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3514
3515                 save_CPPFLAGS="$CPPFLAGS"
3516                 eval cf_includedir=${includedir}
3517                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3518
3519 cat >"conftest.$ac_ext" <<_ACEOF
3520 #line 3520 "configure"
3521 #include "confdefs.h"
3522
3523 #include <stdlib.h>
3524 #include <stdio.h>
3525
3526 int
3527 main (void)
3528 {
3529
3530                 printf("Hello world!\n")
3531
3532   ;
3533   return 0;
3534 }
3535 _ACEOF
3536 rm -f "conftest.$ac_objext"
3537 if { (eval echo "$as_me:3537: \"$ac_compile\"") >&5
3538   (eval $ac_compile) 2>&5
3539   ac_status=$?
3540   echo "$as_me:3540: \$? = $ac_status" >&5
3541   (exit "$ac_status"); } &&
3542          { ac_try='test -s "conftest.$ac_objext"'
3543   { (eval echo "$as_me:3543: \"$ac_try\"") >&5
3544   (eval $ac_try) 2>&5
3545   ac_status=$?
3546   echo "$as_me:3546: \$? = $ac_status" >&5
3547   (exit "$ac_status"); }; }; then
3548   cf_cxx_works=yes
3549 else
3550   echo "$as_me: failed program was:" >&5
3551 cat "conftest.$ac_ext" >&5
3552 cf_cxx_works=no
3553 fi
3554 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3555                 CPPFLAGS="$save_CPPFLAGS"
3556
3557                 echo "$as_me:3557: result: $cf_cxx_works" >&5
3558 echo "${ECHO_T}$cf_cxx_works" >&6
3559                 if test "x$cf_cxx_works" = xno
3560                 then
3561                         { echo "$as_me:3561: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3562 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3563                         cf_with_cxx=no; CXX=""; GXX="";
3564                 fi
3565         fi
3566         ac_ext=c
3567 ac_cpp='$CPP $CPPFLAGS'
3568 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3569 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3570 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3571 ac_main_return="return"
3572
3573         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3574         if test "$CXX" = "g++" ; then
3575                 # Extract the first word of "g++", so it can be a program name with args.
3576 set dummy g++; ac_word=$2
3577 echo "$as_me:3577: checking for $ac_word" >&5
3578 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3579 if test "${ac_cv_path_CXX+set}" = set; then
3580   echo $ECHO_N "(cached) $ECHO_C" >&6
3581 else
3582   case $CXX in
3583   [\\/]* | ?:[\\/]*)
3584   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3585   ;;
3586   *)
3587   ac_save_IFS=$IFS; IFS=$ac_path_separator
3588 ac_dummy="$PATH"
3589 for ac_dir in $ac_dummy; do
3590   IFS=$ac_save_IFS
3591   test -z "$ac_dir" && ac_dir=.
3592   if $as_executable_p "$ac_dir/$ac_word"; then
3593    ac_cv_path_CXX="$ac_dir/$ac_word"
3594    echo "$as_me:3594: found $ac_dir/$ac_word" >&5
3595    break
3596 fi
3597 done
3598
3599   ;;
3600 esac
3601 fi
3602 CXX=$ac_cv_path_CXX
3603
3604 if test -n "$CXX"; then
3605   echo "$as_me:3605: result: $CXX" >&5
3606 echo "${ECHO_T}$CXX" >&6
3607 else
3608   echo "$as_me:3608: result: no" >&5
3609 echo "${ECHO_T}no" >&6
3610 fi
3611
3612         fi
3613         case "x$CXX" in
3614         (x|xg++)
3615                 { echo "$as_me:3615: WARNING: You don't have any C++ compiler, too bad" >&5
3616 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3617                 cf_with_cxx=no; CXX=""; GXX="";
3618                 ;;
3619         esac
3620 fi
3621
3622 GXX_VERSION=none
3623 if test "$GXX" = yes; then
3624         echo "$as_me:3624: checking version of ${CXX:-g++}" >&5
3625 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3626         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3627         if test -z "$GXX_VERSION"
3628         then
3629                 GXX_VERSION=unknown
3630                 GXX=no
3631         fi
3632         echo "$as_me:3632: result: $GXX_VERSION" >&5
3633 echo "${ECHO_T}$GXX_VERSION" >&6
3634 fi
3635
3636 case "$GXX_VERSION" in
3637 ([1-9][0-9].*)
3638         ;;
3639 (1.*|2.[0-6]*)
3640         { echo "$as_me:3640: WARNING: templates do not work" >&5
3641 echo "$as_me: WARNING: templates do not work" >&2;}
3642         ;;
3643 esac
3644
3645 echo "$as_me:3645: checking if you want to build C++ binding and demo" >&5
3646 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3647
3648 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3649 if test "${with_cxx_binding+set}" = set; then
3650   withval="$with_cxx_binding"
3651   cf_with_cxx_binding=$withval
3652 else
3653   cf_with_cxx_binding=$cf_with_cxx
3654 fi;
3655 echo "$as_me:3655: result: $cf_with_cxx_binding" >&5
3656 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3657
3658 echo "$as_me:3658: checking if you want to build with Ada" >&5
3659 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3660 echo "$as_me:3660: result: $cf_with_ada" >&5
3661 echo "${ECHO_T}$cf_with_ada" >&6
3662
3663 echo "$as_me:3663: checking if you want to install terminal database" >&5
3664 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3665
3666 # Check whether --enable-db-install or --disable-db-install was given.
3667 if test "${enable_db_install+set}" = set; then
3668   enableval="$enable_db_install"
3669   cf_with_db_install=$enableval
3670 else
3671   cf_with_db_install=yes
3672 fi;
3673 echo "$as_me:3673: result: $cf_with_db_install" >&5
3674 echo "${ECHO_T}$cf_with_db_install" >&6
3675
3676 echo "$as_me:3676: checking if you want to install manpages" >&5
3677 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3678
3679 # Check whether --with-manpages or --without-manpages was given.
3680 if test "${with_manpages+set}" = set; then
3681   withval="$with_manpages"
3682   cf_with_manpages=$withval
3683 else
3684   cf_with_manpages=yes
3685 fi;
3686 echo "$as_me:3686: result: $cf_with_manpages" >&5
3687 echo "${ECHO_T}$cf_with_manpages" >&6
3688
3689 echo "$as_me:3689: checking if you want to build programs such as tic" >&5
3690 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3691
3692 # Check whether --with-progs or --without-progs was given.
3693 if test "${with_progs+set}" = set; then
3694   withval="$with_progs"
3695   cf_with_progs=$withval
3696 else
3697   cf_with_progs=yes
3698 fi;
3699 echo "$as_me:3699: result: $cf_with_progs" >&5
3700 echo "${ECHO_T}$cf_with_progs" >&6
3701
3702 if test -f "$srcdir/tack/tack.h" ; then
3703         if test "x$cross_compiling" = xyes ; then
3704                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3705
3706 echo "${as_me:-configure}:3706: testing ignoring tack because we are cross-compiling ..." 1>&5
3707
3708                 cf_with_tack=no
3709         else
3710                 echo "$as_me:3710: checking if you want to build the tack program" >&5
3711 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3712
3713 # Check whether --with-tack or --without-tack was given.
3714 if test "${with_tack+set}" = set; then
3715   withval="$with_tack"
3716   cf_with_tack=$withval
3717 else
3718   cf_with_tack=$cf_with_progs
3719 fi;
3720                 echo "$as_me:3720: result: $cf_with_tack" >&5
3721 echo "${ECHO_T}$cf_with_tack" >&6
3722         fi
3723 else
3724         cf_with_tack=no
3725 fi
3726
3727 echo "$as_me:3727: checking if you want to build test-programs" >&5
3728 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3729
3730 # Check whether --with-tests or --without-tests was given.
3731 if test "${with_tests+set}" = set; then
3732   withval="$with_tests"
3733   cf_with_tests=$withval
3734 else
3735   cf_with_tests=yes
3736 fi;
3737 echo "$as_me:3737: result: $cf_with_tests" >&5
3738 echo "${ECHO_T}$cf_with_tests" >&6
3739
3740 echo "$as_me:3740: checking if you wish to install curses.h" >&5
3741 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3742
3743 # Check whether --with-curses-h or --without-curses-h was given.
3744 if test "${with_curses_h+set}" = set; then
3745   withval="$with_curses_h"
3746   with_curses_h=$withval
3747 else
3748   with_curses_h=yes
3749 fi;
3750 echo "$as_me:3750: result: $with_curses_h" >&5
3751 echo "${ECHO_T}$with_curses_h" >&6
3752
3753 modules_to_build="ncurses"
3754 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3755 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3756 modules_to_build="$modules_to_build panel menu form"
3757
3758 test "$program_prefix" != NONE &&
3759   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3760 # Use a double $ so make ignores it.
3761 test "$program_suffix" != NONE &&
3762   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3763 # Double any \ or $.  echo might interpret backslashes.
3764 # By default was `s,x,x', remove it if useless.
3765 cat <<\_ACEOF >conftest.sed
3766 s/[\\$]/&&/g;s/;s,x,x,$//
3767 _ACEOF
3768 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3769 rm conftest.sed
3770
3771 for ac_prog in mawk gawk nawk awk
3772 do
3773   # Extract the first word of "$ac_prog", so it can be a program name with args.
3774 set dummy $ac_prog; ac_word=$2
3775 echo "$as_me:3775: checking for $ac_word" >&5
3776 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3777 if test "${ac_cv_prog_AWK+set}" = set; then
3778   echo $ECHO_N "(cached) $ECHO_C" >&6
3779 else
3780   if test -n "$AWK"; then
3781   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3782 else
3783   ac_save_IFS=$IFS; IFS=$ac_path_separator
3784 ac_dummy="$PATH"
3785 for ac_dir in $ac_dummy; do
3786   IFS=$ac_save_IFS
3787   test -z "$ac_dir" && ac_dir=.
3788   $as_executable_p "$ac_dir/$ac_word" || continue
3789 ac_cv_prog_AWK="$ac_prog"
3790 echo "$as_me:3790: found $ac_dir/$ac_word" >&5
3791 break
3792 done
3793
3794 fi
3795 fi
3796 AWK=$ac_cv_prog_AWK
3797 if test -n "$AWK"; then
3798   echo "$as_me:3798: result: $AWK" >&5
3799 echo "${ECHO_T}$AWK" >&6
3800 else
3801   echo "$as_me:3801: result: no" >&5
3802 echo "${ECHO_T}no" >&6
3803 fi
3804
3805   test -n "$AWK" && break
3806 done
3807
3808 test -z "$AWK" && { { echo "$as_me:3808: error: No awk program found" >&5
3809 echo "$as_me: error: No awk program found" >&2;}
3810    { (exit 1); exit 1; }; }
3811
3812 # Find a good install program.  We prefer a C program (faster),
3813 # so one script is as good as another.  But avoid the broken or
3814 # incompatible versions:
3815 # SysV /etc/install, /usr/sbin/install
3816 # SunOS /usr/etc/install
3817 # IRIX /sbin/install
3818 # AIX /bin/install
3819 # AmigaOS /C/install, which installs bootblocks on floppy discs
3820 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3821 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3822 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3823 # ./install, which can be erroneously created by make from ./install.sh.
3824 echo "$as_me:3824: checking for a BSD compatible install" >&5
3825 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3826 if test -z "$INSTALL"; then
3827 if test "${ac_cv_path_install+set}" = set; then
3828   echo $ECHO_N "(cached) $ECHO_C" >&6
3829 else
3830     ac_save_IFS=$IFS; IFS=$ac_path_separator
3831   for ac_dir in $PATH; do
3832     IFS=$ac_save_IFS
3833     # Account for people who put trailing slashes in PATH elements.
3834     case $ac_dir/ in
3835     / | ./ | .// | /cC/* \
3836     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3837     | /usr/ucb/* ) ;;
3838     *)
3839       # OSF1 and SCO ODT 3.0 have their own names for install.
3840       # Don't use installbsd from OSF since it installs stuff as root
3841       # by default.
3842       for ac_prog in ginstall scoinst install; do
3843         if $as_executable_p "$ac_dir/$ac_prog"; then
3844           if test $ac_prog = install &&
3845             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3846             # AIX install.  It has an incompatible calling convention.
3847             :
3848           elif test $ac_prog = install &&
3849             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3850             # program-specific install script used by HP pwplus--don't use.
3851             :
3852           else
3853             ac_cv_path_install="$ac_dir/$ac_prog -c"
3854             break 2
3855           fi
3856         fi
3857       done
3858       ;;
3859     esac
3860   done
3861
3862 fi
3863   if test "${ac_cv_path_install+set}" = set; then
3864     INSTALL=$ac_cv_path_install
3865   else
3866     # As a last resort, use the slow shell script.  We don't cache a
3867     # path for INSTALL within a source directory, because that will
3868     # break other packages using the cache if that directory is
3869     # removed, or if the path is relative.
3870     INSTALL=$ac_install_sh
3871   fi
3872 fi
3873 echo "$as_me:3873: result: $INSTALL" >&5
3874 echo "${ECHO_T}$INSTALL" >&6
3875
3876 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3877 # It thinks the first close brace ends the variable substitution.
3878 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3879
3880 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3881
3882 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3883
3884 case $INSTALL in
3885 (/*)
3886         ;;
3887 (*)
3888         cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
3889         test -z "$cf_dir" && cf_dir=.
3890         INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
3891         ;;
3892 esac
3893
3894 for ac_prog in lint cppcheck splint
3895 do
3896   # Extract the first word of "$ac_prog", so it can be a program name with args.
3897 set dummy $ac_prog; ac_word=$2
3898 echo "$as_me:3898: checking for $ac_word" >&5
3899 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3900 if test "${ac_cv_prog_LINT+set}" = set; then
3901   echo $ECHO_N "(cached) $ECHO_C" >&6
3902 else
3903   if test -n "$LINT"; then
3904   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3905 else
3906   ac_save_IFS=$IFS; IFS=$ac_path_separator
3907 ac_dummy="$PATH"
3908 for ac_dir in $ac_dummy; do
3909   IFS=$ac_save_IFS
3910   test -z "$ac_dir" && ac_dir=.
3911   $as_executable_p "$ac_dir/$ac_word" || continue
3912 ac_cv_prog_LINT="$ac_prog"
3913 echo "$as_me:3913: found $ac_dir/$ac_word" >&5
3914 break
3915 done
3916
3917 fi
3918 fi
3919 LINT=$ac_cv_prog_LINT
3920 if test -n "$LINT"; then
3921   echo "$as_me:3921: result: $LINT" >&5
3922 echo "${ECHO_T}$LINT" >&6
3923 else
3924   echo "$as_me:3924: result: no" >&5
3925 echo "${ECHO_T}no" >&6
3926 fi
3927
3928   test -n "$LINT" && break
3929 done
3930
3931 case "x$LINT" in
3932 (xcppcheck|x*/cppcheck)
3933         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3934         ;;
3935 esac
3936
3937 echo "$as_me:3937: checking whether ln -s works" >&5
3938 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3939 LN_S=$as_ln_s
3940 if test "$LN_S" = "ln -s"; then
3941   echo "$as_me:3941: result: yes" >&5
3942 echo "${ECHO_T}yes" >&6
3943 else
3944   echo "$as_me:3944: result: no, using $LN_S" >&5
3945 echo "${ECHO_T}no, using $LN_S" >&6
3946 fi
3947
3948 echo "$as_me:3948: checking if $LN_S -f options work" >&5
3949 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3950
3951 rm -f conf$$.src conf$$dst
3952 echo >conf$$.dst
3953 echo first >conf$$.src
3954 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3955         cf_prog_ln_sf=yes
3956 else
3957         cf_prog_ln_sf=no
3958 fi
3959 rm -f conf$$.dst conf$$src
3960 echo "$as_me:3960: result: $cf_prog_ln_sf" >&5
3961 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3962
3963 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3964
3965 echo "$as_me:3965: checking for long file names" >&5
3966 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3967 if test "${ac_cv_sys_long_file_names+set}" = set; then
3968   echo $ECHO_N "(cached) $ECHO_C" >&6
3969 else
3970   ac_cv_sys_long_file_names=yes
3971 # Test for long file names in all the places we know might matter:
3972 #      .                the current directory, where building will happen
3973 #      $prefix/lib      where we will be installing things
3974 #      $exec_prefix/lib likewise
3975 # eval it to expand exec_prefix.
3976 #      $TMPDIR          if set, where it might want to write temporary files
3977 # if $TMPDIR is not set:
3978 #      /tmp             where it might want to write temporary files
3979 #      /var/tmp         likewise
3980 #      /usr/tmp         likewise
3981 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3982   ac_tmpdirs=$TMPDIR
3983 else
3984   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3985 fi
3986 for ac_dir in  . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3987   test -d "$ac_dir" || continue
3988   test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3989   ac_xdir=$ac_dir/cf$$
3990   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3991   ac_tf1=$ac_xdir/conftest9012345
3992   ac_tf2=$ac_xdir/conftest9012346
3993   (echo 1 >"$ac_tf1") 2>/dev/null
3994   (echo 2 >"$ac_tf2") 2>/dev/null
3995   ac_val=`cat "$ac_tf1" 2>/dev/null`
3996   if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3997     ac_cv_sys_long_file_names=no
3998     rm -rf "$ac_xdir" 2>/dev/null
3999     break
4000   fi
4001   rm -rf "$ac_xdir" 2>/dev/null
4002 done
4003 fi
4004 echo "$as_me:4004: result: $ac_cv_sys_long_file_names" >&5
4005 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
4006 if test "$ac_cv_sys_long_file_names" = yes; then
4007
4008 cat >>confdefs.h <<\EOF
4009 #define HAVE_LONG_FILE_NAMES 1
4010 EOF
4011
4012 fi
4013
4014 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
4015 # of package conflict.
4016 cf_config_suffix=
4017
4018 # Check whether --with-config-suffix or --without-config-suffix was given.
4019 if test "${with_config_suffix+set}" = set; then
4020   withval="$with_config_suffix"
4021   case "x$withval" in
4022         (xyes|xno)
4023                 { echo "$as_me:4023: WARNING: expected a value for config-suffix option" >&5
4024 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
4025                 ;;
4026         (*)     cf_config_suffix="$withval"
4027                 ;;
4028         esac
4029 fi;
4030
4031 # If we find pkg-config, check if we should install the ".pc" files.
4032
4033 echo "$as_me:4033: checking if you want to use pkg-config" >&5
4034 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4035
4036 # Check whether --with-pkg-config or --without-pkg-config was given.
4037 if test "${with_pkg_config+set}" = set; then
4038   withval="$with_pkg_config"
4039   cf_pkg_config=$withval
4040 else
4041   cf_pkg_config=yes
4042 fi;
4043 echo "$as_me:4043: result: $cf_pkg_config" >&5
4044 echo "${ECHO_T}$cf_pkg_config" >&6
4045
4046 case "$cf_pkg_config" in
4047 (no)
4048         PKG_CONFIG=none
4049         ;;
4050 (yes)
4051
4052 if test -n "$ac_tool_prefix"; then
4053   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4054 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4055 echo "$as_me:4055: checking for $ac_word" >&5
4056 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4057 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4058   echo $ECHO_N "(cached) $ECHO_C" >&6
4059 else
4060   case $PKG_CONFIG in
4061   [\\/]* | ?:[\\/]*)
4062   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4063   ;;
4064   *)
4065   ac_save_IFS=$IFS; IFS=$ac_path_separator
4066 ac_dummy="$PATH"
4067 for ac_dir in $ac_dummy; do
4068   IFS=$ac_save_IFS
4069   test -z "$ac_dir" && ac_dir=.
4070   if $as_executable_p "$ac_dir/$ac_word"; then
4071    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4072    echo "$as_me:4072: found $ac_dir/$ac_word" >&5
4073    break
4074 fi
4075 done
4076
4077   ;;
4078 esac
4079 fi
4080 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4081
4082 if test -n "$PKG_CONFIG"; then
4083   echo "$as_me:4083: result: $PKG_CONFIG" >&5
4084 echo "${ECHO_T}$PKG_CONFIG" >&6
4085 else
4086   echo "$as_me:4086: result: no" >&5
4087 echo "${ECHO_T}no" >&6
4088 fi
4089
4090 fi
4091 if test -z "$ac_cv_path_PKG_CONFIG"; then
4092   ac_pt_PKG_CONFIG=$PKG_CONFIG
4093   # Extract the first word of "pkg-config", so it can be a program name with args.
4094 set dummy pkg-config; ac_word=$2
4095 echo "$as_me:4095: checking for $ac_word" >&5
4096 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4097 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4098   echo $ECHO_N "(cached) $ECHO_C" >&6
4099 else
4100   case $ac_pt_PKG_CONFIG in
4101   [\\/]* | ?:[\\/]*)
4102   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4103   ;;
4104   *)
4105   ac_save_IFS=$IFS; IFS=$ac_path_separator
4106 ac_dummy="$PATH"
4107 for ac_dir in $ac_dummy; do
4108   IFS=$ac_save_IFS
4109   test -z "$ac_dir" && ac_dir=.
4110   if $as_executable_p "$ac_dir/$ac_word"; then
4111    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4112    echo "$as_me:4112: found $ac_dir/$ac_word" >&5
4113    break
4114 fi
4115 done
4116
4117   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4118   ;;
4119 esac
4120 fi
4121 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4122
4123 if test -n "$ac_pt_PKG_CONFIG"; then
4124   echo "$as_me:4124: result: $ac_pt_PKG_CONFIG" >&5
4125 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4126 else
4127   echo "$as_me:4127: result: no" >&5
4128 echo "${ECHO_T}no" >&6
4129 fi
4130
4131   PKG_CONFIG=$ac_pt_PKG_CONFIG
4132 else
4133   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4134 fi
4135
4136         ;;
4137 (*)
4138         PKG_CONFIG=$withval
4139         ;;
4140 esac
4141
4142 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4143 if test "$PKG_CONFIG" != none ; then
4144
4145 if test "x$prefix" != xNONE; then
4146         cf_path_syntax="$prefix"
4147 else
4148         cf_path_syntax="$ac_default_prefix"
4149 fi
4150
4151 case ".$PKG_CONFIG" in
4152 (.\$\(*\)*|.\'*\'*)
4153         ;;
4154 (..|./*|.\\*)
4155         ;;
4156 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4157         ;;
4158 (.\$\{*prefix\}*|.\$\{*dir\}*)
4159         eval PKG_CONFIG="$PKG_CONFIG"
4160         case ".$PKG_CONFIG" in
4161         (.NONE/*)
4162                 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4163                 ;;
4164         esac
4165         ;;
4166 (.no|.NONE/*)
4167         PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4168         ;;
4169 (*)
4170         { { echo "$as_me:4170: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4171 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4172    { (exit 1); exit 1; }; }
4173         ;;
4174 esac
4175
4176 elif test "x$cf_pkg_config" != xno ; then
4177         { echo "$as_me:4177: WARNING: pkg-config is not installed" >&5
4178 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4179 fi
4180
4181 case "$PKG_CONFIG" in
4182 (no|none|yes)
4183         echo "$as_me:4183: checking for pkg-config library directory" >&5
4184 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4185         ;;
4186 (*)
4187         echo "$as_me:4187: checking for $PKG_CONFIG library directory" >&5
4188 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
4189         ;;
4190 esac
4191
4192 # if $PKG_CONFIG_LIBDIR is set, try to use that
4193 cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[   ]*,,'`
4194
4195 # if the option is used, let that override.  otherwise default to "libdir"
4196
4197 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4198 if test "${with_pkg_config_libdir+set}" = set; then
4199   withval="$with_pkg_config_libdir"
4200   cf_search_path=$withval
4201 else
4202   test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir
4203 fi;
4204
4205 case "x$cf_search_path" in
4206 (xlibdir)
4207         PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
4208         echo "$as_me:4208: result: $PKG_CONFIG_LIBDIR" >&5
4209 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4210         cf_search_path=
4211         ;;
4212 (x)
4213         ;;
4214 (x/*\ *)
4215         PKG_CONFIG_LIBDIR=
4216         ;;
4217 (x/*)
4218         PKG_CONFIG_LIBDIR="$cf_search_path"
4219         echo "$as_me:4219: result: $PKG_CONFIG_LIBDIR" >&5
4220 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4221         cf_search_path=
4222         ;;
4223 (xyes|xauto)
4224         echo "$as_me:4224: result: auto" >&5
4225 echo "${ECHO_T}auto" >&6
4226         cf_search_path=
4227         # Look for the library directory using the same prefix as the executable
4228         echo "$as_me:4228: checking for search-list" >&5
4229 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
4230         if test "x$PKG_CONFIG" != xnone
4231         then
4232                 # works for pkg-config since version 0.24 (2009)
4233                 # works for pkgconf since version 0.8.3 (2012)
4234                 for cf_pkg_program in \
4235                         `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
4236                         pkg-config \
4237                         pkgconf
4238                 do
4239                         cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
4240                         test -n "$cf_search_path" && break
4241                 done
4242
4243                 # works for pkg-config since import in 2005 of original 2001 HP code.
4244                 test -z "$cf_search_path" && \
4245                 cf_search_path=`
4246                 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
4247 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
4248         sub(\"^[^']*'\",\"\"); \
4249         sub(\"'.*\",\"\"); \
4250         printf \" %s\", \\$0; } \
4251 { next; } \
4252 "`
4253         fi
4254
4255         echo "$as_me:4255: result: $cf_search_path" >&5
4256 echo "${ECHO_T}$cf_search_path" >&6
4257         ;;
4258 (*)
4259         { { echo "$as_me:4259: error: Unexpected option value: $cf_search_path" >&5
4260 echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
4261    { (exit 1); exit 1; }; }
4262         ;;
4263 esac
4264
4265 if test -n "$cf_search_path"
4266 then
4267         echo "$as_me:4267: checking for first directory" >&5
4268 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
4269         cf_pkg_config_path=none
4270         for cf_config in $cf_search_path
4271         do
4272                 if test -d "$cf_config"
4273                 then
4274                         cf_pkg_config_path=$cf_config
4275                         break
4276                 fi
4277         done
4278         echo "$as_me:4278: result: $cf_pkg_config_path" >&5
4279 echo "${ECHO_T}$cf_pkg_config_path" >&6
4280
4281         if test "x$cf_pkg_config_path" != xnone ; then
4282                 # limit this to the first directory found
4283                 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
4284         fi
4285
4286         if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
4287         then
4288                 echo "$as_me:4288: checking for workaround" >&5
4289 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
4290                 if test "$prefix" = "NONE" ; then
4291                         cf_prefix="$ac_default_prefix"
4292                 else
4293                         cf_prefix="$prefix"
4294                 fi
4295                 eval cf_libdir=$libdir
4296                 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
4297                 cf_backup=
4298                 for cf_config in $cf_search_path
4299                 do
4300                         case $cf_config in
4301                         $cf_libdir/pkgconfig)
4302                                 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
4303                                 break
4304                                 ;;
4305                         *)
4306                                 test -z "$cf_backup" && cf_backup=$cf_config
4307                                 ;;
4308                         esac
4309                 done
4310                 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
4311                 echo "$as_me:4311: result: $PKG_CONFIG_LIBDIR" >&5
4312 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4313         fi
4314 fi
4315
4316 if test "x$PKG_CONFIG" != xnone
4317 then
4318         echo "$as_me:4318: checking if we should install .pc files for $PKG_CONFIG" >&5
4319 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4320 else
4321         echo "$as_me:4321: checking if we should install .pc files" >&5
4322 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4323 fi
4324
4325 # Check whether --enable-pc-files or --disable-pc-files was given.
4326 if test "${enable_pc_files+set}" = set; then
4327   enableval="$enable_pc_files"
4328   enable_pc_files=$enableval
4329 else
4330   enable_pc_files=no
4331 fi;
4332 echo "$as_me:4332: result: $enable_pc_files" >&5
4333 echo "${ECHO_T}$enable_pc_files" >&6
4334
4335 if test "x$enable_pc_files" != xno
4336 then
4337         MAKE_PC_FILES=
4338         case "x$PKG_CONFIG_LIBDIR" in
4339         (xno|xnone|xyes|x)
4340                 { echo "$as_me:4340: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4341 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4342                 ;;
4343         (*)
4344                 cf_pkg_config_libdir="$PKG_CONFIG_LIBDIR"
4345
4346 if test "x$prefix" != xNONE; then
4347         cf_path_syntax="$prefix"
4348 else
4349         cf_path_syntax="$ac_default_prefix"
4350 fi
4351
4352 case ".$cf_pkg_config_libdir" in
4353 (.\$\(*\)*|.\'*\'*)
4354         ;;
4355 (..|./*|.\\*)
4356         ;;
4357 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4358         ;;
4359 (.\$\{*prefix\}*|.\$\{*dir\}*)
4360         eval cf_pkg_config_libdir="$cf_pkg_config_libdir"
4361         case ".$cf_pkg_config_libdir" in
4362         (.NONE/*)
4363                 cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4364                 ;;
4365         esac
4366         ;;
4367 (.no|.NONE/*)
4368         cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4369         ;;
4370 (*)
4371         { { echo "$as_me:4371: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&5
4372 echo "$as_me: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&2;}
4373    { (exit 1); exit 1; }; }
4374         ;;
4375 esac
4376
4377                 ;;
4378         esac
4379 else
4380         MAKE_PC_FILES="#"
4381 fi
4382
4383 if test -z "$MAKE_PC_FILES"
4384 then
4385         echo "$as_me:4385: checking for suffix to add to pc-files" >&5
4386 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4387
4388 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4389 if test "${with_pc_suffix+set}" = set; then
4390   withval="$with_pc_suffix"
4391   case "x$withval" in
4392         (xyes|xno)
4393                 PC_MODULE_SUFFIX=
4394                 ;;
4395         (*)     PC_MODULE_SUFFIX="$withval"
4396                 ;;
4397         esac
4398 fi;
4399         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4400         echo "$as_me:4400: result: $PC_MODULE_SUFFIX" >&5
4401 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4402         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4403
4404 fi
4405
4406 echo "$as_me:4406: checking if we should assume mixed-case filenames" >&5
4407 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4408
4409 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4410 if test "${enable_mixed_case+set}" = set; then
4411   enableval="$enable_mixed_case"
4412   enable_mixedcase=$enableval
4413 else
4414   enable_mixedcase=auto
4415 fi;
4416 echo "$as_me:4416: result: $enable_mixedcase" >&5
4417 echo "${ECHO_T}$enable_mixedcase" >&6
4418 if test "$enable_mixedcase" = "auto" ; then
4419
4420 echo "$as_me:4420: checking if filesystem supports mixed-case filenames" >&5
4421 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4422 if test "${cf_cv_mixedcase+set}" = set; then
4423   echo $ECHO_N "(cached) $ECHO_C" >&6
4424 else
4425
4426 if test "$cross_compiling" = yes ; then
4427         case "$target_alias" in
4428         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4429                 cf_cv_mixedcase=no
4430                 ;;
4431         (*)
4432                 cf_cv_mixedcase=yes
4433                 ;;
4434         esac
4435 else
4436         rm -f conftest CONFTEST
4437         echo test >conftest
4438         if test -f CONFTEST ; then
4439                 cf_cv_mixedcase=no
4440         else
4441                 cf_cv_mixedcase=yes
4442         fi
4443         rm -f conftest CONFTEST
4444 fi
4445
4446 fi
4447 echo "$as_me:4447: result: $cf_cv_mixedcase" >&5
4448 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4449 test "$cf_cv_mixedcase" = yes &&
4450 cat >>confdefs.h <<\EOF
4451 #define MIXEDCASE_FILENAMES 1
4452 EOF
4453
4454 else
4455         cf_cv_mixedcase=$enable_mixedcase
4456         if test "x$enable_mixedcase" = "xyes" ; then
4457
4458 cat >>confdefs.h <<\EOF
4459 #define MIXEDCASE_FILENAMES 1
4460 EOF
4461
4462         fi
4463 fi
4464
4465 # do this after mixed-case option (tags/TAGS is not as important as tic).
4466 echo "$as_me:4466: checking whether ${MAKE-make} sets \${MAKE}" >&5
4467 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4468 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4469 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4470   echo $ECHO_N "(cached) $ECHO_C" >&6
4471 else
4472   cat >conftest.make <<\EOF
4473 all:
4474         @echo 'ac_maketemp="${MAKE}"'
4475 EOF
4476 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4477 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4478 if test -n "$ac_maketemp"; then
4479   eval ac_cv_prog_make_${ac_make}_set=yes
4480 else
4481   eval ac_cv_prog_make_${ac_make}_set=no
4482 fi
4483 rm -f conftest.make
4484 fi
4485 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4486   echo "$as_me:4486: result: yes" >&5
4487 echo "${ECHO_T}yes" >&6
4488   SET_MAKE=
4489 else
4490   echo "$as_me:4490: result: no" >&5
4491 echo "${ECHO_T}no" >&6
4492   SET_MAKE="MAKE=${MAKE-make}"
4493 fi
4494
4495 echo "$as_me:4495: checking for \".PHONY\" make-support" >&5
4496 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
4497 if test "${cf_cv_make_PHONY+set}" = set; then
4498   echo $ECHO_N "(cached) $ECHO_C" >&6
4499 else
4500
4501         rm -rf conftest*
4502         (
4503                 mkdir conftest || exit 1
4504                 cd conftest
4505                 cat >makefile <<'CF_EOF'
4506 .PHONY: always
4507 DATA=0
4508 always: always.out
4509         @echo "** making $@ $(DATA)"
4510 once: once.out
4511         @echo "** making $@ $(DATA)"
4512 always.out:
4513         @echo "** making $@ $(DATA)"
4514         echo $(DATA) > $@
4515 once.out:
4516         @echo "** making $@ $(DATA)"
4517         echo $(DATA) > $@
4518 CF_EOF
4519                 for cf_data in 1 2 3
4520                 do
4521                         ${MAKE:-make} always DATA=$cf_data
4522                         ${MAKE:-make} once   DATA=$cf_data
4523                         ${MAKE:-make} -t always once
4524                         if test -f always ; then
4525                                 echo "no (case 1)" > ../conftest.tmp
4526                         elif test ! -f always.out ; then
4527                                 echo "no (case 2)" > ../conftest.tmp
4528                         elif test ! -f once.out ; then
4529                                 echo "no (case 3)" > ../conftest.tmp
4530                         elif ! cmp -s always.out once.out ; then
4531                                 echo "no (case 4)" > ../conftest.tmp
4532                                 diff always.out once.out
4533                         else
4534                                 cf_check="`cat always.out`"
4535                                 if test "x$cf_check" != "x$cf_data" ; then
4536                                         echo "no (case 5)" > ../conftest.tmp
4537                                 else
4538                                         echo yes > ../conftest.tmp
4539                                         rm -f ./*.out
4540                                         continue
4541                                 fi
4542                         fi
4543                         break
4544                 done
4545         ) >&5 2>&1
4546         cf_cv_make_PHONY="`cat conftest.tmp`"
4547         rm -rf conftest*
4548
4549 fi
4550 echo "$as_me:4550: result: $cf_cv_make_PHONY" >&5
4551 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
4552 MAKE_NO_PHONY="#"
4553 MAKE_PHONY="#"
4554 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
4555 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
4556
4557 for ac_prog in exctags ctags
4558 do
4559   # Extract the first word of "$ac_prog", so it can be a program name with args.
4560 set dummy $ac_prog; ac_word=$2
4561 echo "$as_me:4561: checking for $ac_word" >&5
4562 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4563 if test "${ac_cv_prog_CTAGS+set}" = set; then
4564   echo $ECHO_N "(cached) $ECHO_C" >&6
4565 else
4566   if test -n "$CTAGS"; then
4567   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4568 else
4569   ac_save_IFS=$IFS; IFS=$ac_path_separator
4570 ac_dummy="$PATH"
4571 for ac_dir in $ac_dummy; do
4572   IFS=$ac_save_IFS
4573   test -z "$ac_dir" && ac_dir=.
4574   $as_executable_p "$ac_dir/$ac_word" || continue
4575 ac_cv_prog_CTAGS="$ac_prog"
4576 echo "$as_me:4576: found $ac_dir/$ac_word" >&5
4577 break
4578 done
4579
4580 fi
4581 fi
4582 CTAGS=$ac_cv_prog_CTAGS
4583 if test -n "$CTAGS"; then
4584   echo "$as_me:4584: result: $CTAGS" >&5
4585 echo "${ECHO_T}$CTAGS" >&6
4586 else
4587   echo "$as_me:4587: result: no" >&5
4588 echo "${ECHO_T}no" >&6
4589 fi
4590
4591   test -n "$CTAGS" && break
4592 done
4593
4594 for ac_prog in exetags etags
4595 do
4596   # Extract the first word of "$ac_prog", so it can be a program name with args.
4597 set dummy $ac_prog; ac_word=$2
4598 echo "$as_me:4598: checking for $ac_word" >&5
4599 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4600 if test "${ac_cv_prog_ETAGS+set}" = set; then
4601   echo $ECHO_N "(cached) $ECHO_C" >&6
4602 else
4603   if test -n "$ETAGS"; then
4604   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4605 else
4606   ac_save_IFS=$IFS; IFS=$ac_path_separator
4607 ac_dummy="$PATH"
4608 for ac_dir in $ac_dummy; do
4609   IFS=$ac_save_IFS
4610   test -z "$ac_dir" && ac_dir=.
4611   $as_executable_p "$ac_dir/$ac_word" || continue
4612 ac_cv_prog_ETAGS="$ac_prog"
4613 echo "$as_me:4613: found $ac_dir/$ac_word" >&5
4614 break
4615 done
4616
4617 fi
4618 fi
4619 ETAGS=$ac_cv_prog_ETAGS
4620 if test -n "$ETAGS"; then
4621   echo "$as_me:4621: result: $ETAGS" >&5
4622 echo "${ECHO_T}$ETAGS" >&6
4623 else
4624   echo "$as_me:4624: result: no" >&5
4625 echo "${ECHO_T}no" >&6
4626 fi
4627
4628   test -n "$ETAGS" && break
4629 done
4630
4631 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4632 set dummy ${CTAGS:-ctags}; ac_word=$2
4633 echo "$as_me:4633: checking for $ac_word" >&5
4634 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4635 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4636   echo $ECHO_N "(cached) $ECHO_C" >&6
4637 else
4638   if test -n "$MAKE_LOWER_TAGS"; then
4639   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4640 else
4641   ac_save_IFS=$IFS; IFS=$ac_path_separator
4642 ac_dummy="$PATH"
4643 for ac_dir in $ac_dummy; do
4644   IFS=$ac_save_IFS
4645   test -z "$ac_dir" && ac_dir=.
4646   $as_executable_p "$ac_dir/$ac_word" || continue
4647 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4648 echo "$as_me:4648: found $ac_dir/$ac_word" >&5
4649 break
4650 done
4651
4652   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4653 fi
4654 fi
4655 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4656 if test -n "$MAKE_LOWER_TAGS"; then
4657   echo "$as_me:4657: result: $MAKE_LOWER_TAGS" >&5
4658 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4659 else
4660   echo "$as_me:4660: result: no" >&5
4661 echo "${ECHO_T}no" >&6
4662 fi
4663
4664 if test "$cf_cv_mixedcase" = yes ; then
4665         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4666 set dummy ${ETAGS:-etags}; ac_word=$2
4667 echo "$as_me:4667: checking for $ac_word" >&5
4668 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4669 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4670   echo $ECHO_N "(cached) $ECHO_C" >&6
4671 else
4672   if test -n "$MAKE_UPPER_TAGS"; then
4673   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4674 else
4675   ac_save_IFS=$IFS; IFS=$ac_path_separator
4676 ac_dummy="$PATH"
4677 for ac_dir in $ac_dummy; do
4678   IFS=$ac_save_IFS
4679   test -z "$ac_dir" && ac_dir=.
4680   $as_executable_p "$ac_dir/$ac_word" || continue
4681 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4682 echo "$as_me:4682: found $ac_dir/$ac_word" >&5
4683 break
4684 done
4685
4686   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4687 fi
4688 fi
4689 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4690 if test -n "$MAKE_UPPER_TAGS"; then
4691   echo "$as_me:4691: result: $MAKE_UPPER_TAGS" >&5
4692 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4693 else
4694   echo "$as_me:4694: result: no" >&5
4695 echo "${ECHO_T}no" >&6
4696 fi
4697
4698 else
4699         MAKE_UPPER_TAGS=no
4700 fi
4701
4702 if test "$MAKE_UPPER_TAGS" = yes ; then
4703         MAKE_UPPER_TAGS=
4704 else
4705         MAKE_UPPER_TAGS="#"
4706 fi
4707
4708 if test "$MAKE_LOWER_TAGS" = yes ; then
4709         MAKE_LOWER_TAGS=
4710 else
4711         MAKE_LOWER_TAGS="#"
4712 fi
4713
4714 echo "$as_me:4714: checking for makeflags variable" >&5
4715 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4716 if test "${cf_cv_makeflags+set}" = set; then
4717   echo $ECHO_N "(cached) $ECHO_C" >&6
4718 else
4719
4720         cf_cv_makeflags=''
4721         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4722         do
4723                 cat >cf_makeflags.tmp <<CF_EOF
4724 SHELL = $SHELL
4725 all :
4726         @ echo '.$cf_option'
4727 CF_EOF
4728                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4729                 case "$cf_result" in
4730                 (.*k|.*kw)
4731                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4732                         case "$cf_result" in
4733                         (.*CC=*)        cf_cv_makeflags=
4734                                 ;;
4735                         (*)     cf_cv_makeflags=$cf_option
4736                                 ;;
4737                         esac
4738                         break
4739                         ;;
4740                 (.-)
4741                         ;;
4742                 (*)
4743
4744 echo "${as_me:-configure}:4744: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4745
4746                         ;;
4747                 esac
4748         done
4749         rm -f cf_makeflags.tmp
4750
4751 fi
4752 echo "$as_me:4752: result: $cf_cv_makeflags" >&5
4753 echo "${ECHO_T}$cf_cv_makeflags" >&6
4754
4755 if test -n "$ac_tool_prefix"; then
4756   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4757 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4758 echo "$as_me:4758: checking for $ac_word" >&5
4759 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4760 if test "${ac_cv_prog_RANLIB+set}" = set; then
4761   echo $ECHO_N "(cached) $ECHO_C" >&6
4762 else
4763   if test -n "$RANLIB"; then
4764   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4765 else
4766   ac_save_IFS=$IFS; IFS=$ac_path_separator
4767 ac_dummy="$PATH"
4768 for ac_dir in $ac_dummy; do
4769   IFS=$ac_save_IFS
4770   test -z "$ac_dir" && ac_dir=.
4771   $as_executable_p "$ac_dir/$ac_word" || continue
4772 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4773 echo "$as_me:4773: found $ac_dir/$ac_word" >&5
4774 break
4775 done
4776
4777 fi
4778 fi
4779 RANLIB=$ac_cv_prog_RANLIB
4780 if test -n "$RANLIB"; then
4781   echo "$as_me:4781: result: $RANLIB" >&5
4782 echo "${ECHO_T}$RANLIB" >&6
4783 else
4784   echo "$as_me:4784: result: no" >&5
4785 echo "${ECHO_T}no" >&6
4786 fi
4787
4788 fi
4789 if test -z "$ac_cv_prog_RANLIB"; then
4790   ac_ct_RANLIB=$RANLIB
4791   # Extract the first word of "ranlib", so it can be a program name with args.
4792 set dummy ranlib; ac_word=$2
4793 echo "$as_me:4793: checking for $ac_word" >&5
4794 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4795 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4796   echo $ECHO_N "(cached) $ECHO_C" >&6
4797 else
4798   if test -n "$ac_ct_RANLIB"; then
4799   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4800 else
4801   ac_save_IFS=$IFS; IFS=$ac_path_separator
4802 ac_dummy="$PATH"
4803 for ac_dir in $ac_dummy; do
4804   IFS=$ac_save_IFS
4805   test -z "$ac_dir" && ac_dir=.
4806   $as_executable_p "$ac_dir/$ac_word" || continue
4807 ac_cv_prog_ac_ct_RANLIB="ranlib"
4808 echo "$as_me:4808: found $ac_dir/$ac_word" >&5
4809 break
4810 done
4811
4812   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4813 fi
4814 fi
4815 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4816 if test -n "$ac_ct_RANLIB"; then
4817   echo "$as_me:4817: result: $ac_ct_RANLIB" >&5
4818 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4819 else
4820   echo "$as_me:4820: result: no" >&5
4821 echo "${ECHO_T}no" >&6
4822 fi
4823
4824   RANLIB=$ac_ct_RANLIB
4825 else
4826   RANLIB="$ac_cv_prog_RANLIB"
4827 fi
4828
4829 if test -n "$ac_tool_prefix"; then
4830   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4831 set dummy ${ac_tool_prefix}ld; ac_word=$2
4832 echo "$as_me:4832: checking for $ac_word" >&5
4833 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4834 if test "${ac_cv_prog_LD+set}" = set; then
4835   echo $ECHO_N "(cached) $ECHO_C" >&6
4836 else
4837   if test -n "$LD"; then
4838   ac_cv_prog_LD="$LD" # Let the user override the test.
4839 else
4840   ac_save_IFS=$IFS; IFS=$ac_path_separator
4841 ac_dummy="$PATH"
4842 for ac_dir in $ac_dummy; do
4843   IFS=$ac_save_IFS
4844   test -z "$ac_dir" && ac_dir=.
4845   $as_executable_p "$ac_dir/$ac_word" || continue
4846 ac_cv_prog_LD="${ac_tool_prefix}ld"
4847 echo "$as_me:4847: found $ac_dir/$ac_word" >&5
4848 break
4849 done
4850
4851 fi
4852 fi
4853 LD=$ac_cv_prog_LD
4854 if test -n "$LD"; then
4855   echo "$as_me:4855: result: $LD" >&5
4856 echo "${ECHO_T}$LD" >&6
4857 else
4858   echo "$as_me:4858: result: no" >&5
4859 echo "${ECHO_T}no" >&6
4860 fi
4861
4862 fi
4863 if test -z "$ac_cv_prog_LD"; then
4864   ac_ct_LD=$LD
4865   # Extract the first word of "ld", so it can be a program name with args.
4866 set dummy ld; ac_word=$2
4867 echo "$as_me:4867: checking for $ac_word" >&5
4868 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4869 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4870   echo $ECHO_N "(cached) $ECHO_C" >&6
4871 else
4872   if test -n "$ac_ct_LD"; then
4873   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4874 else
4875   ac_save_IFS=$IFS; IFS=$ac_path_separator
4876 ac_dummy="$PATH"
4877 for ac_dir in $ac_dummy; do
4878   IFS=$ac_save_IFS
4879   test -z "$ac_dir" && ac_dir=.
4880   $as_executable_p "$ac_dir/$ac_word" || continue
4881 ac_cv_prog_ac_ct_LD="ld"
4882 echo "$as_me:4882: found $ac_dir/$ac_word" >&5
4883 break
4884 done
4885
4886   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4887 fi
4888 fi
4889 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4890 if test -n "$ac_ct_LD"; then
4891   echo "$as_me:4891: result: $ac_ct_LD" >&5
4892 echo "${ECHO_T}$ac_ct_LD" >&6
4893 else
4894   echo "$as_me:4894: result: no" >&5
4895 echo "${ECHO_T}no" >&6
4896 fi
4897
4898   LD=$ac_ct_LD
4899 else
4900   LD="$ac_cv_prog_LD"
4901 fi
4902
4903 if test -n "$ac_tool_prefix"; then
4904   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4905 set dummy ${ac_tool_prefix}ar; ac_word=$2
4906 echo "$as_me:4906: checking for $ac_word" >&5
4907 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4908 if test "${ac_cv_prog_AR+set}" = set; then
4909   echo $ECHO_N "(cached) $ECHO_C" >&6
4910 else
4911   if test -n "$AR"; then
4912   ac_cv_prog_AR="$AR" # Let the user override the test.
4913 else
4914   ac_save_IFS=$IFS; IFS=$ac_path_separator
4915 ac_dummy="$PATH"
4916 for ac_dir in $ac_dummy; do
4917   IFS=$ac_save_IFS
4918   test -z "$ac_dir" && ac_dir=.
4919   $as_executable_p "$ac_dir/$ac_word" || continue
4920 ac_cv_prog_AR="${ac_tool_prefix}ar"
4921 echo "$as_me:4921: found $ac_dir/$ac_word" >&5
4922 break
4923 done
4924
4925 fi
4926 fi
4927 AR=$ac_cv_prog_AR
4928 if test -n "$AR"; then
4929   echo "$as_me:4929: result: $AR" >&5
4930 echo "${ECHO_T}$AR" >&6
4931 else
4932   echo "$as_me:4932: result: no" >&5
4933 echo "${ECHO_T}no" >&6
4934 fi
4935
4936 fi
4937 if test -z "$ac_cv_prog_AR"; then
4938   ac_ct_AR=$AR
4939   # Extract the first word of "ar", so it can be a program name with args.
4940 set dummy ar; ac_word=$2
4941 echo "$as_me:4941: checking for $ac_word" >&5
4942 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4943 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4944   echo $ECHO_N "(cached) $ECHO_C" >&6
4945 else
4946   if test -n "$ac_ct_AR"; then
4947   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4948 else
4949   ac_save_IFS=$IFS; IFS=$ac_path_separator
4950 ac_dummy="$PATH"
4951 for ac_dir in $ac_dummy; do
4952   IFS=$ac_save_IFS
4953   test -z "$ac_dir" && ac_dir=.
4954   $as_executable_p "$ac_dir/$ac_word" || continue
4955 ac_cv_prog_ac_ct_AR="ar"
4956 echo "$as_me:4956: found $ac_dir/$ac_word" >&5
4957 break
4958 done
4959
4960   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4961 fi
4962 fi
4963 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4964 if test -n "$ac_ct_AR"; then
4965   echo "$as_me:4965: result: $ac_ct_AR" >&5
4966 echo "${ECHO_T}$ac_ct_AR" >&6
4967 else
4968   echo "$as_me:4968: result: no" >&5
4969 echo "${ECHO_T}no" >&6
4970 fi
4971
4972   AR=$ac_ct_AR
4973 else
4974   AR="$ac_cv_prog_AR"
4975 fi
4976
4977 if test -n "$ac_tool_prefix"; then
4978   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4979 set dummy ${ac_tool_prefix}nm; ac_word=$2
4980 echo "$as_me:4980: checking for $ac_word" >&5
4981 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4982 if test "${ac_cv_prog_NM+set}" = set; then
4983   echo $ECHO_N "(cached) $ECHO_C" >&6
4984 else
4985   if test -n "$NM"; then
4986   ac_cv_prog_NM="$NM" # Let the user override the test.
4987 else
4988   ac_save_IFS=$IFS; IFS=$ac_path_separator
4989 ac_dummy="$PATH"
4990 for ac_dir in $ac_dummy; do
4991   IFS=$ac_save_IFS
4992   test -z "$ac_dir" && ac_dir=.
4993   $as_executable_p "$ac_dir/$ac_word" || continue
4994 ac_cv_prog_NM="${ac_tool_prefix}nm"
4995 echo "$as_me:4995: found $ac_dir/$ac_word" >&5
4996 break
4997 done
4998
4999 fi
5000 fi
5001 NM=$ac_cv_prog_NM
5002 if test -n "$NM"; then
5003   echo "$as_me:5003: result: $NM" >&5
5004 echo "${ECHO_T}$NM" >&6
5005 else
5006   echo "$as_me:5006: result: no" >&5
5007 echo "${ECHO_T}no" >&6
5008 fi
5009
5010 fi
5011 if test -z "$ac_cv_prog_NM"; then
5012   ac_ct_NM=$NM
5013   # Extract the first word of "nm", so it can be a program name with args.
5014 set dummy nm; ac_word=$2
5015 echo "$as_me:5015: checking for $ac_word" >&5
5016 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5017 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
5018   echo $ECHO_N "(cached) $ECHO_C" >&6
5019 else
5020   if test -n "$ac_ct_NM"; then
5021   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
5022 else
5023   ac_save_IFS=$IFS; IFS=$ac_path_separator
5024 ac_dummy="$PATH"
5025 for ac_dir in $ac_dummy; do
5026   IFS=$ac_save_IFS
5027   test -z "$ac_dir" && ac_dir=.
5028   $as_executable_p "$ac_dir/$ac_word" || continue
5029 ac_cv_prog_ac_ct_NM="nm"
5030 echo "$as_me:5030: found $ac_dir/$ac_word" >&5
5031 break
5032 done
5033
5034   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
5035 fi
5036 fi
5037 ac_ct_NM=$ac_cv_prog_ac_ct_NM
5038 if test -n "$ac_ct_NM"; then
5039   echo "$as_me:5039: result: $ac_ct_NM" >&5
5040 echo "${ECHO_T}$ac_ct_NM" >&6
5041 else
5042   echo "$as_me:5042: result: no" >&5
5043 echo "${ECHO_T}no" >&6
5044 fi
5045
5046   NM=$ac_ct_NM
5047 else
5048   NM="$ac_cv_prog_NM"
5049 fi
5050
5051 if test -n "$ac_tool_prefix"; then
5052   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5053 set dummy ${ac_tool_prefix}ar; ac_word=$2
5054 echo "$as_me:5054: checking for $ac_word" >&5
5055 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5056 if test "${ac_cv_prog_AR+set}" = set; then
5057   echo $ECHO_N "(cached) $ECHO_C" >&6
5058 else
5059   if test -n "$AR"; then
5060   ac_cv_prog_AR="$AR" # Let the user override the test.
5061 else
5062   ac_save_IFS=$IFS; IFS=$ac_path_separator
5063 ac_dummy="$PATH"
5064 for ac_dir in $ac_dummy; do
5065   IFS=$ac_save_IFS
5066   test -z "$ac_dir" && ac_dir=.
5067   $as_executable_p "$ac_dir/$ac_word" || continue
5068 ac_cv_prog_AR="${ac_tool_prefix}ar"
5069 echo "$as_me:5069: found $ac_dir/$ac_word" >&5
5070 break
5071 done
5072
5073 fi
5074 fi
5075 AR=$ac_cv_prog_AR
5076 if test -n "$AR"; then
5077   echo "$as_me:5077: result: $AR" >&5
5078 echo "${ECHO_T}$AR" >&6
5079 else
5080   echo "$as_me:5080: result: no" >&5
5081 echo "${ECHO_T}no" >&6
5082 fi
5083
5084 fi
5085 if test -z "$ac_cv_prog_AR"; then
5086   ac_ct_AR=$AR
5087   # Extract the first word of "ar", so it can be a program name with args.
5088 set dummy ar; ac_word=$2
5089 echo "$as_me:5089: checking for $ac_word" >&5
5090 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5091 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
5092   echo $ECHO_N "(cached) $ECHO_C" >&6
5093 else
5094   if test -n "$ac_ct_AR"; then
5095   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5096 else
5097   ac_save_IFS=$IFS; IFS=$ac_path_separator
5098 ac_dummy="$PATH"
5099 for ac_dir in $ac_dummy; do
5100   IFS=$ac_save_IFS
5101   test -z "$ac_dir" && ac_dir=.
5102   $as_executable_p "$ac_dir/$ac_word" || continue
5103 ac_cv_prog_ac_ct_AR="ar"
5104 echo "$as_me:5104: found $ac_dir/$ac_word" >&5
5105 break
5106 done
5107
5108   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5109 fi
5110 fi
5111 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5112 if test -n "$ac_ct_AR"; then
5113   echo "$as_me:5113: result: $ac_ct_AR" >&5
5114 echo "${ECHO_T}$ac_ct_AR" >&6
5115 else
5116   echo "$as_me:5116: result: no" >&5
5117 echo "${ECHO_T}no" >&6
5118 fi
5119
5120   AR=$ac_ct_AR
5121 else
5122   AR="$ac_cv_prog_AR"
5123 fi
5124
5125 echo "$as_me:5125: checking for options to update archives" >&5
5126 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
5127 if test "${cf_cv_ar_flags+set}" = set; then
5128   echo $ECHO_N "(cached) $ECHO_C" >&6
5129 else
5130
5131         case "$cf_cv_system_name" in
5132         (*-msvc*)
5133                 cf_cv_ar_flags=''
5134                 cat >mk_static_lib.sh <<-EOF
5135                 #!$SHELL
5136                 MSVC_BIN="$AR"
5137                 out="\$1"
5138                 shift
5139                 exec \$MSVC_BIN -out:"\$out" \$@
5140                 EOF
5141                 chmod +x mk_static_lib.sh
5142                 AR=`pwd`/mk_static_lib.sh
5143                 ;;
5144         (*)
5145                 cf_cv_ar_flags=unknown
5146                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
5147                 do
5148
5149                         # check if $ARFLAGS already contains this choice
5150                         if test "x$ARFLAGS" != "x" ; then
5151                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
5152                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
5153                                         cf_cv_ar_flags=
5154                                         break
5155                                 fi
5156                         fi
5157
5158                         rm -f "conftest.$ac_cv_objext"
5159                         rm -f conftest.a
5160
5161                         cat >"conftest.$ac_ext" <<EOF
5162 #line 5162 "configure"
5163 int     testdata[3] = { 123, 456, 789 };
5164 EOF
5165                         if { (eval echo "$as_me:5165: \"$ac_compile\"") >&5
5166   (eval $ac_compile) 2>&5
5167   ac_status=$?
5168   echo "$as_me:5168: \$? = $ac_status" >&5
5169   (exit "$ac_status"); } ; then
5170                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5171                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5172                                 if test -f conftest.a ; then
5173                                         cf_cv_ar_flags="$cf_ar_flags"
5174                                         break
5175                                 fi
5176                         else
5177                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5178
5179 echo "${as_me:-configure}:5179: testing cannot compile test-program ..." 1>&5
5180
5181                                 break
5182                         fi
5183                 done
5184                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5185                 ;;
5186         esac
5187
5188 fi
5189 echo "$as_me:5189: result: $cf_cv_ar_flags" >&5
5190 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5191
5192 if test -n "$ARFLAGS" ; then
5193         if test -n "$cf_cv_ar_flags" ; then
5194                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5195         fi
5196 else
5197         ARFLAGS=$cf_cv_ar_flags
5198 fi
5199
5200 echo "$as_me:5200: checking if you have specified an install-prefix" >&5
5201 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
5202
5203 # Check whether --with-install-prefix or --without-install-prefix was given.
5204 if test "${with_install_prefix+set}" = set; then
5205   withval="$with_install_prefix"
5206   case "x$withval" in
5207         (xyes|xno)
5208                 ;;
5209         (*)     DESTDIR="$withval"
5210                 ;;
5211         esac
5212 fi;
5213 echo "$as_me:5213: result: $DESTDIR" >&5
5214 echo "${ECHO_T}$DESTDIR" >&6
5215
5216 ###############################################################################
5217
5218 # If we're cross-compiling, allow the user to override the tools and their
5219 # options.  The configure script is oriented toward identifying the host
5220 # compiler, etc., but we need a build compiler to generate parts of the source.
5221
5222 case "$cf_cv_system_name" in
5223 (*-msvc*)
5224         LDFLAGS="$LDFLAGS user32.lib"
5225         export LDFLAGS
5226         ;;
5227 esac
5228
5229 if test "$cross_compiling" = yes ; then
5230
5231         # defaults that we might want to override
5232         : ${BUILD_CFLAGS:=''}
5233         : ${BUILD_CPPFLAGS:=''}
5234         : ${BUILD_LDFLAGS:=''}
5235         : ${BUILD_LIBS:=''}
5236         : ${BUILD_EXEEXT:='$x'}
5237         : ${BUILD_OBJEXT:='o'}
5238
5239 # Check whether --with-build-cc or --without-build-cc was given.
5240 if test "${with_build_cc+set}" = set; then
5241   withval="$with_build_cc"
5242   BUILD_CC="$withval"
5243 else
5244   for ac_prog in gcc clang c99 c89 cc cl
5245 do
5246   # Extract the first word of "$ac_prog", so it can be a program name with args.
5247 set dummy $ac_prog; ac_word=$2
5248 echo "$as_me:5248: checking for $ac_word" >&5
5249 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5250 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5251   echo $ECHO_N "(cached) $ECHO_C" >&6
5252 else
5253   if test -n "$BUILD_CC"; then
5254   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5255 else
5256   ac_save_IFS=$IFS; IFS=$ac_path_separator
5257 ac_dummy="$PATH"
5258 for ac_dir in $ac_dummy; do
5259   IFS=$ac_save_IFS
5260   test -z "$ac_dir" && ac_dir=.
5261   $as_executable_p "$ac_dir/$ac_word" || continue
5262 ac_cv_prog_BUILD_CC="$ac_prog"
5263 echo "$as_me:5263: found $ac_dir/$ac_word" >&5
5264 break
5265 done
5266
5267 fi
5268 fi
5269 BUILD_CC=$ac_cv_prog_BUILD_CC
5270 if test -n "$BUILD_CC"; then
5271   echo "$as_me:5271: result: $BUILD_CC" >&5
5272 echo "${ECHO_T}$BUILD_CC" >&6
5273 else
5274   echo "$as_me:5274: result: no" >&5
5275 echo "${ECHO_T}no" >&6
5276 fi
5277
5278   test -n "$BUILD_CC" && break
5279 done
5280 test -n "$BUILD_CC" || BUILD_CC="none"
5281
5282 fi;
5283         echo "$as_me:5283: checking for native build C compiler" >&5
5284 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5285         echo "$as_me:5285: result: $BUILD_CC" >&5
5286 echo "${ECHO_T}$BUILD_CC" >&6
5287
5288         echo "$as_me:5288: checking for native build C preprocessor" >&5
5289 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5290
5291 # Check whether --with-build-cpp or --without-build-cpp was given.
5292 if test "${with_build_cpp+set}" = set; then
5293   withval="$with_build_cpp"
5294   BUILD_CPP="$withval"
5295 else
5296   BUILD_CPP='${BUILD_CC} -E'
5297 fi;
5298         echo "$as_me:5298: result: $BUILD_CPP" >&5
5299 echo "${ECHO_T}$BUILD_CPP" >&6
5300
5301         echo "$as_me:5301: checking for native build C flags" >&5
5302 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5303
5304 # Check whether --with-build-cflags or --without-build-cflags was given.
5305 if test "${with_build_cflags+set}" = set; then
5306   withval="$with_build_cflags"
5307   BUILD_CFLAGS="$withval"
5308 fi;
5309         echo "$as_me:5309: result: $BUILD_CFLAGS" >&5
5310 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5311
5312         echo "$as_me:5312: checking for native build C preprocessor-flags" >&5
5313 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5314
5315 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5316 if test "${with_build_cppflags+set}" = set; then
5317   withval="$with_build_cppflags"
5318   BUILD_CPPFLAGS="$withval"
5319 fi;
5320         echo "$as_me:5320: result: $BUILD_CPPFLAGS" >&5
5321 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5322
5323         echo "$as_me:5323: checking for native build linker-flags" >&5
5324 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5325
5326 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5327 if test "${with_build_ldflags+set}" = set; then
5328   withval="$with_build_ldflags"
5329   BUILD_LDFLAGS="$withval"
5330 fi;
5331         echo "$as_me:5331: result: $BUILD_LDFLAGS" >&5
5332 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5333
5334         echo "$as_me:5334: checking for native build linker-libraries" >&5
5335 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5336
5337 # Check whether --with-build-libs or --without-build-libs was given.
5338 if test "${with_build_libs+set}" = set; then
5339   withval="$with_build_libs"
5340   BUILD_LIBS="$withval"
5341 fi;
5342         echo "$as_me:5342: result: $BUILD_LIBS" >&5
5343 echo "${ECHO_T}$BUILD_LIBS" >&6
5344
5345         # this assumes we're on Unix.
5346         BUILD_EXEEXT=
5347         BUILD_OBJEXT=o
5348
5349         : ${BUILD_CC:='${CC}'}
5350
5351         echo "$as_me:5351: checking if the build-compiler \"$BUILD_CC\" works" >&5
5352 echo $ECHO_N "checking if the build-compiler \"$BUILD_CC\" works... $ECHO_C" >&6
5353
5354         cf_save_crossed=$cross_compiling
5355         cf_save_ac_link=$ac_link
5356         cross_compiling=no
5357         cf_build_cppflags=$BUILD_CPPFLAGS
5358         test "$cf_build_cppflags" = "#" && cf_build_cppflags=
5359         ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $cf_build_cppflags $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&5'
5360
5361         if test "$cross_compiling" = yes; then
5362   cf_ok_build_cc=unknown
5363 else
5364   cat >"conftest.$ac_ext" <<_ACEOF
5365 #line 5365 "configure"
5366 #include "confdefs.h"
5367 #include <stdio.h>
5368                 int main(int argc, char *argv[])
5369                 {
5370                         ${cf_cv_main_return:-return}(argc < 0 || argv == 0 || argv[0] == 0);
5371                 }
5372
5373 _ACEOF
5374 rm -f "conftest$ac_exeext"
5375 if { (eval echo "$as_me:5375: \"$ac_link\"") >&5
5376   (eval $ac_link) 2>&5
5377   ac_status=$?
5378   echo "$as_me:5378: \$? = $ac_status" >&5
5379   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
5380   { (eval echo "$as_me:5380: \"$ac_try\"") >&5
5381   (eval $ac_try) 2>&5
5382   ac_status=$?
5383   echo "$as_me:5383: \$? = $ac_status" >&5
5384   (exit "$ac_status"); }; }; then
5385   cf_ok_build_cc=yes
5386 else
5387   echo "$as_me: program exited with status $ac_status" >&5
5388 echo "$as_me: failed program was:" >&5
5389 cat "conftest.$ac_ext" >&5
5390 cf_ok_build_cc=no
5391 fi
5392 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
5393 fi
5394
5395         cross_compiling=$cf_save_crossed
5396         ac_link=$cf_save_ac_link
5397
5398         echo "$as_me:5398: result: $cf_ok_build_cc" >&5
5399 echo "${ECHO_T}$cf_ok_build_cc" >&6
5400
5401         if test "$cf_ok_build_cc" != yes
5402         then
5403                 { { echo "$as_me:5403: error: Cross-build requires two compilers.
5404 Use --with-build-cc to specify the native compiler." >&5
5405 echo "$as_me: error: Cross-build requires two compilers.
5406 Use --with-build-cc to specify the native compiler." >&2;}
5407    { (exit 1); exit 1; }; }
5408         fi
5409
5410 else
5411         : ${BUILD_CC:='${CC}'}
5412         : ${BUILD_CPP:='${CPP}'}
5413         : ${BUILD_CFLAGS:='${CFLAGS}'}
5414         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5415         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5416         : ${BUILD_LIBS:='${LIBS}'}
5417         : ${BUILD_EXEEXT:='$x'}
5418         : ${BUILD_OBJEXT:='o'}
5419 fi
5420
5421 ###############################################################################
5422
5423 ### Options to allow the user to specify the set of libraries which are used.
5424 ### Use "--without-normal --with-shared" to allow the default model to be
5425 ### shared, for example.
5426 cf_list_models=""
5427
5428 echo "$as_me:5428: checking if libtool -version-number should be used" >&5
5429 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5430
5431 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5432 if test "${enable_libtool_version+set}" = set; then
5433   enableval="$enable_libtool_version"
5434   test "$enableval" != no && enableval=yes
5435         if test "$enableval" != "yes" ; then
5436     cf_libtool_version=no
5437         else
5438                 cf_libtool_version=yes
5439         fi
5440 else
5441   enableval=yes
5442         cf_libtool_version=yes
5443
5444 fi;
5445 echo "$as_me:5445: result: $cf_libtool_version" >&5
5446 echo "${ECHO_T}$cf_libtool_version" >&6
5447
5448 if test "$cf_libtool_version" = yes ; then
5449         LIBTOOL_VERSION="-version-number"
5450 else
5451         LIBTOOL_VERSION="-version-info"
5452         case "x$VERSION" in
5453         (x)
5454                 { echo "$as_me:5454: WARNING: VERSION was not set" >&5
5455 echo "$as_me: WARNING: VERSION was not set" >&2;}
5456                 ;;
5457         (x*.*.*)
5458                 ABI_VERSION="$VERSION"
5459                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5460
5461 echo "${as_me:-configure}:5461: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5462
5463                 ;;
5464         (x*:*:*)
5465                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5466                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5467
5468 echo "${as_me:-configure}:5468: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5469
5470                 ;;
5471         (*)
5472                 { echo "$as_me:5472: WARNING: unexpected VERSION value: $VERSION" >&5
5473 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5474                 ;;
5475         esac
5476 fi
5477
5478 LIBTOOL=
5479
5480 # common library maintenance symbols that are convenient for libtool scripts:
5481 LIB_CREATE='${AR} -cr'
5482 LIB_OBJECT='${OBJECTS}'
5483 LIB_SUFFIX=.a
5484 LIB_PREP="$RANLIB"
5485
5486 # symbols used to prop libtool up to enable it to determine what it should be
5487 # doing:
5488 LIB_CLEAN=
5489 LIB_COMPILE=
5490 LIB_LINK='${CC}'
5491 LIB_INSTALL=
5492 LIB_UNINSTALL=
5493
5494 echo "$as_me:5494: checking if you want to build libraries with libtool" >&5
5495 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5496
5497 # Check whether --with-libtool or --without-libtool was given.
5498 if test "${with_libtool+set}" = set; then
5499   withval="$with_libtool"
5500   with_libtool=$withval
5501 else
5502   with_libtool=no
5503 fi;
5504 echo "$as_me:5504: result: $with_libtool" >&5
5505 echo "${ECHO_T}$with_libtool" >&6
5506 if test "$with_libtool" != "no"; then
5507
5508         if test "$with_libtool" != "yes" ; then
5509
5510 if test "x$prefix" != xNONE; then
5511         cf_path_syntax="$prefix"
5512 else
5513         cf_path_syntax="$ac_default_prefix"
5514 fi
5515
5516 case ".$with_libtool" in
5517 (.\$\(*\)*|.\'*\'*)
5518         ;;
5519 (..|./*|.\\*)
5520         ;;
5521 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5522         ;;
5523 (.\$\{*prefix\}*|.\$\{*dir\}*)
5524         eval with_libtool="$with_libtool"
5525         case ".$with_libtool" in
5526         (.NONE/*)
5527                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5528                 ;;
5529         esac
5530         ;;
5531 (.no|.NONE/*)
5532         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5533         ;;
5534 (*)
5535         { { echo "$as_me:5535: error: expected a pathname, not \"$with_libtool\"" >&5
5536 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5537    { (exit 1); exit 1; }; }
5538         ;;
5539 esac
5540
5541                 LIBTOOL=$with_libtool
5542         else
5543                 if test -n "$ac_tool_prefix"; then
5544   for ac_prog in libtool glibtool
5545   do
5546     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5547 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5548 echo "$as_me:5548: checking for $ac_word" >&5
5549 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5550 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5551   echo $ECHO_N "(cached) $ECHO_C" >&6
5552 else
5553   if test -n "$LIBTOOL"; then
5554   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5555 else
5556   ac_save_IFS=$IFS; IFS=$ac_path_separator
5557 ac_dummy="$PATH"
5558 for ac_dir in $ac_dummy; do
5559   IFS=$ac_save_IFS
5560   test -z "$ac_dir" && ac_dir=.
5561   $as_executable_p "$ac_dir/$ac_word" || continue
5562 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5563 echo "$as_me:5563: found $ac_dir/$ac_word" >&5
5564 break
5565 done
5566
5567 fi
5568 fi
5569 LIBTOOL=$ac_cv_prog_LIBTOOL
5570 if test -n "$LIBTOOL"; then
5571   echo "$as_me:5571: result: $LIBTOOL" >&5
5572 echo "${ECHO_T}$LIBTOOL" >&6
5573 else
5574   echo "$as_me:5574: result: no" >&5
5575 echo "${ECHO_T}no" >&6
5576 fi
5577
5578     test -n "$LIBTOOL" && break
5579   done
5580 fi
5581 if test -z "$LIBTOOL"; then
5582   ac_ct_LIBTOOL=$LIBTOOL
5583   for ac_prog in libtool glibtool
5584 do
5585   # Extract the first word of "$ac_prog", so it can be a program name with args.
5586 set dummy $ac_prog; ac_word=$2
5587 echo "$as_me:5587: checking for $ac_word" >&5
5588 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5589 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5590   echo $ECHO_N "(cached) $ECHO_C" >&6
5591 else
5592   if test -n "$ac_ct_LIBTOOL"; then
5593   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5594 else
5595   ac_save_IFS=$IFS; IFS=$ac_path_separator
5596 ac_dummy="$PATH"
5597 for ac_dir in $ac_dummy; do
5598   IFS=$ac_save_IFS
5599   test -z "$ac_dir" && ac_dir=.
5600   $as_executable_p "$ac_dir/$ac_word" || continue
5601 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5602 echo "$as_me:5602: found $ac_dir/$ac_word" >&5
5603 break
5604 done
5605
5606 fi
5607 fi
5608 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5609 if test -n "$ac_ct_LIBTOOL"; then
5610   echo "$as_me:5610: result: $ac_ct_LIBTOOL" >&5
5611 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5612 else
5613   echo "$as_me:5613: result: no" >&5
5614 echo "${ECHO_T}no" >&6
5615 fi
5616
5617   test -n "$ac_ct_LIBTOOL" && break
5618 done
5619 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5620
5621   LIBTOOL=$ac_ct_LIBTOOL
5622 fi
5623
5624 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5625 then
5626         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.].*//'`
5627 else
5628         cf_cv_libtool_version=
5629 fi
5630 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5631
5632                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5633                 then
5634
5635 unset ac_cv_prog_ac_ct_LIBTOOL
5636 unset ac_ct_LIBTOOL
5637 unset LIBTOOL
5638
5639                         if test -n "$ac_tool_prefix"; then
5640   for ac_prog in glibtool
5641   do
5642     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5643 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5644 echo "$as_me:5644: checking for $ac_word" >&5
5645 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5646 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5647   echo $ECHO_N "(cached) $ECHO_C" >&6
5648 else
5649   if test -n "$LIBTOOL"; then
5650   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5651 else
5652   ac_save_IFS=$IFS; IFS=$ac_path_separator
5653 ac_dummy="$PATH"
5654 for ac_dir in $ac_dummy; do
5655   IFS=$ac_save_IFS
5656   test -z "$ac_dir" && ac_dir=.
5657   $as_executable_p "$ac_dir/$ac_word" || continue
5658 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5659 echo "$as_me:5659: found $ac_dir/$ac_word" >&5
5660 break
5661 done
5662
5663 fi
5664 fi
5665 LIBTOOL=$ac_cv_prog_LIBTOOL
5666 if test -n "$LIBTOOL"; then
5667   echo "$as_me:5667: result: $LIBTOOL" >&5
5668 echo "${ECHO_T}$LIBTOOL" >&6
5669 else
5670   echo "$as_me:5670: result: no" >&5
5671 echo "${ECHO_T}no" >&6
5672 fi
5673
5674     test -n "$LIBTOOL" && break
5675   done
5676 fi
5677 if test -z "$LIBTOOL"; then
5678   ac_ct_LIBTOOL=$LIBTOOL
5679   for ac_prog in glibtool
5680 do
5681   # Extract the first word of "$ac_prog", so it can be a program name with args.
5682 set dummy $ac_prog; ac_word=$2
5683 echo "$as_me:5683: checking for $ac_word" >&5
5684 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5685 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5686   echo $ECHO_N "(cached) $ECHO_C" >&6
5687 else
5688   if test -n "$ac_ct_LIBTOOL"; then
5689   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5690 else
5691   ac_save_IFS=$IFS; IFS=$ac_path_separator
5692 ac_dummy="$PATH"
5693 for ac_dir in $ac_dummy; do
5694   IFS=$ac_save_IFS
5695   test -z "$ac_dir" && ac_dir=.
5696   $as_executable_p "$ac_dir/$ac_word" || continue
5697 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5698 echo "$as_me:5698: found $ac_dir/$ac_word" >&5
5699 break
5700 done
5701
5702 fi
5703 fi
5704 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5705 if test -n "$ac_ct_LIBTOOL"; then
5706   echo "$as_me:5706: result: $ac_ct_LIBTOOL" >&5
5707 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5708 else
5709   echo "$as_me:5709: result: no" >&5
5710 echo "${ECHO_T}no" >&6
5711 fi
5712
5713   test -n "$ac_ct_LIBTOOL" && break
5714 done
5715 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5716
5717   LIBTOOL=$ac_ct_LIBTOOL
5718 fi
5719
5720 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5721 then
5722         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.].*//'`
5723 else
5724         cf_cv_libtool_version=
5725 fi
5726 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5727
5728                 fi
5729         fi
5730         if test -z "$LIBTOOL" ; then
5731                 { { echo "$as_me:5731: error: Cannot find libtool" >&5
5732 echo "$as_me: error: Cannot find libtool" >&2;}
5733    { (exit 1); exit 1; }; }
5734         fi
5735         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5736         LIB_OBJECT='${OBJECTS:.o=.lo}'
5737         LIB_SUFFIX=.la
5738         LIB_CLEAN='${LIBTOOL} --mode=clean'
5739         LIB_COMPILE='${LIBTOOL} --mode=compile'
5740         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5741         LIB_INSTALL='${LIBTOOL} --mode=install'
5742         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5743         LIB_PREP=:
5744
5745 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5746 then
5747         echo "$as_me:5747: checking version of $LIBTOOL" >&5
5748 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5749
5750 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5751 then
5752         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.].*//'`
5753 else
5754         cf_cv_libtool_version=
5755 fi
5756 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5757
5758         echo "$as_me:5758: result: $cf_cv_libtool_version" >&5
5759 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5760         if test -n "$cf_cv_libtool_version"
5761         then
5762                 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
5763                 case "x$cf_check_libtool_version" in
5764                 (*...GNU-libtool...*)
5765                         ;;
5766                 (*)
5767                         { { echo "$as_me:5767: error: This is not GNU libtool" >&5
5768 echo "$as_me: error: This is not GNU libtool" >&2;}
5769    { (exit 1); exit 1; }; }
5770                         ;;
5771                 esac
5772         else
5773                 { { echo "$as_me:5773: error: No version found for $LIBTOOL" >&5
5774 echo "$as_me: error: No version found for $LIBTOOL" >&2;}
5775    { (exit 1); exit 1; }; }
5776         fi
5777 else
5778         { { echo "$as_me:5778: error: GNU libtool has not been found" >&5
5779 echo "$as_me: error: GNU libtool has not been found" >&2;}
5780    { (exit 1); exit 1; }; }
5781 fi
5782
5783         # special hack to add -no-undefined (which libtool should do for itself)
5784         LT_UNDEF=
5785         case "$cf_cv_system_name" in
5786         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5787                 LT_UNDEF=-no-undefined
5788                 ;;
5789         esac
5790
5791         # special hack to add --tag option for C++ compiler
5792         case "$cf_cv_libtool_version" in
5793         (1.[5-9]*|[2-9].[0-9.a-z]*)
5794                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5795                 LIBTOOL="$LIBTOOL --tag=CC"
5796                 ;;
5797         (*)
5798                 LIBTOOL_CXX="$LIBTOOL"
5799                 ;;
5800         esac
5801 else
5802         LIBTOOL=""
5803         LIBTOOL_CXX=""
5804 fi
5805
5806 test -z "$LIBTOOL" && ECHO_LT=
5807
5808 if test "$with_libtool" != "no" ; then
5809
5810 cf_list_models="$cf_list_models libtool"
5811
5812 else
5813
5814 echo "$as_me:5814: checking if you want to build shared libraries" >&5
5815 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5816
5817 # Check whether --with-shared or --without-shared was given.
5818 if test "${with_shared+set}" = set; then
5819   withval="$with_shared"
5820   with_shared=$withval
5821 else
5822   with_shared=no
5823 fi;
5824 echo "$as_me:5824: result: $with_shared" >&5
5825 echo "${ECHO_T}$with_shared" >&6
5826 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5827
5828 echo "$as_me:5828: checking if you want to build static libraries" >&5
5829 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5830
5831 # Check whether --with-normal or --without-normal was given.
5832 if test "${with_normal+set}" = set; then
5833   withval="$with_normal"
5834   with_normal=$withval
5835 else
5836   with_normal=yes
5837 fi;
5838 echo "$as_me:5838: result: $with_normal" >&5
5839 echo "${ECHO_T}$with_normal" >&6
5840 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5841
5842 echo "$as_me:5842: checking if you want to build debug libraries" >&5
5843 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5844
5845 # Check whether --with-debug or --without-debug was given.
5846 if test "${with_debug+set}" = set; then
5847   withval="$with_debug"
5848   with_debug=$withval
5849 else
5850   with_debug=yes
5851 fi;
5852 echo "$as_me:5852: result: $with_debug" >&5
5853 echo "${ECHO_T}$with_debug" >&6
5854 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5855
5856 echo "$as_me:5856: checking if you want to build profiling libraries" >&5
5857 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5858
5859 # Check whether --with-profile or --without-profile was given.
5860 if test "${with_profile+set}" = set; then
5861   withval="$with_profile"
5862   with_profile=$withval
5863 else
5864   with_profile=no
5865 fi;
5866 echo "$as_me:5866: result: $with_profile" >&5
5867 echo "${ECHO_T}$with_profile" >&6
5868 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5869
5870 fi
5871
5872 if test "X$cf_with_cxx_binding" != Xno; then
5873 if test "x$with_shared" = "xyes"; then
5874 echo "$as_me:5874: checking if you want to build C++ shared libraries" >&5
5875 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5876
5877 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5878 if test "${with_cxx_shared+set}" = set; then
5879   withval="$with_cxx_shared"
5880   with_shared_cxx=$withval
5881 else
5882   with_shared_cxx=no
5883 fi;
5884 echo "$as_me:5884: result: $with_shared_cxx" >&5
5885 echo "${ECHO_T}$with_shared_cxx" >&6
5886 fi
5887 fi
5888
5889 ###############################################################################
5890
5891 echo "$as_me:5891: checking for specified models" >&5
5892 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5893 test -z "$cf_list_models" && cf_list_models=normal
5894 test "$with_libtool" != "no" && cf_list_models=libtool
5895 echo "$as_me:5895: result: $cf_list_models" >&5
5896 echo "${ECHO_T}$cf_list_models" >&6
5897
5898 ### Use the first model as the default, and save its suffix for use in building
5899 ### up test-applications.
5900 echo "$as_me:5900: checking for default model" >&5
5901 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5902 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5903 echo "$as_me:5903: result: $DFT_LWR_MODEL" >&5
5904 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5905
5906 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5907
5908 TICS_NAME=tic
5909
5910 TINFO_NAME=tinfo
5911
5912 LIB_NAME=ncurses
5913
5914 LIB_DIR=../lib
5915 LIB_2ND=../../lib
5916
5917 echo "$as_me:5917: checking if you want to have a library-prefix" >&5
5918 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5919
5920 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5921 if test "${with_lib_prefix+set}" = set; then
5922   withval="$with_lib_prefix"
5923   with_lib_prefix=$withval
5924 else
5925   with_lib_prefix=auto
5926 fi;
5927 echo "$as_me:5927: result: $with_lib_prefix" >&5
5928 echo "${ECHO_T}$with_lib_prefix" >&6
5929
5930 if test "$with_lib_prefix" = auto
5931 then
5932
5933         case "$cf_cv_system_name" in
5934         (OS/2*|os2*)
5935                 if test "$DFT_LWR_MODEL" = libtool; then
5936                         LIB_PREFIX='lib'
5937                 else
5938                         LIB_PREFIX=''
5939                 fi
5940                 ;;
5941         (*-msvc*)
5942                 LIB_PREFIX=''
5943                 ;;
5944         (*)     LIB_PREFIX='lib'
5945                 ;;
5946         esac
5947 cf_prefix=$LIB_PREFIX
5948
5949 elif test "$with_lib_prefix" = no
5950 then
5951         LIB_PREFIX=
5952 else
5953         LIB_PREFIX=$with_lib_prefix
5954 fi
5955
5956 LIB_SUFFIX=
5957
5958         echo "$as_me:5958: checking for PATH separator" >&5
5959 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5960         case "$cf_cv_system_name" in
5961         (os2*)  PATH_SEPARATOR=';'  ;;
5962         (*)     ${PATH_SEPARATOR:=':'}  ;;
5963         esac
5964
5965         echo "$as_me:5965: result: $PATH_SEPARATOR" >&5
5966 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5967
5968 # headers needed for checks...
5969 echo "$as_me:5969: checking for ANSI C header files" >&5
5970 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5971 if test "${ac_cv_header_stdc+set}" = set; then
5972   echo $ECHO_N "(cached) $ECHO_C" >&6
5973 else
5974   cat >"conftest.$ac_ext" <<_ACEOF
5975 #line 5975 "configure"
5976 #include "confdefs.h"
5977 #include <stdlib.h>
5978 #include <stdarg.h>
5979 #include <string.h>
5980 #include <float.h>
5981
5982 _ACEOF
5983 if { (eval echo "$as_me:5983: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5984   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5985   ac_status=$?
5986   $EGREP -v '^ *\+' conftest.er1 >conftest.err
5987   rm -f conftest.er1
5988   cat conftest.err >&5
5989   echo "$as_me:5989: \$? = $ac_status" >&5
5990   (exit "$ac_status"); } >/dev/null; then
5991   if test -s conftest.err; then
5992     ac_cpp_err=$ac_c_preproc_warn_flag
5993   else
5994     ac_cpp_err=
5995   fi
5996 else
5997   ac_cpp_err=yes
5998 fi
5999 if test -z "$ac_cpp_err"; then
6000   ac_cv_header_stdc=yes
6001 else
6002   echo "$as_me: failed program was:" >&5
6003   cat "conftest.$ac_ext" >&5
6004   ac_cv_header_stdc=no
6005 fi
6006 rm -f conftest.err "conftest.$ac_ext"
6007
6008 if test $ac_cv_header_stdc = yes; then
6009   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6010   cat >"conftest.$ac_ext" <<_ACEOF
6011 #line 6011 "configure"
6012 #include "confdefs.h"
6013 #include <string.h>
6014
6015 _ACEOF
6016 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6017   $EGREP "memchr" >/dev/null 2>&1; then
6018   :
6019 else
6020   ac_cv_header_stdc=no
6021 fi
6022 rm -rf conftest*
6023
6024 fi
6025
6026 if test $ac_cv_header_stdc = yes; then
6027   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6028   cat >"conftest.$ac_ext" <<_ACEOF
6029 #line 6029 "configure"
6030 #include "confdefs.h"
6031 #include <stdlib.h>
6032
6033 _ACEOF
6034 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6035   $EGREP "free" >/dev/null 2>&1; then
6036   :
6037 else
6038   ac_cv_header_stdc=no
6039 fi
6040 rm -rf conftest*
6041
6042 fi
6043
6044 if test $ac_cv_header_stdc = yes; then
6045   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6046   if test "$cross_compiling" = yes; then
6047   :
6048 else
6049   cat >"conftest.$ac_ext" <<_ACEOF
6050 #line 6050 "configure"
6051 #include "confdefs.h"
6052 #include <ctype.h>
6053 #if ((' ' & 0x0FF) == 0x020)
6054 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6055 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6056 #else
6057 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
6058                      || ('j' <= (c) && (c) <= 'r') \
6059                      || ('s' <= (c) && (c) <= 'z'))
6060 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6061 #endif
6062
6063 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6064 int
6065 main (void)
6066 {
6067   int i;
6068   for (i = 0; i < 256; i++)
6069     if (XOR (islower (i), ISLOWER (i))
6070         || toupper (i) != TOUPPER (i))
6071       $ac_main_return(2);
6072   $ac_main_return (0);
6073 }
6074 _ACEOF
6075 rm -f "conftest$ac_exeext"
6076 if { (eval echo "$as_me:6076: \"$ac_link\"") >&5
6077   (eval $ac_link) 2>&5
6078   ac_status=$?
6079   echo "$as_me:6079: \$? = $ac_status" >&5
6080   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6081   { (eval echo "$as_me:6081: \"$ac_try\"") >&5
6082   (eval $ac_try) 2>&5
6083   ac_status=$?
6084   echo "$as_me:6084: \$? = $ac_status" >&5
6085   (exit "$ac_status"); }; }; then
6086   :
6087 else
6088   echo "$as_me: program exited with status $ac_status" >&5
6089 echo "$as_me: failed program was:" >&5
6090 cat "conftest.$ac_ext" >&5
6091 ac_cv_header_stdc=no
6092 fi
6093 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6094 fi
6095 fi
6096 fi
6097 echo "$as_me:6097: result: $ac_cv_header_stdc" >&5
6098 echo "${ECHO_T}$ac_cv_header_stdc" >&6
6099 if test $ac_cv_header_stdc = yes; then
6100
6101 cat >>confdefs.h <<\EOF
6102 #define STDC_HEADERS 1
6103 EOF
6104
6105 fi
6106
6107 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6108
6109 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6110                   inttypes.h stdint.h unistd.h
6111 do
6112 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6113 echo "$as_me:6113: checking for $ac_header" >&5
6114 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6115 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6116   echo $ECHO_N "(cached) $ECHO_C" >&6
6117 else
6118   cat >"conftest.$ac_ext" <<_ACEOF
6119 #line 6119 "configure"
6120 #include "confdefs.h"
6121 $ac_includes_default
6122 #include <$ac_header>
6123 _ACEOF
6124 rm -f "conftest.$ac_objext"
6125 if { (eval echo "$as_me:6125: \"$ac_compile\"") >&5
6126   (eval $ac_compile) 2>&5
6127   ac_status=$?
6128   echo "$as_me:6128: \$? = $ac_status" >&5
6129   (exit "$ac_status"); } &&
6130          { ac_try='test -s "conftest.$ac_objext"'
6131   { (eval echo "$as_me:6131: \"$ac_try\"") >&5
6132   (eval $ac_try) 2>&5
6133   ac_status=$?
6134   echo "$as_me:6134: \$? = $ac_status" >&5
6135   (exit "$ac_status"); }; }; then
6136   eval "$as_ac_Header=yes"
6137 else
6138   echo "$as_me: failed program was:" >&5
6139 cat "conftest.$ac_ext" >&5
6140 eval "$as_ac_Header=no"
6141 fi
6142 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6143 fi
6144 echo "$as_me:6144: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6145 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6146 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6147   cat >>confdefs.h <<EOF
6148 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6149 EOF
6150
6151 fi
6152 done
6153
6154 echo "$as_me:6154: checking whether exit is declared" >&5
6155 echo $ECHO_N "checking whether exit is declared... $ECHO_C" >&6
6156 if test "${ac_cv_have_decl_exit+set}" = set; then
6157   echo $ECHO_N "(cached) $ECHO_C" >&6
6158 else
6159   cat >"conftest.$ac_ext" <<_ACEOF
6160 #line 6160 "configure"
6161 #include "confdefs.h"
6162 $ac_includes_default
6163 int
6164 main (void)
6165 {
6166 #ifndef exit
6167   char *p = (char *) exit; (void) p;
6168 #endif
6169
6170   ;
6171   return 0;
6172 }
6173 _ACEOF
6174 rm -f "conftest.$ac_objext"
6175 if { (eval echo "$as_me:6175: \"$ac_compile\"") >&5
6176   (eval $ac_compile) 2>&5
6177   ac_status=$?
6178   echo "$as_me:6178: \$? = $ac_status" >&5
6179   (exit "$ac_status"); } &&
6180          { ac_try='test -s "conftest.$ac_objext"'
6181   { (eval echo "$as_me:6181: \"$ac_try\"") >&5
6182   (eval $ac_try) 2>&5
6183   ac_status=$?
6184   echo "$as_me:6184: \$? = $ac_status" >&5
6185   (exit "$ac_status"); }; }; then
6186   ac_cv_have_decl_exit=yes
6187 else
6188   echo "$as_me: failed program was:" >&5
6189 cat "conftest.$ac_ext" >&5
6190 ac_cv_have_decl_exit=no
6191 fi
6192 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6193 fi
6194 echo "$as_me:6194: result: $ac_cv_have_decl_exit" >&5
6195 echo "${ECHO_T}$ac_cv_have_decl_exit" >&6
6196
6197 ac_header_dirent=no
6198 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
6199   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6200 echo "$as_me:6200: checking for $ac_hdr that defines DIR" >&5
6201 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
6202 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6203   echo $ECHO_N "(cached) $ECHO_C" >&6
6204 else
6205   cat >"conftest.$ac_ext" <<_ACEOF
6206 #line 6206 "configure"
6207 #include "confdefs.h"
6208 #include <sys/types.h>
6209 #include <$ac_hdr>
6210
6211 int
6212 main (void)
6213 {
6214 if ((DIR *) 0)
6215 return 0;
6216   ;
6217   return 0;
6218 }
6219 _ACEOF
6220 rm -f "conftest.$ac_objext"
6221 if { (eval echo "$as_me:6221: \"$ac_compile\"") >&5
6222   (eval $ac_compile) 2>&5
6223   ac_status=$?
6224   echo "$as_me:6224: \$? = $ac_status" >&5
6225   (exit "$ac_status"); } &&
6226          { ac_try='test -s "conftest.$ac_objext"'
6227   { (eval echo "$as_me:6227: \"$ac_try\"") >&5
6228   (eval $ac_try) 2>&5
6229   ac_status=$?
6230   echo "$as_me:6230: \$? = $ac_status" >&5
6231   (exit "$ac_status"); }; }; then
6232   eval "$as_ac_Header=yes"
6233 else
6234   echo "$as_me: failed program was:" >&5
6235 cat "conftest.$ac_ext" >&5
6236 eval "$as_ac_Header=no"
6237 fi
6238 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6239 fi
6240 echo "$as_me:6240: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6241 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6242 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6243   cat >>confdefs.h <<EOF
6244 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
6245 EOF
6246
6247 ac_header_dirent=$ac_hdr; break
6248 fi
6249
6250 done
6251 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6252 if test $ac_header_dirent = dirent.h; then
6253   echo "$as_me:6253: checking for opendir in -ldir" >&5
6254 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
6255 if test "${ac_cv_lib_dir_opendir+set}" = set; then
6256   echo $ECHO_N "(cached) $ECHO_C" >&6
6257 else
6258   ac_check_lib_save_LIBS=$LIBS
6259 LIBS="-ldir  $LIBS"
6260 cat >"conftest.$ac_ext" <<_ACEOF
6261 #line 6261 "configure"
6262 #include "confdefs.h"
6263
6264 /* Override any gcc2 internal prototype to avoid an error.  */
6265 #ifdef __cplusplus
6266 extern "C"
6267 #endif
6268 /* We use char because int might match the return type of a gcc2
6269    builtin and then its argument prototype would still apply.  */
6270 char opendir ();
6271 int
6272 main (void)
6273 {
6274 opendir ();
6275   ;
6276   return 0;
6277 }
6278 _ACEOF
6279 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6280 if { (eval echo "$as_me:6280: \"$ac_link\"") >&5
6281   (eval $ac_link) 2>&5
6282   ac_status=$?
6283   echo "$as_me:6283: \$? = $ac_status" >&5
6284   (exit "$ac_status"); } &&
6285          { ac_try='test -s "conftest$ac_exeext"'
6286   { (eval echo "$as_me:6286: \"$ac_try\"") >&5
6287   (eval $ac_try) 2>&5
6288   ac_status=$?
6289   echo "$as_me:6289: \$? = $ac_status" >&5
6290   (exit "$ac_status"); }; }; then
6291   ac_cv_lib_dir_opendir=yes
6292 else
6293   echo "$as_me: failed program was:" >&5
6294 cat "conftest.$ac_ext" >&5
6295 ac_cv_lib_dir_opendir=no
6296 fi
6297 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6298 LIBS=$ac_check_lib_save_LIBS
6299 fi
6300 echo "$as_me:6300: result: $ac_cv_lib_dir_opendir" >&5
6301 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
6302 if test "$ac_cv_lib_dir_opendir" = yes; then
6303   LIBS="$LIBS -ldir"
6304 fi
6305
6306 else
6307   echo "$as_me:6307: checking for opendir in -lx" >&5
6308 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
6309 if test "${ac_cv_lib_x_opendir+set}" = set; then
6310   echo $ECHO_N "(cached) $ECHO_C" >&6
6311 else
6312   ac_check_lib_save_LIBS=$LIBS
6313 LIBS="-lx  $LIBS"
6314 cat >"conftest.$ac_ext" <<_ACEOF
6315 #line 6315 "configure"
6316 #include "confdefs.h"
6317
6318 /* Override any gcc2 internal prototype to avoid an error.  */
6319 #ifdef __cplusplus
6320 extern "C"
6321 #endif
6322 /* We use char because int might match the return type of a gcc2
6323    builtin and then its argument prototype would still apply.  */
6324 char opendir ();
6325 int
6326 main (void)
6327 {
6328 opendir ();
6329   ;
6330   return 0;
6331 }
6332 _ACEOF
6333 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6334 if { (eval echo "$as_me:6334: \"$ac_link\"") >&5
6335   (eval $ac_link) 2>&5
6336   ac_status=$?
6337   echo "$as_me:6337: \$? = $ac_status" >&5
6338   (exit "$ac_status"); } &&
6339          { ac_try='test -s "conftest$ac_exeext"'
6340   { (eval echo "$as_me:6340: \"$ac_try\"") >&5
6341   (eval $ac_try) 2>&5
6342   ac_status=$?
6343   echo "$as_me:6343: \$? = $ac_status" >&5
6344   (exit "$ac_status"); }; }; then
6345   ac_cv_lib_x_opendir=yes
6346 else
6347   echo "$as_me: failed program was:" >&5
6348 cat "conftest.$ac_ext" >&5
6349 ac_cv_lib_x_opendir=no
6350 fi
6351 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6352 LIBS=$ac_check_lib_save_LIBS
6353 fi
6354 echo "$as_me:6354: result: $ac_cv_lib_x_opendir" >&5
6355 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
6356 if test "$ac_cv_lib_x_opendir" = yes; then
6357   LIBS="$LIBS -lx"
6358 fi
6359
6360 fi
6361
6362 ###############################################################################
6363
6364 echo "$as_me:6364: checking if you want to build a separate terminfo library" >&5
6365 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
6366
6367 # Check whether --with-termlib or --without-termlib was given.
6368 if test "${with_termlib+set}" = set; then
6369   withval="$with_termlib"
6370   with_termlib=$withval
6371 else
6372   with_termlib=no
6373 fi;
6374 echo "$as_me:6374: result: $with_termlib" >&5
6375 echo "${ECHO_T}$with_termlib" >&6
6376
6377 echo "$as_me:6377: checking if you want to build a separate tic library" >&5
6378 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
6379
6380 # Check whether --with-ticlib or --without-ticlib was given.
6381 if test "${with_ticlib+set}" = set; then
6382   withval="$with_ticlib"
6383   with_ticlib=$withval
6384 else
6385   with_ticlib=no
6386 fi;
6387 echo "$as_me:6387: result: $with_ticlib" >&5
6388 echo "${ECHO_T}$with_ticlib" >&6
6389
6390 if test X"$CC_G_OPT" = X"" ; then
6391         CC_G_OPT='-g'
6392         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
6393 fi
6394
6395 if test X"$CXX_G_OPT" = X"" ; then
6396         CXX_G_OPT='-g'
6397         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
6398 fi
6399
6400 echo "$as_me:6400: checking for default loader flags" >&5
6401 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
6402 case "$DFT_LWR_MODEL" in
6403 (libtool) LD_MODEL=''   ;;
6404 (normal)  LD_MODEL=''   ;;
6405 (debug)   LD_MODEL=$CC_G_OPT ;;
6406 (profile) LD_MODEL='-pg';;
6407 (shared)  LD_MODEL=''   ;;
6408 esac
6409 echo "$as_me:6409: result: $LD_MODEL" >&5
6410 echo "${ECHO_T}$LD_MODEL" >&6
6411
6412 case "$DFT_LWR_MODEL" in
6413 (shared)
6414
6415 echo "$as_me:6415: checking if rpath option should be used" >&5
6416 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
6417
6418 # Check whether --enable-rpath or --disable-rpath was given.
6419 if test "${enable_rpath+set}" = set; then
6420   enableval="$enable_rpath"
6421   cf_cv_enable_rpath=$enableval
6422 else
6423   cf_cv_enable_rpath=no
6424 fi;
6425 echo "$as_me:6425: result: $cf_cv_enable_rpath" >&5
6426 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
6427
6428 echo "$as_me:6428: checking if shared libraries should be relinked during install" >&5
6429 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
6430
6431 # Check whether --enable-relink or --disable-relink was given.
6432 if test "${enable_relink+set}" = set; then
6433   enableval="$enable_relink"
6434   cf_cv_do_relink=$enableval
6435 else
6436   cf_cv_do_relink=yes
6437 fi;
6438 echo "$as_me:6438: result: $cf_cv_do_relink" >&5
6439 echo "${ECHO_T}$cf_cv_do_relink" >&6
6440         ;;
6441 esac
6442
6443 # we will build libraries one-level down.
6444 rel_builddir=..
6445
6446 LD_RPATH_OPT=
6447 if test "x$cf_cv_enable_rpath" != xno
6448 then
6449         echo "$as_me:6449: checking for an rpath option" >&5
6450 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
6451         case "$cf_cv_system_name" in
6452         (irix*)
6453                 if test "$GCC" = yes; then
6454                         LD_RPATH_OPT="-Wl,-rpath,"
6455                 else
6456                         LD_RPATH_OPT="-rpath "
6457                 fi
6458                 ;;
6459         (linux*|gnu*|k*bsd*-gnu|freebsd*)
6460                 LD_RPATH_OPT="-Wl,-rpath,"
6461                 ;;
6462         (openbsd[2-9].*|mirbsd*)
6463                 LD_RPATH_OPT="-Wl,-rpath,"
6464                 ;;
6465         (dragonfly*)
6466                 LD_RPATH_OPT="-rpath "
6467                 ;;
6468         (netbsd*)
6469                 LD_RPATH_OPT="-Wl,-rpath,"
6470                 ;;
6471         (osf*|mls+*)
6472                 LD_RPATH_OPT="-rpath "
6473                 ;;
6474         (solaris2*)
6475                 LD_RPATH_OPT="-R"
6476                 ;;
6477         (*)
6478                 ;;
6479         esac
6480         echo "$as_me:6480: result: $LD_RPATH_OPT" >&5
6481 echo "${ECHO_T}$LD_RPATH_OPT" >&6
6482
6483         case "x$LD_RPATH_OPT" in
6484         (x-R*)
6485                 echo "$as_me:6485: checking if we need a space after rpath option" >&5
6486 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
6487                 cf_save_LIBS="$LIBS"
6488
6489 cf_add_libs="$LIBS"
6490 # reverse order
6491 cf_add_0lib=
6492 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6493 # filter duplicates
6494 for cf_add_1lib in $cf_add_0lib; do
6495         for cf_add_2lib in $cf_add_libs; do
6496                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6497                         cf_add_1lib=
6498                         break
6499                 fi
6500         done
6501         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6502 done
6503 LIBS="$cf_add_libs"
6504
6505                 cat >"conftest.$ac_ext" <<_ACEOF
6506 #line 6506 "configure"
6507 #include "confdefs.h"
6508
6509 int
6510 main (void)
6511 {
6512
6513   ;
6514   return 0;
6515 }
6516 _ACEOF
6517 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6518 if { (eval echo "$as_me:6518: \"$ac_link\"") >&5
6519   (eval $ac_link) 2>&5
6520   ac_status=$?
6521   echo "$as_me:6521: \$? = $ac_status" >&5
6522   (exit "$ac_status"); } &&
6523          { ac_try='test -s "conftest$ac_exeext"'
6524   { (eval echo "$as_me:6524: \"$ac_try\"") >&5
6525   (eval $ac_try) 2>&5
6526   ac_status=$?
6527   echo "$as_me:6527: \$? = $ac_status" >&5
6528   (exit "$ac_status"); }; }; then
6529   cf_rpath_space=no
6530 else
6531   echo "$as_me: failed program was:" >&5
6532 cat "conftest.$ac_ext" >&5
6533 cf_rpath_space=yes
6534 fi
6535 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6536                 LIBS="$cf_save_LIBS"
6537                 echo "$as_me:6537: result: $cf_rpath_space" >&5
6538 echo "${ECHO_T}$cf_rpath_space" >&6
6539                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6540                 ;;
6541         esac
6542 fi
6543
6544         RM_SHARED_OPTS=
6545         LOCAL_LDFLAGS=
6546         LOCAL_LDFLAGS2=
6547         LD_SHARED_OPTS=
6548         INSTALL_LIB="-m 644"
6549         : ${rel_builddir:=.}
6550
6551         shlibdir=$libdir
6552
6553         MAKE_DLLS="#"
6554
6555         cf_cv_do_symlinks=no
6556         cf_ld_rpath_opt=
6557         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6558
6559         echo "$as_me:6559: checking if release/abi version should be used for shared libs" >&5
6560 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6561
6562 # Check whether --with-shlib-version or --without-shlib-version was given.
6563 if test "${with_shlib_version+set}" = set; then
6564   withval="$with_shlib_version"
6565   test -z "$withval" && withval=auto
6566         case "$withval" in
6567         (yes)
6568                 cf_cv_shlib_version=auto
6569                 ;;
6570         (rel|abi|auto)
6571                 cf_cv_shlib_version=$withval
6572                 ;;
6573         (*)
6574                 echo "$as_me:6574: result: $withval" >&5
6575 echo "${ECHO_T}$withval" >&6
6576                 { { echo "$as_me:6576: error: option value must be one of: rel, abi, or auto" >&5
6577 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6578    { (exit 1); exit 1; }; }
6579                 ;;
6580         esac
6581
6582 else
6583   cf_cv_shlib_version=auto
6584 fi;
6585         echo "$as_me:6585: result: $cf_cv_shlib_version" >&5
6586 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6587
6588         cf_cv_rm_so_locs=no
6589         cf_try_cflags=
6590
6591         # Some less-capable ports of gcc support only -fpic
6592         CC_SHARED_OPTS=
6593
6594         cf_try_fPIC=no
6595         if test "$GCC" = yes
6596         then
6597                 cf_try_fPIC=yes
6598         else
6599                 case "$cf_cv_system_name" in
6600                 (*linux*)       # e.g., PGI compiler
6601                         cf_try_fPIC=yes
6602                         ;;
6603                 esac
6604         fi
6605
6606         if test "$cf_try_fPIC" = yes
6607         then
6608                 echo "$as_me:6608: checking which $CC option to use" >&5
6609 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6610                 cf_save_CFLAGS="$CFLAGS"
6611                 for CC_SHARED_OPTS in -fPIC -fpic ''
6612                 do
6613                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6614                         cat >"conftest.$ac_ext" <<_ACEOF
6615 #line 6615 "configure"
6616 #include "confdefs.h"
6617 #include <stdio.h>
6618 int
6619 main (void)
6620 {
6621 int x = 1
6622   ;
6623   return 0;
6624 }
6625 _ACEOF
6626 rm -f "conftest.$ac_objext"
6627 if { (eval echo "$as_me:6627: \"$ac_compile\"") >&5
6628   (eval $ac_compile) 2>&5
6629   ac_status=$?
6630   echo "$as_me:6630: \$? = $ac_status" >&5
6631   (exit "$ac_status"); } &&
6632          { ac_try='test -s "conftest.$ac_objext"'
6633   { (eval echo "$as_me:6633: \"$ac_try\"") >&5
6634   (eval $ac_try) 2>&5
6635   ac_status=$?
6636   echo "$as_me:6636: \$? = $ac_status" >&5
6637   (exit "$ac_status"); }; }; then
6638   break
6639 else
6640   echo "$as_me: failed program was:" >&5
6641 cat "conftest.$ac_ext" >&5
6642 fi
6643 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6644                 done
6645                 echo "$as_me:6645: result: $CC_SHARED_OPTS" >&5
6646 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6647                 CFLAGS="$cf_save_CFLAGS"
6648         fi
6649
6650         cf_cv_shlib_version_infix=no
6651
6652         case "$cf_cv_system_name" in
6653         (aix4.3-9*|aix[5-7]*)
6654                 if test "$GCC" = yes; then
6655                         CC_SHARED_OPTS='-Wl,-brtl'
6656                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6657                 else
6658                         CC_SHARED_OPTS='-brtl'
6659                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6660                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6661                 fi
6662                 ;;
6663         (beos*)
6664                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6665                 ;;
6666         (cygwin*)
6667                 CC_SHARED_OPTS=
6668                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6669                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6670                 cf_cv_shlib_version=cygdll
6671                 cf_cv_shlib_version_infix=cygdll
6672                 shlibdir=$bindir
6673                 MAKE_DLLS=
6674                 cat >mk_shared_lib.sh <<-CF_EOF
6675                 #!$SHELL
6676                 SHARED_LIB=\$1
6677                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6678                 shift
6679                 cat <<-EOF
6680                 Linking shared library
6681                 ** SHARED_LIB \$SHARED_LIB
6682                 ** IMPORT_LIB \$IMPORT_LIB
6683 EOF
6684                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6685 CF_EOF
6686                 chmod +x mk_shared_lib.sh
6687                 ;;
6688         (msys*)
6689                 CC_SHARED_OPTS=
6690                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6691                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6692                 cf_cv_shlib_version=msysdll
6693                 cf_cv_shlib_version_infix=msysdll
6694                 shlibdir=$bindir
6695                 MAKE_DLLS=
6696                 cat >mk_shared_lib.sh <<-CF_EOF
6697                 #!$SHELL
6698                 SHARED_LIB=\$1
6699                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6700                 shift
6701                 cat <<-EOF
6702                 Linking shared library
6703                 ** SHARED_LIB \$SHARED_LIB
6704                 ** IMPORT_LIB \$IMPORT_LIB
6705 EOF
6706                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6707 CF_EOF
6708                 chmod +x mk_shared_lib.sh
6709                 ;;
6710         (darwin*)
6711                 cf_try_cflags="no-cpp-precomp"
6712                 CC_SHARED_OPTS="-dynamic"
6713                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6714                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6715                 cf_cv_shlib_version_infix=yes
6716                 echo "$as_me:6716: checking if ld -search_paths_first works" >&5
6717 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6718 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6719   echo $ECHO_N "(cached) $ECHO_C" >&6
6720 else
6721
6722                         cf_save_LDFLAGS=$LDFLAGS
6723                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6724                         cat >"conftest.$ac_ext" <<_ACEOF
6725 #line 6725 "configure"
6726 #include "confdefs.h"
6727
6728 int
6729 main (void)
6730 {
6731 int i;
6732   ;
6733   return 0;
6734 }
6735 _ACEOF
6736 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6737 if { (eval echo "$as_me:6737: \"$ac_link\"") >&5
6738   (eval $ac_link) 2>&5
6739   ac_status=$?
6740   echo "$as_me:6740: \$? = $ac_status" >&5
6741   (exit "$ac_status"); } &&
6742          { ac_try='test -s "conftest$ac_exeext"'
6743   { (eval echo "$as_me:6743: \"$ac_try\"") >&5
6744   (eval $ac_try) 2>&5
6745   ac_status=$?
6746   echo "$as_me:6746: \$? = $ac_status" >&5
6747   (exit "$ac_status"); }; }; then
6748   cf_cv_ldflags_search_paths_first=yes
6749 else
6750   echo "$as_me: failed program was:" >&5
6751 cat "conftest.$ac_ext" >&5
6752 cf_cv_ldflags_search_paths_first=no
6753 fi
6754 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6755                                 LDFLAGS=$cf_save_LDFLAGS
6756 fi
6757 echo "$as_me:6757: result: $cf_cv_ldflags_search_paths_first" >&5
6758 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6759                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6760                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6761                 fi
6762                 ;;
6763         (haiku*)
6764
6765         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6766         if test "$cf_cv_shlib_version" = rel; then
6767                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6768         else
6769                 cf_cv_shared_soname='`basename $@`'
6770         fi
6771
6772                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6773                 ;;
6774         (hpux[7-8]*)
6775                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6776                 if test "$GCC" != yes; then
6777                         CC_SHARED_OPTS='+Z'
6778                 fi
6779                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6780                 INSTALL_LIB="-m 555"
6781                 ;;
6782         (hpux*)
6783                 # (tested with gcc 2.7.2 -- I don't have c89)
6784                 if test "$GCC" = yes; then
6785                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6786                 else
6787                         CC_SHARED_OPTS='+Z'
6788                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6789                 fi
6790                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6791                 # HP-UX shared libraries must be executable, and should be
6792                 # readonly to exploit a quirk in the memory manager.
6793                 INSTALL_LIB="-m 555"
6794                 ;;
6795         (interix*)
6796                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6797                 if test "$cf_cv_shlib_version" = rel; then
6798                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6799                 else
6800                         cf_shared_soname='`basename $@`'
6801                 fi
6802                 CC_SHARED_OPTS=
6803                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6804                 ;;
6805         (irix*)
6806                 if test "$cf_cv_enable_rpath" = yes ; then
6807                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6808                 fi
6809                 # tested with IRIX 5.2 and 'cc'.
6810                 if test "$GCC" != yes; then
6811                         CC_SHARED_OPTS='-KPIC'
6812                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6813                 else
6814                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6815                 fi
6816                 cf_cv_rm_so_locs=yes
6817                 ;;
6818         (linux*|gnu*|k*bsd*-gnu)
6819                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6820                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6821                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6822                 fi
6823                 if test "$cf_cv_enable_rpath" = yes ; then
6824                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6825                 fi
6826
6827         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6828         if test "$cf_cv_shlib_version" = rel; then
6829                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6830         else
6831                 cf_cv_shared_soname='`basename $@`'
6832         fi
6833
6834                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6835                 ;;
6836         (mingw*msvc*)
6837                 cf_cv_shlib_version=msvcdll
6838                 cf_cv_shlib_version_infix=msvcdll
6839                 shlibdir=$bindir
6840                 MAKE_DLLS=
6841                 if test "$DFT_LWR_MODEL" = "shared" ; then
6842                         LOCAL_LDFLAGS="-link -dll"
6843                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6844                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6845                 fi
6846                 CC_SHARED_OPTS=
6847                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6848                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6849                 cat >mk_shared_lib.sh <<-CF_EOF
6850                 #!$SHELL
6851                 SHARED_LIB=\$1
6852                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6853                 shift
6854                 my_ld=\$1
6855                 shift
6856                 cat <<-EOF
6857                 Linking shared library
6858                 ** SHARED LIB \$SHARED_LIB
6859                 ** IMPORT_LIB \$IMPORT_LIB
6860 EOF
6861                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6862                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6863                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6864 CF_EOF
6865                 chmod +x mk_shared_lib.sh
6866                 cat >mk_prog.sh <<-CF_EOF
6867                 #!$SHELL
6868                 shift
6869                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6870                 LD="$LD"
6871                 clopts=()
6872                 ldopts=("/subsystem:console")
6873                 libs=()
6874                 isdll=0
6875                 while test \$# -gt 0; do
6876                         case "\$1" in
6877                                 -link)
6878                                         # ignore -link argument
6879                                         ;;
6880                                 -M[TD] | -M[TD]d)
6881                                         # ignore runtime-library option
6882                                         ;;
6883                                 -dll)
6884                                         isdll=1
6885                                         ;;
6886                                 -W* | -w*)
6887                                         # ignore warnings
6888                                         ;;
6889                                 -D*)
6890                                         clopts+=("\$1")
6891                                         ;;
6892                                 -I*)
6893                                         clopts+=("\$1")
6894                                         ;;
6895                                 -l*)
6896                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6897                                         ;;
6898                                 -L*)
6899                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6900                                         ;;
6901                                 *.obj | *.o)
6902                                         ldopts+=("\$1")
6903                                         ;;
6904                                 -Wl,*)
6905                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6906                                                 ldopts+=("\${linkarg}")
6907                                         done
6908                                         ;;
6909                                 *.lib)
6910                                         ldopts+=("\$1")
6911                                         ;;
6912                                 -o)
6913                                         shift
6914                                         ldopts+=("-out:\$1")
6915                                         ;;
6916                                 *)
6917                                         clopts+=("\$1")
6918                                         ldopts+=("\$1")
6919                                         ;;
6920                         esac
6921                         shift
6922                 done
6923                 if [ "\$isdll" -ne 0 ]; then
6924                         for lib in \${libs[*]}; do
6925                                 ldopts+=("\$lib.dll.lib")
6926                         done
6927                 else
6928                         for lib in \${libs[*]}; do
6929                                 ldopts+=("\$lib.lib")
6930                         done
6931                 fi
6932                 cat <<-EOF
6933                 Creating program
6934                 ** ld options:   "\${ldopts[@]}"
6935 EOF
6936                 exec \$LD \${ldopts[@]}
6937 CF_EOF
6938                 chmod +x mk_prog.sh
6939                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6940                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6941                 ;;
6942         (mingw*)
6943                 cf_cv_shlib_version=mingw
6944                 cf_cv_shlib_version_infix=mingw
6945                 shlibdir=$bindir
6946                 MAKE_DLLS=
6947                 if test "$DFT_LWR_MODEL" = "shared" ; then
6948                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6949                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6950                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6951                 fi
6952                 CC_SHARED_OPTS=
6953                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6954                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6955                 cat >mk_shared_lib.sh <<-CF_EOF
6956                 #!$SHELL
6957                 SHARED_LIB=\$1
6958                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6959                 shift
6960                 cat <<-EOF
6961                 Linking shared library
6962                 ** SHARED_LIB \$SHARED_LIB
6963                 ** IMPORT_LIB \$IMPORT_LIB
6964 EOF
6965                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6966 CF_EOF
6967                 chmod +x mk_shared_lib.sh
6968                 ;;
6969         (openbsd[2-9].*|mirbsd*)
6970                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6971                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6972                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6973                 fi
6974                 if test "$cf_cv_enable_rpath" = yes ; then
6975                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6976                 fi
6977                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6978
6979         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6980         if test "$cf_cv_shlib_version" = rel; then
6981                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6982         else
6983                 cf_cv_shared_soname='`basename $@`'
6984         fi
6985
6986                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6987                 ;;
6988         (nskJ*)
6989                 CC_SHARED_OPTS=
6990                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6991                 ;;
6992         (nskL*)
6993                 CC_SHARED_OPTS=
6994                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6995                 ;;
6996         (nto-qnx*|openbsd*|freebsd[12].*)
6997                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6998                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6999                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7000                 ;;
7001         (dragonfly*|freebsd*)
7002                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7003                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7004                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7005                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
7006                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7007                 fi
7008
7009         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7010         if test "$cf_cv_shlib_version" = rel; then
7011                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7012         else
7013                 cf_cv_shared_soname='`basename $@`'
7014         fi
7015
7016                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7017                 ;;
7018         (netbsd*)
7019                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7020                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7021                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7022                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7023                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7024                         if test "$cf_cv_shlib_version" = auto; then
7025                         if test -f /usr/libexec/ld.elf_so; then
7026                                 cf_cv_shlib_version=abi
7027                         else
7028                                 cf_cv_shlib_version=rel
7029                         fi
7030                         fi
7031
7032         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7033         if test "$cf_cv_shlib_version" = rel; then
7034                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7035         else
7036                 cf_cv_shared_soname='`basename $@`'
7037         fi
7038
7039                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
7040                 else
7041                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
7042                 fi
7043                 ;;
7044         (osf*|mls+*)
7045                 # tested with OSF/1 V3.2 and 'cc'
7046                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
7047                 # link with shared libs).
7048                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
7049                 case "$host_os" in
7050                 (osf4*)
7051                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
7052                         ;;
7053                 esac
7054                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
7055                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
7056                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7057                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7058                 fi
7059                 cf_cv_rm_so_locs=yes
7060                 ;;
7061         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
7062                 # tested with osr5.0.5
7063                 if test "$GCC" != yes; then
7064                         CC_SHARED_OPTS='-belf -KPIC'
7065                 fi
7066                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
7067                 if test "$cf_cv_enable_rpath" = yes ; then
7068                         # only way is to set LD_RUN_PATH but no switch for it
7069                         RUN_PATH=$libdir
7070                 fi
7071                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7072                 LINK_PROGS='LD_RUN_PATH=${libdir}'
7073                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
7074                 ;;
7075         (sunos4*)
7076                 # tested with SunOS 4.1.1 and gcc 2.7.0
7077                 if test "$GCC" != yes; then
7078                         CC_SHARED_OPTS='-KPIC'
7079                 fi
7080                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
7081                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7082                 ;;
7083         (solaris2*)
7084                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
7085                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
7086                 if test "$DFT_LWR_MODEL" = "shared" ; then
7087                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
7088                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7089                 fi
7090                 if test "$cf_cv_enable_rpath" = yes ; then
7091                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
7092                 fi
7093
7094         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7095         if test "$cf_cv_shlib_version" = rel; then
7096                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7097         else
7098                 cf_cv_shared_soname='`basename $@`'
7099         fi
7100
7101                 if test "$GCC" != yes; then
7102                         cf_save_CFLAGS="$CFLAGS"
7103                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
7104                         do
7105                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
7106                                 cat >"conftest.$ac_ext" <<_ACEOF
7107 #line 7107 "configure"
7108 #include "confdefs.h"
7109 #include <stdio.h>
7110 int
7111 main (void)
7112 {
7113 printf("Hello\\n");
7114   ;
7115   return 0;
7116 }
7117 _ACEOF
7118 rm -f "conftest.$ac_objext"
7119 if { (eval echo "$as_me:7119: \"$ac_compile\"") >&5
7120   (eval $ac_compile) 2>&5
7121   ac_status=$?
7122   echo "$as_me:7122: \$? = $ac_status" >&5
7123   (exit "$ac_status"); } &&
7124          { ac_try='test -s "conftest.$ac_objext"'
7125   { (eval echo "$as_me:7125: \"$ac_try\"") >&5
7126   (eval $ac_try) 2>&5
7127   ac_status=$?
7128   echo "$as_me:7128: \$? = $ac_status" >&5
7129   (exit "$ac_status"); }; }; then
7130   break
7131 else
7132   echo "$as_me: failed program was:" >&5
7133 cat "conftest.$ac_ext" >&5
7134 fi
7135 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7136                         done
7137                         CFLAGS="$cf_save_CFLAGS"
7138                         CC_SHARED_OPTS=$cf_shared_opts
7139                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
7140                 else
7141                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
7142                 fi
7143                 ;;
7144         (sysv5uw7*|unix_sv*)
7145                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
7146                 if test "$GCC" != yes; then
7147                         CC_SHARED_OPTS='-KPIC'
7148                 fi
7149                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
7150                 ;;
7151         (*)
7152                 CC_SHARED_OPTS='unknown'
7153                 MK_SHARED_LIB='echo unknown'
7154                 ;;
7155         esac
7156
7157         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
7158         case "$cf_cv_shlib_version" in
7159         (rel|abi)
7160                 case "$MK_SHARED_LIB" in
7161                 (*'-o $@')
7162                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
7163                         ;;
7164                 (*)
7165                         { echo "$as_me:7165: WARNING: ignored --with-shlib-version" >&5
7166 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
7167                         ;;
7168                 esac
7169                 ;;
7170         esac
7171
7172         if test -n "$cf_try_cflags"
7173         then
7174 cat > conftest.$ac_ext <<EOF
7175 #line 7175 "${as_me:-configure}"
7176 #include <stdio.h>
7177 int main(int argc, char *argv[])
7178 {
7179         printf("hello\\n");
7180         return (argv[argc-1] == 0) ;
7181 }
7182 EOF
7183                 cf_save_CFLAGS="$CFLAGS"
7184                 for cf_opt in $cf_try_cflags
7185                 do
7186                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
7187                         echo "$as_me:7187: checking if CFLAGS option -$cf_opt works" >&5
7188 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
7189                         if { (eval echo "$as_me:7189: \"$ac_compile\"") >&5
7190   (eval $ac_compile) 2>&5
7191   ac_status=$?
7192   echo "$as_me:7192: \$? = $ac_status" >&5
7193   (exit "$ac_status"); }; then
7194                                 echo "$as_me:7194: result: yes" >&5
7195 echo "${ECHO_T}yes" >&6
7196                                 cf_save_CFLAGS="$CFLAGS"
7197                         else
7198                                 echo "$as_me:7198: result: no" >&5
7199 echo "${ECHO_T}no" >&6
7200                         fi
7201                 done
7202                 CFLAGS="$cf_save_CFLAGS"
7203         fi
7204
7205         # RPATH_LIST is a colon-separated list of directories
7206         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
7207         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
7208
7209         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
7210
7211         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
7212
7213 echo "${as_me:-configure}:7213: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
7214
7215         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7216
7217 echo "${as_me:-configure}:7217: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7218
7219 for model in $cf_list_models ; do
7220         case "$model" in
7221         (libtool)
7222
7223 echo "$as_me:7223: checking for additional libtool options" >&5
7224 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
7225
7226 # Check whether --with-libtool-opts or --without-libtool-opts was given.
7227 if test "${with_libtool_opts+set}" = set; then
7228   withval="$with_libtool_opts"
7229   with_libtool_opts=$withval
7230 else
7231   with_libtool_opts=no
7232 fi;
7233 echo "$as_me:7233: result: $with_libtool_opts" >&5
7234 echo "${ECHO_T}$with_libtool_opts" >&6
7235
7236 case .$with_libtool_opts in
7237 (.yes|.no|.)
7238         ;;
7239 (*)
7240         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
7241         ;;
7242 esac
7243
7244 echo "$as_me:7244: checking if exported-symbols file should be used" >&5
7245 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
7246
7247 # Check whether --with-export-syms or --without-export-syms was given.
7248 if test "${with_export_syms+set}" = set; then
7249   withval="$with_export_syms"
7250   with_export_syms=$withval
7251 else
7252   with_export_syms=no
7253 fi;
7254 if test "x$with_export_syms" = xyes
7255 then
7256         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
7257
7258 fi
7259 echo "$as_me:7259: result: $with_export_syms" >&5
7260 echo "${ECHO_T}$with_export_syms" >&6
7261 if test "x$with_export_syms" != xno
7262 then
7263         EXPORT_SYMS="-export-symbols $with_export_syms"
7264
7265 fi
7266
7267                 ;;
7268         (shared)
7269                 if test "$CC_SHARED_OPTS" = "unknown"; then
7270                         { { echo "$as_me:7270: error: Shared libraries are not supported in this version" >&5
7271 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
7272    { (exit 1); exit 1; }; }
7273                 fi
7274                 # workaround for inept transition to PIE vs PIC...
7275                 echo "$as_me:7275: checking if current CFLAGS link properly" >&5
7276 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
7277                 cat >"conftest.$ac_ext" <<_ACEOF
7278 #line 7278 "configure"
7279 #include "confdefs.h"
7280 #include <stdio.h>
7281 int
7282 main (void)
7283 {
7284 printf("Hello work\\n");
7285   ;
7286   return 0;
7287 }
7288 _ACEOF
7289 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7290 if { (eval echo "$as_me:7290: \"$ac_link\"") >&5
7291   (eval $ac_link) 2>&5
7292   ac_status=$?
7293   echo "$as_me:7293: \$? = $ac_status" >&5
7294   (exit "$ac_status"); } &&
7295          { ac_try='test -s "conftest$ac_exeext"'
7296   { (eval echo "$as_me:7296: \"$ac_try\"") >&5
7297   (eval $ac_try) 2>&5
7298   ac_status=$?
7299   echo "$as_me:7299: \$? = $ac_status" >&5
7300   (exit "$ac_status"); }; }; then
7301   cf_cflags_work=yes
7302 else
7303   echo "$as_me: failed program was:" >&5
7304 cat "conftest.$ac_ext" >&5
7305 cf_cflags_work=no
7306 fi
7307 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7308                 echo "$as_me:7308: result: $cf_cflags_work" >&5
7309 echo "${ECHO_T}$cf_cflags_work" >&6
7310                 if test "$cf_cflags_work" = no
7311                 then
7312                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
7313
7314 echo "${as_me:-configure}:7314: testing try to work around by appending shared-options ..." 1>&5
7315
7316                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
7317                 fi
7318
7319 echo "$as_me:7319: checking if versioned-symbols file should be used" >&5
7320 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
7321
7322 # Check whether --with-versioned-syms or --without-versioned-syms was given.
7323 if test "${with_versioned_syms+set}" = set; then
7324   withval="$with_versioned_syms"
7325   with_versioned_syms=$withval
7326 else
7327   with_versioned_syms=no
7328 fi;
7329 case "x$with_versioned_syms" in
7330 (xyes)
7331         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
7332
7333         ;;
7334 (xno)
7335         ;;
7336 (x/*)
7337         test -f "$with_versioned_syms" || { { echo "$as_me:7337: error: expected a filename: $with_versioned_syms" >&5
7338 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
7339    { (exit 1); exit 1; }; }
7340         ;;
7341 (*)
7342         test -f "$with_versioned_syms" || { { echo "$as_me:7342: error: expected a filename: $with_versioned_syms" >&5
7343 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
7344    { (exit 1); exit 1; }; }
7345         with_versioned_syms=`pwd`/"$with_versioned_syms"
7346         ;;
7347 esac
7348 echo "$as_me:7348: result: $with_versioned_syms" >&5
7349 echo "${ECHO_T}$with_versioned_syms" >&6
7350
7351 RESULTING_SYMS=
7352 VERSIONED_SYMS=
7353 WILDCARD_SYMS=
7354
7355 if test "x$with_versioned_syms" != xno
7356 then
7357         RESULTING_SYMS=$with_versioned_syms
7358         case "x$MK_SHARED_LIB" in
7359         (*-Wl,*)
7360                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
7361                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
7362                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7363
7364 echo "${as_me:-configure}:7364: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7365
7366                 ;;
7367         (*-dy\ *)
7368                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
7369                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
7370                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7371
7372 echo "${as_me:-configure}:7372: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7373
7374                 ;;
7375         (*)
7376                 { echo "$as_me:7376: WARNING: this system does not support versioned-symbols" >&5
7377 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
7378                 ;;
7379         esac
7380
7381         # Linux ld can selectively override scope, e.g., of symbols beginning with
7382         # "_" by first declaring some as global, and then using a wildcard to
7383         # declare the others as local.  Some other loaders cannot do this.  Check
7384         # by constructing a (very) simple shared library and inspecting its
7385         # symbols.
7386         if test "x$VERSIONED_SYMS" != "x"
7387         then
7388                 echo "$as_me:7388: checking if wildcards can be used to selectively omit symbols" >&5
7389 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
7390                 WILDCARD_SYMS=no
7391
7392                 # make sources
7393                 rm -f conftest.*
7394
7395                 cat >conftest.ver <<EOF
7396 module_1.0 {
7397 global:
7398         globalf1;
7399 local:
7400         localf1;
7401 };
7402 module_2.0 {
7403 global:
7404         globalf2;
7405 local:
7406         localf2;
7407         _*;
7408 } module_1.0;
7409 submodule_1.0 {
7410 global:
7411         subglobalf1;
7412         _ismissing;
7413 local:
7414         sublocalf1;
7415 };
7416 submodule_2.0 {
7417 global:
7418         subglobalf2;
7419 local:
7420         sublocalf2;
7421         _*;
7422 } submodule_1.0;
7423 EOF
7424                 cat >conftest.$ac_ext <<EOF
7425 #line 7425 "configure"
7426 int     _ismissing(void) { return 1; }
7427 int     _localf1(void) { return 1; }
7428 int     _localf2(void) { return 2; }
7429 int     globalf1(void) { return 1; }
7430 int     globalf2(void) { return 2; }
7431 int     _sublocalf1(void) { return 1; }
7432 int     _sublocalf2(void) { return 2; }
7433 int     subglobalf1(void) { return 1; }
7434 int     subglobalf2(void) { return 2; }
7435 EOF
7436                 cat >conftest.mk <<EOF
7437 CC=${CC}
7438 CFLAGS=${CFLAGS}
7439 CPPFLAGS=${CPPFLAGS}
7440 LDFLAGS=${LDFLAGS}
7441 LIBS=${LIBS}
7442 VERSIONED_SYMS=${VERSIONED_SYMS}
7443 RESULTING_SYMS=conftest.ver
7444 MK_SHARED_LIB=${MK_SHARED_LIB}
7445 conftest.so: conftest.$ac_cv_objext
7446                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
7447 EOF
7448
7449                 # compile source, make library
7450                 if make -f conftest.mk 2>&5 >/dev/null
7451                 then
7452                         # test for missing symbol in either Data or Text section
7453                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
7454                         test -n "$cf_missing" && WILDCARD_SYMS=yes
7455                 fi
7456                 echo "$as_me:7456: result: $WILDCARD_SYMS" >&5
7457 echo "${ECHO_T}$WILDCARD_SYMS" >&6
7458                 rm -f conftest.*
7459         fi
7460 fi
7461
7462                 ;;
7463         esac
7464 done
7465
7466 ### Checks for special libraries, must be done up-front.
7467 SHLIB_LIST=""
7468
7469 echo "$as_me:7469: checking if you want to link with the GPM mouse library" >&5
7470 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
7471
7472 # Check whether --with-gpm or --without-gpm was given.
7473 if test "${with_gpm+set}" = set; then
7474   withval="$with_gpm"
7475   with_gpm=$withval
7476 else
7477   with_gpm=maybe
7478 fi;
7479 echo "$as_me:7479: result: $with_gpm" >&5
7480 echo "${ECHO_T}$with_gpm" >&6
7481
7482 if test "$with_gpm" != no ; then
7483         echo "$as_me:7483: checking for gpm.h" >&5
7484 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
7485 if test "${ac_cv_header_gpm_h+set}" = set; then
7486   echo $ECHO_N "(cached) $ECHO_C" >&6
7487 else
7488   cat >"conftest.$ac_ext" <<_ACEOF
7489 #line 7489 "configure"
7490 #include "confdefs.h"
7491 #include <gpm.h>
7492 _ACEOF
7493 if { (eval echo "$as_me:7493: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7494   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7495   ac_status=$?
7496   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7497   rm -f conftest.er1
7498   cat conftest.err >&5
7499   echo "$as_me:7499: \$? = $ac_status" >&5
7500   (exit "$ac_status"); } >/dev/null; then
7501   if test -s conftest.err; then
7502     ac_cpp_err=$ac_c_preproc_warn_flag
7503   else
7504     ac_cpp_err=
7505   fi
7506 else
7507   ac_cpp_err=yes
7508 fi
7509 if test -z "$ac_cpp_err"; then
7510   ac_cv_header_gpm_h=yes
7511 else
7512   echo "$as_me: failed program was:" >&5
7513   cat "conftest.$ac_ext" >&5
7514   ac_cv_header_gpm_h=no
7515 fi
7516 rm -f conftest.err "conftest.$ac_ext"
7517 fi
7518 echo "$as_me:7518: result: $ac_cv_header_gpm_h" >&5
7519 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
7520 if test "$ac_cv_header_gpm_h" = yes; then
7521
7522 cat >>confdefs.h <<\EOF
7523 #define HAVE_GPM_H 1
7524 EOF
7525
7526                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
7527                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
7528
7529 echo "${as_me:-configure}:7529: testing assuming we really have GPM library ..." 1>&5
7530
7531 cat >>confdefs.h <<\EOF
7532 #define HAVE_LIBGPM 1
7533 EOF
7534
7535                         with_gpm=yes
7536                 else
7537                         echo "$as_me:7537: checking for Gpm_Open in -lgpm" >&5
7538 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7539 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7540   echo $ECHO_N "(cached) $ECHO_C" >&6
7541 else
7542   ac_check_lib_save_LIBS=$LIBS
7543 LIBS="-lgpm  $LIBS"
7544 cat >"conftest.$ac_ext" <<_ACEOF
7545 #line 7545 "configure"
7546 #include "confdefs.h"
7547
7548 /* Override any gcc2 internal prototype to avoid an error.  */
7549 #ifdef __cplusplus
7550 extern "C"
7551 #endif
7552 /* We use char because int might match the return type of a gcc2
7553    builtin and then its argument prototype would still apply.  */
7554 char Gpm_Open ();
7555 int
7556 main (void)
7557 {
7558 Gpm_Open ();
7559   ;
7560   return 0;
7561 }
7562 _ACEOF
7563 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7564 if { (eval echo "$as_me:7564: \"$ac_link\"") >&5
7565   (eval $ac_link) 2>&5
7566   ac_status=$?
7567   echo "$as_me:7567: \$? = $ac_status" >&5
7568   (exit "$ac_status"); } &&
7569          { ac_try='test -s "conftest$ac_exeext"'
7570   { (eval echo "$as_me:7570: \"$ac_try\"") >&5
7571   (eval $ac_try) 2>&5
7572   ac_status=$?
7573   echo "$as_me:7573: \$? = $ac_status" >&5
7574   (exit "$ac_status"); }; }; then
7575   ac_cv_lib_gpm_Gpm_Open=yes
7576 else
7577   echo "$as_me: failed program was:" >&5
7578 cat "conftest.$ac_ext" >&5
7579 ac_cv_lib_gpm_Gpm_Open=no
7580 fi
7581 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7582 LIBS=$ac_check_lib_save_LIBS
7583 fi
7584 echo "$as_me:7584: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7585 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7586 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
7587   with_gpm=yes
7588 else
7589
7590                                 if test "$with_gpm" = maybe; then
7591                                         { echo "$as_me:7591: WARNING: Cannot link with GPM library" >&5
7592 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
7593                                         with_gpm=no
7594                                 else
7595                                         { { echo "$as_me:7595: error: Cannot link with GPM library" >&5
7596 echo "$as_me: error: Cannot link with GPM library" >&2;}
7597    { (exit 1); exit 1; }; }
7598                                 fi
7599
7600 fi
7601
7602                 fi
7603
7604 else
7605
7606                 test "$with_gpm" != maybe && { echo "$as_me:7606: WARNING: Cannot find GPM header" >&5
7607 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
7608                 with_gpm=no
7609
7610 fi
7611
7612 fi
7613
7614 if test "$with_gpm" != no ; then
7615         echo "$as_me:7615: checking if you want to load GPM dynamically" >&5
7616 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
7617
7618 # Check whether --with-dlsym or --without-dlsym was given.
7619 if test "${with_dlsym+set}" = set; then
7620   withval="$with_dlsym"
7621   with_dlsym=$withval
7622 else
7623   with_dlsym=yes
7624 fi;
7625         echo "$as_me:7625: result: $with_dlsym" >&5
7626 echo "${ECHO_T}$with_dlsym" >&6
7627         if test "x$with_dlsym" = xyes ; then
7628
7629 cf_have_dlsym=no
7630 echo "$as_me:7630: checking for dlsym" >&5
7631 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7632 if test "${ac_cv_func_dlsym+set}" = set; then
7633   echo $ECHO_N "(cached) $ECHO_C" >&6
7634 else
7635   cat >"conftest.$ac_ext" <<_ACEOF
7636 #line 7636 "configure"
7637 #include "confdefs.h"
7638 #define dlsym autoconf_temporary
7639 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7640 #undef dlsym
7641
7642 #ifdef __cplusplus
7643 extern "C"
7644 #endif
7645
7646 /* We use char because int might match the return type of a gcc2
7647    builtin and then its argument prototype would still apply.  */
7648 char dlsym (void);
7649
7650 int
7651 main (void)
7652 {
7653
7654 /* The GNU C library defines stubs for functions which it implements
7655     to always fail with ENOSYS.  Some functions are actually named
7656     something starting with __ and the normal name is an alias.  */
7657 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7658 #error found stub for dlsym
7659 #endif
7660
7661         return dlsym ();
7662   ;
7663   return 0;
7664 }
7665 _ACEOF
7666 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7667 if { (eval echo "$as_me:7667: \"$ac_link\"") >&5
7668   (eval $ac_link) 2>&5
7669   ac_status=$?
7670   echo "$as_me:7670: \$? = $ac_status" >&5
7671   (exit "$ac_status"); } &&
7672          { ac_try='test -s "conftest$ac_exeext"'
7673   { (eval echo "$as_me:7673: \"$ac_try\"") >&5
7674   (eval $ac_try) 2>&5
7675   ac_status=$?
7676   echo "$as_me:7676: \$? = $ac_status" >&5
7677   (exit "$ac_status"); }; }; then
7678   ac_cv_func_dlsym=yes
7679 else
7680   echo "$as_me: failed program was:" >&5
7681 cat "conftest.$ac_ext" >&5
7682 ac_cv_func_dlsym=no
7683 fi
7684 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7685 fi
7686 echo "$as_me:7686: result: $ac_cv_func_dlsym" >&5
7687 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7688 if test "$ac_cv_func_dlsym" = yes; then
7689   cf_have_dlsym=yes
7690 else
7691
7692 cf_have_libdl=no
7693 echo "$as_me:7693: checking for dlsym in -ldl" >&5
7694 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7695 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7696   echo $ECHO_N "(cached) $ECHO_C" >&6
7697 else
7698   ac_check_lib_save_LIBS=$LIBS
7699 LIBS="-ldl  $LIBS"
7700 cat >"conftest.$ac_ext" <<_ACEOF
7701 #line 7701 "configure"
7702 #include "confdefs.h"
7703
7704 /* Override any gcc2 internal prototype to avoid an error.  */
7705 #ifdef __cplusplus
7706 extern "C"
7707 #endif
7708 /* We use char because int might match the return type of a gcc2
7709    builtin and then its argument prototype would still apply.  */
7710 char dlsym ();
7711 int
7712 main (void)
7713 {
7714 dlsym ();
7715   ;
7716   return 0;
7717 }
7718 _ACEOF
7719 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7720 if { (eval echo "$as_me:7720: \"$ac_link\"") >&5
7721   (eval $ac_link) 2>&5
7722   ac_status=$?
7723   echo "$as_me:7723: \$? = $ac_status" >&5
7724   (exit "$ac_status"); } &&
7725          { ac_try='test -s "conftest$ac_exeext"'
7726   { (eval echo "$as_me:7726: \"$ac_try\"") >&5
7727   (eval $ac_try) 2>&5
7728   ac_status=$?
7729   echo "$as_me:7729: \$? = $ac_status" >&5
7730   (exit "$ac_status"); }; }; then
7731   ac_cv_lib_dl_dlsym=yes
7732 else
7733   echo "$as_me: failed program was:" >&5
7734 cat "conftest.$ac_ext" >&5
7735 ac_cv_lib_dl_dlsym=no
7736 fi
7737 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7738 LIBS=$ac_check_lib_save_LIBS
7739 fi
7740 echo "$as_me:7740: result: $ac_cv_lib_dl_dlsym" >&5
7741 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7742 if test "$ac_cv_lib_dl_dlsym" = yes; then
7743
7744         cf_have_dlsym=yes
7745         cf_have_libdl=yes
7746 fi
7747
7748 fi
7749
7750 if test "$cf_have_dlsym" = yes ; then
7751         test "$cf_have_libdl" = yes && {
7752 cf_add_libs="$LIBS"
7753 # reverse order
7754 cf_add_0lib=
7755 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7756 # filter duplicates
7757 for cf_add_1lib in $cf_add_0lib; do
7758         for cf_add_2lib in $cf_add_libs; do
7759                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7760                         cf_add_1lib=
7761                         break
7762                 fi
7763         done
7764         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7765 done
7766 LIBS="$cf_add_libs"
7767  }
7768
7769         echo "$as_me:7769: checking whether able to link to dl*() functions" >&5
7770 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7771         cat >"conftest.$ac_ext" <<_ACEOF
7772 #line 7772 "configure"
7773 #include "confdefs.h"
7774 #include <dlfcn.h>
7775 int
7776 main (void)
7777 {
7778
7779                 void *obj;
7780                 if ((obj = dlopen("filename", 0)) != 0) {
7781                         if (dlsym(obj, "symbolname") == 0) {
7782                         dlclose(obj);
7783                         }
7784                 }
7785   ;
7786   return 0;
7787 }
7788 _ACEOF
7789 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7790 if { (eval echo "$as_me:7790: \"$ac_link\"") >&5
7791   (eval $ac_link) 2>&5
7792   ac_status=$?
7793   echo "$as_me:7793: \$? = $ac_status" >&5
7794   (exit "$ac_status"); } &&
7795          { ac_try='test -s "conftest$ac_exeext"'
7796   { (eval echo "$as_me:7796: \"$ac_try\"") >&5
7797   (eval $ac_try) 2>&5
7798   ac_status=$?
7799   echo "$as_me:7799: \$? = $ac_status" >&5
7800   (exit "$ac_status"); }; }; then
7801
7802 cat >>confdefs.h <<\EOF
7803 #define HAVE_LIBDL 1
7804 EOF
7805
7806 else
7807   echo "$as_me: failed program was:" >&5
7808 cat "conftest.$ac_ext" >&5
7809
7810                 { { echo "$as_me:7810: error: Cannot link test program for libdl" >&5
7811 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7812    { (exit 1); exit 1; }; }
7813 fi
7814 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7815         echo "$as_me:7815: result: ok" >&5
7816 echo "${ECHO_T}ok" >&6
7817 else
7818         { { echo "$as_me:7818: error: Cannot find dlsym function" >&5
7819 echo "$as_me: error: Cannot find dlsym function" >&2;}
7820    { (exit 1); exit 1; }; }
7821 fi
7822
7823                 if test "x$with_gpm" != xyes ; then
7824                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7825
7826 echo "${as_me:-configure}:7826: testing assuming soname for gpm is $with_gpm ..." 1>&5
7827
7828                         cf_cv_gpm_soname="$with_gpm"
7829                 else
7830
7831 echo "$as_me:7831: checking for soname of gpm library" >&5
7832 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7833 if test "${cf_cv_gpm_soname+set}" = set; then
7834   echo $ECHO_N "(cached) $ECHO_C" >&6
7835 else
7836
7837 cf_cv_gpm_soname=unknown
7838 if test "$cross_compiling" != yes ; then
7839 cat >conftest.$ac_ext <<CF_EOF
7840 #include <gpm.h>
7841 int main(void)
7842 {
7843 if (Gpm_Open(0,0)) Gpm_Close();
7844         ${cf_cv_main_return:-return}(0);
7845 }
7846 CF_EOF
7847 cf_save_LIBS="$LIBS"
7848
7849 cf_add_libs="$LIBS"
7850 # reverse order
7851 cf_add_0lib=
7852 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7853 # filter duplicates
7854 for cf_add_1lib in $cf_add_0lib; do
7855         for cf_add_2lib in $cf_add_libs; do
7856                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7857                         cf_add_1lib=
7858                         break
7859                 fi
7860         done
7861         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7862 done
7863 LIBS="$cf_add_libs"
7864
7865         if { (eval echo "$as_me:7865: \"$ac_compile\"") >&5
7866   (eval $ac_compile) 2>&5
7867   ac_status=$?
7868   echo "$as_me:7868: \$? = $ac_status" >&5
7869   (exit "$ac_status"); } ; then
7870                 if { (eval echo "$as_me:7870: \"$ac_link\"") >&5
7871   (eval $ac_link) 2>&5
7872   ac_status=$?
7873   echo "$as_me:7873: \$? = $ac_status" >&5
7874   (exit "$ac_status"); } ; then
7875                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7876                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7877                 fi
7878         fi
7879 rm -rf ./conftest*
7880 LIBS="$cf_save_LIBS"
7881 fi
7882
7883 fi
7884 echo "$as_me:7884: result: $cf_cv_gpm_soname" >&5
7885 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7886
7887                 fi
7888                 test "$cf_cv_gpm_soname" != "unknown" &&
7889 cat >>confdefs.h <<EOF
7890 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7891 EOF
7892
7893                 SHLIB_LIST="-ldl $SHLIB_LIST"
7894
7895 cf_add_libs="$PRIVATE_LIBS"
7896 # reverse order
7897 cf_add_0lib=
7898 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7899 # filter duplicates
7900 for cf_add_1lib in $cf_add_0lib; do
7901         for cf_add_2lib in $cf_add_libs; do
7902                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7903                         cf_add_1lib=
7904                         break
7905                 fi
7906         done
7907         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7908 done
7909 PRIVATE_LIBS="$cf_add_libs"
7910
7911         else
7912                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7913
7914 cf_add_libs="$TEST_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 TEST_LIBS="$cf_add_libs"
7929
7930 cf_add_libs="$PRIVATE_LIBS"
7931 # reverse order
7932 cf_add_0lib=
7933 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7934 # filter duplicates
7935 for cf_add_1lib in $cf_add_0lib; do
7936         for cf_add_2lib in $cf_add_libs; do
7937                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7938                         cf_add_1lib=
7939                         break
7940                 fi
7941         done
7942         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7943 done
7944 PRIVATE_LIBS="$cf_add_libs"
7945
7946         fi
7947
7948 cat >>confdefs.h <<\EOF
7949 #define HAVE_LIBGPM 1
7950 EOF
7951
7952 echo "$as_me:7952: checking for Gpm_Wgetch in -lgpm" >&5
7953 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7954 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7955   echo $ECHO_N "(cached) $ECHO_C" >&6
7956 else
7957   ac_check_lib_save_LIBS=$LIBS
7958 LIBS="-lgpm  $LIBS"
7959 cat >"conftest.$ac_ext" <<_ACEOF
7960 #line 7960 "configure"
7961 #include "confdefs.h"
7962
7963 /* Override any gcc2 internal prototype to avoid an error.  */
7964 #ifdef __cplusplus
7965 extern "C"
7966 #endif
7967 /* We use char because int might match the return type of a gcc2
7968    builtin and then its argument prototype would still apply.  */
7969 char Gpm_Wgetch ();
7970 int
7971 main (void)
7972 {
7973 Gpm_Wgetch ();
7974   ;
7975   return 0;
7976 }
7977 _ACEOF
7978 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7979 if { (eval echo "$as_me:7979: \"$ac_link\"") >&5
7980   (eval $ac_link) 2>&5
7981   ac_status=$?
7982   echo "$as_me:7982: \$? = $ac_status" >&5
7983   (exit "$ac_status"); } &&
7984          { ac_try='test -s "conftest$ac_exeext"'
7985   { (eval echo "$as_me:7985: \"$ac_try\"") >&5
7986   (eval $ac_try) 2>&5
7987   ac_status=$?
7988   echo "$as_me:7988: \$? = $ac_status" >&5
7989   (exit "$ac_status"); }; }; then
7990   ac_cv_lib_gpm_Gpm_Wgetch=yes
7991 else
7992   echo "$as_me: failed program was:" >&5
7993 cat "conftest.$ac_ext" >&5
7994 ac_cv_lib_gpm_Gpm_Wgetch=no
7995 fi
7996 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7997 LIBS=$ac_check_lib_save_LIBS
7998 fi
7999 echo "$as_me:7999: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
8000 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
8001 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
8002
8003 echo "$as_me:8003: checking if GPM is weakly bound to curses library" >&5
8004 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
8005 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
8006   echo $ECHO_N "(cached) $ECHO_C" >&6
8007 else
8008
8009 cf_cv_check_gpm_wgetch=unknown
8010 if test "$cross_compiling" != yes ; then
8011
8012 cat >conftest.$ac_ext <<CF_EOF
8013 #include <gpm.h>
8014 int main(void)
8015 {
8016         Gpm_Wgetch();
8017         ${cf_cv_main_return:-return}(0);
8018 }
8019 CF_EOF
8020
8021         cf_save_LIBS="$LIBS"
8022         # This only works if we can look at the symbol table.  If a shared
8023         # library is stripped for install, we cannot use that.  So we're forced
8024         # to rely on the static library, noting that some packagers may not
8025         # include it.
8026         LIBS="-static -lgpm -dynamic $LIBS"
8027         if { (eval echo "$as_me:8027: \"$ac_compile\"") >&5
8028   (eval $ac_compile) 2>&5
8029   ac_status=$?
8030   echo "$as_me:8030: \$? = $ac_status" >&5
8031   (exit "$ac_status"); } ; then
8032                 if { (eval echo "$as_me:8032: \"$ac_link\"") >&5
8033   (eval $ac_link) 2>&5
8034   ac_status=$?
8035   echo "$as_me:8035: \$? = $ac_status" >&5
8036   (exit "$ac_status"); } ; then
8037                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
8038                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
8039                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
8040                 fi
8041         fi
8042         rm -rf ./conftest*
8043         LIBS="$cf_save_LIBS"
8044 fi
8045
8046 fi
8047 echo "$as_me:8047: result: $cf_cv_check_gpm_wgetch" >&5
8048 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
8049
8050 if test "$cf_cv_check_gpm_wgetch" != yes ; then
8051         { echo "$as_me:8051: WARNING: GPM library is already linked with curses - read the FAQ" >&5
8052 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
8053 fi
8054
8055 fi
8056
8057 fi
8058
8059 echo "$as_me:8059: checking if you want to use PCRE2 for regular-expressions" >&5
8060 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
8061
8062 # Check whether --with-pcre2 or --without-pcre2 was given.
8063 if test "${with_pcre2+set}" = set; then
8064   withval="$with_pcre2"
8065
8066 fi;
8067 test -z "$with_pcre2" && with_pcre2=no
8068 echo "$as_me:8068: result: $with_pcre2" >&5
8069 echo "${ECHO_T}$with_pcre2" >&6
8070
8071 if test "x$with_pcre2" != xno ; then
8072         cf_with_pcre2_ok=no
8073         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
8074         do
8075
8076 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
8077         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
8078
8079 echo "${as_me:-configure}:8079: testing found package $cf_with_pcre2 ..." 1>&5
8080
8081         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
8082         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
8083         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
8084
8085 echo "${as_me:-configure}:8085: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
8086
8087         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
8088
8089 echo "${as_me:-configure}:8089: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
8090
8091 cf_fix_cppflags=no
8092 cf_new_cflags=
8093 cf_new_cppflags=
8094 cf_new_extra_cppflags=
8095
8096 for cf_add_cflags in $cf_pkgconfig_incs
8097 do
8098 case "$cf_fix_cppflags" in
8099 (no)
8100         case "$cf_add_cflags" in
8101         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8102                 case "$cf_add_cflags" in
8103                 (-D*)
8104                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8105
8106                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8107                                 && test -z "${cf_tst_cflags}" \
8108                                 && cf_fix_cppflags=yes
8109
8110                         if test "$cf_fix_cppflags" = yes ; then
8111
8112         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8113         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8114
8115                                 continue
8116                         elif test "${cf_tst_cflags}" = "\"'" ; then
8117
8118         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8119         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8120
8121                                 continue
8122                         fi
8123                         ;;
8124                 esac
8125                 case "$CPPFLAGS" in
8126                 (*$cf_add_cflags)
8127                         ;;
8128                 (*)
8129                         case "$cf_add_cflags" in
8130                         (-D*)
8131                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8132
8133 CPPFLAGS=`echo "$CPPFLAGS" | \
8134         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8135                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8136
8137                                 ;;
8138                         esac
8139
8140         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8141         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8142
8143                         ;;
8144                 esac
8145                 ;;
8146         (*)
8147
8148         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8149         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8150
8151                 ;;
8152         esac
8153         ;;
8154 (yes)
8155
8156         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8157         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8158
8159         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8160
8161         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8162                 && test -z "${cf_tst_cflags}" \
8163                 && cf_fix_cppflags=no
8164         ;;
8165 esac
8166 done
8167
8168 if test -n "$cf_new_cflags" ; then
8169
8170         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8171         CFLAGS="${CFLAGS}$cf_new_cflags"
8172
8173 fi
8174
8175 if test -n "$cf_new_cppflags" ; then
8176
8177         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8178         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8179
8180 fi
8181
8182 if test -n "$cf_new_extra_cppflags" ; then
8183
8184         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8185         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8186
8187 fi
8188
8189 cf_add_libs="$LIBS"
8190 # reverse order
8191 cf_add_0lib=
8192 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8193 # filter duplicates
8194 for cf_add_1lib in $cf_add_0lib; do
8195         for cf_add_2lib in $cf_add_libs; do
8196                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8197                         cf_add_1lib=
8198                         break
8199                 fi
8200         done
8201         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8202 done
8203 LIBS="$cf_add_libs"
8204
8205         cf_with_pcre2_ok=yes; break
8206 else
8207         cf_pkgconfig_incs=
8208         cf_pkgconfig_libs=
8209         :
8210 fi
8211
8212         done
8213         cf_with_pcre2_ok=yes || { { echo "$as_me:8213: error: Cannot find PCRE2 library" >&5
8214 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
8215    { (exit 1); exit 1; }; }
8216
8217 cat >>confdefs.h <<\EOF
8218 #define HAVE_LIB_PCRE2 1
8219 EOF
8220
8221         # if pkgconfig gave no results, look for the libraries directly
8222         case "$LIBS" in
8223         (*pcre2-posix*|*pcreposix*)
8224                 ;;
8225         (*)
8226                 echo "$as_me:8226: checking for regcomp in -lpcre2-posix" >&5
8227 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
8228 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
8229   echo $ECHO_N "(cached) $ECHO_C" >&6
8230 else
8231   ac_check_lib_save_LIBS=$LIBS
8232 LIBS="-lpcre2-posix  $LIBS"
8233 cat >"conftest.$ac_ext" <<_ACEOF
8234 #line 8234 "configure"
8235 #include "confdefs.h"
8236
8237 /* Override any gcc2 internal prototype to avoid an error.  */
8238 #ifdef __cplusplus
8239 extern "C"
8240 #endif
8241 /* We use char because int might match the return type of a gcc2
8242    builtin and then its argument prototype would still apply.  */
8243 char regcomp ();
8244 int
8245 main (void)
8246 {
8247 regcomp ();
8248   ;
8249   return 0;
8250 }
8251 _ACEOF
8252 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8253 if { (eval echo "$as_me:8253: \"$ac_link\"") >&5
8254   (eval $ac_link) 2>&5
8255   ac_status=$?
8256   echo "$as_me:8256: \$? = $ac_status" >&5
8257   (exit "$ac_status"); } &&
8258          { ac_try='test -s "conftest$ac_exeext"'
8259   { (eval echo "$as_me:8259: \"$ac_try\"") >&5
8260   (eval $ac_try) 2>&5
8261   ac_status=$?
8262   echo "$as_me:8262: \$? = $ac_status" >&5
8263   (exit "$ac_status"); }; }; then
8264   ac_cv_lib_pcre2_posix_regcomp=yes
8265 else
8266   echo "$as_me: failed program was:" >&5
8267 cat "conftest.$ac_ext" >&5
8268 ac_cv_lib_pcre2_posix_regcomp=no
8269 fi
8270 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8271 LIBS=$ac_check_lib_save_LIBS
8272 fi
8273 echo "$as_me:8273: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
8274 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
8275 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
8276
8277 cf_add_libs="$LIBS"
8278 # reverse order
8279 cf_add_0lib=
8280 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8281 # filter duplicates
8282 for cf_add_1lib in $cf_add_0lib; do
8283         for cf_add_2lib in $cf_add_libs; do
8284                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8285                         cf_add_1lib=
8286                         break
8287                 fi
8288         done
8289         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8290 done
8291 LIBS="$cf_add_libs"
8292
8293 else
8294   echo "$as_me:8294: checking for regcomp in -lpcreposix" >&5
8295 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
8296 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
8297   echo $ECHO_N "(cached) $ECHO_C" >&6
8298 else
8299   ac_check_lib_save_LIBS=$LIBS
8300 LIBS="-lpcreposix  $LIBS"
8301 cat >"conftest.$ac_ext" <<_ACEOF
8302 #line 8302 "configure"
8303 #include "confdefs.h"
8304
8305 /* Override any gcc2 internal prototype to avoid an error.  */
8306 #ifdef __cplusplus
8307 extern "C"
8308 #endif
8309 /* We use char because int might match the return type of a gcc2
8310    builtin and then its argument prototype would still apply.  */
8311 char regcomp ();
8312 int
8313 main (void)
8314 {
8315 regcomp ();
8316   ;
8317   return 0;
8318 }
8319 _ACEOF
8320 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8321 if { (eval echo "$as_me:8321: \"$ac_link\"") >&5
8322   (eval $ac_link) 2>&5
8323   ac_status=$?
8324   echo "$as_me:8324: \$? = $ac_status" >&5
8325   (exit "$ac_status"); } &&
8326          { ac_try='test -s "conftest$ac_exeext"'
8327   { (eval echo "$as_me:8327: \"$ac_try\"") >&5
8328   (eval $ac_try) 2>&5
8329   ac_status=$?
8330   echo "$as_me:8330: \$? = $ac_status" >&5
8331   (exit "$ac_status"); }; }; then
8332   ac_cv_lib_pcreposix_regcomp=yes
8333 else
8334   echo "$as_me: failed program was:" >&5
8335 cat "conftest.$ac_ext" >&5
8336 ac_cv_lib_pcreposix_regcomp=no
8337 fi
8338 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8339 LIBS=$ac_check_lib_save_LIBS
8340 fi
8341 echo "$as_me:8341: result: $ac_cv_lib_pcreposix_regcomp" >&5
8342 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
8343 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
8344
8345 cf_add_libs="$LIBS"
8346 # reverse order
8347 cf_add_0lib=
8348 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8349 # filter duplicates
8350 for cf_add_1lib in $cf_add_0lib; do
8351         for cf_add_2lib in $cf_add_libs; do
8352                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8353                         cf_add_1lib=
8354                         break
8355                 fi
8356         done
8357         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8358 done
8359 LIBS="$cf_add_libs"
8360
8361 else
8362   { { echo "$as_me:8362: error: Cannot find PCRE2 POSIX library" >&5
8363 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
8364    { (exit 1); exit 1; }; }
8365 fi
8366
8367 fi
8368
8369                 ;;
8370         esac
8371
8372         # either way, check for the library header files
8373
8374 for ac_header in pcre2posix.h pcreposix.h
8375 do
8376 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8377 echo "$as_me:8377: checking for $ac_header" >&5
8378 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8379 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8380   echo $ECHO_N "(cached) $ECHO_C" >&6
8381 else
8382   cat >"conftest.$ac_ext" <<_ACEOF
8383 #line 8383 "configure"
8384 #include "confdefs.h"
8385 #include <$ac_header>
8386 _ACEOF
8387 if { (eval echo "$as_me:8387: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8388   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8389   ac_status=$?
8390   $EGREP -v '^ *\+' conftest.er1 >conftest.err
8391   rm -f conftest.er1
8392   cat conftest.err >&5
8393   echo "$as_me:8393: \$? = $ac_status" >&5
8394   (exit "$ac_status"); } >/dev/null; then
8395   if test -s conftest.err; then
8396     ac_cpp_err=$ac_c_preproc_warn_flag
8397   else
8398     ac_cpp_err=
8399   fi
8400 else
8401   ac_cpp_err=yes
8402 fi
8403 if test -z "$ac_cpp_err"; then
8404   eval "$as_ac_Header=yes"
8405 else
8406   echo "$as_me: failed program was:" >&5
8407   cat "conftest.$ac_ext" >&5
8408   eval "$as_ac_Header=no"
8409 fi
8410 rm -f conftest.err "conftest.$ac_ext"
8411 fi
8412 echo "$as_me:8412: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8413 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8414 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8415   cat >>confdefs.h <<EOF
8416 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8417 EOF
8418
8419 fi
8420 done
8421
8422 for ac_func in PCRE2regcomp
8423 do
8424 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8425 echo "$as_me:8425: checking for $ac_func" >&5
8426 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8427 if eval "test \"\${$as_ac_var+set}\" = set"; then
8428   echo $ECHO_N "(cached) $ECHO_C" >&6
8429 else
8430   cat >"conftest.$ac_ext" <<_ACEOF
8431 #line 8431 "configure"
8432 #include "confdefs.h"
8433 #define $ac_func autoconf_temporary
8434 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8435 #undef $ac_func
8436
8437 #ifdef __cplusplus
8438 extern "C"
8439 #endif
8440
8441 /* We use char because int might match the return type of a gcc2
8442    builtin and then its argument prototype would still apply.  */
8443 char $ac_func (void);
8444
8445 int
8446 main (void)
8447 {
8448
8449 /* The GNU C library defines stubs for functions which it implements
8450     to always fail with ENOSYS.  Some functions are actually named
8451     something starting with __ and the normal name is an alias.  */
8452 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8453 #error found stub for $ac_func
8454 #endif
8455
8456         return $ac_func ();
8457   ;
8458   return 0;
8459 }
8460 _ACEOF
8461 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8462 if { (eval echo "$as_me:8462: \"$ac_link\"") >&5
8463   (eval $ac_link) 2>&5
8464   ac_status=$?
8465   echo "$as_me:8465: \$? = $ac_status" >&5
8466   (exit "$ac_status"); } &&
8467          { ac_try='test -s "conftest$ac_exeext"'
8468   { (eval echo "$as_me:8468: \"$ac_try\"") >&5
8469   (eval $ac_try) 2>&5
8470   ac_status=$?
8471   echo "$as_me:8471: \$? = $ac_status" >&5
8472   (exit "$ac_status"); }; }; then
8473   eval "$as_ac_var=yes"
8474 else
8475   echo "$as_me: failed program was:" >&5
8476 cat "conftest.$ac_ext" >&5
8477 eval "$as_ac_var=no"
8478 fi
8479 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8480 fi
8481 echo "$as_me:8481: result: `eval echo '${'"$as_ac_var"'}'`" >&5
8482 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
8483 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
8484   cat >>confdefs.h <<EOF
8485 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8486 EOF
8487
8488 fi
8489 done
8490
8491 fi
8492
8493 # not everyone has "test -c"
8494 if test -c /dev/sysmouse 2>/dev/null ; then
8495 echo "$as_me:8495: checking if you want to use sysmouse" >&5
8496 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
8497
8498 # Check whether --with-sysmouse or --without-sysmouse was given.
8499 if test "${with_sysmouse+set}" = set; then
8500   withval="$with_sysmouse"
8501   cf_with_sysmouse=$withval
8502 else
8503   cf_with_sysmouse=maybe
8504 fi;
8505         if test "$cf_with_sysmouse" != no ; then
8506         cat >"conftest.$ac_ext" <<_ACEOF
8507 #line 8507 "configure"
8508 #include "confdefs.h"
8509
8510 #include <osreldate.h>
8511 #if (__FreeBSD_version >= 400017)
8512 #include <sys/consio.h>
8513 #include <sys/fbio.h>
8514 #else
8515 #include <machine/console.h>
8516 #endif
8517
8518 int
8519 main (void)
8520 {
8521
8522         struct mouse_info the_mouse;
8523         ioctl(0, CONS_MOUSECTL, &the_mouse);
8524
8525   ;
8526   return 0;
8527 }
8528 _ACEOF
8529 rm -f "conftest.$ac_objext"
8530 if { (eval echo "$as_me:8530: \"$ac_compile\"") >&5
8531   (eval $ac_compile) 2>&5
8532   ac_status=$?
8533   echo "$as_me:8533: \$? = $ac_status" >&5
8534   (exit "$ac_status"); } &&
8535          { ac_try='test -s "conftest.$ac_objext"'
8536   { (eval echo "$as_me:8536: \"$ac_try\"") >&5
8537   (eval $ac_try) 2>&5
8538   ac_status=$?
8539   echo "$as_me:8539: \$? = $ac_status" >&5
8540   (exit "$ac_status"); }; }; then
8541   cf_with_sysmouse=yes
8542 else
8543   echo "$as_me: failed program was:" >&5
8544 cat "conftest.$ac_ext" >&5
8545 cf_with_sysmouse=no
8546 fi
8547 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8548         fi
8549 echo "$as_me:8549: result: $cf_with_sysmouse" >&5
8550 echo "${ECHO_T}$cf_with_sysmouse" >&6
8551 test "$cf_with_sysmouse" = yes &&
8552 cat >>confdefs.h <<\EOF
8553 #define USE_SYSMOUSE 1
8554 EOF
8555
8556 fi
8557
8558 # pretend that ncurses==ncursesw==ncursest
8559 echo "$as_me:8559: checking if you want to disable library suffixes" >&5
8560 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
8561
8562 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
8563 if test "${enable_lib_suffixes+set}" = set; then
8564   enableval="$enable_lib_suffixes"
8565   test "$enableval" != no && enableval=yes
8566         if test "$enableval" != "yes" ; then
8567     disable_lib_suffixes=yes
8568         else
8569                 disable_lib_suffixes=no
8570         fi
8571 else
8572   enableval=yes
8573         disable_lib_suffixes=no
8574
8575 fi;
8576 echo "$as_me:8576: result: $disable_lib_suffixes" >&5
8577 echo "${ECHO_T}$disable_lib_suffixes" >&6
8578
8579 ### If we're building with rpath, try to link non-standard libs that way too.
8580 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
8581
8582 echo "$as_me:8582: checking if rpath-hack should be disabled" >&5
8583 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
8584
8585 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
8586 if test "${enable_rpath_hack+set}" = set; then
8587   enableval="$enable_rpath_hack"
8588   test "$enableval" != no && enableval=yes
8589         if test "$enableval" != "yes" ; then
8590     enable_rpath_hack=no
8591         else
8592                 enable_rpath_hack=yes
8593         fi
8594 else
8595   enableval=yes
8596         enable_rpath_hack=yes
8597
8598 fi;
8599 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
8600 echo "$as_me:8600: result: $cf_disable_rpath_hack" >&5
8601 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
8602
8603 if test "$enable_rpath_hack" = yes ; then
8604
8605 echo "$as_me:8605: checking for updated LDFLAGS" >&5
8606 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
8607 if test -n "$LD_RPATH_OPT" ; then
8608         echo "$as_me:8608: result: maybe" >&5
8609 echo "${ECHO_T}maybe" >&6
8610
8611         for ac_prog in ldd
8612 do
8613   # Extract the first word of "$ac_prog", so it can be a program name with args.
8614 set dummy $ac_prog; ac_word=$2
8615 echo "$as_me:8615: checking for $ac_word" >&5
8616 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8617 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
8618   echo $ECHO_N "(cached) $ECHO_C" >&6
8619 else
8620   if test -n "$cf_ldd_prog"; then
8621   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
8622 else
8623   ac_save_IFS=$IFS; IFS=$ac_path_separator
8624 ac_dummy="$PATH"
8625 for ac_dir in $ac_dummy; do
8626   IFS=$ac_save_IFS
8627   test -z "$ac_dir" && ac_dir=.
8628   $as_executable_p "$ac_dir/$ac_word" || continue
8629 ac_cv_prog_cf_ldd_prog="$ac_prog"
8630 echo "$as_me:8630: found $ac_dir/$ac_word" >&5
8631 break
8632 done
8633
8634 fi
8635 fi
8636 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
8637 if test -n "$cf_ldd_prog"; then
8638   echo "$as_me:8638: result: $cf_ldd_prog" >&5
8639 echo "${ECHO_T}$cf_ldd_prog" >&6
8640 else
8641   echo "$as_me:8641: result: no" >&5
8642 echo "${ECHO_T}no" >&6
8643 fi
8644
8645   test -n "$cf_ldd_prog" && break
8646 done
8647 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
8648
8649         cf_rpath_list="/usr/lib /lib"
8650         if test "$cf_ldd_prog" != no
8651         then
8652                 cf_rpath_oops=
8653
8654 cat >"conftest.$ac_ext" <<_ACEOF
8655 #line 8655 "configure"
8656 #include "confdefs.h"
8657 #include <stdio.h>
8658 int
8659 main (void)
8660 {
8661 printf("Hello");
8662   ;
8663   return 0;
8664 }
8665 _ACEOF
8666 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8667 if { (eval echo "$as_me:8667: \"$ac_link\"") >&5
8668   (eval $ac_link) 2>&5
8669   ac_status=$?
8670   echo "$as_me:8670: \$? = $ac_status" >&5
8671   (exit "$ac_status"); } &&
8672          { ac_try='test -s "conftest$ac_exeext"'
8673   { (eval echo "$as_me:8673: \"$ac_try\"") >&5
8674   (eval $ac_try) 2>&5
8675   ac_status=$?
8676   echo "$as_me:8676: \$? = $ac_status" >&5
8677   (exit "$ac_status"); }; }; then
8678   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
8679                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
8680 else
8681   echo "$as_me: failed program was:" >&5
8682 cat "conftest.$ac_ext" >&5
8683 fi
8684 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8685
8686                 # If we passed the link-test, but get a "not found" on a given library,
8687                 # this could be due to inept reconfiguration of gcc to make it only
8688                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
8689                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
8690                 # /usr/local libraries.
8691                 if test -n "$cf_rpath_oops"
8692                 then
8693                         for cf_rpath_src in $cf_rpath_oops
8694                         do
8695                                 for cf_rpath_dir in \
8696                                         /usr/local \
8697                                         /usr/pkg \
8698                                         /opt/sfw
8699                                 do
8700                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8701                                         then
8702                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8703
8704 echo "${as_me:-configure}:8704: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8705
8706                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8707                                                 break
8708                                         fi
8709                                 done
8710                         done
8711                 fi
8712         fi
8713
8714         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8715
8716 echo "${as_me:-configure}:8716: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8717
8718 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8719
8720 echo "${as_me:-configure}:8720: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8721
8722 cf_rpath_dst=
8723 for cf_rpath_src in $LDFLAGS
8724 do
8725         case "$cf_rpath_src" in
8726         (-L*)
8727
8728                 # check if this refers to a directory which we will ignore
8729                 cf_rpath_skip=no
8730                 if test -n "$cf_rpath_list"
8731                 then
8732                         for cf_rpath_item in $cf_rpath_list
8733                         do
8734                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8735                                 then
8736                                         cf_rpath_skip=yes
8737                                         break
8738                                 fi
8739                         done
8740                 fi
8741
8742                 if test "$cf_rpath_skip" = no
8743                 then
8744                         # transform the option
8745                         if test "$LD_RPATH_OPT" = "-R " ; then
8746                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8747                         else
8748                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8749                         fi
8750
8751                         # if we have not already added this, add it now
8752                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8753                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8754                         then
8755                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8756
8757 echo "${as_me:-configure}:8757: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8758
8759                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8760                         fi
8761                 fi
8762                 ;;
8763         esac
8764         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8765 done
8766 LDFLAGS=$cf_rpath_dst
8767
8768 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8769
8770 echo "${as_me:-configure}:8770: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8771
8772 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8773
8774 echo "${as_me:-configure}:8774: testing ...checking LIBS $LIBS ..." 1>&5
8775
8776 cf_rpath_dst=
8777 for cf_rpath_src in $LIBS
8778 do
8779         case "$cf_rpath_src" in
8780         (-L*)
8781
8782                 # check if this refers to a directory which we will ignore
8783                 cf_rpath_skip=no
8784                 if test -n "$cf_rpath_list"
8785                 then
8786                         for cf_rpath_item in $cf_rpath_list
8787                         do
8788                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8789                                 then
8790                                         cf_rpath_skip=yes
8791                                         break
8792                                 fi
8793                         done
8794                 fi
8795
8796                 if test "$cf_rpath_skip" = no
8797                 then
8798                         # transform the option
8799                         if test "$LD_RPATH_OPT" = "-R " ; then
8800                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8801                         else
8802                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8803                         fi
8804
8805                         # if we have not already added this, add it now
8806                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8807                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8808                         then
8809                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8810
8811 echo "${as_me:-configure}:8811: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8812
8813                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8814                         fi
8815                 fi
8816                 ;;
8817         esac
8818         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8819 done
8820 LIBS=$cf_rpath_dst
8821
8822 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8823
8824 echo "${as_me:-configure}:8824: testing ...checked LIBS $LIBS ..." 1>&5
8825
8826         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8827
8828 echo "${as_me:-configure}:8828: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8829
8830 else
8831         echo "$as_me:8831: result: no" >&5
8832 echo "${ECHO_T}no" >&6
8833 fi
8834
8835 fi
8836
8837 fi
8838
8839 ### Depending on the system, someone may use rpath to build ncurses but not
8840 # want users of the package to rely upon that feature.  Give those people an
8841 # option to suppress that detail from EXTRA_LDFLAGS.
8842 EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
8843 if test -n "$EXTRA_PKG_LDFLAGS"
8844 then
8845         echo "$as_me:8845: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8846 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8847
8848 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8849 if test "${enable_pkg_ldflags+set}" = set; then
8850   enableval="$enable_pkg_ldflags"
8851   test "$enableval" != no && enableval=yes
8852         if test "$enableval" != "yes" ; then
8853     disable_pkg_ldflags=yes
8854         else
8855                 disable_pkg_ldflags=no
8856         fi
8857 else
8858   enableval=yes
8859         disable_pkg_ldflags=no
8860
8861 fi;
8862         echo "$as_me:8862: result: $disable_pkg_ldflags" >&5
8863 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8864         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8865 fi
8866
8867 ###############################################################################
8868
8869 ###     use option --with-extra-suffix to append suffix to headers and libraries
8870 echo "$as_me:8870: checking if you wish to append extra suffix to header/library paths" >&5
8871 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8872 EXTRA_SUFFIX=
8873
8874 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8875 if test "${with_extra_suffix+set}" = set; then
8876   withval="$with_extra_suffix"
8877   case x$withval in
8878         (xno)
8879                 ;;
8880         (xyes|x)
8881                 EXTRA_SUFFIX=$cf_cv_abi_version
8882                 ;;
8883         (*)
8884                 EXTRA_SUFFIX=$withval
8885                 ;;
8886         esac
8887
8888 fi;
8889 echo "$as_me:8889: result: $EXTRA_SUFFIX" >&5
8890 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8891
8892 ###     use option --disable-overwrite to leave out the link to -lcurses
8893 echo "$as_me:8893: checking if you wish to install ncurses overwriting curses" >&5
8894 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8895
8896 # Check whether --enable-overwrite or --disable-overwrite was given.
8897 if test "${enable_overwrite+set}" = set; then
8898   enableval="$enable_overwrite"
8899   with_overwrite=$enableval
8900 else
8901   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8902 fi;
8903 echo "$as_me:8903: result: $with_overwrite" >&5
8904 echo "${ECHO_T}$with_overwrite" >&6
8905
8906 echo "$as_me:8906: checking if external terminfo-database is used" >&5
8907 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8908
8909 # Check whether --enable-database or --disable-database was given.
8910 if test "${enable_database+set}" = set; then
8911   enableval="$enable_database"
8912   use_database=$enableval
8913 else
8914   use_database=yes
8915 fi;
8916 echo "$as_me:8916: result: $use_database" >&5
8917 echo "${ECHO_T}$use_database" >&6
8918
8919 case "$host_os" in
8920 (os2*)
8921         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8922         ;;
8923 (*)
8924         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8925         ;;
8926 esac
8927
8928 NCURSES_USE_DATABASE=0
8929 if test "$use_database" != no ; then
8930         NCURSES_USE_DATABASE=1
8931
8932         echo "$as_me:8932: checking which terminfo source-file will be installed" >&5
8933 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8934
8935 # Check whether --with-database or --without-database was given.
8936 if test "${with_database+set}" = set; then
8937   withval="$with_database"
8938   TERMINFO_SRC=$withval
8939 fi;
8940         echo "$as_me:8940: result: $TERMINFO_SRC" >&5
8941 echo "${ECHO_T}$TERMINFO_SRC" >&6
8942
8943         echo "$as_me:8943: checking whether to use hashed database instead of directory/tree" >&5
8944 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8945
8946 # Check whether --with-hashed-db or --without-hashed-db was given.
8947 if test "${with_hashed_db+set}" = set; then
8948   withval="$with_hashed_db"
8949
8950 else
8951   with_hashed_db=no
8952 fi;
8953         echo "$as_me:8953: result: $with_hashed_db" >&5
8954 echo "${ECHO_T}$with_hashed_db" >&6
8955 else
8956         with_hashed_db=no
8957 fi
8958
8959 echo "$as_me:8959: checking for list of fallback descriptions" >&5
8960 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8961
8962 # Check whether --with-fallbacks or --without-fallbacks was given.
8963 if test "${with_fallbacks+set}" = set; then
8964   withval="$with_fallbacks"
8965   with_fallback=$withval
8966 else
8967   with_fallback=
8968 fi;
8969 echo "$as_me:8969: result: $with_fallback" >&5
8970 echo "${ECHO_T}$with_fallback" >&6
8971
8972 case ".$with_fallback" in
8973 (.|.no)
8974         FALLBACK_LIST=
8975         ;;
8976 (.yes)
8977         { echo "$as_me:8977: WARNING: expected a list of terminal descriptions" >&5
8978 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8979         ;;
8980 (*)
8981         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8982         ;;
8983 esac
8984
8985 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8986 # tree for generating the terminal descriptions that will be compiled into the
8987 # library.  If your toolchain is old, it may not handle current terminal
8988 # databases.  Use configure-options to point to the tools which will be used,
8989 # rather than the first ones found on the $PATH.
8990 if test -n "$ac_tool_prefix"; then
8991   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8992 set dummy ${ac_tool_prefix}tic; ac_word=$2
8993 echo "$as_me:8993: checking for $ac_word" >&5
8994 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8995 if test "${ac_cv_prog_TIC+set}" = set; then
8996   echo $ECHO_N "(cached) $ECHO_C" >&6
8997 else
8998   if test -n "$TIC"; then
8999   ac_cv_prog_TIC="$TIC" # Let the user override the test.
9000 else
9001   ac_save_IFS=$IFS; IFS=$ac_path_separator
9002 ac_dummy="$PATH"
9003 for ac_dir in $ac_dummy; do
9004   IFS=$ac_save_IFS
9005   test -z "$ac_dir" && ac_dir=.
9006   $as_executable_p "$ac_dir/$ac_word" || continue
9007 ac_cv_prog_TIC="${ac_tool_prefix}tic"
9008 echo "$as_me:9008: found $ac_dir/$ac_word" >&5
9009 break
9010 done
9011
9012 fi
9013 fi
9014 TIC=$ac_cv_prog_TIC
9015 if test -n "$TIC"; then
9016   echo "$as_me:9016: result: $TIC" >&5
9017 echo "${ECHO_T}$TIC" >&6
9018 else
9019   echo "$as_me:9019: result: no" >&5
9020 echo "${ECHO_T}no" >&6
9021 fi
9022
9023 fi
9024 if test -z "$ac_cv_prog_TIC"; then
9025   ac_ct_TIC=$TIC
9026   # Extract the first word of "tic", so it can be a program name with args.
9027 set dummy tic; ac_word=$2
9028 echo "$as_me:9028: checking for $ac_word" >&5
9029 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9030 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
9031   echo $ECHO_N "(cached) $ECHO_C" >&6
9032 else
9033   if test -n "$ac_ct_TIC"; then
9034   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
9035 else
9036   ac_save_IFS=$IFS; IFS=$ac_path_separator
9037 ac_dummy="$PATH"
9038 for ac_dir in $ac_dummy; do
9039   IFS=$ac_save_IFS
9040   test -z "$ac_dir" && ac_dir=.
9041   $as_executable_p "$ac_dir/$ac_word" || continue
9042 ac_cv_prog_ac_ct_TIC="tic"
9043 echo "$as_me:9043: found $ac_dir/$ac_word" >&5
9044 break
9045 done
9046
9047 fi
9048 fi
9049 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
9050 if test -n "$ac_ct_TIC"; then
9051   echo "$as_me:9051: result: $ac_ct_TIC" >&5
9052 echo "${ECHO_T}$ac_ct_TIC" >&6
9053 else
9054   echo "$as_me:9054: result: no" >&5
9055 echo "${ECHO_T}no" >&6
9056 fi
9057
9058   TIC=$ac_ct_TIC
9059 else
9060   TIC="$ac_cv_prog_TIC"
9061 fi
9062
9063 if test -n "$ac_tool_prefix"; then
9064   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
9065 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
9066 echo "$as_me:9066: checking for $ac_word" >&5
9067 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9068 if test "${ac_cv_prog_INFOCMP+set}" = set; then
9069   echo $ECHO_N "(cached) $ECHO_C" >&6
9070 else
9071   if test -n "$INFOCMP"; then
9072   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
9073 else
9074   ac_save_IFS=$IFS; IFS=$ac_path_separator
9075 ac_dummy="$PATH"
9076 for ac_dir in $ac_dummy; do
9077   IFS=$ac_save_IFS
9078   test -z "$ac_dir" && ac_dir=.
9079   $as_executable_p "$ac_dir/$ac_word" || continue
9080 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
9081 echo "$as_me:9081: found $ac_dir/$ac_word" >&5
9082 break
9083 done
9084
9085 fi
9086 fi
9087 INFOCMP=$ac_cv_prog_INFOCMP
9088 if test -n "$INFOCMP"; then
9089   echo "$as_me:9089: result: $INFOCMP" >&5
9090 echo "${ECHO_T}$INFOCMP" >&6
9091 else
9092   echo "$as_me:9092: result: no" >&5
9093 echo "${ECHO_T}no" >&6
9094 fi
9095
9096 fi
9097 if test -z "$ac_cv_prog_INFOCMP"; then
9098   ac_ct_INFOCMP=$INFOCMP
9099   # Extract the first word of "infocmp", so it can be a program name with args.
9100 set dummy infocmp; ac_word=$2
9101 echo "$as_me:9101: checking for $ac_word" >&5
9102 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9103 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
9104   echo $ECHO_N "(cached) $ECHO_C" >&6
9105 else
9106   if test -n "$ac_ct_INFOCMP"; then
9107   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
9108 else
9109   ac_save_IFS=$IFS; IFS=$ac_path_separator
9110 ac_dummy="$PATH"
9111 for ac_dir in $ac_dummy; do
9112   IFS=$ac_save_IFS
9113   test -z "$ac_dir" && ac_dir=.
9114   $as_executable_p "$ac_dir/$ac_word" || continue
9115 ac_cv_prog_ac_ct_INFOCMP="infocmp"
9116 echo "$as_me:9116: found $ac_dir/$ac_word" >&5
9117 break
9118 done
9119
9120 fi
9121 fi
9122 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
9123 if test -n "$ac_ct_INFOCMP"; then
9124   echo "$as_me:9124: result: $ac_ct_INFOCMP" >&5
9125 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
9126 else
9127   echo "$as_me:9127: result: no" >&5
9128 echo "${ECHO_T}no" >&6
9129 fi
9130
9131   INFOCMP=$ac_ct_INFOCMP
9132 else
9133   INFOCMP="$ac_cv_prog_INFOCMP"
9134 fi
9135
9136 if test -n "$FALLBACK_LIST"
9137 then
9138
9139 # Check whether --with-tic-path or --without-tic-path was given.
9140 if test "${with_tic_path+set}" = set; then
9141   withval="$with_tic_path"
9142   echo "$as_me:9142: checking for tic program for fallbacks" >&5
9143 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
9144                 TIC=$withval
9145                 echo "$as_me:9145: result: $TIC" >&5
9146 echo "${ECHO_T}$TIC" >&6
9147
9148 if test "x$prefix" != xNONE; then
9149         cf_path_syntax="$prefix"
9150 else
9151         cf_path_syntax="$ac_default_prefix"
9152 fi
9153
9154 case ".$TIC" in
9155 (.\$\(*\)*|.\'*\'*)
9156         ;;
9157 (..|./*|.\\*)
9158         ;;
9159 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9160         ;;
9161 (.\$\{*prefix\}*|.\$\{*dir\}*)
9162         eval TIC="$TIC"
9163         case ".$TIC" in
9164         (.NONE/*)
9165                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
9166                 ;;
9167         esac
9168         ;;
9169 (.no|.NONE/*)
9170         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
9171         ;;
9172 (*)
9173         { { echo "$as_me:9173: error: expected a pathname, not \"$TIC\"" >&5
9174 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
9175    { (exit 1); exit 1; }; }
9176         ;;
9177 esac
9178
9179 else
9180
9181 test -z "$TIC" && TIC="tic"
9182 for ac_prog in $TIC tic
9183 do
9184   # Extract the first word of "$ac_prog", so it can be a program name with args.
9185 set dummy $ac_prog; ac_word=$2
9186 echo "$as_me:9186: checking for $ac_word" >&5
9187 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9188 if test "${ac_cv_path_TIC+set}" = set; then
9189   echo $ECHO_N "(cached) $ECHO_C" >&6
9190 else
9191   case $TIC in
9192   [\\/]* | ?:[\\/]*)
9193   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
9194   ;;
9195   *)
9196   ac_save_IFS=$IFS; IFS=$ac_path_separator
9197 ac_dummy="$PATH:/usr/local/ncurses/bin"
9198 for ac_dir in $ac_dummy; do
9199   IFS=$ac_save_IFS
9200   test -z "$ac_dir" && ac_dir=.
9201   if $as_executable_p "$ac_dir/$ac_word"; then
9202    ac_cv_path_TIC="$ac_dir/$ac_word"
9203    echo "$as_me:9203: found $ac_dir/$ac_word" >&5
9204    break
9205 fi
9206 done
9207
9208   ;;
9209 esac
9210 fi
9211 TIC=$ac_cv_path_TIC
9212
9213 if test -n "$TIC"; then
9214   echo "$as_me:9214: result: $TIC" >&5
9215 echo "${ECHO_T}$TIC" >&6
9216 else
9217   echo "$as_me:9217: result: no" >&5
9218 echo "${ECHO_T}no" >&6
9219 fi
9220
9221   test -n "$TIC" && break
9222 done
9223 test -n "$TIC" || TIC="$TIC"
9224
9225 cf_path_prog=""
9226 cf_path_args=""
9227 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
9228 for cf_temp in $ac_cv_path_TIC
9229 do
9230         if test -z "$cf_path_prog" ; then
9231                 if test "$with_full_paths" = yes ; then
9232
9233 if test "x$prefix" != xNONE; then
9234         cf_path_syntax="$prefix"
9235 else
9236         cf_path_syntax="$ac_default_prefix"
9237 fi
9238
9239 case ".$cf_temp" in
9240 (.\$\(*\)*|.\'*\'*)
9241         ;;
9242 (..|./*|.\\*)
9243         ;;
9244 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9245         ;;
9246 (.\$\{*prefix\}*|.\$\{*dir\}*)
9247         eval cf_temp="$cf_temp"
9248         case ".$cf_temp" in
9249         (.NONE/*)
9250                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9251                 ;;
9252         esac
9253         ;;
9254 (.no|.NONE/*)
9255         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9256         ;;
9257 (*)
9258         break
9259         ;;
9260 esac
9261
9262                         cf_path_prog="$cf_temp"
9263                 else
9264                         cf_path_prog="`basename "$cf_temp"`"
9265                 fi
9266         elif test -z "$cf_path_args" ; then
9267                 cf_path_args="$cf_temp"
9268         else
9269                 cf_path_args="$cf_path_args $cf_temp"
9270         fi
9271 done
9272 IFS="$cf_save_ifs"
9273
9274 if test -n "$cf_path_prog" ; then
9275
9276 echo "${as_me:-configure}:9276: testing defining path for ${cf_path_prog} ..." 1>&5
9277
9278 cat >>confdefs.h <<EOF
9279 #define TIC_PATH "$cf_path_prog"
9280 EOF
9281
9282         test -n "$cf_path_args" &&
9283 cat >>confdefs.h <<EOF
9284 #define TIC_ARGS "$cf_path_args"
9285 EOF
9286
9287 fi
9288
9289                 if test -z "$TIC"
9290                 then
9291                         { echo "$as_me:9291: WARNING: no tic program found for fallbacks" >&5
9292 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
9293                 fi
9294
9295 fi;
9296
9297 # Check whether --with-infocmp-path or --without-infocmp-path was given.
9298 if test "${with_infocmp_path+set}" = set; then
9299   withval="$with_infocmp_path"
9300   echo "$as_me:9300: checking for infocmp program for fallbacks" >&5
9301 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
9302                 INFOCMP=$withval
9303                 echo "$as_me:9303: result: $INFOCMP" >&5
9304 echo "${ECHO_T}$INFOCMP" >&6
9305
9306 if test "x$prefix" != xNONE; then
9307         cf_path_syntax="$prefix"
9308 else
9309         cf_path_syntax="$ac_default_prefix"
9310 fi
9311
9312 case ".$INFOCMP" in
9313 (.\$\(*\)*|.\'*\'*)
9314         ;;
9315 (..|./*|.\\*)
9316         ;;
9317 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9318         ;;
9319 (.\$\{*prefix\}*|.\$\{*dir\}*)
9320         eval INFOCMP="$INFOCMP"
9321         case ".$INFOCMP" in
9322         (.NONE/*)
9323                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
9324                 ;;
9325         esac
9326         ;;
9327 (.no|.NONE/*)
9328         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
9329         ;;
9330 (*)
9331         { { echo "$as_me:9331: error: expected a pathname, not \"$INFOCMP\"" >&5
9332 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
9333    { (exit 1); exit 1; }; }
9334         ;;
9335 esac
9336
9337 else
9338
9339 test -z "$INFOCMP" && INFOCMP="infocmp"
9340 for ac_prog in $INFOCMP infocmp
9341 do
9342   # Extract the first word of "$ac_prog", so it can be a program name with args.
9343 set dummy $ac_prog; ac_word=$2
9344 echo "$as_me:9344: checking for $ac_word" >&5
9345 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9346 if test "${ac_cv_path_INFOCMP+set}" = set; then
9347   echo $ECHO_N "(cached) $ECHO_C" >&6
9348 else
9349   case $INFOCMP in
9350   [\\/]* | ?:[\\/]*)
9351   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
9352   ;;
9353   *)
9354   ac_save_IFS=$IFS; IFS=$ac_path_separator
9355 ac_dummy="$PATH:/usr/local/ncurses/bin"
9356 for ac_dir in $ac_dummy; do
9357   IFS=$ac_save_IFS
9358   test -z "$ac_dir" && ac_dir=.
9359   if $as_executable_p "$ac_dir/$ac_word"; then
9360    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
9361    echo "$as_me:9361: found $ac_dir/$ac_word" >&5
9362    break
9363 fi
9364 done
9365
9366   ;;
9367 esac
9368 fi
9369 INFOCMP=$ac_cv_path_INFOCMP
9370
9371 if test -n "$INFOCMP"; then
9372   echo "$as_me:9372: result: $INFOCMP" >&5
9373 echo "${ECHO_T}$INFOCMP" >&6
9374 else
9375   echo "$as_me:9375: result: no" >&5
9376 echo "${ECHO_T}no" >&6
9377 fi
9378
9379   test -n "$INFOCMP" && break
9380 done
9381 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
9382
9383 cf_path_prog=""
9384 cf_path_args=""
9385 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
9386 for cf_temp in $ac_cv_path_INFOCMP
9387 do
9388         if test -z "$cf_path_prog" ; then
9389                 if test "$with_full_paths" = yes ; then
9390
9391 if test "x$prefix" != xNONE; then
9392         cf_path_syntax="$prefix"
9393 else
9394         cf_path_syntax="$ac_default_prefix"
9395 fi
9396
9397 case ".$cf_temp" in
9398 (.\$\(*\)*|.\'*\'*)
9399         ;;
9400 (..|./*|.\\*)
9401         ;;
9402 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9403         ;;
9404 (.\$\{*prefix\}*|.\$\{*dir\}*)
9405         eval cf_temp="$cf_temp"
9406         case ".$cf_temp" in
9407         (.NONE/*)
9408                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9409                 ;;
9410         esac
9411         ;;
9412 (.no|.NONE/*)
9413         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9414         ;;
9415 (*)
9416         break
9417         ;;
9418 esac
9419
9420                         cf_path_prog="$cf_temp"
9421                 else
9422                         cf_path_prog="`basename "$cf_temp"`"
9423                 fi
9424         elif test -z "$cf_path_args" ; then
9425                 cf_path_args="$cf_temp"
9426         else
9427                 cf_path_args="$cf_path_args $cf_temp"
9428         fi
9429 done
9430 IFS="$cf_save_ifs"
9431
9432 if test -n "$cf_path_prog" ; then
9433
9434 echo "${as_me:-configure}:9434: testing defining path for ${cf_path_prog} ..." 1>&5
9435
9436 cat >>confdefs.h <<EOF
9437 #define INFOCMP_PATH "$cf_path_prog"
9438 EOF
9439
9440         test -n "$cf_path_args" &&
9441 cat >>confdefs.h <<EOF
9442 #define INFOCMP_ARGS "$cf_path_args"
9443 EOF
9444
9445 fi
9446
9447                 if test -z "$INFOCMP"
9448                 then
9449                         { echo "$as_me:9449: WARNING: no infocmp program found for fallbacks" >&5
9450 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
9451                 fi
9452
9453 fi;
9454
9455         test -z "$TIC" && FALLBACK_LIST=
9456         test -z "$INFOCMP" && FALLBACK_LIST=
9457         if test -z "$FALLBACK_LIST"
9458         then
9459                 { echo "$as_me:9459: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
9460 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
9461         fi
9462 fi
9463
9464 USE_FALLBACKS=
9465 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
9466
9467 echo "$as_me:9467: checking if you want modern xterm or antique" >&5
9468 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
9469
9470 # Check whether --with-xterm-new or --without-xterm-new was given.
9471 if test "${with_xterm_new+set}" = set; then
9472   withval="$with_xterm_new"
9473   with_xterm_new=$withval
9474 else
9475   with_xterm_new=yes
9476 fi;
9477 case "$with_xterm_new" in
9478 (no) with_xterm_new=xterm-old;;
9479 (*)      with_xterm_new=xterm-new;;
9480 esac
9481 echo "$as_me:9481: result: $with_xterm_new" >&5
9482 echo "${ECHO_T}$with_xterm_new" >&6
9483 WHICH_XTERM=$with_xterm_new
9484
9485 case $host_os in
9486 (*linux-gnu|*cygwin|*mingw32|*msys)
9487         want_xterm_kbs=DEL
9488         ;;
9489 (*)
9490         want_xterm_kbs=BS
9491         ;;
9492 esac
9493
9494 echo "$as_me:9494: checking if xterm backspace sends BS or DEL" >&5
9495 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
9496
9497 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
9498 if test "${with_xterm_kbs+set}" = set; then
9499   withval="$with_xterm_kbs"
9500   with_xterm_kbs=$withval
9501 else
9502   with_xterm_kbs=BS
9503 fi;
9504 case x$with_xterm_kbs in
9505 (xyes|xno|xBS|xbs|x8)
9506         with_xterm_kbs=BS
9507         ;;
9508 (xDEL|xdel|x127)
9509         with_xterm_kbs=DEL
9510         ;;
9511 (*)
9512         with_xterm_kbs=$withval
9513         ;;
9514 esac
9515 echo "$as_me:9515: result: $with_xterm_kbs" >&5
9516 echo "${ECHO_T}$with_xterm_kbs" >&6
9517 XTERM_KBS=$with_xterm_kbs
9518
9519 if test "x$with_xterm_kbs" != "x$want_xterm_kbs"
9520 then
9521         { echo "$as_me:9521: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os" >&5
9522 echo "$as_me: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os" >&2;}
9523 fi
9524
9525 MAKE_TERMINFO=
9526 if test "$use_database" = no ; then
9527         TERMINFO="${datadir}/terminfo"
9528         MAKE_TERMINFO="#"
9529 else
9530
9531 echo "$as_me:9531: checking for list of terminfo directories" >&5
9532 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
9533
9534 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
9535 if test "${with_terminfo_dirs+set}" = set; then
9536   withval="$with_terminfo_dirs"
9537
9538 else
9539   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
9540 fi;
9541 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9542 cf_dst_path=
9543 for cf_src_path in $withval
9544 do
9545
9546 if test "x$prefix" != xNONE; then
9547         cf_path_syntax="$prefix"
9548 else
9549         cf_path_syntax="$ac_default_prefix"
9550 fi
9551
9552 case ".$cf_src_path" in
9553 (.\$\(*\)*|.\'*\'*)
9554         ;;
9555 (..|./*|.\\*)
9556         ;;
9557 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9558         ;;
9559 (.\$\{*prefix\}*|.\$\{*dir\}*)
9560         eval cf_src_path="$cf_src_path"
9561         case ".$cf_src_path" in
9562         (.NONE/*)
9563                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9564                 ;;
9565         esac
9566         ;;
9567 (.no|.NONE/*)
9568         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9569         ;;
9570 (*)
9571         { { echo "$as_me:9571: error: expected a pathname, not \"$cf_src_path\"" >&5
9572 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9573    { (exit 1); exit 1; }; }
9574         ;;
9575 esac
9576
9577   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9578   cf_dst_path="${cf_dst_path}${cf_src_path}"
9579 done
9580 IFS="$ac_save_ifs"
9581
9582 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9583 # so we have to check/work around.  We do prefer the result of "eval"...
9584 eval cf_dst_eval="$cf_dst_path"
9585 case "x$cf_dst_eval" in
9586 (xNONE*)
9587         TERMINFO_DIRS=$cf_dst_path
9588         ;;
9589 (*)
9590         TERMINFO_DIRS="$cf_dst_eval"
9591         ;;
9592 esac
9593
9594 echo "$as_me:9594: result: $TERMINFO_DIRS" >&5
9595 echo "${ECHO_T}$TERMINFO_DIRS" >&6
9596 test -n "$TERMINFO_DIRS" &&
9597 cat >>confdefs.h <<EOF
9598 #define TERMINFO_DIRS "$TERMINFO_DIRS"
9599 EOF
9600
9601 case "x$TERMINFO" in
9602 x???:*)
9603         { echo "$as_me:9603: WARNING: ignoring non-directory/file TERMINFO value" >&5
9604 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
9605         unset TERMINFO
9606         ;;
9607 esac
9608
9609 echo "$as_me:9609: checking for default terminfo directory" >&5
9610 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
9611
9612 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
9613 if test "${with_default_terminfo_dir+set}" = set; then
9614   withval="$with_default_terminfo_dir"
9615
9616 else
9617   withval="${TERMINFO:-${datadir}/terminfo}"
9618 fi; if test -n "${datadir}/terminfo" ; then
9619
9620 if test "x$prefix" != xNONE; then
9621         cf_path_syntax="$prefix"
9622 else
9623         cf_path_syntax="$ac_default_prefix"
9624 fi
9625
9626 case ".$withval" in
9627 (.\$\(*\)*|.\'*\'*)
9628         ;;
9629 (..|./*|.\\*)
9630         ;;
9631 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9632         ;;
9633 (.\$\{*prefix\}*|.\$\{*dir\}*)
9634         eval withval="$withval"
9635         case ".$withval" in
9636         (.NONE/*)
9637                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9638                 ;;
9639         esac
9640         ;;
9641 (.no|.NONE/*)
9642         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9643         ;;
9644 (*)
9645         { { echo "$as_me:9645: error: expected a pathname, not \"$withval\"" >&5
9646 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9647    { (exit 1); exit 1; }; }
9648         ;;
9649 esac
9650
9651 fi
9652 eval TERMINFO="$withval"
9653
9654 echo "$as_me:9654: result: $TERMINFO" >&5
9655 echo "${ECHO_T}$TERMINFO" >&6
9656
9657 cat >>confdefs.h <<EOF
9658 #define TERMINFO "$TERMINFO"
9659 EOF
9660
9661 fi
9662
9663 ###     use option --disable-big-core to make tic run on small machines
9664 ###     We need 4Mb, check if we can allocate 50% more than that.
9665 echo "$as_me:9665: checking if big-core option selected" >&5
9666 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9667
9668 # Check whether --enable-big-core or --disable-big-core was given.
9669 if test "${enable_big_core+set}" = set; then
9670   enableval="$enable_big_core"
9671   with_big_core=$enableval
9672 else
9673   if test "$cross_compiling" = yes; then
9674   with_big_core=no
9675 else
9676   cat >"conftest.$ac_ext" <<_ACEOF
9677 #line 9677 "configure"
9678 #include "confdefs.h"
9679
9680 #include <stdlib.h>
9681 #include <string.h>
9682 int main() {
9683         unsigned long n = 6000000L;
9684         char *s = malloc(n);
9685         if (s != 0)
9686                 s[0] = s[n-1] = 0;
9687         ${cf_cv_main_return:-return}(s == 0);
9688 }
9689 _ACEOF
9690 rm -f "conftest$ac_exeext"
9691 if { (eval echo "$as_me:9691: \"$ac_link\"") >&5
9692   (eval $ac_link) 2>&5
9693   ac_status=$?
9694   echo "$as_me:9694: \$? = $ac_status" >&5
9695   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9696   { (eval echo "$as_me:9696: \"$ac_try\"") >&5
9697   (eval $ac_try) 2>&5
9698   ac_status=$?
9699   echo "$as_me:9699: \$? = $ac_status" >&5
9700   (exit "$ac_status"); }; }; then
9701   with_big_core=yes
9702 else
9703   echo "$as_me: program exited with status $ac_status" >&5
9704 echo "$as_me: failed program was:" >&5
9705 cat "conftest.$ac_ext" >&5
9706 with_big_core=no
9707 fi
9708 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9709 fi
9710 fi;
9711 echo "$as_me:9711: result: $with_big_core" >&5
9712 echo "${ECHO_T}$with_big_core" >&6
9713 test "x$with_big_core" = "xyes" &&
9714 cat >>confdefs.h <<\EOF
9715 #define HAVE_BIG_CORE 1
9716 EOF
9717
9718 ### ISO C only guarantees 512-char strings, we have tables which load faster
9719 ### when constructed using "big" strings.  More than the C compiler, the awk
9720 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9721 echo "$as_me:9721: checking if big-strings option selected" >&5
9722 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9723
9724 # Check whether --enable-big-strings or --disable-big-strings was given.
9725 if test "${enable_big_strings+set}" = set; then
9726   enableval="$enable_big_strings"
9727   with_big_strings=$enableval
9728 else
9729
9730         case x$AWK in
9731         (x)
9732                 eval with_big_strings=no
9733                 ;;
9734         (*)
9735                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9736                         | $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
9737                         eval with_big_strings=yes
9738                 else
9739                         eval with_big_strings=no
9740                 fi
9741                 ;;
9742         esac
9743
9744 fi;
9745 echo "$as_me:9745: result: $with_big_strings" >&5
9746 echo "${ECHO_T}$with_big_strings" >&6
9747
9748 USE_BIG_STRINGS=0
9749 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9750
9751 ###     use option --enable-termcap to compile in the termcap fallback support
9752 echo "$as_me:9752: checking if you want termcap-fallback support" >&5
9753 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9754
9755 # Check whether --enable-termcap or --disable-termcap was given.
9756 if test "${enable_termcap+set}" = set; then
9757   enableval="$enable_termcap"
9758   with_termcap=$enableval
9759 else
9760   with_termcap=no
9761 fi;
9762 echo "$as_me:9762: result: $with_termcap" >&5
9763 echo "${ECHO_T}$with_termcap" >&6
9764
9765 NCURSES_USE_TERMCAP=0
9766 if test "x$with_termcap" != "xyes" ; then
9767         if test "$use_database" = no ; then
9768                 if test -z "$with_fallback" ; then
9769                         { { echo "$as_me:9769: error: You have disabled the database w/o specifying fallbacks" >&5
9770 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9771    { (exit 1); exit 1; }; }
9772                 fi
9773         fi
9774
9775 cat >>confdefs.h <<\EOF
9776 #define PURE_TERMINFO 1
9777 EOF
9778
9779 else
9780
9781         if test "$with_ticlib" != no ; then
9782                 { { echo "$as_me:9782: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9783 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9784    { (exit 1); exit 1; }; }
9785         fi
9786
9787         NCURSES_USE_TERMCAP=1
9788         echo "$as_me:9788: checking for list of termcap files" >&5
9789 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9790
9791 # Check whether --with-termpath or --without-termpath was given.
9792 if test "${with_termpath+set}" = set; then
9793   withval="$with_termpath"
9794
9795 else
9796   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9797 fi;
9798 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9799 cf_dst_path=
9800 for cf_src_path in $withval
9801 do
9802
9803 if test "x$prefix" != xNONE; then
9804         cf_path_syntax="$prefix"
9805 else
9806         cf_path_syntax="$ac_default_prefix"
9807 fi
9808
9809 case ".$cf_src_path" in
9810 (.\$\(*\)*|.\'*\'*)
9811         ;;
9812 (..|./*|.\\*)
9813         ;;
9814 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9815         ;;
9816 (.\$\{*prefix\}*|.\$\{*dir\}*)
9817         eval cf_src_path="$cf_src_path"
9818         case ".$cf_src_path" in
9819         (.NONE/*)
9820                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9821                 ;;
9822         esac
9823         ;;
9824 (.no|.NONE/*)
9825         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9826         ;;
9827 (*)
9828         { { echo "$as_me:9828: error: expected a pathname, not \"$cf_src_path\"" >&5
9829 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9830    { (exit 1); exit 1; }; }
9831         ;;
9832 esac
9833
9834   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9835   cf_dst_path="${cf_dst_path}${cf_src_path}"
9836 done
9837 IFS="$ac_save_ifs"
9838
9839 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9840 # so we have to check/work around.  We do prefer the result of "eval"...
9841 eval cf_dst_eval="$cf_dst_path"
9842 case "x$cf_dst_eval" in
9843 (xNONE*)
9844         TERMPATH=$cf_dst_path
9845         ;;
9846 (*)
9847         TERMPATH="$cf_dst_eval"
9848         ;;
9849 esac
9850
9851         echo "$as_me:9851: result: $TERMPATH" >&5
9852 echo "${ECHO_T}$TERMPATH" >&6
9853         test -n "$TERMPATH" &&
9854 cat >>confdefs.h <<EOF
9855 #define TERMPATH "$TERMPATH"
9856 EOF
9857
9858         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9859         echo "$as_me:9859: checking if fast termcap-loader is needed" >&5
9860 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9861
9862 # Check whether --enable-getcap or --disable-getcap was given.
9863 if test "${enable_getcap+set}" = set; then
9864   enableval="$enable_getcap"
9865   with_getcap=$enableval
9866 else
9867   with_getcap=no
9868 fi;
9869         echo "$as_me:9869: result: $with_getcap" >&5
9870 echo "${ECHO_T}$with_getcap" >&6
9871         test "x$with_getcap" = "xyes" &&
9872 cat >>confdefs.h <<\EOF
9873 #define USE_GETCAP 1
9874 EOF
9875
9876         echo "$as_me:9876: checking if translated termcaps will be cached in ~/.terminfo" >&5
9877 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9878
9879 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9880 if test "${enable_getcap_cache+set}" = set; then
9881   enableval="$enable_getcap_cache"
9882   with_getcap_cache=$enableval
9883 else
9884   with_getcap_cache=no
9885 fi;
9886         echo "$as_me:9886: result: $with_getcap_cache" >&5
9887 echo "${ECHO_T}$with_getcap_cache" >&6
9888         test "x$with_getcap_cache" = "xyes" &&
9889 cat >>confdefs.h <<\EOF
9890 #define USE_GETCAP_CACHE 1
9891 EOF
9892
9893 fi
9894
9895 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9896 echo "$as_me:9896: checking if ~/.terminfo is wanted" >&5
9897 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9898
9899 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9900 if test "${enable_home_terminfo+set}" = set; then
9901   enableval="$enable_home_terminfo"
9902   with_home_terminfo=$enableval
9903 else
9904   with_home_terminfo=yes
9905 fi;
9906 echo "$as_me:9906: result: $with_home_terminfo" >&5
9907 echo "${ECHO_T}$with_home_terminfo" >&6
9908 test "x$with_home_terminfo" = "xyes" &&
9909 cat >>confdefs.h <<\EOF
9910 #define USE_HOME_TERMINFO 1
9911 EOF
9912
9913 echo "$as_me:9913: checking if you want to permit root to use ncurses environment variables" >&5
9914 echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
9915
9916 # Check whether --enable-root-environ or --disable-root-environ was given.
9917 if test "${enable_root_environ+set}" = set; then
9918   enableval="$enable_root_environ"
9919   with_root_environ=$enableval
9920 else
9921   with_root_environ=yes
9922 fi;
9923 echo "$as_me:9923: result: $with_root_environ" >&5
9924 echo "${ECHO_T}$with_root_environ" >&6
9925 test "x$with_root_environ" = xyes &&
9926 cat >>confdefs.h <<\EOF
9927 #define USE_ROOT_ENVIRON 1
9928 EOF
9929
9930 echo "$as_me:9930: checking if you want to permit setuid programs to access all files" >&5
9931 echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
9932
9933 # Check whether --enable-root-environ or --disable-root-environ was given.
9934 if test "${enable_root_environ+set}" = set; then
9935   enableval="$enable_root_environ"
9936   with_root_access=$enableval
9937 else
9938   with_root_access=yes
9939 fi;
9940 echo "$as_me:9940: result: $with_root_access" >&5
9941 echo "${ECHO_T}$with_root_access" >&6
9942 test "x$with_root_access" = xyes &&
9943 cat >>confdefs.h <<\EOF
9944 #define USE_ROOT_ACCESS 1
9945 EOF
9946
9947 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9948 ###   to reduce storage requirements for the terminfo database.
9949
9950 for ac_header in \
9951 unistd.h \
9952
9953 do
9954 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9955 echo "$as_me:9955: checking for $ac_header" >&5
9956 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9957 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9958   echo $ECHO_N "(cached) $ECHO_C" >&6
9959 else
9960   cat >"conftest.$ac_ext" <<_ACEOF
9961 #line 9961 "configure"
9962 #include "confdefs.h"
9963 #include <$ac_header>
9964 _ACEOF
9965 if { (eval echo "$as_me:9965: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9966   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9967   ac_status=$?
9968   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9969   rm -f conftest.er1
9970   cat conftest.err >&5
9971   echo "$as_me:9971: \$? = $ac_status" >&5
9972   (exit "$ac_status"); } >/dev/null; then
9973   if test -s conftest.err; then
9974     ac_cpp_err=$ac_c_preproc_warn_flag
9975   else
9976     ac_cpp_err=
9977   fi
9978 else
9979   ac_cpp_err=yes
9980 fi
9981 if test -z "$ac_cpp_err"; then
9982   eval "$as_ac_Header=yes"
9983 else
9984   echo "$as_me: failed program was:" >&5
9985   cat "conftest.$ac_ext" >&5
9986   eval "$as_ac_Header=no"
9987 fi
9988 rm -f conftest.err "conftest.$ac_ext"
9989 fi
9990 echo "$as_me:9990: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9991 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9992 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9993   cat >>confdefs.h <<EOF
9994 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9995 EOF
9996
9997 fi
9998 done
9999
10000 for ac_func in \
10001         remove \
10002         unlink
10003 do
10004 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10005 echo "$as_me:10005: checking for $ac_func" >&5
10006 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10007 if eval "test \"\${$as_ac_var+set}\" = set"; then
10008   echo $ECHO_N "(cached) $ECHO_C" >&6
10009 else
10010   cat >"conftest.$ac_ext" <<_ACEOF
10011 #line 10011 "configure"
10012 #include "confdefs.h"
10013 #define $ac_func autoconf_temporary
10014 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
10015 #undef $ac_func
10016
10017 #ifdef __cplusplus
10018 extern "C"
10019 #endif
10020
10021 /* We use char because int might match the return type of a gcc2
10022    builtin and then its argument prototype would still apply.  */
10023 char $ac_func (void);
10024
10025 int
10026 main (void)
10027 {
10028
10029 /* The GNU C library defines stubs for functions which it implements
10030     to always fail with ENOSYS.  Some functions are actually named
10031     something starting with __ and the normal name is an alias.  */
10032 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10033 #error found stub for $ac_func
10034 #endif
10035
10036         return $ac_func ();
10037   ;
10038   return 0;
10039 }
10040 _ACEOF
10041 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10042 if { (eval echo "$as_me:10042: \"$ac_link\"") >&5
10043   (eval $ac_link) 2>&5
10044   ac_status=$?
10045   echo "$as_me:10045: \$? = $ac_status" >&5
10046   (exit "$ac_status"); } &&
10047          { ac_try='test -s "conftest$ac_exeext"'
10048   { (eval echo "$as_me:10048: \"$ac_try\"") >&5
10049   (eval $ac_try) 2>&5
10050   ac_status=$?
10051   echo "$as_me:10051: \$? = $ac_status" >&5
10052   (exit "$ac_status"); }; }; then
10053   eval "$as_ac_var=yes"
10054 else
10055   echo "$as_me: failed program was:" >&5
10056 cat "conftest.$ac_ext" >&5
10057 eval "$as_ac_var=no"
10058 fi
10059 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10060 fi
10061 echo "$as_me:10061: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10062 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10063 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
10064   cat >>confdefs.h <<EOF
10065 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10066 EOF
10067
10068 fi
10069 done
10070
10071 if test "$cross_compiling" = yes ; then
10072
10073 for ac_func in \
10074                 link \
10075                 symlink
10076 do
10077 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10078 echo "$as_me:10078: checking for $ac_func" >&5
10079 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10080 if eval "test \"\${$as_ac_var+set}\" = set"; then
10081   echo $ECHO_N "(cached) $ECHO_C" >&6
10082 else
10083   cat >"conftest.$ac_ext" <<_ACEOF
10084 #line 10084 "configure"
10085 #include "confdefs.h"
10086 #define $ac_func autoconf_temporary
10087 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
10088 #undef $ac_func
10089
10090 #ifdef __cplusplus
10091 extern "C"
10092 #endif
10093
10094 /* We use char because int might match the return type of a gcc2
10095    builtin and then its argument prototype would still apply.  */
10096 char $ac_func (void);
10097
10098 int
10099 main (void)
10100 {
10101
10102 /* The GNU C library defines stubs for functions which it implements
10103     to always fail with ENOSYS.  Some functions are actually named
10104     something starting with __ and the normal name is an alias.  */
10105 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10106 #error found stub for $ac_func
10107 #endif
10108
10109         return $ac_func ();
10110   ;
10111   return 0;
10112 }
10113 _ACEOF
10114 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10115 if { (eval echo "$as_me:10115: \"$ac_link\"") >&5
10116   (eval $ac_link) 2>&5
10117   ac_status=$?
10118   echo "$as_me:10118: \$? = $ac_status" >&5
10119   (exit "$ac_status"); } &&
10120          { ac_try='test -s "conftest$ac_exeext"'
10121   { (eval echo "$as_me:10121: \"$ac_try\"") >&5
10122   (eval $ac_try) 2>&5
10123   ac_status=$?
10124   echo "$as_me:10124: \$? = $ac_status" >&5
10125   (exit "$ac_status"); }; }; then
10126   eval "$as_ac_var=yes"
10127 else
10128   echo "$as_me: failed program was:" >&5
10129 cat "conftest.$ac_ext" >&5
10130 eval "$as_ac_var=no"
10131 fi
10132 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10133 fi
10134 echo "$as_me:10134: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10135 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10136 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
10137   cat >>confdefs.h <<EOF
10138 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10139 EOF
10140
10141 fi
10142 done
10143
10144 else
10145         echo "$as_me:10145: checking if link/symlink functions work" >&5
10146 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
10147 if test "${cf_cv_link_funcs+set}" = set; then
10148   echo $ECHO_N "(cached) $ECHO_C" >&6
10149 else
10150
10151                 cf_cv_link_funcs=
10152                 for cf_func in link symlink ; do
10153                         if test "$cross_compiling" = yes; then
10154
10155                         eval 'ac_cv_func_'$cf_func'=error'
10156 else
10157   cat >"conftest.$ac_ext" <<_ACEOF
10158 #line 10158 "configure"
10159 #include "confdefs.h"
10160
10161 $ac_includes_default
10162
10163 int main(void)
10164 {
10165         int fail = 0;
10166         char *src = "conftest.tmp";
10167         char *dst = "conftest.chk";
10168         struct stat src_sb, dst_sb;
10169         FILE *fp = fopen(src, "w");
10170         if (fp == 0) { fail = 3; } else {
10171                 fclose(fp); stat(src, &src_sb);
10172                 if ($cf_func(src, dst) < 0) {
10173                         fail = 1;
10174                 } else if (stat(dst, &dst_sb) < 0) {
10175                         fail = 2;
10176                 } else {
10177                         long diff = (dst_sb.st_mtime - src_sb.st_mtime);
10178                         if (diff < 0) diff = -diff;
10179                         if (diff > 2) fail = 3;
10180                 }
10181         }
10182 #ifdef HAVE_UNLINK
10183         unlink(dst); unlink(src);
10184 #else
10185         remove(dst); remove(src);
10186 #endif
10187         ${cf_cv_main_return:-return} (fail);
10188 }
10189
10190 _ACEOF
10191 rm -f "conftest$ac_exeext"
10192 if { (eval echo "$as_me:10192: \"$ac_link\"") >&5
10193   (eval $ac_link) 2>&5
10194   ac_status=$?
10195   echo "$as_me:10195: \$? = $ac_status" >&5
10196   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10197   { (eval echo "$as_me:10197: \"$ac_try\"") >&5
10198   (eval $ac_try) 2>&5
10199   ac_status=$?
10200   echo "$as_me:10200: \$? = $ac_status" >&5
10201   (exit "$ac_status"); }; }; then
10202
10203                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
10204                         eval 'ac_cv_func_'$cf_func'=yes'
10205 else
10206   echo "$as_me: program exited with status $ac_status" >&5
10207 echo "$as_me: failed program was:" >&5
10208 cat "conftest.$ac_ext" >&5
10209
10210                         eval 'ac_cv_func_'$cf_func'=no'
10211 fi
10212 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10213 fi
10214                 done
10215                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
10216
10217 fi
10218 echo "$as_me:10218: result: $cf_cv_link_funcs" >&5
10219 echo "${ECHO_T}$cf_cv_link_funcs" >&6
10220         test "$ac_cv_func_link"    = yes &&
10221 cat >>confdefs.h <<\EOF
10222 #define HAVE_LINK 1
10223 EOF
10224
10225         test "$ac_cv_func_symlink" = yes &&
10226 cat >>confdefs.h <<\EOF
10227 #define HAVE_SYMLINK 1
10228 EOF
10229
10230 fi
10231
10232 with_links=no
10233 with_symlinks=no
10234
10235 # soft links (symbolic links) are useful for some systems where hard links do
10236 # not work, or to make it simpler to copy terminfo trees around.
10237 if test "x$ac_cv_func_symlink" = xyes ; then
10238         echo "$as_me:10238: checking if tic should use symbolic links" >&5
10239 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
10240
10241 # Check whether --enable-symlinks or --disable-symlinks was given.
10242 if test "${enable_symlinks+set}" = set; then
10243   enableval="$enable_symlinks"
10244   with_symlinks=$enableval
10245 else
10246   with_symlinks=no
10247 fi;
10248         echo "$as_me:10248: result: $with_symlinks" >&5
10249 echo "${ECHO_T}$with_symlinks" >&6
10250 fi
10251
10252 # If we have hard links and did not choose to use soft links instead, there is
10253 # no reason to make this choice optional - use the hard links.
10254 if test "$with_symlinks" = no ; then
10255         echo "$as_me:10255: checking if tic should use hard links" >&5
10256 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
10257         if test "x$ac_cv_func_link" = xyes ; then
10258                 with_links=yes
10259         else
10260                 with_links=no
10261         fi
10262         echo "$as_me:10262: result: $with_links" >&5
10263 echo "${ECHO_T}$with_links" >&6
10264 fi
10265
10266 test "x$with_links" = xyes &&
10267 cat >>confdefs.h <<\EOF
10268 #define USE_LINKS 1
10269 EOF
10270
10271 test "x$with_symlinks" = xyes &&
10272 cat >>confdefs.h <<\EOF
10273 #define USE_SYMLINKS 1
10274 EOF
10275
10276 ###   use option --enable-broken-linker to force on use of broken-linker support
10277
10278 echo "$as_me:10278: checking if you want broken-linker support code" >&5
10279 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
10280
10281 # Check whether --enable-broken_linker or --disable-broken_linker was given.
10282 if test "${enable_broken_linker+set}" = set; then
10283   enableval="$enable_broken_linker"
10284   with_broken_linker=$enableval
10285 else
10286   with_broken_linker=no
10287 fi;
10288 echo "$as_me:10288: result: $with_broken_linker" >&5
10289 echo "${ECHO_T}$with_broken_linker" >&6
10290
10291 : "${BROKEN_LINKER:=0}"
10292 if test "x$with_broken_linker" = xyes ; then
10293
10294 cat >>confdefs.h <<\EOF
10295 #define BROKEN_LINKER 1
10296 EOF
10297
10298         BROKEN_LINKER=1
10299 fi
10300
10301 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
10302 echo "$as_me:10302: checking if tputs should process BSD-style prefix padding" >&5
10303 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
10304
10305 # Check whether --enable-bsdpad or --disable-bsdpad was given.
10306 if test "${enable_bsdpad+set}" = set; then
10307   enableval="$enable_bsdpad"
10308   with_bsdpad=$enableval
10309 else
10310   with_bsdpad=no
10311 fi;
10312 echo "$as_me:10312: result: $with_bsdpad" >&5
10313 echo "${ECHO_T}$with_bsdpad" >&6
10314 test "x$with_bsdpad" = xyes &&
10315 cat >>confdefs.h <<\EOF
10316 #define BSD_TPUTS 1
10317 EOF
10318
10319 ###   use option --enable-widec to turn on use of wide-character support
10320 NCURSES_CH_T=chtype
10321 NCURSES_LIBUTF8=0
10322
10323 NEED_WCHAR_H=0
10324 NCURSES_MBSTATE_T=0
10325 NCURSES_WCHAR_T=0
10326 NCURSES_WINT_T=0
10327
10328 # Check to define _XOPEN_SOURCE "automatically"
10329 CPPFLAGS_before_XOPEN="$CPPFLAGS"
10330
10331 echo "$as_me:10331: checking if the POSIX test-macros are already defined" >&5
10332 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
10333 if test "${cf_cv_posix_visible+set}" = set; then
10334   echo $ECHO_N "(cached) $ECHO_C" >&6
10335 else
10336
10337 cat >"conftest.$ac_ext" <<_ACEOF
10338 #line 10338 "configure"
10339 #include "confdefs.h"
10340 #include <stdio.h>
10341 int
10342 main (void)
10343 {
10344
10345 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
10346         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
10347         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
10348         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
10349 #error conflicting symbols found
10350 #endif
10351
10352   ;
10353   return 0;
10354 }
10355 _ACEOF
10356 rm -f "conftest.$ac_objext"
10357 if { (eval echo "$as_me:10357: \"$ac_compile\"") >&5
10358   (eval $ac_compile) 2>&5
10359   ac_status=$?
10360   echo "$as_me:10360: \$? = $ac_status" >&5
10361   (exit "$ac_status"); } &&
10362          { ac_try='test -s "conftest.$ac_objext"'
10363   { (eval echo "$as_me:10363: \"$ac_try\"") >&5
10364   (eval $ac_try) 2>&5
10365   ac_status=$?
10366   echo "$as_me:10366: \$? = $ac_status" >&5
10367   (exit "$ac_status"); }; }; then
10368   cf_cv_posix_visible=no
10369 else
10370   echo "$as_me: failed program was:" >&5
10371 cat "conftest.$ac_ext" >&5
10372 cf_cv_posix_visible=yes
10373 fi
10374 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10375
10376 fi
10377 echo "$as_me:10377: result: $cf_cv_posix_visible" >&5
10378 echo "${ECHO_T}$cf_cv_posix_visible" >&6
10379
10380 if test "$cf_cv_posix_visible" = no; then
10381
10382 cf_XOPEN_SOURCE=600
10383 cf_POSIX_C_SOURCE=199506L
10384 cf_xopen_source=
10385
10386 case "$host_os" in
10387 (aix[4-7]*)
10388         cf_xopen_source="-D_ALL_SOURCE"
10389         ;;
10390 (msys)
10391         cf_XOPEN_SOURCE=600
10392         ;;
10393 (darwin[0-8].*)
10394         cf_xopen_source="-D_APPLE_C_SOURCE"
10395         ;;
10396 (darwin*)
10397         cf_xopen_source="-D_DARWIN_C_SOURCE"
10398         cf_XOPEN_SOURCE=
10399         ;;
10400 (freebsd*|dragonfly*|midnightbsd*)
10401         # 5.x headers associate
10402         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
10403         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
10404         cf_POSIX_C_SOURCE=200112L
10405         cf_XOPEN_SOURCE=600
10406         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10407         ;;
10408 (hpux11*)
10409         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
10410         ;;
10411 (hpux*)
10412         cf_xopen_source="-D_HPUX_SOURCE"
10413         ;;
10414 (irix[56].*)
10415         cf_xopen_source="-D_SGI_SOURCE"
10416         cf_XOPEN_SOURCE=
10417         ;;
10418 (linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
10419
10420 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
10421
10422 echo "$as_me:10422: checking if this is the GNU C library" >&5
10423 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
10424 if test "${cf_cv_gnu_library+set}" = set; then
10425   echo $ECHO_N "(cached) $ECHO_C" >&6
10426 else
10427
10428 cat >"conftest.$ac_ext" <<_ACEOF
10429 #line 10429 "configure"
10430 #include "confdefs.h"
10431 #include <sys/types.h>
10432 int
10433 main (void)
10434 {
10435
10436         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
10437                 return 0;
10438         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
10439                 return 0;
10440         #else
10441         #       error not GNU C library
10442         #endif
10443   ;
10444   return 0;
10445 }
10446 _ACEOF
10447 rm -f "conftest.$ac_objext"
10448 if { (eval echo "$as_me:10448: \"$ac_compile\"") >&5
10449   (eval $ac_compile) 2>&5
10450   ac_status=$?
10451   echo "$as_me:10451: \$? = $ac_status" >&5
10452   (exit "$ac_status"); } &&
10453          { ac_try='test -s "conftest.$ac_objext"'
10454   { (eval echo "$as_me:10454: \"$ac_try\"") >&5
10455   (eval $ac_try) 2>&5
10456   ac_status=$?
10457   echo "$as_me:10457: \$? = $ac_status" >&5
10458   (exit "$ac_status"); }; }; then
10459   cf_cv_gnu_library=yes
10460 else
10461   echo "$as_me: failed program was:" >&5
10462 cat "conftest.$ac_ext" >&5
10463 cf_cv_gnu_library=no
10464 fi
10465 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10466
10467 fi
10468 echo "$as_me:10468: result: $cf_cv_gnu_library" >&5
10469 echo "${ECHO_T}$cf_cv_gnu_library" >&6
10470
10471 if test x$cf_cv_gnu_library = xyes; then
10472
10473         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
10474         # was changed to help a little.  newlib incorporated the change about 4
10475         # years later.
10476         echo "$as_me:10476: checking if _DEFAULT_SOURCE can be used as a basis" >&5
10477 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
10478 if test "${cf_cv_gnu_library_219+set}" = set; then
10479   echo $ECHO_N "(cached) $ECHO_C" >&6
10480 else
10481
10482                 cf_save="$CPPFLAGS"
10483
10484         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10485         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10486
10487                 cat >"conftest.$ac_ext" <<_ACEOF
10488 #line 10488 "configure"
10489 #include "confdefs.h"
10490 #include <sys/types.h>
10491 int
10492 main (void)
10493 {
10494
10495                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
10496                                 return 0;
10497                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
10498                                 return 0;
10499                         #else
10500                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
10501                         #endif
10502   ;
10503   return 0;
10504 }
10505 _ACEOF
10506 rm -f "conftest.$ac_objext"
10507 if { (eval echo "$as_me:10507: \"$ac_compile\"") >&5
10508   (eval $ac_compile) 2>&5
10509   ac_status=$?
10510   echo "$as_me:10510: \$? = $ac_status" >&5
10511   (exit "$ac_status"); } &&
10512          { ac_try='test -s "conftest.$ac_objext"'
10513   { (eval echo "$as_me:10513: \"$ac_try\"") >&5
10514   (eval $ac_try) 2>&5
10515   ac_status=$?
10516   echo "$as_me:10516: \$? = $ac_status" >&5
10517   (exit "$ac_status"); }; }; then
10518   cf_cv_gnu_library_219=yes
10519 else
10520   echo "$as_me: failed program was:" >&5
10521 cat "conftest.$ac_ext" >&5
10522 cf_cv_gnu_library_219=no
10523 fi
10524 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10525                 CPPFLAGS="$cf_save"
10526
10527 fi
10528 echo "$as_me:10528: result: $cf_cv_gnu_library_219" >&5
10529 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
10530
10531         if test "x$cf_cv_gnu_library_219" = xyes; then
10532                 cf_save="$CPPFLAGS"
10533                 echo "$as_me:10533: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
10534 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
10535 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
10536   echo $ECHO_N "(cached) $ECHO_C" >&6
10537 else
10538
10539 cf_fix_cppflags=no
10540 cf_new_cflags=
10541 cf_new_cppflags=
10542 cf_new_extra_cppflags=
10543
10544 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
10545 do
10546 case "$cf_fix_cppflags" in
10547 (no)
10548         case "$cf_add_cflags" in
10549         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10550                 case "$cf_add_cflags" in
10551                 (-D*)
10552                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10553
10554                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10555                                 && test -z "${cf_tst_cflags}" \
10556                                 && cf_fix_cppflags=yes
10557
10558                         if test "$cf_fix_cppflags" = yes ; then
10559
10560         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10561         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10562
10563                                 continue
10564                         elif test "${cf_tst_cflags}" = "\"'" ; then
10565
10566         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10567         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10568
10569                                 continue
10570                         fi
10571                         ;;
10572                 esac
10573                 case "$CPPFLAGS" in
10574                 (*$cf_add_cflags)
10575                         ;;
10576                 (*)
10577                         case "$cf_add_cflags" in
10578                         (-D*)
10579                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10580
10581 CPPFLAGS=`echo "$CPPFLAGS" | \
10582         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10583                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10584
10585                                 ;;
10586                         esac
10587
10588         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10589         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10590
10591                         ;;
10592                 esac
10593                 ;;
10594         (*)
10595
10596         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10597         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10598
10599                 ;;
10600         esac
10601         ;;
10602 (yes)
10603
10604         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10605         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10606
10607         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10608
10609         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10610                 && test -z "${cf_tst_cflags}" \
10611                 && cf_fix_cppflags=no
10612         ;;
10613 esac
10614 done
10615
10616 if test -n "$cf_new_cflags" ; then
10617
10618         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10619         CFLAGS="${CFLAGS}$cf_new_cflags"
10620
10621 fi
10622
10623 if test -n "$cf_new_cppflags" ; then
10624
10625         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10626         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10627
10628 fi
10629
10630 if test -n "$cf_new_extra_cppflags" ; then
10631
10632         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10633         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10634
10635 fi
10636
10637                         cat >"conftest.$ac_ext" <<_ACEOF
10638 #line 10638 "configure"
10639 #include "confdefs.h"
10640
10641                                 #include <limits.h>
10642                                 #include <sys/types.h>
10643
10644 int
10645 main (void)
10646 {
10647
10648                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
10649                                         return 0;
10650                                 #else
10651                                 #       error GNU C library is too old
10652                                 #endif
10653   ;
10654   return 0;
10655 }
10656 _ACEOF
10657 rm -f "conftest.$ac_objext"
10658 if { (eval echo "$as_me:10658: \"$ac_compile\"") >&5
10659   (eval $ac_compile) 2>&5
10660   ac_status=$?
10661   echo "$as_me:10661: \$? = $ac_status" >&5
10662   (exit "$ac_status"); } &&
10663          { ac_try='test -s "conftest.$ac_objext"'
10664   { (eval echo "$as_me:10664: \"$ac_try\"") >&5
10665   (eval $ac_try) 2>&5
10666   ac_status=$?
10667   echo "$as_me:10667: \$? = $ac_status" >&5
10668   (exit "$ac_status"); }; }; then
10669   cf_cv_gnu_dftsrc_219=yes
10670 else
10671   echo "$as_me: failed program was:" >&5
10672 cat "conftest.$ac_ext" >&5
10673 cf_cv_gnu_dftsrc_219=no
10674 fi
10675 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10676
10677 fi
10678 echo "$as_me:10678: result: $cf_cv_gnu_dftsrc_219" >&5
10679 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
10680                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
10681         else
10682                 cf_cv_gnu_dftsrc_219=maybe
10683         fi
10684
10685         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
10686
10687                 echo "$as_me:10687: checking if we must define _GNU_SOURCE" >&5
10688 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10689 if test "${cf_cv_gnu_source+set}" = set; then
10690   echo $ECHO_N "(cached) $ECHO_C" >&6
10691 else
10692
10693                 cat >"conftest.$ac_ext" <<_ACEOF
10694 #line 10694 "configure"
10695 #include "confdefs.h"
10696 #include <sys/types.h>
10697 int
10698 main (void)
10699 {
10700
10701                         #ifndef _XOPEN_SOURCE
10702                         #error  expected _XOPEN_SOURCE to be defined
10703                         #endif
10704   ;
10705   return 0;
10706 }
10707 _ACEOF
10708 rm -f "conftest.$ac_objext"
10709 if { (eval echo "$as_me:10709: \"$ac_compile\"") >&5
10710   (eval $ac_compile) 2>&5
10711   ac_status=$?
10712   echo "$as_me:10712: \$? = $ac_status" >&5
10713   (exit "$ac_status"); } &&
10714          { ac_try='test -s "conftest.$ac_objext"'
10715   { (eval echo "$as_me:10715: \"$ac_try\"") >&5
10716   (eval $ac_try) 2>&5
10717   ac_status=$?
10718   echo "$as_me:10718: \$? = $ac_status" >&5
10719   (exit "$ac_status"); }; }; then
10720   cf_cv_gnu_source=no
10721 else
10722   echo "$as_me: failed program was:" >&5
10723 cat "conftest.$ac_ext" >&5
10724 cf_save="$CPPFLAGS"
10725
10726 cf_fix_cppflags=no
10727 cf_new_cflags=
10728 cf_new_cppflags=
10729 cf_new_extra_cppflags=
10730
10731 for cf_add_cflags in -D_GNU_SOURCE
10732 do
10733 case "$cf_fix_cppflags" in
10734 (no)
10735         case "$cf_add_cflags" in
10736         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10737                 case "$cf_add_cflags" in
10738                 (-D*)
10739                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10740
10741                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10742                                 && test -z "${cf_tst_cflags}" \
10743                                 && cf_fix_cppflags=yes
10744
10745                         if test "$cf_fix_cppflags" = yes ; then
10746
10747         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10748         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10749
10750                                 continue
10751                         elif test "${cf_tst_cflags}" = "\"'" ; then
10752
10753         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10754         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10755
10756                                 continue
10757                         fi
10758                         ;;
10759                 esac
10760                 case "$CPPFLAGS" in
10761                 (*$cf_add_cflags)
10762                         ;;
10763                 (*)
10764                         case "$cf_add_cflags" in
10765                         (-D*)
10766                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10767
10768 CPPFLAGS=`echo "$CPPFLAGS" | \
10769         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10770                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10771
10772                                 ;;
10773                         esac
10774
10775         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10776         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10777
10778                         ;;
10779                 esac
10780                 ;;
10781         (*)
10782
10783         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10784         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10785
10786                 ;;
10787         esac
10788         ;;
10789 (yes)
10790
10791         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10792         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10793
10794         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10795
10796         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10797                 && test -z "${cf_tst_cflags}" \
10798                 && cf_fix_cppflags=no
10799         ;;
10800 esac
10801 done
10802
10803 if test -n "$cf_new_cflags" ; then
10804
10805         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10806         CFLAGS="${CFLAGS}$cf_new_cflags"
10807
10808 fi
10809
10810 if test -n "$cf_new_cppflags" ; then
10811
10812         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10813         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10814
10815 fi
10816
10817 if test -n "$cf_new_extra_cppflags" ; then
10818
10819         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10820         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10821
10822 fi
10823
10824                          cat >"conftest.$ac_ext" <<_ACEOF
10825 #line 10825 "configure"
10826 #include "confdefs.h"
10827 #include <sys/types.h>
10828 int
10829 main (void)
10830 {
10831
10832                                 #ifdef _XOPEN_SOURCE
10833                                 #error  expected _XOPEN_SOURCE to be undefined
10834                                 #endif
10835   ;
10836   return 0;
10837 }
10838 _ACEOF
10839 rm -f "conftest.$ac_objext"
10840 if { (eval echo "$as_me:10840: \"$ac_compile\"") >&5
10841   (eval $ac_compile) 2>&5
10842   ac_status=$?
10843   echo "$as_me:10843: \$? = $ac_status" >&5
10844   (exit "$ac_status"); } &&
10845          { ac_try='test -s "conftest.$ac_objext"'
10846   { (eval echo "$as_me:10846: \"$ac_try\"") >&5
10847   (eval $ac_try) 2>&5
10848   ac_status=$?
10849   echo "$as_me:10849: \$? = $ac_status" >&5
10850   (exit "$ac_status"); }; }; then
10851   cf_cv_gnu_source=no
10852 else
10853   echo "$as_me: failed program was:" >&5
10854 cat "conftest.$ac_ext" >&5
10855 cf_cv_gnu_source=yes
10856 fi
10857 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10858                         CPPFLAGS="$cf_save"
10859
10860 fi
10861 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10862
10863 fi
10864 echo "$as_me:10864: result: $cf_cv_gnu_source" >&5
10865 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10866
10867                 if test "$cf_cv_gnu_source" = yes
10868                 then
10869                 echo "$as_me:10869: checking if we should also define _DEFAULT_SOURCE" >&5
10870 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10871 if test "${cf_cv_default_source+set}" = set; then
10872   echo $ECHO_N "(cached) $ECHO_C" >&6
10873 else
10874
10875         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10876         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10877
10878                         cat >"conftest.$ac_ext" <<_ACEOF
10879 #line 10879 "configure"
10880 #include "confdefs.h"
10881 #include <sys/types.h>
10882 int
10883 main (void)
10884 {
10885
10886                                 #ifdef _DEFAULT_SOURCE
10887                                 #error  expected _DEFAULT_SOURCE to be undefined
10888                                 #endif
10889   ;
10890   return 0;
10891 }
10892 _ACEOF
10893 rm -f "conftest.$ac_objext"
10894 if { (eval echo "$as_me:10894: \"$ac_compile\"") >&5
10895   (eval $ac_compile) 2>&5
10896   ac_status=$?
10897   echo "$as_me:10897: \$? = $ac_status" >&5
10898   (exit "$ac_status"); } &&
10899          { ac_try='test -s "conftest.$ac_objext"'
10900   { (eval echo "$as_me:10900: \"$ac_try\"") >&5
10901   (eval $ac_try) 2>&5
10902   ac_status=$?
10903   echo "$as_me:10903: \$? = $ac_status" >&5
10904   (exit "$ac_status"); }; }; then
10905   cf_cv_default_source=no
10906 else
10907   echo "$as_me: failed program was:" >&5
10908 cat "conftest.$ac_ext" >&5
10909 cf_cv_default_source=yes
10910 fi
10911 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10912
10913 fi
10914 echo "$as_me:10914: result: $cf_cv_default_source" >&5
10915 echo "${ECHO_T}$cf_cv_default_source" >&6
10916                         if test "$cf_cv_default_source" = yes
10917                         then
10918
10919         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10920         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10921
10922                         fi
10923                 fi
10924         fi
10925
10926 fi
10927
10928         ;;
10929 (minix*)
10930         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10931         ;;
10932 (mirbsd*)
10933         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10934         cf_XOPEN_SOURCE=
10935
10936 if test "$cf_cv_posix_visible" = no; then
10937
10938 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10939
10940 cf_save_CFLAGS="$CFLAGS"
10941 cf_save_CPPFLAGS="$CPPFLAGS"
10942
10943 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10944         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10945                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10946
10947 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10948         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10949                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10950
10951 echo "$as_me:10951: checking if we should define _POSIX_C_SOURCE" >&5
10952 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10953 if test "${cf_cv_posix_c_source+set}" = set; then
10954   echo $ECHO_N "(cached) $ECHO_C" >&6
10955 else
10956
10957 echo "${as_me:-configure}:10957: testing if the symbol is already defined go no further ..." 1>&5
10958
10959         cat >"conftest.$ac_ext" <<_ACEOF
10960 #line 10960 "configure"
10961 #include "confdefs.h"
10962 #include <sys/types.h>
10963 int
10964 main (void)
10965 {
10966
10967 #ifndef _POSIX_C_SOURCE
10968 make an error
10969 #endif
10970   ;
10971   return 0;
10972 }
10973 _ACEOF
10974 rm -f "conftest.$ac_objext"
10975 if { (eval echo "$as_me:10975: \"$ac_compile\"") >&5
10976   (eval $ac_compile) 2>&5
10977   ac_status=$?
10978   echo "$as_me:10978: \$? = $ac_status" >&5
10979   (exit "$ac_status"); } &&
10980          { ac_try='test -s "conftest.$ac_objext"'
10981   { (eval echo "$as_me:10981: \"$ac_try\"") >&5
10982   (eval $ac_try) 2>&5
10983   ac_status=$?
10984   echo "$as_me:10984: \$? = $ac_status" >&5
10985   (exit "$ac_status"); }; }; then
10986   cf_cv_posix_c_source=no
10987 else
10988   echo "$as_me: failed program was:" >&5
10989 cat "conftest.$ac_ext" >&5
10990 cf_want_posix_source=no
10991          case .$cf_POSIX_C_SOURCE in
10992          (.[12]??*)
10993                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10994                 ;;
10995          (.2)
10996                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10997                 cf_want_posix_source=yes
10998                 ;;
10999          (.*)
11000                 cf_want_posix_source=yes
11001                 ;;
11002          esac
11003          if test "$cf_want_posix_source" = yes ; then
11004                 cat >"conftest.$ac_ext" <<_ACEOF
11005 #line 11005 "configure"
11006 #include "confdefs.h"
11007 #include <sys/types.h>
11008 int
11009 main (void)
11010 {
11011
11012 #ifdef _POSIX_SOURCE
11013 make an error
11014 #endif
11015   ;
11016   return 0;
11017 }
11018 _ACEOF
11019 rm -f "conftest.$ac_objext"
11020 if { (eval echo "$as_me:11020: \"$ac_compile\"") >&5
11021   (eval $ac_compile) 2>&5
11022   ac_status=$?
11023   echo "$as_me:11023: \$? = $ac_status" >&5
11024   (exit "$ac_status"); } &&
11025          { ac_try='test -s "conftest.$ac_objext"'
11026   { (eval echo "$as_me:11026: \"$ac_try\"") >&5
11027   (eval $ac_try) 2>&5
11028   ac_status=$?
11029   echo "$as_me:11029: \$? = $ac_status" >&5
11030   (exit "$ac_status"); }; }; then
11031   :
11032 else
11033   echo "$as_me: failed program was:" >&5
11034 cat "conftest.$ac_ext" >&5
11035 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11036 fi
11037 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11038          fi
11039
11040 echo "${as_me:-configure}:11040: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11041
11042          CFLAGS="$cf_trim_CFLAGS"
11043          CPPFLAGS="$cf_trim_CPPFLAGS"
11044
11045         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11046         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11047
11048 echo "${as_me:-configure}:11048: testing if the second compile does not leave our definition intact error ..." 1>&5
11049
11050          cat >"conftest.$ac_ext" <<_ACEOF
11051 #line 11051 "configure"
11052 #include "confdefs.h"
11053 #include <sys/types.h>
11054 int
11055 main (void)
11056 {
11057
11058 #ifndef _POSIX_C_SOURCE
11059 make an error
11060 #endif
11061   ;
11062   return 0;
11063 }
11064 _ACEOF
11065 rm -f "conftest.$ac_objext"
11066 if { (eval echo "$as_me:11066: \"$ac_compile\"") >&5
11067   (eval $ac_compile) 2>&5
11068   ac_status=$?
11069   echo "$as_me:11069: \$? = $ac_status" >&5
11070   (exit "$ac_status"); } &&
11071          { ac_try='test -s "conftest.$ac_objext"'
11072   { (eval echo "$as_me:11072: \"$ac_try\"") >&5
11073   (eval $ac_try) 2>&5
11074   ac_status=$?
11075   echo "$as_me:11075: \$? = $ac_status" >&5
11076   (exit "$ac_status"); }; }; then
11077   :
11078 else
11079   echo "$as_me: failed program was:" >&5
11080 cat "conftest.$ac_ext" >&5
11081 cf_cv_posix_c_source=no
11082 fi
11083 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11084          CFLAGS="$cf_save_CFLAGS"
11085          CPPFLAGS="$cf_save_CPPFLAGS"
11086
11087 fi
11088 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11089
11090 fi
11091 echo "$as_me:11091: result: $cf_cv_posix_c_source" >&5
11092 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11093
11094 if test "$cf_cv_posix_c_source" != no ; then
11095         CFLAGS="$cf_trim_CFLAGS"
11096         CPPFLAGS="$cf_trim_CPPFLAGS"
11097
11098 cf_fix_cppflags=no
11099 cf_new_cflags=
11100 cf_new_cppflags=
11101 cf_new_extra_cppflags=
11102
11103 for cf_add_cflags in $cf_cv_posix_c_source
11104 do
11105 case "$cf_fix_cppflags" in
11106 (no)
11107         case "$cf_add_cflags" in
11108         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11109                 case "$cf_add_cflags" in
11110                 (-D*)
11111                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11112
11113                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11114                                 && test -z "${cf_tst_cflags}" \
11115                                 && cf_fix_cppflags=yes
11116
11117                         if test "$cf_fix_cppflags" = yes ; then
11118
11119         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11120         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11121
11122                                 continue
11123                         elif test "${cf_tst_cflags}" = "\"'" ; then
11124
11125         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11126         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11127
11128                                 continue
11129                         fi
11130                         ;;
11131                 esac
11132                 case "$CPPFLAGS" in
11133                 (*$cf_add_cflags)
11134                         ;;
11135                 (*)
11136                         case "$cf_add_cflags" in
11137                         (-D*)
11138                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11139
11140 CPPFLAGS=`echo "$CPPFLAGS" | \
11141         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11142                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11143
11144                                 ;;
11145                         esac
11146
11147         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11148         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11149
11150                         ;;
11151                 esac
11152                 ;;
11153         (*)
11154
11155         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11156         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11157
11158                 ;;
11159         esac
11160         ;;
11161 (yes)
11162
11163         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11164         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11165
11166         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11167
11168         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11169                 && test -z "${cf_tst_cflags}" \
11170                 && cf_fix_cppflags=no
11171         ;;
11172 esac
11173 done
11174
11175 if test -n "$cf_new_cflags" ; then
11176
11177         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11178         CFLAGS="${CFLAGS}$cf_new_cflags"
11179
11180 fi
11181
11182 if test -n "$cf_new_cppflags" ; then
11183
11184         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11185         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11186
11187 fi
11188
11189 if test -n "$cf_new_extra_cppflags" ; then
11190
11191         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11192         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11193
11194 fi
11195
11196 fi
11197
11198 fi # cf_cv_posix_visible
11199
11200         ;;
11201 (netbsd*)
11202         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
11203         ;;
11204 (openbsd[6-9]*)
11205         # OpenBSD 6.x has broken locale support, both compile-time and runtime.
11206         # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
11207         # Abusing the conformance level is a workaround.
11208         { echo "$as_me:11208: WARNING: this system does not provide usable locale support" >&5
11209 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
11210         cf_xopen_source="-D_BSD_SOURCE"
11211         cf_XOPEN_SOURCE=700
11212         ;;
11213 (openbsd[4-5]*)
11214         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
11215         cf_xopen_source="-D_BSD_SOURCE"
11216         cf_XOPEN_SOURCE=600
11217         ;;
11218 (openbsd*)
11219         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
11220         ;;
11221 (osf[45]*)
11222         cf_xopen_source="-D_OSF_SOURCE"
11223         ;;
11224 (nto-qnx*)
11225         cf_xopen_source="-D_QNX_SOURCE"
11226         ;;
11227 (sco*)
11228         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
11229         ;;
11230 (solaris2.*)
11231         cf_xopen_source="-D__EXTENSIONS__"
11232         cf_cv_xopen_source=broken
11233         ;;
11234 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
11235         cf_XOPEN_SOURCE=
11236         cf_POSIX_C_SOURCE=
11237         ;;
11238 (*)
11239
11240 echo "$as_me:11240: checking if we should define _XOPEN_SOURCE" >&5
11241 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11242 if test "${cf_cv_xopen_source+set}" = set; then
11243   echo $ECHO_N "(cached) $ECHO_C" >&6
11244 else
11245
11246         cat >"conftest.$ac_ext" <<_ACEOF
11247 #line 11247 "configure"
11248 #include "confdefs.h"
11249
11250 #include <stdlib.h>
11251 #include <string.h>
11252 #include <sys/types.h>
11253
11254 int
11255 main (void)
11256 {
11257
11258 #ifndef _XOPEN_SOURCE
11259 make an error
11260 #endif
11261
11262   ;
11263   return 0;
11264 }
11265 _ACEOF
11266 rm -f "conftest.$ac_objext"
11267 if { (eval echo "$as_me:11267: \"$ac_compile\"") >&5
11268   (eval $ac_compile) 2>&5
11269   ac_status=$?
11270   echo "$as_me:11270: \$? = $ac_status" >&5
11271   (exit "$ac_status"); } &&
11272          { ac_try='test -s "conftest.$ac_objext"'
11273   { (eval echo "$as_me:11273: \"$ac_try\"") >&5
11274   (eval $ac_try) 2>&5
11275   ac_status=$?
11276   echo "$as_me:11276: \$? = $ac_status" >&5
11277   (exit "$ac_status"); }; }; then
11278   cf_cv_xopen_source=no
11279 else
11280   echo "$as_me: failed program was:" >&5
11281 cat "conftest.$ac_ext" >&5
11282 cf_save="$CPPFLAGS"
11283
11284         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11285         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11286
11287          cat >"conftest.$ac_ext" <<_ACEOF
11288 #line 11288 "configure"
11289 #include "confdefs.h"
11290
11291 #include <stdlib.h>
11292 #include <string.h>
11293 #include <sys/types.h>
11294
11295 int
11296 main (void)
11297 {
11298
11299 #ifndef _XOPEN_SOURCE
11300 make an error
11301 #endif
11302
11303   ;
11304   return 0;
11305 }
11306 _ACEOF
11307 rm -f "conftest.$ac_objext"
11308 if { (eval echo "$as_me:11308: \"$ac_compile\"") >&5
11309   (eval $ac_compile) 2>&5
11310   ac_status=$?
11311   echo "$as_me:11311: \$? = $ac_status" >&5
11312   (exit "$ac_status"); } &&
11313          { ac_try='test -s "conftest.$ac_objext"'
11314   { (eval echo "$as_me:11314: \"$ac_try\"") >&5
11315   (eval $ac_try) 2>&5
11316   ac_status=$?
11317   echo "$as_me:11317: \$? = $ac_status" >&5
11318   (exit "$ac_status"); }; }; then
11319   cf_cv_xopen_source=no
11320 else
11321   echo "$as_me: failed program was:" >&5
11322 cat "conftest.$ac_ext" >&5
11323 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11324 fi
11325 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11326                 CPPFLAGS="$cf_save"
11327
11328 fi
11329 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11330
11331 fi
11332 echo "$as_me:11332: result: $cf_cv_xopen_source" >&5
11333 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11334
11335 if test "$cf_cv_xopen_source" != no ; then
11336
11337 CFLAGS=`echo "$CFLAGS" | \
11338         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11339                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11340
11341 CPPFLAGS=`echo "$CPPFLAGS" | \
11342         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11343                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11344
11345         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11346
11347 for cf_add_cflags in $cf_temp_xopen_source
11348 do
11349         case "x$cf_add_cflags" in
11350         (x-[DU]*)
11351
11352 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11353 while true
11354 do
11355         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'`
11356         test "$CFLAGS" != "$cf_old_cflag" || break
11357
11358         CFLAGS="$cf_old_cflag"
11359 done
11360
11361 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11362 while true
11363 do
11364         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'`
11365         test "$CPPFLAGS" != "$cf_old_cflag" || break
11366
11367         CPPFLAGS="$cf_old_cflag"
11368 done
11369
11370                 ;;
11371         esac
11372
11373 cf_fix_cppflags=no
11374 cf_new_cflags=
11375 cf_new_cppflags=
11376 cf_new_extra_cppflags=
11377
11378 for cf_add_cflags in $cf_add_cflags
11379 do
11380 case "$cf_fix_cppflags" in
11381 (no)
11382         case "$cf_add_cflags" in
11383         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11384                 case "$cf_add_cflags" in
11385                 (-D*)
11386                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11387
11388                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11389                                 && test -z "${cf_tst_cflags}" \
11390                                 && cf_fix_cppflags=yes
11391
11392                         if test "$cf_fix_cppflags" = yes ; then
11393
11394         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11395         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11396
11397                                 continue
11398                         elif test "${cf_tst_cflags}" = "\"'" ; then
11399
11400         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11401         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11402
11403                                 continue
11404                         fi
11405                         ;;
11406                 esac
11407                 case "$CPPFLAGS" in
11408                 (*$cf_add_cflags)
11409                         ;;
11410                 (*)
11411                         case "$cf_add_cflags" in
11412                         (-D*)
11413                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11414
11415 CPPFLAGS=`echo "$CPPFLAGS" | \
11416         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11417                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11418
11419                                 ;;
11420                         esac
11421
11422         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11423         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11424
11425                         ;;
11426                 esac
11427                 ;;
11428         (*)
11429
11430         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11431         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11432
11433                 ;;
11434         esac
11435         ;;
11436 (yes)
11437
11438         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11439         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11440
11441         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11442
11443         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11444                 && test -z "${cf_tst_cflags}" \
11445                 && cf_fix_cppflags=no
11446         ;;
11447 esac
11448 done
11449
11450 if test -n "$cf_new_cflags" ; then
11451
11452         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11453         CFLAGS="${CFLAGS}$cf_new_cflags"
11454
11455 fi
11456
11457 if test -n "$cf_new_cppflags" ; then
11458
11459         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11460         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11461
11462 fi
11463
11464 if test -n "$cf_new_extra_cppflags" ; then
11465
11466         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11467         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11468
11469 fi
11470
11471 done
11472
11473 fi
11474
11475         cf_save_xopen_cppflags="$CPPFLAGS"
11476
11477 if test "$cf_cv_posix_visible" = no; then
11478
11479 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
11480
11481 cf_save_CFLAGS="$CFLAGS"
11482 cf_save_CPPFLAGS="$CPPFLAGS"
11483
11484 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
11485         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11486                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11487
11488 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
11489         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11490                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11491
11492 echo "$as_me:11492: checking if we should define _POSIX_C_SOURCE" >&5
11493 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11494 if test "${cf_cv_posix_c_source+set}" = set; then
11495   echo $ECHO_N "(cached) $ECHO_C" >&6
11496 else
11497
11498 echo "${as_me:-configure}:11498: testing if the symbol is already defined go no further ..." 1>&5
11499
11500         cat >"conftest.$ac_ext" <<_ACEOF
11501 #line 11501 "configure"
11502 #include "confdefs.h"
11503 #include <sys/types.h>
11504 int
11505 main (void)
11506 {
11507
11508 #ifndef _POSIX_C_SOURCE
11509 make an error
11510 #endif
11511   ;
11512   return 0;
11513 }
11514 _ACEOF
11515 rm -f "conftest.$ac_objext"
11516 if { (eval echo "$as_me:11516: \"$ac_compile\"") >&5
11517   (eval $ac_compile) 2>&5
11518   ac_status=$?
11519   echo "$as_me:11519: \$? = $ac_status" >&5
11520   (exit "$ac_status"); } &&
11521          { ac_try='test -s "conftest.$ac_objext"'
11522   { (eval echo "$as_me:11522: \"$ac_try\"") >&5
11523   (eval $ac_try) 2>&5
11524   ac_status=$?
11525   echo "$as_me:11525: \$? = $ac_status" >&5
11526   (exit "$ac_status"); }; }; then
11527   cf_cv_posix_c_source=no
11528 else
11529   echo "$as_me: failed program was:" >&5
11530 cat "conftest.$ac_ext" >&5
11531 cf_want_posix_source=no
11532          case .$cf_POSIX_C_SOURCE in
11533          (.[12]??*)
11534                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11535                 ;;
11536          (.2)
11537                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11538                 cf_want_posix_source=yes
11539                 ;;
11540          (.*)
11541                 cf_want_posix_source=yes
11542                 ;;
11543          esac
11544          if test "$cf_want_posix_source" = yes ; then
11545                 cat >"conftest.$ac_ext" <<_ACEOF
11546 #line 11546 "configure"
11547 #include "confdefs.h"
11548 #include <sys/types.h>
11549 int
11550 main (void)
11551 {
11552
11553 #ifdef _POSIX_SOURCE
11554 make an error
11555 #endif
11556   ;
11557   return 0;
11558 }
11559 _ACEOF
11560 rm -f "conftest.$ac_objext"
11561 if { (eval echo "$as_me:11561: \"$ac_compile\"") >&5
11562   (eval $ac_compile) 2>&5
11563   ac_status=$?
11564   echo "$as_me:11564: \$? = $ac_status" >&5
11565   (exit "$ac_status"); } &&
11566          { ac_try='test -s "conftest.$ac_objext"'
11567   { (eval echo "$as_me:11567: \"$ac_try\"") >&5
11568   (eval $ac_try) 2>&5
11569   ac_status=$?
11570   echo "$as_me:11570: \$? = $ac_status" >&5
11571   (exit "$ac_status"); }; }; then
11572   :
11573 else
11574   echo "$as_me: failed program was:" >&5
11575 cat "conftest.$ac_ext" >&5
11576 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11577 fi
11578 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11579          fi
11580
11581 echo "${as_me:-configure}:11581: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11582
11583          CFLAGS="$cf_trim_CFLAGS"
11584          CPPFLAGS="$cf_trim_CPPFLAGS"
11585
11586         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11587         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11588
11589 echo "${as_me:-configure}:11589: testing if the second compile does not leave our definition intact error ..." 1>&5
11590
11591          cat >"conftest.$ac_ext" <<_ACEOF
11592 #line 11592 "configure"
11593 #include "confdefs.h"
11594 #include <sys/types.h>
11595 int
11596 main (void)
11597 {
11598
11599 #ifndef _POSIX_C_SOURCE
11600 make an error
11601 #endif
11602   ;
11603   return 0;
11604 }
11605 _ACEOF
11606 rm -f "conftest.$ac_objext"
11607 if { (eval echo "$as_me:11607: \"$ac_compile\"") >&5
11608   (eval $ac_compile) 2>&5
11609   ac_status=$?
11610   echo "$as_me:11610: \$? = $ac_status" >&5
11611   (exit "$ac_status"); } &&
11612          { ac_try='test -s "conftest.$ac_objext"'
11613   { (eval echo "$as_me:11613: \"$ac_try\"") >&5
11614   (eval $ac_try) 2>&5
11615   ac_status=$?
11616   echo "$as_me:11616: \$? = $ac_status" >&5
11617   (exit "$ac_status"); }; }; then
11618   :
11619 else
11620   echo "$as_me: failed program was:" >&5
11621 cat "conftest.$ac_ext" >&5
11622 cf_cv_posix_c_source=no
11623 fi
11624 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11625          CFLAGS="$cf_save_CFLAGS"
11626          CPPFLAGS="$cf_save_CPPFLAGS"
11627
11628 fi
11629 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11630
11631 fi
11632 echo "$as_me:11632: result: $cf_cv_posix_c_source" >&5
11633 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11634
11635 if test "$cf_cv_posix_c_source" != no ; then
11636         CFLAGS="$cf_trim_CFLAGS"
11637         CPPFLAGS="$cf_trim_CPPFLAGS"
11638
11639 cf_fix_cppflags=no
11640 cf_new_cflags=
11641 cf_new_cppflags=
11642 cf_new_extra_cppflags=
11643
11644 for cf_add_cflags in $cf_cv_posix_c_source
11645 do
11646 case "$cf_fix_cppflags" in
11647 (no)
11648         case "$cf_add_cflags" in
11649         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11650                 case "$cf_add_cflags" in
11651                 (-D*)
11652                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11653
11654                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11655                                 && test -z "${cf_tst_cflags}" \
11656                                 && cf_fix_cppflags=yes
11657
11658                         if test "$cf_fix_cppflags" = yes ; then
11659
11660         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11661         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11662
11663                                 continue
11664                         elif test "${cf_tst_cflags}" = "\"'" ; then
11665
11666         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11667         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11668
11669                                 continue
11670                         fi
11671                         ;;
11672                 esac
11673                 case "$CPPFLAGS" in
11674                 (*$cf_add_cflags)
11675                         ;;
11676                 (*)
11677                         case "$cf_add_cflags" in
11678                         (-D*)
11679                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11680
11681 CPPFLAGS=`echo "$CPPFLAGS" | \
11682         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11683                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11684
11685                                 ;;
11686                         esac
11687
11688         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11689         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11690
11691                         ;;
11692                 esac
11693                 ;;
11694         (*)
11695
11696         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11697         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11698
11699                 ;;
11700         esac
11701         ;;
11702 (yes)
11703
11704         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11705         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11706
11707         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11708
11709         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11710                 && test -z "${cf_tst_cflags}" \
11711                 && cf_fix_cppflags=no
11712         ;;
11713 esac
11714 done
11715
11716 if test -n "$cf_new_cflags" ; then
11717
11718         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11719         CFLAGS="${CFLAGS}$cf_new_cflags"
11720
11721 fi
11722
11723 if test -n "$cf_new_cppflags" ; then
11724
11725         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11726         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11727
11728 fi
11729
11730 if test -n "$cf_new_extra_cppflags" ; then
11731
11732         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11733         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11734
11735 fi
11736
11737 fi
11738
11739 fi # cf_cv_posix_visible
11740
11741         # Some of these niche implementations use copy/paste, double-check...
11742         if test "$cf_cv_xopen_source" != no ; then
11743                 test -n "$verbose" && echo "    checking if _POSIX_C_SOURCE inteferes" 1>&6
11744
11745 echo "${as_me:-configure}:11745: testing checking if _POSIX_C_SOURCE inteferes ..." 1>&5
11746
11747                 cat >"conftest.$ac_ext" <<_ACEOF
11748 #line 11748 "configure"
11749 #include "confdefs.h"
11750
11751 #include <stdlib.h>
11752 #include <string.h>
11753 #include <sys/types.h>
11754
11755 int
11756 main (void)
11757 {
11758
11759 #ifndef _XOPEN_SOURCE
11760 make an error
11761 #endif
11762
11763   ;
11764   return 0;
11765 }
11766 _ACEOF
11767 rm -f "conftest.$ac_objext"
11768 if { (eval echo "$as_me:11768: \"$ac_compile\"") >&5
11769   (eval $ac_compile) 2>&5
11770   ac_status=$?
11771   echo "$as_me:11771: \$? = $ac_status" >&5
11772   (exit "$ac_status"); } &&
11773          { ac_try='test -s "conftest.$ac_objext"'
11774   { (eval echo "$as_me:11774: \"$ac_try\"") >&5
11775   (eval $ac_try) 2>&5
11776   ac_status=$?
11777   echo "$as_me:11777: \$? = $ac_status" >&5
11778   (exit "$ac_status"); }; }; then
11779   :
11780 else
11781   echo "$as_me: failed program was:" >&5
11782 cat "conftest.$ac_ext" >&5
11783
11784                         { echo "$as_me:11784: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
11785 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
11786                         CPPFLAGS="$cf_save_xopen_cppflags"
11787 fi
11788 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11789         fi
11790         ;;
11791 esac
11792
11793 if test -n "$cf_xopen_source" ; then
11794
11795 for cf_add_cflags in $cf_xopen_source
11796 do
11797         case "x$cf_add_cflags" in
11798         (x-[DU]*)
11799
11800 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11801 while true
11802 do
11803         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'`
11804         test "$CFLAGS" != "$cf_old_cflag" || break
11805         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CFLAGS" 1>&6
11806
11807 echo "${as_me:-configure}:11807: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
11808
11809         CFLAGS="$cf_old_cflag"
11810 done
11811
11812 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11813 while true
11814 do
11815         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'`
11816         test "$CPPFLAGS" != "$cf_old_cflag" || break
11817         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CPPFLAGS" 1>&6
11818
11819 echo "${as_me:-configure}:11819: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
11820
11821         CPPFLAGS="$cf_old_cflag"
11822 done
11823
11824                 ;;
11825         esac
11826
11827 cf_fix_cppflags=no
11828 cf_new_cflags=
11829 cf_new_cppflags=
11830 cf_new_extra_cppflags=
11831
11832 for cf_add_cflags in $cf_add_cflags
11833 do
11834 case "$cf_fix_cppflags" in
11835 (no)
11836         case "$cf_add_cflags" in
11837         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11838                 case "$cf_add_cflags" in
11839                 (-D*)
11840                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11841
11842                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11843                                 && test -z "${cf_tst_cflags}" \
11844                                 && cf_fix_cppflags=yes
11845
11846                         if test "$cf_fix_cppflags" = yes ; then
11847
11848         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11849         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11850
11851                                 continue
11852                         elif test "${cf_tst_cflags}" = "\"'" ; then
11853
11854         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11855         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11856
11857                                 continue
11858                         fi
11859                         ;;
11860                 esac
11861                 case "$CPPFLAGS" in
11862                 (*$cf_add_cflags)
11863                         ;;
11864                 (*)
11865                         case "$cf_add_cflags" in
11866                         (-D*)
11867                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11868
11869 CPPFLAGS=`echo "$CPPFLAGS" | \
11870         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11871                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11872
11873                                 ;;
11874                         esac
11875
11876         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11877         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11878
11879                         ;;
11880                 esac
11881                 ;;
11882         (*)
11883
11884         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11885         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11886
11887                 ;;
11888         esac
11889         ;;
11890 (yes)
11891
11892         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11893         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11894
11895         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11896
11897         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11898                 && test -z "${cf_tst_cflags}" \
11899                 && cf_fix_cppflags=no
11900         ;;
11901 esac
11902 done
11903
11904 if test -n "$cf_new_cflags" ; then
11905         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11906
11907 echo "${as_me:-configure}:11907: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11908
11909         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11910         CFLAGS="${CFLAGS}$cf_new_cflags"
11911
11912 fi
11913
11914 if test -n "$cf_new_cppflags" ; then
11915         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11916
11917 echo "${as_me:-configure}:11917: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11918
11919         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11920         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11921
11922 fi
11923
11924 if test -n "$cf_new_extra_cppflags" ; then
11925         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11926
11927 echo "${as_me:-configure}:11927: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11928
11929         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11930         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11931
11932 fi
11933
11934 done
11935
11936 fi
11937
11938 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11939         echo "$as_me:11939: checking if _XOPEN_SOURCE really is set" >&5
11940 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11941         cat >"conftest.$ac_ext" <<_ACEOF
11942 #line 11942 "configure"
11943 #include "confdefs.h"
11944 #include <stdlib.h>
11945 int
11946 main (void)
11947 {
11948
11949 #ifndef _XOPEN_SOURCE
11950 make an error
11951 #endif
11952   ;
11953   return 0;
11954 }
11955 _ACEOF
11956 rm -f "conftest.$ac_objext"
11957 if { (eval echo "$as_me:11957: \"$ac_compile\"") >&5
11958   (eval $ac_compile) 2>&5
11959   ac_status=$?
11960   echo "$as_me:11960: \$? = $ac_status" >&5
11961   (exit "$ac_status"); } &&
11962          { ac_try='test -s "conftest.$ac_objext"'
11963   { (eval echo "$as_me:11963: \"$ac_try\"") >&5
11964   (eval $ac_try) 2>&5
11965   ac_status=$?
11966   echo "$as_me:11966: \$? = $ac_status" >&5
11967   (exit "$ac_status"); }; }; then
11968   cf_XOPEN_SOURCE_set=yes
11969 else
11970   echo "$as_me: failed program was:" >&5
11971 cat "conftest.$ac_ext" >&5
11972 cf_XOPEN_SOURCE_set=no
11973 fi
11974 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11975         echo "$as_me:11975: result: $cf_XOPEN_SOURCE_set" >&5
11976 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11977         if test "$cf_XOPEN_SOURCE_set" = yes
11978         then
11979                 cat >"conftest.$ac_ext" <<_ACEOF
11980 #line 11980 "configure"
11981 #include "confdefs.h"
11982 #include <stdlib.h>
11983 int
11984 main (void)
11985 {
11986
11987 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11988 make an error
11989 #endif
11990   ;
11991   return 0;
11992 }
11993 _ACEOF
11994 rm -f "conftest.$ac_objext"
11995 if { (eval echo "$as_me:11995: \"$ac_compile\"") >&5
11996   (eval $ac_compile) 2>&5
11997   ac_status=$?
11998   echo "$as_me:11998: \$? = $ac_status" >&5
11999   (exit "$ac_status"); } &&
12000          { ac_try='test -s "conftest.$ac_objext"'
12001   { (eval echo "$as_me:12001: \"$ac_try\"") >&5
12002   (eval $ac_try) 2>&5
12003   ac_status=$?
12004   echo "$as_me:12004: \$? = $ac_status" >&5
12005   (exit "$ac_status"); }; }; then
12006   cf_XOPEN_SOURCE_set_ok=yes
12007 else
12008   echo "$as_me: failed program was:" >&5
12009 cat "conftest.$ac_ext" >&5
12010 cf_XOPEN_SOURCE_set_ok=no
12011 fi
12012 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12013                 if test "$cf_XOPEN_SOURCE_set_ok" = no
12014                 then
12015                         { echo "$as_me:12015: WARNING: _XOPEN_SOURCE is lower than requested" >&5
12016 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
12017                 fi
12018         else
12019
12020 echo "$as_me:12020: checking if we should define _XOPEN_SOURCE" >&5
12021 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
12022 if test "${cf_cv_xopen_source+set}" = set; then
12023   echo $ECHO_N "(cached) $ECHO_C" >&6
12024 else
12025
12026         cat >"conftest.$ac_ext" <<_ACEOF
12027 #line 12027 "configure"
12028 #include "confdefs.h"
12029
12030 #include <stdlib.h>
12031 #include <string.h>
12032 #include <sys/types.h>
12033
12034 int
12035 main (void)
12036 {
12037
12038 #ifndef _XOPEN_SOURCE
12039 make an error
12040 #endif
12041
12042   ;
12043   return 0;
12044 }
12045 _ACEOF
12046 rm -f "conftest.$ac_objext"
12047 if { (eval echo "$as_me:12047: \"$ac_compile\"") >&5
12048   (eval $ac_compile) 2>&5
12049   ac_status=$?
12050   echo "$as_me:12050: \$? = $ac_status" >&5
12051   (exit "$ac_status"); } &&
12052          { ac_try='test -s "conftest.$ac_objext"'
12053   { (eval echo "$as_me:12053: \"$ac_try\"") >&5
12054   (eval $ac_try) 2>&5
12055   ac_status=$?
12056   echo "$as_me:12056: \$? = $ac_status" >&5
12057   (exit "$ac_status"); }; }; then
12058   cf_cv_xopen_source=no
12059 else
12060   echo "$as_me: failed program was:" >&5
12061 cat "conftest.$ac_ext" >&5
12062 cf_save="$CPPFLAGS"
12063
12064         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12065         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12066
12067          cat >"conftest.$ac_ext" <<_ACEOF
12068 #line 12068 "configure"
12069 #include "confdefs.h"
12070
12071 #include <stdlib.h>
12072 #include <string.h>
12073 #include <sys/types.h>
12074
12075 int
12076 main (void)
12077 {
12078
12079 #ifndef _XOPEN_SOURCE
12080 make an error
12081 #endif
12082
12083   ;
12084   return 0;
12085 }
12086 _ACEOF
12087 rm -f "conftest.$ac_objext"
12088 if { (eval echo "$as_me:12088: \"$ac_compile\"") >&5
12089   (eval $ac_compile) 2>&5
12090   ac_status=$?
12091   echo "$as_me:12091: \$? = $ac_status" >&5
12092   (exit "$ac_status"); } &&
12093          { ac_try='test -s "conftest.$ac_objext"'
12094   { (eval echo "$as_me:12094: \"$ac_try\"") >&5
12095   (eval $ac_try) 2>&5
12096   ac_status=$?
12097   echo "$as_me:12097: \$? = $ac_status" >&5
12098   (exit "$ac_status"); }; }; then
12099   cf_cv_xopen_source=no
12100 else
12101   echo "$as_me: failed program was:" >&5
12102 cat "conftest.$ac_ext" >&5
12103 cf_cv_xopen_source=$cf_XOPEN_SOURCE
12104 fi
12105 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12106                 CPPFLAGS="$cf_save"
12107
12108 fi
12109 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12110
12111 fi
12112 echo "$as_me:12112: result: $cf_cv_xopen_source" >&5
12113 echo "${ECHO_T}$cf_cv_xopen_source" >&6
12114
12115 if test "$cf_cv_xopen_source" != no ; then
12116
12117 CFLAGS=`echo "$CFLAGS" | \
12118         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
12119                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
12120
12121 CPPFLAGS=`echo "$CPPFLAGS" | \
12122         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
12123                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
12124
12125         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
12126
12127 for cf_add_cflags in $cf_temp_xopen_source
12128 do
12129         case "x$cf_add_cflags" in
12130         (x-[DU]*)
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$CFLAGS" | 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 "$CFLAGS" != "$cf_old_cflag" || break
12137
12138         CFLAGS="$cf_old_cflag"
12139 done
12140
12141 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12142 while true
12143 do
12144         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'`
12145         test "$CPPFLAGS" != "$cf_old_cflag" || break
12146
12147         CPPFLAGS="$cf_old_cflag"
12148 done
12149
12150                 ;;
12151         esac
12152
12153 cf_fix_cppflags=no
12154 cf_new_cflags=
12155 cf_new_cppflags=
12156 cf_new_extra_cppflags=
12157
12158 for cf_add_cflags in $cf_add_cflags
12159 do
12160 case "$cf_fix_cppflags" in
12161 (no)
12162         case "$cf_add_cflags" in
12163         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12164                 case "$cf_add_cflags" in
12165                 (-D*)
12166                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12167
12168                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12169                                 && test -z "${cf_tst_cflags}" \
12170                                 && cf_fix_cppflags=yes
12171
12172                         if test "$cf_fix_cppflags" = yes ; then
12173
12174         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12175         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12176
12177                                 continue
12178                         elif test "${cf_tst_cflags}" = "\"'" ; then
12179
12180         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12181         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12182
12183                                 continue
12184                         fi
12185                         ;;
12186                 esac
12187                 case "$CPPFLAGS" in
12188                 (*$cf_add_cflags)
12189                         ;;
12190                 (*)
12191                         case "$cf_add_cflags" in
12192                         (-D*)
12193                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12194
12195 CPPFLAGS=`echo "$CPPFLAGS" | \
12196         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12197                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12198
12199                                 ;;
12200                         esac
12201
12202         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12203         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12204
12205                         ;;
12206                 esac
12207                 ;;
12208         (*)
12209
12210         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12211         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12212
12213                 ;;
12214         esac
12215         ;;
12216 (yes)
12217
12218         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12219         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12220
12221         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12222
12223         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12224                 && test -z "${cf_tst_cflags}" \
12225                 && cf_fix_cppflags=no
12226         ;;
12227 esac
12228 done
12229
12230 if test -n "$cf_new_cflags" ; then
12231
12232         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12233         CFLAGS="${CFLAGS}$cf_new_cflags"
12234
12235 fi
12236
12237 if test -n "$cf_new_cppflags" ; then
12238
12239         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12240         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12241
12242 fi
12243
12244 if test -n "$cf_new_extra_cppflags" ; then
12245
12246         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12247         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12248
12249 fi
12250
12251 done
12252
12253 fi
12254
12255         fi
12256 fi
12257 fi # cf_cv_posix_visible
12258
12259 CPPFLAGS_after_XOPEN="$CPPFLAGS"
12260
12261 # Work around breakage on OS X
12262
12263 echo "$as_me:12263: checking if SIGWINCH is defined" >&5
12264 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
12265 if test "${cf_cv_define_sigwinch+set}" = set; then
12266   echo $ECHO_N "(cached) $ECHO_C" >&6
12267 else
12268
12269         cat >"conftest.$ac_ext" <<_ACEOF
12270 #line 12270 "configure"
12271 #include "confdefs.h"
12272
12273 #include <sys/types.h>
12274 #include <sys/signal.h>
12275
12276 int
12277 main (void)
12278 {
12279 int x = SIGWINCH; (void)x
12280   ;
12281   return 0;
12282 }
12283 _ACEOF
12284 rm -f "conftest.$ac_objext"
12285 if { (eval echo "$as_me:12285: \"$ac_compile\"") >&5
12286   (eval $ac_compile) 2>&5
12287   ac_status=$?
12288   echo "$as_me:12288: \$? = $ac_status" >&5
12289   (exit "$ac_status"); } &&
12290          { ac_try='test -s "conftest.$ac_objext"'
12291   { (eval echo "$as_me:12291: \"$ac_try\"") >&5
12292   (eval $ac_try) 2>&5
12293   ac_status=$?
12294   echo "$as_me:12294: \$? = $ac_status" >&5
12295   (exit "$ac_status"); }; }; then
12296   cf_cv_define_sigwinch=yes
12297 else
12298   echo "$as_me: failed program was:" >&5
12299 cat "conftest.$ac_ext" >&5
12300 cat >"conftest.$ac_ext" <<_ACEOF
12301 #line 12301 "configure"
12302 #include "confdefs.h"
12303
12304 #undef _XOPEN_SOURCE
12305 #undef _POSIX_SOURCE
12306 #undef _POSIX_C_SOURCE
12307 #include <sys/types.h>
12308 #include <sys/signal.h>
12309
12310 int
12311 main (void)
12312 {
12313 int x = SIGWINCH; (void)x
12314   ;
12315   return 0;
12316 }
12317 _ACEOF
12318 rm -f "conftest.$ac_objext"
12319 if { (eval echo "$as_me:12319: \"$ac_compile\"") >&5
12320   (eval $ac_compile) 2>&5
12321   ac_status=$?
12322   echo "$as_me:12322: \$? = $ac_status" >&5
12323   (exit "$ac_status"); } &&
12324          { ac_try='test -s "conftest.$ac_objext"'
12325   { (eval echo "$as_me:12325: \"$ac_try\"") >&5
12326   (eval $ac_try) 2>&5
12327   ac_status=$?
12328   echo "$as_me:12328: \$? = $ac_status" >&5
12329   (exit "$ac_status"); }; }; then
12330   cf_cv_define_sigwinch=maybe
12331 else
12332   echo "$as_me: failed program was:" >&5
12333 cat "conftest.$ac_ext" >&5
12334 cf_cv_define_sigwinch=no
12335 fi
12336 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12337
12338 fi
12339 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12340
12341 fi
12342 echo "$as_me:12342: result: $cf_cv_define_sigwinch" >&5
12343 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
12344
12345 if test "$cf_cv_define_sigwinch" = maybe ; then
12346 echo "$as_me:12346: checking for actual SIGWINCH definition" >&5
12347 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
12348 if test "${cf_cv_fixup_sigwinch+set}" = set; then
12349   echo $ECHO_N "(cached) $ECHO_C" >&6
12350 else
12351
12352 cf_cv_fixup_sigwinch=unknown
12353 cf_sigwinch=32
12354 while test "$cf_sigwinch" != 1
12355 do
12356         cat >"conftest.$ac_ext" <<_ACEOF
12357 #line 12357 "configure"
12358 #include "confdefs.h"
12359
12360 #undef _XOPEN_SOURCE
12361 #undef _POSIX_SOURCE
12362 #undef _POSIX_C_SOURCE
12363 #include <sys/types.h>
12364 #include <sys/signal.h>
12365
12366 int
12367 main (void)
12368 {
12369
12370 #if SIGWINCH != $cf_sigwinch
12371 make an error
12372 #endif
12373 int x = SIGWINCH; (void)x
12374   ;
12375   return 0;
12376 }
12377 _ACEOF
12378 rm -f "conftest.$ac_objext"
12379 if { (eval echo "$as_me:12379: \"$ac_compile\"") >&5
12380   (eval $ac_compile) 2>&5
12381   ac_status=$?
12382   echo "$as_me:12382: \$? = $ac_status" >&5
12383   (exit "$ac_status"); } &&
12384          { ac_try='test -s "conftest.$ac_objext"'
12385   { (eval echo "$as_me:12385: \"$ac_try\"") >&5
12386   (eval $ac_try) 2>&5
12387   ac_status=$?
12388   echo "$as_me:12388: \$? = $ac_status" >&5
12389   (exit "$ac_status"); }; }; then
12390   cf_cv_fixup_sigwinch=$cf_sigwinch
12391          break
12392 else
12393   echo "$as_me: failed program was:" >&5
12394 cat "conftest.$ac_ext" >&5
12395 fi
12396 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12397
12398 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
12399 done
12400
12401 fi
12402 echo "$as_me:12402: result: $cf_cv_fixup_sigwinch" >&5
12403 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
12404
12405         if test "$cf_cv_fixup_sigwinch" != unknown ; then
12406                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
12407         fi
12408 fi
12409
12410 # Checks for CODESET support.
12411
12412 echo "$as_me:12412: checking for nl_langinfo and CODESET" >&5
12413 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
12414 if test "${am_cv_langinfo_codeset+set}" = set; then
12415   echo $ECHO_N "(cached) $ECHO_C" >&6
12416 else
12417   cat >"conftest.$ac_ext" <<_ACEOF
12418 #line 12418 "configure"
12419 #include "confdefs.h"
12420
12421 $ac_includes_default
12422 #include <langinfo.h>
12423 int
12424 main (void)
12425 {
12426 char* cs = nl_langinfo(CODESET); (void)cs
12427   ;
12428   return 0;
12429 }
12430 _ACEOF
12431 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12432 if { (eval echo "$as_me:12432: \"$ac_link\"") >&5
12433   (eval $ac_link) 2>&5
12434   ac_status=$?
12435   echo "$as_me:12435: \$? = $ac_status" >&5
12436   (exit "$ac_status"); } &&
12437          { ac_try='test -s "conftest$ac_exeext"'
12438   { (eval echo "$as_me:12438: \"$ac_try\"") >&5
12439   (eval $ac_try) 2>&5
12440   ac_status=$?
12441   echo "$as_me:12441: \$? = $ac_status" >&5
12442   (exit "$ac_status"); }; }; then
12443   am_cv_langinfo_codeset=yes
12444 else
12445   echo "$as_me: failed program was:" >&5
12446 cat "conftest.$ac_ext" >&5
12447 am_cv_langinfo_codeset=no
12448 fi
12449 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12450
12451 fi
12452 echo "$as_me:12452: result: $am_cv_langinfo_codeset" >&5
12453 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
12454         if test "$am_cv_langinfo_codeset" = yes; then
12455
12456 cat >>confdefs.h <<\EOF
12457 #define HAVE_LANGINFO_CODESET 1
12458 EOF
12459
12460         fi
12461
12462 # use these variables to work around a defect in gcc's fixincludes.
12463 NCURSES_OK_WCHAR_T=
12464 NCURSES_OK_WINT_T=
12465
12466 echo "$as_me:12466: checking if you want wide-character code" >&5
12467 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
12468
12469 # Check whether --enable-widec or --disable-widec was given.
12470 if test "${enable_widec+set}" = set; then
12471   enableval="$enable_widec"
12472   with_widec=$enableval
12473 else
12474   with_widec=no
12475 fi;
12476 echo "$as_me:12476: result: $with_widec" >&5
12477 echo "${ECHO_T}$with_widec" >&6
12478
12479 NCURSES_WCWIDTH_GRAPHICS=1
12480
12481 if test "x$with_widec" = xyes ; then
12482         if test "x$disable_lib_suffixes" = xno ; then
12483                 LIB_SUFFIX="w${LIB_SUFFIX}"
12484         fi
12485
12486 cat >>confdefs.h <<\EOF
12487 #define USE_WIDEC_SUPPORT 1
12488 EOF
12489
12490 cat >>confdefs.h <<\EOF
12491 #define NCURSES_WIDECHAR 1
12492 EOF
12493
12494         case "$CPPFLAGS" in
12495         (*_XOPEN_SOURCE=*)
12496                 ;;
12497         (*)
12498                 { echo "$as_me:12498: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&5
12499 echo "$as_me: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&2;}
12500                 # CPPFLAGS="$CPPFLAGS -DNCURSES_WIDECHAR"
12501                 CPPFLAGS_after_XOPEN="$CPPFLAGS_after_XOPEN -DNCURSES_WIDECHAR"
12502                 ;;
12503         esac
12504
12505 for ac_header in \
12506 wchar.h \
12507 wctype.h \
12508
12509 do
12510 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12511 echo "$as_me:12511: checking for $ac_header" >&5
12512 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12513 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12514   echo $ECHO_N "(cached) $ECHO_C" >&6
12515 else
12516   cat >"conftest.$ac_ext" <<_ACEOF
12517 #line 12517 "configure"
12518 #include "confdefs.h"
12519 #include <$ac_header>
12520 _ACEOF
12521 if { (eval echo "$as_me:12521: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12522   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12523   ac_status=$?
12524   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12525   rm -f conftest.er1
12526   cat conftest.err >&5
12527   echo "$as_me:12527: \$? = $ac_status" >&5
12528   (exit "$ac_status"); } >/dev/null; then
12529   if test -s conftest.err; then
12530     ac_cpp_err=$ac_c_preproc_warn_flag
12531   else
12532     ac_cpp_err=
12533   fi
12534 else
12535   ac_cpp_err=yes
12536 fi
12537 if test -z "$ac_cpp_err"; then
12538   eval "$as_ac_Header=yes"
12539 else
12540   echo "$as_me: failed program was:" >&5
12541   cat "conftest.$ac_ext" >&5
12542   eval "$as_ac_Header=no"
12543 fi
12544 rm -f conftest.err "conftest.$ac_ext"
12545 fi
12546 echo "$as_me:12546: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12547 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12548 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12549   cat >>confdefs.h <<EOF
12550 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12551 EOF
12552
12553 fi
12554 done
12555
12556 echo "$as_me:12556: checking if wchar.h can be used as is" >&5
12557 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
12558 if test "${cf_cv_wchar_h_okay+set}" = set; then
12559   echo $ECHO_N "(cached) $ECHO_C" >&6
12560 else
12561
12562 cat >"conftest.$ac_ext" <<_ACEOF
12563 #line 12563 "configure"
12564 #include "confdefs.h"
12565
12566 #include <stdlib.h>
12567 #ifdef HAVE_WCHAR_H
12568 #include <wchar.h>
12569 #endif
12570 #ifdef HAVE_WCTYPE_H
12571 #include <wctype.h>
12572 #endif
12573
12574 int
12575 main (void)
12576 {
12577
12578         wint_t foo = 0;
12579         int bar = iswpunct(foo)
12580   ;
12581   return 0;
12582 }
12583 _ACEOF
12584 rm -f "conftest.$ac_objext"
12585 if { (eval echo "$as_me:12585: \"$ac_compile\"") >&5
12586   (eval $ac_compile) 2>&5
12587   ac_status=$?
12588   echo "$as_me:12588: \$? = $ac_status" >&5
12589   (exit "$ac_status"); } &&
12590          { ac_try='test -s "conftest.$ac_objext"'
12591   { (eval echo "$as_me:12591: \"$ac_try\"") >&5
12592   (eval $ac_try) 2>&5
12593   ac_status=$?
12594   echo "$as_me:12594: \$? = $ac_status" >&5
12595   (exit "$ac_status"); }; }; then
12596   cf_cv_wchar_h_okay=yes
12597 else
12598   echo "$as_me: failed program was:" >&5
12599 cat "conftest.$ac_ext" >&5
12600 cf_cv_wchar_h_okay=no
12601 fi
12602 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12603 fi
12604 echo "$as_me:12604: result: $cf_cv_wchar_h_okay" >&5
12605 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
12606
12607 if test "$cf_cv_wchar_h_okay" = no
12608 then
12609
12610 echo "$as_me:12610: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
12611 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
12612 cat >"conftest.$ac_ext" <<_ACEOF
12613 #line 12613 "configure"
12614 #include "confdefs.h"
12615 #include <sys/types.h>
12616
12617 int
12618 main (void)
12619 {
12620
12621 #ifndef _XOPEN_SOURCE_EXTENDED
12622 make an error
12623 #endif
12624   ;
12625   return 0;
12626 }
12627 _ACEOF
12628 rm -f "conftest.$ac_objext"
12629 if { (eval echo "$as_me:12629: \"$ac_compile\"") >&5
12630   (eval $ac_compile) 2>&5
12631   ac_status=$?
12632   echo "$as_me:12632: \$? = $ac_status" >&5
12633   (exit "$ac_status"); } &&
12634          { ac_try='test -s "conftest.$ac_objext"'
12635   { (eval echo "$as_me:12635: \"$ac_try\"") >&5
12636   (eval $ac_try) 2>&5
12637   ac_status=$?
12638   echo "$as_me:12638: \$? = $ac_status" >&5
12639   (exit "$ac_status"); }; }; then
12640   cf_result=no
12641 else
12642   echo "$as_me: failed program was:" >&5
12643 cat "conftest.$ac_ext" >&5
12644 cf_result=yes
12645 fi
12646 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12647 echo "$as_me:12647: result: $cf_result" >&5
12648 echo "${ECHO_T}$cf_result" >&6
12649
12650 if test "$cf_result" = yes ; then
12651         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
12652 elif test "x" != "x" ; then
12653         echo "$as_me:12653: checking checking for compatible value versus " >&5
12654 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
12655         cat >"conftest.$ac_ext" <<_ACEOF
12656 #line 12656 "configure"
12657 #include "confdefs.h"
12658 #include <sys/types.h>
12659
12660 int
12661 main (void)
12662 {
12663
12664 #if _XOPEN_SOURCE_EXTENDED- < 0
12665 make an error
12666 #endif
12667   ;
12668   return 0;
12669 }
12670 _ACEOF
12671 rm -f "conftest.$ac_objext"
12672 if { (eval echo "$as_me:12672: \"$ac_compile\"") >&5
12673   (eval $ac_compile) 2>&5
12674   ac_status=$?
12675   echo "$as_me:12675: \$? = $ac_status" >&5
12676   (exit "$ac_status"); } &&
12677          { ac_try='test -s "conftest.$ac_objext"'
12678   { (eval echo "$as_me:12678: \"$ac_try\"") >&5
12679   (eval $ac_try) 2>&5
12680   ac_status=$?
12681   echo "$as_me:12681: \$? = $ac_status" >&5
12682   (exit "$ac_status"); }; }; then
12683   cf_result=yes
12684 else
12685   echo "$as_me: failed program was:" >&5
12686 cat "conftest.$ac_ext" >&5
12687 cf_result=no
12688 fi
12689 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12690         echo "$as_me:12690: result: $cf_result" >&5
12691 echo "${ECHO_T}$cf_result" >&6
12692         if test "$cf_result" = no ; then
12693                 # perhaps we can override it - try...
12694                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
12695         fi
12696 fi
12697
12698 fi
12699
12700 echo "$as_me:12700: checking if wcwidth agrees graphics are single-width" >&5
12701 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
12702 if test "${cf_cv_wcwidth_graphics+set}" = set; then
12703   echo $ECHO_N "(cached) $ECHO_C" >&6
12704 else
12705
12706 cat >conftest.in <<CF_EOF
12707 -       VT100 symbols
12708 0x250c  upper left corner
12709 0x2514  lower left corner
12710 0x2510  upper right corner
12711 0x2518  lower right corner
12712 0x251c  tee pointing left
12713 0x2524  tee pointing right
12714 0x2534  tee pointing up
12715 0x252c  tee pointing down
12716 0x2500  horizontal line
12717 0x2502  vertical line
12718 0x253c  large plus or crossover
12719 0x23ba  scan line 1
12720 0x23bd  scan line 9
12721 0x25c6  diamond
12722 0x2592  checker board (stipple)
12723 0x00b0  degree symbol
12724 0x00b1  plus/minus
12725 0x00b7  bullet
12726 -       Teletype 5410v1 symbols
12727 0x2190  arrow pointing left
12728 0x2192  arrow pointing right
12729 0x2193  arrow pointing down
12730 0x2191  arrow pointing up
12731 0x2592  board of squares
12732 0x2603  lantern symbol
12733 0x25ae  solid square block
12734 -       these defaults were invented for ncurses
12735 0x23bb  scan line 3
12736 0x23bc  scan line 7
12737 0x2264  less-than-or-equal-to
12738 0x2265  greater-than-or-equal-to
12739 0x03c0  greek pi
12740 0x2260  not-equal
12741 0x00a3  pound-sterling symbol
12742 -       thick-line-drawing
12743 0x250f  upper left corner
12744 0x2517  lower left corner
12745 0x2513  upper right corner
12746 0x251b  lower right corner
12747 0x2523  tee pointing left
12748 0x252b  tee pointing right
12749 0x253b  tee pointing up
12750 0x2533  tee pointing down
12751 0x2501  horizontal line
12752 0x2503  vertical line
12753 0x254b  large plus or crossover
12754 -       double-line-drawing
12755 0x2554  upper left corner
12756 0x255a  lower left corner
12757 0x2557  upper right corner
12758 0x255d  lower right corner
12759 0x2563  tee pointing left
12760 0x2560  tee pointing right
12761 0x2569  tee pointing up
12762 0x2566  tee pointing down
12763 0x2550  horizontal line
12764 0x2551  vertical line
12765 0x256c  large plus or crossover
12766 CF_EOF
12767 if test "$cross_compiling" = yes; then
12768   cf_cv_wcwidth_graphics=unknown
12769 else
12770   cat >"conftest.$ac_ext" <<_ACEOF
12771 #line 12771 "configure"
12772 #include "confdefs.h"
12773
12774 $ac_includes_default
12775
12776 #include <locale.h>
12777 #include <wchar.h>
12778
12779 #define MY_LEN 80
12780
12781 int
12782 main(void)
12783 {
12784         FILE *fp;
12785         int value;
12786         char buffer[MY_LEN + 1];
12787         char notes[MY_LEN + 1];
12788         int totals = 0;
12789         int passed = 0;
12790
12791         if (setlocale(LC_ALL, "en_US.UTF8") ||
12792                 setlocale(LC_ALL, "en_US.UTF-8") ||
12793                 setlocale(LC_ALL, "en_US.utf8") ||
12794                 setlocale(LC_ALL, "en_US.utf-8")) {
12795                 if ((fp = fopen("conftest.in", "r")) != 0) {
12796                         while (fgets(buffer, MY_LEN, fp) != 0) {
12797                                 if (*buffer == '-') {
12798                                         fprintf(stderr, "\\t%s", buffer);
12799                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
12800                                         ++totals;
12801                                         if (wcwidth(value) == 1)
12802                                                 ++passed;
12803                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
12804                                 } else {
12805                                         fprintf(stderr, "?\\t%s", buffer);
12806                                 }
12807                         }
12808                 }
12809         }
12810         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
12811         return (totals == passed) ? 0 : 1;
12812 }
12813
12814 _ACEOF
12815 rm -f "conftest$ac_exeext"
12816 if { (eval echo "$as_me:12816: \"$ac_link\"") >&5
12817   (eval $ac_link) 2>&5
12818   ac_status=$?
12819   echo "$as_me:12819: \$? = $ac_status" >&5
12820   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12821   { (eval echo "$as_me:12821: \"$ac_try\"") >&5
12822   (eval $ac_try) 2>&5
12823   ac_status=$?
12824   echo "$as_me:12824: \$? = $ac_status" >&5
12825   (exit "$ac_status"); }; }; then
12826   cf_cv_wcwidth_graphics=yes
12827 else
12828   echo "$as_me: program exited with status $ac_status" >&5
12829 echo "$as_me: failed program was:" >&5
12830 cat "conftest.$ac_ext" >&5
12831 cf_cv_wcwidth_graphics=no
12832 fi
12833 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12834 fi
12835
12836 fi
12837 echo "$as_me:12837: result: $cf_cv_wcwidth_graphics" >&5
12838 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
12839
12840         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
12841
12842         # with_overwrite=no
12843         NCURSES_CH_T=cchar_t
12844
12845 for ac_func in putwc btowc wctob wmemchr mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
12846 do
12847 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12848 echo "$as_me:12848: checking for $ac_func" >&5
12849 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12850 if eval "test \"\${$as_ac_var+set}\" = set"; then
12851   echo $ECHO_N "(cached) $ECHO_C" >&6
12852 else
12853   cat >"conftest.$ac_ext" <<_ACEOF
12854 #line 12854 "configure"
12855 #include "confdefs.h"
12856 #define $ac_func autoconf_temporary
12857 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
12858 #undef $ac_func
12859
12860 #ifdef __cplusplus
12861 extern "C"
12862 #endif
12863
12864 /* We use char because int might match the return type of a gcc2
12865    builtin and then its argument prototype would still apply.  */
12866 char $ac_func (void);
12867
12868 int
12869 main (void)
12870 {
12871
12872 /* The GNU C library defines stubs for functions which it implements
12873     to always fail with ENOSYS.  Some functions are actually named
12874     something starting with __ and the normal name is an alias.  */
12875 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12876 #error found stub for $ac_func
12877 #endif
12878
12879         return $ac_func ();
12880   ;
12881   return 0;
12882 }
12883 _ACEOF
12884 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12885 if { (eval echo "$as_me:12885: \"$ac_link\"") >&5
12886   (eval $ac_link) 2>&5
12887   ac_status=$?
12888   echo "$as_me:12888: \$? = $ac_status" >&5
12889   (exit "$ac_status"); } &&
12890          { ac_try='test -s "conftest$ac_exeext"'
12891   { (eval echo "$as_me:12891: \"$ac_try\"") >&5
12892   (eval $ac_try) 2>&5
12893   ac_status=$?
12894   echo "$as_me:12894: \$? = $ac_status" >&5
12895   (exit "$ac_status"); }; }; then
12896   eval "$as_ac_var=yes"
12897 else
12898   echo "$as_me: failed program was:" >&5
12899 cat "conftest.$ac_ext" >&5
12900 eval "$as_ac_var=no"
12901 fi
12902 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12903 fi
12904 echo "$as_me:12904: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12905 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12906 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12907   cat >>confdefs.h <<EOF
12908 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12909 EOF
12910
12911 fi
12912 done
12913
12914         if test "x$ac_cv_func_putwc" != xyes ; then
12915
12916 for ac_header in wchar.h
12917 do
12918 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12919 echo "$as_me:12919: checking for $ac_header" >&5
12920 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12921 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12922   echo $ECHO_N "(cached) $ECHO_C" >&6
12923 else
12924   cat >"conftest.$ac_ext" <<_ACEOF
12925 #line 12925 "configure"
12926 #include "confdefs.h"
12927 #include <$ac_header>
12928 _ACEOF
12929 if { (eval echo "$as_me:12929: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12930   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12931   ac_status=$?
12932   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12933   rm -f conftest.er1
12934   cat conftest.err >&5
12935   echo "$as_me:12935: \$? = $ac_status" >&5
12936   (exit "$ac_status"); } >/dev/null; then
12937   if test -s conftest.err; then
12938     ac_cpp_err=$ac_c_preproc_warn_flag
12939   else
12940     ac_cpp_err=
12941   fi
12942 else
12943   ac_cpp_err=yes
12944 fi
12945 if test -z "$ac_cpp_err"; then
12946   eval "$as_ac_Header=yes"
12947 else
12948   echo "$as_me: failed program was:" >&5
12949   cat "conftest.$ac_ext" >&5
12950   eval "$as_ac_Header=no"
12951 fi
12952 rm -f conftest.err "conftest.$ac_ext"
12953 fi
12954 echo "$as_me:12954: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12955 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12956 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12957   cat >>confdefs.h <<EOF
12958 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12959 EOF
12960
12961 fi
12962 done
12963
12964 echo "$as_me:12964: checking for multibyte character support" >&5
12965 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12966 if test "${cf_cv_utf8_lib+set}" = set; then
12967   echo $ECHO_N "(cached) $ECHO_C" >&6
12968 else
12969
12970         cf_save_LIBS="$LIBS"
12971         cat >"conftest.$ac_ext" <<_ACEOF
12972 #line 12972 "configure"
12973 #include "confdefs.h"
12974
12975 $ac_includes_default
12976 #ifdef HAVE_WCHAR_H
12977 #include <wchar.h>
12978 #endif
12979
12980 int
12981 main (void)
12982 {
12983 putwc(0,0);
12984   ;
12985   return 0;
12986 }
12987 _ACEOF
12988 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12989 if { (eval echo "$as_me:12989: \"$ac_link\"") >&5
12990   (eval $ac_link) 2>&5
12991   ac_status=$?
12992   echo "$as_me:12992: \$? = $ac_status" >&5
12993   (exit "$ac_status"); } &&
12994          { ac_try='test -s "conftest$ac_exeext"'
12995   { (eval echo "$as_me:12995: \"$ac_try\"") >&5
12996   (eval $ac_try) 2>&5
12997   ac_status=$?
12998   echo "$as_me:12998: \$? = $ac_status" >&5
12999   (exit "$ac_status"); }; }; then
13000   cf_cv_utf8_lib=yes
13001 else
13002   echo "$as_me: failed program was:" >&5
13003 cat "conftest.$ac_ext" >&5
13004
13005 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
13006 # will be set on completion of the AC_TRY_LINK below.
13007 cf_cv_header_path_utf8=
13008 cf_cv_library_path_utf8=
13009
13010 echo "${as_me:-configure}:13010: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
13011
13012 cf_save_LIBS="$LIBS"
13013
13014 cat >"conftest.$ac_ext" <<_ACEOF
13015 #line 13015 "configure"
13016 #include "confdefs.h"
13017
13018 #include <libutf8.h>
13019 int
13020 main (void)
13021 {
13022 putwc(0,0);
13023   ;
13024   return 0;
13025 }
13026 _ACEOF
13027 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13028 if { (eval echo "$as_me:13028: \"$ac_link\"") >&5
13029   (eval $ac_link) 2>&5
13030   ac_status=$?
13031   echo "$as_me:13031: \$? = $ac_status" >&5
13032   (exit "$ac_status"); } &&
13033          { ac_try='test -s "conftest$ac_exeext"'
13034   { (eval echo "$as_me:13034: \"$ac_try\"") >&5
13035   (eval $ac_try) 2>&5
13036   ac_status=$?
13037   echo "$as_me:13037: \$? = $ac_status" >&5
13038   (exit "$ac_status"); }; }; then
13039
13040         cf_cv_find_linkage_utf8=yes
13041         cf_cv_header_path_utf8=/usr/include
13042         cf_cv_library_path_utf8=/usr/lib
13043
13044 else
13045   echo "$as_me: failed program was:" >&5
13046 cat "conftest.$ac_ext" >&5
13047
13048 LIBS="-lutf8  $cf_save_LIBS"
13049
13050 cat >"conftest.$ac_ext" <<_ACEOF
13051 #line 13051 "configure"
13052 #include "confdefs.h"
13053
13054 #include <libutf8.h>
13055 int
13056 main (void)
13057 {
13058 putwc(0,0);
13059   ;
13060   return 0;
13061 }
13062 _ACEOF
13063 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13064 if { (eval echo "$as_me:13064: \"$ac_link\"") >&5
13065   (eval $ac_link) 2>&5
13066   ac_status=$?
13067   echo "$as_me:13067: \$? = $ac_status" >&5
13068   (exit "$ac_status"); } &&
13069          { ac_try='test -s "conftest$ac_exeext"'
13070   { (eval echo "$as_me:13070: \"$ac_try\"") >&5
13071   (eval $ac_try) 2>&5
13072   ac_status=$?
13073   echo "$as_me:13073: \$? = $ac_status" >&5
13074   (exit "$ac_status"); }; }; then
13075
13076         cf_cv_find_linkage_utf8=yes
13077         cf_cv_header_path_utf8=/usr/include
13078         cf_cv_library_path_utf8=/usr/lib
13079         cf_cv_library_file_utf8="-lutf8"
13080
13081 else
13082   echo "$as_me: failed program was:" >&5
13083 cat "conftest.$ac_ext" >&5
13084
13085         cf_cv_find_linkage_utf8=no
13086         LIBS="$cf_save_LIBS"
13087
13088         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
13089
13090 echo "${as_me:-configure}:13090: testing find linkage for utf8 library ..." 1>&5
13091
13092 echo "${as_me:-configure}:13092: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
13093
13094         cf_save_CPPFLAGS="$CPPFLAGS"
13095         cf_test_CPPFLAGS="$CPPFLAGS"
13096
13097 cf_search=
13098
13099 # collect the current set of include-directories from compiler flags
13100 cf_header_path_list=""
13101 if test -n "${CFLAGS}${CPPFLAGS}" ; then
13102         for cf_header_path in $CPPFLAGS $CFLAGS
13103         do
13104                 case "$cf_header_path" in
13105                 (-I*)
13106                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
13107
13108 test "x$cf_header_path" != "xNONE" && \
13109 test -d "$cf_header_path" && \
13110  {
13111         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
13112         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
13113         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
13114         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
13115         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
13116         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
13117 }
13118
13119                         cf_header_path_list="$cf_header_path_list $cf_search"
13120                         ;;
13121                 esac
13122         done
13123 fi
13124
13125 # add the variations for the package we are looking for
13126
13127 cf_search=
13128
13129 test "x$prefix" != "xNONE" && \
13130 test -d "$prefix" && \
13131  {
13132         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
13133         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
13134         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
13135         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
13136         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
13137         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
13138 }
13139
13140 for cf_subdir_prefix in \
13141         /usr \
13142         /usr/local \
13143         /usr/pkg \
13144         /opt \
13145         /opt/local \
13146         $HOME
13147 do
13148
13149 test "x$cf_subdir_prefix" != "x$prefix" && \
13150 test -d "$cf_subdir_prefix" && \
13151 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13152         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
13153         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
13154         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
13155         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
13156         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
13157         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
13158 }
13159
13160 done
13161
13162 test "$includedir" != NONE && \
13163 test "$includedir" != "/usr/include" && \
13164 test -d "$includedir" && {
13165         test -d "$includedir" &&    cf_search="$cf_search $includedir"
13166         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
13167 }
13168
13169 test "$oldincludedir" != NONE && \
13170 test "$oldincludedir" != "/usr/include" && \
13171 test -d "$oldincludedir" && {
13172         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
13173         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
13174 }
13175
13176 cf_search="$cf_search $cf_header_path_list"
13177
13178         for cf_cv_header_path_utf8 in $cf_search
13179         do
13180                 if test -d "$cf_cv_header_path_utf8" ; then
13181                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
13182
13183 echo "${as_me:-configure}:13183: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
13184
13185                         CPPFLAGS="$cf_save_CPPFLAGS"
13186
13187         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13188         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
13189
13190                         cat >"conftest.$ac_ext" <<_ACEOF
13191 #line 13191 "configure"
13192 #include "confdefs.h"
13193
13194 #include <libutf8.h>
13195 int
13196 main (void)
13197 {
13198 putwc(0,0);
13199   ;
13200   return 0;
13201 }
13202 _ACEOF
13203 rm -f "conftest.$ac_objext"
13204 if { (eval echo "$as_me:13204: \"$ac_compile\"") >&5
13205   (eval $ac_compile) 2>&5
13206   ac_status=$?
13207   echo "$as_me:13207: \$? = $ac_status" >&5
13208   (exit "$ac_status"); } &&
13209          { ac_try='test -s "conftest.$ac_objext"'
13210   { (eval echo "$as_me:13210: \"$ac_try\"") >&5
13211   (eval $ac_try) 2>&5
13212   ac_status=$?
13213   echo "$as_me:13213: \$? = $ac_status" >&5
13214   (exit "$ac_status"); }; }; then
13215
13216                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
13217
13218 echo "${as_me:-configure}:13218: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
13219
13220                                 cf_cv_find_linkage_utf8=maybe
13221                                 cf_test_CPPFLAGS="$CPPFLAGS"
13222                                 break
13223 else
13224   echo "$as_me: failed program was:" >&5
13225 cat "conftest.$ac_ext" >&5
13226
13227                                 CPPFLAGS="$cf_save_CPPFLAGS"
13228
13229 fi
13230 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13231                 fi
13232         done
13233
13234         if test "$cf_cv_find_linkage_utf8" = maybe ; then
13235
13236 echo "${as_me:-configure}:13236: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
13237
13238                 cf_save_LIBS="$LIBS"
13239                 cf_save_LDFLAGS="$LDFLAGS"
13240
13241                 if test "$cf_cv_find_linkage_utf8" != yes ; then
13242
13243 cf_search=
13244 cf_library_path_list=""
13245 if test -n "${LDFLAGS}${LIBS}" ; then
13246         for cf_library_path in $LDFLAGS $LIBS
13247         do
13248                 case "$cf_library_path" in
13249                 (-L*)
13250                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
13251
13252 test "x$cf_library_path" != "xNONE" && \
13253 test -d "$cf_library_path" && \
13254  {
13255         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
13256         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
13257         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
13258         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
13259         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
13260         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
13261 }
13262
13263                         cf_library_path_list="$cf_library_path_list $cf_search"
13264                         ;;
13265                 esac
13266         done
13267 fi
13268
13269 cf_search=
13270
13271 test "x$prefix" != "xNONE" && \
13272 test -d "$prefix" && \
13273  {
13274         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
13275         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
13276         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
13277         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
13278         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
13279         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
13280 }
13281
13282 for cf_subdir_prefix in \
13283         /usr \
13284         /usr/local \
13285         /usr/pkg \
13286         /opt \
13287         /opt/local \
13288         $HOME
13289 do
13290
13291 test "x$cf_subdir_prefix" != "x$prefix" && \
13292 test -d "$cf_subdir_prefix" && \
13293 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13294         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
13295         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
13296         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
13297         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
13298         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
13299         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
13300 }
13301
13302 done
13303
13304 cf_search="$cf_library_path_list $cf_search"
13305
13306                         for cf_cv_library_path_utf8 in $cf_search
13307                         do
13308                                 if test -d "$cf_cv_library_path_utf8" ; then
13309                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
13310
13311 echo "${as_me:-configure}:13311: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
13312
13313                                         CPPFLAGS="$cf_test_CPPFLAGS"
13314                                         LIBS="-lutf8  $cf_save_LIBS"
13315                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
13316                                         cat >"conftest.$ac_ext" <<_ACEOF
13317 #line 13317 "configure"
13318 #include "confdefs.h"
13319
13320 #include <libutf8.h>
13321 int
13322 main (void)
13323 {
13324 putwc(0,0);
13325   ;
13326   return 0;
13327 }
13328 _ACEOF
13329 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13330 if { (eval echo "$as_me:13330: \"$ac_link\"") >&5
13331   (eval $ac_link) 2>&5
13332   ac_status=$?
13333   echo "$as_me:13333: \$? = $ac_status" >&5
13334   (exit "$ac_status"); } &&
13335          { ac_try='test -s "conftest$ac_exeext"'
13336   { (eval echo "$as_me:13336: \"$ac_try\"") >&5
13337   (eval $ac_try) 2>&5
13338   ac_status=$?
13339   echo "$as_me:13339: \$? = $ac_status" >&5
13340   (exit "$ac_status"); }; }; then
13341
13342                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
13343
13344 echo "${as_me:-configure}:13344: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
13345
13346                                         cf_cv_find_linkage_utf8=yes
13347                                         cf_cv_library_file_utf8="-lutf8"
13348                                         break
13349 else
13350   echo "$as_me: failed program was:" >&5
13351 cat "conftest.$ac_ext" >&5
13352
13353                                         CPPFLAGS="$cf_save_CPPFLAGS"
13354                                         LIBS="$cf_save_LIBS"
13355                                         LDFLAGS="$cf_save_LDFLAGS"
13356
13357 fi
13358 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13359                                 fi
13360                         done
13361                         CPPFLAGS="$cf_save_CPPFLAGS"
13362                         LDFLAGS="$cf_save_LDFLAGS"
13363                 fi
13364
13365         else
13366                 cf_cv_find_linkage_utf8=no
13367         fi
13368
13369 fi
13370 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13371
13372 fi
13373 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13374
13375 LIBS="$cf_save_LIBS"
13376
13377 if test "$cf_cv_find_linkage_utf8" = yes ; then
13378 cf_cv_utf8_lib=add-on
13379 else
13380 cf_cv_utf8_lib=no
13381 fi
13382
13383 fi
13384 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13385 fi
13386 echo "$as_me:13386: result: $cf_cv_utf8_lib" >&5
13387 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
13388
13389 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
13390 # ncurses/ncursesw:
13391 if test "$cf_cv_utf8_lib" = "add-on" ; then
13392
13393 cat >>confdefs.h <<\EOF
13394 #define HAVE_LIBUTF8_H 1
13395 EOF
13396
13397 if test -n "$cf_cv_header_path_utf8" ; then
13398   for cf_add_incdir in $cf_cv_header_path_utf8
13399   do
13400         while test "$cf_add_incdir" != /usr/include
13401         do
13402           if test -d "$cf_add_incdir"
13403           then
13404                 cf_have_incdir=no
13405                 if test -n "$CFLAGS$CPPFLAGS" ; then
13406                   # a loop is needed to ensure we can add subdirs of existing dirs
13407                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13408                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13409                           cf_have_incdir=yes; break
13410                         fi
13411                   done
13412                 fi
13413
13414                 if test "$cf_have_incdir" = no ; then
13415                   if test "$cf_add_incdir" = /usr/local/include ; then
13416                         if test "$GCC" = yes
13417                         then
13418                           cf_save_CPPFLAGS=$CPPFLAGS
13419
13420         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13421         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
13422
13423                           cat >"conftest.$ac_ext" <<_ACEOF
13424 #line 13424 "configure"
13425 #include "confdefs.h"
13426 #include <stdio.h>
13427 int
13428 main (void)
13429 {
13430 printf("Hello")
13431   ;
13432   return 0;
13433 }
13434 _ACEOF
13435 rm -f "conftest.$ac_objext"
13436 if { (eval echo "$as_me:13436: \"$ac_compile\"") >&5
13437   (eval $ac_compile) 2>&5
13438   ac_status=$?
13439   echo "$as_me:13439: \$? = $ac_status" >&5
13440   (exit "$ac_status"); } &&
13441          { ac_try='test -s "conftest.$ac_objext"'
13442   { (eval echo "$as_me:13442: \"$ac_try\"") >&5
13443   (eval $ac_try) 2>&5
13444   ac_status=$?
13445   echo "$as_me:13445: \$? = $ac_status" >&5
13446   (exit "$ac_status"); }; }; then
13447   :
13448 else
13449   echo "$as_me: failed program was:" >&5
13450 cat "conftest.$ac_ext" >&5
13451 cf_have_incdir=yes
13452 fi
13453 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13454                           CPPFLAGS=$cf_save_CPPFLAGS
13455                         fi
13456                   fi
13457                 fi
13458
13459                 if test "$cf_have_incdir" = no ; then
13460                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
13461
13462 echo "${as_me:-configure}:13462: testing adding $cf_add_incdir to include-path ..." 1>&5
13463
13464                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13465
13466                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
13467                   test "$cf_top_incdir" = "$cf_add_incdir" && break
13468                   cf_add_incdir="$cf_top_incdir"
13469                 else
13470                   break
13471                 fi
13472           else
13473                 break
13474           fi
13475         done
13476   done
13477 fi
13478
13479 if test -n "$cf_cv_library_path_utf8" ; then
13480         for cf_add_libdir in $cf_cv_library_path_utf8
13481         do
13482                 if test "$cf_add_libdir" = /usr/lib ; then
13483                         :
13484                 elif test -d "$cf_add_libdir"
13485                 then
13486                         cf_have_libdir=no
13487                         if test -n "$LDFLAGS$LIBS" ; then
13488                                 # a loop is needed to ensure we can add subdirs of existing dirs
13489                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
13490                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13491                                                 cf_have_libdir=yes; break
13492                                         fi
13493                                 done
13494                         fi
13495                         if test "$cf_have_libdir" = no ; then
13496                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
13497
13498 echo "${as_me:-configure}:13498: testing adding $cf_add_libdir to library-path ..." 1>&5
13499
13500                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13501                         fi
13502                 fi
13503         done
13504 fi
13505
13506 cf_add_libs="$LIBS"
13507 # reverse order
13508 cf_add_0lib=
13509 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13510 # filter duplicates
13511 for cf_add_1lib in $cf_add_0lib; do
13512         for cf_add_2lib in $cf_add_libs; do
13513                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13514                         cf_add_1lib=
13515                         break
13516                 fi
13517         done
13518         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13519 done
13520 LIBS="$cf_add_libs"
13521
13522 fi
13523
13524                 if test "$cf_cv_utf8_lib" != no ; then
13525                         NCURSES_LIBUTF8=1
13526                 fi
13527         fi
13528
13529 # This is needed on Tru64 5.0 to declare mbstate_t
13530 echo "$as_me:13530: checking if we must include wchar.h to declare mbstate_t" >&5
13531 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
13532 if test "${cf_cv_mbstate_t+set}" = set; then
13533   echo $ECHO_N "(cached) $ECHO_C" >&6
13534 else
13535
13536 cat >"conftest.$ac_ext" <<_ACEOF
13537 #line 13537 "configure"
13538 #include "confdefs.h"
13539
13540 #include <stdlib.h>
13541 #include <stdarg.h>
13542 #include <stdio.h>
13543 #ifdef HAVE_LIBUTF8_H
13544 #include <libutf8.h>
13545 #endif
13546 int
13547 main (void)
13548 {
13549 mbstate_t state
13550   ;
13551   return 0;
13552 }
13553 _ACEOF
13554 rm -f "conftest.$ac_objext"
13555 if { (eval echo "$as_me:13555: \"$ac_compile\"") >&5
13556   (eval $ac_compile) 2>&5
13557   ac_status=$?
13558   echo "$as_me:13558: \$? = $ac_status" >&5
13559   (exit "$ac_status"); } &&
13560          { ac_try='test -s "conftest.$ac_objext"'
13561   { (eval echo "$as_me:13561: \"$ac_try\"") >&5
13562   (eval $ac_try) 2>&5
13563   ac_status=$?
13564   echo "$as_me:13564: \$? = $ac_status" >&5
13565   (exit "$ac_status"); }; }; then
13566   cf_cv_mbstate_t=no
13567 else
13568   echo "$as_me: failed program was:" >&5
13569 cat "conftest.$ac_ext" >&5
13570 cat >"conftest.$ac_ext" <<_ACEOF
13571 #line 13571 "configure"
13572 #include "confdefs.h"
13573
13574 #include <stdlib.h>
13575 #include <stdarg.h>
13576 #include <stdio.h>
13577 #include <wchar.h>
13578 #ifdef HAVE_LIBUTF8_H
13579 #include <libutf8.h>
13580 #endif
13581 int
13582 main (void)
13583 {
13584 mbstate_t value
13585   ;
13586   return 0;
13587 }
13588 _ACEOF
13589 rm -f "conftest.$ac_objext"
13590 if { (eval echo "$as_me:13590: \"$ac_compile\"") >&5
13591   (eval $ac_compile) 2>&5
13592   ac_status=$?
13593   echo "$as_me:13593: \$? = $ac_status" >&5
13594   (exit "$ac_status"); } &&
13595          { ac_try='test -s "conftest.$ac_objext"'
13596   { (eval echo "$as_me:13596: \"$ac_try\"") >&5
13597   (eval $ac_try) 2>&5
13598   ac_status=$?
13599   echo "$as_me:13599: \$? = $ac_status" >&5
13600   (exit "$ac_status"); }; }; then
13601   cf_cv_mbstate_t=yes
13602 else
13603   echo "$as_me: failed program was:" >&5
13604 cat "conftest.$ac_ext" >&5
13605 cf_cv_mbstate_t=unknown
13606 fi
13607 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13608 fi
13609 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13610 fi
13611 echo "$as_me:13611: result: $cf_cv_mbstate_t" >&5
13612 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
13613
13614 if test "$cf_cv_mbstate_t" = yes ; then
13615
13616 cat >>confdefs.h <<\EOF
13617 #define NEED_WCHAR_H 1
13618 EOF
13619
13620         NEED_WCHAR_H=1
13621 fi
13622
13623 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
13624 if test "$cf_cv_mbstate_t" = unknown ; then
13625         NCURSES_MBSTATE_T=1
13626 fi
13627
13628 # This is needed on Tru64 5.0 to declare wchar_t
13629 echo "$as_me:13629: checking if we must include wchar.h to declare wchar_t" >&5
13630 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
13631 if test "${cf_cv_wchar_t+set}" = set; then
13632   echo $ECHO_N "(cached) $ECHO_C" >&6
13633 else
13634
13635 cat >"conftest.$ac_ext" <<_ACEOF
13636 #line 13636 "configure"
13637 #include "confdefs.h"
13638
13639 #include <stdlib.h>
13640 #include <stdarg.h>
13641 #include <stdio.h>
13642 #ifdef HAVE_LIBUTF8_H
13643 #include <libutf8.h>
13644 #endif
13645 int
13646 main (void)
13647 {
13648 wchar_t state
13649   ;
13650   return 0;
13651 }
13652 _ACEOF
13653 rm -f "conftest.$ac_objext"
13654 if { (eval echo "$as_me:13654: \"$ac_compile\"") >&5
13655   (eval $ac_compile) 2>&5
13656   ac_status=$?
13657   echo "$as_me:13657: \$? = $ac_status" >&5
13658   (exit "$ac_status"); } &&
13659          { ac_try='test -s "conftest.$ac_objext"'
13660   { (eval echo "$as_me:13660: \"$ac_try\"") >&5
13661   (eval $ac_try) 2>&5
13662   ac_status=$?
13663   echo "$as_me:13663: \$? = $ac_status" >&5
13664   (exit "$ac_status"); }; }; then
13665   cf_cv_wchar_t=no
13666 else
13667   echo "$as_me: failed program was:" >&5
13668 cat "conftest.$ac_ext" >&5
13669 cat >"conftest.$ac_ext" <<_ACEOF
13670 #line 13670 "configure"
13671 #include "confdefs.h"
13672
13673 #include <stdlib.h>
13674 #include <stdarg.h>
13675 #include <stdio.h>
13676 #include <wchar.h>
13677 #ifdef HAVE_LIBUTF8_H
13678 #include <libutf8.h>
13679 #endif
13680 int
13681 main (void)
13682 {
13683 wchar_t value
13684   ;
13685   return 0;
13686 }
13687 _ACEOF
13688 rm -f "conftest.$ac_objext"
13689 if { (eval echo "$as_me:13689: \"$ac_compile\"") >&5
13690   (eval $ac_compile) 2>&5
13691   ac_status=$?
13692   echo "$as_me:13692: \$? = $ac_status" >&5
13693   (exit "$ac_status"); } &&
13694          { ac_try='test -s "conftest.$ac_objext"'
13695   { (eval echo "$as_me:13695: \"$ac_try\"") >&5
13696   (eval $ac_try) 2>&5
13697   ac_status=$?
13698   echo "$as_me:13698: \$? = $ac_status" >&5
13699   (exit "$ac_status"); }; }; then
13700   cf_cv_wchar_t=yes
13701 else
13702   echo "$as_me: failed program was:" >&5
13703 cat "conftest.$ac_ext" >&5
13704 cf_cv_wchar_t=unknown
13705 fi
13706 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13707 fi
13708 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13709 fi
13710 echo "$as_me:13710: result: $cf_cv_wchar_t" >&5
13711 echo "${ECHO_T}$cf_cv_wchar_t" >&6
13712
13713 if test "$cf_cv_wchar_t" = yes ; then
13714
13715 cat >>confdefs.h <<\EOF
13716 #define NEED_WCHAR_H 1
13717 EOF
13718
13719         NEED_WCHAR_H=1
13720 fi
13721
13722 # if we do not find wchar_t in either place, use substitution to provide a fallback.
13723 if test "$cf_cv_wchar_t" = unknown ; then
13724         NCURSES_WCHAR_T=1
13725 fi
13726
13727 # if we find wchar_t in either place, use substitution to provide a fallback.
13728 if test "$cf_cv_wchar_t" != unknown ; then
13729         NCURSES_OK_WCHAR_T=1
13730 fi
13731
13732 # This is needed on Tru64 5.0 to declare wint_t
13733 echo "$as_me:13733: checking if we must include wchar.h to declare wint_t" >&5
13734 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
13735 if test "${cf_cv_wint_t+set}" = set; then
13736   echo $ECHO_N "(cached) $ECHO_C" >&6
13737 else
13738
13739 cat >"conftest.$ac_ext" <<_ACEOF
13740 #line 13740 "configure"
13741 #include "confdefs.h"
13742
13743 #include <stdlib.h>
13744 #include <stdarg.h>
13745 #include <stdio.h>
13746 #ifdef HAVE_LIBUTF8_H
13747 #include <libutf8.h>
13748 #endif
13749 int
13750 main (void)
13751 {
13752 wint_t state
13753   ;
13754   return 0;
13755 }
13756 _ACEOF
13757 rm -f "conftest.$ac_objext"
13758 if { (eval echo "$as_me:13758: \"$ac_compile\"") >&5
13759   (eval $ac_compile) 2>&5
13760   ac_status=$?
13761   echo "$as_me:13761: \$? = $ac_status" >&5
13762   (exit "$ac_status"); } &&
13763          { ac_try='test -s "conftest.$ac_objext"'
13764   { (eval echo "$as_me:13764: \"$ac_try\"") >&5
13765   (eval $ac_try) 2>&5
13766   ac_status=$?
13767   echo "$as_me:13767: \$? = $ac_status" >&5
13768   (exit "$ac_status"); }; }; then
13769   cf_cv_wint_t=no
13770 else
13771   echo "$as_me: failed program was:" >&5
13772 cat "conftest.$ac_ext" >&5
13773 cat >"conftest.$ac_ext" <<_ACEOF
13774 #line 13774 "configure"
13775 #include "confdefs.h"
13776
13777 #include <stdlib.h>
13778 #include <stdarg.h>
13779 #include <stdio.h>
13780 #include <wchar.h>
13781 #ifdef HAVE_LIBUTF8_H
13782 #include <libutf8.h>
13783 #endif
13784 int
13785 main (void)
13786 {
13787 wint_t value
13788   ;
13789   return 0;
13790 }
13791 _ACEOF
13792 rm -f "conftest.$ac_objext"
13793 if { (eval echo "$as_me:13793: \"$ac_compile\"") >&5
13794   (eval $ac_compile) 2>&5
13795   ac_status=$?
13796   echo "$as_me:13796: \$? = $ac_status" >&5
13797   (exit "$ac_status"); } &&
13798          { ac_try='test -s "conftest.$ac_objext"'
13799   { (eval echo "$as_me:13799: \"$ac_try\"") >&5
13800   (eval $ac_try) 2>&5
13801   ac_status=$?
13802   echo "$as_me:13802: \$? = $ac_status" >&5
13803   (exit "$ac_status"); }; }; then
13804   cf_cv_wint_t=yes
13805 else
13806   echo "$as_me: failed program was:" >&5
13807 cat "conftest.$ac_ext" >&5
13808 cf_cv_wint_t=unknown
13809 fi
13810 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13811 fi
13812 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13813 fi
13814 echo "$as_me:13814: result: $cf_cv_wint_t" >&5
13815 echo "${ECHO_T}$cf_cv_wint_t" >&6
13816
13817 if test "$cf_cv_wint_t" = yes ; then
13818
13819 cat >>confdefs.h <<\EOF
13820 #define NEED_WCHAR_H 1
13821 EOF
13822
13823         NEED_WCHAR_H=1
13824 fi
13825
13826 # if we do not find wint_t in either place, use substitution to provide a fallback.
13827 if test "$cf_cv_wint_t" = unknown ; then
13828         NCURSES_WINT_T=1
13829 fi
13830
13831 # if we find wint_t in either place, use substitution to provide a fallback.
13832 if test "$cf_cv_wint_t" != unknown ; then
13833         NCURSES_OK_WINT_T=1
13834 fi
13835
13836         if test "$NCURSES_MBSTATE_T" != 0; then
13837
13838 cat >>confdefs.h <<\EOF
13839 #define NEED_MBSTATE_T_DEF 1
13840 EOF
13841
13842         fi
13843 fi
13844
13845 ###   use option --disable-lp64 to allow long chtype
13846 echo "$as_me:13846: checking whether to enable _LP64 definition in curses.h" >&5
13847 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
13848
13849 # Check whether --enable-lp64 or --disable-lp64 was given.
13850 if test "${enable_lp64+set}" = set; then
13851   enableval="$enable_lp64"
13852   with_lp64=$enableval
13853 else
13854   with_lp64=$cf_dft_with_lp64
13855 fi;
13856 echo "$as_me:13856: result: $with_lp64" >&5
13857 echo "${ECHO_T}$with_lp64" >&6
13858
13859 if test "x$with_lp64" = xyes ; then
13860         cf_cv_enable_lp64=1
13861 else
13862         cf_cv_enable_lp64=0
13863 fi
13864
13865 # Check whether --enable-largefile or --disable-largefile was given.
13866 if test "${enable_largefile+set}" = set; then
13867   enableval="$enable_largefile"
13868
13869 fi;
13870 if test "$enable_largefile" != no; then
13871
13872   echo "$as_me:13872: checking for special C compiler options needed for large files" >&5
13873 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13874 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13875   echo $ECHO_N "(cached) $ECHO_C" >&6
13876 else
13877   ac_cv_sys_largefile_CC=no
13878      if test "$GCC" != yes; then
13879        ac_save_CC=$CC
13880        while :; do
13881          # IRIX 6.2 and later do not support large files by default,
13882          # so use the C compiler's -n32 option if that helps.
13883          cat >"conftest.$ac_ext" <<_ACEOF
13884 #line 13884 "configure"
13885 #include "confdefs.h"
13886 #include <sys/types.h>
13887  /* Check that off_t can represent 2**63 - 1 correctly.
13888     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13889     since some C++ compilers masquerading as C compilers
13890     incorrectly reject 9223372036854775807.  */
13891 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13892   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13893                        && LARGE_OFF_T % 2147483647 == 1)
13894                       ? 1 : -1];
13895 int
13896 main (void)
13897 {
13898
13899   ;
13900   return 0;
13901 }
13902 _ACEOF
13903          rm -f "conftest.$ac_objext"
13904 if { (eval echo "$as_me:13904: \"$ac_compile\"") >&5
13905   (eval $ac_compile) 2>&5
13906   ac_status=$?
13907   echo "$as_me:13907: \$? = $ac_status" >&5
13908   (exit "$ac_status"); } &&
13909          { ac_try='test -s "conftest.$ac_objext"'
13910   { (eval echo "$as_me:13910: \"$ac_try\"") >&5
13911   (eval $ac_try) 2>&5
13912   ac_status=$?
13913   echo "$as_me:13913: \$? = $ac_status" >&5
13914   (exit "$ac_status"); }; }; then
13915   break
13916 else
13917   echo "$as_me: failed program was:" >&5
13918 cat "conftest.$ac_ext" >&5
13919 fi
13920 rm -f "conftest.$ac_objext"
13921          CC="$CC -n32"
13922          rm -f "conftest.$ac_objext"
13923 if { (eval echo "$as_me:13923: \"$ac_compile\"") >&5
13924   (eval $ac_compile) 2>&5
13925   ac_status=$?
13926   echo "$as_me:13926: \$? = $ac_status" >&5
13927   (exit "$ac_status"); } &&
13928          { ac_try='test -s "conftest.$ac_objext"'
13929   { (eval echo "$as_me:13929: \"$ac_try\"") >&5
13930   (eval $ac_try) 2>&5
13931   ac_status=$?
13932   echo "$as_me:13932: \$? = $ac_status" >&5
13933   (exit "$ac_status"); }; }; then
13934   ac_cv_sys_largefile_CC=' -n32'; break
13935 else
13936   echo "$as_me: failed program was:" >&5
13937 cat "conftest.$ac_ext" >&5
13938 fi
13939 rm -f "conftest.$ac_objext"
13940          break
13941        done
13942        CC=$ac_save_CC
13943        rm -f "conftest.$ac_ext"
13944     fi
13945 fi
13946 echo "$as_me:13946: result: $ac_cv_sys_largefile_CC" >&5
13947 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13948   if test "$ac_cv_sys_largefile_CC" != no; then
13949     CC=$CC$ac_cv_sys_largefile_CC
13950   fi
13951
13952   echo "$as_me:13952: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13953 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13954 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13955   echo $ECHO_N "(cached) $ECHO_C" >&6
13956 else
13957   while :; do
13958   ac_cv_sys_file_offset_bits=no
13959   cat >"conftest.$ac_ext" <<_ACEOF
13960 #line 13960 "configure"
13961 #include "confdefs.h"
13962 #include <sys/types.h>
13963  /* Check that off_t can represent 2**63 - 1 correctly.
13964     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13965     since some C++ compilers masquerading as C compilers
13966     incorrectly reject 9223372036854775807.  */
13967 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13968   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13969                        && LARGE_OFF_T % 2147483647 == 1)
13970                       ? 1 : -1];
13971 int
13972 main (void)
13973 {
13974
13975   ;
13976   return 0;
13977 }
13978 _ACEOF
13979 rm -f "conftest.$ac_objext"
13980 if { (eval echo "$as_me:13980: \"$ac_compile\"") >&5
13981   (eval $ac_compile) 2>&5
13982   ac_status=$?
13983   echo "$as_me:13983: \$? = $ac_status" >&5
13984   (exit "$ac_status"); } &&
13985          { ac_try='test -s "conftest.$ac_objext"'
13986   { (eval echo "$as_me:13986: \"$ac_try\"") >&5
13987   (eval $ac_try) 2>&5
13988   ac_status=$?
13989   echo "$as_me:13989: \$? = $ac_status" >&5
13990   (exit "$ac_status"); }; }; then
13991   break
13992 else
13993   echo "$as_me: failed program was:" >&5
13994 cat "conftest.$ac_ext" >&5
13995 fi
13996 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13997   cat >"conftest.$ac_ext" <<_ACEOF
13998 #line 13998 "configure"
13999 #include "confdefs.h"
14000 #define _FILE_OFFSET_BITS 64
14001 #include <sys/types.h>
14002  /* Check that off_t can represent 2**63 - 1 correctly.
14003     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14004     since some C++ compilers masquerading as C compilers
14005     incorrectly reject 9223372036854775807.  */
14006 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14007   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14008                        && LARGE_OFF_T % 2147483647 == 1)
14009                       ? 1 : -1];
14010 int
14011 main (void)
14012 {
14013
14014   ;
14015   return 0;
14016 }
14017 _ACEOF
14018 rm -f "conftest.$ac_objext"
14019 if { (eval echo "$as_me:14019: \"$ac_compile\"") >&5
14020   (eval $ac_compile) 2>&5
14021   ac_status=$?
14022   echo "$as_me:14022: \$? = $ac_status" >&5
14023   (exit "$ac_status"); } &&
14024          { ac_try='test -s "conftest.$ac_objext"'
14025   { (eval echo "$as_me:14025: \"$ac_try\"") >&5
14026   (eval $ac_try) 2>&5
14027   ac_status=$?
14028   echo "$as_me:14028: \$? = $ac_status" >&5
14029   (exit "$ac_status"); }; }; then
14030   ac_cv_sys_file_offset_bits=64; break
14031 else
14032   echo "$as_me: failed program was:" >&5
14033 cat "conftest.$ac_ext" >&5
14034 fi
14035 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14036   break
14037 done
14038 fi
14039 echo "$as_me:14039: result: $ac_cv_sys_file_offset_bits" >&5
14040 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
14041 if test "$ac_cv_sys_file_offset_bits" != no; then
14042
14043 cat >>confdefs.h <<EOF
14044 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14045 EOF
14046
14047 fi
14048 rm -rf conftest*
14049   echo "$as_me:14049: checking for _LARGE_FILES value needed for large files" >&5
14050 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
14051 if test "${ac_cv_sys_large_files+set}" = set; then
14052   echo $ECHO_N "(cached) $ECHO_C" >&6
14053 else
14054   while :; do
14055   ac_cv_sys_large_files=no
14056   cat >"conftest.$ac_ext" <<_ACEOF
14057 #line 14057 "configure"
14058 #include "confdefs.h"
14059 #include <sys/types.h>
14060  /* Check that off_t can represent 2**63 - 1 correctly.
14061     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14062     since some C++ compilers masquerading as C compilers
14063     incorrectly reject 9223372036854775807.  */
14064 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14065   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14066                        && LARGE_OFF_T % 2147483647 == 1)
14067                       ? 1 : -1];
14068 int
14069 main (void)
14070 {
14071
14072   ;
14073   return 0;
14074 }
14075 _ACEOF
14076 rm -f "conftest.$ac_objext"
14077 if { (eval echo "$as_me:14077: \"$ac_compile\"") >&5
14078   (eval $ac_compile) 2>&5
14079   ac_status=$?
14080   echo "$as_me:14080: \$? = $ac_status" >&5
14081   (exit "$ac_status"); } &&
14082          { ac_try='test -s "conftest.$ac_objext"'
14083   { (eval echo "$as_me:14083: \"$ac_try\"") >&5
14084   (eval $ac_try) 2>&5
14085   ac_status=$?
14086   echo "$as_me:14086: \$? = $ac_status" >&5
14087   (exit "$ac_status"); }; }; then
14088   break
14089 else
14090   echo "$as_me: failed program was:" >&5
14091 cat "conftest.$ac_ext" >&5
14092 fi
14093 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14094   cat >"conftest.$ac_ext" <<_ACEOF
14095 #line 14095 "configure"
14096 #include "confdefs.h"
14097 #define _LARGE_FILES 1
14098 #include <sys/types.h>
14099  /* Check that off_t can represent 2**63 - 1 correctly.
14100     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14101     since some C++ compilers masquerading as C compilers
14102     incorrectly reject 9223372036854775807.  */
14103 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14104   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14105                        && LARGE_OFF_T % 2147483647 == 1)
14106                       ? 1 : -1];
14107 int
14108 main (void)
14109 {
14110
14111   ;
14112   return 0;
14113 }
14114 _ACEOF
14115 rm -f "conftest.$ac_objext"
14116 if { (eval echo "$as_me:14116: \"$ac_compile\"") >&5
14117   (eval $ac_compile) 2>&5
14118   ac_status=$?
14119   echo "$as_me:14119: \$? = $ac_status" >&5
14120   (exit "$ac_status"); } &&
14121          { ac_try='test -s "conftest.$ac_objext"'
14122   { (eval echo "$as_me:14122: \"$ac_try\"") >&5
14123   (eval $ac_try) 2>&5
14124   ac_status=$?
14125   echo "$as_me:14125: \$? = $ac_status" >&5
14126   (exit "$ac_status"); }; }; then
14127   ac_cv_sys_large_files=1; break
14128 else
14129   echo "$as_me: failed program was:" >&5
14130 cat "conftest.$ac_ext" >&5
14131 fi
14132 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14133   break
14134 done
14135 fi
14136 echo "$as_me:14136: result: $ac_cv_sys_large_files" >&5
14137 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14138 if test "$ac_cv_sys_large_files" != no; then
14139
14140 cat >>confdefs.h <<EOF
14141 #define _LARGE_FILES $ac_cv_sys_large_files
14142 EOF
14143
14144 fi
14145 rm -rf conftest*
14146 fi
14147
14148         if test "$enable_largefile" != no ; then
14149         echo "$as_me:14149: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14150 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14151 if test "${ac_cv_sys_largefile_source+set}" = set; then
14152   echo $ECHO_N "(cached) $ECHO_C" >&6
14153 else
14154   while :; do
14155   ac_cv_sys_largefile_source=no
14156   cat >"conftest.$ac_ext" <<_ACEOF
14157 #line 14157 "configure"
14158 #include "confdefs.h"
14159 #include <stdio.h>
14160 int
14161 main (void)
14162 {
14163 return !fseeko;
14164   ;
14165   return 0;
14166 }
14167 _ACEOF
14168 rm -f "conftest.$ac_objext"
14169 if { (eval echo "$as_me:14169: \"$ac_compile\"") >&5
14170   (eval $ac_compile) 2>&5
14171   ac_status=$?
14172   echo "$as_me:14172: \$? = $ac_status" >&5
14173   (exit "$ac_status"); } &&
14174          { ac_try='test -s "conftest.$ac_objext"'
14175   { (eval echo "$as_me:14175: \"$ac_try\"") >&5
14176   (eval $ac_try) 2>&5
14177   ac_status=$?
14178   echo "$as_me:14178: \$? = $ac_status" >&5
14179   (exit "$ac_status"); }; }; then
14180   break
14181 else
14182   echo "$as_me: failed program was:" >&5
14183 cat "conftest.$ac_ext" >&5
14184 fi
14185 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14186   cat >"conftest.$ac_ext" <<_ACEOF
14187 #line 14187 "configure"
14188 #include "confdefs.h"
14189 #define _LARGEFILE_SOURCE 1
14190 #include <stdio.h>
14191 int
14192 main (void)
14193 {
14194 return !fseeko;
14195   ;
14196   return 0;
14197 }
14198 _ACEOF
14199 rm -f "conftest.$ac_objext"
14200 if { (eval echo "$as_me:14200: \"$ac_compile\"") >&5
14201   (eval $ac_compile) 2>&5
14202   ac_status=$?
14203   echo "$as_me:14203: \$? = $ac_status" >&5
14204   (exit "$ac_status"); } &&
14205          { ac_try='test -s "conftest.$ac_objext"'
14206   { (eval echo "$as_me:14206: \"$ac_try\"") >&5
14207   (eval $ac_try) 2>&5
14208   ac_status=$?
14209   echo "$as_me:14209: \$? = $ac_status" >&5
14210   (exit "$ac_status"); }; }; then
14211   ac_cv_sys_largefile_source=1; break
14212 else
14213   echo "$as_me: failed program was:" >&5
14214 cat "conftest.$ac_ext" >&5
14215 fi
14216 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14217   break
14218 done
14219 fi
14220 echo "$as_me:14220: result: $ac_cv_sys_largefile_source" >&5
14221 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14222 if test "$ac_cv_sys_largefile_source" != no; then
14223
14224 cat >>confdefs.h <<EOF
14225 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14226 EOF
14227
14228 fi
14229 rm -rf conftest*
14230
14231 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14232 # in glibc 2.1.3, but that breaks too many other things.
14233 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14234 echo "$as_me:14234: checking for fseeko" >&5
14235 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14236 if test "${ac_cv_func_fseeko+set}" = set; then
14237   echo $ECHO_N "(cached) $ECHO_C" >&6
14238 else
14239   cat >"conftest.$ac_ext" <<_ACEOF
14240 #line 14240 "configure"
14241 #include "confdefs.h"
14242 #include <stdio.h>
14243 int
14244 main (void)
14245 {
14246 return fseeko && fseeko (stdin, 0, 0);
14247   ;
14248   return 0;
14249 }
14250 _ACEOF
14251 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14252 if { (eval echo "$as_me:14252: \"$ac_link\"") >&5
14253   (eval $ac_link) 2>&5
14254   ac_status=$?
14255   echo "$as_me:14255: \$? = $ac_status" >&5
14256   (exit "$ac_status"); } &&
14257          { ac_try='test -s "conftest$ac_exeext"'
14258   { (eval echo "$as_me:14258: \"$ac_try\"") >&5
14259   (eval $ac_try) 2>&5
14260   ac_status=$?
14261   echo "$as_me:14261: \$? = $ac_status" >&5
14262   (exit "$ac_status"); }; }; then
14263   ac_cv_func_fseeko=yes
14264 else
14265   echo "$as_me: failed program was:" >&5
14266 cat "conftest.$ac_ext" >&5
14267 ac_cv_func_fseeko=no
14268 fi
14269 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14270 fi
14271 echo "$as_me:14271: result: $ac_cv_func_fseeko" >&5
14272 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14273 if test $ac_cv_func_fseeko = yes; then
14274
14275 cat >>confdefs.h <<\EOF
14276 #define HAVE_FSEEKO 1
14277 EOF
14278
14279 fi
14280
14281         # Normally we would collect these definitions in the config.h,
14282         # but (like _XOPEN_SOURCE), some environments rely on having these
14283         # defined before any of the system headers are included.  Another
14284         # case comes up with C++, e.g., on AIX the compiler compiles the
14285         # header files by themselves before looking at the body files it is
14286         # told to compile.  For ncurses, those header files do not include
14287         # the config.h
14288         if test "$ac_cv_sys_large_files" != no
14289         then
14290
14291         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14292         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14293
14294         fi
14295         if test "$ac_cv_sys_largefile_source" != no
14296         then
14297
14298         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14299         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14300
14301         fi
14302         if test "$ac_cv_sys_file_offset_bits" != no
14303         then
14304
14305         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14306         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14307
14308         fi
14309
14310         echo "$as_me:14310: checking whether to use struct dirent64" >&5
14311 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14312 if test "${cf_cv_struct_dirent64+set}" = set; then
14313   echo $ECHO_N "(cached) $ECHO_C" >&6
14314 else
14315
14316                 cat >"conftest.$ac_ext" <<_ACEOF
14317 #line 14317 "configure"
14318 #include "confdefs.h"
14319
14320 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14321 #include <sys/types.h>
14322 #include <dirent.h>
14323
14324 int
14325 main (void)
14326 {
14327
14328                 /* if transitional largefile support is setup, this is true */
14329                 extern struct dirent64 * readdir(DIR *);
14330                 struct dirent64 *x = readdir((DIR *)0);
14331                 struct dirent *y = readdir((DIR *)0);
14332                 int z = x - y;
14333                 (void)z;
14334
14335   ;
14336   return 0;
14337 }
14338 _ACEOF
14339 rm -f "conftest.$ac_objext"
14340 if { (eval echo "$as_me:14340: \"$ac_compile\"") >&5
14341   (eval $ac_compile) 2>&5
14342   ac_status=$?
14343   echo "$as_me:14343: \$? = $ac_status" >&5
14344   (exit "$ac_status"); } &&
14345          { ac_try='test -s "conftest.$ac_objext"'
14346   { (eval echo "$as_me:14346: \"$ac_try\"") >&5
14347   (eval $ac_try) 2>&5
14348   ac_status=$?
14349   echo "$as_me:14349: \$? = $ac_status" >&5
14350   (exit "$ac_status"); }; }; then
14351   cf_cv_struct_dirent64=yes
14352 else
14353   echo "$as_me: failed program was:" >&5
14354 cat "conftest.$ac_ext" >&5
14355 cf_cv_struct_dirent64=no
14356 fi
14357 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14358
14359 fi
14360 echo "$as_me:14360: result: $cf_cv_struct_dirent64" >&5
14361 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14362         test "$cf_cv_struct_dirent64" = yes &&
14363 cat >>confdefs.h <<\EOF
14364 #define HAVE_STRUCT_DIRENT64 1
14365 EOF
14366
14367         fi
14368
14369 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
14370 echo "$as_me:14370: checking if you want tparm not to use X/Open fixed-parameter list" >&5
14371 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
14372
14373 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
14374 if test "${enable_tparm_varargs+set}" = set; then
14375   enableval="$enable_tparm_varargs"
14376   with_tparm_varargs=$enableval
14377 else
14378   with_tparm_varargs=yes
14379 fi;
14380 echo "$as_me:14380: result: $with_tparm_varargs" >&5
14381 echo "${ECHO_T}$with_tparm_varargs" >&6
14382 NCURSES_TPARM_VARARGS=0
14383 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
14384
14385 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
14386 if test "$with_ticlib" != no ; then
14387 echo "$as_me:14387: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
14388 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
14389
14390 # Check whether --enable-tic-depends or --disable-tic-depends was given.
14391 if test "${enable_tic_depends+set}" = set; then
14392   enableval="$enable_tic_depends"
14393   with_tic_depends=$enableval
14394 else
14395   with_tic_depends=yes
14396 fi;
14397 echo "$as_me:14397: result: $with_tic_depends" >&5
14398 echo "${ECHO_T}$with_tic_depends" >&6
14399 else
14400         with_tic_depends=no
14401 fi
14402
14403 ###   use option --enable-wattr-macros to enable wattr* macros in curses.h
14404 echo "$as_me:14404: checking if you want to enable wattr* macros" >&5
14405 echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6
14406
14407 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
14408 if test "${enable_wattr_macros+set}" = set; then
14409   enableval="$enable_wattr_macros"
14410   with_wattr_macros=$enableval
14411 else
14412   with_wattr_macros=no
14413 fi;
14414 if [ "x$with_wattr_macros" != xyes ]; then
14415         NCURSES_WATTR_MACROS=0
14416         echo "$as_me:14416: result: no" >&5
14417 echo "${ECHO_T}no" >&6
14418 else
14419         NCURSES_WATTR_MACROS=1
14420         echo "$as_me:14420: result: yes" >&5
14421 echo "${ECHO_T}yes" >&6
14422 fi
14423
14424 echo "$as_me:14424: checking for X11 rgb file" >&5
14425 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
14426
14427 # Check whether --with-x11-rgb or --without-x11-rgb was given.
14428 if test "${with_x11_rgb+set}" = set; then
14429   withval="$with_x11_rgb"
14430   RGB_PATH=$withval
14431 else
14432   RGB_PATH=auto
14433 fi;
14434
14435 if test "x$RGB_PATH" = xauto
14436 then
14437         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
14438         for cf_path in \
14439                 /opt/local/share/X11/rgb.txt \
14440                 /opt/X11/share/X11/rgb.txt \
14441                 /usr/share/X11/rgb.txt \
14442                 /usr/X11/share/X11/rgb.txt \
14443                 /usr/X11/lib/X11/rgb.txt \
14444                 /usr/lib/X11/rgb.txt \
14445                 /etc/X11/rgb.txt \
14446                 /usr/pkg/lib/X11/rgb.txt \
14447                 /usr/X11R7/lib/X11/rgb.txt \
14448                 /usr/X11R6/lib/X11/rgb.txt \
14449                 /usr/X11R5/lib/X11/rgb.txt \
14450                 /usr/X11R4/lib/X11/rgb.txt \
14451                 /usr/local/lib/X11/rgb.txt \
14452                 /usr/local/share/X11/rgb.txt \
14453                 /usr/lib64/X11/rgb.txt
14454         do
14455                 if test -f "$cf_path" ; then
14456                         RGB_PATH="$cf_path"
14457                         break
14458                 fi
14459         done
14460 else
14461         cf_path=$RGB_PATH
14462
14463 if test "x$prefix" != xNONE; then
14464         cf_path_syntax="$prefix"
14465 else
14466         cf_path_syntax="$ac_default_prefix"
14467 fi
14468
14469 case ".$cf_path" in
14470 (.\$\(*\)*|.\'*\'*)
14471         ;;
14472 (..|./*|.\\*)
14473         ;;
14474 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
14475         ;;
14476 (.\$\{*prefix\}*|.\$\{*dir\}*)
14477         eval cf_path="$cf_path"
14478         case ".$cf_path" in
14479         (.NONE/*)
14480                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14481                 ;;
14482         esac
14483         ;;
14484 (.no|.NONE/*)
14485         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14486         ;;
14487 (*)
14488         { { echo "$as_me:14488: error: expected a pathname, not \"$cf_path\"" >&5
14489 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
14490    { (exit 1); exit 1; }; }
14491         ;;
14492 esac
14493
14494 fi
14495
14496 echo "$as_me:14496: result: $RGB_PATH" >&5
14497 echo "${ECHO_T}$RGB_PATH" >&6
14498
14499 cat >>confdefs.h <<EOF
14500 #define RGB_PATH "$cf_path"
14501 EOF
14502
14503 no_x11_rgb=
14504 if test "$RGB_PATH" = no
14505 then
14506         no_x11_rgb="#"
14507 fi
14508
14509 ###   use option --with-bool to override bool's type
14510 echo "$as_me:14510: checking for type of bool" >&5
14511 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
14512
14513 # Check whether --with-bool or --without-bool was given.
14514 if test "${with_bool+set}" = set; then
14515   withval="$with_bool"
14516   NCURSES_BOOL="$withval"
14517 else
14518   NCURSES_BOOL=auto
14519 fi;
14520 echo "$as_me:14520: result: $NCURSES_BOOL" >&5
14521 echo "${ECHO_T}$NCURSES_BOOL" >&6
14522
14523 echo "$as_me:14523: checking for alternate terminal capabilities file" >&5
14524 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
14525
14526 # Check whether --with-caps or --without-caps was given.
14527 if test "${with_caps+set}" = set; then
14528   withval="$with_caps"
14529   TERMINFO_CAPS=Caps.$withval
14530 else
14531   TERMINFO_CAPS=Caps
14532 fi;
14533 if test ! -f "${srcdir}/include/${TERMINFO_CAPS}"
14534 then
14535         { echo "$as_me:14535: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&5
14536 echo "$as_me: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&2;}
14537         TERMINFO_CAPS=Caps
14538 fi
14539 echo "$as_me:14539: result: $TERMINFO_CAPS" >&5
14540 echo "${ECHO_T}$TERMINFO_CAPS" >&6
14541
14542 ###   use option --with-chtype to override chtype's type
14543 echo "$as_me:14543: checking for type of chtype" >&5
14544 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14545
14546 # Check whether --with-chtype or --without-chtype was given.
14547 if test "${with_chtype+set}" = set; then
14548   withval="$with_chtype"
14549   NCURSES_CHTYPE="$withval"
14550 else
14551   NCURSES_CHTYPE=$cf_dft_chtype
14552 fi;
14553 echo "$as_me:14553: result: $NCURSES_CHTYPE" >&5
14554 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
14555
14556 ###   use option --with-ospeed to override ospeed's type
14557 echo "$as_me:14557: checking for type of ospeed" >&5
14558 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
14559
14560 # Check whether --with-ospeed or --without-ospeed was given.
14561 if test "${with_ospeed+set}" = set; then
14562   withval="$with_ospeed"
14563   NCURSES_OSPEED="$withval"
14564 else
14565   NCURSES_OSPEED=short
14566 fi;
14567 echo "$as_me:14567: result: $NCURSES_OSPEED" >&5
14568 echo "${ECHO_T}$NCURSES_OSPEED" >&6
14569
14570 ###   use option --with-mmask-t to override mmask_t's type
14571 echo "$as_me:14571: checking for type of mmask_t" >&5
14572 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
14573
14574 # Check whether --with-mmask-t or --without-mmask-t was given.
14575 if test "${with_mmask_t+set}" = set; then
14576   withval="$with_mmask_t"
14577   NCURSES_MMASK_T="$withval"
14578 else
14579   NCURSES_MMASK_T=$cf_dft_mmask_t
14580 fi;
14581 echo "$as_me:14581: result: $NCURSES_MMASK_T" >&5
14582 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
14583
14584 ###   use option --with-ccharw-max to override CCHARW_MAX size
14585 echo "$as_me:14585: checking for size CCHARW_MAX" >&5
14586 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
14587
14588 # Check whether --with-ccharw-max or --without-ccharw-max was given.
14589 if test "${with_ccharw_max+set}" = set; then
14590   withval="$with_ccharw_max"
14591   NCURSES_CCHARW_MAX="$withval"
14592 else
14593   NCURSES_CCHARW_MAX=$cf_dft_ccharw_max
14594 fi;
14595 echo "$as_me:14595: result: $NCURSES_CCHARW_MAX" >&5
14596 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
14597
14598 echo "$as_me:14598: checking for signed char" >&5
14599 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14600 if test "${ac_cv_type_signed_char+set}" = set; then
14601   echo $ECHO_N "(cached) $ECHO_C" >&6
14602 else
14603   cat >"conftest.$ac_ext" <<_ACEOF
14604 #line 14604 "configure"
14605 #include "confdefs.h"
14606 $ac_includes_default
14607 int
14608 main (void)
14609 {
14610 if ((signed char *) 0)
14611   return 0;
14612 if (sizeof (signed char))
14613   return 0;
14614   ;
14615   return 0;
14616 }
14617 _ACEOF
14618 rm -f "conftest.$ac_objext"
14619 if { (eval echo "$as_me:14619: \"$ac_compile\"") >&5
14620   (eval $ac_compile) 2>&5
14621   ac_status=$?
14622   echo "$as_me:14622: \$? = $ac_status" >&5
14623   (exit "$ac_status"); } &&
14624          { ac_try='test -s "conftest.$ac_objext"'
14625   { (eval echo "$as_me:14625: \"$ac_try\"") >&5
14626   (eval $ac_try) 2>&5
14627   ac_status=$?
14628   echo "$as_me:14628: \$? = $ac_status" >&5
14629   (exit "$ac_status"); }; }; then
14630   ac_cv_type_signed_char=yes
14631 else
14632   echo "$as_me: failed program was:" >&5
14633 cat "conftest.$ac_ext" >&5
14634 ac_cv_type_signed_char=no
14635 fi
14636 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14637 fi
14638 echo "$as_me:14638: result: $ac_cv_type_signed_char" >&5
14639 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14640
14641 echo "$as_me:14641: checking size of signed char" >&5
14642 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14643 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14644   echo $ECHO_N "(cached) $ECHO_C" >&6
14645 else
14646   if test "$ac_cv_type_signed_char" = yes; then
14647   if test "$cross_compiling" = yes; then
14648   # Depending upon the size, compute the lo and hi bounds.
14649 cat >"conftest.$ac_ext" <<_ACEOF
14650 #line 14650 "configure"
14651 #include "confdefs.h"
14652 $ac_includes_default
14653 int
14654 main (void)
14655 {
14656 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14657   ;
14658   return 0;
14659 }
14660 _ACEOF
14661 rm -f "conftest.$ac_objext"
14662 if { (eval echo "$as_me:14662: \"$ac_compile\"") >&5
14663   (eval $ac_compile) 2>&5
14664   ac_status=$?
14665   echo "$as_me:14665: \$? = $ac_status" >&5
14666   (exit "$ac_status"); } &&
14667          { ac_try='test -s "conftest.$ac_objext"'
14668   { (eval echo "$as_me:14668: \"$ac_try\"") >&5
14669   (eval $ac_try) 2>&5
14670   ac_status=$?
14671   echo "$as_me:14671: \$? = $ac_status" >&5
14672   (exit "$ac_status"); }; }; then
14673   ac_lo=0 ac_mid=0
14674   while :; do
14675     cat >"conftest.$ac_ext" <<_ACEOF
14676 #line 14676 "configure"
14677 #include "confdefs.h"
14678 $ac_includes_default
14679 int
14680 main (void)
14681 {
14682 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14683   ;
14684   return 0;
14685 }
14686 _ACEOF
14687 rm -f "conftest.$ac_objext"
14688 if { (eval echo "$as_me:14688: \"$ac_compile\"") >&5
14689   (eval $ac_compile) 2>&5
14690   ac_status=$?
14691   echo "$as_me:14691: \$? = $ac_status" >&5
14692   (exit "$ac_status"); } &&
14693          { ac_try='test -s "conftest.$ac_objext"'
14694   { (eval echo "$as_me:14694: \"$ac_try\"") >&5
14695   (eval $ac_try) 2>&5
14696   ac_status=$?
14697   echo "$as_me:14697: \$? = $ac_status" >&5
14698   (exit "$ac_status"); }; }; then
14699   ac_hi=$ac_mid; break
14700 else
14701   echo "$as_me: failed program was:" >&5
14702 cat "conftest.$ac_ext" >&5
14703 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
14704 fi
14705 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14706   done
14707 else
14708   echo "$as_me: failed program was:" >&5
14709 cat "conftest.$ac_ext" >&5
14710 ac_hi=-1 ac_mid=-1
14711   while :; do
14712     cat >"conftest.$ac_ext" <<_ACEOF
14713 #line 14713 "configure"
14714 #include "confdefs.h"
14715 $ac_includes_default
14716 int
14717 main (void)
14718 {
14719 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14720   ;
14721   return 0;
14722 }
14723 _ACEOF
14724 rm -f "conftest.$ac_objext"
14725 if { (eval echo "$as_me:14725: \"$ac_compile\"") >&5
14726   (eval $ac_compile) 2>&5
14727   ac_status=$?
14728   echo "$as_me:14728: \$? = $ac_status" >&5
14729   (exit "$ac_status"); } &&
14730          { ac_try='test -s "conftest.$ac_objext"'
14731   { (eval echo "$as_me:14731: \"$ac_try\"") >&5
14732   (eval $ac_try) 2>&5
14733   ac_status=$?
14734   echo "$as_me:14734: \$? = $ac_status" >&5
14735   (exit "$ac_status"); }; }; then
14736   ac_lo=$ac_mid; break
14737 else
14738   echo "$as_me: failed program was:" >&5
14739 cat "conftest.$ac_ext" >&5
14740 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
14741 fi
14742 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14743   done
14744 fi
14745 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14746 # Binary search between lo and hi bounds.
14747 while test "x$ac_lo" != "x$ac_hi"; do
14748   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14749   cat >"conftest.$ac_ext" <<_ACEOF
14750 #line 14750 "configure"
14751 #include "confdefs.h"
14752 $ac_includes_default
14753 int
14754 main (void)
14755 {
14756 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14757   ;
14758   return 0;
14759 }
14760 _ACEOF
14761 rm -f "conftest.$ac_objext"
14762 if { (eval echo "$as_me:14762: \"$ac_compile\"") >&5
14763   (eval $ac_compile) 2>&5
14764   ac_status=$?
14765   echo "$as_me:14765: \$? = $ac_status" >&5
14766   (exit "$ac_status"); } &&
14767          { ac_try='test -s "conftest.$ac_objext"'
14768   { (eval echo "$as_me:14768: \"$ac_try\"") >&5
14769   (eval $ac_try) 2>&5
14770   ac_status=$?
14771   echo "$as_me:14771: \$? = $ac_status" >&5
14772   (exit "$ac_status"); }; }; then
14773   ac_hi=$ac_mid
14774 else
14775   echo "$as_me: failed program was:" >&5
14776 cat "conftest.$ac_ext" >&5
14777 ac_lo=`expr "$ac_mid" + 1`
14778 fi
14779 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14780 done
14781 ac_cv_sizeof_signed_char=$ac_lo
14782 else
14783   if test "$cross_compiling" = yes; then
14784   { { echo "$as_me:14784: error: cannot run test program while cross compiling" >&5
14785 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14786    { (exit 1); exit 1; }; }
14787 else
14788   cat >"conftest.$ac_ext" <<_ACEOF
14789 #line 14789 "configure"
14790 #include "confdefs.h"
14791 $ac_includes_default
14792 int
14793 main (void)
14794 {
14795 FILE *f = fopen ("conftest.val", "w");
14796 if (!f)
14797   $ac_main_return (1);
14798 fprintf (f, "%ld", (long)(sizeof (signed char)));
14799 fclose (f);
14800   ;
14801   return 0;
14802 }
14803 _ACEOF
14804 rm -f "conftest$ac_exeext"
14805 if { (eval echo "$as_me:14805: \"$ac_link\"") >&5
14806   (eval $ac_link) 2>&5
14807   ac_status=$?
14808   echo "$as_me:14808: \$? = $ac_status" >&5
14809   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14810   { (eval echo "$as_me:14810: \"$ac_try\"") >&5
14811   (eval $ac_try) 2>&5
14812   ac_status=$?
14813   echo "$as_me:14813: \$? = $ac_status" >&5
14814   (exit "$ac_status"); }; }; then
14815   ac_cv_sizeof_signed_char=`cat conftest.val`
14816 else
14817   echo "$as_me: program exited with status $ac_status" >&5
14818 echo "$as_me: failed program was:" >&5
14819 cat "conftest.$ac_ext" >&5
14820 fi
14821 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14822 fi
14823 fi
14824 rm -f conftest.val
14825 else
14826   ac_cv_sizeof_signed_char=0
14827 fi
14828 fi
14829 echo "$as_me:14829: result: $ac_cv_sizeof_signed_char" >&5
14830 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14831 cat >>confdefs.h <<EOF
14832 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14833 EOF
14834
14835 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14836         NCURSES_SBOOL="signed char"
14837 else
14838         NCURSES_SBOOL="char"
14839 fi
14840 echo "$as_me:14840: checking if you want to use signed Boolean array in term.h" >&5
14841 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14842
14843 # Check whether --enable-signed-char or --disable-signed-char was given.
14844 if test "${enable_signed_char+set}" = set; then
14845   enableval="$enable_signed_char"
14846   with_signed_char=$enableval
14847 else
14848   with_signed_char=$cf_dft_signed_char
14849 fi;
14850 echo "$as_me:14850: result: $with_signed_char" >&5
14851 echo "${ECHO_T}$with_signed_char" >&6
14852 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14853
14854 ###   use option --with-tparm-arg to override tparm's argument type
14855 echo "$as_me:14855: checking for type of tparm args" >&5
14856 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14857
14858 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14859 if test "${with_tparm_arg+set}" = set; then
14860   withval="$with_tparm_arg"
14861   NCURSES_TPARM_ARG="$withval"
14862 else
14863   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14864 fi;
14865 echo "$as_me:14865: result: $NCURSES_TPARM_ARG" >&5
14866 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14867
14868 ### Enable compiling-in rcs id's
14869 echo "$as_me:14869: checking if RCS identifiers should be compiled-in" >&5
14870 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14871
14872 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14873 if test "${with_rcs_ids+set}" = set; then
14874   withval="$with_rcs_ids"
14875   with_rcs_ids=$withval
14876 else
14877   with_rcs_ids=no
14878 fi;
14879 echo "$as_me:14879: result: $with_rcs_ids" >&5
14880 echo "${ECHO_T}$with_rcs_ids" >&6
14881 test "x$with_rcs_ids" = xyes &&
14882 cat >>confdefs.h <<\EOF
14883 #define USE_RCS_IDS 1
14884 EOF
14885
14886 ###############################################################################
14887
14888 echo "$as_me:14888: checking format of man-pages" >&5
14889 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14890
14891 # Check whether --with-manpage-format or --without-manpage-format was given.
14892 if test "${with_manpage_format+set}" = set; then
14893   withval="$with_manpage_format"
14894   MANPAGE_FORMAT=$withval
14895 else
14896   MANPAGE_FORMAT=unknown
14897 fi;
14898
14899 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14900 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14901
14902 cf_unknown=
14903
14904 case "$MANPAGE_FORMAT" in
14905 (unknown)
14906         if test -z "$MANPATH" ; then
14907                 MANPATH="/usr/man:/usr/share/man"
14908         fi
14909
14910         # look for the 'date' man-page (it is most likely to be installed!)
14911         MANPAGE_FORMAT=
14912         cf_preform="no"
14913         cf_catonly="yes"
14914         cf_example="date"
14915
14916         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14917         for cf_dir in $MANPATH; do
14918                 test -z "$cf_dir" && cf_dir=/usr/man
14919                 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
14920                 do
14921                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14922                         if test "x$cf_test" = "x$cf_name" ; then
14923
14924                                 case "$cf_name" in
14925                                 (*.bz2) MANPAGE_FORMAT="$MANPAGE_FORMAT bzip2";;
14926                                 (*.xz)  MANPAGE_FORMAT="$MANPAGE_FORMAT xz";;
14927                                 (*.gz)  MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14928                                 (*.Z)   MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14929                                 (*.0)   MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14930                                 (*)     MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14931                                 esac
14932
14933                                 case "$cf_name" in
14934                                 ($cf_dir/man*)
14935                                         cf_catonly=no
14936                                         ;;
14937                                 ($cf_dir/cat*)
14938                                         cf_preform=yes
14939                                         ;;
14940                                 esac
14941                                 break
14942                         fi
14943
14944                         # if we found a match in either man* or cat*, stop looking
14945                         if test -n "$MANPAGE_FORMAT" ; then
14946                                 cf_found=no
14947                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14948                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14949                                 case "$cf_name" in
14950                                 ($cf_dir/cat*)
14951                                         cf_found=yes
14952                                         ;;
14953                                 esac
14954                                 test "$cf_found" = yes && break
14955                         fi
14956                 done
14957                 # only check the first directory in $MANPATH where we find manpages
14958                 if test -n "$MANPAGE_FORMAT" ; then
14959                         break
14960                 fi
14961         done
14962         # if we did not find the example, just assume it is normal
14963         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14964         IFS="$ac_save_ifs"
14965         ;;
14966 (*)
14967         for cf_option in $MANPAGE_FORMAT; do
14968         case "$cf_option" in
14969         (xz|bzip2|gzip|compress|BSDI|normal|formatted|catonly)
14970                 ;;
14971         (*)
14972                 cf_unknown="$cf_unknown $cf_option"
14973                 ;;
14974         esac
14975         done
14976         ;;
14977 esac
14978
14979 echo "$as_me:14979: result: $MANPAGE_FORMAT" >&5
14980 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14981 if test -n "$cf_unknown" ; then
14982         { echo "$as_me:14982: WARNING: Unexpected manpage-format $cf_unknown" >&5
14983 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14984 fi
14985
14986 echo "$as_me:14986: checking for manpage renaming" >&5
14987 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
14988
14989 # Check whether --with-manpage-renames or --without-manpage-renames was given.
14990 if test "${with_manpage_renames+set}" = set; then
14991   withval="$with_manpage_renames"
14992   MANPAGE_RENAMES=$withval
14993 else
14994   MANPAGE_RENAMES=yes
14995 fi;
14996
14997 case ".$MANPAGE_RENAMES" in
14998 (.no)
14999         ;;
15000 (.|.yes)
15001         # Debian 'man' program?
15002         if test -f /etc/debian_version ; then
15003                 MANPAGE_RENAMES=man/man_db.renames
15004         else
15005                 MANPAGE_RENAMES=no
15006         fi
15007         ;;
15008 esac
15009
15010 if test "$MANPAGE_RENAMES" = man/man_db.renames ; then
15011         MANPAGE_RENAMES=`pwd`/$MANPAGE_RENAMES
15012 elif test "$MANPAGE_RENAMES" = no ; then
15013         :
15014 elif test ! -f "$MANPAGE_RENAMES" ; then
15015         { { echo "$as_me:15015: error: not a filename: $MANPAGE_RENAMES" >&5
15016 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
15017    { (exit 1); exit 1; }; }
15018 fi
15019
15020 echo "$as_me:15020: result: $MANPAGE_RENAMES" >&5
15021 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
15022
15023 echo "$as_me:15023: checking if manpage aliases will be installed" >&5
15024 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
15025
15026 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
15027 if test "${with_manpage_aliases+set}" = set; then
15028   withval="$with_manpage_aliases"
15029   MANPAGE_ALIASES=$withval
15030 else
15031   MANPAGE_ALIASES=yes
15032 fi;
15033
15034 echo "$as_me:15034: result: $MANPAGE_ALIASES" >&5
15035 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
15036
15037 case "x$LN_S" in
15038 (xln*)
15039         cf_use_symlinks=yes
15040         ;;
15041 (*)
15042         cf_use_symlinks=no
15043         ;;
15044 esac
15045
15046 MANPAGE_SYMLINKS=no
15047 if test "$MANPAGE_ALIASES" = yes ; then
15048 echo "$as_me:15048: checking if manpage symlinks should be used" >&5
15049 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
15050
15051 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
15052 if test "${with_manpage_symlinks+set}" = set; then
15053   withval="$with_manpage_symlinks"
15054   MANPAGE_SYMLINKS=$withval
15055 else
15056   MANPAGE_SYMLINKS=$cf_use_symlinks
15057 fi;
15058
15059 if test "$$cf_use_symlinks" = no; then
15060 if test "$MANPAGE_SYMLINKS" = yes ; then
15061         { echo "$as_me:15061: WARNING: cannot make symlinks" >&5
15062 echo "$as_me: WARNING: cannot make symlinks" >&2;}
15063         MANPAGE_SYMLINKS=no
15064 fi
15065 fi
15066
15067 echo "$as_me:15067: result: $MANPAGE_SYMLINKS" >&5
15068 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
15069 fi
15070
15071 echo "$as_me:15071: checking for manpage tbl" >&5
15072 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
15073
15074 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
15075 if test "${with_manpage_tbl+set}" = set; then
15076   withval="$with_manpage_tbl"
15077   MANPAGE_TBL=$withval
15078 else
15079   MANPAGE_TBL=no
15080 fi;
15081
15082 echo "$as_me:15082: result: $MANPAGE_TBL" >&5
15083 echo "${ECHO_T}$MANPAGE_TBL" >&6
15084
15085 if test "$prefix" = "NONE" ; then
15086         cf_prefix="$ac_default_prefix"
15087 else
15088         cf_prefix="$prefix"
15089 fi
15090
15091 case "$MANPAGE_FORMAT" in
15092 (*catonly*)
15093         cf_format=yes
15094         cf_inboth=no
15095         ;;
15096 (*formatted*)
15097         cf_format=yes
15098         cf_inboth=yes
15099         ;;
15100 (*)
15101         cf_format=no
15102         cf_inboth=no
15103         ;;
15104 esac
15105
15106 test ! -d man && mkdir man
15107
15108 cf_so_strip=
15109 cf_compress=
15110 for cf_manpage_format in $MANPAGE_FORMAT
15111 do
15112 case "$cf_manpage_format" in
15113 (compress)
15114         cf_so_strip="Z"
15115         cf_compress=compress
15116         ;;
15117 (gzip)
15118         cf_so_strip="gz"
15119         cf_compress=gzip
15120         ;;
15121 (bzip2)
15122         cf_so_strip="bz2"
15123         cf_compress=bzip2
15124         ;;
15125 (xz)
15126         cf_so_strip="xz"
15127         cf_compress=xz
15128         ;;
15129 esac
15130 done
15131
15132 cf_edit_man=./edit_man.sh
15133 cf_man_alias=`pwd`/man_alias.sed
15134
15135 cat >$cf_edit_man <<CF_EOF
15136 #! $SHELL
15137 # this script is generated by the configure-script CF_MAN_PAGES macro.
15138
15139 prefix="$cf_prefix"
15140 datarootdir="$datarootdir"
15141 datadir="$datadir"
15142
15143 NCURSES_MAJOR="$NCURSES_MAJOR"
15144 NCURSES_MINOR="$NCURSES_MINOR"
15145 NCURSES_PATCH="$NCURSES_PATCH"
15146
15147 NCURSES_OSPEED="$NCURSES_OSPEED"
15148 TERMINFO="$TERMINFO"
15149
15150 INSTALL="$INSTALL"
15151 INSTALL_DATA="$INSTALL_DATA"
15152
15153 transform="$program_transform_name"
15154
15155 TMP=\${TMPDIR:=/tmp}/man\$\$
15156 trap "rm -f \$TMP; exit 1" 1 2 3 15
15157 trap "rm -f \$TMP" 0
15158
15159 form=\$1
15160 shift || exit 1
15161
15162 verb=\$1
15163 shift || exit 1
15164
15165 mandir=\$1
15166 shift || exit 1
15167
15168 srcdir=\$1
15169 top_srcdir=\$srcdir/..
15170 shift || exit 1
15171
15172 if test "\$form" = normal ; then
15173         if test "$cf_format" = yes ; then
15174         if test "$cf_inboth" = no ; then
15175                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15176                 exit $?
15177         fi
15178         fi
15179         cf_subdir=\$mandir/man
15180         cf_tables=$MANPAGE_TBL
15181 else
15182         cf_subdir=\$mandir/cat
15183         cf_tables=yes
15184 fi
15185
15186 # process the list of source-files
15187 for i in "\$@" ; do
15188 case \$i in
15189 (*.orig|*.rej) ;;
15190 (*.[0-9]*)
15191         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
15192         if test "\$verb" = installing ; then
15193         if test ! -d "\$cf_subdir\${section}" ; then
15194                 mkdir -p "\$cf_subdir\$section"
15195         fi
15196         fi
15197
15198         # replace variables in man page
15199         if test ! -f "$cf_man_alias" ; then
15200 cat >>$cf_man_alias <<-CF_EOF2
15201                 s,@DATADIR@,\$datadir,g
15202                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
15203                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
15204                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
15205                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
15206                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
15207                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
15208 CF_EOF
15209
15210         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
15211         do
15212                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15213                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
15214 cat >>$cf_edit_man <<-CF_EOF
15215                 s,@$cf_NAME@,$cf_name,g
15216 CF_EOF
15217         done
15218
15219 cat >>$cf_edit_man <<CF_EOF
15220 CF_EOF2
15221                 echo "...made $cf_man_alias"
15222         fi
15223
15224         aliases=
15225         cf_source=\`basename "\$i"\`
15226         inalias=\$cf_source
15227         test ! -f "\$inalias" && inalias="\$srcdir/\$inalias"
15228         if test ! -f "\$inalias" ; then
15229                 echo ".. skipped \$cf_source"
15230                 continue
15231         fi
15232 CF_EOF
15233
15234 if test "$MANPAGE_ALIASES" != no ; then
15235 cat >>$cf_edit_man <<CF_EOF
15236         nCurses=ignore.3x
15237         test "$with_curses_h" = yes && nCurses=ncurses.3x
15238         aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$inalias" |sed -f "$cf_man_alias" | sort -u; test "\$inalias" = "\$nCurses" && echo curses\`
15239 CF_EOF
15240 fi
15241
15242 if test "$MANPAGE_RENAMES" = no ; then
15243 cat >>$cf_edit_man <<CF_EOF
15244         # perform program transformations for section 1 man pages
15245         if test \$section = 1 ; then
15246                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
15247         else
15248                 cf_target=\$cf_subdir\${section}/\$cf_source
15249         fi
15250 CF_EOF
15251 else
15252 cat >>$cf_edit_man <<CF_EOF
15253         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
15254         if test -z "\$cf_target" ; then
15255                 echo "? missing rename for \$cf_source"
15256                 cf_target="\$cf_source"
15257         fi
15258         cf_target="\$cf_subdir\${section}/\${cf_target}"
15259
15260 CF_EOF
15261 fi
15262
15263 cat >>$cf_edit_man <<CF_EOF
15264         sed     -f "$cf_man_alias" \\
15265 CF_EOF
15266
15267 if test "$MANPAGE_RENAMES" != no ; then
15268 cat >>$cf_edit_man <<CF_EOF
15269                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
15270 CF_EOF
15271 else
15272 cat >>$cf_edit_man <<CF_EOF
15273                 < "\$i" >\$TMP
15274 CF_EOF
15275 fi
15276
15277 cat >>$cf_edit_man <<CF_EOF
15278 if test \$cf_tables = yes ; then
15279         tbl \$TMP >\$TMP.out
15280         mv \$TMP.out \$TMP
15281 fi
15282 CF_EOF
15283
15284 if test "$with_overwrite" != yes ; then
15285 cat >>$cf_edit_man <<CF_EOF
15286         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
15287         mv \$TMP.out \$TMP
15288 CF_EOF
15289 fi
15290
15291 if test "$with_curses_h" != yes ; then
15292 cat >>$cf_edit_man <<CF_EOF
15293         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
15294         mv \$TMP.out \$TMP
15295 CF_EOF
15296 fi
15297
15298 cat >>$cf_edit_man <<CF_EOF
15299         if test "\$form" = format ; then
15300                 nroff -man \$TMP >\$TMP.out
15301                 mv \$TMP.out \$TMP
15302         fi
15303 CF_EOF
15304
15305 if test -n "$cf_compress" ; then
15306 cat >>$cf_edit_man <<CF_EOF
15307         if test "\$verb" = installing ; then
15308         if ( "$cf_compress" -f \$TMP )
15309         then
15310                 mv \$TMP.$cf_so_strip \$TMP
15311         fi
15312         fi
15313         cf_target="\$cf_target.$cf_so_strip"
15314 CF_EOF
15315 fi
15316
15317 case "$MANPAGE_FORMAT" in
15318 (*BSDI*)
15319 cat >>$cf_edit_man <<CF_EOF
15320         if test "\$form" = format ; then
15321                 # BSDI installs only .0 suffixes in the cat directories
15322                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
15323         fi
15324 CF_EOF
15325   ;;
15326 esac
15327
15328 cat >>$cf_edit_man <<CF_EOF
15329         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
15330         if test "\$verb" = installing ; then
15331                 echo "\$verb \$cf_target"
15332                 \$INSTALL_DATA \$TMP "\$cf_target"
15333                 test -d "\$cf_subdir\${section}" &&
15334                 test -n "\$aliases" && (
15335                         cd "\$cf_subdir\${section}" && (
15336                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
15337                                 test -n "$cf_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_so_strip\$%%'\`
15338                                 cf_target=\`basename "\$cf_target"\`
15339                                 for cf_alias in \$aliases
15340                                 do
15341                                         if test "\$section" = 1 ; then
15342                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15343                                         fi
15344
15345                                         if test "$MANPAGE_SYMLINKS" = yes ; then
15346                                                 if test -f "\$cf_alias\${suffix}" ; then
15347                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
15348                                                         then
15349                                                                 continue
15350                                                         fi
15351                                                 fi
15352                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15353 CF_EOF
15354 case "x$LN_S" in
15355 (*-f)
15356 cat >>$cf_edit_man <<CF_EOF
15357                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15358 CF_EOF
15359         ;;
15360 (*)
15361 cat >>$cf_edit_man <<CF_EOF
15362                                                 rm -f "\$cf_alias\${suffix}"
15363                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15364 CF_EOF
15365         ;;
15366 esac
15367 cat >>$cf_edit_man <<CF_EOF
15368                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
15369                                                 echo ".so \$cf_source" >\$TMP
15370 CF_EOF
15371 if test -n "$cf_compress" ; then
15372 cat >>$cf_edit_man <<CF_EOF
15373                                                 if test -n "$cf_so_strip" ; then
15374                                                         "$cf_compress" -f \$TMP
15375                                                         mv \$TMP.$cf_so_strip \$TMP
15376                                                 fi
15377 CF_EOF
15378 fi
15379 cat >>$cf_edit_man <<CF_EOF
15380                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15381                                                 rm -f "\$cf_alias\${suffix}"
15382                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
15383                                         fi
15384                                 done
15385                         )
15386                 )
15387         elif test "\$verb" = removing ; then
15388                 test -f "\$cf_target" && (
15389                         echo "\$verb \$cf_target"
15390                         rm -f "\$cf_target"
15391                 )
15392                 test -d "\$cf_subdir\${section}" &&
15393                 test -n "\$aliases" && (
15394                         cd "\$cf_subdir\${section}" && (
15395                                 for cf_alias in \$aliases
15396                                 do
15397                                         if test "\$section" = 1 ; then
15398                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15399                                         fi
15400
15401                                         echo ".. \$verb alias \$cf_alias\${suffix}"
15402                                         rm -f "\$cf_alias\${suffix}"
15403                                 done
15404                         )
15405                 )
15406         else
15407 #               echo ".hy 0"
15408                 cat \$TMP
15409         fi
15410         ;;
15411 esac
15412 done
15413
15414 if test "$cf_inboth" = yes ; then
15415 if test "\$form" != format ; then
15416         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15417 fi
15418 fi
15419
15420 exit 0
15421 CF_EOF
15422 chmod 755 "$cf_edit_man"
15423
15424 ###############################################################################
15425
15426 ### Note that some functions (such as const) are normally disabled anyway.
15427 echo "$as_me:15427: checking if you want to build with function extensions" >&5
15428 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15429
15430 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15431 if test "${enable_ext_funcs+set}" = set; then
15432   enableval="$enable_ext_funcs"
15433   with_ext_funcs=$enableval
15434 else
15435   with_ext_funcs=yes
15436 fi;
15437 echo "$as_me:15437: result: $with_ext_funcs" >&5
15438 echo "${ECHO_T}$with_ext_funcs" >&6
15439 if test "x$with_ext_funcs" = xyes ; then
15440         NCURSES_EXT_FUNCS=1
15441
15442 cat >>confdefs.h <<\EOF
15443 #define NCURSES_EXT_FUNCS 1
15444 EOF
15445
15446 cat >>confdefs.h <<\EOF
15447 #define HAVE_ASSUME_DEFAULT_COLORS 1
15448 EOF
15449
15450 cat >>confdefs.h <<\EOF
15451 #define HAVE_CURSES_VERSION 1
15452 EOF
15453
15454 cat >>confdefs.h <<\EOF
15455 #define HAVE_HAS_KEY 1
15456 EOF
15457
15458 cat >>confdefs.h <<\EOF
15459 #define HAVE_RESIZETERM 1
15460 EOF
15461
15462 cat >>confdefs.h <<\EOF
15463 #define HAVE_RESIZE_TERM 1
15464 EOF
15465
15466 cat >>confdefs.h <<\EOF
15467 #define HAVE_TERM_ENTRY_H 1
15468 EOF
15469
15470 cat >>confdefs.h <<\EOF
15471 #define HAVE_USE_DEFAULT_COLORS 1
15472 EOF
15473
15474 cat >>confdefs.h <<\EOF
15475 #define HAVE_USE_EXTENDED_NAMES 1
15476 EOF
15477
15478 cat >>confdefs.h <<\EOF
15479 #define HAVE_USE_SCREEN 1
15480 EOF
15481
15482 cat >>confdefs.h <<\EOF
15483 #define HAVE_USE_WINDOW 1
15484 EOF
15485
15486 cat >>confdefs.h <<\EOF
15487 #define HAVE_WRESIZE 1
15488 EOF
15489
15490         GENERATED_EXT_FUNCS=generated
15491         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
15492 else
15493         NCURSES_EXT_FUNCS=0
15494         GENERATED_EXT_FUNCS=
15495 fi
15496
15497 echo "$as_me:15497: checking if you want to build with SCREEN extensions" >&5
15498 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
15499
15500 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
15501 if test "${enable_sp_funcs+set}" = set; then
15502   enableval="$enable_sp_funcs"
15503   with_sp_funcs=$enableval
15504 else
15505   with_sp_funcs=$cf_dft_ext_spfuncs
15506 fi;
15507 echo "$as_me:15507: result: $with_sp_funcs" >&5
15508 echo "${ECHO_T}$with_sp_funcs" >&6
15509 if test "x$with_sp_funcs" = xyes ; then
15510         NCURSES_SP_FUNCS=1
15511
15512 cat >>confdefs.h <<\EOF
15513 #define NCURSES_SP_FUNCS 1
15514 EOF
15515
15516 cat >>confdefs.h <<\EOF
15517 #define HAVE_TPUTS_SP 1
15518 EOF
15519
15520         GENERATED_SP_FUNCS=generated
15521 else
15522         NCURSES_SP_FUNCS=0
15523         GENERATED_SP_FUNCS=
15524 fi
15525
15526 echo "$as_me:15526: checking if you want to build with terminal-driver" >&5
15527 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
15528
15529 # Check whether --enable-term-driver or --disable-term-driver was given.
15530 if test "${enable_term_driver+set}" = set; then
15531   enableval="$enable_term_driver"
15532   with_term_driver=$enableval
15533 else
15534   with_term_driver=no
15535 fi;
15536 echo "$as_me:15536: result: $with_term_driver" >&5
15537 echo "${ECHO_T}$with_term_driver" >&6
15538 if test "x$with_term_driver" = xyes ; then
15539
15540 cat >>confdefs.h <<\EOF
15541 #define USE_TERM_DRIVER 1
15542 EOF
15543
15544         if test "x$with_termlib" != xno ; then
15545                 { { echo "$as_me:15545: error: The term-driver option conflicts with the termlib option" >&5
15546 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15547    { (exit 1); exit 1; }; }
15548         fi
15549         if test "x$with_sp_funcs" != xyes ; then
15550                 { { echo "$as_me:15550: error: The term-driver option relies upon sp-funcs" >&5
15551 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15552    { (exit 1); exit 1; }; }
15553         fi
15554 fi
15555
15556 ###   use option --enable-const to turn on use of const beyond that in XSI.
15557 echo "$as_me:15557: checking for extended use of const keyword" >&5
15558 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15559
15560 # Check whether --enable-const or --disable-const was given.
15561 if test "${enable_const+set}" = set; then
15562   enableval="$enable_const"
15563   with_ext_const=$enableval
15564 else
15565   with_ext_const=$cf_dft_ext_const
15566 fi;
15567 echo "$as_me:15567: result: $with_ext_const" >&5
15568 echo "${ECHO_T}$with_ext_const" >&6
15569 NCURSES_CONST='/*nothing*/'
15570 if test "x$with_ext_const" = xyes ; then
15571         NCURSES_CONST=const
15572 fi
15573
15574 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
15575 echo "$as_me:15575: checking if you want to use extended colors" >&5
15576 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15577
15578 # Check whether --enable-ext-colors or --disable-ext-colors was given.
15579 if test "${enable_ext_colors+set}" = set; then
15580   enableval="$enable_ext_colors"
15581   with_ext_colors=$enableval
15582 else
15583   with_ext_colors=$cf_dft_ext_colors
15584 fi;
15585 echo "$as_me:15585: result: $with_ext_colors" >&5
15586 echo "${ECHO_T}$with_ext_colors" >&6
15587 NCURSES_EXT_COLORS=0
15588 if test "x$with_ext_colors" = xyes ; then
15589         if test "x$with_widec" != xyes ; then
15590                 { echo "$as_me:15590: WARNING: This option applies only to wide-character library" >&5
15591 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15592         else
15593                 # cannot be ABI 5 since it changes sizeof(cchar_t)
15594
15595 if test "${with_abi_version+set}" != set; then
15596         case "$cf_cv_rel_version" in
15597         (5.*)
15598                 cf_cv_rel_version=6.0
15599                 cf_cv_abi_version=6
15600                 cf_cv_abi_default=6
15601                 { echo "$as_me:15601: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15602 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
15603                 ;;
15604         esac
15605 fi
15606
15607                 NCURSES_EXT_COLORS=1
15608
15609 cat >>confdefs.h <<\EOF
15610 #define NCURSES_EXT_COLORS 1
15611 EOF
15612
15613 cat >>confdefs.h <<\EOF
15614 #define HAVE_ALLOC_PAIR 1
15615 EOF
15616
15617 cat >>confdefs.h <<\EOF
15618 #define HAVE_INIT_EXTENDED_COLOR 1
15619 EOF
15620
15621 cat >>confdefs.h <<\EOF
15622 #define HAVE_RESET_COLOR_PAIRS 1
15623 EOF
15624
15625         fi
15626 fi
15627
15628 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
15629 echo "$as_me:15629: checking if you want to use extended mouse encoding" >&5
15630 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15631
15632 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15633 if test "${enable_ext_mouse+set}" = set; then
15634   enableval="$enable_ext_mouse"
15635   with_ext_mouse=$enableval
15636 else
15637   with_ext_mouse=$cf_dft_ext_mouse
15638 fi;
15639 echo "$as_me:15639: result: $with_ext_mouse" >&5
15640 echo "${ECHO_T}$with_ext_mouse" >&6
15641 if test "x$with_ext_mouse" = xyes ; then
15642
15643 if test "${with_abi_version+set}" != set; then
15644         case "$cf_cv_rel_version" in
15645         (5.*)
15646                 cf_cv_rel_version=6.0
15647                 cf_cv_abi_version=6
15648                 cf_cv_abi_default=6
15649                 { echo "$as_me:15649: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15650 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
15651                 ;;
15652         esac
15653 fi
15654
15655 fi
15656
15657 case $cf_cv_abi_default in
15658 (5)
15659         NCURSES_MOUSE_VERSION=1
15660         ;;
15661 (6)
15662         NCURSES_MOUSE_VERSION=2
15663         ;;
15664 ([789])
15665         NCURSES_MOUSE_VERSION=3
15666         ;;
15667 esac
15668
15669 ###   use option --enable-ext-putwin to turn on extended screendumps
15670 echo "$as_me:15670: checking if you want to use extended putwin/screendump" >&5
15671 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15672
15673 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15674 if test "${enable_ext_putwin+set}" = set; then
15675   enableval="$enable_ext_putwin"
15676   with_ext_putwin=$enableval
15677 else
15678   with_ext_putwin=$cf_dft_ext_putwin
15679 fi;
15680 echo "$as_me:15680: result: $with_ext_putwin" >&5
15681 echo "${ECHO_T}$with_ext_putwin" >&6
15682 if test "x$with_ext_putwin" = xyes ; then
15683
15684 cat >>confdefs.h <<\EOF
15685 #define NCURSES_EXT_PUTWIN 1
15686 EOF
15687
15688 fi
15689
15690 echo "$as_me:15690: checking if you want \$NCURSES_NO_PADDING code" >&5
15691 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15692
15693 # Check whether --enable-no-padding or --disable-no-padding was given.
15694 if test "${enable_no_padding+set}" = set; then
15695   enableval="$enable_no_padding"
15696   with_no_padding=$enableval
15697 else
15698   with_no_padding=$with_ext_funcs
15699 fi;
15700 echo "$as_me:15700: result: $with_no_padding" >&5
15701 echo "${ECHO_T}$with_no_padding" >&6
15702 test "x$with_no_padding" = xyes &&
15703 cat >>confdefs.h <<\EOF
15704 #define NCURSES_NO_PADDING 1
15705 EOF
15706
15707 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15708 echo "$as_me:15708: checking if you want SIGWINCH handler" >&5
15709 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15710
15711 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15712 if test "${enable_sigwinch+set}" = set; then
15713   enableval="$enable_sigwinch"
15714   with_sigwinch=$enableval
15715 else
15716   with_sigwinch=$with_ext_funcs
15717 fi;
15718 echo "$as_me:15718: result: $with_sigwinch" >&5
15719 echo "${ECHO_T}$with_sigwinch" >&6
15720 test "x$with_sigwinch" = xyes &&
15721 cat >>confdefs.h <<\EOF
15722 #define USE_SIGWINCH 1
15723 EOF
15724
15725 ###   use option --enable-tcap-names to allow user to define new capabilities
15726 echo "$as_me:15726: checking if you want user-definable terminal capabilities like termcap" >&5
15727 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15728
15729 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15730 if test "${enable_tcap_names+set}" = set; then
15731   enableval="$enable_tcap_names"
15732   with_tcap_names=$enableval
15733 else
15734   with_tcap_names=$with_ext_funcs
15735 fi;
15736 echo "$as_me:15736: result: $with_tcap_names" >&5
15737 echo "${ECHO_T}$with_tcap_names" >&6
15738 NCURSES_XNAMES=0
15739 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
15740
15741 ##############################################################################
15742
15743 echo "$as_me:15743: checking if you want to link with the pthread library" >&5
15744 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15745
15746 # Check whether --with-pthread or --without-pthread was given.
15747 if test "${with_pthread+set}" = set; then
15748   withval="$with_pthread"
15749   with_pthread=$withval
15750 else
15751   with_pthread=no
15752 fi;
15753 echo "$as_me:15753: result: $with_pthread" >&5
15754 echo "${ECHO_T}$with_pthread" >&6
15755
15756 if test "$with_pthread" != no ; then
15757         echo "$as_me:15757: checking for pthread.h" >&5
15758 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15759 if test "${ac_cv_header_pthread_h+set}" = set; then
15760   echo $ECHO_N "(cached) $ECHO_C" >&6
15761 else
15762   cat >"conftest.$ac_ext" <<_ACEOF
15763 #line 15763 "configure"
15764 #include "confdefs.h"
15765 #include <pthread.h>
15766 _ACEOF
15767 if { (eval echo "$as_me:15767: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15768   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15769   ac_status=$?
15770   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15771   rm -f conftest.er1
15772   cat conftest.err >&5
15773   echo "$as_me:15773: \$? = $ac_status" >&5
15774   (exit "$ac_status"); } >/dev/null; then
15775   if test -s conftest.err; then
15776     ac_cpp_err=$ac_c_preproc_warn_flag
15777   else
15778     ac_cpp_err=
15779   fi
15780 else
15781   ac_cpp_err=yes
15782 fi
15783 if test -z "$ac_cpp_err"; then
15784   ac_cv_header_pthread_h=yes
15785 else
15786   echo "$as_me: failed program was:" >&5
15787   cat "conftest.$ac_ext" >&5
15788   ac_cv_header_pthread_h=no
15789 fi
15790 rm -f conftest.err "conftest.$ac_ext"
15791 fi
15792 echo "$as_me:15792: result: $ac_cv_header_pthread_h" >&5
15793 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15794 if test "$ac_cv_header_pthread_h" = yes; then
15795
15796 cat >>confdefs.h <<\EOF
15797 #define HAVE_PTHREADS_H 1
15798 EOF
15799
15800         for cf_lib_pthread in pthread c_r
15801         do
15802             echo "$as_me:15802: checking if we can link with the $cf_lib_pthread library" >&5
15803 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15804             cf_save_LIBS="$LIBS"
15805
15806 cf_add_libs="$LIBS"
15807 # reverse order
15808 cf_add_0lib=
15809 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15810 # filter duplicates
15811 for cf_add_1lib in $cf_add_0lib; do
15812         for cf_add_2lib in $cf_add_libs; do
15813                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15814                         cf_add_1lib=
15815                         break
15816                 fi
15817         done
15818         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15819 done
15820 LIBS="$cf_add_libs"
15821
15822             cat >"conftest.$ac_ext" <<_ACEOF
15823 #line 15823 "configure"
15824 #include "confdefs.h"
15825
15826 #include <pthread.h>
15827
15828 int
15829 main (void)
15830 {
15831
15832                 int rc = pthread_create(0,0,0,0);
15833                 int r2 = pthread_mutexattr_settype(0, 0);
15834
15835   ;
15836   return 0;
15837 }
15838 _ACEOF
15839 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15840 if { (eval echo "$as_me:15840: \"$ac_link\"") >&5
15841   (eval $ac_link) 2>&5
15842   ac_status=$?
15843   echo "$as_me:15843: \$? = $ac_status" >&5
15844   (exit "$ac_status"); } &&
15845          { ac_try='test -s "conftest$ac_exeext"'
15846   { (eval echo "$as_me:15846: \"$ac_try\"") >&5
15847   (eval $ac_try) 2>&5
15848   ac_status=$?
15849   echo "$as_me:15849: \$? = $ac_status" >&5
15850   (exit "$ac_status"); }; }; then
15851   with_pthread=yes
15852 else
15853   echo "$as_me: failed program was:" >&5
15854 cat "conftest.$ac_ext" >&5
15855 with_pthread=no
15856 fi
15857 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15858             LIBS="$cf_save_LIBS"
15859             echo "$as_me:15859: result: $with_pthread" >&5
15860 echo "${ECHO_T}$with_pthread" >&6
15861             test "$with_pthread" = yes && break
15862         done
15863
15864         if test "$with_pthread" = yes ; then
15865
15866 cf_add_libs="$LIBS"
15867 # reverse order
15868 cf_add_0lib=
15869 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15870 # filter duplicates
15871 for cf_add_1lib in $cf_add_0lib; do
15872         for cf_add_2lib in $cf_add_libs; do
15873                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15874                         cf_add_1lib=
15875                         break
15876                 fi
15877         done
15878         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15879 done
15880 LIBS="$cf_add_libs"
15881
15882 cat >>confdefs.h <<\EOF
15883 #define HAVE_LIBPTHREADS 1
15884 EOF
15885
15886         else
15887             { { echo "$as_me:15887: error: Cannot link with pthread library" >&5
15888 echo "$as_me: error: Cannot link with pthread library" >&2;}
15889    { (exit 1); exit 1; }; }
15890         fi
15891
15892 fi
15893
15894 fi
15895
15896 if test "x$with_pthread" != xno; then
15897         echo "$as_me:15897: checking for pthread_kill" >&5
15898 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15899 if test "${ac_cv_func_pthread_kill+set}" = set; then
15900   echo $ECHO_N "(cached) $ECHO_C" >&6
15901 else
15902   cat >"conftest.$ac_ext" <<_ACEOF
15903 #line 15903 "configure"
15904 #include "confdefs.h"
15905 #define pthread_kill autoconf_temporary
15906 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15907 #undef pthread_kill
15908
15909 #ifdef __cplusplus
15910 extern "C"
15911 #endif
15912
15913 /* We use char because int might match the return type of a gcc2
15914    builtin and then its argument prototype would still apply.  */
15915 char pthread_kill (void);
15916
15917 int
15918 main (void)
15919 {
15920
15921 /* The GNU C library defines stubs for functions which it implements
15922     to always fail with ENOSYS.  Some functions are actually named
15923     something starting with __ and the normal name is an alias.  */
15924 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15925 #error found stub for pthread_kill
15926 #endif
15927
15928         return pthread_kill ();
15929   ;
15930   return 0;
15931 }
15932 _ACEOF
15933 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15934 if { (eval echo "$as_me:15934: \"$ac_link\"") >&5
15935   (eval $ac_link) 2>&5
15936   ac_status=$?
15937   echo "$as_me:15937: \$? = $ac_status" >&5
15938   (exit "$ac_status"); } &&
15939          { ac_try='test -s "conftest$ac_exeext"'
15940   { (eval echo "$as_me:15940: \"$ac_try\"") >&5
15941   (eval $ac_try) 2>&5
15942   ac_status=$?
15943   echo "$as_me:15943: \$? = $ac_status" >&5
15944   (exit "$ac_status"); }; }; then
15945   ac_cv_func_pthread_kill=yes
15946 else
15947   echo "$as_me: failed program was:" >&5
15948 cat "conftest.$ac_ext" >&5
15949 ac_cv_func_pthread_kill=no
15950 fi
15951 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15952 fi
15953 echo "$as_me:15953: result: $ac_cv_func_pthread_kill" >&5
15954 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15955 if test "$ac_cv_func_pthread_kill" = yes; then
15956
15957                 echo "$as_me:15957: checking if you want to allow EINTR in wgetch with pthreads" >&5
15958 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15959
15960 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15961 if test "${enable_pthreads_eintr+set}" = set; then
15962   enableval="$enable_pthreads_eintr"
15963   use_pthreads_eintr=$enableval
15964 else
15965   use_pthreads_eintr=no
15966 fi;
15967                 echo "$as_me:15967: result: $use_pthreads_eintr" >&5
15968 echo "${ECHO_T}$use_pthreads_eintr" >&6
15969                 if test "x$use_pthreads_eintr" = xyes ; then
15970
15971 cat >>confdefs.h <<\EOF
15972 #define USE_PTHREADS_EINTR 1
15973 EOF
15974
15975                 fi
15976 fi
15977
15978         echo "$as_me:15978: checking if you want to use weak-symbols for pthreads" >&5
15979 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15980
15981 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15982 if test "${enable_weak_symbols+set}" = set; then
15983   enableval="$enable_weak_symbols"
15984   use_weak_symbols=$enableval
15985 else
15986   use_weak_symbols=no
15987 fi;
15988         echo "$as_me:15988: result: $use_weak_symbols" >&5
15989 echo "${ECHO_T}$use_weak_symbols" >&6
15990         if test "x$use_weak_symbols" = xyes ; then
15991
15992 echo "$as_me:15992: checking if $CC supports weak symbols" >&5
15993 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15994 if test "${cf_cv_weak_symbols+set}" = set; then
15995   echo $ECHO_N "(cached) $ECHO_C" >&6
15996 else
15997
15998 cat >"conftest.$ac_ext" <<_ACEOF
15999 #line 15999 "configure"
16000 #include "confdefs.h"
16001
16002 #include <stdio.h>
16003 int
16004 main (void)
16005 {
16006
16007 #if defined(__GNUC__)
16008 #  if defined __USE_ISOC99
16009 #    define _cat_pragma(exp)    _Pragma(#exp)
16010 #    define _weak_pragma(exp)   _cat_pragma(weak name)
16011 #  else
16012 #    define _weak_pragma(exp)
16013 #  endif
16014 #  define _declare(name)        __extension__ extern __typeof__(name) name
16015 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
16016 #endif
16017
16018 weak_symbol(fopen);
16019
16020   ;
16021   return 0;
16022 }
16023 _ACEOF
16024 rm -f "conftest.$ac_objext"
16025 if { (eval echo "$as_me:16025: \"$ac_compile\"") >&5
16026   (eval $ac_compile) 2>&5
16027   ac_status=$?
16028   echo "$as_me:16028: \$? = $ac_status" >&5
16029   (exit "$ac_status"); } &&
16030          { ac_try='test -s "conftest.$ac_objext"'
16031   { (eval echo "$as_me:16031: \"$ac_try\"") >&5
16032   (eval $ac_try) 2>&5
16033   ac_status=$?
16034   echo "$as_me:16034: \$? = $ac_status" >&5
16035   (exit "$ac_status"); }; }; then
16036   cf_cv_weak_symbols=yes
16037 else
16038   echo "$as_me: failed program was:" >&5
16039 cat "conftest.$ac_ext" >&5
16040 cf_cv_weak_symbols=no
16041 fi
16042 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16043
16044 fi
16045 echo "$as_me:16045: result: $cf_cv_weak_symbols" >&5
16046 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
16047
16048         else
16049                 cf_cv_weak_symbols=no
16050         fi
16051
16052         if test "x$cf_cv_weak_symbols" = xyes ; then
16053
16054 cat >>confdefs.h <<\EOF
16055 #define USE_WEAK_SYMBOLS 1
16056 EOF
16057
16058         fi
16059 fi
16060
16061 PTHREAD=
16062 if test "x$with_pthread" = "xyes" ; then
16063
16064 cat >>confdefs.h <<\EOF
16065 #define USE_PTHREADS 1
16066 EOF
16067
16068         enable_reentrant=yes
16069         if test "x$cf_cv_weak_symbols" = xyes ; then
16070                 PTHREAD=-lpthread
16071
16072 cf_add_libs="$PRIVATE_LIBS"
16073 # reverse order
16074 cf_add_0lib=
16075 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16076 # filter duplicates
16077 for cf_add_1lib in $cf_add_0lib; do
16078         for cf_add_2lib in $cf_add_libs; do
16079                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16080                         cf_add_1lib=
16081                         break
16082                 fi
16083         done
16084         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16085 done
16086 PRIVATE_LIBS="$cf_add_libs"
16087
16088         fi
16089 fi
16090
16091 # Reentrant code has to be opaque; there's little advantage to making ncurses
16092 # opaque outside of that, so there is no --enable-opaque option.  We can use
16093 # this option without --with-pthreads, but this will be always set for
16094 # pthreads.
16095 echo "$as_me:16095: checking if you want reentrant code" >&5
16096 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
16097
16098 # Check whether --enable-reentrant or --disable-reentrant was given.
16099 if test "${enable_reentrant+set}" = set; then
16100   enableval="$enable_reentrant"
16101   with_reentrant=$enableval
16102 else
16103   with_reentrant=no
16104 fi;
16105 echo "$as_me:16105: result: $with_reentrant" >&5
16106 echo "${ECHO_T}$with_reentrant" >&6
16107 if test "x$with_reentrant" = xyes ; then
16108         cf_cv_enable_reentrant=1
16109         cf_cv_enable_opaque="NCURSES_INTERNALS"
16110         NCURSES_SIZE_T=int
16111         if test "x$cf_cv_weak_symbols" = xyes ; then
16112
16113 # remove pthread library from $LIBS
16114 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
16115
16116 cf_add_libs="$TEST_LIBS"
16117 # reverse order
16118 cf_add_0lib=
16119 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16120 # filter duplicates
16121 for cf_add_1lib in $cf_add_0lib; do
16122         for cf_add_2lib in $cf_add_libs; do
16123                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16124                         cf_add_1lib=
16125                         break
16126                 fi
16127         done
16128         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16129 done
16130 TEST_LIBS="$cf_add_libs"
16131
16132 cf_add_libs="$TEST_LIBS2"
16133 # reverse order
16134 cf_add_0lib=
16135 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16136 # filter duplicates
16137 for cf_add_1lib in $cf_add_0lib; do
16138         for cf_add_2lib in $cf_add_libs; do
16139                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16140                         cf_add_1lib=
16141                         break
16142                 fi
16143         done
16144         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16145 done
16146 TEST_LIBS2="$cf_add_libs"
16147
16148 cf_add_libs="$PRIVATE_LIBS"
16149 # reverse order
16150 cf_add_0lib=
16151 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16152 # filter duplicates
16153 for cf_add_1lib in $cf_add_0lib; do
16154         for cf_add_2lib in $cf_add_libs; do
16155                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16156                         cf_add_1lib=
16157                         break
16158                 fi
16159         done
16160         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16161 done
16162 PRIVATE_LIBS="$cf_add_libs"
16163
16164         else
16165                 # when not using weak symbols but with_reentrant,
16166                 # add 't' to the library suffix on all platforms
16167                 # except cygwin, where we only do that if ALSO
16168                 # compiling with full thread support.
16169                 case "$host" in
16170                 (*cygwin* | *msys*)
16171                         if test "$with_pthread" = "yes" ; then
16172                                 if test "x$disable_lib_suffixes" = "xno" ; then
16173                                         LIB_SUFFIX="t${LIB_SUFFIX}"
16174                                 fi
16175                         fi ;;
16176                 (*)
16177                         if test "x$disable_lib_suffixes" = "xno" ; then
16178                                 LIB_SUFFIX="t${LIB_SUFFIX}"
16179                         fi
16180                         ;;
16181                 esac
16182         fi
16183
16184 cat >>confdefs.h <<\EOF
16185 #define USE_REENTRANT 1
16186 EOF
16187
16188 if test "${with_abi_version+set}" != set; then
16189         case "$cf_cv_rel_version" in
16190         (5.*)
16191                 cf_cv_rel_version=6.0
16192                 cf_cv_abi_version=6
16193                 cf_cv_abi_default=6
16194                 { echo "$as_me:16194: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
16195 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
16196                 ;;
16197         esac
16198 fi
16199
16200 else
16201         cf_cv_enable_reentrant=0
16202         cf_cv_enable_opaque="NCURSES_OPAQUE"
16203         NCURSES_SIZE_T=$cf_dft_ordinate_type
16204 fi
16205
16206 echo "$as_me:16206: checking if you want opaque curses-library structures" >&5
16207 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
16208
16209 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
16210 if test "${enable_opaque_curses+set}" = set; then
16211   enableval="$enable_opaque_curses"
16212   test "$enableval" != yes && enableval=no
16213         if test "$enableval" != "no" ; then
16214     enable_opaque_curses=yes
16215         else
16216
16217          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16218          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16219
16220         fi
16221 else
16222   enableval=no
16223
16224          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16225          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16226
16227 fi;
16228 echo "$as_me:16228: result: $enable_opaque_curses" >&5
16229 echo "${ECHO_T}$enable_opaque_curses" >&6
16230
16231 test "$cf_cv_enable_reentrant" = 1 && \
16232 test "$enable_opaque_curses" = no && \
16233 { { echo "$as_me:16233: error: reentrant configuration requires opaque library" >&5
16234 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
16235    { (exit 1); exit 1; }; }
16236
16237 echo "$as_me:16237: checking if you want opaque form-library structures" >&5
16238 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
16239
16240 # Check whether --enable-opaque-form or --disable-opaque-form was given.
16241 if test "${enable_opaque_form+set}" = set; then
16242   enableval="$enable_opaque_form"
16243   enable_opaque_form=yes
16244 else
16245   enable_opaque_form=no
16246 fi;
16247 echo "$as_me:16247: result: $enable_opaque_form" >&5
16248 echo "${ECHO_T}$enable_opaque_form" >&6
16249
16250 echo "$as_me:16250: checking if you want opaque menu-library structures" >&5
16251 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
16252
16253 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
16254 if test "${enable_opaque_menu+set}" = set; then
16255   enableval="$enable_opaque_menu"
16256   enable_opaque_menu=yes
16257 else
16258   enable_opaque_menu=no
16259 fi;
16260 echo "$as_me:16260: result: $enable_opaque_menu" >&5
16261 echo "${ECHO_T}$enable_opaque_menu" >&6
16262
16263 echo "$as_me:16263: checking if you want opaque panel-library structures" >&5
16264 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
16265
16266 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
16267 if test "${enable_opaque_panel+set}" = set; then
16268   enableval="$enable_opaque_panel"
16269   enable_opaque_panel=yes
16270 else
16271   enable_opaque_panel=no
16272 fi;
16273 echo "$as_me:16273: result: $enable_opaque_panel" >&5
16274 echo "${ECHO_T}$enable_opaque_panel" >&6
16275
16276 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
16277 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
16278 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
16279 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
16280
16281 ### Allow using a different wrap-prefix
16282 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
16283         echo "$as_me:16283: checking for prefix used to wrap public variables" >&5
16284 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
16285
16286 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
16287 if test "${with_wrap_prefix+set}" = set; then
16288   withval="$with_wrap_prefix"
16289   NCURSES_WRAP_PREFIX=$withval
16290 else
16291   NCURSES_WRAP_PREFIX=_nc_
16292 fi;
16293         echo "$as_me:16293: result: $NCURSES_WRAP_PREFIX" >&5
16294 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
16295 else
16296         NCURSES_WRAP_PREFIX=_nc_
16297 fi
16298
16299 cat >>confdefs.h <<EOF
16300 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
16301 EOF
16302
16303 ###############################################################################
16304 # These options are relatively safe to experiment with.
16305
16306 echo "$as_me:16306: checking if you want all development code" >&5
16307 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
16308
16309 # Check whether --with-develop or --without-develop was given.
16310 if test "${with_develop+set}" = set; then
16311   withval="$with_develop"
16312   with_develop=$withval
16313 else
16314   with_develop=no
16315 fi;
16316 echo "$as_me:16316: result: $with_develop" >&5
16317 echo "${ECHO_T}$with_develop" >&6
16318
16319 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
16320 echo "$as_me:16320: checking if you want hard-tabs code" >&5
16321 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
16322
16323 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
16324 if test "${enable_hard_tabs+set}" = set; then
16325   enableval="$enable_hard_tabs"
16326
16327 else
16328   enable_hard_tabs=$with_develop
16329 fi;
16330 echo "$as_me:16330: result: $enable_hard_tabs" >&5
16331 echo "${ECHO_T}$enable_hard_tabs" >&6
16332 test "x$enable_hard_tabs" = xyes &&
16333 cat >>confdefs.h <<\EOF
16334 #define USE_HARD_TABS 1
16335 EOF
16336
16337 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
16338 echo "$as_me:16338: checking if you want limited support for xmc" >&5
16339 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
16340
16341 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
16342 if test "${enable_xmc_glitch+set}" = set; then
16343   enableval="$enable_xmc_glitch"
16344
16345 else
16346   enable_xmc_glitch=$with_develop
16347 fi;
16348 echo "$as_me:16348: result: $enable_xmc_glitch" >&5
16349 echo "${ECHO_T}$enable_xmc_glitch" >&6
16350 test "x$enable_xmc_glitch" = xyes &&
16351 cat >>confdefs.h <<\EOF
16352 #define USE_XMC_SUPPORT 1
16353 EOF
16354
16355 ###############################################################################
16356 # These are just experimental, probably should not be in a package:
16357
16358 echo "$as_me:16358: checking if you do not want to assume colors are white-on-black" >&5
16359 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
16360
16361 # Check whether --enable-assumed-color or --disable-assumed-color was given.
16362 if test "${enable_assumed_color+set}" = set; then
16363   enableval="$enable_assumed_color"
16364   with_assumed_color=$enableval
16365 else
16366   with_assumed_color=yes
16367 fi;
16368 echo "$as_me:16368: result: $with_assumed_color" >&5
16369 echo "${ECHO_T}$with_assumed_color" >&6
16370 test "x$with_assumed_color" = xyes &&
16371 cat >>confdefs.h <<\EOF
16372 #define USE_ASSUMED_COLOR 1
16373 EOF
16374
16375 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
16376 echo "$as_me:16376: checking if you want hashmap scrolling-optimization code" >&5
16377 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
16378
16379 # Check whether --enable-hashmap or --disable-hashmap was given.
16380 if test "${enable_hashmap+set}" = set; then
16381   enableval="$enable_hashmap"
16382   with_hashmap=$enableval
16383 else
16384   with_hashmap=yes
16385 fi;
16386 echo "$as_me:16386: result: $with_hashmap" >&5
16387 echo "${ECHO_T}$with_hashmap" >&6
16388 test "x$with_hashmap" = xyes &&
16389 cat >>confdefs.h <<\EOF
16390 #define USE_HASHMAP 1
16391 EOF
16392
16393 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
16394 echo "$as_me:16394: checking if you want colorfgbg code" >&5
16395 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
16396
16397 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
16398 if test "${enable_colorfgbg+set}" = set; then
16399   enableval="$enable_colorfgbg"
16400   with_colorfgbg=$enableval
16401 else
16402   with_colorfgbg=no
16403 fi;
16404 echo "$as_me:16404: result: $with_colorfgbg" >&5
16405 echo "${ECHO_T}$with_colorfgbg" >&6
16406 test "x$with_colorfgbg" = xyes &&
16407 cat >>confdefs.h <<\EOF
16408 #define USE_COLORFGBG 1
16409 EOF
16410
16411 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
16412 echo "$as_me:16412: checking if you want to use gcc -fvisibility option" >&5
16413 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
16414
16415 # Check whether --enable-fvisibility or --disable-fvisibility was given.
16416 if test "${enable_fvisibility+set}" = set; then
16417   enableval="$enable_fvisibility"
16418   cf_with_fvisibility=$enableval
16419 else
16420   cf_with_fvisibility=no
16421 fi;
16422 echo "$as_me:16422: result: $cf_with_fvisibility" >&5
16423 echo "${ECHO_T}$cf_with_fvisibility" >&6
16424
16425 NCURSES_IMPEXP=
16426 NCURSES_CXX_IMPEXP=
16427 if test "x$cf_with_fvisibility" = xyes; then
16428
16429 echo "$as_me:16429: checking if $CC -fvisibility=hidden option works" >&5
16430 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
16431 if test "${cf_cv_fvisibility_hidden+set}" = set; then
16432   echo $ECHO_N "(cached) $ECHO_C" >&6
16433 else
16434
16435     cf_save_cflags="$CFLAGS"
16436     CFLAGS="$CFLAGS -fvisibility=hidden"
16437     cat >"conftest.$ac_ext" <<_ACEOF
16438 #line 16438 "configure"
16439 #include "confdefs.h"
16440
16441 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16442
16443 int
16444 main (void)
16445 {
16446
16447         if (somefunc()) return 1;
16448
16449   ;
16450   return 0;
16451 }
16452 _ACEOF
16453 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16454 if { (eval echo "$as_me:16454: \"$ac_link\"") >&5
16455   (eval $ac_link) 2>&5
16456   ac_status=$?
16457   echo "$as_me:16457: \$? = $ac_status" >&5
16458   (exit "$ac_status"); } &&
16459          { ac_try='test -s "conftest$ac_exeext"'
16460   { (eval echo "$as_me:16460: \"$ac_try\"") >&5
16461   (eval $ac_try) 2>&5
16462   ac_status=$?
16463   echo "$as_me:16463: \$? = $ac_status" >&5
16464   (exit "$ac_status"); }; }; then
16465   cf_cv_fvisibility_hidden=yes
16466 else
16467   echo "$as_me: failed program was:" >&5
16468 cat "conftest.$ac_ext" >&5
16469 cf_cv_fvisibility_hidden=no
16470 fi
16471 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16472     CFLAGS=$cf_save_cflags
16473
16474 fi
16475 echo "$as_me:16475: result: $cf_cv_fvisibility_hidden" >&5
16476 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
16477
16478         if test "x$cf_cv_fvisibility_hidden" = xyes
16479         then
16480
16481 cf_fix_cppflags=no
16482 cf_new_cflags=
16483 cf_new_cppflags=
16484 cf_new_extra_cppflags=
16485
16486 for cf_add_cflags in -fvisibility=hidden
16487 do
16488 case "$cf_fix_cppflags" in
16489 (no)
16490         case "$cf_add_cflags" in
16491         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16492                 case "$cf_add_cflags" in
16493                 (-D*)
16494                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16495
16496                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16497                                 && test -z "${cf_tst_cflags}" \
16498                                 && cf_fix_cppflags=yes
16499
16500                         if test "$cf_fix_cppflags" = yes ; then
16501
16502         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16503         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16504
16505                                 continue
16506                         elif test "${cf_tst_cflags}" = "\"'" ; then
16507
16508         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16509         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16510
16511                                 continue
16512                         fi
16513                         ;;
16514                 esac
16515                 case "$CPPFLAGS" in
16516                 (*$cf_add_cflags)
16517                         ;;
16518                 (*)
16519                         case "$cf_add_cflags" in
16520                         (-D*)
16521                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16522
16523 CPPFLAGS=`echo "$CPPFLAGS" | \
16524         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16525                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16526
16527                                 ;;
16528                         esac
16529
16530         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16531         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16532
16533                         ;;
16534                 esac
16535                 ;;
16536         (*)
16537
16538         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16539         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16540
16541                 ;;
16542         esac
16543         ;;
16544 (yes)
16545
16546         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16547         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16548
16549         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16550
16551         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16552                 && test -z "${cf_tst_cflags}" \
16553                 && cf_fix_cppflags=no
16554         ;;
16555 esac
16556 done
16557
16558 if test -n "$cf_new_cflags" ; then
16559
16560         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16561         CFLAGS="${CFLAGS}$cf_new_cflags"
16562
16563 fi
16564
16565 if test -n "$cf_new_cppflags" ; then
16566
16567         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16568         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16569
16570 fi
16571
16572 if test -n "$cf_new_extra_cppflags" ; then
16573
16574         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16575         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16576
16577 fi
16578
16579                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16580         fi
16581         if test -n "$CXX"
16582         then
16583                 ac_ext=cc
16584 ac_cpp='$CXXCPP $CPPFLAGS'
16585 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16586 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16587 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16588 ac_main_return="return"
16589
16590 echo "$as_me:16590: checking if $CXX -fvisibility=hidden option works" >&5
16591 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16592 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16593   echo $ECHO_N "(cached) $ECHO_C" >&6
16594 else
16595
16596     cf_save_cflags="$CXXFLAGS"
16597     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16598     cat >"conftest.$ac_ext" <<_ACEOF
16599 #line 16599 "configure"
16600 #include "confdefs.h"
16601
16602 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16603
16604 int
16605 main (void)
16606 {
16607
16608         if (somefunc()) return 1;
16609
16610   ;
16611   return 0;
16612 }
16613 _ACEOF
16614 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16615 if { (eval echo "$as_me:16615: \"$ac_link\"") >&5
16616   (eval $ac_link) 2>&5
16617   ac_status=$?
16618   echo "$as_me:16618: \$? = $ac_status" >&5
16619   (exit "$ac_status"); } &&
16620          { ac_try='test -s "conftest$ac_exeext"'
16621   { (eval echo "$as_me:16621: \"$ac_try\"") >&5
16622   (eval $ac_try) 2>&5
16623   ac_status=$?
16624   echo "$as_me:16624: \$? = $ac_status" >&5
16625   (exit "$ac_status"); }; }; then
16626   cf_cv_fvisibility_hidden2=yes
16627 else
16628   echo "$as_me: failed program was:" >&5
16629 cat "conftest.$ac_ext" >&5
16630 cf_cv_fvisibility_hidden2=no
16631 fi
16632 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16633     CXXFLAGS=$cf_save_cflags
16634
16635 fi
16636 echo "$as_me:16636: result: $cf_cv_fvisibility_hidden2" >&5
16637 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16638
16639                 if test "x$cf_cv_fvisibility_hidden2" = xyes
16640                 then
16641
16642 cf_save_CXXFLAGS="$CFLAGS"
16643 CFLAGS="$CXXFLAGS"
16644
16645 cf_fix_cppflags=no
16646 cf_new_cflags=
16647 cf_new_cppflags=
16648 cf_new_extra_cppflags=
16649
16650 for cf_add_cflags in -fvisibility=hidden
16651 do
16652 case "$cf_fix_cppflags" in
16653 (no)
16654         case "$cf_add_cflags" in
16655         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16656                 case "$cf_add_cflags" in
16657                 (-D*)
16658                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16659
16660                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16661                                 && test -z "${cf_tst_cflags}" \
16662                                 && cf_fix_cppflags=yes
16663
16664                         if test "$cf_fix_cppflags" = yes ; then
16665
16666         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16667         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16668
16669                                 continue
16670                         elif test "${cf_tst_cflags}" = "\"'" ; then
16671
16672         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16673         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16674
16675                                 continue
16676                         fi
16677                         ;;
16678                 esac
16679                 case "$CPPFLAGS" in
16680                 (*$cf_add_cflags)
16681                         ;;
16682                 (*)
16683                         case "$cf_add_cflags" in
16684                         (-D*)
16685                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16686
16687 CPPFLAGS=`echo "$CPPFLAGS" | \
16688         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16689                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16690
16691                                 ;;
16692                         esac
16693
16694         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16695         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16696
16697                         ;;
16698                 esac
16699                 ;;
16700         (*)
16701
16702         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16703         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16704
16705                 ;;
16706         esac
16707         ;;
16708 (yes)
16709
16710         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16711         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16712
16713         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16714
16715         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16716                 && test -z "${cf_tst_cflags}" \
16717                 && cf_fix_cppflags=no
16718         ;;
16719 esac
16720 done
16721
16722 if test -n "$cf_new_cflags" ; then
16723
16724         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16725         CFLAGS="${CFLAGS}$cf_new_cflags"
16726
16727 fi
16728
16729 if test -n "$cf_new_cppflags" ; then
16730
16731         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16732         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16733
16734 fi
16735
16736 if test -n "$cf_new_extra_cppflags" ; then
16737
16738         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16739         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16740
16741 fi
16742
16743 CXXFLAGS="$CFLAGS"
16744 CFLAGS="$cf_save_CXXFLAGS"
16745
16746                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16747                 fi
16748                 ac_ext=c
16749 ac_cpp='$CPP $CPPFLAGS'
16750 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16751 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16752 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16753 ac_main_return="return"
16754
16755         fi
16756 fi
16757
16758 ###   use option --enable-interop to turn on use of bindings used for interop
16759 echo "$as_me:16759: checking if you want interop bindings" >&5
16760 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16761
16762 # Check whether --enable-interop or --disable-interop was given.
16763 if test "${enable_interop+set}" = set; then
16764   enableval="$enable_interop"
16765   with_exp_interop=$enableval
16766 else
16767   with_exp_interop=$cf_dft_interop
16768 fi;
16769 echo "$as_me:16769: result: $with_exp_interop" >&5
16770 echo "${ECHO_T}$with_exp_interop" >&6
16771
16772 NCURSES_INTEROP_FUNCS=0
16773 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16774
16775 echo "$as_me:16775: checking if you want experimental safe-sprintf code" >&5
16776 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16777
16778 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16779 if test "${enable_safe_sprintf+set}" = set; then
16780   enableval="$enable_safe_sprintf"
16781   with_safe_sprintf=$enableval
16782 else
16783   with_safe_sprintf=no
16784 fi;
16785 echo "$as_me:16785: result: $with_safe_sprintf" >&5
16786 echo "${ECHO_T}$with_safe_sprintf" >&6
16787
16788 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16789 # when hashmap is used scroll hints are useless
16790 if test "$with_hashmap" = no ; then
16791 echo "$as_me:16791: checking if you want to experiment without scrolling-hints code" >&5
16792 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16793
16794 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16795 if test "${enable_scroll_hints+set}" = set; then
16796   enableval="$enable_scroll_hints"
16797   with_scroll_hints=$enableval
16798 else
16799   with_scroll_hints=yes
16800 fi;
16801 echo "$as_me:16801: result: $with_scroll_hints" >&5
16802 echo "${ECHO_T}$with_scroll_hints" >&6
16803 test "x$with_scroll_hints" = xyes &&
16804 cat >>confdefs.h <<\EOF
16805 #define USE_SCROLL_HINTS 1
16806 EOF
16807
16808 fi
16809
16810 echo "$as_me:16810: checking if you want wgetch-events code" >&5
16811 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16812
16813 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16814 if test "${enable_wgetch_events+set}" = set; then
16815   enableval="$enable_wgetch_events"
16816   with_wgetch_events=$enableval
16817 else
16818   with_wgetch_events=no
16819 fi;
16820 echo "$as_me:16820: result: $with_wgetch_events" >&5
16821 echo "${ECHO_T}$with_wgetch_events" >&6
16822 if test "x$with_wgetch_events" = xyes ; then
16823
16824 cat >>confdefs.h <<\EOF
16825 #define NCURSES_WGETCH_EVENTS 1
16826 EOF
16827
16828         NCURSES_WGETCH_EVENTS=1
16829 else
16830         NCURSES_WGETCH_EVENTS=0
16831 fi
16832
16833 case "$cf_cv_system_name" in
16834 (*mingw32*|*mingw64*|*-msvc*)
16835         echo "$as_me:16835: checking if you want experimental-Windows driver" >&5
16836 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16837
16838 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16839 if test "${enable_exp_win32+set}" = set; then
16840   enableval="$enable_exp_win32"
16841   with_exp_win32=$enableval
16842 else
16843   with_exp_win32=no
16844 fi;
16845         echo "$as_me:16845: result: $with_exp_win32" >&5
16846 echo "${ECHO_T}$with_exp_win32" >&6
16847         if test "x$with_exp_win32" = xyes
16848         then
16849
16850 cat >>confdefs.h <<\EOF
16851 #define EXP_WIN32_DRIVER 1
16852 EOF
16853
16854                 EXP_WIN32_DRIVER=1
16855                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16856         else
16857                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16858                 EXP_WIN32_DRIVER=0
16859         fi
16860         ;;
16861 (*)
16862         EXP_WIN32_DRIVER=0
16863         INTERNALS_HDR=
16864         ;;
16865 esac
16866
16867 ###############################################################################
16868
16869 ###     use option --disable-echo to suppress full display compiling commands
16870
16871 echo "$as_me:16871: checking if you want to see long compiling messages" >&5
16872 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16873
16874 # Check whether --enable-echo or --disable-echo was given.
16875 if test "${enable_echo+set}" = set; then
16876   enableval="$enable_echo"
16877   test "$enableval" != no && enableval=yes
16878         if test "$enableval" != "yes" ; then
16879
16880         ECHO_LT='--silent'
16881         ECHO_LD='@echo linking $@;'
16882         RULE_CC='@echo compiling $<'
16883         SHOW_CC='@echo compiling $@'
16884         ECHO_CC='@'
16885
16886         else
16887
16888         ECHO_LT=''
16889         ECHO_LD=''
16890         RULE_CC=''
16891         SHOW_CC=''
16892         ECHO_CC=''
16893
16894         fi
16895 else
16896   enableval=yes
16897
16898         ECHO_LT=''
16899         ECHO_LD=''
16900         RULE_CC=''
16901         SHOW_CC=''
16902         ECHO_CC=''
16903
16904 fi;
16905 echo "$as_me:16905: result: $enableval" >&5
16906 echo "${ECHO_T}$enableval" >&6
16907
16908 if test "x$enable_echo" = xyes; then
16909         ECHO_LINK=
16910 else
16911         ECHO_LINK='@ echo linking $@ ... ;'
16912         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16913         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16914 fi
16915
16916 # --disable-stripping is used for debugging
16917
16918 echo "$as_me:16918: checking if you want to install stripped executables" >&5
16919 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16920
16921 # Check whether --enable-stripping or --disable-stripping was given.
16922 if test "${enable_stripping+set}" = set; then
16923   enableval="$enable_stripping"
16924   test "$enableval" != no && enableval=yes
16925         if test "$enableval" != "yes" ; then
16926     enable_stripping=no
16927         else
16928                 enable_stripping=yes
16929         fi
16930 else
16931   enableval=yes
16932         enable_stripping=yes
16933
16934 fi;
16935 echo "$as_me:16935: result: $enable_stripping" >&5
16936 echo "${ECHO_T}$enable_stripping" >&6
16937
16938 if test "$enable_stripping" = yes
16939 then
16940         INSTALL_OPT_S="-s"
16941 else
16942         INSTALL_OPT_S=
16943 fi
16944
16945 : "${INSTALL:=install}"
16946 echo "$as_me:16946: checking if install accepts -p option" >&5
16947 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16948 if test "${cf_cv_install_p+set}" = set; then
16949   echo $ECHO_N "(cached) $ECHO_C" >&6
16950 else
16951
16952         rm -rf ./conftest*
16953         date >conftest.in
16954         mkdir conftest.out
16955         sleep 3
16956         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16957         then
16958                 if test -f conftest.out/conftest.in
16959                 then
16960                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16961                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16962                         if test -s conftest.err
16963                         then
16964                                 cf_cv_install_p=no
16965                         else
16966                                 cf_cv_install_p=yes
16967                         fi
16968                 else
16969                         cf_cv_install_p=no
16970                 fi
16971         else
16972                 cf_cv_install_p=no
16973         fi
16974         rm -rf ./conftest*
16975
16976 fi
16977 echo "$as_me:16977: result: $cf_cv_install_p" >&5
16978 echo "${ECHO_T}$cf_cv_install_p" >&6
16979
16980 echo "$as_me:16980: checking if install needs to be told about ownership" >&5
16981 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16982 case `$ac_config_guess` in
16983 (*minix)
16984         with_install_o=yes
16985         ;;
16986 (*)
16987         with_install_o=no
16988         ;;
16989 esac
16990
16991 echo "$as_me:16991: result: $with_install_o" >&5
16992 echo "${ECHO_T}$with_install_o" >&6
16993 if test "x$with_install_o" = xyes
16994 then
16995         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'`"
16996 else
16997         INSTALL_OPT_O=
16998 fi
16999
17000 # If we're avoiding relinking of shared libraries during install, that is to
17001 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
17002 # the install program has "-p" (for preserving timestamps).
17003 cf_cv_do_reranlib=yes
17004 if test "x$cf_cv_install_p" = xyes
17005 then
17006         if test "x$cf_cv_do_relink" != xyes
17007         then
17008                 cf_cv_do_reranlib=no
17009                 INSTALL_OPT_P="-p"
17010                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
17011         fi
17012 fi
17013
17014 ###     use option --enable-warnings to turn on all gcc warnings
17015
17016 echo "$as_me:17016: checking if you want to use C11 _Noreturn feature" >&5
17017 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
17018
17019 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
17020 if test "${enable_stdnoreturn+set}" = set; then
17021   enableval="$enable_stdnoreturn"
17022   test "$enableval" != yes && enableval=no
17023         if test "$enableval" != "no" ; then
17024     enable_stdnoreturn=yes
17025         else
17026                 enable_stdnoreturn=no
17027         fi
17028 else
17029   enableval=no
17030         enable_stdnoreturn=no
17031
17032 fi;
17033 echo "$as_me:17033: result: $enable_stdnoreturn" >&5
17034 echo "${ECHO_T}$enable_stdnoreturn" >&6
17035
17036 if test $enable_stdnoreturn = yes; then
17037 echo "$as_me:17037: checking for C11 _Noreturn feature" >&5
17038 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
17039 if test "${cf_cv_c11_noreturn+set}" = set; then
17040   echo $ECHO_N "(cached) $ECHO_C" >&6
17041 else
17042   cat >"conftest.$ac_ext" <<_ACEOF
17043 #line 17043 "configure"
17044 #include "confdefs.h"
17045
17046 #include <stdio.h>
17047 #include <stdlib.h>
17048 #include <stdnoreturn.h>
17049 static _Noreturn void giveup(void) { exit(0); }
17050
17051 int
17052 main (void)
17053 {
17054 if (feof(stdin)) giveup()
17055   ;
17056   return 0;
17057 }
17058 _ACEOF
17059 rm -f "conftest.$ac_objext"
17060 if { (eval echo "$as_me:17060: \"$ac_compile\"") >&5
17061   (eval $ac_compile) 2>&5
17062   ac_status=$?
17063   echo "$as_me:17063: \$? = $ac_status" >&5
17064   (exit "$ac_status"); } &&
17065          { ac_try='test -s "conftest.$ac_objext"'
17066   { (eval echo "$as_me:17066: \"$ac_try\"") >&5
17067   (eval $ac_try) 2>&5
17068   ac_status=$?
17069   echo "$as_me:17069: \$? = $ac_status" >&5
17070   (exit "$ac_status"); }; }; then
17071   cf_cv_c11_noreturn=yes
17072 else
17073   echo "$as_me: failed program was:" >&5
17074 cat "conftest.$ac_ext" >&5
17075 cf_cv_c11_noreturn=no
17076 fi
17077 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17078
17079 fi
17080 echo "$as_me:17080: result: $cf_cv_c11_noreturn" >&5
17081 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
17082 else
17083         cf_cv_c11_noreturn=no,
17084 fi
17085
17086 if test "$cf_cv_c11_noreturn" = yes; then
17087
17088 cat >>confdefs.h <<\EOF
17089 #define HAVE_STDNORETURN_H 1
17090 EOF
17091
17092 cat >>confdefs.h <<EOF
17093 #define STDC_NORETURN _Noreturn
17094 EOF
17095
17096         HAVE_STDNORETURN_H=1
17097 else
17098         HAVE_STDNORETURN_H=0
17099 fi
17100
17101 if test "$GCC" = yes || test "$GXX" = yes
17102 then
17103
17104 if test "$GCC" = yes || test "$GXX" = yes
17105 then
17106         case $CFLAGS in
17107         (*-Werror=*)
17108                 cf_temp_flags=
17109                 for cf_temp_scan in $CFLAGS
17110                 do
17111                         case "x$cf_temp_scan" in
17112                         (x-Werror=format*)
17113
17114         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17115         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17116
17117                                 ;;
17118                         (x-Werror=*)
17119
17120         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17121         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17122
17123                                 ;;
17124                         (*)
17125
17126         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17127         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17128
17129                                 ;;
17130                         esac
17131                 done
17132                 if test "x$CFLAGS" != "x$cf_temp_flags"
17133                 then
17134                         test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
17135
17136 echo "${as_me:-configure}:17136: testing repairing CFLAGS: $CFLAGS ..." 1>&5
17137
17138                         CFLAGS="$cf_temp_flags"
17139                         test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
17140
17141 echo "${as_me:-configure}:17141: testing ... fixed $CFLAGS ..." 1>&5
17142
17143                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17144
17145 echo "${as_me:-configure}:17145: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17146
17147                 fi
17148                 ;;
17149         esac
17150 fi
17151
17152 if test "$GCC" = yes || test "$GXX" = yes
17153 then
17154         case $CPPFLAGS in
17155         (*-Werror=*)
17156                 cf_temp_flags=
17157                 for cf_temp_scan in $CPPFLAGS
17158                 do
17159                         case "x$cf_temp_scan" in
17160                         (x-Werror=format*)
17161
17162         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17163         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17164
17165                                 ;;
17166                         (x-Werror=*)
17167
17168         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17169         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17170
17171                                 ;;
17172                         (*)
17173
17174         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17175         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17176
17177                                 ;;
17178                         esac
17179                 done
17180                 if test "x$CPPFLAGS" != "x$cf_temp_flags"
17181                 then
17182                         test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
17183
17184 echo "${as_me:-configure}:17184: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
17185
17186                         CPPFLAGS="$cf_temp_flags"
17187                         test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
17188
17189 echo "${as_me:-configure}:17189: testing ... fixed $CPPFLAGS ..." 1>&5
17190
17191                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17192
17193 echo "${as_me:-configure}:17193: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17194
17195                 fi
17196                 ;;
17197         esac
17198 fi
17199
17200 if test "$GCC" = yes || test "$GXX" = yes
17201 then
17202         case $LDFLAGS in
17203         (*-Werror=*)
17204                 cf_temp_flags=
17205                 for cf_temp_scan in $LDFLAGS
17206                 do
17207                         case "x$cf_temp_scan" in
17208                         (x-Werror=format*)
17209
17210         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17211         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17212
17213                                 ;;
17214                         (x-Werror=*)
17215
17216         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17217         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17218
17219                                 ;;
17220                         (*)
17221
17222         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17223         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17224
17225                                 ;;
17226                         esac
17227                 done
17228                 if test "x$LDFLAGS" != "x$cf_temp_flags"
17229                 then
17230                         test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
17231
17232 echo "${as_me:-configure}:17232: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
17233
17234                         LDFLAGS="$cf_temp_flags"
17235                         test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
17236
17237 echo "${as_me:-configure}:17237: testing ... fixed $LDFLAGS ..." 1>&5
17238
17239                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17240
17241 echo "${as_me:-configure}:17241: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17242
17243                 fi
17244                 ;;
17245         esac
17246 fi
17247
17248 echo "$as_me:17248: checking if you want to turn on gcc warnings" >&5
17249 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
17250
17251 # Check whether --enable-warnings or --disable-warnings was given.
17252 if test "${enable_warnings+set}" = set; then
17253   enableval="$enable_warnings"
17254   test "$enableval" != yes && enableval=no
17255         if test "$enableval" != "no" ; then
17256     enable_warnings=yes
17257         else
17258                 enable_warnings=no
17259         fi
17260 else
17261   enableval=no
17262         enable_warnings=no
17263
17264 fi;
17265 echo "$as_me:17265: result: $enable_warnings" >&5
17266 echo "${ECHO_T}$enable_warnings" >&6
17267 if test "$enable_warnings" = "yes"
17268 then
17269
17270 if test "x$have_x" = xyes; then
17271
17272 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
17273 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
17274 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
17275 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
17276 for cf_X_CFLAGS in $X_CFLAGS
17277 do
17278         case "x$cf_X_CFLAGS" in
17279         x-[IUD]*)
17280                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
17281                 ;;
17282         *)
17283                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
17284                 ;;
17285         esac
17286 done
17287
17288 cat >"conftest.$ac_ext" <<_ACEOF
17289 #line 17289 "configure"
17290 #include "confdefs.h"
17291
17292 #include <stdlib.h>
17293 #include <X11/Intrinsic.h>
17294
17295 int
17296 main (void)
17297 {
17298 String foo = malloc(1); free((void*)foo)
17299   ;
17300   return 0;
17301 }
17302 _ACEOF
17303 rm -f "conftest.$ac_objext"
17304 if { (eval echo "$as_me:17304: \"$ac_compile\"") >&5
17305   (eval $ac_compile) 2>&5
17306   ac_status=$?
17307   echo "$as_me:17307: \$? = $ac_status" >&5
17308   (exit "$ac_status"); } &&
17309          { ac_try='test -s "conftest.$ac_objext"'
17310   { (eval echo "$as_me:17310: \"$ac_try\"") >&5
17311   (eval $ac_try) 2>&5
17312   ac_status=$?
17313   echo "$as_me:17313: \$? = $ac_status" >&5
17314   (exit "$ac_status"); }; }; then
17315
17316 echo "$as_me:17316: checking for X11/Xt const-feature" >&5
17317 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
17318 if test "${cf_cv_const_x_string+set}" = set; then
17319   echo $ECHO_N "(cached) $ECHO_C" >&6
17320 else
17321
17322         cat >"conftest.$ac_ext" <<_ACEOF
17323 #line 17323 "configure"
17324 #include "confdefs.h"
17325
17326 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
17327 #undef  XTSTRINGDEFINES /* X11R5 and later */
17328 #include <stdlib.h>
17329 #include <X11/Intrinsic.h>
17330
17331 int
17332 main (void)
17333 {
17334 String foo = malloc(1); *foo = 0
17335   ;
17336   return 0;
17337 }
17338 _ACEOF
17339 rm -f "conftest.$ac_objext"
17340 if { (eval echo "$as_me:17340: \"$ac_compile\"") >&5
17341   (eval $ac_compile) 2>&5
17342   ac_status=$?
17343   echo "$as_me:17343: \$? = $ac_status" >&5
17344   (exit "$ac_status"); } &&
17345          { ac_try='test -s "conftest.$ac_objext"'
17346   { (eval echo "$as_me:17346: \"$ac_try\"") >&5
17347   (eval $ac_try) 2>&5
17348   ac_status=$?
17349   echo "$as_me:17349: \$? = $ac_status" >&5
17350   (exit "$ac_status"); }; }; then
17351
17352                         cf_cv_const_x_string=no
17353
17354 else
17355   echo "$as_me: failed program was:" >&5
17356 cat "conftest.$ac_ext" >&5
17357
17358                         cf_cv_const_x_string=yes
17359
17360 fi
17361 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17362
17363 fi
17364 echo "$as_me:17364: result: $cf_cv_const_x_string" >&5
17365 echo "${ECHO_T}$cf_cv_const_x_string" >&6
17366
17367 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
17368 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
17369 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
17370
17371 case "$cf_cv_const_x_string" in
17372 (no)
17373
17374         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17375         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
17376
17377         ;;
17378 (*)
17379
17380         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17381         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
17382
17383         ;;
17384 esac
17385
17386 else
17387   echo "$as_me: failed program was:" >&5
17388 cat "conftest.$ac_ext" >&5
17389 fi
17390 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17391  fi
17392 cat > "conftest.$ac_ext" <<EOF
17393 #line 17393 "${as_me:-configure}"
17394 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17395 EOF
17396 if test "$INTEL_COMPILER" = yes
17397 then
17398 # The "-wdXXX" options suppress warnings:
17399 # remark #1419: external declaration in primary source file
17400 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17401 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17402 # remark #193: zero used for undefined preprocessing identifier
17403 # remark #593: variable "curs_sb_left_arrow" was set but never used
17404 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17405 # remark #869: parameter "tw" was never referenced
17406 # remark #981: operands are evaluated in unspecified order
17407 # warning #279: controlling expression is constant
17408
17409         { echo "$as_me:17409: checking for $CC warning options..." >&5
17410 echo "$as_me: checking for $CC warning options..." >&6;}
17411         cf_save_CFLAGS="$CFLAGS"
17412         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
17413         for cf_opt in \
17414                 wd1419 \
17415                 wd1683 \
17416                 wd1684 \
17417                 wd193 \
17418                 wd593 \
17419                 wd279 \
17420                 wd810 \
17421                 wd869 \
17422                 wd981
17423         do
17424                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17425                 if { (eval echo "$as_me:17425: \"$ac_compile\"") >&5
17426   (eval $ac_compile) 2>&5
17427   ac_status=$?
17428   echo "$as_me:17428: \$? = $ac_status" >&5
17429   (exit "$ac_status"); }; then
17430                         test -n "$verbose" && echo "$as_me:17430: result: ... -$cf_opt" >&5
17431 echo "${ECHO_T}... -$cf_opt" >&6
17432                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17433                 fi
17434         done
17435         CFLAGS="$cf_save_CFLAGS"
17436 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
17437 then
17438         { echo "$as_me:17438: checking for $CC warning options..." >&5
17439 echo "$as_me: checking for $CC warning options..." >&6;}
17440         cf_save_CFLAGS="$CFLAGS"
17441         cf_warn_CONST=""
17442         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17443         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17444         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17445         for cf_opt in W Wall \
17446                 Wbad-function-cast \
17447                 Wcast-align \
17448                 Wcast-qual \
17449                 Wdeclaration-after-statement \
17450                 Wextra \
17451                 Winline \
17452                 Wmissing-declarations \
17453                 Wmissing-prototypes \
17454                 Wnested-externs \
17455                 Wpointer-arith \
17456                 Wshadow \
17457                 Wstrict-prototypes \
17458                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
17459         do
17460                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17461                 if { (eval echo "$as_me:17461: \"$ac_compile\"") >&5
17462   (eval $ac_compile) 2>&5
17463   ac_status=$?
17464   echo "$as_me:17464: \$? = $ac_status" >&5
17465   (exit "$ac_status"); }; then
17466                         test -n "$verbose" && echo "$as_me:17466: result: ... -$cf_opt" >&5
17467 echo "${ECHO_T}... -$cf_opt" >&6
17468                         case "$cf_opt" in
17469                         (Winline)
17470                                 case "$GCC_VERSION" in
17471                                 ([34].*)
17472                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17473
17474 echo "${as_me:-configure}:17474: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17475
17476                                         continue;;
17477                                 esac
17478                                 ;;
17479                         (Wpointer-arith)
17480                                 case "$GCC_VERSION" in
17481                                 ([12].*)
17482                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17483
17484 echo "${as_me:-configure}:17484: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17485
17486                                         continue;;
17487                                 esac
17488                                 ;;
17489                         esac
17490                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17491                 fi
17492         done
17493         CFLAGS="$cf_save_CFLAGS"
17494 fi
17495 rm -rf ./conftest*
17496
17497 fi
17498
17499 if test "$GCC" = yes || test "$GXX" = yes
17500 then
17501 cat > conftest.i <<EOF
17502 #ifndef GCC_PRINTF
17503 #define GCC_PRINTF 0
17504 #endif
17505 #ifndef GCC_SCANF
17506 #define GCC_SCANF 0
17507 #endif
17508 #ifndef GCC_NORETURN
17509 #define GCC_NORETURN /* nothing */
17510 #endif
17511 #ifndef GCC_UNUSED
17512 #define GCC_UNUSED /* nothing */
17513 #endif
17514 EOF
17515 if test "$GCC" = yes
17516 then
17517         { echo "$as_me:17517: checking for $CC __attribute__ directives..." >&5
17518 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
17519 cat > "conftest.$ac_ext" <<EOF
17520 #line 17520 "${as_me:-configure}"
17521 #include <stdio.h>
17522 #include "confdefs.h"
17523 #include "conftest.h"
17524 #include "conftest.i"
17525 #if     GCC_PRINTF
17526 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17527 #else
17528 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17529 #endif
17530 #if     GCC_SCANF
17531 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
17532 #else
17533 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
17534 #endif
17535 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17536 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
17537 extern GCC_NORETURN void foo(void);
17538 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
17539 EOF
17540         cf_printf_attribute=no
17541         cf_scanf_attribute=no
17542         for cf_attribute in scanf printf unused noreturn
17543         do
17544
17545 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17546
17547                 cf_directive="__attribute__(($cf_attribute))"
17548                 echo "checking for $CC $cf_directive" 1>&5
17549
17550                 case "$cf_attribute" in
17551                 (printf)
17552                         cf_printf_attribute=yes
17553                         cat >conftest.h <<EOF
17554 #define GCC_$cf_ATTRIBUTE 1
17555 EOF
17556                         ;;
17557                 (scanf)
17558                         cf_scanf_attribute=yes
17559                         cat >conftest.h <<EOF
17560 #define GCC_$cf_ATTRIBUTE 1
17561 EOF
17562                         ;;
17563                 (*)
17564                         cat >conftest.h <<EOF
17565 #define GCC_$cf_ATTRIBUTE $cf_directive
17566 EOF
17567                         ;;
17568                 esac
17569
17570                 if { (eval echo "$as_me:17570: \"$ac_compile\"") >&5
17571   (eval $ac_compile) 2>&5
17572   ac_status=$?
17573   echo "$as_me:17573: \$? = $ac_status" >&5
17574   (exit "$ac_status"); }; then
17575                         test -n "$verbose" && echo "$as_me:17575: result: ... $cf_attribute" >&5
17576 echo "${ECHO_T}... $cf_attribute" >&6
17577                         cat conftest.h >>confdefs.h
17578                         case "$cf_attribute" in
17579                         (noreturn)
17580
17581 cat >>confdefs.h <<EOF
17582 #define GCC_NORETURN $cf_directive
17583 EOF
17584
17585                                 ;;
17586                         (printf)
17587                                 cf_value='/* nothing */'
17588                                 if test "$cf_printf_attribute" != no ; then
17589                                         cf_value='__attribute__((format(printf,fmt,var)))'
17590
17591 cat >>confdefs.h <<\EOF
17592 #define GCC_PRINTF 1
17593 EOF
17594
17595                                 fi
17596
17597 cat >>confdefs.h <<EOF
17598 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17599 EOF
17600
17601                                 ;;
17602                         (scanf)
17603                                 cf_value='/* nothing */'
17604                                 if test "$cf_scanf_attribute" != no ; then
17605                                         cf_value='__attribute__((format(scanf,fmt,var)))'
17606
17607 cat >>confdefs.h <<\EOF
17608 #define GCC_SCANF 1
17609 EOF
17610
17611                                 fi
17612
17613 cat >>confdefs.h <<EOF
17614 #define GCC_SCANFLIKE(fmt,var) $cf_value
17615 EOF
17616
17617                                 ;;
17618                         (unused)
17619
17620 cat >>confdefs.h <<EOF
17621 #define GCC_UNUSED $cf_directive
17622 EOF
17623
17624                                 ;;
17625                         esac
17626                 fi
17627         done
17628 else
17629         ${FGREP-fgrep} define conftest.i >>confdefs.h
17630 fi
17631 rm -rf ./conftest*
17632 fi
17633
17634 fi
17635
17636 if test "x$enable_warnings" = "xyes"; then
17637
17638         ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
17639
17640         if test "x$cf_with_cxx" = xyes ; then
17641
17642 INTEL_CPLUSPLUS=no
17643
17644 if test "$GCC" = yes ; then
17645         case "$host_os" in
17646         (linux*|gnu*)
17647                 echo "$as_me:17647: checking if this is really Intel C++ compiler" >&5
17648 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
17649                 cf_save_CFLAGS="$CXXFLAGS"
17650                 CXXFLAGS="$CXXFLAGS -no-gcc"
17651                 cat >"conftest.$ac_ext" <<_ACEOF
17652 #line 17652 "configure"
17653 #include "confdefs.h"
17654
17655 int
17656 main (void)
17657 {
17658
17659 #ifdef __INTEL_COMPILER
17660 #else
17661 make an error
17662 #endif
17663
17664   ;
17665   return 0;
17666 }
17667 _ACEOF
17668 rm -f "conftest.$ac_objext"
17669 if { (eval echo "$as_me:17669: \"$ac_compile\"") >&5
17670   (eval $ac_compile) 2>&5
17671   ac_status=$?
17672   echo "$as_me:17672: \$? = $ac_status" >&5
17673   (exit "$ac_status"); } &&
17674          { ac_try='test -s "conftest.$ac_objext"'
17675   { (eval echo "$as_me:17675: \"$ac_try\"") >&5
17676   (eval $ac_try) 2>&5
17677   ac_status=$?
17678   echo "$as_me:17678: \$? = $ac_status" >&5
17679   (exit "$ac_status"); }; }; then
17680   INTEL_CPLUSPLUS=yes
17681 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17682
17683 else
17684   echo "$as_me: failed program was:" >&5
17685 cat "conftest.$ac_ext" >&5
17686 fi
17687 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17688                 CXXFLAGS="$cf_save_CFLAGS"
17689                 echo "$as_me:17689: result: $INTEL_CPLUSPLUS" >&5
17690 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17691                 ;;
17692         esac
17693 fi
17694
17695 CLANG_CPLUSPLUS=no
17696
17697 if test "$GCC" = yes ; then
17698         echo "$as_me:17698: checking if this is really Clang C++ compiler" >&5
17699 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17700         cf_save_CFLAGS="$CXXFLAGS"
17701         cat >"conftest.$ac_ext" <<_ACEOF
17702 #line 17702 "configure"
17703 #include "confdefs.h"
17704
17705 int
17706 main (void)
17707 {
17708
17709 #ifdef __clang__
17710 #else
17711 make an error
17712 #endif
17713
17714   ;
17715   return 0;
17716 }
17717 _ACEOF
17718 rm -f "conftest.$ac_objext"
17719 if { (eval echo "$as_me:17719: \"$ac_compile\"") >&5
17720   (eval $ac_compile) 2>&5
17721   ac_status=$?
17722   echo "$as_me:17722: \$? = $ac_status" >&5
17723   (exit "$ac_status"); } &&
17724          { ac_try='test -s "conftest.$ac_objext"'
17725   { (eval echo "$as_me:17725: \"$ac_try\"") >&5
17726   (eval $ac_try) 2>&5
17727   ac_status=$?
17728   echo "$as_me:17728: \$? = $ac_status" >&5
17729   (exit "$ac_status"); }; }; then
17730   CLANG_CPLUSPLUS=yes
17731
17732 else
17733   echo "$as_me: failed program was:" >&5
17734 cat "conftest.$ac_ext" >&5
17735 fi
17736 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17737         CXXFLAGS="$cf_save_CFLAGS"
17738         echo "$as_me:17738: result: $CLANG_CPLUSPLUS" >&5
17739 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17740 fi
17741
17742 CLANG_VERSION=none
17743
17744 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17745         case "$CC" in
17746         (c[1-9][0-9]|*/c[1-9][0-9])
17747                 { echo "$as_me:17747: WARNING: replacing broken compiler alias $CC" >&5
17748 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17749                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17750                 CC=clang
17751                 ;;
17752         esac
17753
17754         echo "$as_me:17754: checking version of $CC" >&5
17755 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17756         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.].*//'`"
17757         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17758         echo "$as_me:17758: result: $CLANG_VERSION" >&5
17759 echo "${ECHO_T}$CLANG_VERSION" >&6
17760
17761         for cf_clang_opt in \
17762                 -Qunused-arguments \
17763                 -Wno-error=implicit-function-declaration
17764         do
17765                 echo "$as_me:17765: checking if option $cf_clang_opt works" >&5
17766 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17767                 cf_save_CFLAGS="$CFLAGS"
17768                 CFLAGS="$CFLAGS $cf_clang_opt"
17769                 cat >"conftest.$ac_ext" <<_ACEOF
17770 #line 17770 "configure"
17771 #include "confdefs.h"
17772
17773                         #include <stdio.h>
17774 int
17775 main (void)
17776 {
17777
17778                         printf("hello!\\n");
17779   ;
17780   return 0;
17781 }
17782 _ACEOF
17783 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17784 if { (eval echo "$as_me:17784: \"$ac_link\"") >&5
17785   (eval $ac_link) 2>&5
17786   ac_status=$?
17787   echo "$as_me:17787: \$? = $ac_status" >&5
17788   (exit "$ac_status"); } &&
17789          { ac_try='test -s "conftest$ac_exeext"'
17790   { (eval echo "$as_me:17790: \"$ac_try\"") >&5
17791   (eval $ac_try) 2>&5
17792   ac_status=$?
17793   echo "$as_me:17793: \$? = $ac_status" >&5
17794   (exit "$ac_status"); }; }; then
17795
17796                         cf_clang_optok=yes
17797 else
17798   echo "$as_me: failed program was:" >&5
17799 cat "conftest.$ac_ext" >&5
17800
17801                         cf_clang_optok=no
17802 fi
17803 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17804                 echo "$as_me:17804: result: $cf_clang_optok" >&5
17805 echo "${ECHO_T}$cf_clang_optok" >&6
17806                 CFLAGS="$cf_save_CFLAGS"
17807                 if test "$cf_clang_optok" = yes; then
17808                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17809
17810 echo "${as_me:-configure}:17810: testing adding option $cf_clang_opt ..." 1>&5
17811
17812         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17813         CFLAGS="${CFLAGS}$cf_clang_opt"
17814
17815                 fi
17816         done
17817 fi
17818
17819 ac_ext=cc
17820 ac_cpp='$CXXCPP $CPPFLAGS'
17821 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17822 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17823 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17824 ac_main_return="return"
17825
17826 cat > conftest.$ac_ext <<EOF
17827 #line 17827 "configure"
17828 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17829 EOF
17830
17831 if test "$INTEL_CPLUSPLUS" = yes
17832 then
17833 # The "-wdXXX" options suppress warnings:
17834 # remark #1419: external declaration in primary source file
17835 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17836 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17837 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17838 # remark #193: zero used for undefined preprocessing identifier
17839 # remark #593: variable "curs_sb_left_arrow" was set but never used
17840 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17841 # remark #869: parameter "tw" was never referenced
17842 # remark #981: operands are evaluated in unspecified order
17843 # warning #269: invalid format string conversion
17844
17845         { echo "$as_me:17845: checking for $CC warning options..." >&5
17846 echo "$as_me: checking for $CC warning options..." >&6;}
17847         cf_save_CXXFLAGS="$CXXFLAGS"
17848         EXTRA_CXXFLAGS="-Wall"
17849         for cf_opt in \
17850                 wd1419 \
17851                 wd1682 \
17852                 wd1683 \
17853                 wd1684 \
17854                 wd193 \
17855                 wd279 \
17856                 wd593 \
17857                 wd810 \
17858                 wd869 \
17859                 wd981
17860         do
17861                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17862                 if { (eval echo "$as_me:17862: \"$ac_compile\"") >&5
17863   (eval $ac_compile) 2>&5
17864   ac_status=$?
17865   echo "$as_me:17865: \$? = $ac_status" >&5
17866   (exit "$ac_status"); }; then
17867                         test -n "$verbose" && echo "$as_me:17867: result: ... -$cf_opt" >&5
17868 echo "${ECHO_T}... -$cf_opt" >&6
17869                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17870                 fi
17871         done
17872         CXXFLAGS="$cf_save_CXXFLAGS"
17873
17874 elif test "$GXX" = yes
17875 then
17876         { echo "$as_me:17876: checking for $CXX warning options..." >&5
17877 echo "$as_me: checking for $CXX warning options..." >&6;}
17878         cf_save_CXXFLAGS="$CXXFLAGS"
17879         EXTRA_CXXFLAGS="-W -Wall"
17880         cf_gxx_extra_warnings=""
17881         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17882         case "$GXX_VERSION" in
17883         ([1-2].*)
17884                 ;;
17885         (*)
17886                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17887                 ;;
17888         esac
17889         for cf_opt in \
17890                 Wabi \
17891                 fabi-version=0 \
17892                 Wextra \
17893                 Wignored-qualifiers \
17894                 Wlogical-op \
17895                 Woverloaded-virtual \
17896                 Wsign-promo \
17897                 Wsynth \
17898                 Wold-style-cast \
17899                 Wcast-align \
17900                 Wcast-qual \
17901                 Wpointer-arith \
17902                 Wshadow \
17903                 Wundef $cf_gxx_extra_warnings Wno-unused
17904         do
17905                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17906                 if { (eval echo "$as_me:17906: \"$ac_compile\"") >&5
17907   (eval $ac_compile) 2>&5
17908   ac_status=$?
17909   echo "$as_me:17909: \$? = $ac_status" >&5
17910   (exit "$ac_status"); }; then
17911                         test -n "$verbose" && echo "$as_me:17911: result: ... -$cf_opt" >&5
17912 echo "${ECHO_T}... -$cf_opt" >&6
17913                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17914                 else
17915                         test -n "$verbose" && echo "$as_me:17915: result: ... no -$cf_opt" >&5
17916 echo "${ECHO_T}... no -$cf_opt" >&6
17917                 fi
17918         done
17919         CXXFLAGS="$cf_save_CXXFLAGS"
17920 fi
17921
17922 rm -rf ./conftest*
17923 ac_ext=c
17924 ac_cpp='$CPP $CPPFLAGS'
17925 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17926 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17927 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17928 ac_main_return="return"
17929
17930         fi
17931 fi
17932
17933 echo "$as_me:17933: checking if you want to work around bogus compiler/loader warnings" >&5
17934 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17935
17936 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17937 if test "${enable_string_hacks+set}" = set; then
17938   enableval="$enable_string_hacks"
17939   enable_string_hacks=$enableval
17940 else
17941   enable_string_hacks=no
17942 fi;
17943 echo "$as_me:17943: result: $enable_string_hacks" >&5
17944 echo "${ECHO_T}$enable_string_hacks" >&6
17945
17946 if test "x$enable_string_hacks" = "xyes"; then
17947
17948 cat >>confdefs.h <<\EOF
17949 #define USE_STRING_HACKS 1
17950 EOF
17951
17952         { echo "$as_me:17952: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
17953 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17954         echo "$as_me:17954: checking for strlcat" >&5
17955 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17956 if test "${ac_cv_func_strlcat+set}" = set; then
17957   echo $ECHO_N "(cached) $ECHO_C" >&6
17958 else
17959   cat >"conftest.$ac_ext" <<_ACEOF
17960 #line 17960 "configure"
17961 #include "confdefs.h"
17962 #define strlcat autoconf_temporary
17963 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17964 #undef strlcat
17965
17966 #ifdef __cplusplus
17967 extern "C"
17968 #endif
17969
17970 /* We use char because int might match the return type of a gcc2
17971    builtin and then its argument prototype would still apply.  */
17972 char strlcat (void);
17973
17974 int
17975 main (void)
17976 {
17977
17978 /* The GNU C library defines stubs for functions which it implements
17979     to always fail with ENOSYS.  Some functions are actually named
17980     something starting with __ and the normal name is an alias.  */
17981 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17982 #error found stub for strlcat
17983 #endif
17984
17985         return strlcat ();
17986   ;
17987   return 0;
17988 }
17989 _ACEOF
17990 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17991 if { (eval echo "$as_me:17991: \"$ac_link\"") >&5
17992   (eval $ac_link) 2>&5
17993   ac_status=$?
17994   echo "$as_me:17994: \$? = $ac_status" >&5
17995   (exit "$ac_status"); } &&
17996          { ac_try='test -s "conftest$ac_exeext"'
17997   { (eval echo "$as_me:17997: \"$ac_try\"") >&5
17998   (eval $ac_try) 2>&5
17999   ac_status=$?
18000   echo "$as_me:18000: \$? = $ac_status" >&5
18001   (exit "$ac_status"); }; }; then
18002   ac_cv_func_strlcat=yes
18003 else
18004   echo "$as_me: failed program was:" >&5
18005 cat "conftest.$ac_ext" >&5
18006 ac_cv_func_strlcat=no
18007 fi
18008 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18009 fi
18010 echo "$as_me:18010: result: $ac_cv_func_strlcat" >&5
18011 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
18012 if test "$ac_cv_func_strlcat" = yes; then
18013
18014 cat >>confdefs.h <<\EOF
18015 #define HAVE_STRLCAT 1
18016 EOF
18017
18018 else
18019
18020                 echo "$as_me:18020: checking for strlcat in -lbsd" >&5
18021 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
18022 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
18023   echo $ECHO_N "(cached) $ECHO_C" >&6
18024 else
18025   ac_check_lib_save_LIBS=$LIBS
18026 LIBS="-lbsd  $LIBS"
18027 cat >"conftest.$ac_ext" <<_ACEOF
18028 #line 18028 "configure"
18029 #include "confdefs.h"
18030
18031 /* Override any gcc2 internal prototype to avoid an error.  */
18032 #ifdef __cplusplus
18033 extern "C"
18034 #endif
18035 /* We use char because int might match the return type of a gcc2
18036    builtin and then its argument prototype would still apply.  */
18037 char strlcat ();
18038 int
18039 main (void)
18040 {
18041 strlcat ();
18042   ;
18043   return 0;
18044 }
18045 _ACEOF
18046 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18047 if { (eval echo "$as_me:18047: \"$ac_link\"") >&5
18048   (eval $ac_link) 2>&5
18049   ac_status=$?
18050   echo "$as_me:18050: \$? = $ac_status" >&5
18051   (exit "$ac_status"); } &&
18052          { ac_try='test -s "conftest$ac_exeext"'
18053   { (eval echo "$as_me:18053: \"$ac_try\"") >&5
18054   (eval $ac_try) 2>&5
18055   ac_status=$?
18056   echo "$as_me:18056: \$? = $ac_status" >&5
18057   (exit "$ac_status"); }; }; then
18058   ac_cv_lib_bsd_strlcat=yes
18059 else
18060   echo "$as_me: failed program was:" >&5
18061 cat "conftest.$ac_ext" >&5
18062 ac_cv_lib_bsd_strlcat=no
18063 fi
18064 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18065 LIBS=$ac_check_lib_save_LIBS
18066 fi
18067 echo "$as_me:18067: result: $ac_cv_lib_bsd_strlcat" >&5
18068 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
18069 if test "$ac_cv_lib_bsd_strlcat" = yes; then
18070
18071 cf_add_libs="$LIBS"
18072 # reverse order
18073 cf_add_0lib=
18074 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18075 # filter duplicates
18076 for cf_add_1lib in $cf_add_0lib; do
18077         for cf_add_2lib in $cf_add_libs; do
18078                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18079                         cf_add_1lib=
18080                         break
18081                 fi
18082         done
18083         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18084 done
18085 LIBS="$cf_add_libs"
18086
18087 for ac_header in bsd/string.h
18088 do
18089 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18090 echo "$as_me:18090: checking for $ac_header" >&5
18091 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18092 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18093   echo $ECHO_N "(cached) $ECHO_C" >&6
18094 else
18095   cat >"conftest.$ac_ext" <<_ACEOF
18096 #line 18096 "configure"
18097 #include "confdefs.h"
18098 #include <$ac_header>
18099 _ACEOF
18100 if { (eval echo "$as_me:18100: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18101   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18102   ac_status=$?
18103   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18104   rm -f conftest.er1
18105   cat conftest.err >&5
18106   echo "$as_me:18106: \$? = $ac_status" >&5
18107   (exit "$ac_status"); } >/dev/null; then
18108   if test -s conftest.err; then
18109     ac_cpp_err=$ac_c_preproc_warn_flag
18110   else
18111     ac_cpp_err=
18112   fi
18113 else
18114   ac_cpp_err=yes
18115 fi
18116 if test -z "$ac_cpp_err"; then
18117   eval "$as_ac_Header=yes"
18118 else
18119   echo "$as_me: failed program was:" >&5
18120   cat "conftest.$ac_ext" >&5
18121   eval "$as_ac_Header=no"
18122 fi
18123 rm -f conftest.err "conftest.$ac_ext"
18124 fi
18125 echo "$as_me:18125: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18126 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18127 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18128   cat >>confdefs.h <<EOF
18129 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18130 EOF
18131
18132 fi
18133 done
18134
18135 cat >>confdefs.h <<\EOF
18136 #define HAVE_STRLCAT 1
18137 EOF
18138
18139 fi
18140
18141 fi
18142
18143 for ac_func in strlcpy snprintf
18144 do
18145 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18146 echo "$as_me:18146: checking for $ac_func" >&5
18147 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18148 if eval "test \"\${$as_ac_var+set}\" = set"; then
18149   echo $ECHO_N "(cached) $ECHO_C" >&6
18150 else
18151   cat >"conftest.$ac_ext" <<_ACEOF
18152 #line 18152 "configure"
18153 #include "confdefs.h"
18154 #define $ac_func autoconf_temporary
18155 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18156 #undef $ac_func
18157
18158 #ifdef __cplusplus
18159 extern "C"
18160 #endif
18161
18162 /* We use char because int might match the return type of a gcc2
18163    builtin and then its argument prototype would still apply.  */
18164 char $ac_func (void);
18165
18166 int
18167 main (void)
18168 {
18169
18170 /* The GNU C library defines stubs for functions which it implements
18171     to always fail with ENOSYS.  Some functions are actually named
18172     something starting with __ and the normal name is an alias.  */
18173 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18174 #error found stub for $ac_func
18175 #endif
18176
18177         return $ac_func ();
18178   ;
18179   return 0;
18180 }
18181 _ACEOF
18182 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18183 if { (eval echo "$as_me:18183: \"$ac_link\"") >&5
18184   (eval $ac_link) 2>&5
18185   ac_status=$?
18186   echo "$as_me:18186: \$? = $ac_status" >&5
18187   (exit "$ac_status"); } &&
18188          { ac_try='test -s "conftest$ac_exeext"'
18189   { (eval echo "$as_me:18189: \"$ac_try\"") >&5
18190   (eval $ac_try) 2>&5
18191   ac_status=$?
18192   echo "$as_me:18192: \$? = $ac_status" >&5
18193   (exit "$ac_status"); }; }; then
18194   eval "$as_ac_var=yes"
18195 else
18196   echo "$as_me: failed program was:" >&5
18197 cat "conftest.$ac_ext" >&5
18198 eval "$as_ac_var=no"
18199 fi
18200 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18201 fi
18202 echo "$as_me:18202: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18203 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18204 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18205   cat >>confdefs.h <<EOF
18206 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18207 EOF
18208
18209 fi
18210 done
18211
18212 fi
18213
18214 ###     use option --enable-assertions to turn on generation of assertion code
18215 echo "$as_me:18215: checking if you want to enable runtime assertions" >&5
18216 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
18217
18218 # Check whether --enable-assertions or --disable-assertions was given.
18219 if test "${enable_assertions+set}" = set; then
18220   enableval="$enable_assertions"
18221   with_assertions=$enableval
18222 else
18223   with_assertions=no
18224 fi;
18225 echo "$as_me:18225: result: $with_assertions" >&5
18226 echo "${ECHO_T}$with_assertions" >&6
18227 if test -n "$GCC"
18228 then
18229         if test "$with_assertions" = no
18230         then
18231                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
18232         else
18233
18234         ADAFLAGS="$ADAFLAGS -gnata"
18235
18236         fi
18237 fi
18238
18239 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
18240
18241 echo "$as_me:18241: checking if you want to use dmalloc for testing" >&5
18242 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
18243
18244 # Check whether --with-dmalloc or --without-dmalloc was given.
18245 if test "${with_dmalloc+set}" = set; then
18246   withval="$with_dmalloc"
18247   case "x$withval" in
18248         (x|xno) ;;
18249         (*)
18250                 : "${with_cflags:=-g}"
18251                 : "${enable_leaks:=no}"
18252                 with_dmalloc=yes
18253
18254 cat >>confdefs.h <<EOF
18255 #define USE_DMALLOC 1
18256 EOF
18257
18258                 ;;
18259         esac
18260 else
18261   with_dmalloc=
18262 fi;
18263 echo "$as_me:18263: result: ${with_dmalloc:-no}" >&5
18264 echo "${ECHO_T}${with_dmalloc:-no}" >&6
18265
18266 case ".$with_cflags" in
18267 (.*-g*)
18268         case .$CFLAGS in
18269         (.*-g*)
18270                 ;;
18271         (*)
18272
18273 cf_fix_cppflags=no
18274 cf_new_cflags=
18275 cf_new_cppflags=
18276 cf_new_extra_cppflags=
18277
18278 for cf_add_cflags in -g
18279 do
18280 case "$cf_fix_cppflags" in
18281 (no)
18282         case "$cf_add_cflags" in
18283         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18284                 case "$cf_add_cflags" in
18285                 (-D*)
18286                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18287
18288                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18289                                 && test -z "${cf_tst_cflags}" \
18290                                 && cf_fix_cppflags=yes
18291
18292                         if test "$cf_fix_cppflags" = yes ; then
18293
18294         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18295         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18296
18297                                 continue
18298                         elif test "${cf_tst_cflags}" = "\"'" ; then
18299
18300         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18301         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18302
18303                                 continue
18304                         fi
18305                         ;;
18306                 esac
18307                 case "$CPPFLAGS" in
18308                 (*$cf_add_cflags)
18309                         ;;
18310                 (*)
18311                         case "$cf_add_cflags" in
18312                         (-D*)
18313                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18314
18315 CPPFLAGS=`echo "$CPPFLAGS" | \
18316         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18317                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18318
18319                                 ;;
18320                         esac
18321
18322         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18323         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18324
18325                         ;;
18326                 esac
18327                 ;;
18328         (*)
18329
18330         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18331         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18332
18333                 ;;
18334         esac
18335         ;;
18336 (yes)
18337
18338         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18339         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18340
18341         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18342
18343         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18344                 && test -z "${cf_tst_cflags}" \
18345                 && cf_fix_cppflags=no
18346         ;;
18347 esac
18348 done
18349
18350 if test -n "$cf_new_cflags" ; then
18351
18352         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18353         CFLAGS="${CFLAGS}$cf_new_cflags"
18354
18355 fi
18356
18357 if test -n "$cf_new_cppflags" ; then
18358
18359         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18360         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18361
18362 fi
18363
18364 if test -n "$cf_new_extra_cppflags" ; then
18365
18366         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18367         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18368
18369 fi
18370
18371                 ;;
18372         esac
18373         ;;
18374 esac
18375
18376 if test "$with_dmalloc" = yes ; then
18377         echo "$as_me:18377: checking for dmalloc.h" >&5
18378 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
18379 if test "${ac_cv_header_dmalloc_h+set}" = set; then
18380   echo $ECHO_N "(cached) $ECHO_C" >&6
18381 else
18382   cat >"conftest.$ac_ext" <<_ACEOF
18383 #line 18383 "configure"
18384 #include "confdefs.h"
18385 #include <dmalloc.h>
18386 _ACEOF
18387 if { (eval echo "$as_me:18387: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18388   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18389   ac_status=$?
18390   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18391   rm -f conftest.er1
18392   cat conftest.err >&5
18393   echo "$as_me:18393: \$? = $ac_status" >&5
18394   (exit "$ac_status"); } >/dev/null; then
18395   if test -s conftest.err; then
18396     ac_cpp_err=$ac_c_preproc_warn_flag
18397   else
18398     ac_cpp_err=
18399   fi
18400 else
18401   ac_cpp_err=yes
18402 fi
18403 if test -z "$ac_cpp_err"; then
18404   ac_cv_header_dmalloc_h=yes
18405 else
18406   echo "$as_me: failed program was:" >&5
18407   cat "conftest.$ac_ext" >&5
18408   ac_cv_header_dmalloc_h=no
18409 fi
18410 rm -f conftest.err "conftest.$ac_ext"
18411 fi
18412 echo "$as_me:18412: result: $ac_cv_header_dmalloc_h" >&5
18413 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
18414 if test "$ac_cv_header_dmalloc_h" = yes; then
18415
18416 echo "$as_me:18416: checking for dmalloc_debug in -ldmalloc" >&5
18417 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
18418 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
18419   echo $ECHO_N "(cached) $ECHO_C" >&6
18420 else
18421   ac_check_lib_save_LIBS=$LIBS
18422 LIBS="-ldmalloc  $LIBS"
18423 cat >"conftest.$ac_ext" <<_ACEOF
18424 #line 18424 "configure"
18425 #include "confdefs.h"
18426
18427 /* Override any gcc2 internal prototype to avoid an error.  */
18428 #ifdef __cplusplus
18429 extern "C"
18430 #endif
18431 /* We use char because int might match the return type of a gcc2
18432    builtin and then its argument prototype would still apply.  */
18433 char dmalloc_debug ();
18434 int
18435 main (void)
18436 {
18437 dmalloc_debug ();
18438   ;
18439   return 0;
18440 }
18441 _ACEOF
18442 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18443 if { (eval echo "$as_me:18443: \"$ac_link\"") >&5
18444   (eval $ac_link) 2>&5
18445   ac_status=$?
18446   echo "$as_me:18446: \$? = $ac_status" >&5
18447   (exit "$ac_status"); } &&
18448          { ac_try='test -s "conftest$ac_exeext"'
18449   { (eval echo "$as_me:18449: \"$ac_try\"") >&5
18450   (eval $ac_try) 2>&5
18451   ac_status=$?
18452   echo "$as_me:18452: \$? = $ac_status" >&5
18453   (exit "$ac_status"); }; }; then
18454   ac_cv_lib_dmalloc_dmalloc_debug=yes
18455 else
18456   echo "$as_me: failed program was:" >&5
18457 cat "conftest.$ac_ext" >&5
18458 ac_cv_lib_dmalloc_dmalloc_debug=no
18459 fi
18460 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18461 LIBS=$ac_check_lib_save_LIBS
18462 fi
18463 echo "$as_me:18463: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18464 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18465 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
18466   cat >>confdefs.h <<EOF
18467 #define HAVE_LIBDMALLOC 1
18468 EOF
18469
18470   LIBS="-ldmalloc $LIBS"
18471
18472 fi
18473
18474 fi
18475
18476 fi
18477
18478 echo "$as_me:18478: checking if you want to use dbmalloc for testing" >&5
18479 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18480
18481 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18482 if test "${with_dbmalloc+set}" = set; then
18483   withval="$with_dbmalloc"
18484   case "x$withval" in
18485         (x|xno) ;;
18486         (*)
18487                 : "${with_cflags:=-g}"
18488                 : "${enable_leaks:=no}"
18489                 with_dbmalloc=yes
18490
18491 cat >>confdefs.h <<EOF
18492 #define USE_DBMALLOC 1
18493 EOF
18494
18495                 ;;
18496         esac
18497 else
18498   with_dbmalloc=
18499 fi;
18500 echo "$as_me:18500: result: ${with_dbmalloc:-no}" >&5
18501 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18502
18503 case ".$with_cflags" in
18504 (.*-g*)
18505         case .$CFLAGS in
18506         (.*-g*)
18507                 ;;
18508         (*)
18509
18510 cf_fix_cppflags=no
18511 cf_new_cflags=
18512 cf_new_cppflags=
18513 cf_new_extra_cppflags=
18514
18515 for cf_add_cflags in -g
18516 do
18517 case "$cf_fix_cppflags" in
18518 (no)
18519         case "$cf_add_cflags" in
18520         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18521                 case "$cf_add_cflags" in
18522                 (-D*)
18523                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18524
18525                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18526                                 && test -z "${cf_tst_cflags}" \
18527                                 && cf_fix_cppflags=yes
18528
18529                         if test "$cf_fix_cppflags" = yes ; then
18530
18531         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18532         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18533
18534                                 continue
18535                         elif test "${cf_tst_cflags}" = "\"'" ; then
18536
18537         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18538         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18539
18540                                 continue
18541                         fi
18542                         ;;
18543                 esac
18544                 case "$CPPFLAGS" in
18545                 (*$cf_add_cflags)
18546                         ;;
18547                 (*)
18548                         case "$cf_add_cflags" in
18549                         (-D*)
18550                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18551
18552 CPPFLAGS=`echo "$CPPFLAGS" | \
18553         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18554                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18555
18556                                 ;;
18557                         esac
18558
18559         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18560         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18561
18562                         ;;
18563                 esac
18564                 ;;
18565         (*)
18566
18567         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18568         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18569
18570                 ;;
18571         esac
18572         ;;
18573 (yes)
18574
18575         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18576         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18577
18578         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18579
18580         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18581                 && test -z "${cf_tst_cflags}" \
18582                 && cf_fix_cppflags=no
18583         ;;
18584 esac
18585 done
18586
18587 if test -n "$cf_new_cflags" ; then
18588
18589         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18590         CFLAGS="${CFLAGS}$cf_new_cflags"
18591
18592 fi
18593
18594 if test -n "$cf_new_cppflags" ; then
18595
18596         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18597         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18598
18599 fi
18600
18601 if test -n "$cf_new_extra_cppflags" ; then
18602
18603         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18604         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18605
18606 fi
18607
18608                 ;;
18609         esac
18610         ;;
18611 esac
18612
18613 if test "$with_dbmalloc" = yes ; then
18614         echo "$as_me:18614: checking for dbmalloc.h" >&5
18615 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18616 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18617   echo $ECHO_N "(cached) $ECHO_C" >&6
18618 else
18619   cat >"conftest.$ac_ext" <<_ACEOF
18620 #line 18620 "configure"
18621 #include "confdefs.h"
18622 #include <dbmalloc.h>
18623 _ACEOF
18624 if { (eval echo "$as_me:18624: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18625   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18626   ac_status=$?
18627   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18628   rm -f conftest.er1
18629   cat conftest.err >&5
18630   echo "$as_me:18630: \$? = $ac_status" >&5
18631   (exit "$ac_status"); } >/dev/null; then
18632   if test -s conftest.err; then
18633     ac_cpp_err=$ac_c_preproc_warn_flag
18634   else
18635     ac_cpp_err=
18636   fi
18637 else
18638   ac_cpp_err=yes
18639 fi
18640 if test -z "$ac_cpp_err"; then
18641   ac_cv_header_dbmalloc_h=yes
18642 else
18643   echo "$as_me: failed program was:" >&5
18644   cat "conftest.$ac_ext" >&5
18645   ac_cv_header_dbmalloc_h=no
18646 fi
18647 rm -f conftest.err "conftest.$ac_ext"
18648 fi
18649 echo "$as_me:18649: result: $ac_cv_header_dbmalloc_h" >&5
18650 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18651 if test "$ac_cv_header_dbmalloc_h" = yes; then
18652
18653 echo "$as_me:18653: checking for debug_malloc in -ldbmalloc" >&5
18654 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18655 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18656   echo $ECHO_N "(cached) $ECHO_C" >&6
18657 else
18658   ac_check_lib_save_LIBS=$LIBS
18659 LIBS="-ldbmalloc  $LIBS"
18660 cat >"conftest.$ac_ext" <<_ACEOF
18661 #line 18661 "configure"
18662 #include "confdefs.h"
18663
18664 /* Override any gcc2 internal prototype to avoid an error.  */
18665 #ifdef __cplusplus
18666 extern "C"
18667 #endif
18668 /* We use char because int might match the return type of a gcc2
18669    builtin and then its argument prototype would still apply.  */
18670 char debug_malloc ();
18671 int
18672 main (void)
18673 {
18674 debug_malloc ();
18675   ;
18676   return 0;
18677 }
18678 _ACEOF
18679 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18680 if { (eval echo "$as_me:18680: \"$ac_link\"") >&5
18681   (eval $ac_link) 2>&5
18682   ac_status=$?
18683   echo "$as_me:18683: \$? = $ac_status" >&5
18684   (exit "$ac_status"); } &&
18685          { ac_try='test -s "conftest$ac_exeext"'
18686   { (eval echo "$as_me:18686: \"$ac_try\"") >&5
18687   (eval $ac_try) 2>&5
18688   ac_status=$?
18689   echo "$as_me:18689: \$? = $ac_status" >&5
18690   (exit "$ac_status"); }; }; then
18691   ac_cv_lib_dbmalloc_debug_malloc=yes
18692 else
18693   echo "$as_me: failed program was:" >&5
18694 cat "conftest.$ac_ext" >&5
18695 ac_cv_lib_dbmalloc_debug_malloc=no
18696 fi
18697 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18698 LIBS=$ac_check_lib_save_LIBS
18699 fi
18700 echo "$as_me:18700: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18701 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18702 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
18703   cat >>confdefs.h <<EOF
18704 #define HAVE_LIBDBMALLOC 1
18705 EOF
18706
18707   LIBS="-ldbmalloc $LIBS"
18708
18709 fi
18710
18711 fi
18712
18713 fi
18714
18715 echo "$as_me:18715: checking if you want to use valgrind for testing" >&5
18716 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18717
18718 # Check whether --with-valgrind or --without-valgrind was given.
18719 if test "${with_valgrind+set}" = set; then
18720   withval="$with_valgrind"
18721   case "x$withval" in
18722         (x|xno) ;;
18723         (*)
18724                 : "${with_cflags:=-g}"
18725                 : "${enable_leaks:=no}"
18726                 with_valgrind=yes
18727
18728 cat >>confdefs.h <<EOF
18729 #define USE_VALGRIND 1
18730 EOF
18731
18732                 ;;
18733         esac
18734 else
18735   with_valgrind=
18736 fi;
18737 echo "$as_me:18737: result: ${with_valgrind:-no}" >&5
18738 echo "${ECHO_T}${with_valgrind:-no}" >&6
18739
18740 case ".$with_cflags" in
18741 (.*-g*)
18742         case .$CFLAGS in
18743         (.*-g*)
18744                 ;;
18745         (*)
18746
18747 cf_fix_cppflags=no
18748 cf_new_cflags=
18749 cf_new_cppflags=
18750 cf_new_extra_cppflags=
18751
18752 for cf_add_cflags in -g
18753 do
18754 case "$cf_fix_cppflags" in
18755 (no)
18756         case "$cf_add_cflags" in
18757         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18758                 case "$cf_add_cflags" in
18759                 (-D*)
18760                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18761
18762                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18763                                 && test -z "${cf_tst_cflags}" \
18764                                 && cf_fix_cppflags=yes
18765
18766                         if test "$cf_fix_cppflags" = yes ; then
18767
18768         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18769         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18770
18771                                 continue
18772                         elif test "${cf_tst_cflags}" = "\"'" ; then
18773
18774         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18775         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18776
18777                                 continue
18778                         fi
18779                         ;;
18780                 esac
18781                 case "$CPPFLAGS" in
18782                 (*$cf_add_cflags)
18783                         ;;
18784                 (*)
18785                         case "$cf_add_cflags" in
18786                         (-D*)
18787                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18788
18789 CPPFLAGS=`echo "$CPPFLAGS" | \
18790         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18791                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18792
18793                                 ;;
18794                         esac
18795
18796         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18797         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18798
18799                         ;;
18800                 esac
18801                 ;;
18802         (*)
18803
18804         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18805         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18806
18807                 ;;
18808         esac
18809         ;;
18810 (yes)
18811
18812         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18813         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18814
18815         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18816
18817         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18818                 && test -z "${cf_tst_cflags}" \
18819                 && cf_fix_cppflags=no
18820         ;;
18821 esac
18822 done
18823
18824 if test -n "$cf_new_cflags" ; then
18825
18826         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18827         CFLAGS="${CFLAGS}$cf_new_cflags"
18828
18829 fi
18830
18831 if test -n "$cf_new_cppflags" ; then
18832
18833         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18834         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18835
18836 fi
18837
18838 if test -n "$cf_new_extra_cppflags" ; then
18839
18840         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18841         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18842
18843 fi
18844
18845                 ;;
18846         esac
18847         ;;
18848 esac
18849
18850 echo "$as_me:18850: checking if you want to perform memory-leak testing" >&5
18851 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18852
18853 # Check whether --enable-leaks or --disable-leaks was given.
18854 if test "${enable_leaks+set}" = set; then
18855   enableval="$enable_leaks"
18856   enable_leaks=$enableval
18857 else
18858   enable_leaks=yes
18859 fi;
18860 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18861 echo "$as_me:18861: result: $with_no_leaks" >&5
18862 echo "${ECHO_T}$with_no_leaks" >&6
18863
18864 if test "$enable_leaks" = no ; then
18865
18866 cat >>confdefs.h <<\EOF
18867 #define NO_LEAKS 1
18868 EOF
18869
18870 cat >>confdefs.h <<\EOF
18871 #define YY_NO_LEAKS 1
18872 EOF
18873
18874 fi
18875
18876 cat >>confdefs.h <<\EOF
18877 #define HAVE_NC_ALLOC_H 1
18878 EOF
18879
18880 ###     use option --enable-expanded to generate certain macros as functions
18881
18882 # Check whether --enable-expanded or --disable-expanded was given.
18883 if test "${enable_expanded+set}" = set; then
18884   enableval="$enable_expanded"
18885   test "x$enableval" = xyes &&
18886 cat >>confdefs.h <<\EOF
18887 #define NCURSES_EXPANDED 1
18888 EOF
18889
18890 fi;
18891
18892 ###     use option --disable-macros to suppress macros in favor of functions
18893
18894 # Check whether --enable-macros or --disable-macros was given.
18895 if test "${enable_macros+set}" = set; then
18896   enableval="$enable_macros"
18897   test "$enableval" = no &&
18898 cat >>confdefs.h <<\EOF
18899 #define NCURSES_NOMACROS 1
18900 EOF
18901
18902 fi;
18903
18904 # Normally we only add trace() to the debug-library.  Allow this to be
18905 # extended to all models of the ncurses library:
18906 cf_all_traces=no
18907 case "$CFLAGS $CPPFLAGS" in
18908 (*-DTRACE*)
18909         cf_all_traces=yes
18910         ;;
18911 esac
18912
18913 echo "$as_me:18913: checking whether to add trace feature to all models" >&5
18914 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18915
18916 # Check whether --with-trace or --without-trace was given.
18917 if test "${with_trace+set}" = set; then
18918   withval="$with_trace"
18919   cf_with_trace=$withval
18920 else
18921   cf_with_trace=$cf_all_traces
18922 fi;
18923 echo "$as_me:18923: result: $cf_with_trace" >&5
18924 echo "${ECHO_T}$cf_with_trace" >&6
18925
18926 if test "x$cf_with_trace" = xyes ; then
18927         LIB_TRACING=all
18928         ADA_TRACE=TRUE
18929
18930 cf_fix_cppflags=no
18931 cf_new_cflags=
18932 cf_new_cppflags=
18933 cf_new_extra_cppflags=
18934
18935 for cf_add_cflags in -DTRACE
18936 do
18937 case "$cf_fix_cppflags" in
18938 (no)
18939         case "$cf_add_cflags" in
18940         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18941                 case "$cf_add_cflags" in
18942                 (-D*)
18943                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18944
18945                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18946                                 && test -z "${cf_tst_cflags}" \
18947                                 && cf_fix_cppflags=yes
18948
18949                         if test "$cf_fix_cppflags" = yes ; then
18950
18951         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18952         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18953
18954                                 continue
18955                         elif test "${cf_tst_cflags}" = "\"'" ; then
18956
18957         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18958         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18959
18960                                 continue
18961                         fi
18962                         ;;
18963                 esac
18964                 case "$CPPFLAGS" in
18965                 (*$cf_add_cflags)
18966                         ;;
18967                 (*)
18968                         case "$cf_add_cflags" in
18969                         (-D*)
18970                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18971
18972 CPPFLAGS=`echo "$CPPFLAGS" | \
18973         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18974                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18975
18976                                 ;;
18977                         esac
18978
18979         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18980         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18981
18982                         ;;
18983                 esac
18984                 ;;
18985         (*)
18986
18987         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18988         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18989
18990                 ;;
18991         esac
18992         ;;
18993 (yes)
18994
18995         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18996         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18997
18998         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18999
19000         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19001                 && test -z "${cf_tst_cflags}" \
19002                 && cf_fix_cppflags=no
19003         ;;
19004 esac
19005 done
19006
19007 if test -n "$cf_new_cflags" ; then
19008
19009         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19010         CFLAGS="${CFLAGS}$cf_new_cflags"
19011
19012 fi
19013
19014 if test -n "$cf_new_cppflags" ; then
19015
19016         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19017         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19018
19019 fi
19020
19021 if test -n "$cf_new_extra_cppflags" ; then
19022
19023         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19024         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19025
19026 fi
19027
19028 cat >>confdefs.h <<\EOF
19029 #define HAVE__TRACEF 1
19030 EOF
19031
19032 else
19033         LIB_TRACING=DEBUG
19034         ADA_TRACE=FALSE
19035 fi
19036
19037 echo "$as_me:19037: checking if we want to use GNAT projects" >&5
19038 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
19039
19040 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
19041 if test "${enable_gnat_projects+set}" = set; then
19042   enableval="$enable_gnat_projects"
19043   test "$enableval" != no && enableval=yes
19044         if test "$enableval" != "yes" ; then
19045     enable_gnat_projects=no
19046         else
19047                 enable_gnat_projects=yes
19048         fi
19049 else
19050   enableval=yes
19051         enable_gnat_projects=yes
19052
19053 fi;
19054 echo "$as_me:19054: result: $enable_gnat_projects" >&5
19055 echo "${ECHO_T}$enable_gnat_projects" >&6
19056
19057 ###     Checks for libraries.
19058 case "$cf_cv_system_name" in
19059 (*mingw32*|*mingw64*)
19060         # Note: WINVER may be a problem with Windows 10
19061         if test "x$with_exp_win32" = xyes ; then
19062                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
19063         else
19064                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
19065         fi
19066
19067 echo "$as_me:19067: checking if ssp library is needed" >&5
19068 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
19069 if test "${cf_cv_need_libssp+set}" = set; then
19070   echo $ECHO_N "(cached) $ECHO_C" >&6
19071 else
19072
19073 cat >"conftest.$ac_ext" <<_ACEOF
19074 #line 19074 "configure"
19075 #include "confdefs.h"
19076
19077 #include <sys/types.h>
19078 #include <dirent.h>
19079
19080 int
19081 main (void)
19082 {
19083
19084        DIR *dp = opendir(".");
19085
19086   ;
19087   return 0;
19088 }
19089 _ACEOF
19090 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19091 if { (eval echo "$as_me:19091: \"$ac_link\"") >&5
19092   (eval $ac_link) 2>&5
19093   ac_status=$?
19094   echo "$as_me:19094: \$? = $ac_status" >&5
19095   (exit "$ac_status"); } &&
19096          { ac_try='test -s "conftest$ac_exeext"'
19097   { (eval echo "$as_me:19097: \"$ac_try\"") >&5
19098   (eval $ac_try) 2>&5
19099   ac_status=$?
19100   echo "$as_me:19100: \$? = $ac_status" >&5
19101   (exit "$ac_status"); }; }; then
19102   cf_cv_need_libssp=no
19103 else
19104   echo "$as_me: failed program was:" >&5
19105 cat "conftest.$ac_ext" >&5
19106
19107         cf_save_LIBS="$LIBS"
19108         LIBS="$LIBS -lssp"
19109         cat >"conftest.$ac_ext" <<_ACEOF
19110 #line 19110 "configure"
19111 #include "confdefs.h"
19112
19113 #include <sys/types.h>
19114 #include <dirent.h>
19115
19116 int
19117 main (void)
19118 {
19119
19120                    DIR *dp = opendir(".");
19121
19122   ;
19123   return 0;
19124 }
19125 _ACEOF
19126 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19127 if { (eval echo "$as_me:19127: \"$ac_link\"") >&5
19128   (eval $ac_link) 2>&5
19129   ac_status=$?
19130   echo "$as_me:19130: \$? = $ac_status" >&5
19131   (exit "$ac_status"); } &&
19132          { ac_try='test -s "conftest$ac_exeext"'
19133   { (eval echo "$as_me:19133: \"$ac_try\"") >&5
19134   (eval $ac_try) 2>&5
19135   ac_status=$?
19136   echo "$as_me:19136: \$? = $ac_status" >&5
19137   (exit "$ac_status"); }; }; then
19138   cf_cv_need_libssp=yes
19139 else
19140   echo "$as_me: failed program was:" >&5
19141 cat "conftest.$ac_ext" >&5
19142 cf_cv_need_libssp=maybe
19143 fi
19144 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19145         LIBS="$cf_save_LIBS"
19146
19147 fi
19148 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19149 fi
19150 echo "$as_me:19150: result: $cf_cv_need_libssp" >&5
19151 echo "${ECHO_T}$cf_cv_need_libssp" >&6
19152
19153 if test "x$cf_cv_need_libssp" = xyes
19154 then
19155
19156 cf_add_libs="$LIBS"
19157 # reverse order
19158 cf_add_0lib=
19159 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19160 # filter duplicates
19161 for cf_add_1lib in $cf_add_0lib; do
19162         for cf_add_2lib in $cf_add_libs; do
19163                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19164                         cf_add_1lib=
19165                         break
19166                 fi
19167         done
19168         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19169 done
19170 LIBS="$cf_add_libs"
19171
19172 fi
19173
19174         ;;
19175 (*)
19176 echo "$as_me:19176: checking for gettimeofday" >&5
19177 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
19178 if test "${ac_cv_func_gettimeofday+set}" = set; then
19179   echo $ECHO_N "(cached) $ECHO_C" >&6
19180 else
19181   cat >"conftest.$ac_ext" <<_ACEOF
19182 #line 19182 "configure"
19183 #include "confdefs.h"
19184 #define gettimeofday autoconf_temporary
19185 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19186 #undef gettimeofday
19187
19188 #ifdef __cplusplus
19189 extern "C"
19190 #endif
19191
19192 /* We use char because int might match the return type of a gcc2
19193    builtin and then its argument prototype would still apply.  */
19194 char gettimeofday (void);
19195
19196 int
19197 main (void)
19198 {
19199
19200 /* The GNU C library defines stubs for functions which it implements
19201     to always fail with ENOSYS.  Some functions are actually named
19202     something starting with __ and the normal name is an alias.  */
19203 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
19204 #error found stub for gettimeofday
19205 #endif
19206
19207         return gettimeofday ();
19208   ;
19209   return 0;
19210 }
19211 _ACEOF
19212 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19213 if { (eval echo "$as_me:19213: \"$ac_link\"") >&5
19214   (eval $ac_link) 2>&5
19215   ac_status=$?
19216   echo "$as_me:19216: \$? = $ac_status" >&5
19217   (exit "$ac_status"); } &&
19218          { ac_try='test -s "conftest$ac_exeext"'
19219   { (eval echo "$as_me:19219: \"$ac_try\"") >&5
19220   (eval $ac_try) 2>&5
19221   ac_status=$?
19222   echo "$as_me:19222: \$? = $ac_status" >&5
19223   (exit "$ac_status"); }; }; then
19224   ac_cv_func_gettimeofday=yes
19225 else
19226   echo "$as_me: failed program was:" >&5
19227 cat "conftest.$ac_ext" >&5
19228 ac_cv_func_gettimeofday=no
19229 fi
19230 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19231 fi
19232 echo "$as_me:19232: result: $ac_cv_func_gettimeofday" >&5
19233 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
19234 if test "$ac_cv_func_gettimeofday" = yes; then
19235
19236 cat >>confdefs.h <<\EOF
19237 #define HAVE_GETTIMEOFDAY 1
19238 EOF
19239
19240 else
19241
19242 echo "$as_me:19242: checking for gettimeofday in -lbsd" >&5
19243 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
19244 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
19245   echo $ECHO_N "(cached) $ECHO_C" >&6
19246 else
19247   ac_check_lib_save_LIBS=$LIBS
19248 LIBS="-lbsd  $LIBS"
19249 cat >"conftest.$ac_ext" <<_ACEOF
19250 #line 19250 "configure"
19251 #include "confdefs.h"
19252
19253 /* Override any gcc2 internal prototype to avoid an error.  */
19254 #ifdef __cplusplus
19255 extern "C"
19256 #endif
19257 /* We use char because int might match the return type of a gcc2
19258    builtin and then its argument prototype would still apply.  */
19259 char gettimeofday ();
19260 int
19261 main (void)
19262 {
19263 gettimeofday ();
19264   ;
19265   return 0;
19266 }
19267 _ACEOF
19268 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19269 if { (eval echo "$as_me:19269: \"$ac_link\"") >&5
19270   (eval $ac_link) 2>&5
19271   ac_status=$?
19272   echo "$as_me:19272: \$? = $ac_status" >&5
19273   (exit "$ac_status"); } &&
19274          { ac_try='test -s "conftest$ac_exeext"'
19275   { (eval echo "$as_me:19275: \"$ac_try\"") >&5
19276   (eval $ac_try) 2>&5
19277   ac_status=$?
19278   echo "$as_me:19278: \$? = $ac_status" >&5
19279   (exit "$ac_status"); }; }; then
19280   ac_cv_lib_bsd_gettimeofday=yes
19281 else
19282   echo "$as_me: failed program was:" >&5
19283 cat "conftest.$ac_ext" >&5
19284 ac_cv_lib_bsd_gettimeofday=no
19285 fi
19286 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19287 LIBS=$ac_check_lib_save_LIBS
19288 fi
19289 echo "$as_me:19289: result: $ac_cv_lib_bsd_gettimeofday" >&5
19290 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
19291 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
19292
19293 cat >>confdefs.h <<\EOF
19294 #define HAVE_GETTIMEOFDAY 1
19295 EOF
19296
19297 cf_add_libs="$LIBS"
19298 # reverse order
19299 cf_add_0lib=
19300 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19301 # filter duplicates
19302 for cf_add_1lib in $cf_add_0lib; do
19303         for cf_add_2lib in $cf_add_libs; do
19304                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19305                         cf_add_1lib=
19306                         break
19307                 fi
19308         done
19309         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19310 done
19311 LIBS="$cf_add_libs"
19312
19313 fi
19314
19315 fi
19316         ;;
19317 esac
19318
19319 echo "$as_me:19319: checking if -lm needed for math functions" >&5
19320 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
19321 if test "${cf_cv_need_libm+set}" = set; then
19322   echo $ECHO_N "(cached) $ECHO_C" >&6
19323 else
19324
19325         cat >"conftest.$ac_ext" <<_ACEOF
19326 #line 19326 "configure"
19327 #include "confdefs.h"
19328
19329                 #include <stdio.h>
19330                 #include <stdlib.h>
19331                 #include <math.h>
19332
19333 int
19334 main (void)
19335 {
19336 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19337   ;
19338   return 0;
19339 }
19340 _ACEOF
19341 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19342 if { (eval echo "$as_me:19342: \"$ac_link\"") >&5
19343   (eval $ac_link) 2>&5
19344   ac_status=$?
19345   echo "$as_me:19345: \$? = $ac_status" >&5
19346   (exit "$ac_status"); } &&
19347          { ac_try='test -s "conftest$ac_exeext"'
19348   { (eval echo "$as_me:19348: \"$ac_try\"") >&5
19349   (eval $ac_try) 2>&5
19350   ac_status=$?
19351   echo "$as_me:19351: \$? = $ac_status" >&5
19352   (exit "$ac_status"); }; }; then
19353   cf_cv_need_libm=no
19354 else
19355   echo "$as_me: failed program was:" >&5
19356 cat "conftest.$ac_ext" >&5
19357 cf_cv_need_libm=yes
19358 fi
19359 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19360 fi
19361 echo "$as_me:19361: result: $cf_cv_need_libm" >&5
19362 echo "${ECHO_T}$cf_cv_need_libm" >&6
19363
19364 if test "$cf_cv_need_libm" = yes
19365 then
19366
19367         cf_save_LIBS="$LIBS"
19368         LIBS="$LIBS -lm"
19369         echo "$as_me:19369: checking if -lm is available for math functions" >&5
19370 echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6
19371 if test "${cf_cv_have_libm+set}" = set; then
19372   echo $ECHO_N "(cached) $ECHO_C" >&6
19373 else
19374
19375         cat >"conftest.$ac_ext" <<_ACEOF
19376 #line 19376 "configure"
19377 #include "confdefs.h"
19378
19379                 #include <stdio.h>
19380                 #include <stdlib.h>
19381                 #include <math.h>
19382
19383 int
19384 main (void)
19385 {
19386 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19387   ;
19388   return 0;
19389 }
19390 _ACEOF
19391 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19392 if { (eval echo "$as_me:19392: \"$ac_link\"") >&5
19393   (eval $ac_link) 2>&5
19394   ac_status=$?
19395   echo "$as_me:19395: \$? = $ac_status" >&5
19396   (exit "$ac_status"); } &&
19397          { ac_try='test -s "conftest$ac_exeext"'
19398   { (eval echo "$as_me:19398: \"$ac_try\"") >&5
19399   (eval $ac_try) 2>&5
19400   ac_status=$?
19401   echo "$as_me:19401: \$? = $ac_status" >&5
19402   (exit "$ac_status"); }; }; then
19403   cf_cv_have_libm=yes
19404 else
19405   echo "$as_me: failed program was:" >&5
19406 cat "conftest.$ac_ext" >&5
19407 cf_cv_have_libm=no
19408 fi
19409 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19410 fi
19411 echo "$as_me:19411: result: $cf_cv_have_libm" >&5
19412 echo "${ECHO_T}$cf_cv_have_libm" >&6
19413         LIBS="$cf_save_LIBS"
19414
19415         if test "$cf_cv_have_libm" = yes
19416         then
19417                 MATH_LIB=-lm
19418         fi
19419 else
19420         cf_cv_have_libm=yes
19421 fi
19422
19423 if test "$cf_cv_have_libm" = yes
19424 then
19425
19426 cat >>confdefs.h <<\EOF
19427 #define HAVE_MATH_FUNCS 1
19428 EOF
19429
19430 fi
19431
19432 ###     Checks for header files.
19433 echo "$as_me:19433: checking whether time.h and sys/time.h may both be included" >&5
19434 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
19435 if test "${ac_cv_header_time+set}" = set; then
19436   echo $ECHO_N "(cached) $ECHO_C" >&6
19437 else
19438   cat >"conftest.$ac_ext" <<_ACEOF
19439 #line 19439 "configure"
19440 #include "confdefs.h"
19441 #include <sys/types.h>
19442 #include <sys/time.h>
19443 #include <time.h>
19444
19445 int
19446 main (void)
19447 {
19448 if ((struct tm *) 0)
19449 return 0;
19450   ;
19451   return 0;
19452 }
19453 _ACEOF
19454 rm -f "conftest.$ac_objext"
19455 if { (eval echo "$as_me:19455: \"$ac_compile\"") >&5
19456   (eval $ac_compile) 2>&5
19457   ac_status=$?
19458   echo "$as_me:19458: \$? = $ac_status" >&5
19459   (exit "$ac_status"); } &&
19460          { ac_try='test -s "conftest.$ac_objext"'
19461   { (eval echo "$as_me:19461: \"$ac_try\"") >&5
19462   (eval $ac_try) 2>&5
19463   ac_status=$?
19464   echo "$as_me:19464: \$? = $ac_status" >&5
19465   (exit "$ac_status"); }; }; then
19466   ac_cv_header_time=yes
19467 else
19468   echo "$as_me: failed program was:" >&5
19469 cat "conftest.$ac_ext" >&5
19470 ac_cv_header_time=no
19471 fi
19472 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19473 fi
19474 echo "$as_me:19474: result: $ac_cv_header_time" >&5
19475 echo "${ECHO_T}$ac_cv_header_time" >&6
19476 if test $ac_cv_header_time = yes; then
19477
19478 cat >>confdefs.h <<\EOF
19479 #define TIME_WITH_SYS_TIME 1
19480 EOF
19481
19482 fi
19483
19484 cf_regex_func=no
19485 cf_regex_libs=
19486 case "$host_os" in
19487 (mingw*)
19488         # -lsystre -ltre -lintl -liconv
19489         echo "$as_me:19489: checking for regcomp in -lsystre" >&5
19490 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19491 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
19492   echo $ECHO_N "(cached) $ECHO_C" >&6
19493 else
19494   ac_check_lib_save_LIBS=$LIBS
19495 LIBS="-lsystre  $LIBS"
19496 cat >"conftest.$ac_ext" <<_ACEOF
19497 #line 19497 "configure"
19498 #include "confdefs.h"
19499
19500 /* Override any gcc2 internal prototype to avoid an error.  */
19501 #ifdef __cplusplus
19502 extern "C"
19503 #endif
19504 /* We use char because int might match the return type of a gcc2
19505    builtin and then its argument prototype would still apply.  */
19506 char regcomp ();
19507 int
19508 main (void)
19509 {
19510 regcomp ();
19511   ;
19512   return 0;
19513 }
19514 _ACEOF
19515 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19516 if { (eval echo "$as_me:19516: \"$ac_link\"") >&5
19517   (eval $ac_link) 2>&5
19518   ac_status=$?
19519   echo "$as_me:19519: \$? = $ac_status" >&5
19520   (exit "$ac_status"); } &&
19521          { ac_try='test -s "conftest$ac_exeext"'
19522   { (eval echo "$as_me:19522: \"$ac_try\"") >&5
19523   (eval $ac_try) 2>&5
19524   ac_status=$?
19525   echo "$as_me:19525: \$? = $ac_status" >&5
19526   (exit "$ac_status"); }; }; then
19527   ac_cv_lib_systre_regcomp=yes
19528 else
19529   echo "$as_me: failed program was:" >&5
19530 cat "conftest.$ac_ext" >&5
19531 ac_cv_lib_systre_regcomp=no
19532 fi
19533 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19534 LIBS=$ac_check_lib_save_LIBS
19535 fi
19536 echo "$as_me:19536: result: $ac_cv_lib_systre_regcomp" >&5
19537 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19538 if test "$ac_cv_lib_systre_regcomp" = yes; then
19539
19540                 echo "$as_me:19540: checking for libiconv_open in -liconv" >&5
19541 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19542 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19543   echo $ECHO_N "(cached) $ECHO_C" >&6
19544 else
19545   ac_check_lib_save_LIBS=$LIBS
19546 LIBS="-liconv  $LIBS"
19547 cat >"conftest.$ac_ext" <<_ACEOF
19548 #line 19548 "configure"
19549 #include "confdefs.h"
19550
19551 /* Override any gcc2 internal prototype to avoid an error.  */
19552 #ifdef __cplusplus
19553 extern "C"
19554 #endif
19555 /* We use char because int might match the return type of a gcc2
19556    builtin and then its argument prototype would still apply.  */
19557 char libiconv_open ();
19558 int
19559 main (void)
19560 {
19561 libiconv_open ();
19562   ;
19563   return 0;
19564 }
19565 _ACEOF
19566 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19567 if { (eval echo "$as_me:19567: \"$ac_link\"") >&5
19568   (eval $ac_link) 2>&5
19569   ac_status=$?
19570   echo "$as_me:19570: \$? = $ac_status" >&5
19571   (exit "$ac_status"); } &&
19572          { ac_try='test -s "conftest$ac_exeext"'
19573   { (eval echo "$as_me:19573: \"$ac_try\"") >&5
19574   (eval $ac_try) 2>&5
19575   ac_status=$?
19576   echo "$as_me:19576: \$? = $ac_status" >&5
19577   (exit "$ac_status"); }; }; then
19578   ac_cv_lib_iconv_libiconv_open=yes
19579 else
19580   echo "$as_me: failed program was:" >&5
19581 cat "conftest.$ac_ext" >&5
19582 ac_cv_lib_iconv_libiconv_open=no
19583 fi
19584 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19585 LIBS=$ac_check_lib_save_LIBS
19586 fi
19587 echo "$as_me:19587: result: $ac_cv_lib_iconv_libiconv_open" >&5
19588 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19589 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19590
19591 cf_add_libs="$LIBS"
19592 # reverse order
19593 cf_add_0lib=
19594 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19595 # filter duplicates
19596 for cf_add_1lib in $cf_add_0lib; do
19597         for cf_add_2lib in $cf_add_libs; do
19598                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19599                         cf_add_1lib=
19600                         break
19601                 fi
19602         done
19603         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19604 done
19605 LIBS="$cf_add_libs"
19606
19607 fi
19608
19609                 echo "$as_me:19609: checking for libintl_gettext in -lintl" >&5
19610 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19611 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19612   echo $ECHO_N "(cached) $ECHO_C" >&6
19613 else
19614   ac_check_lib_save_LIBS=$LIBS
19615 LIBS="-lintl  $LIBS"
19616 cat >"conftest.$ac_ext" <<_ACEOF
19617 #line 19617 "configure"
19618 #include "confdefs.h"
19619
19620 /* Override any gcc2 internal prototype to avoid an error.  */
19621 #ifdef __cplusplus
19622 extern "C"
19623 #endif
19624 /* We use char because int might match the return type of a gcc2
19625    builtin and then its argument prototype would still apply.  */
19626 char libintl_gettext ();
19627 int
19628 main (void)
19629 {
19630 libintl_gettext ();
19631   ;
19632   return 0;
19633 }
19634 _ACEOF
19635 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19636 if { (eval echo "$as_me:19636: \"$ac_link\"") >&5
19637   (eval $ac_link) 2>&5
19638   ac_status=$?
19639   echo "$as_me:19639: \$? = $ac_status" >&5
19640   (exit "$ac_status"); } &&
19641          { ac_try='test -s "conftest$ac_exeext"'
19642   { (eval echo "$as_me:19642: \"$ac_try\"") >&5
19643   (eval $ac_try) 2>&5
19644   ac_status=$?
19645   echo "$as_me:19645: \$? = $ac_status" >&5
19646   (exit "$ac_status"); }; }; then
19647   ac_cv_lib_intl_libintl_gettext=yes
19648 else
19649   echo "$as_me: failed program was:" >&5
19650 cat "conftest.$ac_ext" >&5
19651 ac_cv_lib_intl_libintl_gettext=no
19652 fi
19653 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19654 LIBS=$ac_check_lib_save_LIBS
19655 fi
19656 echo "$as_me:19656: result: $ac_cv_lib_intl_libintl_gettext" >&5
19657 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19658 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19659
19660 cf_add_libs="$LIBS"
19661 # reverse order
19662 cf_add_0lib=
19663 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19664 # filter duplicates
19665 for cf_add_1lib in $cf_add_0lib; do
19666         for cf_add_2lib in $cf_add_libs; do
19667                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19668                         cf_add_1lib=
19669                         break
19670                 fi
19671         done
19672         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19673 done
19674 LIBS="$cf_add_libs"
19675
19676 fi
19677
19678                 echo "$as_me:19678: checking for tre_regcomp in -ltre" >&5
19679 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19680 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19681   echo $ECHO_N "(cached) $ECHO_C" >&6
19682 else
19683   ac_check_lib_save_LIBS=$LIBS
19684 LIBS="-ltre  $LIBS"
19685 cat >"conftest.$ac_ext" <<_ACEOF
19686 #line 19686 "configure"
19687 #include "confdefs.h"
19688
19689 /* Override any gcc2 internal prototype to avoid an error.  */
19690 #ifdef __cplusplus
19691 extern "C"
19692 #endif
19693 /* We use char because int might match the return type of a gcc2
19694    builtin and then its argument prototype would still apply.  */
19695 char tre_regcomp ();
19696 int
19697 main (void)
19698 {
19699 tre_regcomp ();
19700   ;
19701   return 0;
19702 }
19703 _ACEOF
19704 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19705 if { (eval echo "$as_me:19705: \"$ac_link\"") >&5
19706   (eval $ac_link) 2>&5
19707   ac_status=$?
19708   echo "$as_me:19708: \$? = $ac_status" >&5
19709   (exit "$ac_status"); } &&
19710          { ac_try='test -s "conftest$ac_exeext"'
19711   { (eval echo "$as_me:19711: \"$ac_try\"") >&5
19712   (eval $ac_try) 2>&5
19713   ac_status=$?
19714   echo "$as_me:19714: \$? = $ac_status" >&5
19715   (exit "$ac_status"); }; }; then
19716   ac_cv_lib_tre_tre_regcomp=yes
19717 else
19718   echo "$as_me: failed program was:" >&5
19719 cat "conftest.$ac_ext" >&5
19720 ac_cv_lib_tre_tre_regcomp=no
19721 fi
19722 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19723 LIBS=$ac_check_lib_save_LIBS
19724 fi
19725 echo "$as_me:19725: result: $ac_cv_lib_tre_tre_regcomp" >&5
19726 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19727 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19728
19729 cf_add_libs="$LIBS"
19730 # reverse order
19731 cf_add_0lib=
19732 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19733 # filter duplicates
19734 for cf_add_1lib in $cf_add_0lib; do
19735         for cf_add_2lib in $cf_add_libs; do
19736                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19737                         cf_add_1lib=
19738                         break
19739                 fi
19740         done
19741         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19742 done
19743 LIBS="$cf_add_libs"
19744
19745 fi
19746
19747 cf_add_libs="$LIBS"
19748 # reverse order
19749 cf_add_0lib=
19750 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19751 # filter duplicates
19752 for cf_add_1lib in $cf_add_0lib; do
19753         for cf_add_2lib in $cf_add_libs; do
19754                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19755                         cf_add_1lib=
19756                         break
19757                 fi
19758         done
19759         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19760 done
19761 LIBS="$cf_add_libs"
19762
19763                 cf_regex_func=regcomp
19764
19765 else
19766
19767                 echo "$as_me:19767: checking for regcomp in -lgnurx" >&5
19768 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19769 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19770   echo $ECHO_N "(cached) $ECHO_C" >&6
19771 else
19772   ac_check_lib_save_LIBS=$LIBS
19773 LIBS="-lgnurx  $LIBS"
19774 cat >"conftest.$ac_ext" <<_ACEOF
19775 #line 19775 "configure"
19776 #include "confdefs.h"
19777
19778 /* Override any gcc2 internal prototype to avoid an error.  */
19779 #ifdef __cplusplus
19780 extern "C"
19781 #endif
19782 /* We use char because int might match the return type of a gcc2
19783    builtin and then its argument prototype would still apply.  */
19784 char regcomp ();
19785 int
19786 main (void)
19787 {
19788 regcomp ();
19789   ;
19790   return 0;
19791 }
19792 _ACEOF
19793 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19794 if { (eval echo "$as_me:19794: \"$ac_link\"") >&5
19795   (eval $ac_link) 2>&5
19796   ac_status=$?
19797   echo "$as_me:19797: \$? = $ac_status" >&5
19798   (exit "$ac_status"); } &&
19799          { ac_try='test -s "conftest$ac_exeext"'
19800   { (eval echo "$as_me:19800: \"$ac_try\"") >&5
19801   (eval $ac_try) 2>&5
19802   ac_status=$?
19803   echo "$as_me:19803: \$? = $ac_status" >&5
19804   (exit "$ac_status"); }; }; then
19805   ac_cv_lib_gnurx_regcomp=yes
19806 else
19807   echo "$as_me: failed program was:" >&5
19808 cat "conftest.$ac_ext" >&5
19809 ac_cv_lib_gnurx_regcomp=no
19810 fi
19811 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19812 LIBS=$ac_check_lib_save_LIBS
19813 fi
19814 echo "$as_me:19814: result: $ac_cv_lib_gnurx_regcomp" >&5
19815 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19816 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19817
19818 cf_add_libs="$LIBS"
19819 # reverse order
19820 cf_add_0lib=
19821 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19822 # filter duplicates
19823 for cf_add_1lib in $cf_add_0lib; do
19824         for cf_add_2lib in $cf_add_libs; do
19825                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19826                         cf_add_1lib=
19827                         break
19828                 fi
19829         done
19830         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19831 done
19832 LIBS="$cf_add_libs"
19833
19834                         cf_regex_func=regcomp
19835 fi
19836
19837 fi
19838
19839         ;;
19840 (*)
19841         cf_regex_libs="regex re"
19842         echo "$as_me:19842: checking for regcomp" >&5
19843 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19844 if test "${ac_cv_func_regcomp+set}" = set; then
19845   echo $ECHO_N "(cached) $ECHO_C" >&6
19846 else
19847   cat >"conftest.$ac_ext" <<_ACEOF
19848 #line 19848 "configure"
19849 #include "confdefs.h"
19850 #define regcomp autoconf_temporary
19851 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19852 #undef regcomp
19853
19854 #ifdef __cplusplus
19855 extern "C"
19856 #endif
19857
19858 /* We use char because int might match the return type of a gcc2
19859    builtin and then its argument prototype would still apply.  */
19860 char regcomp (void);
19861
19862 int
19863 main (void)
19864 {
19865
19866 /* The GNU C library defines stubs for functions which it implements
19867     to always fail with ENOSYS.  Some functions are actually named
19868     something starting with __ and the normal name is an alias.  */
19869 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19870 #error found stub for regcomp
19871 #endif
19872
19873         return regcomp ();
19874   ;
19875   return 0;
19876 }
19877 _ACEOF
19878 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19879 if { (eval echo "$as_me:19879: \"$ac_link\"") >&5
19880   (eval $ac_link) 2>&5
19881   ac_status=$?
19882   echo "$as_me:19882: \$? = $ac_status" >&5
19883   (exit "$ac_status"); } &&
19884          { ac_try='test -s "conftest$ac_exeext"'
19885   { (eval echo "$as_me:19885: \"$ac_try\"") >&5
19886   (eval $ac_try) 2>&5
19887   ac_status=$?
19888   echo "$as_me:19888: \$? = $ac_status" >&5
19889   (exit "$ac_status"); }; }; then
19890   ac_cv_func_regcomp=yes
19891 else
19892   echo "$as_me: failed program was:" >&5
19893 cat "conftest.$ac_ext" >&5
19894 ac_cv_func_regcomp=no
19895 fi
19896 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19897 fi
19898 echo "$as_me:19898: result: $ac_cv_func_regcomp" >&5
19899 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19900 if test "$ac_cv_func_regcomp" = yes; then
19901   cf_regex_func=regcomp
19902 else
19903
19904                 for cf_regex_lib in $cf_regex_libs
19905                 do
19906                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19907 echo "$as_me:19907: checking for regcomp in -l$cf_regex_lib" >&5
19908 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19909 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19910   echo $ECHO_N "(cached) $ECHO_C" >&6
19911 else
19912   ac_check_lib_save_LIBS=$LIBS
19913 LIBS="-l$cf_regex_lib  $LIBS"
19914 cat >"conftest.$ac_ext" <<_ACEOF
19915 #line 19915 "configure"
19916 #include "confdefs.h"
19917
19918 /* Override any gcc2 internal prototype to avoid an error.  */
19919 #ifdef __cplusplus
19920 extern "C"
19921 #endif
19922 /* We use char because int might match the return type of a gcc2
19923    builtin and then its argument prototype would still apply.  */
19924 char regcomp ();
19925 int
19926 main (void)
19927 {
19928 regcomp ();
19929   ;
19930   return 0;
19931 }
19932 _ACEOF
19933 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19934 if { (eval echo "$as_me:19934: \"$ac_link\"") >&5
19935   (eval $ac_link) 2>&5
19936   ac_status=$?
19937   echo "$as_me:19937: \$? = $ac_status" >&5
19938   (exit "$ac_status"); } &&
19939          { ac_try='test -s "conftest$ac_exeext"'
19940   { (eval echo "$as_me:19940: \"$ac_try\"") >&5
19941   (eval $ac_try) 2>&5
19942   ac_status=$?
19943   echo "$as_me:19943: \$? = $ac_status" >&5
19944   (exit "$ac_status"); }; }; then
19945   eval "$as_ac_Lib=yes"
19946 else
19947   echo "$as_me: failed program was:" >&5
19948 cat "conftest.$ac_ext" >&5
19949 eval "$as_ac_Lib=no"
19950 fi
19951 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19952 LIBS=$ac_check_lib_save_LIBS
19953 fi
19954 echo "$as_me:19954: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19955 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19956 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19957
19958 cf_add_libs="$LIBS"
19959 # reverse order
19960 cf_add_0lib=
19961 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19962 # filter duplicates
19963 for cf_add_1lib in $cf_add_0lib; do
19964         for cf_add_2lib in $cf_add_libs; do
19965                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19966                         cf_add_1lib=
19967                         break
19968                 fi
19969         done
19970         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19971 done
19972 LIBS="$cf_add_libs"
19973
19974                                         cf_regex_func=regcomp
19975                                         break
19976 fi
19977
19978                 done
19979
19980 fi
19981
19982         ;;
19983 esac
19984
19985 if test "$cf_regex_func" = no ; then
19986         echo "$as_me:19986: checking for compile" >&5
19987 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19988 if test "${ac_cv_func_compile+set}" = set; then
19989   echo $ECHO_N "(cached) $ECHO_C" >&6
19990 else
19991   cat >"conftest.$ac_ext" <<_ACEOF
19992 #line 19992 "configure"
19993 #include "confdefs.h"
19994 #define compile autoconf_temporary
19995 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19996 #undef compile
19997
19998 #ifdef __cplusplus
19999 extern "C"
20000 #endif
20001
20002 /* We use char because int might match the return type of a gcc2
20003    builtin and then its argument prototype would still apply.  */
20004 char compile (void);
20005
20006 int
20007 main (void)
20008 {
20009
20010 /* The GNU C library defines stubs for functions which it implements
20011     to always fail with ENOSYS.  Some functions are actually named
20012     something starting with __ and the normal name is an alias.  */
20013 #if defined (__stub_compile) || defined (__stub___compile)
20014 #error found stub for compile
20015 #endif
20016
20017         return compile ();
20018   ;
20019   return 0;
20020 }
20021 _ACEOF
20022 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20023 if { (eval echo "$as_me:20023: \"$ac_link\"") >&5
20024   (eval $ac_link) 2>&5
20025   ac_status=$?
20026   echo "$as_me:20026: \$? = $ac_status" >&5
20027   (exit "$ac_status"); } &&
20028          { ac_try='test -s "conftest$ac_exeext"'
20029   { (eval echo "$as_me:20029: \"$ac_try\"") >&5
20030   (eval $ac_try) 2>&5
20031   ac_status=$?
20032   echo "$as_me:20032: \$? = $ac_status" >&5
20033   (exit "$ac_status"); }; }; then
20034   ac_cv_func_compile=yes
20035 else
20036   echo "$as_me: failed program was:" >&5
20037 cat "conftest.$ac_ext" >&5
20038 ac_cv_func_compile=no
20039 fi
20040 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20041 fi
20042 echo "$as_me:20042: result: $ac_cv_func_compile" >&5
20043 echo "${ECHO_T}$ac_cv_func_compile" >&6
20044 if test "$ac_cv_func_compile" = yes; then
20045   cf_regex_func=compile
20046 else
20047
20048                 echo "$as_me:20048: checking for compile in -lgen" >&5
20049 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
20050 if test "${ac_cv_lib_gen_compile+set}" = set; then
20051   echo $ECHO_N "(cached) $ECHO_C" >&6
20052 else
20053   ac_check_lib_save_LIBS=$LIBS
20054 LIBS="-lgen  $LIBS"
20055 cat >"conftest.$ac_ext" <<_ACEOF
20056 #line 20056 "configure"
20057 #include "confdefs.h"
20058
20059 /* Override any gcc2 internal prototype to avoid an error.  */
20060 #ifdef __cplusplus
20061 extern "C"
20062 #endif
20063 /* We use char because int might match the return type of a gcc2
20064    builtin and then its argument prototype would still apply.  */
20065 char compile ();
20066 int
20067 main (void)
20068 {
20069 compile ();
20070   ;
20071   return 0;
20072 }
20073 _ACEOF
20074 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20075 if { (eval echo "$as_me:20075: \"$ac_link\"") >&5
20076   (eval $ac_link) 2>&5
20077   ac_status=$?
20078   echo "$as_me:20078: \$? = $ac_status" >&5
20079   (exit "$ac_status"); } &&
20080          { ac_try='test -s "conftest$ac_exeext"'
20081   { (eval echo "$as_me:20081: \"$ac_try\"") >&5
20082   (eval $ac_try) 2>&5
20083   ac_status=$?
20084   echo "$as_me:20084: \$? = $ac_status" >&5
20085   (exit "$ac_status"); }; }; then
20086   ac_cv_lib_gen_compile=yes
20087 else
20088   echo "$as_me: failed program was:" >&5
20089 cat "conftest.$ac_ext" >&5
20090 ac_cv_lib_gen_compile=no
20091 fi
20092 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20093 LIBS=$ac_check_lib_save_LIBS
20094 fi
20095 echo "$as_me:20095: result: $ac_cv_lib_gen_compile" >&5
20096 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
20097 if test "$ac_cv_lib_gen_compile" = yes; then
20098
20099 cf_add_libs="$LIBS"
20100 # reverse order
20101 cf_add_0lib=
20102 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20103 # filter duplicates
20104 for cf_add_1lib in $cf_add_0lib; do
20105         for cf_add_2lib in $cf_add_libs; do
20106                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20107                         cf_add_1lib=
20108                         break
20109                 fi
20110         done
20111         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20112 done
20113 LIBS="$cf_add_libs"
20114
20115                                 cf_regex_func=compile
20116 fi
20117
20118 fi
20119
20120 fi
20121
20122 if test "$cf_regex_func" = no ; then
20123         { echo "$as_me:20123: WARNING: cannot find regular expression library" >&5
20124 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
20125 fi
20126
20127 echo "$as_me:20127: checking for regular-expression headers" >&5
20128 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
20129 if test "${cf_cv_regex_hdrs+set}" = set; then
20130   echo $ECHO_N "(cached) $ECHO_C" >&6
20131 else
20132
20133 cf_cv_regex_hdrs=no
20134 case "$cf_regex_func" in
20135 (compile)
20136         for cf_regex_hdr in regexp.h regexpr.h
20137         do
20138                 cat >"conftest.$ac_ext" <<_ACEOF
20139 #line 20139 "configure"
20140 #include "confdefs.h"
20141 #include <$cf_regex_hdr>
20142 int
20143 main (void)
20144 {
20145
20146                         char *p = compile("", "", "", 0);
20147                         int x = step("", "");
20148                         (void)p;
20149                         (void)x;
20150
20151   ;
20152   return 0;
20153 }
20154 _ACEOF
20155 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20156 if { (eval echo "$as_me:20156: \"$ac_link\"") >&5
20157   (eval $ac_link) 2>&5
20158   ac_status=$?
20159   echo "$as_me:20159: \$? = $ac_status" >&5
20160   (exit "$ac_status"); } &&
20161          { ac_try='test -s "conftest$ac_exeext"'
20162   { (eval echo "$as_me:20162: \"$ac_try\"") >&5
20163   (eval $ac_try) 2>&5
20164   ac_status=$?
20165   echo "$as_me:20165: \$? = $ac_status" >&5
20166   (exit "$ac_status"); }; }; then
20167
20168                         cf_cv_regex_hdrs=$cf_regex_hdr
20169                         break
20170
20171 else
20172   echo "$as_me: failed program was:" >&5
20173 cat "conftest.$ac_ext" >&5
20174 fi
20175 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20176         done
20177         ;;
20178 (*)
20179         for cf_regex_hdr in regex.h
20180         do
20181                 cat >"conftest.$ac_ext" <<_ACEOF
20182 #line 20182 "configure"
20183 #include "confdefs.h"
20184 #include <sys/types.h>
20185 #include <$cf_regex_hdr>
20186 int
20187 main (void)
20188 {
20189
20190                         regex_t *p = 0;
20191                         int x = regcomp(p, "", 0);
20192                         int y = regexec(p, "", 0, 0, 0);
20193                         (void)x;
20194                         (void)y;
20195                         regfree(p);
20196
20197   ;
20198   return 0;
20199 }
20200 _ACEOF
20201 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20202 if { (eval echo "$as_me:20202: \"$ac_link\"") >&5
20203   (eval $ac_link) 2>&5
20204   ac_status=$?
20205   echo "$as_me:20205: \$? = $ac_status" >&5
20206   (exit "$ac_status"); } &&
20207          { ac_try='test -s "conftest$ac_exeext"'
20208   { (eval echo "$as_me:20208: \"$ac_try\"") >&5
20209   (eval $ac_try) 2>&5
20210   ac_status=$?
20211   echo "$as_me:20211: \$? = $ac_status" >&5
20212   (exit "$ac_status"); }; }; then
20213
20214                         cf_cv_regex_hdrs=$cf_regex_hdr
20215                         break
20216
20217 else
20218   echo "$as_me: failed program was:" >&5
20219 cat "conftest.$ac_ext" >&5
20220 fi
20221 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20222         done
20223         ;;
20224 esac
20225
20226 fi
20227 echo "$as_me:20227: result: $cf_cv_regex_hdrs" >&5
20228 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
20229
20230 case "$cf_cv_regex_hdrs" in
20231         (no)            { echo "$as_me:20231: WARNING: no regular expression header found" >&5
20232 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
20233         (regex.h)
20234 cat >>confdefs.h <<\EOF
20235 #define HAVE_REGEX_H_FUNCS 1
20236 EOF
20237  ;;
20238         (regexp.h)
20239 cat >>confdefs.h <<\EOF
20240 #define HAVE_REGEXP_H_FUNCS 1
20241 EOF
20242  ;;
20243         (regexpr.h)
20244 cat >>confdefs.h <<\EOF
20245 #define HAVE_REGEXPR_H_FUNCS 1
20246 EOF
20247  ;;
20248 esac
20249
20250 for ac_header in \
20251 fcntl.h \
20252 getopt.h \
20253 limits.h \
20254 locale.h \
20255 math.h \
20256 poll.h \
20257 sys/ioctl.h \
20258 sys/param.h \
20259 sys/poll.h \
20260 sys/select.h \
20261 sys/time.h \
20262 sys/times.h \
20263 unistd.h \
20264 wctype.h \
20265
20266 do
20267 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20268 echo "$as_me:20268: checking for $ac_header" >&5
20269 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20270 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20271   echo $ECHO_N "(cached) $ECHO_C" >&6
20272 else
20273   cat >"conftest.$ac_ext" <<_ACEOF
20274 #line 20274 "configure"
20275 #include "confdefs.h"
20276 #include <$ac_header>
20277 _ACEOF
20278 if { (eval echo "$as_me:20278: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20279   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20280   ac_status=$?
20281   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20282   rm -f conftest.er1
20283   cat conftest.err >&5
20284   echo "$as_me:20284: \$? = $ac_status" >&5
20285   (exit "$ac_status"); } >/dev/null; then
20286   if test -s conftest.err; then
20287     ac_cpp_err=$ac_c_preproc_warn_flag
20288   else
20289     ac_cpp_err=
20290   fi
20291 else
20292   ac_cpp_err=yes
20293 fi
20294 if test -z "$ac_cpp_err"; then
20295   eval "$as_ac_Header=yes"
20296 else
20297   echo "$as_me: failed program was:" >&5
20298   cat "conftest.$ac_ext" >&5
20299   eval "$as_ac_Header=no"
20300 fi
20301 rm -f conftest.err "conftest.$ac_ext"
20302 fi
20303 echo "$as_me:20303: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20304 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20305 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20306   cat >>confdefs.h <<EOF
20307 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20308 EOF
20309
20310 fi
20311 done
20312
20313 for ac_header in unistd.h getopt.h
20314 do
20315 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20316 echo "$as_me:20316: checking for $ac_header" >&5
20317 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20318 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20319   echo $ECHO_N "(cached) $ECHO_C" >&6
20320 else
20321   cat >"conftest.$ac_ext" <<_ACEOF
20322 #line 20322 "configure"
20323 #include "confdefs.h"
20324 #include <$ac_header>
20325 _ACEOF
20326 if { (eval echo "$as_me:20326: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20327   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20328   ac_status=$?
20329   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20330   rm -f conftest.er1
20331   cat conftest.err >&5
20332   echo "$as_me:20332: \$? = $ac_status" >&5
20333   (exit "$ac_status"); } >/dev/null; then
20334   if test -s conftest.err; then
20335     ac_cpp_err=$ac_c_preproc_warn_flag
20336   else
20337     ac_cpp_err=
20338   fi
20339 else
20340   ac_cpp_err=yes
20341 fi
20342 if test -z "$ac_cpp_err"; then
20343   eval "$as_ac_Header=yes"
20344 else
20345   echo "$as_me: failed program was:" >&5
20346   cat "conftest.$ac_ext" >&5
20347   eval "$as_ac_Header=no"
20348 fi
20349 rm -f conftest.err "conftest.$ac_ext"
20350 fi
20351 echo "$as_me:20351: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20352 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20353 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20354   cat >>confdefs.h <<EOF
20355 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20356 EOF
20357
20358 fi
20359 done
20360
20361 echo "$as_me:20361: checking for header declaring getopt variables" >&5
20362 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
20363 if test "${cf_cv_getopt_header+set}" = set; then
20364   echo $ECHO_N "(cached) $ECHO_C" >&6
20365 else
20366
20367 cf_cv_getopt_header=none
20368 for cf_header in stdio.h stdlib.h unistd.h getopt.h
20369 do
20370 cat >"conftest.$ac_ext" <<_ACEOF
20371 #line 20371 "configure"
20372 #include "confdefs.h"
20373
20374 #include <$cf_header>
20375 int
20376 main (void)
20377 {
20378 int x = optind; char *y = optarg; (void)x; (void)y
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_getopt_header=$cf_header
20396  break
20397 else
20398   echo "$as_me: failed program was:" >&5
20399 cat "conftest.$ac_ext" >&5
20400 fi
20401 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20402 done
20403
20404 fi
20405 echo "$as_me:20405: result: $cf_cv_getopt_header" >&5
20406 echo "${ECHO_T}$cf_cv_getopt_header" >&6
20407 if test "$cf_cv_getopt_header" != none ; then
20408
20409 cat >>confdefs.h <<\EOF
20410 #define HAVE_GETOPT_HEADER 1
20411 EOF
20412
20413 fi
20414 if test "$cf_cv_getopt_header" = getopt.h ; then
20415
20416 cat >>confdefs.h <<\EOF
20417 #define NEED_GETOPT_H 1
20418 EOF
20419
20420 fi
20421
20422 echo "$as_me:20422: checking if external environ is declared" >&5
20423 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
20424 if test "${cf_cv_dcl_environ+set}" = set; then
20425   echo $ECHO_N "(cached) $ECHO_C" >&6
20426 else
20427
20428     cat >"conftest.$ac_ext" <<_ACEOF
20429 #line 20429 "configure"
20430 #include "confdefs.h"
20431
20432 #ifdef HAVE_STDLIB_H
20433 #include <stdlib.h>
20434 #endif
20435 #include <unistd.h>
20436 int
20437 main (void)
20438 {
20439 void* x = (void*) environ; (void)x
20440   ;
20441   return 0;
20442 }
20443 _ACEOF
20444 rm -f "conftest.$ac_objext"
20445 if { (eval echo "$as_me:20445: \"$ac_compile\"") >&5
20446   (eval $ac_compile) 2>&5
20447   ac_status=$?
20448   echo "$as_me:20448: \$? = $ac_status" >&5
20449   (exit "$ac_status"); } &&
20450          { ac_try='test -s "conftest.$ac_objext"'
20451   { (eval echo "$as_me:20451: \"$ac_try\"") >&5
20452   (eval $ac_try) 2>&5
20453   ac_status=$?
20454   echo "$as_me:20454: \$? = $ac_status" >&5
20455   (exit "$ac_status"); }; }; then
20456   cf_cv_dcl_environ=yes
20457 else
20458   echo "$as_me: failed program was:" >&5
20459 cat "conftest.$ac_ext" >&5
20460 cf_cv_dcl_environ=no
20461 fi
20462 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20463
20464 fi
20465 echo "$as_me:20465: result: $cf_cv_dcl_environ" >&5
20466 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20467
20468 if test "$cf_cv_dcl_environ" = no ; then
20469
20470 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20471
20472     cat >>confdefs.h <<EOF
20473 #define $cf_result 1
20474 EOF
20475
20476 fi
20477
20478 # It's possible (for near-UNIX clones) that the data doesn't exist
20479
20480 echo "$as_me:20480: checking if external environ exists" >&5
20481 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20482 if test "${cf_cv_have_environ+set}" = set; then
20483   echo $ECHO_N "(cached) $ECHO_C" >&6
20484 else
20485
20486         cat >"conftest.$ac_ext" <<_ACEOF
20487 #line 20487 "configure"
20488 #include "confdefs.h"
20489
20490 #undef environ
20491 extern int environ;
20492
20493 int
20494 main (void)
20495 {
20496 environ = 2
20497   ;
20498   return 0;
20499 }
20500 _ACEOF
20501 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20502 if { (eval echo "$as_me:20502: \"$ac_link\"") >&5
20503   (eval $ac_link) 2>&5
20504   ac_status=$?
20505   echo "$as_me:20505: \$? = $ac_status" >&5
20506   (exit "$ac_status"); } &&
20507          { ac_try='test -s "conftest$ac_exeext"'
20508   { (eval echo "$as_me:20508: \"$ac_try\"") >&5
20509   (eval $ac_try) 2>&5
20510   ac_status=$?
20511   echo "$as_me:20511: \$? = $ac_status" >&5
20512   (exit "$ac_status"); }; }; then
20513   cf_cv_have_environ=yes
20514 else
20515   echo "$as_me: failed program was:" >&5
20516 cat "conftest.$ac_ext" >&5
20517 cf_cv_have_environ=no
20518 fi
20519 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20520
20521 fi
20522 echo "$as_me:20522: result: $cf_cv_have_environ" >&5
20523 echo "${ECHO_T}$cf_cv_have_environ" >&6
20524
20525 if test "$cf_cv_have_environ" = yes ; then
20526
20527 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20528
20529         cat >>confdefs.h <<EOF
20530 #define $cf_result 1
20531 EOF
20532
20533 fi
20534
20535 echo "$as_me:20535: checking for getenv" >&5
20536 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20537 if test "${ac_cv_func_getenv+set}" = set; then
20538   echo $ECHO_N "(cached) $ECHO_C" >&6
20539 else
20540   cat >"conftest.$ac_ext" <<_ACEOF
20541 #line 20541 "configure"
20542 #include "confdefs.h"
20543 #define getenv autoconf_temporary
20544 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20545 #undef getenv
20546
20547 #ifdef __cplusplus
20548 extern "C"
20549 #endif
20550
20551 /* We use char because int might match the return type of a gcc2
20552    builtin and then its argument prototype would still apply.  */
20553 char getenv (void);
20554
20555 int
20556 main (void)
20557 {
20558
20559 /* The GNU C library defines stubs for functions which it implements
20560     to always fail with ENOSYS.  Some functions are actually named
20561     something starting with __ and the normal name is an alias.  */
20562 #if defined (__stub_getenv) || defined (__stub___getenv)
20563 #error found stub for getenv
20564 #endif
20565
20566         return getenv ();
20567   ;
20568   return 0;
20569 }
20570 _ACEOF
20571 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20572 if { (eval echo "$as_me:20572: \"$ac_link\"") >&5
20573   (eval $ac_link) 2>&5
20574   ac_status=$?
20575   echo "$as_me:20575: \$? = $ac_status" >&5
20576   (exit "$ac_status"); } &&
20577          { ac_try='test -s "conftest$ac_exeext"'
20578   { (eval echo "$as_me:20578: \"$ac_try\"") >&5
20579   (eval $ac_try) 2>&5
20580   ac_status=$?
20581   echo "$as_me:20581: \$? = $ac_status" >&5
20582   (exit "$ac_status"); }; }; then
20583   ac_cv_func_getenv=yes
20584 else
20585   echo "$as_me: failed program was:" >&5
20586 cat "conftest.$ac_ext" >&5
20587 ac_cv_func_getenv=no
20588 fi
20589 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20590 fi
20591 echo "$as_me:20591: result: $ac_cv_func_getenv" >&5
20592 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20593
20594 for ac_func in putenv setenv strdup
20595 do
20596 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20597 echo "$as_me:20597: checking for $ac_func" >&5
20598 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20599 if eval "test \"\${$as_ac_var+set}\" = set"; then
20600   echo $ECHO_N "(cached) $ECHO_C" >&6
20601 else
20602   cat >"conftest.$ac_ext" <<_ACEOF
20603 #line 20603 "configure"
20604 #include "confdefs.h"
20605 #define $ac_func autoconf_temporary
20606 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20607 #undef $ac_func
20608
20609 #ifdef __cplusplus
20610 extern "C"
20611 #endif
20612
20613 /* We use char because int might match the return type of a gcc2
20614    builtin and then its argument prototype would still apply.  */
20615 char $ac_func (void);
20616
20617 int
20618 main (void)
20619 {
20620
20621 /* The GNU C library defines stubs for functions which it implements
20622     to always fail with ENOSYS.  Some functions are actually named
20623     something starting with __ and the normal name is an alias.  */
20624 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20625 #error found stub for $ac_func
20626 #endif
20627
20628         return $ac_func ();
20629   ;
20630   return 0;
20631 }
20632 _ACEOF
20633 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20634 if { (eval echo "$as_me:20634: \"$ac_link\"") >&5
20635   (eval $ac_link) 2>&5
20636   ac_status=$?
20637   echo "$as_me:20637: \$? = $ac_status" >&5
20638   (exit "$ac_status"); } &&
20639          { ac_try='test -s "conftest$ac_exeext"'
20640   { (eval echo "$as_me:20640: \"$ac_try\"") >&5
20641   (eval $ac_try) 2>&5
20642   ac_status=$?
20643   echo "$as_me:20643: \$? = $ac_status" >&5
20644   (exit "$ac_status"); }; }; then
20645   eval "$as_ac_var=yes"
20646 else
20647   echo "$as_me: failed program was:" >&5
20648 cat "conftest.$ac_ext" >&5
20649 eval "$as_ac_var=no"
20650 fi
20651 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20652 fi
20653 echo "$as_me:20653: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20654 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20655 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20656   cat >>confdefs.h <<EOF
20657 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20658 EOF
20659
20660 fi
20661 done
20662
20663 echo "$as_me:20663: checking if getenv returns consistent values" >&5
20664 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20665 if test "${cf_cv_consistent_getenv+set}" = set; then
20666   echo $ECHO_N "(cached) $ECHO_C" >&6
20667 else
20668
20669 if test "$cross_compiling" = yes; then
20670   cf_cv_consistent_getenv=unknown
20671 else
20672   cat >"conftest.$ac_ext" <<_ACEOF
20673 #line 20673 "configure"
20674 #include "confdefs.h"
20675
20676 $ac_includes_default
20677
20678 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20679 extern char **environ;  /* POSIX, but some systems are not... */
20680 #endif
20681
20682 #if defined(HAVE_STRDUP)
20683 #define str_alloc(s) strdup(s)
20684 #else
20685 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20686 #endif
20687
20688 static void set_value(const char *name, const char *value)
20689 {
20690 #if defined(HAVE_SETENV)
20691         setenv(name, value, 1);
20692 #elif defined(HAVE_PUTENV)
20693         char buffer[1024];
20694         sprintf(buffer, "%s=%s", name, value);
20695         putenv(str_alloc(buffer));
20696 #else
20697 #error neither putenv/setenv found
20698 #endif
20699 }
20700 int main(void)
20701 {
20702         int pass;
20703         size_t numenv, limit, j;
20704         char **mynames;
20705         char **myvalues;
20706         char **mypointer;
20707         char *equals;
20708         for (numenv = 0; environ[numenv]; ++numenv) ;
20709         limit = numenv + 10;
20710         mynames = (char **) calloc(limit + 1, sizeof(char *));
20711         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20712         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20713 #if defined(HAVE_ENVIRON)
20714         for (j = 0; environ[j]; ++j) {
20715                 mynames[j] = str_alloc(environ[j]);
20716                 equals = strchr(mynames[j], '=');
20717                 if (equals != 0) {
20718                         *equals++ = '\\0';
20719                         myvalues[j] = str_alloc(equals);
20720                 } else {
20721                         myvalues[j] = str_alloc("");
20722                 }
20723         }
20724 #endif
20725         for (j = numenv; j < limit; ++j) {
20726                 char name[80];
20727                 char value[80];
20728                 size_t found;
20729                 size_t k = 0;
20730                 do {
20731                         size_t jk;
20732                         found = 0;
20733                         sprintf(name, "TERM%lu", (unsigned long) k);
20734                         for (jk = 0; jk < j; ++jk) {
20735                                 if (!strcmp(name, mynames[jk])) {
20736                                         found = 1;
20737                                         ++k;
20738                                         break;
20739                                 }
20740                         }
20741                 } while (found);
20742                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20743                 set_value(name, value);
20744                 mynames[j] = str_alloc(name);
20745                 myvalues[j] = str_alloc(value);
20746         }
20747         for (pass = 0; pass < 3; ++pass) {
20748                 for (j = 0; j < limit; ++j) {
20749                         char *value = getenv(mynames[j]);
20750                         if (pass) {
20751                                 if (value == 0) {
20752                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20753                                         ${cf_cv_main_return:-return}(1);
20754                                 } else if (value != mypointer[j]) {
20755                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20756                                         ${cf_cv_main_return:-return}(1);
20757                                 } else if (strcmp(value, myvalues[j])) {
20758                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20759                                         ${cf_cv_main_return:-return}(1);
20760                                 }
20761                         } else {
20762                                 size_t k;
20763                                 mypointer[j] = value;
20764                                 for (k = 0; k < j; ++k) {
20765                                         if (mypointer[j] == mypointer[k]) {
20766                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20767                                                 ${cf_cv_main_return:-return}(1);
20768                                         }
20769                                 }
20770                         }
20771                 }
20772         }
20773         ${cf_cv_main_return:-return}(0);
20774 }
20775
20776 _ACEOF
20777 rm -f "conftest$ac_exeext"
20778 if { (eval echo "$as_me:20778: \"$ac_link\"") >&5
20779   (eval $ac_link) 2>&5
20780   ac_status=$?
20781   echo "$as_me:20781: \$? = $ac_status" >&5
20782   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20783   { (eval echo "$as_me:20783: \"$ac_try\"") >&5
20784   (eval $ac_try) 2>&5
20785   ac_status=$?
20786   echo "$as_me:20786: \$? = $ac_status" >&5
20787   (exit "$ac_status"); }; }; then
20788   cf_cv_consistent_getenv=yes
20789 else
20790   echo "$as_me: program exited with status $ac_status" >&5
20791 echo "$as_me: failed program was:" >&5
20792 cat "conftest.$ac_ext" >&5
20793 cf_cv_consistent_getenv=no
20794 fi
20795 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20796 fi
20797
20798 fi
20799 echo "$as_me:20799: result: $cf_cv_consistent_getenv" >&5
20800 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20801
20802 if test "x$cf_cv_consistent_getenv" = xno
20803 then
20804
20805 cat >>confdefs.h <<\EOF
20806 #define HAVE_CONSISTENT_GETENV 1
20807 EOF
20808
20809 fi
20810
20811 if test "x$cf_cv_consistent_getenv" = xno && \
20812         test "x$cf_with_trace" = xyes
20813 then
20814         { echo "$as_me:20814: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20815 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20816 fi
20817
20818 echo "$as_me:20818: checking if sys/time.h works with sys/select.h" >&5
20819 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20820 if test "${cf_cv_sys_time_select+set}" = set; then
20821   echo $ECHO_N "(cached) $ECHO_C" >&6
20822 else
20823
20824 cat >"conftest.$ac_ext" <<_ACEOF
20825 #line 20825 "configure"
20826 #include "confdefs.h"
20827
20828 #include <sys/types.h>
20829 #ifdef HAVE_SYS_TIME_H
20830 #include <sys/time.h>
20831 #endif
20832 #ifdef HAVE_SYS_SELECT_H
20833 #include <sys/select.h>
20834 #endif
20835
20836 int
20837 main (void)
20838 {
20839
20840   ;
20841   return 0;
20842 }
20843 _ACEOF
20844 rm -f "conftest.$ac_objext"
20845 if { (eval echo "$as_me:20845: \"$ac_compile\"") >&5
20846   (eval $ac_compile) 2>&5
20847   ac_status=$?
20848   echo "$as_me:20848: \$? = $ac_status" >&5
20849   (exit "$ac_status"); } &&
20850          { ac_try='test -s "conftest.$ac_objext"'
20851   { (eval echo "$as_me:20851: \"$ac_try\"") >&5
20852   (eval $ac_try) 2>&5
20853   ac_status=$?
20854   echo "$as_me:20854: \$? = $ac_status" >&5
20855   (exit "$ac_status"); }; }; then
20856   cf_cv_sys_time_select=yes
20857 else
20858   echo "$as_me: failed program was:" >&5
20859 cat "conftest.$ac_ext" >&5
20860 cf_cv_sys_time_select=no
20861 fi
20862 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20863
20864 fi
20865
20866 echo "$as_me:20866: result: $cf_cv_sys_time_select" >&5
20867 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20868 test "$cf_cv_sys_time_select" = yes &&
20869 cat >>confdefs.h <<\EOF
20870 #define HAVE_SYS_TIME_SELECT 1
20871 EOF
20872
20873 ###     checks for compiler characteristics
20874 ac_ext=c
20875 ac_cpp='$CPP $CPPFLAGS'
20876 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20877 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20878 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20879 ac_main_return="return"
20880
20881 echo "$as_me:20881: checking for an ANSI C-conforming const" >&5
20882 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20883 if test "${ac_cv_c_const+set}" = set; then
20884   echo $ECHO_N "(cached) $ECHO_C" >&6
20885 else
20886   cat >"conftest.$ac_ext" <<_ACEOF
20887 #line 20887 "configure"
20888 #include "confdefs.h"
20889
20890 int
20891 main (void)
20892 {
20893 /* FIXME: Include the comments suggested by Paul. */
20894 #ifndef __cplusplus
20895   /* Ultrix mips cc rejects this.  */
20896   typedef int charset[2];
20897   const charset x;
20898   /* SunOS 4.1.1 cc rejects this.  */
20899   char const *const *ccp;
20900   char **p;
20901   /* NEC SVR4.0.2 mips cc rejects this.  */
20902   struct point {int x, y;};
20903   static struct point const zero = {0,0};
20904   /* AIX XL C 1.02.0.0 rejects this.
20905      It does not let you subtract one const X* pointer from another in
20906      an arm of an if-expression whose if-part is not a constant
20907      expression */
20908   const char *g = "string";
20909   ccp = &g + (g ? g-g : 0);
20910   /* HPUX 7.0 cc rejects these. */
20911   ++ccp;
20912   p = (char**) ccp;
20913   ccp = (char const *const *) p;
20914   { /* SCO 3.2v4 cc rejects this.  */
20915     char *t;
20916     char const *s = 0 ? (char *) 0 : (char const *) 0;
20917
20918     *t++ = 0;
20919   }
20920   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20921     int x[] = {25, 17};
20922     const int *foo = &x[0];
20923     ++foo;
20924   }
20925   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20926     typedef const int *iptr;
20927     iptr p = 0;
20928     ++p;
20929   }
20930   { /* AIX XL C 1.02.0.0 rejects this saying
20931        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20932     struct s { int j; const int *ap[3]; };
20933     struct s *b; b->j = 5;
20934   }
20935   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20936     const int foo = 10;
20937   }
20938 #endif
20939
20940   ;
20941   return 0;
20942 }
20943 _ACEOF
20944 rm -f "conftest.$ac_objext"
20945 if { (eval echo "$as_me:20945: \"$ac_compile\"") >&5
20946   (eval $ac_compile) 2>&5
20947   ac_status=$?
20948   echo "$as_me:20948: \$? = $ac_status" >&5
20949   (exit "$ac_status"); } &&
20950          { ac_try='test -s "conftest.$ac_objext"'
20951   { (eval echo "$as_me:20951: \"$ac_try\"") >&5
20952   (eval $ac_try) 2>&5
20953   ac_status=$?
20954   echo "$as_me:20954: \$? = $ac_status" >&5
20955   (exit "$ac_status"); }; }; then
20956   ac_cv_c_const=yes
20957 else
20958   echo "$as_me: failed program was:" >&5
20959 cat "conftest.$ac_ext" >&5
20960 ac_cv_c_const=no
20961 fi
20962 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20963 fi
20964 echo "$as_me:20964: result: $ac_cv_c_const" >&5
20965 echo "${ECHO_T}$ac_cv_c_const" >&6
20966 if test $ac_cv_c_const = no; then
20967
20968 cat >>confdefs.h <<\EOF
20969 #define const
20970 EOF
20971
20972 fi
20973
20974 echo "$as_me:20974: checking for inline" >&5
20975 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20976 if test "${ac_cv_c_inline+set}" = set; then
20977   echo $ECHO_N "(cached) $ECHO_C" >&6
20978 else
20979   ac_cv_c_inline=no
20980 for ac_kw in inline __inline__ __inline; do
20981   cat >"conftest.$ac_ext" <<_ACEOF
20982 #line 20982 "configure"
20983 #include "confdefs.h"
20984 #ifndef __cplusplus
20985 static $ac_kw int static_foo () {return 0; }
20986 $ac_kw int foo () {return 0; }
20987 #endif
20988
20989 _ACEOF
20990 rm -f "conftest.$ac_objext"
20991 if { (eval echo "$as_me:20991: \"$ac_compile\"") >&5
20992   (eval $ac_compile) 2>&5
20993   ac_status=$?
20994   echo "$as_me:20994: \$? = $ac_status" >&5
20995   (exit "$ac_status"); } &&
20996          { ac_try='test -s "conftest.$ac_objext"'
20997   { (eval echo "$as_me:20997: \"$ac_try\"") >&5
20998   (eval $ac_try) 2>&5
20999   ac_status=$?
21000   echo "$as_me:21000: \$? = $ac_status" >&5
21001   (exit "$ac_status"); }; }; then
21002   ac_cv_c_inline=$ac_kw; break
21003 else
21004   echo "$as_me: failed program was:" >&5
21005 cat "conftest.$ac_ext" >&5
21006 fi
21007 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21008 done
21009
21010 fi
21011 echo "$as_me:21011: result: $ac_cv_c_inline" >&5
21012 echo "${ECHO_T}$ac_cv_c_inline" >&6
21013 case $ac_cv_c_inline in
21014   inline | yes) ;;
21015   no)
21016 cat >>confdefs.h <<\EOF
21017 #define inline
21018 EOF
21019  ;;
21020   *)  cat >>confdefs.h <<EOF
21021 #define inline $ac_cv_c_inline
21022 EOF
21023  ;;
21024 esac
21025
21026 NCURSES_INLINE=
21027 if test "$ac_cv_c_inline" != no ; then
21028         NCURSES_INLINE=inline
21029         if test "$INTEL_COMPILER" = yes
21030         then
21031                 :
21032         elif test "$CLANG_COMPILER" = yes
21033         then
21034                 :
21035         elif test "$GCC" = yes
21036         then
21037                 echo "$as_me:21037: checking if $CC supports options to tune inlining" >&5
21038 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
21039 if test "${cf_cv_gcc_inline+set}" = set; then
21040   echo $ECHO_N "(cached) $ECHO_C" >&6
21041 else
21042
21043                 cf_save_CFLAGS=$CFLAGS
21044                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
21045                 cat >"conftest.$ac_ext" <<_ACEOF
21046 #line 21046 "configure"
21047 #include "confdefs.h"
21048 inline int foo(void) { return 1; }
21049 int
21050 main (void)
21051 {
21052 ${cf_cv_main_return:-return} foo()
21053   ;
21054   return 0;
21055 }
21056 _ACEOF
21057 rm -f "conftest.$ac_objext"
21058 if { (eval echo "$as_me:21058: \"$ac_compile\"") >&5
21059   (eval $ac_compile) 2>&5
21060   ac_status=$?
21061   echo "$as_me:21061: \$? = $ac_status" >&5
21062   (exit "$ac_status"); } &&
21063          { ac_try='test -s "conftest.$ac_objext"'
21064   { (eval echo "$as_me:21064: \"$ac_try\"") >&5
21065   (eval $ac_try) 2>&5
21066   ac_status=$?
21067   echo "$as_me:21067: \$? = $ac_status" >&5
21068   (exit "$ac_status"); }; }; then
21069   cf_cv_gcc_inline=yes
21070 else
21071   echo "$as_me: failed program was:" >&5
21072 cat "conftest.$ac_ext" >&5
21073 cf_cv_gcc_inline=no
21074 fi
21075 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21076                 CFLAGS=$cf_save_CFLAGS
21077
21078 fi
21079 echo "$as_me:21079: result: $cf_cv_gcc_inline" >&5
21080 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
21081                 if test "$cf_cv_gcc_inline" = yes ; then
21082
21083 cf_fix_cppflags=no
21084 cf_new_cflags=
21085 cf_new_cppflags=
21086 cf_new_extra_cppflags=
21087
21088 for cf_add_cflags in --param max-inline-insns-single=1200
21089 do
21090 case "$cf_fix_cppflags" in
21091 (no)
21092         case "$cf_add_cflags" in
21093         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21094                 case "$cf_add_cflags" in
21095                 (-D*)
21096                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21097
21098                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21099                                 && test -z "${cf_tst_cflags}" \
21100                                 && cf_fix_cppflags=yes
21101
21102                         if test "$cf_fix_cppflags" = yes ; then
21103
21104         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21105         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21106
21107                                 continue
21108                         elif test "${cf_tst_cflags}" = "\"'" ; then
21109
21110         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21111         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21112
21113                                 continue
21114                         fi
21115                         ;;
21116                 esac
21117                 case "$CPPFLAGS" in
21118                 (*$cf_add_cflags)
21119                         ;;
21120                 (*)
21121                         case "$cf_add_cflags" in
21122                         (-D*)
21123                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21124
21125 CPPFLAGS=`echo "$CPPFLAGS" | \
21126         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21127                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21128
21129                                 ;;
21130                         esac
21131
21132         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21133         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21134
21135                         ;;
21136                 esac
21137                 ;;
21138         (*)
21139
21140         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21141         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21142
21143                 ;;
21144         esac
21145         ;;
21146 (yes)
21147
21148         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21149         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21150
21151         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21152
21153         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21154                 && test -z "${cf_tst_cflags}" \
21155                 && cf_fix_cppflags=no
21156         ;;
21157 esac
21158 done
21159
21160 if test -n "$cf_new_cflags" ; then
21161
21162         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21163         CFLAGS="${CFLAGS}$cf_new_cflags"
21164
21165 fi
21166
21167 if test -n "$cf_new_cppflags" ; then
21168
21169         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21170         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21171
21172 fi
21173
21174 if test -n "$cf_new_extra_cppflags" ; then
21175
21176         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21177         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21178
21179 fi
21180
21181                 fi
21182         fi
21183 fi
21184
21185 echo "$as_me:21185: checking for signal global datatype" >&5
21186 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
21187 if test "${cf_cv_sig_atomic_t+set}" = set; then
21188   echo $ECHO_N "(cached) $ECHO_C" >&6
21189 else
21190
21191         for cf_type in \
21192                 "volatile sig_atomic_t" \
21193                 "sig_atomic_t" \
21194                 "int"
21195         do
21196         cat >"conftest.$ac_ext" <<_ACEOF
21197 #line 21197 "configure"
21198 #include "confdefs.h"
21199
21200 #include <sys/types.h>
21201 #include <signal.h>
21202 #include <stdio.h>
21203
21204 extern $cf_type x;
21205 $cf_type x;
21206 static void handler(int sig)
21207 {
21208         (void)sig;
21209         x = 5;
21210 }
21211 int
21212 main (void)
21213 {
21214 signal(SIGINT, handler);
21215                  x = 1
21216   ;
21217   return 0;
21218 }
21219 _ACEOF
21220 rm -f "conftest.$ac_objext"
21221 if { (eval echo "$as_me:21221: \"$ac_compile\"") >&5
21222   (eval $ac_compile) 2>&5
21223   ac_status=$?
21224   echo "$as_me:21224: \$? = $ac_status" >&5
21225   (exit "$ac_status"); } &&
21226          { ac_try='test -s "conftest.$ac_objext"'
21227   { (eval echo "$as_me:21227: \"$ac_try\"") >&5
21228   (eval $ac_try) 2>&5
21229   ac_status=$?
21230   echo "$as_me:21230: \$? = $ac_status" >&5
21231   (exit "$ac_status"); }; }; then
21232   cf_cv_sig_atomic_t=$cf_type
21233 else
21234   echo "$as_me: failed program was:" >&5
21235 cat "conftest.$ac_ext" >&5
21236 cf_cv_sig_atomic_t=no
21237 fi
21238 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21239                 test "$cf_cv_sig_atomic_t" != no && break
21240         done
21241
21242 fi
21243
21244 echo "$as_me:21244: result: $cf_cv_sig_atomic_t" >&5
21245 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
21246 test "$cf_cv_sig_atomic_t" != no &&
21247 cat >>confdefs.h <<EOF
21248 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
21249 EOF
21250
21251 if test "$NCURSES_CHTYPE" = auto ; then
21252
21253 echo "$as_me:21253: checking for type of chtype" >&5
21254 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
21255 if test "${cf_cv_typeof_chtype+set}" = set; then
21256   echo $ECHO_N "(cached) $ECHO_C" >&6
21257 else
21258
21259                 if test "$cross_compiling" = yes; then
21260   cf_cv_typeof_chtype=long
21261 else
21262   cat >"conftest.$ac_ext" <<_ACEOF
21263 #line 21263 "configure"
21264 #include "confdefs.h"
21265
21266 $ac_includes_default
21267 #define WANT_BITS 31
21268 int main(void)
21269 {
21270         FILE *fp = fopen("cf_test.out", "w");
21271         if (fp != 0) {
21272                 char *result = "long";
21273                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
21274                         int n;
21275                         unsigned int x, y;
21276                         for (n = 0; n < WANT_BITS; n++) {
21277                                 x = (1 << n);
21278                                 y = (x >> n);
21279                                 if (y != 1 || x == 0) {
21280                                         x = 0;
21281                                         break;
21282                                 }
21283                         }
21284                         /*
21285                          * If x is nonzero, an int is big enough for the bits
21286                          * that we want.
21287                          */
21288                         result = (x != 0) ? "int" : "long";
21289                 }
21290                 fputs(result, fp);
21291                 fclose(fp);
21292         }
21293         ${cf_cv_main_return:-return}(0);
21294 }
21295
21296 _ACEOF
21297 rm -f "conftest$ac_exeext"
21298 if { (eval echo "$as_me:21298: \"$ac_link\"") >&5
21299   (eval $ac_link) 2>&5
21300   ac_status=$?
21301   echo "$as_me:21301: \$? = $ac_status" >&5
21302   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21303   { (eval echo "$as_me:21303: \"$ac_try\"") >&5
21304   (eval $ac_try) 2>&5
21305   ac_status=$?
21306   echo "$as_me:21306: \$? = $ac_status" >&5
21307   (exit "$ac_status"); }; }; then
21308   cf_cv_typeof_chtype=`cat cf_test.out`
21309 else
21310   echo "$as_me: program exited with status $ac_status" >&5
21311 echo "$as_me: failed program was:" >&5
21312 cat "conftest.$ac_ext" >&5
21313 cf_cv_typeof_chtype=long
21314 fi
21315 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21316 fi
21317                 rm -f cf_test.out
21318
21319 fi
21320
21321 echo "$as_me:21321: result: $cf_cv_typeof_chtype" >&5
21322 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
21323
21324 cat >>confdefs.h <<EOF
21325 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
21326 EOF
21327
21328 else
21329         cf_cv_typeof_chtype=$NCURSES_CHTYPE
21330 fi
21331 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
21332
21333 echo "$as_me:21333: checking if unsigned literals are legal" >&5
21334 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
21335 if test "${cf_cv_unsigned_literals+set}" = set; then
21336   echo $ECHO_N "(cached) $ECHO_C" >&6
21337 else
21338
21339         cat >"conftest.$ac_ext" <<_ACEOF
21340 #line 21340 "configure"
21341 #include "confdefs.h"
21342
21343 int
21344 main (void)
21345 {
21346 long x = 1L + 1UL + 1U + 1
21347   ;
21348   return 0;
21349 }
21350 _ACEOF
21351 rm -f "conftest.$ac_objext"
21352 if { (eval echo "$as_me:21352: \"$ac_compile\"") >&5
21353   (eval $ac_compile) 2>&5
21354   ac_status=$?
21355   echo "$as_me:21355: \$? = $ac_status" >&5
21356   (exit "$ac_status"); } &&
21357          { ac_try='test -s "conftest.$ac_objext"'
21358   { (eval echo "$as_me:21358: \"$ac_try\"") >&5
21359   (eval $ac_try) 2>&5
21360   ac_status=$?
21361   echo "$as_me:21361: \$? = $ac_status" >&5
21362   (exit "$ac_status"); }; }; then
21363   cf_cv_unsigned_literals=yes
21364 else
21365   echo "$as_me: failed program was:" >&5
21366 cat "conftest.$ac_ext" >&5
21367 cf_cv_unsigned_literals=no
21368 fi
21369 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21370
21371 fi
21372
21373 echo "$as_me:21373: result: $cf_cv_unsigned_literals" >&5
21374 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
21375
21376 cf_cv_1UL="1"
21377 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
21378 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
21379
21380 if test "$NCURSES_MMASK_T" = auto ; then
21381         cf_cv_typeof_mmask_t=long
21382 else
21383         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
21384 fi
21385 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
21386
21387 ###     Checks for external-data
21388
21389 echo "$as_me:21389: checking if external errno is declared" >&5
21390 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
21391 if test "${cf_cv_dcl_errno+set}" = set; then
21392   echo $ECHO_N "(cached) $ECHO_C" >&6
21393 else
21394
21395         cat >"conftest.$ac_ext" <<_ACEOF
21396 #line 21396 "configure"
21397 #include "confdefs.h"
21398
21399 #ifdef HAVE_STDLIB_H
21400 #include <stdlib.h>
21401 #endif
21402 #include <stdio.h>
21403 #include <sys/types.h>
21404 #include <errno.h>
21405 int
21406 main (void)
21407 {
21408 int x = (int) errno; (void)x
21409   ;
21410   return 0;
21411 }
21412 _ACEOF
21413 rm -f "conftest.$ac_objext"
21414 if { (eval echo "$as_me:21414: \"$ac_compile\"") >&5
21415   (eval $ac_compile) 2>&5
21416   ac_status=$?
21417   echo "$as_me:21417: \$? = $ac_status" >&5
21418   (exit "$ac_status"); } &&
21419          { ac_try='test -s "conftest.$ac_objext"'
21420   { (eval echo "$as_me:21420: \"$ac_try\"") >&5
21421   (eval $ac_try) 2>&5
21422   ac_status=$?
21423   echo "$as_me:21423: \$? = $ac_status" >&5
21424   (exit "$ac_status"); }; }; then
21425   cf_cv_dcl_errno=yes
21426 else
21427   echo "$as_me: failed program was:" >&5
21428 cat "conftest.$ac_ext" >&5
21429 cf_cv_dcl_errno=no
21430 fi
21431 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21432
21433 fi
21434 echo "$as_me:21434: result: $cf_cv_dcl_errno" >&5
21435 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
21436
21437 if test "$cf_cv_dcl_errno" = no ; then
21438
21439 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21440
21441         cat >>confdefs.h <<EOF
21442 #define $cf_result 1
21443 EOF
21444
21445 fi
21446
21447 # It's possible (for near-UNIX clones) that the data doesn't exist
21448
21449 echo "$as_me:21449: checking if external errno exists" >&5
21450 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21451 if test "${cf_cv_have_errno+set}" = set; then
21452   echo $ECHO_N "(cached) $ECHO_C" >&6
21453 else
21454
21455         cat >"conftest.$ac_ext" <<_ACEOF
21456 #line 21456 "configure"
21457 #include "confdefs.h"
21458
21459 #undef errno
21460 extern int errno;
21461
21462 int
21463 main (void)
21464 {
21465 errno = 2
21466   ;
21467   return 0;
21468 }
21469 _ACEOF
21470 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21471 if { (eval echo "$as_me:21471: \"$ac_link\"") >&5
21472   (eval $ac_link) 2>&5
21473   ac_status=$?
21474   echo "$as_me:21474: \$? = $ac_status" >&5
21475   (exit "$ac_status"); } &&
21476          { ac_try='test -s "conftest$ac_exeext"'
21477   { (eval echo "$as_me:21477: \"$ac_try\"") >&5
21478   (eval $ac_try) 2>&5
21479   ac_status=$?
21480   echo "$as_me:21480: \$? = $ac_status" >&5
21481   (exit "$ac_status"); }; }; then
21482   cf_cv_have_errno=yes
21483 else
21484   echo "$as_me: failed program was:" >&5
21485 cat "conftest.$ac_ext" >&5
21486 cf_cv_have_errno=no
21487 fi
21488 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21489
21490 fi
21491 echo "$as_me:21491: result: $cf_cv_have_errno" >&5
21492 echo "${ECHO_T}$cf_cv_have_errno" >&6
21493
21494 if test "$cf_cv_have_errno" = yes ; then
21495
21496 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21497
21498         cat >>confdefs.h <<EOF
21499 #define $cf_result 1
21500 EOF
21501
21502 fi
21503
21504 echo "$as_me:21504: checking if data-only library module links" >&5
21505 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21506 if test "${cf_cv_link_dataonly+set}" = set; then
21507   echo $ECHO_N "(cached) $ECHO_C" >&6
21508 else
21509
21510         rm -f conftest.a
21511         cat >conftest.$ac_ext <<EOF
21512 #line 21512 "configure"
21513 int     testdata[3] = { 123, 456, 789 };
21514 EOF
21515         if { (eval echo "$as_me:21515: \"$ac_compile\"") >&5
21516   (eval $ac_compile) 2>&5
21517   ac_status=$?
21518   echo "$as_me:21518: \$? = $ac_status" >&5
21519   (exit "$ac_status"); } ; then
21520                 mv conftest.o data.o && \
21521                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
21522         fi
21523         rm -f conftest.$ac_ext data.o
21524         cat >conftest.$ac_ext <<EOF
21525 #line 21525 "configure"
21526 int     testfunc(void)
21527 {
21528 #if defined(NeXT)
21529         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
21530 #else
21531         extern int testdata[3];
21532         return testdata[0] == 123
21533            &&  testdata[1] == 456
21534            &&  testdata[2] == 789;
21535 #endif
21536 }
21537 EOF
21538         if { (eval echo "$as_me:21538: \"$ac_compile\"") >&5
21539   (eval $ac_compile) 2>&5
21540   ac_status=$?
21541   echo "$as_me:21541: \$? = $ac_status" >&5
21542   (exit "$ac_status"); }; then
21543                 mv conftest.o func.o && \
21544                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
21545         fi
21546         rm -f conftest.$ac_ext func.o
21547         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21548         cf_saveLIBS="$LIBS"
21549         LIBS="conftest.a $LIBS"
21550         if test "$cross_compiling" = yes; then
21551   cf_cv_link_dataonly=unknown
21552 else
21553   cat >"conftest.$ac_ext" <<_ACEOF
21554 #line 21554 "configure"
21555 #include "confdefs.h"
21556
21557         int main(void)
21558         {
21559                 extern int testfunc();
21560                 ${cf_cv_main_return:-return} (!testfunc());
21561         }
21562
21563 _ACEOF
21564 rm -f "conftest$ac_exeext"
21565 if { (eval echo "$as_me:21565: \"$ac_link\"") >&5
21566   (eval $ac_link) 2>&5
21567   ac_status=$?
21568   echo "$as_me:21568: \$? = $ac_status" >&5
21569   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21570   { (eval echo "$as_me:21570: \"$ac_try\"") >&5
21571   (eval $ac_try) 2>&5
21572   ac_status=$?
21573   echo "$as_me:21573: \$? = $ac_status" >&5
21574   (exit "$ac_status"); }; }; then
21575   cf_cv_link_dataonly=yes
21576 else
21577   echo "$as_me: program exited with status $ac_status" >&5
21578 echo "$as_me: failed program was:" >&5
21579 cat "conftest.$ac_ext" >&5
21580 cf_cv_link_dataonly=no
21581 fi
21582 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21583 fi
21584         LIBS="$cf_saveLIBS"
21585
21586 fi
21587
21588 echo "$as_me:21588: result: $cf_cv_link_dataonly" >&5
21589 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21590
21591 if test "$cf_cv_link_dataonly" = no ; then
21592
21593 cat >>confdefs.h <<\EOF
21594 #define BROKEN_LINKER 1
21595 EOF
21596
21597         BROKEN_LINKER=1
21598 fi
21599
21600 ###     Checks for library functions.
21601
21602 for ac_func in \
21603 fpathconf \
21604 getcwd \
21605 getegid \
21606 geteuid \
21607 getopt \
21608 issetugid \
21609 localeconv \
21610 poll \
21611 putenv \
21612 remove \
21613 select \
21614 setbuf \
21615 setbuffer \
21616 setenv \
21617 setfsuid \
21618 setvbuf \
21619 sigaction \
21620 sigvec \
21621 snprintf \
21622 strdup \
21623 strstr \
21624 sysconf \
21625 tcgetpgrp \
21626 times \
21627 tsearch \
21628 vsnprintf \
21629
21630 do
21631 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21632 echo "$as_me:21632: checking for $ac_func" >&5
21633 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21634 if eval "test \"\${$as_ac_var+set}\" = set"; then
21635   echo $ECHO_N "(cached) $ECHO_C" >&6
21636 else
21637   cat >"conftest.$ac_ext" <<_ACEOF
21638 #line 21638 "configure"
21639 #include "confdefs.h"
21640 #define $ac_func autoconf_temporary
21641 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21642 #undef $ac_func
21643
21644 #ifdef __cplusplus
21645 extern "C"
21646 #endif
21647
21648 /* We use char because int might match the return type of a gcc2
21649    builtin and then its argument prototype would still apply.  */
21650 char $ac_func (void);
21651
21652 int
21653 main (void)
21654 {
21655
21656 /* The GNU C library defines stubs for functions which it implements
21657     to always fail with ENOSYS.  Some functions are actually named
21658     something starting with __ and the normal name is an alias.  */
21659 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21660 #error found stub for $ac_func
21661 #endif
21662
21663         return $ac_func ();
21664   ;
21665   return 0;
21666 }
21667 _ACEOF
21668 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21669 if { (eval echo "$as_me:21669: \"$ac_link\"") >&5
21670   (eval $ac_link) 2>&5
21671   ac_status=$?
21672   echo "$as_me:21672: \$? = $ac_status" >&5
21673   (exit "$ac_status"); } &&
21674          { ac_try='test -s "conftest$ac_exeext"'
21675   { (eval echo "$as_me:21675: \"$ac_try\"") >&5
21676   (eval $ac_try) 2>&5
21677   ac_status=$?
21678   echo "$as_me:21678: \$? = $ac_status" >&5
21679   (exit "$ac_status"); }; }; then
21680   eval "$as_ac_var=yes"
21681 else
21682   echo "$as_me: failed program was:" >&5
21683 cat "conftest.$ac_ext" >&5
21684 eval "$as_ac_var=no"
21685 fi
21686 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21687 fi
21688 echo "$as_me:21688: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21689 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21690 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21691   cat >>confdefs.h <<EOF
21692 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21693 EOF
21694
21695 fi
21696 done
21697
21698 echo "$as_me:21698: checking if _PATH_TTYS is defined in ttyent.h" >&5
21699 echo $ECHO_N "checking if _PATH_TTYS is defined in ttyent.h... $ECHO_C" >&6
21700 if test "${cf_cv_PATH_TTYS+set}" = set; then
21701   echo $ECHO_N "(cached) $ECHO_C" >&6
21702 else
21703
21704 cat >"conftest.$ac_ext" <<_ACEOF
21705 #line 21705 "configure"
21706 #include "confdefs.h"
21707
21708 #include <stdio.h>
21709 #include <ttyent.h>
21710 int
21711 main (void)
21712 {
21713
21714 FILE *fp = fopen(_PATH_TTYS, "r"); (void)fp
21715   ;
21716   return 0;
21717 }
21718 _ACEOF
21719 rm -f "conftest.$ac_objext"
21720 if { (eval echo "$as_me:21720: \"$ac_compile\"") >&5
21721   (eval $ac_compile) 2>&5
21722   ac_status=$?
21723   echo "$as_me:21723: \$? = $ac_status" >&5
21724   (exit "$ac_status"); } &&
21725          { ac_try='test -s "conftest.$ac_objext"'
21726   { (eval echo "$as_me:21726: \"$ac_try\"") >&5
21727   (eval $ac_try) 2>&5
21728   ac_status=$?
21729   echo "$as_me:21729: \$? = $ac_status" >&5
21730   (exit "$ac_status"); }; }; then
21731   cf_cv_PATH_TTYS=yes
21732 else
21733   echo "$as_me: failed program was:" >&5
21734 cat "conftest.$ac_ext" >&5
21735 cf_cv_PATH_TTYS=no
21736 fi
21737 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21738 fi
21739 echo "$as_me:21739: result: $cf_cv_PATH_TTYS" >&5
21740 echo "${ECHO_T}$cf_cv_PATH_TTYS" >&6
21741
21742 if test $cf_cv_PATH_TTYS = no
21743 then
21744         for cf_ttys in /etc/ttytype /etc/ttys
21745         do
21746                 if test -f $cf_ttys
21747                 then
21748                         cf_cv_PATH_TTYS=maybe
21749
21750 cat >>confdefs.h <<\EOF
21751 #define _PATH_TTYS $cf_ttys
21752 EOF
21753
21754                         break
21755                 fi
21756         done
21757 fi
21758
21759 if test $cf_cv_PATH_TTYS != no
21760 then
21761         echo "$as_me:21761: checking if _PATH_TTYS file exists" >&5
21762 echo $ECHO_N "checking if _PATH_TTYS file exists... $ECHO_C" >&6
21763 if test "${cf_cv_have_PATH_TTYS+set}" = set; then
21764   echo $ECHO_N "(cached) $ECHO_C" >&6
21765 else
21766
21767                 if test "$cross_compiling" = yes; then
21768   cf_cv_have_PATH_TTYS=unknown
21769 else
21770   cat >"conftest.$ac_ext" <<_ACEOF
21771 #line 21771 "configure"
21772 #include "confdefs.h"
21773
21774 $ac_includes_default
21775
21776 #include <ttyent.h>
21777
21778 int main(void) {
21779         FILE *fp = fopen(_PATH_TTYS, "r");
21780         ${cf_cv_main_return:-return} (fp == 0);
21781 }
21782 _ACEOF
21783 rm -f "conftest$ac_exeext"
21784 if { (eval echo "$as_me:21784: \"$ac_link\"") >&5
21785   (eval $ac_link) 2>&5
21786   ac_status=$?
21787   echo "$as_me:21787: \$? = $ac_status" >&5
21788   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21789   { (eval echo "$as_me:21789: \"$ac_try\"") >&5
21790   (eval $ac_try) 2>&5
21791   ac_status=$?
21792   echo "$as_me:21792: \$? = $ac_status" >&5
21793   (exit "$ac_status"); }; }; then
21794   cf_cv_have_PATH_TTYS=yes
21795 else
21796   echo "$as_me: program exited with status $ac_status" >&5
21797 echo "$as_me: failed program was:" >&5
21798 cat "conftest.$ac_ext" >&5
21799 cf_cv_have_PATH_TTYS=no
21800 fi
21801 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21802 fi
21803 fi
21804 echo "$as_me:21804: result: $cf_cv_have_PATH_TTYS" >&5
21805 echo "${ECHO_T}$cf_cv_have_PATH_TTYS" >&6
21806         test "$cf_cv_have_PATH_TTYS" = no && cf_cv_PATH_TTYS=no
21807 fi
21808
21809 if test $cf_cv_PATH_TTYS != no
21810 then
21811
21812 cat >>confdefs.h <<\EOF
21813 #define HAVE_PATH_TTYS 1
21814 EOF
21815
21816         echo "$as_me:21816: checking for getttynam" >&5
21817 echo $ECHO_N "checking for getttynam... $ECHO_C" >&6
21818 if test "${cf_cv_func_getttynam+set}" = set; then
21819   echo $ECHO_N "(cached) $ECHO_C" >&6
21820 else
21821
21822                 cat >"conftest.$ac_ext" <<_ACEOF
21823 #line 21823 "configure"
21824 #include "confdefs.h"
21825 #include <ttyent.h>
21826 int
21827 main (void)
21828 {
21829 struct ttyent *fp = getttynam("/dev/tty"); (void)fp
21830   ;
21831   return 0;
21832 }
21833 _ACEOF
21834 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21835 if { (eval echo "$as_me:21835: \"$ac_link\"") >&5
21836   (eval $ac_link) 2>&5
21837   ac_status=$?
21838   echo "$as_me:21838: \$? = $ac_status" >&5
21839   (exit "$ac_status"); } &&
21840          { ac_try='test -s "conftest$ac_exeext"'
21841   { (eval echo "$as_me:21841: \"$ac_try\"") >&5
21842   (eval $ac_try) 2>&5
21843   ac_status=$?
21844   echo "$as_me:21844: \$? = $ac_status" >&5
21845   (exit "$ac_status"); }; }; then
21846   cf_cv_func_getttynam=yes
21847 else
21848   echo "$as_me: failed program was:" >&5
21849 cat "conftest.$ac_ext" >&5
21850 cf_cv_func_getttynam=no
21851 fi
21852 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21853 fi
21854 echo "$as_me:21854: result: $cf_cv_func_getttynam" >&5
21855 echo "${ECHO_T}$cf_cv_func_getttynam" >&6
21856         test "$cf_cv_func_getttynam" = yes && cat >>confdefs.h <<\EOF
21857 #define HAVE_GETTTYNAM 1
21858 EOF
21859
21860 fi
21861
21862 if test "x$ac_cv_func_getopt" = xno && \
21863    test "x$cf_with_progs$cf_with_tests" != xnono; then
21864         { { echo "$as_me:21864: error: getopt is required for building programs" >&5
21865 echo "$as_me: error: getopt is required for building programs" >&2;}
21866    { (exit 1); exit 1; }; }
21867 fi
21868
21869 if test "x$with_safe_sprintf" = xyes
21870 then
21871         if test "x$ac_cv_func_vsnprintf" = xyes
21872         then
21873                 { echo "$as_me:21873: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
21874 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
21875         else
21876
21877 cat >>confdefs.h <<\EOF
21878 #define USE_SAFE_SPRINTF 1
21879 EOF
21880
21881         fi
21882 fi
21883
21884 if test "x$with_getcap" = "xyes" ; then
21885
21886 echo "$as_me:21886: checking for terminal-capability database functions" >&5
21887 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
21888 if test "${cf_cv_cgetent+set}" = set; then
21889   echo $ECHO_N "(cached) $ECHO_C" >&6
21890 else
21891
21892 cat >"conftest.$ac_ext" <<_ACEOF
21893 #line 21893 "configure"
21894 #include "confdefs.h"
21895
21896 #include <stdlib.h>
21897 int
21898 main (void)
21899 {
21900
21901         char temp[128];
21902         char *buf = temp;
21903         char *db_array = temp;
21904         cgetent(&buf, &db_array, "vt100");
21905         cgetcap(buf, "tc", '=');
21906         cgetmatch(buf, "tc");
21907
21908   ;
21909   return 0;
21910 }
21911 _ACEOF
21912 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21913 if { (eval echo "$as_me:21913: \"$ac_link\"") >&5
21914   (eval $ac_link) 2>&5
21915   ac_status=$?
21916   echo "$as_me:21916: \$? = $ac_status" >&5
21917   (exit "$ac_status"); } &&
21918          { ac_try='test -s "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_cgetent=yes
21925 else
21926   echo "$as_me: failed program was:" >&5
21927 cat "conftest.$ac_ext" >&5
21928 cf_cv_cgetent=no
21929 fi
21930 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21931
21932 fi
21933 echo "$as_me:21933: result: $cf_cv_cgetent" >&5
21934 echo "${ECHO_T}$cf_cv_cgetent" >&6
21935
21936 if test "$cf_cv_cgetent" = yes
21937 then
21938
21939 cat >>confdefs.h <<\EOF
21940 #define HAVE_BSD_CGETENT 1
21941 EOF
21942
21943 echo "$as_me:21943: checking if cgetent uses const parameter" >&5
21944 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
21945 if test "${cf_cv_cgetent_const+set}" = set; then
21946   echo $ECHO_N "(cached) $ECHO_C" >&6
21947 else
21948
21949 cat >"conftest.$ac_ext" <<_ACEOF
21950 #line 21950 "configure"
21951 #include "confdefs.h"
21952
21953 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
21954 #include <stdlib.h>
21955 int
21956 main (void)
21957 {
21958
21959         char temp[128];
21960         char *buf = temp;
21961 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
21962         const char *db_array = temp;
21963         cgetent(&buf, &db_array, "vt100");
21964 #endif
21965         cgetcap(buf, "tc", '=');
21966         cgetmatch(buf, "tc");
21967
21968   ;
21969   return 0;
21970 }
21971 _ACEOF
21972 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21973 if { (eval echo "$as_me:21973: \"$ac_link\"") >&5
21974   (eval $ac_link) 2>&5
21975   ac_status=$?
21976   echo "$as_me:21976: \$? = $ac_status" >&5
21977   (exit "$ac_status"); } &&
21978          { ac_try='test -s "conftest$ac_exeext"'
21979   { (eval echo "$as_me:21979: \"$ac_try\"") >&5
21980   (eval $ac_try) 2>&5
21981   ac_status=$?
21982   echo "$as_me:21982: \$? = $ac_status" >&5
21983   (exit "$ac_status"); }; }; then
21984   cf_cv_cgetent_const=yes
21985 else
21986   echo "$as_me: failed program was:" >&5
21987 cat "conftest.$ac_ext" >&5
21988 cf_cv_cgetent_const=no
21989 fi
21990 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21991
21992 fi
21993 echo "$as_me:21993: result: $cf_cv_cgetent_const" >&5
21994 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
21995         if test "$cf_cv_cgetent_const" = yes
21996         then
21997
21998 cat >>confdefs.h <<EOF
21999 #define CGETENT_CONST const
22000 EOF
22001
22002         fi
22003 fi
22004
22005 fi
22006
22007 echo "$as_me:22007: checking for isascii" >&5
22008 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
22009 if test "${cf_cv_have_isascii+set}" = set; then
22010   echo $ECHO_N "(cached) $ECHO_C" >&6
22011 else
22012
22013         cat >"conftest.$ac_ext" <<_ACEOF
22014 #line 22014 "configure"
22015 #include "confdefs.h"
22016 #include <ctype.h>
22017 int
22018 main (void)
22019 {
22020 int x = isascii(' ')
22021   ;
22022   return 0;
22023 }
22024 _ACEOF
22025 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22026 if { (eval echo "$as_me:22026: \"$ac_link\"") >&5
22027   (eval $ac_link) 2>&5
22028   ac_status=$?
22029   echo "$as_me:22029: \$? = $ac_status" >&5
22030   (exit "$ac_status"); } &&
22031          { ac_try='test -s "conftest$ac_exeext"'
22032   { (eval echo "$as_me:22032: \"$ac_try\"") >&5
22033   (eval $ac_try) 2>&5
22034   ac_status=$?
22035   echo "$as_me:22035: \$? = $ac_status" >&5
22036   (exit "$ac_status"); }; }; then
22037   cf_cv_have_isascii=yes
22038 else
22039   echo "$as_me: failed program was:" >&5
22040 cat "conftest.$ac_ext" >&5
22041 cf_cv_have_isascii=no
22042 fi
22043 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22044
22045 fi
22046 echo "$as_me:22046: result: $cf_cv_have_isascii" >&5
22047 echo "${ECHO_T}$cf_cv_have_isascii" >&6
22048 test "$cf_cv_have_isascii" = yes &&
22049 cat >>confdefs.h <<\EOF
22050 #define HAVE_ISASCII 1
22051 EOF
22052
22053 if test "$ac_cv_func_sigaction" = yes; then
22054 echo "$as_me:22054: checking whether sigaction needs _POSIX_SOURCE" >&5
22055 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
22056 cat >"conftest.$ac_ext" <<_ACEOF
22057 #line 22057 "configure"
22058 #include "confdefs.h"
22059
22060 #include <sys/types.h>
22061 #include <signal.h>
22062 int
22063 main (void)
22064 {
22065 struct sigaction act
22066   ;
22067   return 0;
22068 }
22069 _ACEOF
22070 rm -f "conftest.$ac_objext"
22071 if { (eval echo "$as_me:22071: \"$ac_compile\"") >&5
22072   (eval $ac_compile) 2>&5
22073   ac_status=$?
22074   echo "$as_me:22074: \$? = $ac_status" >&5
22075   (exit "$ac_status"); } &&
22076          { ac_try='test -s "conftest.$ac_objext"'
22077   { (eval echo "$as_me:22077: \"$ac_try\"") >&5
22078   (eval $ac_try) 2>&5
22079   ac_status=$?
22080   echo "$as_me:22080: \$? = $ac_status" >&5
22081   (exit "$ac_status"); }; }; then
22082   sigact_bad=no
22083 else
22084   echo "$as_me: failed program was:" >&5
22085 cat "conftest.$ac_ext" >&5
22086
22087 cat >"conftest.$ac_ext" <<_ACEOF
22088 #line 22088 "configure"
22089 #include "confdefs.h"
22090
22091 #define _POSIX_SOURCE
22092 #include <sys/types.h>
22093 #include <signal.h>
22094 int
22095 main (void)
22096 {
22097 struct sigaction act
22098   ;
22099   return 0;
22100 }
22101 _ACEOF
22102 rm -f "conftest.$ac_objext"
22103 if { (eval echo "$as_me:22103: \"$ac_compile\"") >&5
22104   (eval $ac_compile) 2>&5
22105   ac_status=$?
22106   echo "$as_me:22106: \$? = $ac_status" >&5
22107   (exit "$ac_status"); } &&
22108          { ac_try='test -s "conftest.$ac_objext"'
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   sigact_bad=yes
22115
22116 cat >>confdefs.h <<\EOF
22117 #define _POSIX_SOURCE 1
22118 EOF
22119
22120 else
22121   echo "$as_me: failed program was:" >&5
22122 cat "conftest.$ac_ext" >&5
22123 sigact_bad=unknown
22124 fi
22125 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22126 fi
22127 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22128 echo "$as_me:22128: result: $sigact_bad" >&5
22129 echo "${ECHO_T}$sigact_bad" >&6
22130 fi
22131
22132 echo "$as_me:22132: checking if nanosleep really works" >&5
22133 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
22134 if test "${cf_cv_func_nanosleep+set}" = set; then
22135   echo $ECHO_N "(cached) $ECHO_C" >&6
22136 else
22137
22138 if test "$cross_compiling" = yes; then
22139   cf_cv_func_nanosleep=unknown
22140 else
22141   cat >"conftest.$ac_ext" <<_ACEOF
22142 #line 22142 "configure"
22143 #include "confdefs.h"
22144
22145 $ac_includes_default
22146
22147 #include <errno.h>
22148 #include <time.h>
22149
22150 #ifdef HAVE_SYS_TIME_H
22151 #include <sys/time.h>
22152 #endif
22153
22154 int main(void) {
22155         struct timespec ts1, ts2;
22156         int code;
22157         ts1.tv_sec  = 0;
22158         ts1.tv_nsec = 750000000;
22159         ts2.tv_sec  = 0;
22160         ts2.tv_nsec = 0;
22161         errno = 0;
22162         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
22163         ${cf_cv_main_return:-return}(code != 0);
22164 }
22165
22166 _ACEOF
22167 rm -f "conftest$ac_exeext"
22168 if { (eval echo "$as_me:22168: \"$ac_link\"") >&5
22169   (eval $ac_link) 2>&5
22170   ac_status=$?
22171   echo "$as_me:22171: \$? = $ac_status" >&5
22172   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22173   { (eval echo "$as_me:22173: \"$ac_try\"") >&5
22174   (eval $ac_try) 2>&5
22175   ac_status=$?
22176   echo "$as_me:22176: \$? = $ac_status" >&5
22177   (exit "$ac_status"); }; }; then
22178   cf_cv_func_nanosleep=yes
22179 else
22180   echo "$as_me: program exited with status $ac_status" >&5
22181 echo "$as_me: failed program was:" >&5
22182 cat "conftest.$ac_ext" >&5
22183 cf_cv_func_nanosleep=no
22184 fi
22185 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22186 fi
22187 fi
22188 echo "$as_me:22188: result: $cf_cv_func_nanosleep" >&5
22189 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
22190
22191 test "$cf_cv_func_nanosleep" = "yes" &&
22192 cat >>confdefs.h <<\EOF
22193 #define HAVE_NANOSLEEP 1
22194 EOF
22195
22196 for ac_header in \
22197 termio.h \
22198 termios.h \
22199 unistd.h \
22200 sys/ioctl.h \
22201 sys/termio.h \
22202
22203 do
22204 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22205 echo "$as_me:22205: checking for $ac_header" >&5
22206 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22207 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22208   echo $ECHO_N "(cached) $ECHO_C" >&6
22209 else
22210   cat >"conftest.$ac_ext" <<_ACEOF
22211 #line 22211 "configure"
22212 #include "confdefs.h"
22213 #include <$ac_header>
22214 _ACEOF
22215 if { (eval echo "$as_me:22215: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22216   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22217   ac_status=$?
22218   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22219   rm -f conftest.er1
22220   cat conftest.err >&5
22221   echo "$as_me:22221: \$? = $ac_status" >&5
22222   (exit "$ac_status"); } >/dev/null; then
22223   if test -s conftest.err; then
22224     ac_cpp_err=$ac_c_preproc_warn_flag
22225   else
22226     ac_cpp_err=
22227   fi
22228 else
22229   ac_cpp_err=yes
22230 fi
22231 if test -z "$ac_cpp_err"; then
22232   eval "$as_ac_Header=yes"
22233 else
22234   echo "$as_me: failed program was:" >&5
22235   cat "conftest.$ac_ext" >&5
22236   eval "$as_ac_Header=no"
22237 fi
22238 rm -f conftest.err "conftest.$ac_ext"
22239 fi
22240 echo "$as_me:22240: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22241 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22242 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22243   cat >>confdefs.h <<EOF
22244 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22245 EOF
22246
22247 fi
22248 done
22249
22250 if test "$ac_cv_header_termios_h" = yes ; then
22251         case "$CFLAGS $CPPFLAGS" in
22252         (*-D_POSIX_SOURCE*)
22253                 termios_bad=dunno ;;
22254         (*)     termios_bad=maybe ;;
22255         esac
22256         if test "$termios_bad" = maybe ; then
22257         echo "$as_me:22257: checking whether termios.h needs _POSIX_SOURCE" >&5
22258 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
22259         cat >"conftest.$ac_ext" <<_ACEOF
22260 #line 22260 "configure"
22261 #include "confdefs.h"
22262 #include <termios.h>
22263 int
22264 main (void)
22265 {
22266 struct termios foo; int x = foo.c_iflag = 1; (void)x
22267   ;
22268   return 0;
22269 }
22270 _ACEOF
22271 rm -f "conftest.$ac_objext"
22272 if { (eval echo "$as_me:22272: \"$ac_compile\"") >&5
22273   (eval $ac_compile) 2>&5
22274   ac_status=$?
22275   echo "$as_me:22275: \$? = $ac_status" >&5
22276   (exit "$ac_status"); } &&
22277          { ac_try='test -s "conftest.$ac_objext"'
22278   { (eval echo "$as_me:22278: \"$ac_try\"") >&5
22279   (eval $ac_try) 2>&5
22280   ac_status=$?
22281   echo "$as_me:22281: \$? = $ac_status" >&5
22282   (exit "$ac_status"); }; }; then
22283   termios_bad=no
22284 else
22285   echo "$as_me: failed program was:" >&5
22286 cat "conftest.$ac_ext" >&5
22287
22288                 cat >"conftest.$ac_ext" <<_ACEOF
22289 #line 22289 "configure"
22290 #include "confdefs.h"
22291
22292 #define _POSIX_SOURCE
22293 #include <termios.h>
22294 int
22295 main (void)
22296 {
22297 struct termios foo; int x = foo.c_iflag = 2; (void)x
22298   ;
22299   return 0;
22300 }
22301 _ACEOF
22302 rm -f "conftest.$ac_objext"
22303 if { (eval echo "$as_me:22303: \"$ac_compile\"") >&5
22304   (eval $ac_compile) 2>&5
22305   ac_status=$?
22306   echo "$as_me:22306: \$? = $ac_status" >&5
22307   (exit "$ac_status"); } &&
22308          { ac_try='test -s "conftest.$ac_objext"'
22309   { (eval echo "$as_me:22309: \"$ac_try\"") >&5
22310   (eval $ac_try) 2>&5
22311   ac_status=$?
22312   echo "$as_me:22312: \$? = $ac_status" >&5
22313   (exit "$ac_status"); }; }; then
22314   termios_bad=unknown
22315 else
22316   echo "$as_me: failed program was:" >&5
22317 cat "conftest.$ac_ext" >&5
22318 termios_bad=yes
22319 cat >>confdefs.h <<\EOF
22320 #define _POSIX_SOURCE 1
22321 EOF
22322
22323 fi
22324 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22325
22326 fi
22327 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22328         echo "$as_me:22328: result: $termios_bad" >&5
22329 echo "${ECHO_T}$termios_bad" >&6
22330         fi
22331 fi
22332
22333 echo "$as_me:22333: checking for tcgetattr" >&5
22334 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
22335 if test "${cf_cv_have_tcgetattr+set}" = set; then
22336   echo $ECHO_N "(cached) $ECHO_C" >&6
22337 else
22338
22339 cat >"conftest.$ac_ext" <<_ACEOF
22340 #line 22340 "configure"
22341 #include "confdefs.h"
22342
22343 #include <sys/types.h>
22344 #ifdef HAVE_UNISTD_H
22345 #include <unistd.h>
22346 #endif
22347 #ifdef HAVE_TERMIOS_H
22348 #include <termios.h>
22349 #define TTY struct termios
22350 #else
22351 #ifdef HAVE_TERMIO_H
22352 #include <termio.h>
22353 #define TTY struct termio
22354 #endif
22355 #endif
22356
22357 int
22358 main (void)
22359 {
22360
22361 TTY foo;
22362 tcgetattr(1, &foo);
22363   ;
22364   return 0;
22365 }
22366 _ACEOF
22367 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22368 if { (eval echo "$as_me:22368: \"$ac_link\"") >&5
22369   (eval $ac_link) 2>&5
22370   ac_status=$?
22371   echo "$as_me:22371: \$? = $ac_status" >&5
22372   (exit "$ac_status"); } &&
22373          { ac_try='test -s "conftest$ac_exeext"'
22374   { (eval echo "$as_me:22374: \"$ac_try\"") >&5
22375   (eval $ac_try) 2>&5
22376   ac_status=$?
22377   echo "$as_me:22377: \$? = $ac_status" >&5
22378   (exit "$ac_status"); }; }; then
22379   cf_cv_have_tcgetattr=yes
22380 else
22381   echo "$as_me: failed program was:" >&5
22382 cat "conftest.$ac_ext" >&5
22383 cf_cv_have_tcgetattr=no
22384 fi
22385 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22386 fi
22387 echo "$as_me:22387: result: $cf_cv_have_tcgetattr" >&5
22388 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
22389 test "$cf_cv_have_tcgetattr" = yes &&
22390 cat >>confdefs.h <<\EOF
22391 #define HAVE_TCGETATTR 1
22392 EOF
22393
22394 echo "$as_me:22394: checking for vsscanf function or workaround" >&5
22395 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
22396 if test "${cf_cv_func_vsscanf+set}" = set; then
22397   echo $ECHO_N "(cached) $ECHO_C" >&6
22398 else
22399
22400 cat >"conftest.$ac_ext" <<_ACEOF
22401 #line 22401 "configure"
22402 #include "confdefs.h"
22403
22404 #include <stdarg.h>
22405 #include <stdio.h>
22406 int
22407 main (void)
22408 {
22409
22410         va_list ap;
22411         vsscanf("from", "%d", ap)
22412   ;
22413   return 0;
22414 }
22415 _ACEOF
22416 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22417 if { (eval echo "$as_me:22417: \"$ac_link\"") >&5
22418   (eval $ac_link) 2>&5
22419   ac_status=$?
22420   echo "$as_me:22420: \$? = $ac_status" >&5
22421   (exit "$ac_status"); } &&
22422          { ac_try='test -s "conftest$ac_exeext"'
22423   { (eval echo "$as_me:22423: \"$ac_try\"") >&5
22424   (eval $ac_try) 2>&5
22425   ac_status=$?
22426   echo "$as_me:22426: \$? = $ac_status" >&5
22427   (exit "$ac_status"); }; }; then
22428   cf_cv_func_vsscanf=vsscanf
22429 else
22430   echo "$as_me: failed program was:" >&5
22431 cat "conftest.$ac_ext" >&5
22432
22433 cat >"conftest.$ac_ext" <<_ACEOF
22434 #line 22434 "configure"
22435 #include "confdefs.h"
22436
22437 #include <stdarg.h>
22438 #include <stdio.h>
22439 int
22440 main (void)
22441 {
22442
22443         FILE strbuf;
22444         char *str = "from";
22445
22446         strbuf._flag = _IOREAD;
22447         strbuf._ptr = strbuf._base = (unsigned char *) str;
22448         strbuf._cnt = strlen(str);
22449         strbuf._file = _NFILE;
22450         return (vfscanf(&strbuf, "%d", ap))
22451   ;
22452   return 0;
22453 }
22454 _ACEOF
22455 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22456 if { (eval echo "$as_me:22456: \"$ac_link\"") >&5
22457   (eval $ac_link) 2>&5
22458   ac_status=$?
22459   echo "$as_me:22459: \$? = $ac_status" >&5
22460   (exit "$ac_status"); } &&
22461          { ac_try='test -s "conftest$ac_exeext"'
22462   { (eval echo "$as_me:22462: \"$ac_try\"") >&5
22463   (eval $ac_try) 2>&5
22464   ac_status=$?
22465   echo "$as_me:22465: \$? = $ac_status" >&5
22466   (exit "$ac_status"); }; }; then
22467   cf_cv_func_vsscanf=vfscanf
22468 else
22469   echo "$as_me: failed program was:" >&5
22470 cat "conftest.$ac_ext" >&5
22471
22472 cat >"conftest.$ac_ext" <<_ACEOF
22473 #line 22473 "configure"
22474 #include "confdefs.h"
22475
22476 #include <stdarg.h>
22477 #include <stdio.h>
22478 int
22479 main (void)
22480 {
22481
22482         FILE strbuf;
22483         char *str = "from";
22484
22485         strbuf._flag = _IOREAD;
22486         strbuf._ptr = strbuf._base = (unsigned char *) str;
22487         strbuf._cnt = strlen(str);
22488         strbuf._file = _NFILE;
22489         return (_doscan(&strbuf, "%d", ap))
22490   ;
22491   return 0;
22492 }
22493 _ACEOF
22494 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22495 if { (eval echo "$as_me:22495: \"$ac_link\"") >&5
22496   (eval $ac_link) 2>&5
22497   ac_status=$?
22498   echo "$as_me:22498: \$? = $ac_status" >&5
22499   (exit "$ac_status"); } &&
22500          { ac_try='test -s "conftest$ac_exeext"'
22501   { (eval echo "$as_me:22501: \"$ac_try\"") >&5
22502   (eval $ac_try) 2>&5
22503   ac_status=$?
22504   echo "$as_me:22504: \$? = $ac_status" >&5
22505   (exit "$ac_status"); }; }; then
22506   cf_cv_func_vsscanf=_doscan
22507 else
22508   echo "$as_me: failed program was:" >&5
22509 cat "conftest.$ac_ext" >&5
22510
22511 cf_cv_func_vsscanf=no
22512 fi
22513 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22514 fi
22515 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22516 fi
22517 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22518 fi
22519 echo "$as_me:22519: result: $cf_cv_func_vsscanf" >&5
22520 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
22521
22522 case "$cf_cv_func_vsscanf" in
22523 (vsscanf)
22524 cat >>confdefs.h <<\EOF
22525 #define HAVE_VSSCANF 1
22526 EOF
22527 ;;
22528 (vfscanf)
22529 cat >>confdefs.h <<\EOF
22530 #define HAVE_VFSCANF 1
22531 EOF
22532 ;;
22533 (_doscan)
22534 cat >>confdefs.h <<\EOF
22535 #define HAVE__DOSCAN 1
22536 EOF
22537 ;;
22538 esac
22539
22540 for ac_header in \
22541 unistd.h \
22542
22543 do
22544 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22545 echo "$as_me:22545: checking for $ac_header" >&5
22546 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22547 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22548   echo $ECHO_N "(cached) $ECHO_C" >&6
22549 else
22550   cat >"conftest.$ac_ext" <<_ACEOF
22551 #line 22551 "configure"
22552 #include "confdefs.h"
22553 #include <$ac_header>
22554 _ACEOF
22555 if { (eval echo "$as_me:22555: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22556   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22557   ac_status=$?
22558   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22559   rm -f conftest.er1
22560   cat conftest.err >&5
22561   echo "$as_me:22561: \$? = $ac_status" >&5
22562   (exit "$ac_status"); } >/dev/null; then
22563   if test -s conftest.err; then
22564     ac_cpp_err=$ac_c_preproc_warn_flag
22565   else
22566     ac_cpp_err=
22567   fi
22568 else
22569   ac_cpp_err=yes
22570 fi
22571 if test -z "$ac_cpp_err"; then
22572   eval "$as_ac_Header=yes"
22573 else
22574   echo "$as_me: failed program was:" >&5
22575   cat "conftest.$ac_ext" >&5
22576   eval "$as_ac_Header=no"
22577 fi
22578 rm -f conftest.err "conftest.$ac_ext"
22579 fi
22580 echo "$as_me:22580: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22581 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22582 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22583   cat >>confdefs.h <<EOF
22584 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22585 EOF
22586
22587 fi
22588 done
22589
22590 echo "$as_me:22590: checking for working mkstemp" >&5
22591 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
22592 if test "${cf_cv_func_mkstemp+set}" = set; then
22593   echo $ECHO_N "(cached) $ECHO_C" >&6
22594 else
22595
22596 rm -rf ./conftest*
22597 if test "$cross_compiling" = yes; then
22598   cf_cv_func_mkstemp=maybe
22599 else
22600   cat >"conftest.$ac_ext" <<_ACEOF
22601 #line 22601 "configure"
22602 #include "confdefs.h"
22603
22604 $ac_includes_default
22605
22606 int main(void)
22607 {
22608         char *tmpl = "conftestXXXXXX";
22609         char name[2][80];
22610         int n;
22611         int result = 0;
22612         int fd;
22613         struct stat sb;
22614
22615         umask(077);
22616         for (n = 0; n < 2; ++n) {
22617                 strcpy(name[n], tmpl);
22618                 if ((fd = mkstemp(name[n])) >= 0) {
22619                         if (!strcmp(name[n], tmpl)
22620                          || stat(name[n], &sb) != 0
22621                          || (sb.st_mode & S_IFMT) != S_IFREG
22622                          || (sb.st_mode & 077) != 0) {
22623                                 result = 1;
22624                         }
22625                         close(fd);
22626                 }
22627         }
22628         if (result == 0
22629          && !strcmp(name[0], name[1]))
22630                 result = 1;
22631         ${cf_cv_main_return:-return}(result);
22632 }
22633
22634 _ACEOF
22635 rm -f "conftest$ac_exeext"
22636 if { (eval echo "$as_me:22636: \"$ac_link\"") >&5
22637   (eval $ac_link) 2>&5
22638   ac_status=$?
22639   echo "$as_me:22639: \$? = $ac_status" >&5
22640   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22641   { (eval echo "$as_me:22641: \"$ac_try\"") >&5
22642   (eval $ac_try) 2>&5
22643   ac_status=$?
22644   echo "$as_me:22644: \$? = $ac_status" >&5
22645   (exit "$ac_status"); }; }; then
22646   cf_cv_func_mkstemp=yes
22647
22648 else
22649   echo "$as_me: program exited with status $ac_status" >&5
22650 echo "$as_me: failed program was:" >&5
22651 cat "conftest.$ac_ext" >&5
22652 cf_cv_func_mkstemp=no
22653
22654 fi
22655 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22656 fi
22657
22658 fi
22659 echo "$as_me:22659: result: $cf_cv_func_mkstemp" >&5
22660 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
22661 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
22662         echo "$as_me:22662: checking for mkstemp" >&5
22663 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
22664 if test "${ac_cv_func_mkstemp+set}" = set; then
22665   echo $ECHO_N "(cached) $ECHO_C" >&6
22666 else
22667   cat >"conftest.$ac_ext" <<_ACEOF
22668 #line 22668 "configure"
22669 #include "confdefs.h"
22670 #define mkstemp autoconf_temporary
22671 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22672 #undef mkstemp
22673
22674 #ifdef __cplusplus
22675 extern "C"
22676 #endif
22677
22678 /* We use char because int might match the return type of a gcc2
22679    builtin and then its argument prototype would still apply.  */
22680 char mkstemp (void);
22681
22682 int
22683 main (void)
22684 {
22685
22686 /* The GNU C library defines stubs for functions which it implements
22687     to always fail with ENOSYS.  Some functions are actually named
22688     something starting with __ and the normal name is an alias.  */
22689 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
22690 #error found stub for mkstemp
22691 #endif
22692
22693         return mkstemp ();
22694   ;
22695   return 0;
22696 }
22697 _ACEOF
22698 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22699 if { (eval echo "$as_me:22699: \"$ac_link\"") >&5
22700   (eval $ac_link) 2>&5
22701   ac_status=$?
22702   echo "$as_me:22702: \$? = $ac_status" >&5
22703   (exit "$ac_status"); } &&
22704          { ac_try='test -s "conftest$ac_exeext"'
22705   { (eval echo "$as_me:22705: \"$ac_try\"") >&5
22706   (eval $ac_try) 2>&5
22707   ac_status=$?
22708   echo "$as_me:22708: \$? = $ac_status" >&5
22709   (exit "$ac_status"); }; }; then
22710   ac_cv_func_mkstemp=yes
22711 else
22712   echo "$as_me: failed program was:" >&5
22713 cat "conftest.$ac_ext" >&5
22714 ac_cv_func_mkstemp=no
22715 fi
22716 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22717 fi
22718 echo "$as_me:22718: result: $ac_cv_func_mkstemp" >&5
22719 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22720
22721 fi
22722 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22723
22724 cat >>confdefs.h <<\EOF
22725 #define HAVE_MKSTEMP 1
22726 EOF
22727
22728 fi
22729
22730 # setup for prototype of fallback for vsscanf()
22731
22732 if test "$cf_cv_func_vsscanf" = vsscanf ; then
22733         HAVE_VSSCANF=1
22734 else
22735         HAVE_VSSCANF=0
22736 fi
22737
22738 if test "x$cross_compiling" = xyes ; then
22739         { echo "$as_me:22739: WARNING: cross compiling: assume setvbuf params not reversed" >&5
22740 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22741 else
22742         echo "$as_me:22742: checking whether setvbuf arguments are reversed" >&5
22743 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22744 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22745   echo $ECHO_N "(cached) $ECHO_C" >&6
22746 else
22747   if test "$cross_compiling" = yes; then
22748   { { echo "$as_me:22748: error: cannot run test program while cross compiling" >&5
22749 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22750    { (exit 1); exit 1; }; }
22751 else
22752   cat >"conftest.$ac_ext" <<_ACEOF
22753 #line 22753 "configure"
22754 #include "confdefs.h"
22755 #include <stdio.h>
22756 /* If setvbuf has the reversed format, exit 0. */
22757 int
22758 main (void)
22759 {
22760   /* This call has the arguments reversed.
22761      A reversed system may check and see that the address of main
22762      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
22763   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22764     $ac_main_return(1);
22765   putc('\r', stdout);
22766   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22767 }
22768 _ACEOF
22769 rm -f "conftest$ac_exeext"
22770 if { (eval echo "$as_me:22770: \"$ac_link\"") >&5
22771   (eval $ac_link) 2>&5
22772   ac_status=$?
22773   echo "$as_me:22773: \$? = $ac_status" >&5
22774   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22775   { (eval echo "$as_me:22775: \"$ac_try\"") >&5
22776   (eval $ac_try) 2>&5
22777   ac_status=$?
22778   echo "$as_me:22778: \$? = $ac_status" >&5
22779   (exit "$ac_status"); }; }; then
22780   ac_cv_func_setvbuf_reversed=yes
22781 else
22782   echo "$as_me: program exited with status $ac_status" >&5
22783 echo "$as_me: failed program was:" >&5
22784 cat "conftest.$ac_ext" >&5
22785 ac_cv_func_setvbuf_reversed=no
22786 fi
22787 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22788 fi
22789 rm -f core ./core.* ./*.core
22790 fi
22791 echo "$as_me:22791: result: $ac_cv_func_setvbuf_reversed" >&5
22792 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
22793 if test $ac_cv_func_setvbuf_reversed = yes; then
22794
22795 cat >>confdefs.h <<\EOF
22796 #define SETVBUF_REVERSED 1
22797 EOF
22798
22799 fi
22800
22801 fi
22802 echo "$as_me:22802: checking for intptr_t" >&5
22803 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
22804 if test "${ac_cv_type_intptr_t+set}" = set; then
22805   echo $ECHO_N "(cached) $ECHO_C" >&6
22806 else
22807   cat >"conftest.$ac_ext" <<_ACEOF
22808 #line 22808 "configure"
22809 #include "confdefs.h"
22810 $ac_includes_default
22811 int
22812 main (void)
22813 {
22814 if ((intptr_t *) 0)
22815   return 0;
22816 if (sizeof (intptr_t))
22817   return 0;
22818   ;
22819   return 0;
22820 }
22821 _ACEOF
22822 rm -f "conftest.$ac_objext"
22823 if { (eval echo "$as_me:22823: \"$ac_compile\"") >&5
22824   (eval $ac_compile) 2>&5
22825   ac_status=$?
22826   echo "$as_me:22826: \$? = $ac_status" >&5
22827   (exit "$ac_status"); } &&
22828          { ac_try='test -s "conftest.$ac_objext"'
22829   { (eval echo "$as_me:22829: \"$ac_try\"") >&5
22830   (eval $ac_try) 2>&5
22831   ac_status=$?
22832   echo "$as_me:22832: \$? = $ac_status" >&5
22833   (exit "$ac_status"); }; }; then
22834   ac_cv_type_intptr_t=yes
22835 else
22836   echo "$as_me: failed program was:" >&5
22837 cat "conftest.$ac_ext" >&5
22838 ac_cv_type_intptr_t=no
22839 fi
22840 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22841 fi
22842 echo "$as_me:22842: result: $ac_cv_type_intptr_t" >&5
22843 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
22844 if test "$ac_cv_type_intptr_t" = yes; then
22845   :
22846 else
22847
22848 cat >>confdefs.h <<EOF
22849 #define intptr_t long
22850 EOF
22851
22852 fi
22853
22854 echo "$as_me:22854: checking for ssize_t" >&5
22855 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22856 if test "${ac_cv_type_ssize_t+set}" = set; then
22857   echo $ECHO_N "(cached) $ECHO_C" >&6
22858 else
22859   cat >"conftest.$ac_ext" <<_ACEOF
22860 #line 22860 "configure"
22861 #include "confdefs.h"
22862 $ac_includes_default
22863 int
22864 main (void)
22865 {
22866 if ((ssize_t *) 0)
22867   return 0;
22868 if (sizeof (ssize_t))
22869   return 0;
22870   ;
22871   return 0;
22872 }
22873 _ACEOF
22874 rm -f "conftest.$ac_objext"
22875 if { (eval echo "$as_me:22875: \"$ac_compile\"") >&5
22876   (eval $ac_compile) 2>&5
22877   ac_status=$?
22878   echo "$as_me:22878: \$? = $ac_status" >&5
22879   (exit "$ac_status"); } &&
22880          { ac_try='test -s "conftest.$ac_objext"'
22881   { (eval echo "$as_me:22881: \"$ac_try\"") >&5
22882   (eval $ac_try) 2>&5
22883   ac_status=$?
22884   echo "$as_me:22884: \$? = $ac_status" >&5
22885   (exit "$ac_status"); }; }; then
22886   ac_cv_type_ssize_t=yes
22887 else
22888   echo "$as_me: failed program was:" >&5
22889 cat "conftest.$ac_ext" >&5
22890 ac_cv_type_ssize_t=no
22891 fi
22892 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22893 fi
22894 echo "$as_me:22894: result: $ac_cv_type_ssize_t" >&5
22895 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
22896 if test "$ac_cv_type_ssize_t" = yes; then
22897   :
22898 else
22899
22900 cat >>confdefs.h <<EOF
22901 #define ssize_t int
22902 EOF
22903
22904 fi
22905
22906 echo "$as_me:22906: checking for type sigaction_t" >&5
22907 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
22908 if test "${cf_cv_type_sigaction+set}" = set; then
22909   echo $ECHO_N "(cached) $ECHO_C" >&6
22910 else
22911
22912         cat >"conftest.$ac_ext" <<_ACEOF
22913 #line 22913 "configure"
22914 #include "confdefs.h"
22915
22916 #include <signal.h>
22917 int
22918 main (void)
22919 {
22920 sigaction_t x
22921   ;
22922   return 0;
22923 }
22924 _ACEOF
22925 rm -f "conftest.$ac_objext"
22926 if { (eval echo "$as_me:22926: \"$ac_compile\"") >&5
22927   (eval $ac_compile) 2>&5
22928   ac_status=$?
22929   echo "$as_me:22929: \$? = $ac_status" >&5
22930   (exit "$ac_status"); } &&
22931          { ac_try='test -s "conftest.$ac_objext"'
22932   { (eval echo "$as_me:22932: \"$ac_try\"") >&5
22933   (eval $ac_try) 2>&5
22934   ac_status=$?
22935   echo "$as_me:22935: \$? = $ac_status" >&5
22936   (exit "$ac_status"); }; }; then
22937   cf_cv_type_sigaction=yes
22938 else
22939   echo "$as_me: failed program was:" >&5
22940 cat "conftest.$ac_ext" >&5
22941 cf_cv_type_sigaction=no
22942 fi
22943 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22944 fi
22945
22946 echo "$as_me:22946: result: $cf_cv_type_sigaction" >&5
22947 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
22948 test "$cf_cv_type_sigaction" = yes &&
22949 cat >>confdefs.h <<\EOF
22950 #define HAVE_TYPE_SIGACTION 1
22951 EOF
22952
22953 echo "$as_me:22953: checking declaration of size-change" >&5
22954 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
22955 if test "${cf_cv_sizechange+set}" = set; then
22956   echo $ECHO_N "(cached) $ECHO_C" >&6
22957 else
22958
22959         cf_cv_sizechange=unknown
22960         cf_save_CPPFLAGS="$CPPFLAGS"
22961
22962 for cf_opts in "" "NEED_PTEM_H"
22963 do
22964
22965         CPPFLAGS="$cf_save_CPPFLAGS"
22966         if test -n "$cf_opts"
22967         then
22968
22969         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22970         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
22971
22972         fi
22973         cat >"conftest.$ac_ext" <<_ACEOF
22974 #line 22974 "configure"
22975 #include "confdefs.h"
22976 #include <sys/types.h>
22977 #ifdef HAVE_TERMIOS_H
22978 #include <termios.h>
22979 #else
22980 #ifdef HAVE_TERMIO_H
22981 #include <termio.h>
22982 #endif
22983 #endif
22984
22985 #ifdef NEED_PTEM_H
22986 /* This is a workaround for SCO:  they neglected to define struct winsize in
22987  * termios.h -- it is only in termio.h and ptem.h
22988  */
22989 #include <sys/stream.h>
22990 #include <sys/ptem.h>
22991 #endif
22992
22993 #ifdef HAVE_SYS_IOCTL_H
22994 #include <sys/ioctl.h>
22995 #endif
22996
22997 int
22998 main (void)
22999 {
23000
23001 #ifdef TIOCGSIZE
23002         struct ttysize win;     /* SunOS 3.0... */
23003         int y = win.ts_lines = 2;
23004         int x = win.ts_cols = 1;
23005         (void)y;
23006         (void)x;
23007 #else
23008 #ifdef TIOCGWINSZ
23009         struct winsize win;     /* everything else */
23010         int y = win.ws_row = 2;
23011         int x = win.ws_col = 1;
23012         (void)y;
23013         (void)x;
23014 #else
23015         no TIOCGSIZE or TIOCGWINSZ
23016 #endif /* TIOCGWINSZ */
23017 #endif /* TIOCGSIZE */
23018
23019   ;
23020   return 0;
23021 }
23022 _ACEOF
23023 rm -f "conftest.$ac_objext"
23024 if { (eval echo "$as_me:23024: \"$ac_compile\"") >&5
23025   (eval $ac_compile) 2>&5
23026   ac_status=$?
23027   echo "$as_me:23027: \$? = $ac_status" >&5
23028   (exit "$ac_status"); } &&
23029          { ac_try='test -s "conftest.$ac_objext"'
23030   { (eval echo "$as_me:23030: \"$ac_try\"") >&5
23031   (eval $ac_try) 2>&5
23032   ac_status=$?
23033   echo "$as_me:23033: \$? = $ac_status" >&5
23034   (exit "$ac_status"); }; }; then
23035   cf_cv_sizechange=yes
23036 else
23037   echo "$as_me: failed program was:" >&5
23038 cat "conftest.$ac_ext" >&5
23039 cf_cv_sizechange=no
23040 fi
23041 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23042
23043         CPPFLAGS="$cf_save_CPPFLAGS"
23044         if test "$cf_cv_sizechange" = yes ; then
23045                 echo "size-change succeeded ($cf_opts)" >&5
23046                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
23047                 break
23048         fi
23049 done
23050
23051 fi
23052 echo "$as_me:23052: result: $cf_cv_sizechange" >&5
23053 echo "${ECHO_T}$cf_cv_sizechange" >&6
23054 if test "$cf_cv_sizechange" != no ; then
23055
23056 cat >>confdefs.h <<\EOF
23057 #define HAVE_SIZECHANGE 1
23058 EOF
23059
23060         case "$cf_cv_sizechange" in
23061         (NEED*)
23062                 cat >>confdefs.h <<EOF
23063 #define $cf_cv_sizechange  1
23064 EOF
23065
23066                 ;;
23067         esac
23068 fi
23069
23070 echo "$as_me:23070: checking for memmove" >&5
23071 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
23072 if test "${ac_cv_func_memmove+set}" = set; then
23073   echo $ECHO_N "(cached) $ECHO_C" >&6
23074 else
23075   cat >"conftest.$ac_ext" <<_ACEOF
23076 #line 23076 "configure"
23077 #include "confdefs.h"
23078 #define memmove autoconf_temporary
23079 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23080 #undef memmove
23081
23082 #ifdef __cplusplus
23083 extern "C"
23084 #endif
23085
23086 /* We use char because int might match the return type of a gcc2
23087    builtin and then its argument prototype would still apply.  */
23088 char memmove (void);
23089
23090 int
23091 main (void)
23092 {
23093
23094 /* The GNU C library defines stubs for functions which it implements
23095     to always fail with ENOSYS.  Some functions are actually named
23096     something starting with __ and the normal name is an alias.  */
23097 #if defined (__stub_memmove) || defined (__stub___memmove)
23098 #error found stub for memmove
23099 #endif
23100
23101         return memmove ();
23102   ;
23103   return 0;
23104 }
23105 _ACEOF
23106 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23107 if { (eval echo "$as_me:23107: \"$ac_link\"") >&5
23108   (eval $ac_link) 2>&5
23109   ac_status=$?
23110   echo "$as_me:23110: \$? = $ac_status" >&5
23111   (exit "$ac_status"); } &&
23112          { ac_try='test -s "conftest$ac_exeext"'
23113   { (eval echo "$as_me:23113: \"$ac_try\"") >&5
23114   (eval $ac_try) 2>&5
23115   ac_status=$?
23116   echo "$as_me:23116: \$? = $ac_status" >&5
23117   (exit "$ac_status"); }; }; then
23118   ac_cv_func_memmove=yes
23119 else
23120   echo "$as_me: failed program was:" >&5
23121 cat "conftest.$ac_ext" >&5
23122 ac_cv_func_memmove=no
23123 fi
23124 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23125 fi
23126 echo "$as_me:23126: result: $ac_cv_func_memmove" >&5
23127 echo "${ECHO_T}$ac_cv_func_memmove" >&6
23128 if test "$ac_cv_func_memmove" = yes; then
23129   :
23130 else
23131
23132 echo "$as_me:23132: checking for bcopy" >&5
23133 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
23134 if test "${ac_cv_func_bcopy+set}" = set; then
23135   echo $ECHO_N "(cached) $ECHO_C" >&6
23136 else
23137   cat >"conftest.$ac_ext" <<_ACEOF
23138 #line 23138 "configure"
23139 #include "confdefs.h"
23140 #define bcopy autoconf_temporary
23141 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23142 #undef bcopy
23143
23144 #ifdef __cplusplus
23145 extern "C"
23146 #endif
23147
23148 /* We use char because int might match the return type of a gcc2
23149    builtin and then its argument prototype would still apply.  */
23150 char bcopy (void);
23151
23152 int
23153 main (void)
23154 {
23155
23156 /* The GNU C library defines stubs for functions which it implements
23157     to always fail with ENOSYS.  Some functions are actually named
23158     something starting with __ and the normal name is an alias.  */
23159 #if defined (__stub_bcopy) || defined (__stub___bcopy)
23160 #error found stub for bcopy
23161 #endif
23162
23163         return bcopy ();
23164   ;
23165   return 0;
23166 }
23167 _ACEOF
23168 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23169 if { (eval echo "$as_me:23169: \"$ac_link\"") >&5
23170   (eval $ac_link) 2>&5
23171   ac_status=$?
23172   echo "$as_me:23172: \$? = $ac_status" >&5
23173   (exit "$ac_status"); } &&
23174          { ac_try='test -s "conftest$ac_exeext"'
23175   { (eval echo "$as_me:23175: \"$ac_try\"") >&5
23176   (eval $ac_try) 2>&5
23177   ac_status=$?
23178   echo "$as_me:23178: \$? = $ac_status" >&5
23179   (exit "$ac_status"); }; }; then
23180   ac_cv_func_bcopy=yes
23181 else
23182   echo "$as_me: failed program was:" >&5
23183 cat "conftest.$ac_ext" >&5
23184 ac_cv_func_bcopy=no
23185 fi
23186 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23187 fi
23188 echo "$as_me:23188: result: $ac_cv_func_bcopy" >&5
23189 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
23190 if test "$ac_cv_func_bcopy" = yes; then
23191
23192         echo "$as_me:23192: checking if bcopy does overlapping moves" >&5
23193 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
23194 if test "${cf_cv_good_bcopy+set}" = set; then
23195   echo $ECHO_N "(cached) $ECHO_C" >&6
23196 else
23197
23198                 if test "$cross_compiling" = yes; then
23199   cf_cv_good_bcopy=unknown
23200 else
23201   cat >"conftest.$ac_ext" <<_ACEOF
23202 #line 23202 "configure"
23203 #include "confdefs.h"
23204
23205 $ac_includes_default
23206
23207 int main(void) {
23208         static char data[] = "abcdefghijklmnopqrstuwwxyz";
23209         char temp[40];
23210         bcopy(data, temp, sizeof(data));
23211         bcopy(temp+10, temp, 15);
23212         bcopy(temp+5, temp+15, 10);
23213         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
23214 }
23215
23216 _ACEOF
23217 rm -f "conftest$ac_exeext"
23218 if { (eval echo "$as_me:23218: \"$ac_link\"") >&5
23219   (eval $ac_link) 2>&5
23220   ac_status=$?
23221   echo "$as_me:23221: \$? = $ac_status" >&5
23222   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23223   { (eval echo "$as_me:23223: \"$ac_try\"") >&5
23224   (eval $ac_try) 2>&5
23225   ac_status=$?
23226   echo "$as_me:23226: \$? = $ac_status" >&5
23227   (exit "$ac_status"); }; }; then
23228   cf_cv_good_bcopy=yes
23229 else
23230   echo "$as_me: program exited with status $ac_status" >&5
23231 echo "$as_me: failed program was:" >&5
23232 cat "conftest.$ac_ext" >&5
23233 cf_cv_good_bcopy=no
23234 fi
23235 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23236 fi
23237
23238 fi
23239 echo "$as_me:23239: result: $cf_cv_good_bcopy" >&5
23240 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
23241
23242 else
23243   cf_cv_good_bcopy=no
23244 fi
23245
23246         if test "$cf_cv_good_bcopy" = yes ; then
23247
23248 cat >>confdefs.h <<\EOF
23249 #define USE_OK_BCOPY 1
23250 EOF
23251
23252         else
23253
23254 cat >>confdefs.h <<\EOF
23255 #define USE_MY_MEMMOVE 1
23256 EOF
23257
23258         fi
23259
23260 fi
23261
23262 tty >/dev/null 2>&1 || {
23263 for ac_func in posix_openpt
23264 do
23265 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23266 echo "$as_me:23266: checking for $ac_func" >&5
23267 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23268 if eval "test \"\${$as_ac_var+set}\" = set"; then
23269   echo $ECHO_N "(cached) $ECHO_C" >&6
23270 else
23271   cat >"conftest.$ac_ext" <<_ACEOF
23272 #line 23272 "configure"
23273 #include "confdefs.h"
23274 #define $ac_func autoconf_temporary
23275 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23276 #undef $ac_func
23277
23278 #ifdef __cplusplus
23279 extern "C"
23280 #endif
23281
23282 /* We use char because int might match the return type of a gcc2
23283    builtin and then its argument prototype would still apply.  */
23284 char $ac_func (void);
23285
23286 int
23287 main (void)
23288 {
23289
23290 /* The GNU C library defines stubs for functions which it implements
23291     to always fail with ENOSYS.  Some functions are actually named
23292     something starting with __ and the normal name is an alias.  */
23293 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23294 #error found stub for $ac_func
23295 #endif
23296
23297         return $ac_func ();
23298   ;
23299   return 0;
23300 }
23301 _ACEOF
23302 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23303 if { (eval echo "$as_me:23303: \"$ac_link\"") >&5
23304   (eval $ac_link) 2>&5
23305   ac_status=$?
23306   echo "$as_me:23306: \$? = $ac_status" >&5
23307   (exit "$ac_status"); } &&
23308          { ac_try='test -s "conftest$ac_exeext"'
23309   { (eval echo "$as_me:23309: \"$ac_try\"") >&5
23310   (eval $ac_try) 2>&5
23311   ac_status=$?
23312   echo "$as_me:23312: \$? = $ac_status" >&5
23313   (exit "$ac_status"); }; }; then
23314   eval "$as_ac_var=yes"
23315 else
23316   echo "$as_me: failed program was:" >&5
23317 cat "conftest.$ac_ext" >&5
23318 eval "$as_ac_var=no"
23319 fi
23320 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23321 fi
23322 echo "$as_me:23322: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23323 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23324 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23325   cat >>confdefs.h <<EOF
23326 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23327 EOF
23328
23329 fi
23330 done
23331  }
23332 echo "$as_me:23332: checking if poll really works" >&5
23333 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
23334 if test "${cf_cv_working_poll+set}" = set; then
23335   echo $ECHO_N "(cached) $ECHO_C" >&6
23336 else
23337
23338 if test "$cross_compiling" = yes; then
23339   cf_cv_working_poll=unknown
23340 else
23341   cat >"conftest.$ac_ext" <<_ACEOF
23342 #line 23342 "configure"
23343 #include "confdefs.h"
23344
23345 $ac_includes_default
23346
23347 #include <fcntl.h>
23348
23349 #ifdef HAVE_POLL_H
23350 #include <poll.h>
23351 #else
23352 #include <sys/poll.h>
23353 #endif
23354
23355 int main(void) {
23356         struct pollfd myfds;
23357         int ret;
23358
23359         /* check for Darwin bug with respect to "devices" */
23360         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
23361         if (myfds.fd < 0)
23362                 myfds.fd = 0;
23363         myfds.events = POLLIN;
23364         myfds.revents = 0;
23365
23366         ret = poll(&myfds, 1, 100);
23367
23368         if (ret < 0 || (myfds.revents & POLLNVAL)) {
23369                 ret = -1;
23370         } else {
23371                 int fd = 0;
23372                 if (!isatty(fd)) {
23373                         fd = open("/dev/tty", 2);       /* O_RDWR */
23374                 }
23375 #ifdef HAVE_POSIX_OPENPT
23376                 if (fd < 0) {
23377                         fd = posix_openpt(O_RDWR);
23378                 }
23379 #endif
23380
23381                 if (fd >= 0) {
23382                         /* also check with standard input */
23383                         myfds.fd = fd;
23384                         myfds.events = POLLIN;
23385                         myfds.revents = 0;
23386                         ret = poll(&myfds, 1, 100);
23387                 } else {
23388                         ret = -1;
23389                 }
23390         }
23391         ${cf_cv_main_return:-return}(ret < 0);
23392 }
23393 _ACEOF
23394 rm -f "conftest$ac_exeext"
23395 if { (eval echo "$as_me:23395: \"$ac_link\"") >&5
23396   (eval $ac_link) 2>&5
23397   ac_status=$?
23398   echo "$as_me:23398: \$? = $ac_status" >&5
23399   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23400   { (eval echo "$as_me:23400: \"$ac_try\"") >&5
23401   (eval $ac_try) 2>&5
23402   ac_status=$?
23403   echo "$as_me:23403: \$? = $ac_status" >&5
23404   (exit "$ac_status"); }; }; then
23405   cf_cv_working_poll=yes
23406 else
23407   echo "$as_me: program exited with status $ac_status" >&5
23408 echo "$as_me: failed program was:" >&5
23409 cat "conftest.$ac_ext" >&5
23410 cf_cv_working_poll=no
23411 fi
23412 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23413 fi
23414 fi
23415 echo "$as_me:23415: result: $cf_cv_working_poll" >&5
23416 echo "${ECHO_T}$cf_cv_working_poll" >&6
23417 test "$cf_cv_working_poll" = "yes" &&
23418 cat >>confdefs.h <<\EOF
23419 #define HAVE_WORKING_POLL 1
23420 EOF
23421
23422 echo "$as_me:23422: checking for va_copy" >&5
23423 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
23424 if test "${cf_cv_have_va_copy+set}" = set; then
23425   echo $ECHO_N "(cached) $ECHO_C" >&6
23426 else
23427
23428 cat >"conftest.$ac_ext" <<_ACEOF
23429 #line 23429 "configure"
23430 #include "confdefs.h"
23431
23432 #include <stdarg.h>
23433
23434 int
23435 main (void)
23436 {
23437
23438         static va_list dst;
23439         static va_list src;
23440         va_copy(dst, src)
23441   ;
23442   return 0;
23443 }
23444 _ACEOF
23445 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23446 if { (eval echo "$as_me:23446: \"$ac_link\"") >&5
23447   (eval $ac_link) 2>&5
23448   ac_status=$?
23449   echo "$as_me:23449: \$? = $ac_status" >&5
23450   (exit "$ac_status"); } &&
23451          { ac_try='test -s "conftest$ac_exeext"'
23452   { (eval echo "$as_me:23452: \"$ac_try\"") >&5
23453   (eval $ac_try) 2>&5
23454   ac_status=$?
23455   echo "$as_me:23455: \$? = $ac_status" >&5
23456   (exit "$ac_status"); }; }; then
23457   cf_cv_have_va_copy=yes
23458 else
23459   echo "$as_me: failed program was:" >&5
23460 cat "conftest.$ac_ext" >&5
23461 cf_cv_have_va_copy=no
23462 fi
23463 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23464 fi
23465 echo "$as_me:23465: result: $cf_cv_have_va_copy" >&5
23466 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
23467
23468 if test "$cf_cv_have_va_copy" = yes;
23469 then
23470
23471 cat >>confdefs.h <<\EOF
23472 #define HAVE_VA_COPY 1
23473 EOF
23474
23475 else # !cf_cv_have_va_copy
23476
23477 echo "$as_me:23477: checking for __va_copy" >&5
23478 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
23479 if test "${cf_cv_have___va_copy+set}" = set; then
23480   echo $ECHO_N "(cached) $ECHO_C" >&6
23481 else
23482
23483 cat >"conftest.$ac_ext" <<_ACEOF
23484 #line 23484 "configure"
23485 #include "confdefs.h"
23486
23487 #include <stdarg.h>
23488
23489 int
23490 main (void)
23491 {
23492
23493         static va_list dst;
23494         static va_list src;
23495         __va_copy(dst, src)
23496   ;
23497   return 0;
23498 }
23499 _ACEOF
23500 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23501 if { (eval echo "$as_me:23501: \"$ac_link\"") >&5
23502   (eval $ac_link) 2>&5
23503   ac_status=$?
23504   echo "$as_me:23504: \$? = $ac_status" >&5
23505   (exit "$ac_status"); } &&
23506          { ac_try='test -s "conftest$ac_exeext"'
23507   { (eval echo "$as_me:23507: \"$ac_try\"") >&5
23508   (eval $ac_try) 2>&5
23509   ac_status=$?
23510   echo "$as_me:23510: \$? = $ac_status" >&5
23511   (exit "$ac_status"); }; }; then
23512   cf_cv_have___va_copy=yes
23513 else
23514   echo "$as_me: failed program was:" >&5
23515 cat "conftest.$ac_ext" >&5
23516 cf_cv_have___va_copy=no
23517 fi
23518 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23519 fi
23520 echo "$as_me:23520: result: $cf_cv_have___va_copy" >&5
23521 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
23522
23523 if test "$cf_cv_have___va_copy" = yes
23524 then
23525
23526 cat >>confdefs.h <<\EOF
23527 #define HAVE___VA_COPY 1
23528 EOF
23529
23530 else # !cf_cv_have___va_copy
23531
23532 echo "$as_me:23532: checking for __builtin_va_copy" >&5
23533 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
23534 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
23535   echo $ECHO_N "(cached) $ECHO_C" >&6
23536 else
23537
23538 cat >"conftest.$ac_ext" <<_ACEOF
23539 #line 23539 "configure"
23540 #include "confdefs.h"
23541
23542 #include <stdarg.h>
23543
23544 int
23545 main (void)
23546 {
23547
23548         static va_list dst;
23549         static va_list src;
23550         __builtin_va_copy(dst, src)
23551   ;
23552   return 0;
23553 }
23554 _ACEOF
23555 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23556 if { (eval echo "$as_me:23556: \"$ac_link\"") >&5
23557   (eval $ac_link) 2>&5
23558   ac_status=$?
23559   echo "$as_me:23559: \$? = $ac_status" >&5
23560   (exit "$ac_status"); } &&
23561          { ac_try='test -s "conftest$ac_exeext"'
23562   { (eval echo "$as_me:23562: \"$ac_try\"") >&5
23563   (eval $ac_try) 2>&5
23564   ac_status=$?
23565   echo "$as_me:23565: \$? = $ac_status" >&5
23566   (exit "$ac_status"); }; }; then
23567   cf_cv_have___builtin_va_copy=yes
23568 else
23569   echo "$as_me: failed program was:" >&5
23570 cat "conftest.$ac_ext" >&5
23571 cf_cv_have___builtin_va_copy=no
23572 fi
23573 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23574 fi
23575 echo "$as_me:23575: result: $cf_cv_have___builtin_va_copy" >&5
23576 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
23577
23578 test "$cf_cv_have___builtin_va_copy" = yes &&
23579
23580 cat >>confdefs.h <<\EOF
23581 #define HAVE___BUILTIN_VA_COPY 1
23582 EOF
23583
23584 fi # cf_cv_have___va_copy
23585
23586 fi # cf_cv_have_va_copy
23587
23588 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
23589 (*yes*)
23590         ;;
23591
23592 (*)
23593         echo "$as_me:23593: checking if we can simply copy va_list" >&5
23594 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
23595 if test "${cf_cv_pointer_va_list+set}" = set; then
23596   echo $ECHO_N "(cached) $ECHO_C" >&6
23597 else
23598
23599 cat >"conftest.$ac_ext" <<_ACEOF
23600 #line 23600 "configure"
23601 #include "confdefs.h"
23602
23603 #include <stdarg.h>
23604
23605 int
23606 main (void)
23607 {
23608
23609         va_list dst;
23610         va_list src;
23611         dst = src
23612   ;
23613   return 0;
23614 }
23615 _ACEOF
23616 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23617 if { (eval echo "$as_me:23617: \"$ac_link\"") >&5
23618   (eval $ac_link) 2>&5
23619   ac_status=$?
23620   echo "$as_me:23620: \$? = $ac_status" >&5
23621   (exit "$ac_status"); } &&
23622          { ac_try='test -s "conftest$ac_exeext"'
23623   { (eval echo "$as_me:23623: \"$ac_try\"") >&5
23624   (eval $ac_try) 2>&5
23625   ac_status=$?
23626   echo "$as_me:23626: \$? = $ac_status" >&5
23627   (exit "$ac_status"); }; }; then
23628   cf_cv_pointer_va_list=yes
23629 else
23630   echo "$as_me: failed program was:" >&5
23631 cat "conftest.$ac_ext" >&5
23632 cf_cv_pointer_va_list=no
23633 fi
23634 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23635 fi
23636 echo "$as_me:23636: result: $cf_cv_pointer_va_list" >&5
23637 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
23638
23639         if test "$cf_cv_pointer_va_list" = no
23640         then
23641                 echo "$as_me:23641: checking if we can copy va_list indirectly" >&5
23642 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
23643 if test "${cf_cv_array_va_list+set}" = set; then
23644   echo $ECHO_N "(cached) $ECHO_C" >&6
23645 else
23646
23647 cat >"conftest.$ac_ext" <<_ACEOF
23648 #line 23648 "configure"
23649 #include "confdefs.h"
23650
23651 #include <stdarg.h>
23652
23653 int
23654 main (void)
23655 {
23656
23657         va_list dst;
23658         va_list src;
23659         *dst = *src
23660   ;
23661   return 0;
23662 }
23663 _ACEOF
23664 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23665 if { (eval echo "$as_me:23665: \"$ac_link\"") >&5
23666   (eval $ac_link) 2>&5
23667   ac_status=$?
23668   echo "$as_me:23668: \$? = $ac_status" >&5
23669   (exit "$ac_status"); } &&
23670          { ac_try='test -s "conftest$ac_exeext"'
23671   { (eval echo "$as_me:23671: \"$ac_try\"") >&5
23672   (eval $ac_try) 2>&5
23673   ac_status=$?
23674   echo "$as_me:23674: \$? = $ac_status" >&5
23675   (exit "$ac_status"); }; }; then
23676   cf_cv_array_va_list=yes
23677 else
23678   echo "$as_me: failed program was:" >&5
23679 cat "conftest.$ac_ext" >&5
23680 cf_cv_array_va_list=no
23681 fi
23682 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23683 fi
23684 echo "$as_me:23684: result: $cf_cv_array_va_list" >&5
23685 echo "${ECHO_T}$cf_cv_array_va_list" >&6
23686                 test "$cf_cv_array_va_list" = yes &&
23687 cat >>confdefs.h <<\EOF
23688 #define ARRAY_VA_LIST 1
23689 EOF
23690
23691         fi
23692         ;;
23693 esac
23694
23695 echo "$as_me:23695: checking for pid_t" >&5
23696 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23697 if test "${ac_cv_type_pid_t+set}" = set; then
23698   echo $ECHO_N "(cached) $ECHO_C" >&6
23699 else
23700   cat >"conftest.$ac_ext" <<_ACEOF
23701 #line 23701 "configure"
23702 #include "confdefs.h"
23703 $ac_includes_default
23704 int
23705 main (void)
23706 {
23707 if ((pid_t *) 0)
23708   return 0;
23709 if (sizeof (pid_t))
23710   return 0;
23711   ;
23712   return 0;
23713 }
23714 _ACEOF
23715 rm -f "conftest.$ac_objext"
23716 if { (eval echo "$as_me:23716: \"$ac_compile\"") >&5
23717   (eval $ac_compile) 2>&5
23718   ac_status=$?
23719   echo "$as_me:23719: \$? = $ac_status" >&5
23720   (exit "$ac_status"); } &&
23721          { ac_try='test -s "conftest.$ac_objext"'
23722   { (eval echo "$as_me:23722: \"$ac_try\"") >&5
23723   (eval $ac_try) 2>&5
23724   ac_status=$?
23725   echo "$as_me:23725: \$? = $ac_status" >&5
23726   (exit "$ac_status"); }; }; then
23727   ac_cv_type_pid_t=yes
23728 else
23729   echo "$as_me: failed program was:" >&5
23730 cat "conftest.$ac_ext" >&5
23731 ac_cv_type_pid_t=no
23732 fi
23733 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23734 fi
23735 echo "$as_me:23735: result: $ac_cv_type_pid_t" >&5
23736 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
23737 if test "$ac_cv_type_pid_t" = yes; then
23738   :
23739 else
23740
23741 cat >>confdefs.h <<EOF
23742 #define pid_t int
23743 EOF
23744
23745 fi
23746
23747 for ac_header in unistd.h vfork.h
23748 do
23749 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23750 echo "$as_me:23750: checking for $ac_header" >&5
23751 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23752 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23753   echo $ECHO_N "(cached) $ECHO_C" >&6
23754 else
23755   cat >"conftest.$ac_ext" <<_ACEOF
23756 #line 23756 "configure"
23757 #include "confdefs.h"
23758 #include <$ac_header>
23759 _ACEOF
23760 if { (eval echo "$as_me:23760: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23761   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23762   ac_status=$?
23763   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23764   rm -f conftest.er1
23765   cat conftest.err >&5
23766   echo "$as_me:23766: \$? = $ac_status" >&5
23767   (exit "$ac_status"); } >/dev/null; then
23768   if test -s conftest.err; then
23769     ac_cpp_err=$ac_c_preproc_warn_flag
23770   else
23771     ac_cpp_err=
23772   fi
23773 else
23774   ac_cpp_err=yes
23775 fi
23776 if test -z "$ac_cpp_err"; then
23777   eval "$as_ac_Header=yes"
23778 else
23779   echo "$as_me: failed program was:" >&5
23780   cat "conftest.$ac_ext" >&5
23781   eval "$as_ac_Header=no"
23782 fi
23783 rm -f conftest.err "conftest.$ac_ext"
23784 fi
23785 echo "$as_me:23785: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23786 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23787 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23788   cat >>confdefs.h <<EOF
23789 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23790 EOF
23791
23792 fi
23793 done
23794
23795 for ac_func in fork vfork
23796 do
23797 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23798 echo "$as_me:23798: checking for $ac_func" >&5
23799 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23800 if eval "test \"\${$as_ac_var+set}\" = set"; then
23801   echo $ECHO_N "(cached) $ECHO_C" >&6
23802 else
23803   cat >"conftest.$ac_ext" <<_ACEOF
23804 #line 23804 "configure"
23805 #include "confdefs.h"
23806 #define $ac_func autoconf_temporary
23807 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23808 #undef $ac_func
23809
23810 #ifdef __cplusplus
23811 extern "C"
23812 #endif
23813
23814 /* We use char because int might match the return type of a gcc2
23815    builtin and then its argument prototype would still apply.  */
23816 char $ac_func (void);
23817
23818 int
23819 main (void)
23820 {
23821
23822 /* The GNU C library defines stubs for functions which it implements
23823     to always fail with ENOSYS.  Some functions are actually named
23824     something starting with __ and the normal name is an alias.  */
23825 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23826 #error found stub for $ac_func
23827 #endif
23828
23829         return $ac_func ();
23830   ;
23831   return 0;
23832 }
23833 _ACEOF
23834 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23835 if { (eval echo "$as_me:23835: \"$ac_link\"") >&5
23836   (eval $ac_link) 2>&5
23837   ac_status=$?
23838   echo "$as_me:23838: \$? = $ac_status" >&5
23839   (exit "$ac_status"); } &&
23840          { ac_try='test -s "conftest$ac_exeext"'
23841   { (eval echo "$as_me:23841: \"$ac_try\"") >&5
23842   (eval $ac_try) 2>&5
23843   ac_status=$?
23844   echo "$as_me:23844: \$? = $ac_status" >&5
23845   (exit "$ac_status"); }; }; then
23846   eval "$as_ac_var=yes"
23847 else
23848   echo "$as_me: failed program was:" >&5
23849 cat "conftest.$ac_ext" >&5
23850 eval "$as_ac_var=no"
23851 fi
23852 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23853 fi
23854 echo "$as_me:23854: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23855 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23856 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23857   cat >>confdefs.h <<EOF
23858 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23859 EOF
23860
23861 fi
23862 done
23863
23864 ac_cv_func_fork_works=$ac_cv_func_fork
23865 if test "x$ac_cv_func_fork" = xyes; then
23866   echo "$as_me:23866: checking for working fork" >&5
23867 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23868 if test "${ac_cv_func_fork_works+set}" = set; then
23869   echo $ECHO_N "(cached) $ECHO_C" >&6
23870 else
23871   if test "$cross_compiling" = yes; then
23872   ac_cv_func_fork_works=cross
23873 else
23874   cat >"conftest.$ac_ext" <<_ACEOF
23875 /* By Rüdiger Kuhlmann. */
23876       #include <sys/types.h>
23877       #if HAVE_UNISTD_H
23878       # include <unistd.h>
23879       #endif
23880       /* Some systems only have a dummy stub for fork() */
23881       int main (void)
23882       {
23883         if (fork() < 0)
23884           $ac_main_return (1);
23885         $ac_main_return (0);
23886       }
23887 _ACEOF
23888 rm -f "conftest$ac_exeext"
23889 if { (eval echo "$as_me:23889: \"$ac_link\"") >&5
23890   (eval $ac_link) 2>&5
23891   ac_status=$?
23892   echo "$as_me:23892: \$? = $ac_status" >&5
23893   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23894   { (eval echo "$as_me:23894: \"$ac_try\"") >&5
23895   (eval $ac_try) 2>&5
23896   ac_status=$?
23897   echo "$as_me:23897: \$? = $ac_status" >&5
23898   (exit "$ac_status"); }; }; then
23899   ac_cv_func_fork_works=yes
23900 else
23901   echo "$as_me: program exited with status $ac_status" >&5
23902 echo "$as_me: failed program was:" >&5
23903 cat "conftest.$ac_ext" >&5
23904 ac_cv_func_fork_works=no
23905 fi
23906 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23907 fi
23908 fi
23909 echo "$as_me:23909: result: $ac_cv_func_fork_works" >&5
23910 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
23911
23912 fi
23913 if test "x$ac_cv_func_fork_works" = xcross; then
23914   case $host in
23915     *-*-amigaos* | *-*-msdosdjgpp*)
23916       # Override, as these systems have only a dummy fork() stub
23917       ac_cv_func_fork_works=no
23918       ;;
23919     *)
23920       ac_cv_func_fork_works=yes
23921       ;;
23922   esac
23923   { echo "$as_me:23923: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
23924 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
23925 fi
23926 ac_cv_func_vfork_works=$ac_cv_func_vfork
23927 if test "x$ac_cv_func_vfork" = xyes; then
23928   echo "$as_me:23928: checking for working vfork" >&5
23929 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
23930 if test "${ac_cv_func_vfork_works+set}" = set; then
23931   echo $ECHO_N "(cached) $ECHO_C" >&6
23932 else
23933   if test "$cross_compiling" = yes; then
23934   ac_cv_func_vfork_works=cross
23935 else
23936   cat >"conftest.$ac_ext" <<_ACEOF
23937 #line 23937 "configure"
23938 #include "confdefs.h"
23939 /* Thanks to Paul Eggert for this test.  */
23940 #include <stdio.h>
23941 #include <sys/types.h>
23942 #include <sys/stat.h>
23943 #if HAVE_UNISTD_H
23944 # include <unistd.h>
23945 #endif
23946 #if HAVE_VFORK_H
23947 # include <vfork.h>
23948 #endif
23949 /* On some sparc systems, changes by the child to local and incoming
23950    argument registers are propagated back to the parent.  The compiler
23951    is told about this with #include <vfork.h>, but some compilers
23952    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
23953    static variable whose address is put into a register that is
23954    clobbered by the vfork.  */
23955 static
23956 #ifdef __cplusplus
23957 sparc_address_test (int arg)
23958 # else
23959 sparc_address_test (arg) int arg;
23960 #endif
23961 {
23962   static pid_t child;
23963   if (!child) {
23964     child = vfork ();
23965     if (child < 0) {
23966       perror ("vfork");
23967       _exit(2);
23968     }
23969     if (!child) {
23970       arg = getpid();
23971       write(-1, "", 0);
23972       _exit (arg);
23973     }
23974   }
23975 }
23976
23977 int
23978 main (void)
23979 {
23980   pid_t parent = getpid ();
23981   pid_t child;
23982
23983   sparc_address_test ();
23984
23985   child = vfork ();
23986
23987   if (child == 0) {
23988     /* Here is another test for sparc vfork register problems.  This
23989        test uses lots of local variables, at least as many local
23990        variables as main has allocated so far including compiler
23991        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
23992        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
23993        reuse the register of parent for one of the local variables,
23994        since it will think that parent can't possibly be used any more
23995        in this routine.  Assigning to the local variable will thus
23996        munge parent in the parent process.  */
23997     pid_t
23998       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23999       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
24000     /* Convince the compiler that p..p7 are live; otherwise, it might
24001        use the same hardware register for all 8 local variables.  */
24002     if (p != p1 || p != p2 || p != p3 || p != p4
24003         || p != p5 || p != p6 || p != p7)
24004       _exit(1);
24005
24006     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
24007        from child file descriptors.  If the child closes a descriptor
24008        before it execs or exits, this munges the parent's descriptor
24009        as well.  Test for this by closing stdout in the child.  */
24010     _exit(close(fileno(stdout)) != 0);
24011   } else {
24012     int status;
24013     struct stat st;
24014
24015     while (wait(&status) != child)
24016       ;
24017     $ac_main_return(
24018          /* Was there some problem with vforking?  */
24019          child < 0
24020
24021          /* Did the child fail?  (This shouldn't happen.)  */
24022          || status
24023
24024          /* Did the vfork/compiler bug occur?  */
24025          || parent != getpid()
24026
24027          /* Did the file descriptor bug occur?  */
24028          || fstat(fileno(stdout), &st) != 0
24029          );
24030   }
24031 }
24032 _ACEOF
24033 rm -f "conftest$ac_exeext"
24034 if { (eval echo "$as_me:24034: \"$ac_link\"") >&5
24035   (eval $ac_link) 2>&5
24036   ac_status=$?
24037   echo "$as_me:24037: \$? = $ac_status" >&5
24038   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24039   { (eval echo "$as_me:24039: \"$ac_try\"") >&5
24040   (eval $ac_try) 2>&5
24041   ac_status=$?
24042   echo "$as_me:24042: \$? = $ac_status" >&5
24043   (exit "$ac_status"); }; }; then
24044   ac_cv_func_vfork_works=yes
24045 else
24046   echo "$as_me: program exited with status $ac_status" >&5
24047 echo "$as_me: failed program was:" >&5
24048 cat "conftest.$ac_ext" >&5
24049 ac_cv_func_vfork_works=no
24050 fi
24051 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24052 fi
24053 fi
24054 echo "$as_me:24054: result: $ac_cv_func_vfork_works" >&5
24055 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
24056
24057 fi;
24058 if test "x$ac_cv_func_fork_works" = xcross; then
24059   ac_cv_func_vfork_works=ac_cv_func_vfork
24060   { echo "$as_me:24060: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
24061 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
24062 fi
24063
24064 if test "x$ac_cv_func_vfork_works" = xyes; then
24065
24066 cat >>confdefs.h <<\EOF
24067 #define HAVE_WORKING_VFORK 1
24068 EOF
24069
24070 else
24071
24072 cat >>confdefs.h <<\EOF
24073 #define vfork fork
24074 EOF
24075
24076 fi
24077 if test "x$ac_cv_func_fork_works" = xyes; then
24078
24079 cat >>confdefs.h <<\EOF
24080 #define HAVE_WORKING_FORK 1
24081 EOF
24082
24083 fi
24084
24085 echo "$as_me:24085: checking if fopen accepts explicit binary mode" >&5
24086 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
24087 if test "${cf_cv_fopen_bin_r+set}" = set; then
24088   echo $ECHO_N "(cached) $ECHO_C" >&6
24089 else
24090
24091         if test "$cross_compiling" = yes; then
24092   cf_cv_fopen_bin_r=unknown
24093 else
24094   cat >"conftest.$ac_ext" <<_ACEOF
24095 #line 24095 "configure"
24096 #include "confdefs.h"
24097
24098 $ac_includes_default
24099
24100 int main(void)
24101 {
24102         FILE *fp = fopen("conftest.tmp", "wb");
24103         int rc = 0;
24104         if (fp != 0) {
24105                 int p, q;
24106                 for (p = 0; p < 256; ++p) {
24107                         fputc(p, fp);
24108                 }
24109                 fclose(fp);
24110                 fp = fopen("conftest.tmp", "rb");
24111                 if (fp != 0) {
24112                         for (p = 0; p < 256; ++p) {
24113                                 q = fgetc(fp);
24114                                 if (q != p) {
24115                                         rc = 1;
24116                                         break;
24117                                 }
24118                         }
24119                 } else {
24120                         rc = 1;
24121                 }
24122         } else {
24123                 rc = 1;
24124         }
24125         ${cf_cv_main_return:-return} (rc);
24126 }
24127
24128 _ACEOF
24129 rm -f "conftest$ac_exeext"
24130 if { (eval echo "$as_me:24130: \"$ac_link\"") >&5
24131   (eval $ac_link) 2>&5
24132   ac_status=$?
24133   echo "$as_me:24133: \$? = $ac_status" >&5
24134   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24135   { (eval echo "$as_me:24135: \"$ac_try\"") >&5
24136   (eval $ac_try) 2>&5
24137   ac_status=$?
24138   echo "$as_me:24138: \$? = $ac_status" >&5
24139   (exit "$ac_status"); }; }; then
24140   cf_cv_fopen_bin_r=yes
24141 else
24142   echo "$as_me: program exited with status $ac_status" >&5
24143 echo "$as_me: failed program was:" >&5
24144 cat "conftest.$ac_ext" >&5
24145 cf_cv_fopen_bin_r=no
24146 fi
24147 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24148 fi
24149
24150 fi
24151 echo "$as_me:24151: result: $cf_cv_fopen_bin_r" >&5
24152 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
24153 test "x$cf_cv_fopen_bin_r" != xno &&
24154 cat >>confdefs.h <<\EOF
24155 #define USE_FOPEN_BIN_R 1
24156 EOF
24157
24158 # special check for test/ditto.c
24159
24160 echo "$as_me:24160: checking for openpty in -lutil" >&5
24161 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
24162 if test "${ac_cv_lib_util_openpty+set}" = set; then
24163   echo $ECHO_N "(cached) $ECHO_C" >&6
24164 else
24165   ac_check_lib_save_LIBS=$LIBS
24166 LIBS="-lutil  $LIBS"
24167 cat >"conftest.$ac_ext" <<_ACEOF
24168 #line 24168 "configure"
24169 #include "confdefs.h"
24170
24171 /* Override any gcc2 internal prototype to avoid an error.  */
24172 #ifdef __cplusplus
24173 extern "C"
24174 #endif
24175 /* We use char because int might match the return type of a gcc2
24176    builtin and then its argument prototype would still apply.  */
24177 char openpty ();
24178 int
24179 main (void)
24180 {
24181 openpty ();
24182   ;
24183   return 0;
24184 }
24185 _ACEOF
24186 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24187 if { (eval echo "$as_me:24187: \"$ac_link\"") >&5
24188   (eval $ac_link) 2>&5
24189   ac_status=$?
24190   echo "$as_me:24190: \$? = $ac_status" >&5
24191   (exit "$ac_status"); } &&
24192          { ac_try='test -s "conftest$ac_exeext"'
24193   { (eval echo "$as_me:24193: \"$ac_try\"") >&5
24194   (eval $ac_try) 2>&5
24195   ac_status=$?
24196   echo "$as_me:24196: \$? = $ac_status" >&5
24197   (exit "$ac_status"); }; }; then
24198   ac_cv_lib_util_openpty=yes
24199 else
24200   echo "$as_me: failed program was:" >&5
24201 cat "conftest.$ac_ext" >&5
24202 ac_cv_lib_util_openpty=no
24203 fi
24204 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24205 LIBS=$ac_check_lib_save_LIBS
24206 fi
24207 echo "$as_me:24207: result: $ac_cv_lib_util_openpty" >&5
24208 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
24209 if test "$ac_cv_lib_util_openpty" = yes; then
24210   cf_cv_lib_util=yes
24211 else
24212   cf_cv_lib_util=no
24213 fi
24214
24215 echo "$as_me:24215: checking for openpty header" >&5
24216 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
24217 if test "${cf_cv_func_openpty+set}" = set; then
24218   echo $ECHO_N "(cached) $ECHO_C" >&6
24219 else
24220
24221         cf_save_LIBS="$LIBS"
24222         test "$cf_cv_lib_util" = yes && {
24223 cf_add_libs="$LIBS"
24224 # reverse order
24225 cf_add_0lib=
24226 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24227 # filter duplicates
24228 for cf_add_1lib in $cf_add_0lib; do
24229         for cf_add_2lib in $cf_add_libs; do
24230                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24231                         cf_add_1lib=
24232                         break
24233                 fi
24234         done
24235         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24236 done
24237 LIBS="$cf_add_libs"
24238  }
24239         for cf_header in pty.h libutil.h util.h
24240         do
24241         cat >"conftest.$ac_ext" <<_ACEOF
24242 #line 24242 "configure"
24243 #include "confdefs.h"
24244
24245 #include <$cf_header>
24246
24247 int
24248 main (void)
24249 {
24250
24251         int x = openpty((int *)0, (int *)0, (char *)0,
24252                                    (struct termios *)0, (struct winsize *)0);
24253
24254   ;
24255   return 0;
24256 }
24257 _ACEOF
24258 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24259 if { (eval echo "$as_me:24259: \"$ac_link\"") >&5
24260   (eval $ac_link) 2>&5
24261   ac_status=$?
24262   echo "$as_me:24262: \$? = $ac_status" >&5
24263   (exit "$ac_status"); } &&
24264          { ac_try='test -s "conftest$ac_exeext"'
24265   { (eval echo "$as_me:24265: \"$ac_try\"") >&5
24266   (eval $ac_try) 2>&5
24267   ac_status=$?
24268   echo "$as_me:24268: \$? = $ac_status" >&5
24269   (exit "$ac_status"); }; }; then
24270
24271                 cf_cv_func_openpty=$cf_header
24272                 break
24273
24274 else
24275   echo "$as_me: failed program was:" >&5
24276 cat "conftest.$ac_ext" >&5
24277
24278                 cf_cv_func_openpty=no
24279
24280 fi
24281 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24282         done
24283         LIBS="$cf_save_LIBS"
24284
24285 fi
24286 echo "$as_me:24286: result: $cf_cv_func_openpty" >&5
24287 echo "${ECHO_T}$cf_cv_func_openpty" >&6
24288
24289 if test "$cf_cv_func_openpty" != no ; then
24290
24291 cat >>confdefs.h <<EOF
24292 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
24293 EOF
24294
24295 cat >>confdefs.h <<\EOF
24296 #define USE_XTERM_PTY 1
24297 EOF
24298
24299         if test "x$cf_cv_lib_util" = xyes ; then
24300
24301 cf_add_libs="$TEST_LIBS"
24302 # reverse order
24303 cf_add_0lib=
24304 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24305 # filter duplicates
24306 for cf_add_1lib in $cf_add_0lib; do
24307         for cf_add_2lib in $cf_add_libs; do
24308                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24309                         cf_add_1lib=
24310                         break
24311                 fi
24312         done
24313         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24314 done
24315 TEST_LIBS="$cf_add_libs"
24316
24317         fi
24318 fi
24319
24320 if test "$with_hashed_db" != no ; then
24321
24322 cat >>confdefs.h <<\EOF
24323 #define USE_HASHED_DB 1
24324 EOF
24325
24326 case $with_hashed_db in
24327 (yes|*able*)
24328         ;;
24329 (*)
24330         if test -d "$with_hashed_db" ; then
24331
24332 if test -n "$with_hashed_db/include" ; then
24333   for cf_add_incdir in $with_hashed_db/include
24334   do
24335         while test "$cf_add_incdir" != /usr/include
24336         do
24337           if test -d "$cf_add_incdir"
24338           then
24339                 cf_have_incdir=no
24340                 if test -n "$CFLAGS$CPPFLAGS" ; then
24341                   # a loop is needed to ensure we can add subdirs of existing dirs
24342                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24343                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24344                           cf_have_incdir=yes; break
24345                         fi
24346                   done
24347                 fi
24348
24349                 if test "$cf_have_incdir" = no ; then
24350                   if test "$cf_add_incdir" = /usr/local/include ; then
24351                         if test "$GCC" = yes
24352                         then
24353                           cf_save_CPPFLAGS=$CPPFLAGS
24354
24355         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24356         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24357
24358                           cat >"conftest.$ac_ext" <<_ACEOF
24359 #line 24359 "configure"
24360 #include "confdefs.h"
24361 #include <stdio.h>
24362 int
24363 main (void)
24364 {
24365 printf("Hello")
24366   ;
24367   return 0;
24368 }
24369 _ACEOF
24370 rm -f "conftest.$ac_objext"
24371 if { (eval echo "$as_me:24371: \"$ac_compile\"") >&5
24372   (eval $ac_compile) 2>&5
24373   ac_status=$?
24374   echo "$as_me:24374: \$? = $ac_status" >&5
24375   (exit "$ac_status"); } &&
24376          { ac_try='test -s "conftest.$ac_objext"'
24377   { (eval echo "$as_me:24377: \"$ac_try\"") >&5
24378   (eval $ac_try) 2>&5
24379   ac_status=$?
24380   echo "$as_me:24380: \$? = $ac_status" >&5
24381   (exit "$ac_status"); }; }; then
24382   :
24383 else
24384   echo "$as_me: failed program was:" >&5
24385 cat "conftest.$ac_ext" >&5
24386 cf_have_incdir=yes
24387 fi
24388 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24389                           CPPFLAGS=$cf_save_CPPFLAGS
24390                         fi
24391                   fi
24392                 fi
24393
24394                 if test "$cf_have_incdir" = no ; then
24395                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24396
24397 echo "${as_me:-configure}:24397: testing adding $cf_add_incdir to include-path ..." 1>&5
24398
24399                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24400
24401                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24402                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24403                   cf_add_incdir="$cf_top_incdir"
24404                 else
24405                   break
24406                 fi
24407           else
24408                 break
24409           fi
24410         done
24411   done
24412 fi
24413
24414 if test -n "$with_hashed_db/lib" ; then
24415         for cf_add_libdir in $with_hashed_db/lib
24416         do
24417                 if test "$cf_add_libdir" = /usr/lib ; then
24418                         :
24419                 elif test -d "$cf_add_libdir"
24420                 then
24421                         cf_have_libdir=no
24422                         if test -n "$LDFLAGS$LIBS" ; then
24423                                 # a loop is needed to ensure we can add subdirs of existing dirs
24424                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24425                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24426                                                 cf_have_libdir=yes; break
24427                                         fi
24428                                 done
24429                         fi
24430                         if test "$cf_have_libdir" = no ; then
24431                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24432
24433 echo "${as_me:-configure}:24433: testing adding $cf_add_libdir to library-path ..." 1>&5
24434
24435                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24436                         fi
24437                 fi
24438         done
24439 fi
24440
24441         else
24442                 case "$with_hashed_db" in
24443                 (./*|../*|/*)
24444                         { echo "$as_me:24444: WARNING: no such directory $with_hashed_db" >&5
24445 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
24446                         ;;
24447                 (*)
24448
24449 cf_search=
24450
24451 test "x$prefix" != "xNONE" && \
24452 test -d "$prefix" && \
24453  {
24454         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
24455         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
24456         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
24457         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
24458         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
24459         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
24460 }
24461
24462 for cf_subdir_prefix in \
24463         /usr \
24464         /usr/local \
24465         /usr/pkg \
24466         /opt \
24467         /opt/local \
24468         $HOME
24469 do
24470
24471 test "x$cf_subdir_prefix" != "x$prefix" && \
24472 test -d "$cf_subdir_prefix" && \
24473 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24474         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
24475         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
24476         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
24477         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
24478         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
24479         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"
24480 }
24481
24482 done
24483
24484         for cf_item in $cf_search
24485         do
24486                 case "$cf_item" in
24487                 (*/$with_hashed_db)
24488
24489 if test -n "$cf_item" ; then
24490   for cf_add_incdir in $cf_item
24491   do
24492         while test "$cf_add_incdir" != /usr/include
24493         do
24494           if test -d "$cf_add_incdir"
24495           then
24496                 cf_have_incdir=no
24497                 if test -n "$CFLAGS$CPPFLAGS" ; then
24498                   # a loop is needed to ensure we can add subdirs of existing dirs
24499                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24500                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24501                           cf_have_incdir=yes; break
24502                         fi
24503                   done
24504                 fi
24505
24506                 if test "$cf_have_incdir" = no ; then
24507                   if test "$cf_add_incdir" = /usr/local/include ; then
24508                         if test "$GCC" = yes
24509                         then
24510                           cf_save_CPPFLAGS=$CPPFLAGS
24511
24512         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24513         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24514
24515                           cat >"conftest.$ac_ext" <<_ACEOF
24516 #line 24516 "configure"
24517 #include "confdefs.h"
24518 #include <stdio.h>
24519 int
24520 main (void)
24521 {
24522 printf("Hello")
24523   ;
24524   return 0;
24525 }
24526 _ACEOF
24527 rm -f "conftest.$ac_objext"
24528 if { (eval echo "$as_me:24528: \"$ac_compile\"") >&5
24529   (eval $ac_compile) 2>&5
24530   ac_status=$?
24531   echo "$as_me:24531: \$? = $ac_status" >&5
24532   (exit "$ac_status"); } &&
24533          { ac_try='test -s "conftest.$ac_objext"'
24534   { (eval echo "$as_me:24534: \"$ac_try\"") >&5
24535   (eval $ac_try) 2>&5
24536   ac_status=$?
24537   echo "$as_me:24537: \$? = $ac_status" >&5
24538   (exit "$ac_status"); }; }; then
24539   :
24540 else
24541   echo "$as_me: failed program was:" >&5
24542 cat "conftest.$ac_ext" >&5
24543 cf_have_incdir=yes
24544 fi
24545 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24546                           CPPFLAGS=$cf_save_CPPFLAGS
24547                         fi
24548                   fi
24549                 fi
24550
24551                 if test "$cf_have_incdir" = no ; then
24552                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24553
24554 echo "${as_me:-configure}:24554: testing adding $cf_add_incdir to include-path ..." 1>&5
24555
24556                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24557
24558                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24559                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24560                   cf_add_incdir="$cf_top_incdir"
24561                 else
24562                   break
24563                 fi
24564           else
24565                 break
24566           fi
24567         done
24568   done
24569 fi
24570
24571                         ;;
24572                 esac
24573         done
24574
24575 cf_search=
24576
24577 test "x$prefix" != "xNONE" && \
24578 test -d "$prefix" && \
24579  {
24580         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
24581         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
24582         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
24583         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
24584         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
24585         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$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 lib-directories under $cf_subdir_prefix"
24601         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
24602         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
24603         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
24604         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
24605         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"
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_libdir in $cf_item
24617         do
24618                 if test "$cf_add_libdir" = /usr/lib ; then
24619                         :
24620                 elif test -d "$cf_add_libdir"
24621                 then
24622                         cf_have_libdir=no
24623                         if test -n "$LDFLAGS$LIBS" ; then
24624                                 # a loop is needed to ensure we can add subdirs of existing dirs
24625                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24626                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24627                                                 cf_have_libdir=yes; break
24628                                         fi
24629                                 done
24630                         fi
24631                         if test "$cf_have_libdir" = no ; then
24632                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24633
24634 echo "${as_me:-configure}:24634: testing adding $cf_add_libdir to library-path ..." 1>&5
24635
24636                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24637                         fi
24638                 fi
24639         done
24640 fi
24641
24642                         ;;
24643                 esac
24644         done
24645
24646                         ;;
24647                 esac
24648         fi
24649 esac
24650
24651 echo "$as_me:24651: checking for db.h" >&5
24652 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
24653 if test "${ac_cv_header_db_h+set}" = set; then
24654   echo $ECHO_N "(cached) $ECHO_C" >&6
24655 else
24656   cat >"conftest.$ac_ext" <<_ACEOF
24657 #line 24657 "configure"
24658 #include "confdefs.h"
24659 #include <db.h>
24660 _ACEOF
24661 if { (eval echo "$as_me:24661: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24662   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24663   ac_status=$?
24664   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24665   rm -f conftest.er1
24666   cat conftest.err >&5
24667   echo "$as_me:24667: \$? = $ac_status" >&5
24668   (exit "$ac_status"); } >/dev/null; then
24669   if test -s conftest.err; then
24670     ac_cpp_err=$ac_c_preproc_warn_flag
24671   else
24672     ac_cpp_err=
24673   fi
24674 else
24675   ac_cpp_err=yes
24676 fi
24677 if test -z "$ac_cpp_err"; then
24678   ac_cv_header_db_h=yes
24679 else
24680   echo "$as_me: failed program was:" >&5
24681   cat "conftest.$ac_ext" >&5
24682   ac_cv_header_db_h=no
24683 fi
24684 rm -f conftest.err "conftest.$ac_ext"
24685 fi
24686 echo "$as_me:24686: result: $ac_cv_header_db_h" >&5
24687 echo "${ECHO_T}$ac_cv_header_db_h" >&6
24688 if test "$ac_cv_header_db_h" = yes; then
24689
24690 echo "$as_me:24690: checking for version of db" >&5
24691 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
24692 if test "${cf_cv_hashed_db_version+set}" = set; then
24693   echo $ECHO_N "(cached) $ECHO_C" >&6
24694 else
24695
24696 cf_cv_hashed_db_version=unknown
24697
24698 for cf_db_version in 1 2 3 4 5 6
24699 do
24700
24701 echo "${as_me:-configure}:24701: testing checking for db version $cf_db_version ..." 1>&5
24702
24703         cat >"conftest.$ac_ext" <<_ACEOF
24704 #line 24704 "configure"
24705 #include "confdefs.h"
24706
24707 $ac_includes_default
24708 #include <db.h>
24709
24710 #ifdef DB_VERSION_MAJOR
24711         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
24712 #if $cf_db_version == DB_VERSION_MAJOR
24713         /* ok */
24714 #else
24715         make an error
24716 #endif
24717 #else
24718 #if $cf_db_version == 1
24719         /* ok: assuming this is DB 1.8.5 */
24720 #else
24721         make an error
24722 #endif
24723 #endif
24724
24725 int
24726 main (void)
24727 {
24728 DBT *foo = 0
24729   ;
24730   return 0;
24731 }
24732 _ACEOF
24733 rm -f "conftest.$ac_objext"
24734 if { (eval echo "$as_me:24734: \"$ac_compile\"") >&5
24735   (eval $ac_compile) 2>&5
24736   ac_status=$?
24737   echo "$as_me:24737: \$? = $ac_status" >&5
24738   (exit "$ac_status"); } &&
24739          { ac_try='test -s "conftest.$ac_objext"'
24740   { (eval echo "$as_me:24740: \"$ac_try\"") >&5
24741   (eval $ac_try) 2>&5
24742   ac_status=$?
24743   echo "$as_me:24743: \$? = $ac_status" >&5
24744   (exit "$ac_status"); }; }; then
24745
24746         cf_cv_hashed_db_version=$cf_db_version
24747         break
24748
24749 else
24750   echo "$as_me: failed program was:" >&5
24751 cat "conftest.$ac_ext" >&5
24752 fi
24753 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24754 done
24755
24756 fi
24757 echo "$as_me:24757: result: $cf_cv_hashed_db_version" >&5
24758 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
24759
24760 if test "$cf_cv_hashed_db_version" = unknown ; then
24761         { { echo "$as_me:24761: error: Cannot determine version of db" >&5
24762 echo "$as_me: error: Cannot determine version of db" >&2;}
24763    { (exit 1); exit 1; }; }
24764 else
24765
24766 echo "$as_me:24766: checking for db libraries" >&5
24767 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
24768 if test "${cf_cv_hashed_db_libs+set}" = set; then
24769   echo $ECHO_N "(cached) $ECHO_C" >&6
24770 else
24771
24772 cf_cv_hashed_db_libs=unknown
24773 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
24774 do
24775         cf_save_libs="$LIBS"
24776         if test -n "$cf_db_libs"; then
24777
24778 cf_add_libs="$LIBS"
24779 # reverse order
24780 cf_add_0lib=
24781 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24782 # filter duplicates
24783 for cf_add_1lib in $cf_add_0lib; do
24784         for cf_add_2lib in $cf_add_libs; do
24785                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24786                         cf_add_1lib=
24787                         break
24788                 fi
24789         done
24790         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24791 done
24792 LIBS="$cf_add_libs"
24793
24794         fi
24795
24796 echo "${as_me:-configure}:24796: testing checking for library $cf_db_libs ..." 1>&5
24797
24798         cat >"conftest.$ac_ext" <<_ACEOF
24799 #line 24799 "configure"
24800 #include "confdefs.h"
24801
24802 $ac_includes_default
24803 #include <db.h>
24804
24805 int
24806 main (void)
24807 {
24808
24809         char *path = "/tmp/foo";
24810 #ifdef DB_VERSION_MAJOR
24811 #if DB_VERSION_MAJOR >= 4
24812         DB *result = 0;
24813         db_create(&result, NULL, 0);
24814         result->open(result,
24815                 NULL,
24816                 path,
24817                 path,
24818                 DB_HASH,
24819                 DB_CREATE,
24820                 0644);
24821 #elif DB_VERSION_MAJOR >= 3
24822         DB *result = 0;
24823         db_create(&result, NULL, 0);
24824         result->open(result,
24825                 path,
24826                 path,
24827                 DB_HASH,
24828                 DB_CREATE,
24829                 0644);
24830 #elif DB_VERSION_MAJOR >= 2
24831         DB *result = 0;
24832         db_open(path,
24833                 DB_HASH,
24834                 DB_CREATE,
24835                 0644,
24836                 (DB_ENV *) 0,
24837                 (DB_INFO *) 0,
24838                 &result);
24839 #endif /* DB_VERSION_MAJOR */
24840 #else
24841         DB *result = dbopen(path,
24842                      2,
24843                      0644,
24844                      DB_HASH,
24845                      0);
24846 #endif
24847         ${cf_cv_main_return:-return}(result != 0)
24848
24849   ;
24850   return 0;
24851 }
24852 _ACEOF
24853 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24854 if { (eval echo "$as_me:24854: \"$ac_link\"") >&5
24855   (eval $ac_link) 2>&5
24856   ac_status=$?
24857   echo "$as_me:24857: \$? = $ac_status" >&5
24858   (exit "$ac_status"); } &&
24859          { ac_try='test -s "conftest$ac_exeext"'
24860   { (eval echo "$as_me:24860: \"$ac_try\"") >&5
24861   (eval $ac_try) 2>&5
24862   ac_status=$?
24863   echo "$as_me:24863: \$? = $ac_status" >&5
24864   (exit "$ac_status"); }; }; then
24865
24866         if test -n "$cf_db_libs" ; then
24867                 cf_cv_hashed_db_libs=$cf_db_libs
24868         else
24869                 cf_cv_hashed_db_libs=default
24870         fi
24871         LIBS="$cf_save_libs"
24872         break
24873
24874 else
24875   echo "$as_me: failed program was:" >&5
24876 cat "conftest.$ac_ext" >&5
24877 fi
24878 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24879         LIBS="$cf_save_libs"
24880 done
24881
24882 fi
24883 echo "$as_me:24883: result: $cf_cv_hashed_db_libs" >&5
24884 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
24885
24886         if test "$cf_cv_hashed_db_libs" = unknown ; then
24887                 { { echo "$as_me:24887: error: Cannot determine library for db" >&5
24888 echo "$as_me: error: Cannot determine library for db" >&2;}
24889    { (exit 1); exit 1; }; }
24890         elif test "$cf_cv_hashed_db_libs" != default ; then
24891
24892 cf_add_libs="$LIBS"
24893 # reverse order
24894 cf_add_0lib=
24895 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24896 # filter duplicates
24897 for cf_add_1lib in $cf_add_0lib; do
24898         for cf_add_2lib in $cf_add_libs; do
24899                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24900                         cf_add_1lib=
24901                         break
24902                 fi
24903         done
24904         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24905 done
24906 LIBS="$cf_add_libs"
24907
24908         fi
24909 fi
24910
24911 else
24912
24913         { { echo "$as_me:24913: error: Cannot find db.h" >&5
24914 echo "$as_me: error: Cannot find db.h" >&2;}
24915    { (exit 1); exit 1; }; }
24916
24917 fi
24918
24919 fi
24920
24921 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
24922         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24923         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24924 fi
24925
24926 # Just in case, check if the C compiler has a bool type.
24927
24928 echo "$as_me:24928: checking if we should include stdbool.h" >&5
24929 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24930
24931 if test "${cf_cv_header_stdbool_h+set}" = set; then
24932   echo $ECHO_N "(cached) $ECHO_C" >&6
24933 else
24934
24935         cat >"conftest.$ac_ext" <<_ACEOF
24936 #line 24936 "configure"
24937 #include "confdefs.h"
24938
24939 int
24940 main (void)
24941 {
24942 bool foo = false
24943   ;
24944   return 0;
24945 }
24946 _ACEOF
24947 rm -f "conftest.$ac_objext"
24948 if { (eval echo "$as_me:24948: \"$ac_compile\"") >&5
24949   (eval $ac_compile) 2>&5
24950   ac_status=$?
24951   echo "$as_me:24951: \$? = $ac_status" >&5
24952   (exit "$ac_status"); } &&
24953          { ac_try='test -s "conftest.$ac_objext"'
24954   { (eval echo "$as_me:24954: \"$ac_try\"") >&5
24955   (eval $ac_try) 2>&5
24956   ac_status=$?
24957   echo "$as_me:24957: \$? = $ac_status" >&5
24958   (exit "$ac_status"); }; }; then
24959   cf_cv_header_stdbool_h=0
24960 else
24961   echo "$as_me: failed program was:" >&5
24962 cat "conftest.$ac_ext" >&5
24963 cat >"conftest.$ac_ext" <<_ACEOF
24964 #line 24964 "configure"
24965 #include "confdefs.h"
24966
24967 #ifndef __BEOS__
24968 #include <stdbool.h>
24969 #endif
24970
24971 int
24972 main (void)
24973 {
24974 bool foo = false
24975   ;
24976   return 0;
24977 }
24978 _ACEOF
24979 rm -f "conftest.$ac_objext"
24980 if { (eval echo "$as_me:24980: \"$ac_compile\"") >&5
24981   (eval $ac_compile) 2>&5
24982   ac_status=$?
24983   echo "$as_me:24983: \$? = $ac_status" >&5
24984   (exit "$ac_status"); } &&
24985          { ac_try='test -s "conftest.$ac_objext"'
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   cf_cv_header_stdbool_h=1
24992 else
24993   echo "$as_me: failed program was:" >&5
24994 cat "conftest.$ac_ext" >&5
24995 cf_cv_header_stdbool_h=0
24996 fi
24997 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24998 fi
24999 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25000 fi
25001
25002 if test "$cf_cv_header_stdbool_h" = 1
25003 then    echo "$as_me:25003: result: yes" >&5
25004 echo "${ECHO_T}yes" >&6
25005 else    echo "$as_me:25005: result: no" >&5
25006 echo "${ECHO_T}no" >&6
25007 fi
25008
25009 echo "$as_me:25009: checking for builtin bool type" >&5
25010 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25011
25012 if test "${cf_cv_cc_bool_type+set}" = set; then
25013   echo $ECHO_N "(cached) $ECHO_C" >&6
25014 else
25015
25016         cat >"conftest.$ac_ext" <<_ACEOF
25017 #line 25017 "configure"
25018 #include "confdefs.h"
25019
25020 #include <stdio.h>
25021 #include <sys/types.h>
25022
25023 int
25024 main (void)
25025 {
25026 bool x = false
25027   ;
25028   return 0;
25029 }
25030 _ACEOF
25031 rm -f "conftest.$ac_objext"
25032 if { (eval echo "$as_me:25032: \"$ac_compile\"") >&5
25033   (eval $ac_compile) 2>&5
25034   ac_status=$?
25035   echo "$as_me:25035: \$? = $ac_status" >&5
25036   (exit "$ac_status"); } &&
25037          { ac_try='test -s "conftest.$ac_objext"'
25038   { (eval echo "$as_me:25038: \"$ac_try\"") >&5
25039   (eval $ac_try) 2>&5
25040   ac_status=$?
25041   echo "$as_me:25041: \$? = $ac_status" >&5
25042   (exit "$ac_status"); }; }; then
25043   cf_cv_cc_bool_type=1
25044 else
25045   echo "$as_me: failed program was:" >&5
25046 cat "conftest.$ac_ext" >&5
25047 cf_cv_cc_bool_type=0
25048 fi
25049 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25050
25051 fi
25052
25053 if test "$cf_cv_cc_bool_type" = 1
25054 then    echo "$as_me:25054: result: yes" >&5
25055 echo "${ECHO_T}yes" >&6
25056 else    echo "$as_me:25056: result: no" >&5
25057 echo "${ECHO_T}no" >&6
25058 fi
25059
25060 # Check for C++ compiler characteristics (and ensure that it's there!)
25061 if test -n "$CXX" ; then
25062         ac_ext=cc
25063 ac_cpp='$CXXCPP $CPPFLAGS'
25064 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25065 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25066 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25067 ac_main_return="return"
25068
25069 if test -n "$GXX" ; then
25070
25071         cf_save="$LIBS"
25072         LIBS="$LIBS $CXXLIBS"
25073         echo "$as_me:25073: checking if we already have C++ library" >&5
25074 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
25075         cat >"conftest.$ac_ext" <<_ACEOF
25076 #line 25076 "configure"
25077 #include "confdefs.h"
25078
25079                         #include <iostream>
25080 int
25081 main (void)
25082 {
25083
25084                         std::cout << "Hello World!" << std::endl;
25085   ;
25086   return 0;
25087 }
25088 _ACEOF
25089 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25090 if { (eval echo "$as_me:25090: \"$ac_link\"") >&5
25091   (eval $ac_link) 2>&5
25092   ac_status=$?
25093   echo "$as_me:25093: \$? = $ac_status" >&5
25094   (exit "$ac_status"); } &&
25095          { ac_try='test -s "conftest$ac_exeext"'
25096   { (eval echo "$as_me:25096: \"$ac_try\"") >&5
25097   (eval $ac_try) 2>&5
25098   ac_status=$?
25099   echo "$as_me:25099: \$? = $ac_status" >&5
25100   (exit "$ac_status"); }; }; then
25101   cf_have_libstdcpp=yes
25102 else
25103   echo "$as_me: failed program was:" >&5
25104 cat "conftest.$ac_ext" >&5
25105 cf_have_libstdcpp=no
25106 fi
25107 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25108         echo "$as_me:25108: result: $cf_have_libstdcpp" >&5
25109 echo "${ECHO_T}$cf_have_libstdcpp" >&6
25110         LIBS="$cf_save"
25111
25112         if test "$cf_have_libstdcpp" != yes
25113         then
25114                 case "$cf_cv_system_name" in
25115                 (os2*)
25116                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
25117                                 cf_stdcpp_libname=stdcpp
25118                         else
25119                                 cf_stdcpp_libname=stdc++
25120                         fi
25121                         ;;
25122                 (*)
25123                         cf_stdcpp_libname=stdc++
25124                         ;;
25125                 esac
25126
25127                 echo "$as_me:25127: checking for library $cf_stdcpp_libname" >&5
25128 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
25129 if test "${cf_cv_libstdcpp+set}" = set; then
25130   echo $ECHO_N "(cached) $ECHO_C" >&6
25131 else
25132
25133                         cf_save="$LIBS"
25134                         LIBS="$LIBS $CXXLIBS"
25135
25136 cf_add_libs="$LIBS"
25137 # reverse order
25138 cf_add_0lib=
25139 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25140 # filter duplicates
25141 for cf_add_1lib in $cf_add_0lib; do
25142         for cf_add_2lib in $cf_add_libs; do
25143                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25144                         cf_add_1lib=
25145                         break
25146                 fi
25147         done
25148         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25149 done
25150 LIBS="$cf_add_libs"
25151
25152                 cat >"conftest.$ac_ext" <<_ACEOF
25153 #line 25153 "configure"
25154 #include "confdefs.h"
25155
25156                                 #include <iostream>
25157 int
25158 main (void)
25159 {
25160
25161                                 std::cout << "Hello World!" << std::endl;
25162   ;
25163   return 0;
25164 }
25165 _ACEOF
25166 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25167 if { (eval echo "$as_me:25167: \"$ac_link\"") >&5
25168   (eval $ac_link) 2>&5
25169   ac_status=$?
25170   echo "$as_me:25170: \$? = $ac_status" >&5
25171   (exit "$ac_status"); } &&
25172          { ac_try='test -s "conftest$ac_exeext"'
25173   { (eval echo "$as_me:25173: \"$ac_try\"") >&5
25174   (eval $ac_try) 2>&5
25175   ac_status=$?
25176   echo "$as_me:25176: \$? = $ac_status" >&5
25177   (exit "$ac_status"); }; }; then
25178   cf_cv_libstdcpp=yes
25179 else
25180   echo "$as_me: failed program was:" >&5
25181 cat "conftest.$ac_ext" >&5
25182 cf_cv_libstdcpp=no
25183 fi
25184 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25185                         LIBS="$cf_save"
25186
25187 fi
25188 echo "$as_me:25188: result: $cf_cv_libstdcpp" >&5
25189 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
25190                 test "$cf_cv_libstdcpp" = yes && {
25191 cf_add_libs="$CXXLIBS"
25192 # reverse order
25193 cf_add_0lib=
25194 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25195 # filter duplicates
25196 for cf_add_1lib in $cf_add_0lib; do
25197         for cf_add_2lib in $cf_add_libs; do
25198                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25199                         cf_add_1lib=
25200                         break
25201                 fi
25202         done
25203         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25204 done
25205 CXXLIBS="$cf_add_libs"
25206  }
25207         fi
25208 fi
25209
25210         echo "$as_me:25210: checking whether $CXX understands -c and -o together" >&5
25211 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
25212 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
25213   echo $ECHO_N "(cached) $ECHO_C" >&6
25214 else
25215
25216 cat > conftest.$ac_ext <<CF_EOF
25217 int main(void)
25218 {
25219         ${cf_cv_main_return:-return}(0);
25220 }
25221 CF_EOF
25222 # We do the test twice because some compilers refuse to overwrite an
25223 # existing .o file with -o, though they will create one.
25224 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
25225 if { (eval echo "$as_me:25225: \"$ac_try\"") >&5
25226   (eval $ac_try) 2>&5
25227   ac_status=$?
25228   echo "$as_me:25228: \$? = $ac_status" >&5
25229   (exit "$ac_status"); } &&
25230   test -f conftest2.$ac_objext && { (eval echo "$as_me:25230: \"$ac_try\"") >&5
25231   (eval $ac_try) 2>&5
25232   ac_status=$?
25233   echo "$as_me:25233: \$? = $ac_status" >&5
25234   (exit "$ac_status"); };
25235 then
25236   eval cf_cv_prog_CXX_c_o=yes
25237 else
25238   eval cf_cv_prog_CXX_c_o=no
25239 fi
25240 rm -rf ./conftest*
25241
25242 fi
25243 if test "$cf_cv_prog_CXX_c_o" = yes; then
25244   echo "$as_me:25244: result: yes" >&5
25245 echo "${ECHO_T}yes" >&6
25246 else
25247   echo "$as_me:25247: result: no" >&5
25248 echo "${ECHO_T}no" >&6
25249 fi
25250
25251         case "$GXX_VERSION" in
25252         (1.*|2.[0-6]*|[1-9][0-9].*)
25253                 cf_cxx_library=yes
25254                 ;;
25255         (*-2.7*|2.7*)
25256
25257 cf_cxx_library=unknown
25258 case "$cf_cv_system_name" in
25259 (os2*)
25260         cf_gpp_libname=gpp
25261         ;;
25262 (*)
25263         cf_gpp_libname=g++
25264         ;;
25265 esac
25266 if test "$GXX" = yes; then
25267         echo "$as_me:25267: checking for lib$cf_gpp_libname" >&5
25268 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
25269         cf_save="$LIBS"
25270
25271 cf_add_libs="$LIBS"
25272 # reverse order
25273 cf_add_0lib=
25274 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25275 # filter duplicates
25276 for cf_add_1lib in $cf_add_0lib; do
25277         for cf_add_2lib in $cf_add_libs; do
25278                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25279                         cf_add_1lib=
25280                         break
25281                 fi
25282         done
25283         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25284 done
25285 LIBS="$cf_add_libs"
25286
25287         cat >"conftest.$ac_ext" <<_ACEOF
25288 #line 25288 "configure"
25289 #include "confdefs.h"
25290
25291 #include <$cf_gpp_libname/builtin.h>
25292
25293 int
25294 main (void)
25295 {
25296 two_arg_error_handler_t foo2 = lib_error_handler
25297   ;
25298   return 0;
25299 }
25300 _ACEOF
25301 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25302 if { (eval echo "$as_me:25302: \"$ac_link\"") >&5
25303   (eval $ac_link) 2>&5
25304   ac_status=$?
25305   echo "$as_me:25305: \$? = $ac_status" >&5
25306   (exit "$ac_status"); } &&
25307          { ac_try='test -s "conftest$ac_exeext"'
25308   { (eval echo "$as_me:25308: \"$ac_try\"") >&5
25309   (eval $ac_try) 2>&5
25310   ac_status=$?
25311   echo "$as_me:25311: \$? = $ac_status" >&5
25312   (exit "$ac_status"); }; }; then
25313   cf_cxx_library=yes
25314
25315 cf_add_libs="$CXXLIBS"
25316 # reverse order
25317 cf_add_0lib=
25318 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25319 # filter duplicates
25320 for cf_add_1lib in $cf_add_0lib; do
25321         for cf_add_2lib in $cf_add_libs; do
25322                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25323                         cf_add_1lib=
25324                         break
25325                 fi
25326         done
25327         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25328 done
25329 CXXLIBS="$cf_add_libs"
25330
25331          if test "$cf_gpp_libname" = cpp ; then
25332
25333 cat >>confdefs.h <<\EOF
25334 #define HAVE_GPP_BUILTIN_H 1
25335 EOF
25336
25337          else
25338
25339 cat >>confdefs.h <<\EOF
25340 #define HAVE_GXX_BUILTIN_H 1
25341 EOF
25342
25343          fi
25344 else
25345   echo "$as_me: failed program was:" >&5
25346 cat "conftest.$ac_ext" >&5
25347 cat >"conftest.$ac_ext" <<_ACEOF
25348 #line 25348 "configure"
25349 #include "confdefs.h"
25350
25351 #include <builtin.h>
25352
25353 int
25354 main (void)
25355 {
25356 two_arg_error_handler_t foo2 = lib_error_handler
25357   ;
25358   return 0;
25359 }
25360 _ACEOF
25361 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25362 if { (eval echo "$as_me:25362: \"$ac_link\"") >&5
25363   (eval $ac_link) 2>&5
25364   ac_status=$?
25365   echo "$as_me:25365: \$? = $ac_status" >&5
25366   (exit "$ac_status"); } &&
25367          { ac_try='test -s "conftest$ac_exeext"'
25368   { (eval echo "$as_me:25368: \"$ac_try\"") >&5
25369   (eval $ac_try) 2>&5
25370   ac_status=$?
25371   echo "$as_me:25371: \$? = $ac_status" >&5
25372   (exit "$ac_status"); }; }; then
25373   cf_cxx_library=yes
25374
25375 cf_add_libs="$CXXLIBS"
25376 # reverse order
25377 cf_add_0lib=
25378 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25379 # filter duplicates
25380 for cf_add_1lib in $cf_add_0lib; do
25381         for cf_add_2lib in $cf_add_libs; do
25382                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25383                         cf_add_1lib=
25384                         break
25385                 fi
25386         done
25387         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25388 done
25389 CXXLIBS="$cf_add_libs"
25390
25391 cat >>confdefs.h <<\EOF
25392 #define HAVE_BUILTIN_H 1
25393 EOF
25394
25395 else
25396   echo "$as_me: failed program was:" >&5
25397 cat "conftest.$ac_ext" >&5
25398 cf_cxx_library=no
25399 fi
25400 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25401 fi
25402 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25403         LIBS="$cf_save"
25404         echo "$as_me:25404: result: $cf_cxx_library" >&5
25405 echo "${ECHO_T}$cf_cxx_library" >&6
25406 fi
25407
25408                 ;;
25409         (*)
25410                 cf_cxx_library=no
25411                 ;;
25412         esac
25413
25414         ac_ext=cc
25415 ac_cpp='$CXXCPP $CPPFLAGS'
25416 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25417 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25418 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25419 ac_main_return="return"
25420 echo "$as_me:25420: checking how to run the C++ preprocessor" >&5
25421 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
25422 if test -z "$CXXCPP"; then
25423   if test "${ac_cv_prog_CXXCPP+set}" = set; then
25424   echo $ECHO_N "(cached) $ECHO_C" >&6
25425 else
25426       # Double quotes because CXXCPP needs to be expanded
25427     for CXXCPP in "$CXX -E" "/lib/cpp"
25428     do
25429       ac_preproc_ok=false
25430 for ac_cxx_preproc_warn_flag in '' yes
25431 do
25432   # Use a header file that comes with gcc, so configuring glibc
25433   # with a fresh cross-compiler works.
25434   # On the NeXT, cc -E runs the code through the compiler's parser,
25435   # not just through cpp. "Syntax error" is here to catch this case.
25436   cat >"conftest.$ac_ext" <<_ACEOF
25437 #line 25437 "configure"
25438 #include "confdefs.h"
25439 #include <assert.h>
25440                      Syntax error
25441 _ACEOF
25442 if { (eval echo "$as_me:25442: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25443   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25444   ac_status=$?
25445   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25446   rm -f conftest.er1
25447   cat conftest.err >&5
25448   echo "$as_me:25448: \$? = $ac_status" >&5
25449   (exit "$ac_status"); } >/dev/null; then
25450   if test -s conftest.err; then
25451     ac_cpp_err=$ac_cxx_preproc_warn_flag
25452   else
25453     ac_cpp_err=
25454   fi
25455 else
25456   ac_cpp_err=yes
25457 fi
25458 if test -z "$ac_cpp_err"; then
25459   :
25460 else
25461   echo "$as_me: failed program was:" >&5
25462   cat "conftest.$ac_ext" >&5
25463   # Broken: fails on valid input.
25464 continue
25465 fi
25466 rm -f conftest.err "conftest.$ac_ext"
25467
25468   # OK, works on sane cases.  Now check whether non-existent headers
25469   # can be detected and how.
25470   cat >"conftest.$ac_ext" <<_ACEOF
25471 #line 25471 "configure"
25472 #include "confdefs.h"
25473 #include <ac_nonexistent.h>
25474 _ACEOF
25475 if { (eval echo "$as_me:25475: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25476   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25477   ac_status=$?
25478   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25479   rm -f conftest.er1
25480   cat conftest.err >&5
25481   echo "$as_me:25481: \$? = $ac_status" >&5
25482   (exit "$ac_status"); } >/dev/null; then
25483   if test -s conftest.err; then
25484     ac_cpp_err=$ac_cxx_preproc_warn_flag
25485   else
25486     ac_cpp_err=
25487   fi
25488 else
25489   ac_cpp_err=yes
25490 fi
25491 if test -z "$ac_cpp_err"; then
25492   # Broken: success on invalid input.
25493 continue
25494 else
25495   echo "$as_me: failed program was:" >&5
25496   cat "conftest.$ac_ext" >&5
25497   # Passes both tests.
25498 ac_preproc_ok=:
25499 break
25500 fi
25501 rm -f conftest.err "conftest.$ac_ext"
25502
25503 done
25504 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25505 rm -f conftest.err "conftest.$ac_ext"
25506 if $ac_preproc_ok; then
25507   break
25508 fi
25509
25510     done
25511     ac_cv_prog_CXXCPP=$CXXCPP
25512
25513 fi
25514   CXXCPP=$ac_cv_prog_CXXCPP
25515 else
25516   ac_cv_prog_CXXCPP=$CXXCPP
25517 fi
25518 echo "$as_me:25518: result: $CXXCPP" >&5
25519 echo "${ECHO_T}$CXXCPP" >&6
25520 ac_preproc_ok=false
25521 for ac_cxx_preproc_warn_flag in '' yes
25522 do
25523   # Use a header file that comes with gcc, so configuring glibc
25524   # with a fresh cross-compiler works.
25525   # On the NeXT, cc -E runs the code through the compiler's parser,
25526   # not just through cpp. "Syntax error" is here to catch this case.
25527   cat >"conftest.$ac_ext" <<_ACEOF
25528 #line 25528 "configure"
25529 #include "confdefs.h"
25530 #include <assert.h>
25531                      Syntax error
25532 _ACEOF
25533 if { (eval echo "$as_me:25533: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25534   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25535   ac_status=$?
25536   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25537   rm -f conftest.er1
25538   cat conftest.err >&5
25539   echo "$as_me:25539: \$? = $ac_status" >&5
25540   (exit "$ac_status"); } >/dev/null; then
25541   if test -s conftest.err; then
25542     ac_cpp_err=$ac_cxx_preproc_warn_flag
25543   else
25544     ac_cpp_err=
25545   fi
25546 else
25547   ac_cpp_err=yes
25548 fi
25549 if test -z "$ac_cpp_err"; then
25550   :
25551 else
25552   echo "$as_me: failed program was:" >&5
25553   cat "conftest.$ac_ext" >&5
25554   # Broken: fails on valid input.
25555 continue
25556 fi
25557 rm -f conftest.err "conftest.$ac_ext"
25558
25559   # OK, works on sane cases.  Now check whether non-existent headers
25560   # can be detected and how.
25561   cat >"conftest.$ac_ext" <<_ACEOF
25562 #line 25562 "configure"
25563 #include "confdefs.h"
25564 #include <ac_nonexistent.h>
25565 _ACEOF
25566 if { (eval echo "$as_me:25566: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25567   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25568   ac_status=$?
25569   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25570   rm -f conftest.er1
25571   cat conftest.err >&5
25572   echo "$as_me:25572: \$? = $ac_status" >&5
25573   (exit "$ac_status"); } >/dev/null; then
25574   if test -s conftest.err; then
25575     ac_cpp_err=$ac_cxx_preproc_warn_flag
25576   else
25577     ac_cpp_err=
25578   fi
25579 else
25580   ac_cpp_err=yes
25581 fi
25582 if test -z "$ac_cpp_err"; then
25583   # Broken: success on invalid input.
25584 continue
25585 else
25586   echo "$as_me: failed program was:" >&5
25587   cat "conftest.$ac_ext" >&5
25588   # Passes both tests.
25589 ac_preproc_ok=:
25590 break
25591 fi
25592 rm -f conftest.err "conftest.$ac_ext"
25593
25594 done
25595 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25596 rm -f conftest.err "conftest.$ac_ext"
25597 if $ac_preproc_ok; then
25598   :
25599 else
25600   { { echo "$as_me:25600: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
25601 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
25602    { (exit 1); exit 1; }; }
25603 fi
25604
25605 ac_ext=cc
25606 ac_cpp='$CXXCPP $CPPFLAGS'
25607 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25608 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25609 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25610 ac_main_return="return"
25611
25612 for ac_header in typeinfo
25613 do
25614 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25615 echo "$as_me:25615: checking for $ac_header" >&5
25616 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25617 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25618   echo $ECHO_N "(cached) $ECHO_C" >&6
25619 else
25620   cat >"conftest.$ac_ext" <<_ACEOF
25621 #line 25621 "configure"
25622 #include "confdefs.h"
25623 #include <$ac_header>
25624 _ACEOF
25625 if { (eval echo "$as_me:25625: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25626   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25627   ac_status=$?
25628   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25629   rm -f conftest.er1
25630   cat conftest.err >&5
25631   echo "$as_me:25631: \$? = $ac_status" >&5
25632   (exit "$ac_status"); } >/dev/null; then
25633   if test -s conftest.err; then
25634     ac_cpp_err=$ac_cxx_preproc_warn_flag
25635   else
25636     ac_cpp_err=
25637   fi
25638 else
25639   ac_cpp_err=yes
25640 fi
25641 if test -z "$ac_cpp_err"; then
25642   eval "$as_ac_Header=yes"
25643 else
25644   echo "$as_me: failed program was:" >&5
25645   cat "conftest.$ac_ext" >&5
25646   eval "$as_ac_Header=no"
25647 fi
25648 rm -f conftest.err "conftest.$ac_ext"
25649 fi
25650 echo "$as_me:25650: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25651 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25652 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25653   cat >>confdefs.h <<EOF
25654 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25655 EOF
25656
25657 fi
25658 done
25659
25660 for ac_header in iostream
25661 do
25662 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25663 echo "$as_me:25663: checking for $ac_header" >&5
25664 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25665 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25666   echo $ECHO_N "(cached) $ECHO_C" >&6
25667 else
25668   cat >"conftest.$ac_ext" <<_ACEOF
25669 #line 25669 "configure"
25670 #include "confdefs.h"
25671 #include <$ac_header>
25672 _ACEOF
25673 if { (eval echo "$as_me:25673: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25674   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25675   ac_status=$?
25676   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25677   rm -f conftest.er1
25678   cat conftest.err >&5
25679   echo "$as_me:25679: \$? = $ac_status" >&5
25680   (exit "$ac_status"); } >/dev/null; then
25681   if test -s conftest.err; then
25682     ac_cpp_err=$ac_cxx_preproc_warn_flag
25683   else
25684     ac_cpp_err=
25685   fi
25686 else
25687   ac_cpp_err=yes
25688 fi
25689 if test -z "$ac_cpp_err"; then
25690   eval "$as_ac_Header=yes"
25691 else
25692   echo "$as_me: failed program was:" >&5
25693   cat "conftest.$ac_ext" >&5
25694   eval "$as_ac_Header=no"
25695 fi
25696 rm -f conftest.err "conftest.$ac_ext"
25697 fi
25698 echo "$as_me:25698: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25699 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25700 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25701   cat >>confdefs.h <<EOF
25702 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25703 EOF
25704
25705 fi
25706 done
25707
25708 if test x"$ac_cv_header_iostream" = xyes ; then
25709         echo "$as_me:25709: checking if iostream uses std-namespace" >&5
25710 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
25711         cat >"conftest.$ac_ext" <<_ACEOF
25712 #line 25712 "configure"
25713 #include "confdefs.h"
25714
25715 #include <iostream>
25716 using std::endl;
25717 using std::cerr;
25718 int
25719 main (void)
25720 {
25721
25722 cerr << "testing" << endl;
25723
25724   ;
25725   return 0;
25726 }
25727 _ACEOF
25728 rm -f "conftest.$ac_objext"
25729 if { (eval echo "$as_me:25729: \"$ac_compile\"") >&5
25730   (eval $ac_compile) 2>&5
25731   ac_status=$?
25732   echo "$as_me:25732: \$? = $ac_status" >&5
25733   (exit "$ac_status"); } &&
25734          { ac_try='test -s "conftest.$ac_objext"'
25735   { (eval echo "$as_me:25735: \"$ac_try\"") >&5
25736   (eval $ac_try) 2>&5
25737   ac_status=$?
25738   echo "$as_me:25738: \$? = $ac_status" >&5
25739   (exit "$ac_status"); }; }; then
25740   cf_iostream_namespace=yes
25741 else
25742   echo "$as_me: failed program was:" >&5
25743 cat "conftest.$ac_ext" >&5
25744 cf_iostream_namespace=no
25745 fi
25746 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25747         echo "$as_me:25747: result: $cf_iostream_namespace" >&5
25748 echo "${ECHO_T}$cf_iostream_namespace" >&6
25749         if test "$cf_iostream_namespace" = yes ; then
25750
25751 cat >>confdefs.h <<\EOF
25752 #define IOSTREAM_NAMESPACE 1
25753 EOF
25754
25755         fi
25756 fi
25757
25758 echo "$as_me:25758: checking if we should include stdbool.h" >&5
25759 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25760
25761 if test "${cf_cv_header_stdbool_h+set}" = set; then
25762   echo $ECHO_N "(cached) $ECHO_C" >&6
25763 else
25764
25765         cat >"conftest.$ac_ext" <<_ACEOF
25766 #line 25766 "configure"
25767 #include "confdefs.h"
25768
25769 int
25770 main (void)
25771 {
25772 bool foo = false
25773   ;
25774   return 0;
25775 }
25776 _ACEOF
25777 rm -f "conftest.$ac_objext"
25778 if { (eval echo "$as_me:25778: \"$ac_compile\"") >&5
25779   (eval $ac_compile) 2>&5
25780   ac_status=$?
25781   echo "$as_me:25781: \$? = $ac_status" >&5
25782   (exit "$ac_status"); } &&
25783          { ac_try='test -s "conftest.$ac_objext"'
25784   { (eval echo "$as_me:25784: \"$ac_try\"") >&5
25785   (eval $ac_try) 2>&5
25786   ac_status=$?
25787   echo "$as_me:25787: \$? = $ac_status" >&5
25788   (exit "$ac_status"); }; }; then
25789   cf_cv_header_stdbool_h=0
25790 else
25791   echo "$as_me: failed program was:" >&5
25792 cat "conftest.$ac_ext" >&5
25793 cat >"conftest.$ac_ext" <<_ACEOF
25794 #line 25794 "configure"
25795 #include "confdefs.h"
25796
25797 #ifndef __BEOS__
25798 #include <stdbool.h>
25799 #endif
25800
25801 int
25802 main (void)
25803 {
25804 bool foo = false
25805   ;
25806   return 0;
25807 }
25808 _ACEOF
25809 rm -f "conftest.$ac_objext"
25810 if { (eval echo "$as_me:25810: \"$ac_compile\"") >&5
25811   (eval $ac_compile) 2>&5
25812   ac_status=$?
25813   echo "$as_me:25813: \$? = $ac_status" >&5
25814   (exit "$ac_status"); } &&
25815          { ac_try='test -s "conftest.$ac_objext"'
25816   { (eval echo "$as_me:25816: \"$ac_try\"") >&5
25817   (eval $ac_try) 2>&5
25818   ac_status=$?
25819   echo "$as_me:25819: \$? = $ac_status" >&5
25820   (exit "$ac_status"); }; }; then
25821   cf_cv_header_stdbool_h=1
25822 else
25823   echo "$as_me: failed program was:" >&5
25824 cat "conftest.$ac_ext" >&5
25825 cf_cv_header_stdbool_h=0
25826 fi
25827 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25828 fi
25829 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25830 fi
25831
25832 if test "$cf_cv_header_stdbool_h" = 1
25833 then    echo "$as_me:25833: result: yes" >&5
25834 echo "${ECHO_T}yes" >&6
25835 else    echo "$as_me:25835: result: no" >&5
25836 echo "${ECHO_T}no" >&6
25837 fi
25838
25839 echo "$as_me:25839: checking for builtin bool type" >&5
25840 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25841
25842 if test "${cf_cv_builtin_bool+set}" = set; then
25843   echo $ECHO_N "(cached) $ECHO_C" >&6
25844 else
25845
25846         cat >"conftest.$ac_ext" <<_ACEOF
25847 #line 25847 "configure"
25848 #include "confdefs.h"
25849
25850 #include <stdio.h>
25851 #include <sys/types.h>
25852
25853 int
25854 main (void)
25855 {
25856 bool x = false
25857   ;
25858   return 0;
25859 }
25860 _ACEOF
25861 rm -f "conftest.$ac_objext"
25862 if { (eval echo "$as_me:25862: \"$ac_compile\"") >&5
25863   (eval $ac_compile) 2>&5
25864   ac_status=$?
25865   echo "$as_me:25865: \$? = $ac_status" >&5
25866   (exit "$ac_status"); } &&
25867          { ac_try='test -s "conftest.$ac_objext"'
25868   { (eval echo "$as_me:25868: \"$ac_try\"") >&5
25869   (eval $ac_try) 2>&5
25870   ac_status=$?
25871   echo "$as_me:25871: \$? = $ac_status" >&5
25872   (exit "$ac_status"); }; }; then
25873   cf_cv_builtin_bool=1
25874 else
25875   echo "$as_me: failed program was:" >&5
25876 cat "conftest.$ac_ext" >&5
25877 cf_cv_builtin_bool=0
25878 fi
25879 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25880
25881 fi
25882
25883 if test "$cf_cv_builtin_bool" = 1
25884 then    echo "$as_me:25884: result: yes" >&5
25885 echo "${ECHO_T}yes" >&6
25886 else    echo "$as_me:25886: result: no" >&5
25887 echo "${ECHO_T}no" >&6
25888 fi
25889
25890 echo "$as_me:25890: checking for bool" >&5
25891 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25892 if test "${ac_cv_type_bool+set}" = set; then
25893   echo $ECHO_N "(cached) $ECHO_C" >&6
25894 else
25895   cat >"conftest.$ac_ext" <<_ACEOF
25896 #line 25896 "configure"
25897 #include "confdefs.h"
25898
25899 #include <stdlib.h>
25900 #include <stdio.h>
25901
25902 #if defined(__cplusplus)
25903
25904 #ifdef HAVE_GXX_BUILTIN_H
25905 #include <g++/builtin.h>
25906 #elif HAVE_GPP_BUILTIN_H
25907 #include <gpp/builtin.h>
25908 #elif HAVE_BUILTIN_H
25909 #include <builtin.h>
25910 #endif
25911
25912 #else
25913
25914 #if $cf_cv_header_stdbool_h
25915 #include <stdbool.h>
25916 #endif
25917
25918 #endif
25919
25920 int
25921 main (void)
25922 {
25923 if ((bool *) 0)
25924   return 0;
25925 if (sizeof (bool))
25926   return 0;
25927   ;
25928   return 0;
25929 }
25930 _ACEOF
25931 rm -f "conftest.$ac_objext"
25932 if { (eval echo "$as_me:25932: \"$ac_compile\"") >&5
25933   (eval $ac_compile) 2>&5
25934   ac_status=$?
25935   echo "$as_me:25935: \$? = $ac_status" >&5
25936   (exit "$ac_status"); } &&
25937          { ac_try='test -s "conftest.$ac_objext"'
25938   { (eval echo "$as_me:25938: \"$ac_try\"") >&5
25939   (eval $ac_try) 2>&5
25940   ac_status=$?
25941   echo "$as_me:25941: \$? = $ac_status" >&5
25942   (exit "$ac_status"); }; }; then
25943   ac_cv_type_bool=yes
25944 else
25945   echo "$as_me: failed program was:" >&5
25946 cat "conftest.$ac_ext" >&5
25947 ac_cv_type_bool=no
25948 fi
25949 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25950 fi
25951 echo "$as_me:25951: result: $ac_cv_type_bool" >&5
25952 echo "${ECHO_T}$ac_cv_type_bool" >&6
25953
25954 echo "$as_me:25954: checking size of bool" >&5
25955 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25956 if test "${ac_cv_sizeof_bool+set}" = set; then
25957   echo $ECHO_N "(cached) $ECHO_C" >&6
25958 else
25959   if test "$ac_cv_type_bool" = yes; then
25960   if test "$cross_compiling" = yes; then
25961   # Depending upon the size, compute the lo and hi bounds.
25962 cat >"conftest.$ac_ext" <<_ACEOF
25963 #line 25963 "configure"
25964 #include "confdefs.h"
25965
25966 #include <stdlib.h>
25967 #include <stdio.h>
25968
25969 #if defined(__cplusplus)
25970
25971 #ifdef HAVE_GXX_BUILTIN_H
25972 #include <g++/builtin.h>
25973 #elif HAVE_GPP_BUILTIN_H
25974 #include <gpp/builtin.h>
25975 #elif HAVE_BUILTIN_H
25976 #include <builtin.h>
25977 #endif
25978
25979 #else
25980
25981 #if $cf_cv_header_stdbool_h
25982 #include <stdbool.h>
25983 #endif
25984
25985 #endif
25986
25987 int
25988 main (void)
25989 {
25990 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25991   ;
25992   return 0;
25993 }
25994 _ACEOF
25995 rm -f "conftest.$ac_objext"
25996 if { (eval echo "$as_me:25996: \"$ac_compile\"") >&5
25997   (eval $ac_compile) 2>&5
25998   ac_status=$?
25999   echo "$as_me:25999: \$? = $ac_status" >&5
26000   (exit "$ac_status"); } &&
26001          { ac_try='test -s "conftest.$ac_objext"'
26002   { (eval echo "$as_me:26002: \"$ac_try\"") >&5
26003   (eval $ac_try) 2>&5
26004   ac_status=$?
26005   echo "$as_me:26005: \$? = $ac_status" >&5
26006   (exit "$ac_status"); }; }; then
26007   ac_lo=0 ac_mid=0
26008   while :; do
26009     cat >"conftest.$ac_ext" <<_ACEOF
26010 #line 26010 "configure"
26011 #include "confdefs.h"
26012
26013 #include <stdlib.h>
26014 #include <stdio.h>
26015
26016 #if defined(__cplusplus)
26017
26018 #ifdef HAVE_GXX_BUILTIN_H
26019 #include <g++/builtin.h>
26020 #elif HAVE_GPP_BUILTIN_H
26021 #include <gpp/builtin.h>
26022 #elif HAVE_BUILTIN_H
26023 #include <builtin.h>
26024 #endif
26025
26026 #else
26027
26028 #if $cf_cv_header_stdbool_h
26029 #include <stdbool.h>
26030 #endif
26031
26032 #endif
26033
26034 int
26035 main (void)
26036 {
26037 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26038   ;
26039   return 0;
26040 }
26041 _ACEOF
26042 rm -f "conftest.$ac_objext"
26043 if { (eval echo "$as_me:26043: \"$ac_compile\"") >&5
26044   (eval $ac_compile) 2>&5
26045   ac_status=$?
26046   echo "$as_me:26046: \$? = $ac_status" >&5
26047   (exit "$ac_status"); } &&
26048          { ac_try='test -s "conftest.$ac_objext"'
26049   { (eval echo "$as_me:26049: \"$ac_try\"") >&5
26050   (eval $ac_try) 2>&5
26051   ac_status=$?
26052   echo "$as_me:26052: \$? = $ac_status" >&5
26053   (exit "$ac_status"); }; }; then
26054   ac_hi=$ac_mid; break
26055 else
26056   echo "$as_me: failed program was:" >&5
26057 cat "conftest.$ac_ext" >&5
26058 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26059 fi
26060 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26061   done
26062 else
26063   echo "$as_me: failed program was:" >&5
26064 cat "conftest.$ac_ext" >&5
26065 ac_hi=-1 ac_mid=-1
26066   while :; do
26067     cat >"conftest.$ac_ext" <<_ACEOF
26068 #line 26068 "configure"
26069 #include "confdefs.h"
26070
26071 #include <stdlib.h>
26072 #include <stdio.h>
26073
26074 #if defined(__cplusplus)
26075
26076 #ifdef HAVE_GXX_BUILTIN_H
26077 #include <g++/builtin.h>
26078 #elif HAVE_GPP_BUILTIN_H
26079 #include <gpp/builtin.h>
26080 #elif HAVE_BUILTIN_H
26081 #include <builtin.h>
26082 #endif
26083
26084 #else
26085
26086 #if $cf_cv_header_stdbool_h
26087 #include <stdbool.h>
26088 #endif
26089
26090 #endif
26091
26092 int
26093 main (void)
26094 {
26095 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26096   ;
26097   return 0;
26098 }
26099 _ACEOF
26100 rm -f "conftest.$ac_objext"
26101 if { (eval echo "$as_me:26101: \"$ac_compile\"") >&5
26102   (eval $ac_compile) 2>&5
26103   ac_status=$?
26104   echo "$as_me:26104: \$? = $ac_status" >&5
26105   (exit "$ac_status"); } &&
26106          { ac_try='test -s "conftest.$ac_objext"'
26107   { (eval echo "$as_me:26107: \"$ac_try\"") >&5
26108   (eval $ac_try) 2>&5
26109   ac_status=$?
26110   echo "$as_me:26110: \$? = $ac_status" >&5
26111   (exit "$ac_status"); }; }; then
26112   ac_lo=$ac_mid; break
26113 else
26114   echo "$as_me: failed program was:" >&5
26115 cat "conftest.$ac_ext" >&5
26116 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26117 fi
26118 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26119   done
26120 fi
26121 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26122 # Binary search between lo and hi bounds.
26123 while test "x$ac_lo" != "x$ac_hi"; do
26124   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26125   cat >"conftest.$ac_ext" <<_ACEOF
26126 #line 26126 "configure"
26127 #include "confdefs.h"
26128
26129 #include <stdlib.h>
26130 #include <stdio.h>
26131
26132 #if defined(__cplusplus)
26133
26134 #ifdef HAVE_GXX_BUILTIN_H
26135 #include <g++/builtin.h>
26136 #elif HAVE_GPP_BUILTIN_H
26137 #include <gpp/builtin.h>
26138 #elif HAVE_BUILTIN_H
26139 #include <builtin.h>
26140 #endif
26141
26142 #else
26143
26144 #if $cf_cv_header_stdbool_h
26145 #include <stdbool.h>
26146 #endif
26147
26148 #endif
26149
26150 int
26151 main (void)
26152 {
26153 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26154   ;
26155   return 0;
26156 }
26157 _ACEOF
26158 rm -f "conftest.$ac_objext"
26159 if { (eval echo "$as_me:26159: \"$ac_compile\"") >&5
26160   (eval $ac_compile) 2>&5
26161   ac_status=$?
26162   echo "$as_me:26162: \$? = $ac_status" >&5
26163   (exit "$ac_status"); } &&
26164          { ac_try='test -s "conftest.$ac_objext"'
26165   { (eval echo "$as_me:26165: \"$ac_try\"") >&5
26166   (eval $ac_try) 2>&5
26167   ac_status=$?
26168   echo "$as_me:26168: \$? = $ac_status" >&5
26169   (exit "$ac_status"); }; }; then
26170   ac_hi=$ac_mid
26171 else
26172   echo "$as_me: failed program was:" >&5
26173 cat "conftest.$ac_ext" >&5
26174 ac_lo=`expr "$ac_mid" + 1`
26175 fi
26176 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26177 done
26178 ac_cv_sizeof_bool=$ac_lo
26179 else
26180   if test "$cross_compiling" = yes; then
26181   { { echo "$as_me:26181: error: cannot run test program while cross compiling" >&5
26182 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26183    { (exit 1); exit 1; }; }
26184 else
26185   cat >"conftest.$ac_ext" <<_ACEOF
26186 #line 26186 "configure"
26187 #include "confdefs.h"
26188
26189 #include <stdlib.h>
26190 #include <stdio.h>
26191
26192 #if defined(__cplusplus)
26193
26194 #ifdef HAVE_GXX_BUILTIN_H
26195 #include <g++/builtin.h>
26196 #elif HAVE_GPP_BUILTIN_H
26197 #include <gpp/builtin.h>
26198 #elif HAVE_BUILTIN_H
26199 #include <builtin.h>
26200 #endif
26201
26202 #else
26203
26204 #if $cf_cv_header_stdbool_h
26205 #include <stdbool.h>
26206 #endif
26207
26208 #endif
26209
26210 int
26211 main (void)
26212 {
26213 FILE *f = fopen ("conftest.val", "w");
26214 if (!f)
26215   $ac_main_return (1);
26216 fprintf (f, "%ld", (long)(sizeof (bool)));
26217 fclose (f);
26218   ;
26219   return 0;
26220 }
26221 _ACEOF
26222 rm -f "conftest$ac_exeext"
26223 if { (eval echo "$as_me:26223: \"$ac_link\"") >&5
26224   (eval $ac_link) 2>&5
26225   ac_status=$?
26226   echo "$as_me:26226: \$? = $ac_status" >&5
26227   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26228   { (eval echo "$as_me:26228: \"$ac_try\"") >&5
26229   (eval $ac_try) 2>&5
26230   ac_status=$?
26231   echo "$as_me:26231: \$? = $ac_status" >&5
26232   (exit "$ac_status"); }; }; then
26233   ac_cv_sizeof_bool=`cat conftest.val`
26234 else
26235   echo "$as_me: program exited with status $ac_status" >&5
26236 echo "$as_me: failed program was:" >&5
26237 cat "conftest.$ac_ext" >&5
26238 fi
26239 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26240 fi
26241 fi
26242 rm -f conftest.val
26243 else
26244   ac_cv_sizeof_bool=0
26245 fi
26246 fi
26247 echo "$as_me:26247: result: $ac_cv_sizeof_bool" >&5
26248 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26249 cat >>confdefs.h <<EOF
26250 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26251 EOF
26252
26253 echo "$as_me:26253: checking for type of bool" >&5
26254 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26255 if test "${cf_cv_type_of_bool+set}" = set; then
26256   echo $ECHO_N "(cached) $ECHO_C" >&6
26257 else
26258
26259         rm -f cf_test.out
26260         if test "$cross_compiling" = yes; then
26261
26262                 case x$ac_cv_sizeof_bool in
26263                 (x1) cf_cv_type_of_bool="unsigned char";;
26264                 (x2) cf_cv_type_of_bool="unsigned short";;
26265                 (x4) cf_cv_type_of_bool="unsigned int";;
26266                 (x8) cf_cv_type_of_bool="unsigned long";;
26267                 (*)  cf_cv_type_of_bool=unknown;;
26268                 esac
26269
26270 else
26271   cat >"conftest.$ac_ext" <<_ACEOF
26272 #line 26272 "configure"
26273 #include "confdefs.h"
26274
26275 $ac_includes_default
26276
26277 #if defined(__cplusplus)
26278
26279 #ifdef HAVE_GXX_BUILTIN_H
26280 #include <g++/builtin.h>
26281 #elif HAVE_GPP_BUILTIN_H
26282 #include <gpp/builtin.h>
26283 #elif HAVE_BUILTIN_H
26284 #include <builtin.h>
26285 #endif
26286
26287 #else
26288
26289 #if $cf_cv_header_stdbool_h
26290 #include <stdbool.h>
26291 #endif
26292
26293 #endif
26294
26295 int main(void)
26296 {
26297         FILE *fp = fopen("cf_test.out", "w");
26298         if (fp != 0) {
26299                 bool x = true;
26300                 if ((bool)(-x) >= 0)
26301                         fputs("unsigned ", fp);
26302                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26303                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26304                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26305                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26306                 fclose(fp);
26307         }
26308         ${cf_cv_main_return:-return}(0);
26309 }
26310
26311 _ACEOF
26312 rm -f "conftest$ac_exeext"
26313 if { (eval echo "$as_me:26313: \"$ac_link\"") >&5
26314   (eval $ac_link) 2>&5
26315   ac_status=$?
26316   echo "$as_me:26316: \$? = $ac_status" >&5
26317   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26318   { (eval echo "$as_me:26318: \"$ac_try\"") >&5
26319   (eval $ac_try) 2>&5
26320   ac_status=$?
26321   echo "$as_me:26321: \$? = $ac_status" >&5
26322   (exit "$ac_status"); }; }; then
26323   cf_cv_type_of_bool=`cat cf_test.out`
26324                  if test -z "$cf_cv_type_of_bool"; then
26325                    cf_cv_type_of_bool=unknown
26326                  fi
26327 else
26328   echo "$as_me: program exited with status $ac_status" >&5
26329 echo "$as_me: failed program was:" >&5
26330 cat "conftest.$ac_ext" >&5
26331 cf_cv_type_of_bool=unknown
26332 fi
26333 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26334 fi
26335         rm -f cf_test.out
26336
26337 fi
26338 echo "$as_me:26338: result: $cf_cv_type_of_bool" >&5
26339 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26340
26341 if test "$cf_cv_type_of_bool" = unknown ; then
26342         case .$NCURSES_BOOL in
26343         (.auto|.) NCURSES_BOOL=unsigned;;
26344         esac
26345         { echo "$as_me:26345: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26346 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26347         cf_cv_type_of_bool=$NCURSES_BOOL
26348 fi
26349
26350 echo "$as_me:26350: checking for special defines needed for etip.h" >&5
26351 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
26352 cf_save_CXXFLAGS="$CXXFLAGS"
26353 cf_result="none"
26354
26355 # etip.h includes ncurses.h which includes ncurses_dll.h
26356 # But ncurses_dll.h is generated - fix here.
26357 test -d include || mkdir include
26358 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
26359
26360 for cf_math in "" MATH_H
26361 do
26362 for cf_excp in "" MATH_EXCEPTION
26363 do
26364         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
26365         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
26366         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
26367 cat >"conftest.$ac_ext" <<_ACEOF
26368 #line 26368 "configure"
26369 #include "confdefs.h"
26370
26371 #include <etip.h.in>
26372
26373 int
26374 main (void)
26375 {
26376
26377   ;
26378   return 0;
26379 }
26380 _ACEOF
26381 rm -f "conftest.$ac_objext"
26382 if { (eval echo "$as_me:26382: \"$ac_compile\"") >&5
26383   (eval $ac_compile) 2>&5
26384   ac_status=$?
26385   echo "$as_me:26385: \$? = $ac_status" >&5
26386   (exit "$ac_status"); } &&
26387          { ac_try='test -s "conftest.$ac_objext"'
26388   { (eval echo "$as_me:26388: \"$ac_try\"") >&5
26389   (eval $ac_try) 2>&5
26390   ac_status=$?
26391   echo "$as_me:26391: \$? = $ac_status" >&5
26392   (exit "$ac_status"); }; }; then
26393
26394         test -n "$cf_math" && cat >>confdefs.h <<EOF
26395 #define ETIP_NEEDS_${cf_math} 1
26396 EOF
26397
26398         test -n "$cf_excp" && cat >>confdefs.h <<EOF
26399 #define ETIP_NEEDS_${cf_excp} 1
26400 EOF
26401
26402         cf_result="$cf_math $cf_excp"
26403         break 2
26404
26405 else
26406   echo "$as_me: failed program was:" >&5
26407 cat "conftest.$ac_ext" >&5
26408 fi
26409 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26410 done
26411 done
26412 echo "$as_me:26412: result: $cf_result" >&5
26413 echo "${ECHO_T}$cf_result" >&6
26414 CXXFLAGS="$cf_save_CXXFLAGS"
26415
26416 if test -n "$CXX"; then
26417 echo "$as_me:26417: checking if $CXX accepts override keyword" >&5
26418 echo $ECHO_N "checking if $CXX accepts override keyword... $ECHO_C" >&6
26419 if test "${cf_cv_cpp_override+set}" = set; then
26420   echo $ECHO_N "(cached) $ECHO_C" >&6
26421 else
26422
26423         ac_ext=cc
26424 ac_cpp='$CXXCPP $CPPFLAGS'
26425 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26426 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26427 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26428 ac_main_return="return"
26429
26430         if test "$cross_compiling" = yes; then
26431   cf_cv_cpp_override=unknown
26432 else
26433   cat >"conftest.$ac_ext" <<_ACEOF
26434 #line 26434 "configure"
26435 #include "confdefs.h"
26436
26437 class base
26438 {
26439 public:
26440         virtual int foo(float x) = 0;
26441 };
26442
26443 class derived: public base
26444 {
26445 public:
26446         int foo(float x) override { return x != 0.0 ? 1 : 0; }
26447 };
26448
26449 int main(void) { }
26450
26451 _ACEOF
26452 rm -f "conftest$ac_exeext"
26453 if { (eval echo "$as_me:26453: \"$ac_link\"") >&5
26454   (eval $ac_link) 2>&5
26455   ac_status=$?
26456   echo "$as_me:26456: \$? = $ac_status" >&5
26457   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26458   { (eval echo "$as_me:26458: \"$ac_try\"") >&5
26459   (eval $ac_try) 2>&5
26460   ac_status=$?
26461   echo "$as_me:26461: \$? = $ac_status" >&5
26462   (exit "$ac_status"); }; }; then
26463   cf_cv_cpp_override=yes
26464 else
26465   echo "$as_me: program exited with status $ac_status" >&5
26466 echo "$as_me: failed program was:" >&5
26467 cat "conftest.$ac_ext" >&5
26468 cf_cv_cpp_override=no
26469 fi
26470 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26471 fi
26472         ac_ext=cc
26473 ac_cpp='$CXXCPP $CPPFLAGS'
26474 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26475 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26476 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26477 ac_main_return="return"
26478
26479 fi
26480 echo "$as_me:26480: result: $cf_cv_cpp_override" >&5
26481 echo "${ECHO_T}$cf_cv_cpp_override" >&6
26482 fi
26483 test "$cf_cv_cpp_override" = yes &&
26484 cat >>confdefs.h <<\EOF
26485 #define CPP_HAS_OVERRIDE 1
26486 EOF
26487
26488 if test -n "$CXX"; then
26489 echo "$as_me:26489: checking if $CXX accepts parameter initialization" >&5
26490 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
26491 if test "${cf_cv_cpp_param_init+set}" = set; then
26492   echo $ECHO_N "(cached) $ECHO_C" >&6
26493 else
26494
26495         ac_ext=cc
26496 ac_cpp='$CXXCPP $CPPFLAGS'
26497 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26498 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26499 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26500 ac_main_return="return"
26501
26502         if test "$cross_compiling" = yes; then
26503   cf_cv_cpp_param_init=unknown
26504 else
26505   cat >"conftest.$ac_ext" <<_ACEOF
26506 #line 26506 "configure"
26507 #include "confdefs.h"
26508
26509 class TEST {
26510 private:
26511         int value;
26512 public:
26513         TEST(int x = 1);
26514         ~TEST();
26515 };
26516
26517 TEST::TEST(int x = 1)   // some compilers do not like second initializer
26518 {
26519         value = x;
26520 }
26521 int main(void) { }
26522
26523 _ACEOF
26524 rm -f "conftest$ac_exeext"
26525 if { (eval echo "$as_me:26525: \"$ac_link\"") >&5
26526   (eval $ac_link) 2>&5
26527   ac_status=$?
26528   echo "$as_me:26528: \$? = $ac_status" >&5
26529   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26530   { (eval echo "$as_me:26530: \"$ac_try\"") >&5
26531   (eval $ac_try) 2>&5
26532   ac_status=$?
26533   echo "$as_me:26533: \$? = $ac_status" >&5
26534   (exit "$ac_status"); }; }; then
26535   cf_cv_cpp_param_init=yes
26536 else
26537   echo "$as_me: program exited with status $ac_status" >&5
26538 echo "$as_me: failed program was:" >&5
26539 cat "conftest.$ac_ext" >&5
26540 cf_cv_cpp_param_init=no
26541 fi
26542 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26543 fi
26544         ac_ext=cc
26545 ac_cpp='$CXXCPP $CPPFLAGS'
26546 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26547 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26548 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26549 ac_main_return="return"
26550
26551 fi
26552 echo "$as_me:26552: result: $cf_cv_cpp_param_init" >&5
26553 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
26554 fi
26555 test "$cf_cv_cpp_param_init" = yes &&
26556 cat >>confdefs.h <<\EOF
26557 #define CPP_HAS_PARAM_INIT 1
26558 EOF
26559
26560 if test -n "$CXX"; then
26561
26562 echo "$as_me:26562: checking if $CXX accepts static_cast" >&5
26563 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
26564 if test "${cf_cv_cpp_static_cast+set}" = set; then
26565   echo $ECHO_N "(cached) $ECHO_C" >&6
26566 else
26567
26568         ac_ext=cc
26569 ac_cpp='$CXXCPP $CPPFLAGS'
26570 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26571 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26572 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26573 ac_main_return="return"
26574
26575         cat >"conftest.$ac_ext" <<_ACEOF
26576 #line 26576 "configure"
26577 #include "confdefs.h"
26578
26579 class NCursesPanel
26580 {
26581 public:
26582   NCursesPanel(int nlines,
26583                int ncols,
26584                int begin_y = 0,
26585                int begin_x = 0)
26586   {
26587   }
26588   NCursesPanel();
26589   ~NCursesPanel();
26590 };
26591
26592 template<class T> class NCursesUserPanel : public NCursesPanel
26593 {
26594 public:
26595   NCursesUserPanel (int nlines,
26596                     int ncols,
26597                     int begin_y = 0,
26598                     int begin_x = 0,
26599                     const T* p_UserData = static_cast<T*>(0))
26600     : NCursesPanel (nlines, ncols, begin_y, begin_x)
26601   {
26602   };
26603   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
26604   {
26605   };
26606
26607   virtual ~NCursesUserPanel() {};
26608 };
26609
26610 int
26611 main (void)
26612 {
26613
26614         const char* p_UserData = static_cast<char*>(0)
26615   ;
26616   return 0;
26617 }
26618 _ACEOF
26619 rm -f "conftest.$ac_objext"
26620 if { (eval echo "$as_me:26620: \"$ac_compile\"") >&5
26621   (eval $ac_compile) 2>&5
26622   ac_status=$?
26623   echo "$as_me:26623: \$? = $ac_status" >&5
26624   (exit "$ac_status"); } &&
26625          { ac_try='test -s "conftest.$ac_objext"'
26626   { (eval echo "$as_me:26626: \"$ac_try\"") >&5
26627   (eval $ac_try) 2>&5
26628   ac_status=$?
26629   echo "$as_me:26629: \$? = $ac_status" >&5
26630   (exit "$ac_status"); }; }; then
26631   cf_cv_cpp_static_cast=yes
26632 else
26633   echo "$as_me: failed program was:" >&5
26634 cat "conftest.$ac_ext" >&5
26635 cf_cv_cpp_static_cast=no
26636 fi
26637 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26638
26639         ac_ext=cc
26640 ac_cpp='$CXXCPP $CPPFLAGS'
26641 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26642 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26643 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26644 ac_main_return="return"
26645
26646 fi
26647 echo "$as_me:26647: result: $cf_cv_cpp_static_cast" >&5
26648 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
26649
26650 fi
26651
26652 test "$cf_cv_cpp_static_cast" = yes &&
26653 cat >>confdefs.h <<\EOF
26654 #define CPP_HAS_STATIC_CAST 1
26655 EOF
26656
26657         CXX_AR='$(AR)'
26658         CXX_ARFLAGS='$(ARFLAGS)'
26659         case "$cf_cv_system_name" in
26660         (irix*)
26661             if test "$GXX" != yes ; then
26662                 CXX_AR='$(CXX)'
26663                 CXX_ARFLAGS='-ar -o'
26664             fi
26665             ;;
26666         (sco3.2v5*)
26667             CXXLDFLAGS="-u main"
26668             ;;
26669         (solaris2*)
26670             if test "$GXX" != yes ; then
26671                 CXX_AR='$(CXX)'
26672                 CXX_ARFLAGS='-xar -o'
26673             fi
26674             ;;
26675         esac
26676
26677 else
26678         cf_cxx_library=no
26679         cf_cv_builtin_bool=1
26680
26681         # Just because we are not configuring against C++ right now does not
26682         # mean that a user will not want to use C++.  Some distributors disable
26683         # the C++ portion of this configuration as a shortcut (or just to avoid
26684         # compiling the demo in the c++ directory).  So we need a reasonable
26685         # default for the 'bool' type.
26686         #
26687         # Caveat: since the storage of the bool type is not standardized, it
26688         # may change.
26689
26690         if test "$NCURSES_BOOL" != auto ; then
26691                 cf_cv_type_of_bool=$NCURSES_BOOL
26692                 cf_cv_header_stdbool_h=0
26693         else
26694                 if test "$cf_cv_header_stdbool_h" = 1 ; then
26695
26696 echo "$as_me:26696: checking for bool" >&5
26697 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26698 if test "${ac_cv_type_bool+set}" = set; then
26699   echo $ECHO_N "(cached) $ECHO_C" >&6
26700 else
26701   cat >"conftest.$ac_ext" <<_ACEOF
26702 #line 26702 "configure"
26703 #include "confdefs.h"
26704
26705 #include <stdlib.h>
26706 #include <stdio.h>
26707
26708 #if defined(__cplusplus)
26709
26710 #ifdef HAVE_GXX_BUILTIN_H
26711 #include <g++/builtin.h>
26712 #elif HAVE_GPP_BUILTIN_H
26713 #include <gpp/builtin.h>
26714 #elif HAVE_BUILTIN_H
26715 #include <builtin.h>
26716 #endif
26717
26718 #else
26719
26720 #if $cf_cv_header_stdbool_h
26721 #include <stdbool.h>
26722 #endif
26723
26724 #endif
26725
26726 int
26727 main (void)
26728 {
26729 if ((bool *) 0)
26730   return 0;
26731 if (sizeof (bool))
26732   return 0;
26733   ;
26734   return 0;
26735 }
26736 _ACEOF
26737 rm -f "conftest.$ac_objext"
26738 if { (eval echo "$as_me:26738: \"$ac_compile\"") >&5
26739   (eval $ac_compile) 2>&5
26740   ac_status=$?
26741   echo "$as_me:26741: \$? = $ac_status" >&5
26742   (exit "$ac_status"); } &&
26743          { ac_try='test -s "conftest.$ac_objext"'
26744   { (eval echo "$as_me:26744: \"$ac_try\"") >&5
26745   (eval $ac_try) 2>&5
26746   ac_status=$?
26747   echo "$as_me:26747: \$? = $ac_status" >&5
26748   (exit "$ac_status"); }; }; then
26749   ac_cv_type_bool=yes
26750 else
26751   echo "$as_me: failed program was:" >&5
26752 cat "conftest.$ac_ext" >&5
26753 ac_cv_type_bool=no
26754 fi
26755 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26756 fi
26757 echo "$as_me:26757: result: $ac_cv_type_bool" >&5
26758 echo "${ECHO_T}$ac_cv_type_bool" >&6
26759
26760 echo "$as_me:26760: checking size of bool" >&5
26761 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26762 if test "${ac_cv_sizeof_bool+set}" = set; then
26763   echo $ECHO_N "(cached) $ECHO_C" >&6
26764 else
26765   if test "$ac_cv_type_bool" = yes; then
26766   if test "$cross_compiling" = yes; then
26767   # Depending upon the size, compute the lo and hi bounds.
26768 cat >"conftest.$ac_ext" <<_ACEOF
26769 #line 26769 "configure"
26770 #include "confdefs.h"
26771
26772 #include <stdlib.h>
26773 #include <stdio.h>
26774
26775 #if defined(__cplusplus)
26776
26777 #ifdef HAVE_GXX_BUILTIN_H
26778 #include <g++/builtin.h>
26779 #elif HAVE_GPP_BUILTIN_H
26780 #include <gpp/builtin.h>
26781 #elif HAVE_BUILTIN_H
26782 #include <builtin.h>
26783 #endif
26784
26785 #else
26786
26787 #if $cf_cv_header_stdbool_h
26788 #include <stdbool.h>
26789 #endif
26790
26791 #endif
26792
26793 int
26794 main (void)
26795 {
26796 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26797   ;
26798   return 0;
26799 }
26800 _ACEOF
26801 rm -f "conftest.$ac_objext"
26802 if { (eval echo "$as_me:26802: \"$ac_compile\"") >&5
26803   (eval $ac_compile) 2>&5
26804   ac_status=$?
26805   echo "$as_me:26805: \$? = $ac_status" >&5
26806   (exit "$ac_status"); } &&
26807          { ac_try='test -s "conftest.$ac_objext"'
26808   { (eval echo "$as_me:26808: \"$ac_try\"") >&5
26809   (eval $ac_try) 2>&5
26810   ac_status=$?
26811   echo "$as_me:26811: \$? = $ac_status" >&5
26812   (exit "$ac_status"); }; }; then
26813   ac_lo=0 ac_mid=0
26814   while :; do
26815     cat >"conftest.$ac_ext" <<_ACEOF
26816 #line 26816 "configure"
26817 #include "confdefs.h"
26818
26819 #include <stdlib.h>
26820 #include <stdio.h>
26821
26822 #if defined(__cplusplus)
26823
26824 #ifdef HAVE_GXX_BUILTIN_H
26825 #include <g++/builtin.h>
26826 #elif HAVE_GPP_BUILTIN_H
26827 #include <gpp/builtin.h>
26828 #elif HAVE_BUILTIN_H
26829 #include <builtin.h>
26830 #endif
26831
26832 #else
26833
26834 #if $cf_cv_header_stdbool_h
26835 #include <stdbool.h>
26836 #endif
26837
26838 #endif
26839
26840 int
26841 main (void)
26842 {
26843 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26844   ;
26845   return 0;
26846 }
26847 _ACEOF
26848 rm -f "conftest.$ac_objext"
26849 if { (eval echo "$as_me:26849: \"$ac_compile\"") >&5
26850   (eval $ac_compile) 2>&5
26851   ac_status=$?
26852   echo "$as_me:26852: \$? = $ac_status" >&5
26853   (exit "$ac_status"); } &&
26854          { ac_try='test -s "conftest.$ac_objext"'
26855   { (eval echo "$as_me:26855: \"$ac_try\"") >&5
26856   (eval $ac_try) 2>&5
26857   ac_status=$?
26858   echo "$as_me:26858: \$? = $ac_status" >&5
26859   (exit "$ac_status"); }; }; then
26860   ac_hi=$ac_mid; break
26861 else
26862   echo "$as_me: failed program was:" >&5
26863 cat "conftest.$ac_ext" >&5
26864 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26865 fi
26866 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26867   done
26868 else
26869   echo "$as_me: failed program was:" >&5
26870 cat "conftest.$ac_ext" >&5
26871 ac_hi=-1 ac_mid=-1
26872   while :; do
26873     cat >"conftest.$ac_ext" <<_ACEOF
26874 #line 26874 "configure"
26875 #include "confdefs.h"
26876
26877 #include <stdlib.h>
26878 #include <stdio.h>
26879
26880 #if defined(__cplusplus)
26881
26882 #ifdef HAVE_GXX_BUILTIN_H
26883 #include <g++/builtin.h>
26884 #elif HAVE_GPP_BUILTIN_H
26885 #include <gpp/builtin.h>
26886 #elif HAVE_BUILTIN_H
26887 #include <builtin.h>
26888 #endif
26889
26890 #else
26891
26892 #if $cf_cv_header_stdbool_h
26893 #include <stdbool.h>
26894 #endif
26895
26896 #endif
26897
26898 int
26899 main (void)
26900 {
26901 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26902   ;
26903   return 0;
26904 }
26905 _ACEOF
26906 rm -f "conftest.$ac_objext"
26907 if { (eval echo "$as_me:26907: \"$ac_compile\"") >&5
26908   (eval $ac_compile) 2>&5
26909   ac_status=$?
26910   echo "$as_me:26910: \$? = $ac_status" >&5
26911   (exit "$ac_status"); } &&
26912          { ac_try='test -s "conftest.$ac_objext"'
26913   { (eval echo "$as_me:26913: \"$ac_try\"") >&5
26914   (eval $ac_try) 2>&5
26915   ac_status=$?
26916   echo "$as_me:26916: \$? = $ac_status" >&5
26917   (exit "$ac_status"); }; }; then
26918   ac_lo=$ac_mid; break
26919 else
26920   echo "$as_me: failed program was:" >&5
26921 cat "conftest.$ac_ext" >&5
26922 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26923 fi
26924 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26925   done
26926 fi
26927 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26928 # Binary search between lo and hi bounds.
26929 while test "x$ac_lo" != "x$ac_hi"; do
26930   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26931   cat >"conftest.$ac_ext" <<_ACEOF
26932 #line 26932 "configure"
26933 #include "confdefs.h"
26934
26935 #include <stdlib.h>
26936 #include <stdio.h>
26937
26938 #if defined(__cplusplus)
26939
26940 #ifdef HAVE_GXX_BUILTIN_H
26941 #include <g++/builtin.h>
26942 #elif HAVE_GPP_BUILTIN_H
26943 #include <gpp/builtin.h>
26944 #elif HAVE_BUILTIN_H
26945 #include <builtin.h>
26946 #endif
26947
26948 #else
26949
26950 #if $cf_cv_header_stdbool_h
26951 #include <stdbool.h>
26952 #endif
26953
26954 #endif
26955
26956 int
26957 main (void)
26958 {
26959 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26960   ;
26961   return 0;
26962 }
26963 _ACEOF
26964 rm -f "conftest.$ac_objext"
26965 if { (eval echo "$as_me:26965: \"$ac_compile\"") >&5
26966   (eval $ac_compile) 2>&5
26967   ac_status=$?
26968   echo "$as_me:26968: \$? = $ac_status" >&5
26969   (exit "$ac_status"); } &&
26970          { ac_try='test -s "conftest.$ac_objext"'
26971   { (eval echo "$as_me:26971: \"$ac_try\"") >&5
26972   (eval $ac_try) 2>&5
26973   ac_status=$?
26974   echo "$as_me:26974: \$? = $ac_status" >&5
26975   (exit "$ac_status"); }; }; then
26976   ac_hi=$ac_mid
26977 else
26978   echo "$as_me: failed program was:" >&5
26979 cat "conftest.$ac_ext" >&5
26980 ac_lo=`expr "$ac_mid" + 1`
26981 fi
26982 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26983 done
26984 ac_cv_sizeof_bool=$ac_lo
26985 else
26986   if test "$cross_compiling" = yes; then
26987   { { echo "$as_me:26987: error: cannot run test program while cross compiling" >&5
26988 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26989    { (exit 1); exit 1; }; }
26990 else
26991   cat >"conftest.$ac_ext" <<_ACEOF
26992 #line 26992 "configure"
26993 #include "confdefs.h"
26994
26995 #include <stdlib.h>
26996 #include <stdio.h>
26997
26998 #if defined(__cplusplus)
26999
27000 #ifdef HAVE_GXX_BUILTIN_H
27001 #include <g++/builtin.h>
27002 #elif HAVE_GPP_BUILTIN_H
27003 #include <gpp/builtin.h>
27004 #elif HAVE_BUILTIN_H
27005 #include <builtin.h>
27006 #endif
27007
27008 #else
27009
27010 #if $cf_cv_header_stdbool_h
27011 #include <stdbool.h>
27012 #endif
27013
27014 #endif
27015
27016 int
27017 main (void)
27018 {
27019 FILE *f = fopen ("conftest.val", "w");
27020 if (!f)
27021   $ac_main_return (1);
27022 fprintf (f, "%ld", (long)(sizeof (bool)));
27023 fclose (f);
27024   ;
27025   return 0;
27026 }
27027 _ACEOF
27028 rm -f "conftest$ac_exeext"
27029 if { (eval echo "$as_me:27029: \"$ac_link\"") >&5
27030   (eval $ac_link) 2>&5
27031   ac_status=$?
27032   echo "$as_me:27032: \$? = $ac_status" >&5
27033   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27034   { (eval echo "$as_me:27034: \"$ac_try\"") >&5
27035   (eval $ac_try) 2>&5
27036   ac_status=$?
27037   echo "$as_me:27037: \$? = $ac_status" >&5
27038   (exit "$ac_status"); }; }; then
27039   ac_cv_sizeof_bool=`cat conftest.val`
27040 else
27041   echo "$as_me: program exited with status $ac_status" >&5
27042 echo "$as_me: failed program was:" >&5
27043 cat "conftest.$ac_ext" >&5
27044 fi
27045 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27046 fi
27047 fi
27048 rm -f conftest.val
27049 else
27050   ac_cv_sizeof_bool=0
27051 fi
27052 fi
27053 echo "$as_me:27053: result: $ac_cv_sizeof_bool" >&5
27054 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
27055 cat >>confdefs.h <<EOF
27056 #define SIZEOF_BOOL $ac_cv_sizeof_bool
27057 EOF
27058
27059 echo "$as_me:27059: checking for type of bool" >&5
27060 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
27061 if test "${cf_cv_type_of_bool+set}" = set; then
27062   echo $ECHO_N "(cached) $ECHO_C" >&6
27063 else
27064
27065         rm -f cf_test.out
27066         if test "$cross_compiling" = yes; then
27067
27068                 case x$ac_cv_sizeof_bool in
27069                 (x1) cf_cv_type_of_bool="unsigned char";;
27070                 (x2) cf_cv_type_of_bool="unsigned short";;
27071                 (x4) cf_cv_type_of_bool="unsigned int";;
27072                 (x8) cf_cv_type_of_bool="unsigned long";;
27073                 (*)  cf_cv_type_of_bool=unknown;;
27074                 esac
27075
27076 else
27077   cat >"conftest.$ac_ext" <<_ACEOF
27078 #line 27078 "configure"
27079 #include "confdefs.h"
27080
27081 $ac_includes_default
27082
27083 #if defined(__cplusplus)
27084
27085 #ifdef HAVE_GXX_BUILTIN_H
27086 #include <g++/builtin.h>
27087 #elif HAVE_GPP_BUILTIN_H
27088 #include <gpp/builtin.h>
27089 #elif HAVE_BUILTIN_H
27090 #include <builtin.h>
27091 #endif
27092
27093 #else
27094
27095 #if $cf_cv_header_stdbool_h
27096 #include <stdbool.h>
27097 #endif
27098
27099 #endif
27100
27101 int main(void)
27102 {
27103         FILE *fp = fopen("cf_test.out", "w");
27104         if (fp != 0) {
27105                 bool x = true;
27106                 if ((bool)(-x) >= 0)
27107                         fputs("unsigned ", fp);
27108                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
27109                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
27110                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
27111                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
27112                 fclose(fp);
27113         }
27114         ${cf_cv_main_return:-return}(0);
27115 }
27116
27117 _ACEOF
27118 rm -f "conftest$ac_exeext"
27119 if { (eval echo "$as_me:27119: \"$ac_link\"") >&5
27120   (eval $ac_link) 2>&5
27121   ac_status=$?
27122   echo "$as_me:27122: \$? = $ac_status" >&5
27123   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27124   { (eval echo "$as_me:27124: \"$ac_try\"") >&5
27125   (eval $ac_try) 2>&5
27126   ac_status=$?
27127   echo "$as_me:27127: \$? = $ac_status" >&5
27128   (exit "$ac_status"); }; }; then
27129   cf_cv_type_of_bool=`cat cf_test.out`
27130                  if test -z "$cf_cv_type_of_bool"; then
27131                    cf_cv_type_of_bool=unknown
27132                  fi
27133 else
27134   echo "$as_me: program exited with status $ac_status" >&5
27135 echo "$as_me: failed program was:" >&5
27136 cat "conftest.$ac_ext" >&5
27137 cf_cv_type_of_bool=unknown
27138 fi
27139 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27140 fi
27141         rm -f cf_test.out
27142
27143 fi
27144 echo "$as_me:27144: result: $cf_cv_type_of_bool" >&5
27145 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27146
27147 if test "$cf_cv_type_of_bool" = unknown ; then
27148         case .$NCURSES_BOOL in
27149         (.auto|.) NCURSES_BOOL=unsigned;;
27150         esac
27151         { echo "$as_me:27151: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
27152 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
27153         cf_cv_type_of_bool=$NCURSES_BOOL
27154 fi
27155
27156                 else
27157                         echo "$as_me:27157: checking for fallback type of bool" >&5
27158 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
27159                         case "$host_cpu" in
27160                         (i?86)  cf_cv_type_of_bool=char ;;
27161                         (*)     cf_cv_type_of_bool=int  ;;
27162                         esac
27163                         echo "$as_me:27163: result: $cf_cv_type_of_bool" >&5
27164 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27165                 fi
27166         fi
27167 fi
27168
27169 # If the C compiler did not declare bool, and we did not determine that the C++
27170 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
27171 # ncurses library use the same type as C++ bool.  Note that this allows one to
27172 # specify the type of bool in a configure-script option and postpone
27173 # integration with the C++ compiler provided that the types are compatible.
27174 USE_CXX_BOOL=1
27175 if test "$cf_cv_cc_bool_type" = 1
27176 then
27177         # oops: C has a bool.  Unlikely, but C++ could differ.
27178         USE_CXX_BOOL=0
27179 elif test "$cf_cv_builtin_bool" = 0
27180 then
27181         # C++ has no bool
27182         USE_CXX_BOOL=0
27183 else
27184         # this is the normal case
27185         USE_CXX_BOOL='defined(__cplusplus)'
27186 fi
27187
27188 if test -f "${srcdir}/Ada95/Makefile.in" ; then
27189
27190         if test "$cf_with_ada" != "no" ; then
27191                 if test "$with_libtool" != "no"; then
27192                         { echo "$as_me:27192: WARNING: libtool does not support Ada - disabling feature" >&5
27193 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
27194                         cf_with_ada=no
27195                 fi
27196         fi
27197
27198         if test "$cf_with_ada" != "no" ; then
27199
27200 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
27201 do
27202
27203 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27204
27205         unset ac_cv_path_cf_TEMP_gnat
27206         unset cf_TEMP_gnat
27207         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
27208 set dummy $cf_prog_gnat; ac_word=$2
27209 echo "$as_me:27209: checking for $ac_word" >&5
27210 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27211 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
27212   echo $ECHO_N "(cached) $ECHO_C" >&6
27213 else
27214   case $cf_TEMP_gnat in
27215   [\\/]* | ?:[\\/]*)
27216   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
27217   ;;
27218   *)
27219   ac_save_IFS=$IFS; IFS=$ac_path_separator
27220 ac_dummy="$PATH"
27221 for ac_dir in $ac_dummy; do
27222   IFS=$ac_save_IFS
27223   test -z "$ac_dir" && ac_dir=.
27224   if $as_executable_p "$ac_dir/$ac_word"; then
27225    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
27226    echo "$as_me:27226: found $ac_dir/$ac_word" >&5
27227    break
27228 fi
27229 done
27230
27231   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
27232   ;;
27233 esac
27234 fi
27235 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
27236
27237 if test -n "$cf_TEMP_gnat"; then
27238   echo "$as_me:27238: result: $cf_TEMP_gnat" >&5
27239 echo "${ECHO_T}$cf_TEMP_gnat" >&6
27240 else
27241   echo "$as_me:27241: result: no" >&5
27242 echo "${ECHO_T}no" >&6
27243 fi
27244
27245         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
27246
27247         if test "x$cf_TEMP_gnat" != xno; then
27248                 unset cf_cv_gnat_version
27249                 unset cf_TEMP_gnat
27250
27251 echo "$as_me:27251: checking for $cf_prog_gnat version" >&5
27252 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
27253 if test "${cf_cv_gnat_version+set}" = set; then
27254   echo $ECHO_N "(cached) $ECHO_C" >&6
27255 else
27256
27257 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
27258         grep '[0-9].[0-9][0-9]*' |\
27259         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27260
27261 fi
27262 echo "$as_me:27262: result: $cf_cv_gnat_version" >&5
27263 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27264 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27265 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
27266
27267         fi
27268         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
27269
27270         unset cf_TEMP_gnat
27271         unset cf_cv_gnat_version
27272         unset ac_cv_path_cf_TEMP_gnat
27273 done
27274
27275 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
27276         cf_ada_make=
27277         cf_cv_prog_gnat_correct=no
27278 else
27279         cf_ada_make=gnatmake
27280         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
27281                 # gprconfig is newer than gnatmake; we can continue...
27282                 cf_ada_config="##"
27283         else
27284                 rm -rf ./conftest* ./*~conftest*
27285                 if mkdir conftest.src
27286                 then
27287                         cf_ada_config=""
27288                         cd conftest.src
27289                         for cf_gprconfig in Ada C
27290                         do
27291                                 echo "$as_me:27291: checking for gprconfig name for $cf_gprconfig" >&5
27292 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
27293                                 if test "$cf_gprconfig" = C
27294                                 then
27295                                         for cf_gprconfig_param in \
27296                                                 "$cf_gprconfig,,,,GNATGCC" \
27297                                                 "$cf_gprconfig,,,,GCC" \
27298                                                 "$cf_gprconfig"
27299                                         do
27300                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27301                                                 test -n "$cf_gprconfig_value" && break
27302                                         done
27303                                 else
27304                                         cf_gprconfig_param=$cf_gprconfig
27305                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27306                                 fi
27307                                 if test -n "$cf_gprconfig_value"
27308                                 then
27309                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
27310                                         echo "$as_me:27310: result: $cf_gprconfig_value" >&5
27311 echo "${ECHO_T}$cf_gprconfig_value" >&6
27312                                 else
27313                                         echo "$as_me:27313: result: missing" >&5
27314 echo "${ECHO_T}missing" >&6
27315                                         cf_ada_config="#"
27316                                         break
27317                                 fi
27318                         done
27319                         cd ..
27320                         rm -rf ./conftest* ./*~conftest*
27321                 fi
27322         fi
27323         if test "x$cf_ada_config" != "x#"
27324         then
27325
27326 echo "$as_me:27326: checking for gnat version" >&5
27327 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
27328 if test "${cf_cv_gnat_version+set}" = set; then
27329   echo $ECHO_N "(cached) $ECHO_C" >&6
27330 else
27331
27332 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
27333         grep '[0-9].[0-9][0-9]*' |\
27334         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27335
27336 fi
27337 echo "$as_me:27337: result: $cf_cv_gnat_version" >&5
27338 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27339 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27340
27341 case "$cf_cv_gnat_version" in
27342 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27343         cf_cv_prog_gnat_correct=yes
27344         ;;
27345 (*)
27346         { echo "$as_me:27346: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
27347 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
27348         cf_cv_prog_gnat_correct=no
27349         ;;
27350 esac
27351
27352                 # Extract the first word of "m4", so it can be a program name with args.
27353 set dummy m4; ac_word=$2
27354 echo "$as_me:27354: checking for $ac_word" >&5
27355 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27356 if test "${ac_cv_prog_M4_exists+set}" = set; then
27357   echo $ECHO_N "(cached) $ECHO_C" >&6
27358 else
27359   if test -n "$M4_exists"; then
27360   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
27361 else
27362   ac_save_IFS=$IFS; IFS=$ac_path_separator
27363 ac_dummy="$PATH"
27364 for ac_dir in $ac_dummy; do
27365   IFS=$ac_save_IFS
27366   test -z "$ac_dir" && ac_dir=.
27367   $as_executable_p "$ac_dir/$ac_word" || continue
27368 ac_cv_prog_M4_exists="yes"
27369 echo "$as_me:27369: found $ac_dir/$ac_word" >&5
27370 break
27371 done
27372
27373   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
27374 fi
27375 fi
27376 M4_exists=$ac_cv_prog_M4_exists
27377 if test -n "$M4_exists"; then
27378   echo "$as_me:27378: result: $M4_exists" >&5
27379 echo "${ECHO_T}$M4_exists" >&6
27380 else
27381   echo "$as_me:27381: result: no" >&5
27382 echo "${ECHO_T}no" >&6
27383 fi
27384
27385                 if test "$ac_cv_prog_M4_exists" = no; then
27386                         cf_cv_prog_gnat_correct=no
27387                         { echo "$as_me:27387: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
27388 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
27389                 fi
27390                 if test "$cf_cv_prog_gnat_correct" = yes; then
27391                         echo "$as_me:27391: checking if GNAT works" >&5
27392 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
27393
27394 rm -rf ./conftest* ./*~conftest*
27395 cat >>conftest.ads <<CF_EOF
27396 procedure conftest;
27397 CF_EOF
27398 cat >>conftest.adb <<CF_EOF
27399 with Text_IO;
27400 with GNAT.OS_Lib;
27401 procedure conftest is
27402 begin
27403    Text_IO.Put ("Hello World");
27404    Text_IO.New_Line;
27405    GNAT.OS_Lib.OS_Exit (0);
27406 end conftest;
27407 CF_EOF
27408 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27409    if ( ./conftest 1>&5 2>&1 ) ; then
27410       cf_cv_prog_gnat_correct=yes
27411    else
27412       cf_cv_prog_gnat_correct=no
27413    fi
27414 else
27415    cf_cv_prog_gnat_correct=no
27416 fi
27417 rm -rf ./conftest* ./*~conftest*
27418
27419                         echo "$as_me:27419: result: $cf_cv_prog_gnat_correct" >&5
27420 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
27421                 fi
27422         else
27423                 cf_cv_prog_gnat_correct=no
27424         fi
27425 fi
27426
27427                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
27428
27429         ADAFLAGS="$ADAFLAGS -gnatpn"
27430
27431         echo "$as_me:27431: checking optimization options for ADAFLAGS" >&5
27432 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
27433         case "$CFLAGS" in
27434         (*-g*)
27435
27436         ADAFLAGS="$ADAFLAGS -g"
27437
27438                 ;;
27439         esac
27440         case "$CFLAGS" in
27441         (*-O*)
27442                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
27443
27444         ADAFLAGS="$ADAFLAGS $cf_O_flag"
27445
27446                 ;;
27447         esac
27448         echo "$as_me:27448: result: $ADAFLAGS" >&5
27449 echo "${ECHO_T}$ADAFLAGS" >&6
27450
27451 echo "$as_me:27451: checking if GNATPREP supports -T option" >&5
27452 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
27453 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
27454   echo $ECHO_N "(cached) $ECHO_C" >&6
27455 else
27456
27457 cf_cv_gnatprep_opt_t=no
27458 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
27459
27460 fi
27461 echo "$as_me:27461: result: $cf_cv_gnatprep_opt_t" >&5
27462 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
27463 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
27464
27465 echo "$as_me:27465: checking if GNAT supports generics" >&5
27466 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
27467 case "$cf_cv_gnat_version" in
27468 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27469         cf_gnat_generics=yes
27470         ;;
27471 (*)
27472         cf_gnat_generics=no
27473         ;;
27474 esac
27475 echo "$as_me:27475: result: $cf_gnat_generics" >&5
27476 echo "${ECHO_T}$cf_gnat_generics" >&6
27477
27478 if test "$cf_gnat_generics" = yes
27479 then
27480         cf_compile_generics=generics
27481         cf_generic_objects="\${GENOBJS}"
27482 else
27483         cf_compile_generics=
27484         cf_generic_objects=
27485 fi
27486
27487 echo "$as_me:27487: checking if GNAT supports SIGINT" >&5
27488 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
27489 if test "${cf_cv_gnat_sigint+set}" = set; then
27490   echo $ECHO_N "(cached) $ECHO_C" >&6
27491 else
27492
27493 rm -rf ./conftest* ./*~conftest*
27494 cat >>conftest.ads <<CF_EOF
27495 with Ada.Interrupts.Names;
27496
27497 package ConfTest is
27498
27499    pragma Warnings (Off);  --  the next pragma exists since 3.11p
27500    pragma Unreserve_All_Interrupts;
27501    pragma Warnings (On);
27502
27503    protected Process is
27504       procedure Stop;
27505       function Continue return Boolean;
27506       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
27507    private
27508       Done : Boolean := False;
27509    end Process;
27510
27511 end ConfTest;
27512 CF_EOF
27513 cat >>conftest.adb <<CF_EOF
27514 package body ConfTest is
27515    protected body Process is
27516       procedure Stop is
27517       begin
27518          Done := True;
27519       end Stop;
27520       function Continue return Boolean is
27521       begin
27522          return not Done;
27523       end Continue;
27524    end Process;
27525 end ConfTest;
27526 CF_EOF
27527 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27528       cf_cv_gnat_sigint=yes
27529 else
27530    cf_cv_gnat_sigint=no
27531 fi
27532 rm -rf ./conftest* ./*~conftest*
27533
27534 fi
27535 echo "$as_me:27535: result: $cf_cv_gnat_sigint" >&5
27536 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
27537
27538 if test "$cf_cv_gnat_sigint" = yes ; then
27539         USE_GNAT_SIGINT=""
27540 else
27541         USE_GNAT_SIGINT="#"
27542 fi
27543
27544 cf_gnat_libraries=no
27545 cf_gnat_projects=no
27546
27547 if test "$enable_gnat_projects" != no ; then
27548 echo "$as_me:27548: checking if GNAT supports project files" >&5
27549 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
27550 case "$cf_cv_gnat_version" in
27551 (3.[0-9]*)
27552         ;;
27553 (*)
27554         case "$cf_cv_system_name" in
27555         (cygwin*|msys*)
27556                 ;;
27557         (*)
27558                 rm -rf ./conftest* ./*~conftest*
27559                 if mkdir conftest.src conftest.bin conftest.lib
27560                 then
27561                         cd conftest.src
27562                         rm -rf ./conftest* ./*~conftest*
27563                         cat >>library.gpr <<CF_EOF
27564 project Library is
27565   Kind := External ("LIB_KIND");
27566   for Library_Name use "ConfTest";
27567   for Object_Dir use ".";
27568   for Library_ALI_Dir use External("LIBRARY_DIR");
27569   for Library_Version use External ("SONAME");
27570   for Library_Kind use Kind;
27571   for Library_Dir use External("BUILD_DIR");
27572   Source_Dir := External ("SOURCE_DIR");
27573   for Source_Dirs use (Source_Dir);
27574 end Library;
27575 CF_EOF
27576                         cat >>confpackage.ads <<CF_EOF
27577 package ConfPackage is
27578    procedure conftest;
27579 end ConfPackage;
27580 CF_EOF
27581                         cat >>confpackage.adb <<CF_EOF
27582 with Text_IO;
27583 package body ConfPackage is
27584    procedure conftest is
27585    begin
27586       Text_IO.Put ("Hello World");
27587       Text_IO.New_Line;
27588    end conftest;
27589 end ConfPackage;
27590 CF_EOF
27591                         if ( "$cf_ada_make" $ADAFLAGS \
27592                                         -Plibrary.gpr \
27593                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
27594                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
27595                                         -XSOURCE_DIR="`pwd`" \
27596                                         -XSONAME=libConfTest.so.1 \
27597                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
27598                                 cf_gnat_projects=yes
27599                         fi
27600                         cd ..
27601                 fi
27602                 if test -f conftest.lib/confpackage.ali
27603                 then
27604                         cf_gnat_libraries=yes
27605                 fi
27606                 rm -rf ./conftest* ./*~conftest*
27607                 ;;
27608         esac
27609         ;;
27610 esac
27611 echo "$as_me:27611: result: $cf_gnat_projects" >&5
27612 echo "${ECHO_T}$cf_gnat_projects" >&6
27613 fi # enable_gnat_projects
27614
27615 if test "$cf_gnat_projects" = yes
27616 then
27617         echo "$as_me:27617: checking if GNAT supports libraries" >&5
27618 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
27619         echo "$as_me:27619: result: $cf_gnat_libraries" >&5
27620 echo "${ECHO_T}$cf_gnat_libraries" >&6
27621 fi
27622
27623 USE_OLD_MAKERULES=""
27624 USE_GNAT_PROJECTS="#"
27625 USE_GNAT_MAKE_GPR="#"
27626 USE_GNAT_GPRBUILD="#"
27627
27628 if test "$cf_gnat_projects" = yes
27629 then
27630         USE_OLD_MAKERULES="#"
27631         USE_GNAT_PROJECTS=""
27632         if test "$cf_cv_VERSION_GPRBUILD" != no
27633         then
27634                 USE_GNAT_GPRBUILD=""
27635         elif test "$cf_cv_VERSION_GNATMAKE" != no
27636         then
27637                 USE_GNAT_MAKE_GPR=""
27638         else
27639                 { echo "$as_me:27639: WARNING: use old makefile rules since tools are missing" >&5
27640 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
27641         fi
27642 fi
27643
27644 if test "$cf_gnat_libraries" = yes
27645 then
27646         USE_GNAT_LIBRARIES=""
27647 else
27648         USE_GNAT_LIBRARIES="#"
27649 fi
27650
27651 echo "$as_me:27651: checking for ada-compiler" >&5
27652 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
27653
27654 # Check whether --with-ada-compiler or --without-ada-compiler was given.
27655 if test "${with_ada_compiler+set}" = set; then
27656   withval="$with_ada_compiler"
27657   cf_ada_compiler=$withval
27658 else
27659   cf_ada_compiler=gnatmake
27660 fi;
27661
27662 echo "$as_me:27662: result: $cf_ada_compiler" >&5
27663 echo "${ECHO_T}$cf_ada_compiler" >&6
27664
27665                         cf_ada_package=terminal_interface
27666
27667 echo "$as_me:27667: checking for ada-include" >&5
27668 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
27669
27670 # Check whether --with-ada-include or --without-ada-include was given.
27671 if test "${with_ada_include+set}" = set; then
27672   withval="$with_ada_include"
27673
27674 else
27675   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
27676 fi; if test -n "$prefix/share/ada/adainclude" ; then
27677
27678 if test "x$prefix" != xNONE; then
27679         cf_path_syntax="$prefix"
27680 else
27681         cf_path_syntax="$ac_default_prefix"
27682 fi
27683
27684 case ".$withval" in
27685 (.\$\(*\)*|.\'*\'*)
27686         ;;
27687 (..|./*|.\\*)
27688         ;;
27689 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27690         ;;
27691 (.\$\{*prefix\}*|.\$\{*dir\}*)
27692         eval withval="$withval"
27693         case ".$withval" in
27694         (.NONE/*)
27695                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27696                 ;;
27697         esac
27698         ;;
27699 (.no|.NONE/*)
27700         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27701         ;;
27702 (*)
27703         { { echo "$as_me:27703: error: expected a pathname, not \"$withval\"" >&5
27704 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27705    { (exit 1); exit 1; }; }
27706         ;;
27707 esac
27708
27709 fi
27710 eval ADA_INCLUDE="$withval"
27711
27712 echo "$as_me:27712: result: $ADA_INCLUDE" >&5
27713 echo "${ECHO_T}$ADA_INCLUDE" >&6
27714
27715 echo "$as_me:27715: checking for ada-objects" >&5
27716 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
27717
27718 # Check whether --with-ada-objects or --without-ada-objects was given.
27719 if test "${with_ada_objects+set}" = set; then
27720   withval="$with_ada_objects"
27721
27722 else
27723   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
27724 fi; if test -n "$prefix/lib/ada/adalib" ; then
27725
27726 if test "x$prefix" != xNONE; then
27727         cf_path_syntax="$prefix"
27728 else
27729         cf_path_syntax="$ac_default_prefix"
27730 fi
27731
27732 case ".$withval" in
27733 (.\$\(*\)*|.\'*\'*)
27734         ;;
27735 (..|./*|.\\*)
27736         ;;
27737 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27738         ;;
27739 (.\$\{*prefix\}*|.\$\{*dir\}*)
27740         eval withval="$withval"
27741         case ".$withval" in
27742         (.NONE/*)
27743                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27744                 ;;
27745         esac
27746         ;;
27747 (.no|.NONE/*)
27748         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27749         ;;
27750 (*)
27751         { { echo "$as_me:27751: error: expected a pathname, not \"$withval\"" >&5
27752 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27753    { (exit 1); exit 1; }; }
27754         ;;
27755 esac
27756
27757 fi
27758 eval ADA_OBJECTS="$withval"
27759
27760 echo "$as_me:27760: result: $ADA_OBJECTS" >&5
27761 echo "${ECHO_T}$ADA_OBJECTS" >&6
27762
27763 echo "$as_me:27763: checking if an Ada95 shared-library should be built" >&5
27764 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
27765
27766 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
27767 if test "${with_ada_sharedlib+set}" = set; then
27768   withval="$with_ada_sharedlib"
27769   with_ada_sharedlib=$withval
27770 else
27771   with_ada_sharedlib=no
27772 fi;
27773 echo "$as_me:27773: result: $with_ada_sharedlib" >&5
27774 echo "${ECHO_T}$with_ada_sharedlib" >&6
27775
27776 if test "x$with_ada_sharedlib" != xno
27777 then
27778         if test "x$cf_gnat_projects" != xyes
27779         then
27780                 { echo "$as_me:27780: WARNING: disabling shared-library since GNAT projects are not supported" >&5
27781 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
27782                 with_ada_sharedlib=no
27783         fi
27784 fi
27785
27786 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
27787 MAKE_ADA_SHAREDLIB="#"
27788
27789 if test "x$with_ada_sharedlib" != xno
27790 then
27791         MAKE_ADA_SHAREDLIB=
27792         if test "x$with_ada_sharedlib" != xyes
27793         then
27794                 ADA_SHAREDLIB="$with_ada_sharedlib"
27795         fi
27796 fi
27797
27798                         # allow the Ada binding to be renamed
27799
27800 echo "$as_me:27800: checking for ada-libname" >&5
27801 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
27802
27803 # Check whether --with-ada-libname or --without-ada-libname was given.
27804 if test "${with_ada_libname+set}" = set; then
27805   withval="$with_ada_libname"
27806   ADA_LIBNAME=$withval
27807 else
27808   ADA_LIBNAME=AdaCurses
27809 fi;
27810 case "x$ADA_LIBNAME" in
27811 (x|xyes|xno)
27812         ADA_LIBNAME=AdaCurses
27813         ;;
27814 esac
27815
27816 echo "$as_me:27816: result: $ADA_LIBNAME" >&5
27817 echo "${ECHO_T}$ADA_LIBNAME" >&6
27818
27819                 fi
27820         fi
27821 else
27822         cf_with_ada=no
27823 fi
27824
27825 # do this "late" to avoid conflict with header-checks
27826 if test "x$with_widec" = xyes ; then
27827         echo "$as_me:27827: checking for wchar_t" >&5
27828 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
27829 if test "${ac_cv_type_wchar_t+set}" = set; then
27830   echo $ECHO_N "(cached) $ECHO_C" >&6
27831 else
27832   cat >"conftest.$ac_ext" <<_ACEOF
27833 #line 27833 "configure"
27834 #include "confdefs.h"
27835 $ac_includes_default
27836 int
27837 main (void)
27838 {
27839 if ((wchar_t *) 0)
27840   return 0;
27841 if (sizeof (wchar_t))
27842   return 0;
27843   ;
27844   return 0;
27845 }
27846 _ACEOF
27847 rm -f "conftest.$ac_objext"
27848 if { (eval echo "$as_me:27848: \"$ac_compile\"") >&5
27849   (eval $ac_compile) 2>&5
27850   ac_status=$?
27851   echo "$as_me:27851: \$? = $ac_status" >&5
27852   (exit "$ac_status"); } &&
27853          { ac_try='test -s "conftest.$ac_objext"'
27854   { (eval echo "$as_me:27854: \"$ac_try\"") >&5
27855   (eval $ac_try) 2>&5
27856   ac_status=$?
27857   echo "$as_me:27857: \$? = $ac_status" >&5
27858   (exit "$ac_status"); }; }; then
27859   ac_cv_type_wchar_t=yes
27860 else
27861   echo "$as_me: failed program was:" >&5
27862 cat "conftest.$ac_ext" >&5
27863 ac_cv_type_wchar_t=no
27864 fi
27865 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27866 fi
27867 echo "$as_me:27867: result: $ac_cv_type_wchar_t" >&5
27868 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
27869
27870 echo "$as_me:27870: checking size of wchar_t" >&5
27871 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
27872 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
27873   echo $ECHO_N "(cached) $ECHO_C" >&6
27874 else
27875   if test "$ac_cv_type_wchar_t" = yes; then
27876   if test "$cross_compiling" = yes; then
27877   # Depending upon the size, compute the lo and hi bounds.
27878 cat >"conftest.$ac_ext" <<_ACEOF
27879 #line 27879 "configure"
27880 #include "confdefs.h"
27881 $ac_includes_default
27882 int
27883 main (void)
27884 {
27885 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
27886   ;
27887   return 0;
27888 }
27889 _ACEOF
27890 rm -f "conftest.$ac_objext"
27891 if { (eval echo "$as_me:27891: \"$ac_compile\"") >&5
27892   (eval $ac_compile) 2>&5
27893   ac_status=$?
27894   echo "$as_me:27894: \$? = $ac_status" >&5
27895   (exit "$ac_status"); } &&
27896          { ac_try='test -s "conftest.$ac_objext"'
27897   { (eval echo "$as_me:27897: \"$ac_try\"") >&5
27898   (eval $ac_try) 2>&5
27899   ac_status=$?
27900   echo "$as_me:27900: \$? = $ac_status" >&5
27901   (exit "$ac_status"); }; }; then
27902   ac_lo=0 ac_mid=0
27903   while :; do
27904     cat >"conftest.$ac_ext" <<_ACEOF
27905 #line 27905 "configure"
27906 #include "confdefs.h"
27907 $ac_includes_default
27908 int
27909 main (void)
27910 {
27911 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27912   ;
27913   return 0;
27914 }
27915 _ACEOF
27916 rm -f "conftest.$ac_objext"
27917 if { (eval echo "$as_me:27917: \"$ac_compile\"") >&5
27918   (eval $ac_compile) 2>&5
27919   ac_status=$?
27920   echo "$as_me:27920: \$? = $ac_status" >&5
27921   (exit "$ac_status"); } &&
27922          { ac_try='test -s "conftest.$ac_objext"'
27923   { (eval echo "$as_me:27923: \"$ac_try\"") >&5
27924   (eval $ac_try) 2>&5
27925   ac_status=$?
27926   echo "$as_me:27926: \$? = $ac_status" >&5
27927   (exit "$ac_status"); }; }; then
27928   ac_hi=$ac_mid; break
27929 else
27930   echo "$as_me: failed program was:" >&5
27931 cat "conftest.$ac_ext" >&5
27932 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27933 fi
27934 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27935   done
27936 else
27937   echo "$as_me: failed program was:" >&5
27938 cat "conftest.$ac_ext" >&5
27939 ac_hi=-1 ac_mid=-1
27940   while :; do
27941     cat >"conftest.$ac_ext" <<_ACEOF
27942 #line 27942 "configure"
27943 #include "confdefs.h"
27944 $ac_includes_default
27945 int
27946 main (void)
27947 {
27948 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
27949   ;
27950   return 0;
27951 }
27952 _ACEOF
27953 rm -f "conftest.$ac_objext"
27954 if { (eval echo "$as_me:27954: \"$ac_compile\"") >&5
27955   (eval $ac_compile) 2>&5
27956   ac_status=$?
27957   echo "$as_me:27957: \$? = $ac_status" >&5
27958   (exit "$ac_status"); } &&
27959          { ac_try='test -s "conftest.$ac_objext"'
27960   { (eval echo "$as_me:27960: \"$ac_try\"") >&5
27961   (eval $ac_try) 2>&5
27962   ac_status=$?
27963   echo "$as_me:27963: \$? = $ac_status" >&5
27964   (exit "$ac_status"); }; }; then
27965   ac_lo=$ac_mid; break
27966 else
27967   echo "$as_me: failed program was:" >&5
27968 cat "conftest.$ac_ext" >&5
27969 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27970 fi
27971 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27972   done
27973 fi
27974 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27975 # Binary search between lo and hi bounds.
27976 while test "x$ac_lo" != "x$ac_hi"; do
27977   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27978   cat >"conftest.$ac_ext" <<_ACEOF
27979 #line 27979 "configure"
27980 #include "confdefs.h"
27981 $ac_includes_default
27982 int
27983 main (void)
27984 {
27985 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27986   ;
27987   return 0;
27988 }
27989 _ACEOF
27990 rm -f "conftest.$ac_objext"
27991 if { (eval echo "$as_me:27991: \"$ac_compile\"") >&5
27992   (eval $ac_compile) 2>&5
27993   ac_status=$?
27994   echo "$as_me:27994: \$? = $ac_status" >&5
27995   (exit "$ac_status"); } &&
27996          { ac_try='test -s "conftest.$ac_objext"'
27997   { (eval echo "$as_me:27997: \"$ac_try\"") >&5
27998   (eval $ac_try) 2>&5
27999   ac_status=$?
28000   echo "$as_me:28000: \$? = $ac_status" >&5
28001   (exit "$ac_status"); }; }; then
28002   ac_hi=$ac_mid
28003 else
28004   echo "$as_me: failed program was:" >&5
28005 cat "conftest.$ac_ext" >&5
28006 ac_lo=`expr "$ac_mid" + 1`
28007 fi
28008 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28009 done
28010 ac_cv_sizeof_wchar_t=$ac_lo
28011 else
28012   if test "$cross_compiling" = yes; then
28013   { { echo "$as_me:28013: error: cannot run test program while cross compiling" >&5
28014 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
28015    { (exit 1); exit 1; }; }
28016 else
28017   cat >"conftest.$ac_ext" <<_ACEOF
28018 #line 28018 "configure"
28019 #include "confdefs.h"
28020 $ac_includes_default
28021 int
28022 main (void)
28023 {
28024 FILE *f = fopen ("conftest.val", "w");
28025 if (!f)
28026   $ac_main_return (1);
28027 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
28028 fclose (f);
28029   ;
28030   return 0;
28031 }
28032 _ACEOF
28033 rm -f "conftest$ac_exeext"
28034 if { (eval echo "$as_me:28034: \"$ac_link\"") >&5
28035   (eval $ac_link) 2>&5
28036   ac_status=$?
28037   echo "$as_me:28037: \$? = $ac_status" >&5
28038   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
28039   { (eval echo "$as_me:28039: \"$ac_try\"") >&5
28040   (eval $ac_try) 2>&5
28041   ac_status=$?
28042   echo "$as_me:28042: \$? = $ac_status" >&5
28043   (exit "$ac_status"); }; }; then
28044   ac_cv_sizeof_wchar_t=`cat conftest.val`
28045 else
28046   echo "$as_me: program exited with status $ac_status" >&5
28047 echo "$as_me: failed program was:" >&5
28048 cat "conftest.$ac_ext" >&5
28049 fi
28050 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
28051 fi
28052 fi
28053 rm -f conftest.val
28054 else
28055   ac_cv_sizeof_wchar_t=0
28056 fi
28057 fi
28058 echo "$as_me:28058: result: $ac_cv_sizeof_wchar_t" >&5
28059 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
28060 cat >>confdefs.h <<EOF
28061 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
28062 EOF
28063
28064         # cross-compiling to mingw can run into the problem that attempting to
28065         # link with the regex library fails, causing the test to not set this to
28066         # a number.  "recent" autoconf does not address this problem either -TD
28067         if test -z "$ac_cv_sizeof_wchar_t"
28068         then
28069                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
28070
28071 echo "${as_me:-configure}:28071: testing test failed (assume 2) ..." 1>&5
28072
28073                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
28074                 mv confdefs.tmp confdefs.h
28075                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
28076         fi
28077 fi
28078
28079 ### Construct the ncurses library-subsets, if any, from this set of keywords:
28080 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
28081 ###
28082 ### ticlib modules may be a separate library, otherwise contained in termlib.
28083 ### termlib modules may be a separate library, otherwise contained in ncurses.
28084 ###
28085 ### The of "+" or " " between the tokens controls the way the script
28086 ### chooses to split module lists into libraries.
28087 ###
28088 ### (see CF_LIB_RULES).
28089 echo "$as_me:28089: checking for library subsets" >&5
28090 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
28091 LIB_SUBSETS=
28092
28093 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
28094         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
28095         if test "$with_ticlib" != no ; then
28096                 LIB_SUBSETS="${LIB_SUBSETS} "
28097         else
28098                 LIB_SUBSETS="${LIB_SUBSETS}+"
28099         fi
28100 fi
28101
28102 LIB_SUBSETS="${LIB_SUBSETS}termlib"
28103 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
28104
28105 if test "$with_termlib" != no ; then
28106         LIB_SUBSETS="${LIB_SUBSETS} "
28107 else
28108         LIB_SUBSETS="${LIB_SUBSETS}+"
28109 fi
28110
28111 LIB_SUBSETS="${LIB_SUBSETS}base"
28112
28113 # Most term-driver calls are to tinfo, but some like init_pair are to the
28114 # base library (so it resides in base).
28115 if test "$with_term_driver" != no ; then
28116         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
28117         case "$cf_cv_system_name" in
28118         (*mingw32*|*mingw64*)
28119                 if test "x$with_exp_win32" = xyes ; then
28120                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
28121                 else
28122                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
28123                 fi
28124                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
28125                 ;;
28126         (*)
28127                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
28128                 ;;
28129         esac
28130 elif test "x$with_exp_win32" = xyes ; then
28131         case "$cf_cv_system_name" in
28132         (*mingw32*|*mingw64*)
28133                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
28134                 ;;
28135         (*)
28136                 ;;
28137         esac
28138 fi
28139
28140 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
28141 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
28142
28143 echo "$as_me:28143: result: $LIB_SUBSETS" >&5
28144 echo "${ECHO_T}$LIB_SUBSETS" >&6
28145
28146 ### Construct the list of include-directories to be generated
28147
28148 if test "$srcdir" != "."; then
28149         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
28150 fi
28151 CPPFLAGS="-I../include $CPPFLAGS"
28152 if test "$srcdir" != "."; then
28153         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
28154 fi
28155 CPPFLAGS="-I. $CPPFLAGS"
28156
28157 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
28158 if test "$srcdir" != "."; then
28159         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
28160 fi
28161 if test "$GCC" != yes; then
28162         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28163 elif test "$includedir" != "/usr/include"; then
28164         if test "$includedir" = '${prefix}/include' ; then
28165                 if test x$prefix != x/usr ; then
28166                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28167                 fi
28168         else
28169                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28170         fi
28171 fi
28172
28173 ### Build up pieces for makefile rules
28174 echo "$as_me:28174: checking default library suffix" >&5
28175 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
28176
28177         case $DFT_LWR_MODEL in
28178         (libtool) DFT_ARG_SUFFIX=''   ;;
28179         (normal)  DFT_ARG_SUFFIX=''   ;;
28180         (debug)   DFT_ARG_SUFFIX='_g' ;;
28181         (profile) DFT_ARG_SUFFIX='_p' ;;
28182         (shared)  DFT_ARG_SUFFIX=''   ;;
28183         esac
28184         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
28185 echo "$as_me:28185: result: $DFT_ARG_SUFFIX" >&5
28186 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
28187
28188 echo "$as_me:28188: checking default library-dependency suffix" >&5
28189 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
28190
28191         case X$DFT_LWR_MODEL in
28192         (Xlibtool)
28193                 DFT_LIB_SUFFIX='.la'
28194                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28195                 ;;
28196         (Xdebug)
28197                 case "$cf_cv_system_name" in
28198                 (*-msvc*)
28199                         DFT_LIB_SUFFIX='_g.lib'
28200                         ;;
28201                 (*)
28202                         DFT_LIB_SUFFIX='_g.a'
28203                         ;;
28204                 esac
28205                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28206                 ;;
28207         (Xprofile)
28208                 case "$cf_cv_system_name" in
28209                 (*-msvc*)
28210                         DFT_LIB_SUFFIX='_p.lib'
28211                         ;;
28212                 (*)
28213                         DFT_LIB_SUFFIX='_p.a'
28214                         ;;
28215                 esac
28216                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28217                 ;;
28218         (Xshared)
28219                 case "$cf_cv_system_name" in
28220                 (aix[5-7]*)
28221                         DFT_LIB_SUFFIX='.so'
28222                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28223                         ;;
28224                 (*-msvc*)
28225                         DFT_LIB_SUFFIX='.dll'
28226                         DFT_DEP_SUFFIX='.dll.lib'
28227                         ;;
28228                 (cygwin*|msys*|mingw*)
28229                         DFT_LIB_SUFFIX='.dll'
28230                         DFT_DEP_SUFFIX='.dll.a'
28231                         ;;
28232                 (darwin*)
28233                         DFT_LIB_SUFFIX='.dylib'
28234                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28235                         ;;
28236                 (hpux*)
28237                         case "$target" in
28238                         (ia64*)
28239                                 DFT_LIB_SUFFIX='.so'
28240                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28241                                 ;;
28242                         (*)
28243                                 DFT_LIB_SUFFIX='.sl'
28244                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28245                                 ;;
28246                         esac
28247                         ;;
28248                 (*)
28249                         DFT_LIB_SUFFIX='.so'
28250                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28251                         ;;
28252                 esac
28253                 ;;
28254         (*)
28255                 case "$target" in
28256                 (*-msvc*)
28257                         DFT_LIB_SUFFIX='.lib'
28258                         ;;
28259                 (*)
28260                         DFT_LIB_SUFFIX='.a'
28261                         ;;
28262                 esac
28263                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28264                 ;;
28265         esac
28266         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28267         then
28268                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
28269                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
28270         fi
28271 echo "$as_me:28271: result: $DFT_DEP_SUFFIX" >&5
28272 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
28273
28274 echo "$as_me:28274: checking default object directory" >&5
28275 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
28276
28277         case $DFT_LWR_MODEL in
28278         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
28279         (normal)  DFT_OBJ_SUBDIR='objects' ;;
28280         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
28281         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
28282         (shared)
28283                 case "$cf_cv_system_name" in
28284                 (cygwin|msys)
28285                         DFT_OBJ_SUBDIR='objects' ;;
28286                 (*)
28287                         DFT_OBJ_SUBDIR='obj_s' ;;
28288                 esac
28289         esac
28290 echo "$as_me:28290: result: $DFT_OBJ_SUBDIR" >&5
28291 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
28292
28293 if test "x$cf_with_cxx" = xyes ; then
28294 echo "$as_me:28294: checking c++ library-dependency suffix" >&5
28295 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
28296 if test "$with_libtool" != "no"; then
28297         # libtool thinks it can make c++ shared libraries (perhaps only g++)
28298         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28299 elif test "$with_shared_cxx" != "no"; then
28300         # also for g++ users...
28301         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28302 else
28303         # we normally make a static library because C/C++ library rules differ
28304
28305         case Xnormal in
28306         (Xlibtool)
28307                 CXX_LIB_SUFFIX='.la'
28308                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28309                 ;;
28310         (Xdebug)
28311                 case "$cf_cv_system_name" in
28312                 (*-msvc*)
28313                         CXX_LIB_SUFFIX='_g.lib'
28314                         ;;
28315                 (*)
28316                         CXX_LIB_SUFFIX='_g.a'
28317                         ;;
28318                 esac
28319                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28320                 ;;
28321         (Xprofile)
28322                 case "$cf_cv_system_name" in
28323                 (*-msvc*)
28324                         CXX_LIB_SUFFIX='_p.lib'
28325                         ;;
28326                 (*)
28327                         CXX_LIB_SUFFIX='_p.a'
28328                         ;;
28329                 esac
28330                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28331                 ;;
28332         (Xshared)
28333                 case "$cf_cv_system_name" in
28334                 (aix[5-7]*)
28335                         CXX_LIB_SUFFIX='.so'
28336                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28337                         ;;
28338                 (*-msvc*)
28339                         CXX_LIB_SUFFIX='.dll'
28340                         CXX_DEP_SUFFIX='.dll.lib'
28341                         ;;
28342                 (cygwin*|msys*|mingw*)
28343                         CXX_LIB_SUFFIX='.dll'
28344                         CXX_DEP_SUFFIX='.dll.a'
28345                         ;;
28346                 (darwin*)
28347                         CXX_LIB_SUFFIX='.dylib'
28348                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28349                         ;;
28350                 (hpux*)
28351                         case "$target" in
28352                         (ia64*)
28353                                 CXX_LIB_SUFFIX='.so'
28354                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28355                                 ;;
28356                         (*)
28357                                 CXX_LIB_SUFFIX='.sl'
28358                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28359                                 ;;
28360                         esac
28361                         ;;
28362                 (*)
28363                         CXX_LIB_SUFFIX='.so'
28364                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28365                         ;;
28366                 esac
28367                 ;;
28368         (*)
28369                 case "$target" in
28370                 (*-msvc*)
28371                         CXX_LIB_SUFFIX='.lib'
28372                         ;;
28373                 (*)
28374                         CXX_LIB_SUFFIX='.a'
28375                         ;;
28376                 esac
28377                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28378                 ;;
28379         esac
28380         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28381         then
28382                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
28383                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
28384         fi
28385
28386 fi
28387 echo "$as_me:28387: result: $CXX_LIB_SUFFIX" >&5
28388 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
28389
28390 fi
28391
28392 # do not want -ldl in build except as needed for -lncurses dependency
28393 if test "x$with_dlsym" = xyes ; then
28394 if test "$DFT_LWR_MODEL" = shared || \
28395    test "$DFT_LWR_MODEL" = libtool ; then
28396
28397 # remove dl library from $LIBS
28398 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
28399
28400 fi
28401 fi
28402 ### Set up low-level terminfo dependencies for makefiles.
28403
28404 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
28405 # do not need libdl
28406 TICS_LIST=
28407 if test "x$with_dlsym" = xyes ; then
28408
28409 # remove dl library from $SHLIB_LIST
28410 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
28411
28412 fi
28413
28414 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
28415 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
28416 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
28417 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
28418 then
28419         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
28420 fi
28421
28422 if test "$with_ticlib" != no ; then
28423
28424         if test "x$with_ticlib" != xyes ; then
28425                 TICS_NAME=$with_ticlib
28426                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28427                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28428                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28429                 TICS_LIB_SUFFIX="${with_ticlib}"
28430         else
28431                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
28432                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
28433                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
28434                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
28435         fi
28436         TICS_LDFLAGS="-L${LIB_DIR}"
28437         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
28438 else
28439         TICS_SUFFIX=${DFT_LIB_SUFFIX}
28440         TICS_LDFLAGS="-L${LIB_DIR}"
28441         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28442 fi
28443
28444 if test "$with_termlib" != no ; then
28445
28446         if test "x$with_termlib" != xyes ; then
28447                 TINFO_NAME=$with_termlib
28448                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28449                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28450                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28451                 TINFO_LIB_SUFFIX="${with_termlib}"
28452         else
28453                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28454                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
28455                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
28456                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
28457         fi
28458
28459         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28460         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28461         if test "$DFT_LWR_MODEL" = "libtool"; then
28462                 TEST_ARGS="${TEST_DEPS}"
28463                 TEST_ARG2="${TEST_DEP2}"
28464                 TINFO_LDFLAGS="-L${LIB_DIR}"
28465                 TINFO_LIBS="$TEST_ARGS"
28466                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
28467                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
28468         else
28469                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
28470                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
28471                 if test "x$with_term_driver" != xno ; then
28472                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28473                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
28474                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28475                 else
28476                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28477                         TINFO_LIBS="$TEST_ARGS"
28478                 fi
28479                 TINFO_LDFLAGS="-L${LIB_DIR}"
28480                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28481         fi
28482 else
28483         # the next lines are needed for linking libtic over libncurses
28484         TINFO_NAME=${LIB_NAME}
28485         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28486         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
28487         if test "x$with_tic_depends" = xyes ; then
28488                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28489         else
28490                 TICS_LIST="$SHLIB_LIST"
28491         fi
28492
28493         TINFO_LDFLAGS="-L${LIB_DIR}"
28494         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28495 fi
28496
28497 if test "$DFT_LWR_MODEL" = shared ; then
28498         case "$cf_cv_system_name" in
28499         (cygwin*|msys*)
28500                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
28501                 TINFO_SUFFIX=.dll
28502                 ;;
28503         esac
28504 fi
28505
28506 if test "x$with_dlsym" = xyes ; then
28507
28508 # remove dl library from $TICS_LIST
28509 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
28510
28511 fi
28512
28513 if test "$DFT_LWR_MODEL" = "libtool"; then
28514         OBJEXT=lo
28515 fi
28516
28517 # needed for Ada95
28518 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
28519
28520 case "$DFT_LWR_MODEL" in
28521 (normal|debug|profile)
28522
28523 if test "$GCC" = yes ; then
28524         case "$cf_cv_system_name" in
28525         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
28526                 LDFLAGS_STATIC=
28527                 LDFLAGS_SHARED=
28528                 ;;
28529         (*)     # normally, except when broken
28530                 LDFLAGS_STATIC=-static
28531                 LDFLAGS_SHARED=-dynamic
28532                 ;;
28533         esac
28534 else
28535         case "$cf_cv_system_name" in
28536         (aix[4-7]*)     # from ld manpage
28537                 LDFLAGS_STATIC=-bstatic
28538                 LDFLAGS_SHARED=-bdynamic
28539                 ;;
28540         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
28541                 # We could also use just "archive" and "shared".
28542                 LDFLAGS_STATIC=-Wl,-a,archive_shared
28543                 LDFLAGS_SHARED=-Wl,-a,shared_archive
28544                 ;;
28545         (irix*)         # from ld manpage IRIX64
28546                 LDFLAGS_STATIC=-Bstatic
28547                 LDFLAGS_SHARED=-Bdynamic
28548                 ;;
28549         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
28550                 # alternative "-oldstyle_liblookup" (not in cc manpage)
28551                 LDFLAGS_STATIC=-noso
28552                 LDFLAGS_SHARED=-so_archive
28553                 ;;
28554         (solaris2*)
28555                 LDFLAGS_STATIC=-Bstatic
28556                 LDFLAGS_SHARED=-Bdynamic
28557                 ;;
28558         esac
28559 fi
28560
28561 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
28562 then
28563         echo "$as_me:28563: checking if linker supports switching between static/dynamic" >&5
28564 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
28565
28566         rm -f libconftest.a
28567         cat >conftest.$ac_ext <<EOF
28568 #line 28568 "configure"
28569 #include <stdio.h>
28570 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
28571 EOF
28572         if { (eval echo "$as_me:28572: \"$ac_compile\"") >&5
28573   (eval $ac_compile) 2>&5
28574   ac_status=$?
28575   echo "$as_me:28575: \$? = $ac_status" >&5
28576   (exit "$ac_status"); } ; then
28577                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
28578                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
28579         fi
28580         rm -f conftest.*
28581
28582         cf_save_LIBS="$LIBS"
28583
28584         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
28585         cat >"conftest.$ac_ext" <<_ACEOF
28586 #line 28586 "configure"
28587 #include "confdefs.h"
28588
28589 #line 28589 "configure"
28590 #include <stdio.h>
28591 int cf_ldflags_static(FILE *fp);
28592
28593 int
28594 main (void)
28595 {
28596
28597         return cf_ldflags_static(stdin);
28598
28599   ;
28600   return 0;
28601 }
28602 _ACEOF
28603 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28604 if { (eval echo "$as_me:28604: \"$ac_link\"") >&5
28605   (eval $ac_link) 2>&5
28606   ac_status=$?
28607   echo "$as_me:28607: \$? = $ac_status" >&5
28608   (exit "$ac_status"); } &&
28609          { ac_try='test -s "conftest$ac_exeext"'
28610   { (eval echo "$as_me:28610: \"$ac_try\"") >&5
28611   (eval $ac_try) 2>&5
28612   ac_status=$?
28613   echo "$as_me:28613: \$? = $ac_status" >&5
28614   (exit "$ac_status"); }; }; then
28615
28616         # some linkers simply ignore the -dynamic
28617         case x`file "conftest$ac_exeext" 2>/dev/null` in
28618         (*static*)
28619                 cf_ldflags_static=no
28620                 ;;
28621         (*)
28622                 cf_ldflags_static=yes
28623                 ;;
28624         esac
28625
28626 else
28627   echo "$as_me: failed program was:" >&5
28628 cat "conftest.$ac_ext" >&5
28629 cf_ldflags_static=no
28630 fi
28631 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28632
28633         rm -f libconftest.*
28634         LIBS="$cf_save_LIBS"
28635
28636         echo "$as_me:28636: result: $cf_ldflags_static" >&5
28637 echo "${ECHO_T}$cf_ldflags_static" >&6
28638
28639         if test "$cf_ldflags_static" != yes
28640         then
28641                 LDFLAGS_STATIC=
28642                 LDFLAGS_SHARED=
28643         fi
28644 else
28645         LDFLAGS_STATIC=
28646         LDFLAGS_SHARED=
28647 fi
28648
28649         ;;
28650 esac
28651
28652 echo "$as_me:28652: checking where we will install curses.h" >&5
28653 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
28654
28655 includesubdir=
28656 if test "$with_overwrite" = no && \
28657  { test "x$includedir" = 'x${prefix}/include' || \
28658    test "x$includedir" = "x${prefix}/include"; }
28659 then
28660         includesubdir="/ncurses${USE_LIB_SUFFIX}"
28661 fi
28662 echo "$as_me:28662: result: ${includedir}${includesubdir}" >&5
28663 echo "${ECHO_T}${includedir}${includesubdir}" >&6
28664
28665 ### Resolve a conflict between normal and wide-curses by forcing applications
28666 ### that will need libutf8 to add it to their configure script.
28667 if test "$with_overwrite" != no ; then
28668 if test "$NCURSES_LIBUTF8" = 1 ; then
28669         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
28670         { echo "$as_me:28670: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
28671 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
28672 fi
28673 fi
28674 WITH_OVERWRITE=$with_overwrite
28675
28676 ### At least on MinGW a shared library build without libtool
28677 ### requires adding the additional libs to the link list.
28678 case "$cf_cv_system_name" in
28679 (*mingw32*|*mingw64*)
28680         if test "$DFT_LWR_MODEL" != "libtool"; then
28681            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
28682         fi
28683         ;;
28684 *)      ;;
28685 esac
28686
28687 # used to separate tack out of the tree
28688 NCURSES_TREE=
28689
28690 ### predefined stuff for the test programs
28691
28692 cat >>confdefs.h <<\EOF
28693 #define HAVE_SLK_COLOR 1
28694 EOF
28695
28696 # pkgsrc uses these
28697
28698 echo "$as_me:28698: checking for desired basename for form library" >&5
28699 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
28700
28701 # Check whether --with-form-libname or --without-form-libname was given.
28702 if test "${with_form_libname+set}" = set; then
28703   withval="$with_form_libname"
28704   with_lib_basename=$withval
28705 else
28706   with_lib_basename=form
28707 fi;
28708 FORM_NAME="$with_lib_basename"
28709
28710 case "x$FORM_NAME" in
28711 (x|xno|xnone|xyes)
28712         FORM_NAME=form
28713         ;;
28714 (*)
28715         ;;
28716 esac
28717
28718 echo "$as_me:28718: result: $FORM_NAME" >&5
28719 echo "${ECHO_T}$FORM_NAME" >&6
28720
28721 echo "$as_me:28721: checking for desired basename for menu library" >&5
28722 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
28723
28724 # Check whether --with-menu-libname or --without-menu-libname was given.
28725 if test "${with_menu_libname+set}" = set; then
28726   withval="$with_menu_libname"
28727   with_lib_basename=$withval
28728 else
28729   with_lib_basename=menu
28730 fi;
28731 MENU_NAME="$with_lib_basename"
28732
28733 case "x$MENU_NAME" in
28734 (x|xno|xnone|xyes)
28735         MENU_NAME=menu
28736         ;;
28737 (*)
28738         ;;
28739 esac
28740
28741 echo "$as_me:28741: result: $MENU_NAME" >&5
28742 echo "${ECHO_T}$MENU_NAME" >&6
28743
28744 echo "$as_me:28744: checking for desired basename for panel library" >&5
28745 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
28746
28747 # Check whether --with-panel-libname or --without-panel-libname was given.
28748 if test "${with_panel_libname+set}" = set; then
28749   withval="$with_panel_libname"
28750   with_lib_basename=$withval
28751 else
28752   with_lib_basename=panel
28753 fi;
28754 PANEL_NAME="$with_lib_basename"
28755
28756 case "x$PANEL_NAME" in
28757 (x|xno|xnone|xyes)
28758         PANEL_NAME=panel
28759         ;;
28760 (*)
28761         ;;
28762 esac
28763
28764 echo "$as_me:28764: result: $PANEL_NAME" >&5
28765 echo "${ECHO_T}$PANEL_NAME" >&6
28766
28767 echo "$as_me:28767: checking for desired basename for cxx library" >&5
28768 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
28769
28770 # Check whether --with-cxx-libname or --without-cxx-libname was given.
28771 if test "${with_cxx_libname+set}" = set; then
28772   withval="$with_cxx_libname"
28773   with_lib_basename=$withval
28774 else
28775   with_lib_basename=ncurses++
28776 fi;
28777 CXX_NAME="$with_lib_basename"
28778
28779 case "x$CXX_NAME" in
28780 (x|xno|xnone|xyes)
28781         CXX_NAME=ncurses++
28782         ;;
28783 (*)
28784         ;;
28785 esac
28786
28787 echo "$as_me:28787: result: $CXX_NAME" >&5
28788 echo "${ECHO_T}$CXX_NAME" >&6
28789
28790 ### Construct the list of subdirectories for which we'll customize makefiles
28791 ### with the appropriate compile-rules.
28792
28793 echo "$as_me:28793: checking for src modules" >&5
28794 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
28795
28796 # dependencies and linker-arguments for test-programs
28797 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
28798 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
28799 if test "$DFT_LWR_MODEL" = "libtool"; then
28800         TEST_ARGS="${TEST_DEPS}"
28801         TEST_ARG2="${TEST_DEP2}"
28802 else
28803         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28804         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
28805 fi
28806
28807 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
28808 cf_cv_src_modules=
28809 for cf_dir in $modules_to_build
28810 do
28811         if test -f "$srcdir/$cf_dir/modules" ; then
28812
28813                 # We may/may not have tack in the distribution, though the
28814                 # makefile is.
28815                 if test "$cf_dir" = tack ; then
28816                         if test "x$cf_with_tack" != "xyes"; then
28817                                 continue
28818                         fi
28819                 fi
28820
28821                 if test -z "$cf_cv_src_modules"; then
28822                         cf_cv_src_modules=$cf_dir
28823                 else
28824                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
28825                 fi
28826
28827                 # Make the ncurses_cfg.h file record the library interface files as
28828                 # well.  These are header files that are the same name as their
28829                 # directory.  Ncurses is the only library that does not follow
28830                 # that pattern.
28831                 if test "$cf_dir" = tack ; then
28832                         continue
28833                 elif test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
28834
28835 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28836
28837                         cat >>confdefs.h <<EOF
28838 #define HAVE_${cf_have_include}_H 1
28839 EOF
28840
28841                         cat >>confdefs.h <<EOF
28842 #define HAVE_LIB${cf_have_include} 1
28843 EOF
28844
28845 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28846
28847 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28848
28849                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28850                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
28851                         if test "$DFT_LWR_MODEL" = "libtool"; then
28852                                 TEST_ARGS="${TEST_DEPS}"
28853                                 TEST_ARG2="${TEST_DEP2}"
28854                         else
28855                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
28856                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
28857                         fi
28858                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
28859                 fi
28860         fi
28861 done
28862 echo "$as_me:28862: result: $cf_cv_src_modules" >&5
28863 echo "${ECHO_T}$cf_cv_src_modules" >&6
28864
28865 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
28866 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
28867
28868 SRC_SUBDIRS=
28869 if test "x$cf_with_manpages" != xno ; then
28870         SRC_SUBDIRS="$SRC_SUBDIRS man"
28871 fi
28872 SRC_SUBDIRS="$SRC_SUBDIRS include"
28873 for cf_dir in $cf_cv_src_modules
28874 do
28875         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
28876 done
28877 if test "x$cf_with_tests" != "xno" ; then
28878         SRC_SUBDIRS="$SRC_SUBDIRS test"
28879 fi
28880 # always make this, to install the ncurses-config script
28881 SRC_SUBDIRS="$SRC_SUBDIRS misc"
28882 if test "$cf_with_cxx_binding" != no; then
28883         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
28884         SRC_SUBDIRS="$SRC_SUBDIRS c++"
28885 fi
28886
28887 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
28888 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
28889
28890 ADA_SUBDIRS=
28891 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
28892         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
28893         ADA_SUBDIRS="gen src"
28894         if test "x$cf_with_tests" != "xno" ; then
28895                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
28896         fi
28897 fi
28898
28899 SUB_MAKEFILES=
28900 for cf_dir in $SRC_SUBDIRS
28901 do
28902         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
28903 done
28904
28905 if test -n "$ADA_SUBDIRS"; then
28906         for cf_dir in $ADA_SUBDIRS
28907         do
28908                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
28909         done
28910
28911 fi
28912
28913 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28914    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
28915    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
28916    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
28917 fi
28918
28919 DIRS_TO_MAKE="lib"
28920 for cf_item in $cf_list_models
28921 do
28922
28923         case $cf_item in
28924         (libtool) cf_subdir='obj_lo'  ;;
28925         (normal)  cf_subdir='objects' ;;
28926         (debug)   cf_subdir='obj_g' ;;
28927         (profile) cf_subdir='obj_p' ;;
28928         (shared)
28929                 case "$cf_cv_system_name" in
28930                 (cygwin|msys)
28931                         cf_subdir='objects' ;;
28932                 (*)
28933                         cf_subdir='obj_s' ;;
28934                 esac
28935         esac
28936
28937         for cf_item2 in $DIRS_TO_MAKE
28938         do
28939                 test "$cf_item2" = "$cf_subdir" && break
28940         done
28941         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
28942 done
28943 for cf_dir in $DIRS_TO_MAKE
28944 do
28945         test ! -d "$cf_dir" && mkdir "$cf_dir"
28946 done
28947
28948 # symbols that differ when compiling Ada95 by itself.
28949 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
28950
28951 # values to use as strings
28952
28953 cat >>confdefs.h <<EOF
28954 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
28955 EOF
28956
28957 cat >>confdefs.h <<EOF
28958 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
28959 EOF
28960
28961 ### Define substitutions for header files to avoid name-pollution
28962
28963 if test "x$cf_cv_have_tcgetattr" = xyes ; then
28964         HAVE_TCGETATTR=1
28965 else
28966         HAVE_TCGETATTR=0
28967 fi
28968
28969 if test "x$ac_cv_header_stdint_h" = xyes ; then
28970         HAVE_STDINT_H=1
28971 else
28972         HAVE_STDINT_H=0
28973 fi
28974
28975 if test "x$ac_cv_header_termio_h" = xyes ; then
28976         HAVE_TERMIO_H=1
28977 else
28978         HAVE_TERMIO_H=0
28979 fi
28980
28981 if test "x$ac_cv_header_termios_h" = xyes ; then
28982         HAVE_TERMIOS_H=1
28983 else
28984         HAVE_TERMIOS_H=0
28985 fi
28986
28987 ################################################################################
28988 test "x$use_database" = xyes && \
28989 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
28990
28991 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
28992 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
28993
28994 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
28995 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
28996 fi
28997
28998 if test "x$cf_with_tests" != xno ; then
28999         MAKE_TESTS=
29000 else
29001         MAKE_TESTS="#"
29002 fi
29003
29004 ADAHTML_DIR=../../doc/html/ada
29005
29006 # workaround for OS/2 (20151017)
29007 case "$cf_cv_system_name" in
29008 (os2*)
29009         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
29010         ;;
29011 (*)
29012         LIBTOOL_OPTS_CXX=
29013         ;;
29014 esac
29015
29016 # workaround for g++ versus Solaris (20131116)
29017 case "$cf_cv_system_name" in
29018 (solaris2*)
29019         case "x$CPPFLAGS" in
29020         (*-D_XOPEN_SOURCE_EXTENDED*)
29021                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
29022
29023 echo "${as_me:-configure}:29023: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
29024
29025                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
29026                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
29027                 ;;
29028         esac
29029         ;;
29030 esac
29031
29032 # Help to automatically enable the extended curses features when using either
29033 # the *-config or the ".pc" files by adding defines.
29034 echo "$as_me:29034: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
29035 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
29036 PKG_CFLAGS=
29037 for cf_loop1 in $CPPFLAGS_after_XOPEN
29038 do
29039         cf_found=no
29040         for cf_loop2 in $CPPFLAGS_before_XOPEN
29041         do
29042                 if test "x$cf_loop1" = "x$cf_loop2"
29043                 then
29044                         cf_found=yes
29045                         break
29046                 fi
29047         done
29048         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
29049 done
29050 echo "$as_me:29050: result: $PKG_CFLAGS" >&5
29051 echo "${ECHO_T}$PKG_CFLAGS" >&6
29052
29053 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
29054 case "x$NCURSES_OSPEED" in
29055 (*short*)
29056         cf_compatible=1
29057         ;;
29058 (*)
29059         cf_compatible=0
29060         ;;
29061 esac
29062
29063 cat >>confdefs.h <<EOF
29064 #define NCURSES_OSPEED_COMPAT $cf_compatible
29065 EOF
29066
29067 case "x$cf_cv_typeof_chtype" in
29068 (xshort|xint|xlong)
29069         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
29070         ;;
29071 esac
29072
29073 case "x$cf_cv_typeof_mmask_t" in
29074 (xshort|xint|xlong)
29075         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
29076         ;;
29077 esac
29078
29079 # substitute into misc/Makefile to suppress
29080 # (un)install.data from the
29081 # (un)install rules.
29082 if test "x$cf_with_db_install" = "xno"; then
29083         MISC_INSTALL_DATA=
29084         MISC_UNINSTALL_DATA=
29085 else
29086         MISC_INSTALL_DATA=install.data
29087         MISC_UNINSTALL_DATA=uninstall.data
29088 fi
29089
29090 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
29091         MAKE_DATABASE="#"
29092 else
29093         MAKE_DATABASE="$MAKE_TERMINFO"
29094 fi
29095
29096 if test -n "$PACKAGE"
29097 then
29098         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
29099         export PACKAGE
29100         echo "package: $PACKAGE"
29101 fi
29102
29103 UNALTERED_SYMS=
29104 cf_filter_syms=no
29105
29106 if test -n "$RESULTING_SYMS"
29107 then
29108         cf_filter_syms=$cf_dft_filter_syms
29109         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_default" 1>&6
29110
29111 echo "${as_me:-configure}:29111: testing will map symbols to ABI=$cf_cv_abi_default ..." 1>&5
29112
29113 fi
29114
29115 if test "x$WILDCARD_SYMS" = xno
29116 then
29117         cf_filter_syms=yes
29118 fi
29119
29120 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
29121
29122 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
29123 if test "$cf_filter_syms" = yes
29124 then
29125         RESULTING_SYMS=resulting.map
29126 fi
29127
29128 if test "x$cross_compiling" = xyes ; then
29129         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
29130         CHECK_BUILD="#"
29131 else
29132         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
29133         CHECK_BUILD=
29134 fi
29135
29136 # This is used for the *-config script and *.pc data files.
29137
29138 echo "$as_me:29138: checking for linker search path" >&5
29139 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
29140 if test "${cf_cv_ld_searchpath+set}" = set; then
29141   echo $ECHO_N "(cached) $ECHO_C" >&6
29142 else
29143
29144 if test "$cross_compiling" != yes ; then
29145
29146 # GNU binutils' ld does not involve permissions which may stop ldconfig.
29147 cf_pathlist=`${LD:-ld} --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
29148
29149 # The -NX options tell newer versions of Linux ldconfig to not attempt to
29150 # update the cache, which makes it run faster.
29151 test -z "$cf_pathlist" && \
29152         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
29153
29154 test -z "$cf_pathlist" &&
29155         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
29156
29157 # This works with OpenBSD 6.5, which lists only filenames
29158 test -z "$cf_pathlist" &&
29159         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
29160
29161 if test -z "$cf_pathlist"
29162 then
29163         # dyld default path with MacOS
29164         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
29165         then
29166                 # do this to bypass check
29167                 cf_cv_ld_searchpath='$HOME/lib'
29168                 cf_pathlist="/usr/local/lib /lib /usr/lib"
29169         fi
29170 fi
29171
29172 if test -z "$cf_pathlist"
29173 then
29174         # Solaris is "SunOS"
29175         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
29176         then
29177                 case x`(isainfo -b)` in
29178                 (x64)
29179                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
29180                         ;;
29181                 (x32)
29182                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
29183                         cf_pathlist="$cf_pathlist /lib /usr/lib"
29184                         ;;
29185                 (*)
29186                         { echo "$as_me:29186: WARNING: problem with Solaris architecture" >&5
29187 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
29188                         ;;
29189                 esac
29190         fi
29191 fi
29192
29193 if test -z "$cf_pathlist"
29194 then
29195         # HP-UX
29196         if test x"`uname -s`" = xHP-UX
29197         then
29198                 case x`getconf LONG_BIT` in
29199                 (x64)
29200                         cf_pathlist="/usr/lib/hpux64"
29201                         ;;
29202                 (x*)
29203                         cf_pathlist="/usr/lib/hpux32"
29204                         ;;
29205                 esac
29206         fi
29207 fi
29208
29209 fi
29210
29211 # If nothing else, assume it is conventional
29212 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
29213
29214 # Finally, check that this is only directories
29215 for cf_path in $0 $cf_pathlist
29216 do
29217         if test -d "$cf_path"; then
29218                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
29219                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
29220         fi
29221 done
29222
29223 # Ensure that it is nonempty
29224 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
29225
29226 fi
29227 echo "$as_me:29227: result: $cf_cv_ld_searchpath" >&5
29228 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
29229
29230 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
29231
29232 cat >>confdefs.h <<\EOF
29233 #define HAVE_CURSES_DATA_BOOLNAMES 1
29234 EOF
29235
29236 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"
29237 ac_config_commands="$ac_config_commands default"
29238 cat >confcache <<\_ACEOF
29239 # This file is a shell script that caches the results of configure
29240 # tests run on this system so they can be shared between configure
29241 # scripts and configure runs, see configure's option --config-cache.
29242 # It is not useful on other systems.  If it contains results you don't
29243 # want to keep, you may remove or edit it.
29244 #
29245 # config.status only pays attention to the cache file if you give it
29246 # the --recheck option to rerun configure.
29247 #
29248 # `ac_cv_env_foo' variables (set or unset) will be overriden when
29249 # loading this file, other *unset* `ac_cv_foo' will be assigned the
29250 # following values.
29251
29252 _ACEOF
29253
29254 # The following way of writing the cache mishandles newlines in values,
29255 # but we know of no workaround that is simple, portable, and efficient.
29256 # So, don't put newlines in cache variables' values.
29257 # Ultrix sh set writes to stderr and can't be redirected directly,
29258 # and sets the high bit in the cache file unless we assign to the vars.
29259 {
29260   (set) 2>&1 |
29261     case `(ac_space=' '; set | grep ac_space) 2>&1` in
29262     *ac_space=\ *)
29263       # `set' does not quote correctly, so add quotes (double-quote
29264       # substitution turns \\\\ into \\, and sed turns \\ into \).
29265       sed -n \
29266         "s/'/'\\\\''/g;
29267           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29268       ;;
29269     *)
29270       # `set' quotes correctly as required by POSIX, so do not add quotes.
29271       sed -n \
29272         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
29273       ;;
29274     esac;
29275 } |
29276   sed '
29277      t clear
29278      : clear
29279      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29280      t end
29281      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29282      : end' >>confcache
29283 if cmp -s $cache_file confcache; then :; else
29284   if test -w $cache_file; then
29285     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
29286     cat confcache >$cache_file
29287   else
29288     echo "not updating unwritable cache $cache_file"
29289   fi
29290 fi
29291 rm -f confcache
29292
29293 test "x$prefix" = xNONE && prefix=$ac_default_prefix
29294 # Let make expand exec_prefix.
29295 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29296
29297 # VPATH may cause trouble with some makes, so we remove $(srcdir),
29298 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
29299 # trailing colons and then remove the whole line if VPATH becomes empty
29300 # (actually we leave an empty line to preserve line numbers).
29301 if test "x$srcdir" = x.; then
29302   ac_vpsub='/^[         ]*VPATH[        ]*=/{
29303 s/:*\$(srcdir):*/:/;
29304 s/:*\${srcdir}:*/:/;
29305 s/:*@srcdir@:*/:/;
29306 s/^\([^=]*=[    ]*\):*/\1/;
29307 s/:*$//;
29308 s/^[^=]*=[      ]*$//;
29309 }'
29310 fi
29311
29312 DEFS=-DHAVE_CONFIG_H
29313
29314 : "${CONFIG_STATUS=./config.status}"
29315 ac_clean_files_save=$ac_clean_files
29316 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29317 { echo "$as_me:29317: creating $CONFIG_STATUS" >&5
29318 echo "$as_me: creating $CONFIG_STATUS" >&6;}
29319 cat >"$CONFIG_STATUS" <<_ACEOF
29320 #! $SHELL
29321 # Generated automatically by configure.
29322 # Run this file to recreate the current configuration.
29323 # Compiler output produced by configure, useful for debugging
29324 # configure, is in config.log if it exists.
29325
29326 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
29327
29328 debug=false
29329 SHELL=\${CONFIG_SHELL-$SHELL}
29330 ac_cs_invocation="\$0 \$@"
29331
29332 CLICOLOR_FORCE= GREP_OPTIONS=
29333 unset CLICOLOR_FORCE GREP_OPTIONS
29334 _ACEOF
29335
29336 cat >>"$CONFIG_STATUS" <<\_ACEOF
29337 # Be Bourne compatible
29338 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29339   emulate sh
29340   NULLCMD=:
29341 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29342   set -o posix
29343 fi
29344
29345 # Name of the executable.
29346 as_me=`echo "$0" |sed 's,.*[\\/],,'`
29347
29348 if expr a : '\(a\)' >/dev/null 2>&1; then
29349   as_expr="expr"
29350 else
29351   as_expr="false"
29352 fi
29353
29354 rm -f conf$$ conf$$.exe conf$$.file
29355 echo >conf$$.file
29356 if ln -s conf$$.file conf$$ 2>/dev/null; then
29357   # We could just check for DJGPP; but this test a) works b) is more generic
29358   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
29359   if test -f conf$$.exe; then
29360     # Don't use ln at all; we don't have any links
29361     as_ln_s='cp -p'
29362   else
29363     as_ln_s='ln -s'
29364   fi
29365 elif ln conf$$.file conf$$ 2>/dev/null; then
29366   as_ln_s='ln'
29367 else
29368   as_ln_s='cp -p'
29369 fi
29370 rm -f conf$$ conf$$.exe conf$$.file
29371
29372 as_executable_p="test -f"
29373
29374 # Support unset when possible.
29375 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
29376   as_unset="unset"
29377 else
29378   as_unset="false"
29379 fi
29380
29381 # NLS nuisances.
29382 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
29383 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
29384 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
29385 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
29386 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
29387 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
29388 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
29389 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
29390
29391 # IFS
29392 # We need space, tab and new line, in precisely that order.
29393 as_nl='
29394 '
29395 IFS="   $as_nl"
29396
29397 # CDPATH.
29398 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
29399
29400 exec 6>&1
29401
29402 _ACEOF
29403
29404 # Files that config.status was made for.
29405 if test -n "$ac_config_files"; then
29406   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
29407 fi
29408
29409 if test -n "$ac_config_headers"; then
29410   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
29411 fi
29412
29413 if test -n "$ac_config_links"; then
29414   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
29415 fi
29416
29417 if test -n "$ac_config_commands"; then
29418   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
29419 fi
29420
29421 cat >>"$CONFIG_STATUS" <<\EOF
29422
29423 ac_cs_usage="\
29424 \`$as_me' instantiates files from templates according to the
29425 current configuration.
29426
29427 Usage: $0 [OPTIONS] [FILE]...
29428
29429   -h, --help       print this help, then exit
29430   -V, --version    print version number, then exit
29431   -d, --debug      don't remove temporary files
29432       --recheck    update $as_me by reconfiguring in the same conditions
29433   --file=FILE[:TEMPLATE]
29434                    instantiate the configuration file FILE
29435   --header=FILE[:TEMPLATE]
29436                    instantiate the configuration header FILE
29437
29438 Configuration files:
29439 $config_files
29440
29441 Configuration headers:
29442 $config_headers
29443
29444 Configuration commands:
29445 $config_commands
29446
29447 Report bugs to <dickey@invisible-island.net>."
29448 EOF
29449
29450 cat >>"$CONFIG_STATUS" <<EOF
29451 ac_cs_version="\\
29452 config.status
29453 configured by $0, generated by GNU Autoconf 2.52.20230114,
29454   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
29455
29456 Copyright 2003-2022,2023        Thomas E. Dickey
29457 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
29458 Free Software Foundation, Inc.
29459 This config.status script is free software; the Free Software Foundation
29460 gives unlimited permission to copy, distribute and modify it."
29461 srcdir="$srcdir"
29462 INSTALL="$INSTALL"
29463 EOF
29464
29465 cat >>"$CONFIG_STATUS" <<\EOF
29466 # If no file are specified by the user, then we need to provide default
29467 # value.  By we need to know if files were specified by the user.
29468 ac_need_defaults=:
29469 while test $# != 0
29470 do
29471   case $1 in
29472   --*=*)
29473     ac_option=`expr "x$1" : 'x\([^=]*\)='`
29474     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
29475     shift
29476     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
29477     shift
29478     ;;
29479   -*);;
29480   *) # This is not an option, so the user has probably given explicit
29481      # arguments.
29482      ac_need_defaults=false;;
29483   esac
29484
29485   case $1 in
29486   # Handling of the options.
29487 EOF
29488 cat >>"$CONFIG_STATUS" <<EOF
29489   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29490     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
29491     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
29492 EOF
29493 cat >>"$CONFIG_STATUS" <<\EOF
29494   --version | --vers* | -V )
29495     echo "$ac_cs_version"; exit 0 ;;
29496   --he | --h)
29497     # Conflict between --help and --header
29498     { { echo "$as_me:29498: error: ambiguous option: $1
29499 Try \`$0 --help' for more information." >&5
29500 echo "$as_me: error: ambiguous option: $1
29501 Try \`$0 --help' for more information." >&2;}
29502    { (exit 1); exit 1; }; };;
29503   --help | --hel | -h )
29504     echo "$ac_cs_usage"; exit 0 ;;
29505   --debug | --d* | -d )
29506     debug=: ;;
29507   --file | --fil | --fi | --f )
29508     shift
29509     CONFIG_FILES="$CONFIG_FILES $1"
29510     ac_need_defaults=false;;
29511   --header | --heade | --head | --hea )
29512     shift
29513     CONFIG_HEADERS="$CONFIG_HEADERS $1"
29514     ac_need_defaults=false;;
29515
29516   # This is an error.
29517   -*) { { echo "$as_me:29517: error: unrecognized option: $1
29518 Try \`$0 --help' for more information." >&5
29519 echo "$as_me: error: unrecognized option: $1
29520 Try \`$0 --help' for more information." >&2;}
29521    { (exit 1); exit 1; }; } ;;
29522
29523   *) ac_config_targets="$ac_config_targets $1" ;;
29524
29525   esac
29526   shift
29527 done
29528
29529 exec 5>>config.log
29530 cat >&5 << _ACEOF
29531
29532 ## ----------------------- ##
29533 ## Running config.status.  ##
29534 ## ----------------------- ##
29535
29536 This file was extended by $as_me 2.52.20230114, executed with
29537   CONFIG_FILES    = $CONFIG_FILES
29538   CONFIG_HEADERS  = $CONFIG_HEADERS
29539   CONFIG_LINKS    = $CONFIG_LINKS
29540   CONFIG_COMMANDS = $CONFIG_COMMANDS
29541   > "$ac_cs_invocation"
29542 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29543
29544 _ACEOF
29545 EOF
29546
29547 cat >>"$CONFIG_STATUS" <<EOF
29548 #
29549 # INIT-COMMANDS section.
29550 #
29551
29552 ### Special initialization commands, used to pass information from the
29553 ### configuration-run into config.status
29554
29555 ALTERNATE_SYMS="$ALTERNATE_SYMS"
29556 AWK="$AWK"
29557 CXX_NAME="$CXX_NAME"
29558 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
29559 DFT_LWR_MODEL="$DFT_LWR_MODEL"
29560 ECHO_LD="$ECHO_LD"
29561 EXTRA_SUFFIX="$EXTRA_SUFFIX"
29562 FORM_NAME="$FORM_NAME"
29563 LDCONFIG="$LDCONFIG"
29564 LIBTOOL_VERSION="$LIBTOOL_VERSION"
29565 LIB_NAME="$LIB_NAME"
29566 LIB_PREFIX="$LIB_PREFIX"
29567 LIB_SUBSETS="$LIB_SUBSETS"
29568 LIB_SUFFIX="$LIB_SUFFIX"
29569 LIB_TRACING="$LIB_TRACING"
29570 LN_S="$LN_S"
29571 MAKE_TERMINFO="$MAKE_TERMINFO"
29572 MANPAGE_RENAMES="$MANPAGE_RENAMES"
29573 MENU_NAME="$MENU_NAME"
29574 NCURSES_MAJOR="$NCURSES_MAJOR"
29575 NCURSES_MINOR="$NCURSES_MINOR"
29576 NCURSES_OSPEED="$NCURSES_OSPEED"
29577 NCURSES_PATCH="$NCURSES_PATCH"
29578 PANEL_NAME="$PANEL_NAME"
29579 SRC_SUBDIRS="$SRC_SUBDIRS"
29580 TERMINFO="$TERMINFO"
29581 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
29582 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
29583 TICS_NAME="$TICS_NAME"
29584 TICS_SUFFIX="$TICS_SUFFIX"
29585 TIC_PATH="$TIC_PATH"
29586 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
29587 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
29588 TINFO_NAME="$TINFO_NAME"
29589 TINFO_SUFFIX="$TINFO_SUFFIX"
29590 UNALTERED_SYMS="$UNALTERED_SYMS"
29591 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
29592 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
29593 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
29594 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
29595 WILDCARD_SYMS="$WILDCARD_SYMS"
29596 WITH_CURSES_H="$with_curses_h"
29597 WITH_ECHO="${enable_echo:=yes}"
29598 WITH_OVERWRITE="$with_overwrite"
29599 cf_LIST_MODELS="$cf_list_models"
29600 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
29601 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
29602 cf_cv_abi_default="$cf_cv_abi_default"
29603 cf_cv_abi_version="$cf_cv_abi_version"
29604 cf_cv_do_relink="$cf_cv_do_relink"
29605 cf_cv_do_reranlib="$cf_cv_do_reranlib"
29606 cf_cv_do_symlinks="$cf_cv_do_symlinks"
29607 cf_cv_enable_lp64="$cf_cv_enable_lp64"
29608 cf_cv_enable_opaque="$cf_cv_enable_opaque"
29609 cf_cv_make_PHONY="$cf_cv_make_PHONY"
29610 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
29611 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
29612 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
29613 cf_cv_rel_version="$cf_cv_rel_version"
29614 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
29615 cf_cv_shared_soname='$cf_cv_shared_soname'
29616 cf_cv_shlib_version="$cf_cv_shlib_version"
29617 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
29618 cf_cv_system_name="$cf_cv_system_name"
29619 cf_cv_term_driver="$with_term_driver"
29620 cf_with_ada="$cf_with_ada"
29621 cf_with_cxx_binding="$cf_with_cxx_binding"
29622 cf_with_db_install="$cf_with_db_install"
29623 cf_with_manpages="$cf_with_manpages"
29624 cf_with_tests="$cf_with_tests"
29625 host="$host"
29626 target="$target"
29627 verbose="$verbose"
29628 with_shared_cxx="$with_shared_cxx"
29629
29630 EOF
29631
29632 cat >>"$CONFIG_STATUS" <<\EOF
29633 for ac_config_target in $ac_config_targets
29634 do
29635   case "$ac_config_target" in
29636   # Handling of arguments.
29637   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
29638   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
29639   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
29640   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
29641   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
29642   "man/man_db.renames" ) CONFIG_FILES="$CONFIG_FILES man/man_db.renames" ;;
29643   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
29644   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29645   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29646   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
29647   *) { { echo "$as_me:29647: error: invalid argument: $ac_config_target" >&5
29648 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
29649    { (exit 1); exit 1; }; };;
29650   esac
29651 done
29652
29653 # If the user did not use the arguments to specify the items to instantiate,
29654 # then the envvar interface is used.  Set only those that are not.
29655 # We use the long form for the default assignment because of an extremely
29656 # bizarre bug on SunOS 4.1.3.
29657 if "$ac_need_defaults"; then
29658   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29659   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29660   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29661 fi
29662
29663 # Create a temporary directory, and hook for its removal unless debugging.
29664 $debug ||
29665 {
29666   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
29667   trap '{ (exit 1); exit 1; }' 1 2 13 15
29668 }
29669
29670 # Create a (secure) tmp directory for tmp files.
29671 : "${TMPDIR=/tmp}"
29672 {
29673   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
29674   test -n "$tmp" && test -d "$tmp"
29675 }  ||
29676 {
29677   tmp=$TMPDIR/cs$$-$RANDOM
29678   (umask 077 && mkdir "$tmp")
29679 } ||
29680 {
29681    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
29682    { (exit 1); exit 1; }
29683 }
29684
29685 EOF
29686
29687 cat >>"$CONFIG_STATUS" <<EOF
29688
29689 #
29690 # CONFIG_FILES section.
29691 #
29692
29693 # No need to generate the scripts if there are no CONFIG_FILES.
29694 # This happens for instance when ./config.status config.h
29695 if test -n "\$CONFIG_FILES"; then
29696   # Protect against being on the right side of a sed subst in config.status.
29697   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
29698    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
29699 s,@SHELL@,$SHELL,;t t
29700 s,@exec_prefix@,$exec_prefix,;t t
29701 s,@prefix@,$prefix,;t t
29702 s,@program_transform_name@,$program_transform_name,;t t
29703 s,@bindir@,$bindir,;t t
29704 s,@sbindir@,$sbindir,;t t
29705 s,@libexecdir@,$libexecdir,;t t
29706 s,@datarootdir@,$datarootdir,;t t
29707 s,@datadir@,$datadir,;t t
29708 s,@sysconfdir@,$sysconfdir,;t t
29709 s,@sharedstatedir@,$sharedstatedir,;t t
29710 s,@localstatedir@,$localstatedir,;t t
29711 s,@runstatedir@,$runstatedir,;t t
29712 s,@libdir@,$libdir,;t t
29713 s,@includedir@,$includedir,;t t
29714 s,@oldincludedir@,$oldincludedir,;t t
29715 s,@infodir@,$infodir,;t t
29716 s,@mandir@,$mandir,;t t
29717 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
29718 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
29719 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
29720 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
29721 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
29722 s,@build_alias@,$build_alias,;t t
29723 s,@host_alias@,$host_alias,;t t
29724 s,@target_alias@,$target_alias,;t t
29725 s,@ECHO_C@,$ECHO_C,;t t
29726 s,@ECHO_N@,$ECHO_N,;t t
29727 s,@ECHO_T@,$ECHO_T,;t t
29728 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
29729 s,@DEFS@,$DEFS,;t t
29730 s,@LIBS@,$LIBS,;t t
29731 s,@top_builddir@,$top_builddir,;t t
29732 s,@GREP@,$GREP,;t t
29733 s,@EGREP@,$EGREP,;t t
29734 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
29735 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
29736 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
29737 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
29738 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
29739 s,@cf_cv_abi_default@,$cf_cv_abi_default,;t t
29740 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
29741 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
29742 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
29743 s,@VERSION@,$VERSION,;t t
29744 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
29745 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
29746 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
29747 s,@PACKAGE@,$PACKAGE,;t t
29748 s,@build@,$build,;t t
29749 s,@build_cpu@,$build_cpu,;t t
29750 s,@build_vendor@,$build_vendor,;t t
29751 s,@build_os@,$build_os,;t t
29752 s,@host@,$host,;t t
29753 s,@host_cpu@,$host_cpu,;t t
29754 s,@host_vendor@,$host_vendor,;t t
29755 s,@host_os@,$host_os,;t t
29756 s,@target@,$target,;t t
29757 s,@target_cpu@,$target_cpu,;t t
29758 s,@target_vendor@,$target_vendor,;t t
29759 s,@target_os@,$target_os,;t t
29760 s,@FGREP@,$FGREP,;t t
29761 s,@CC@,$CC,;t t
29762 s,@CFLAGS@,$CFLAGS,;t t
29763 s,@LDFLAGS@,$LDFLAGS,;t t
29764 s,@CPPFLAGS@,$CPPFLAGS,;t t
29765 s,@ac_ct_CC@,$ac_ct_CC,;t t
29766 s,@EXEEXT@,$EXEEXT,;t t
29767 s,@OBJEXT@,$OBJEXT,;t t
29768 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
29769 s,@CPP@,$CPP,;t t
29770 s,@LDCONFIG@,$LDCONFIG,;t t
29771 s,@CXX@,$CXX,;t t
29772 s,@CXXFLAGS@,$CXXFLAGS,;t t
29773 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
29774 s,@AWK@,$AWK,;t t
29775 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
29776 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
29777 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
29778 s,@LINT@,$LINT,;t t
29779 s,@LINT_OPTS@,$LINT_OPTS,;t t
29780 s,@LINT_LIBS@,$LINT_LIBS,;t t
29781 s,@LN_S@,$LN_S,;t t
29782 s,@cf_config_suffix@,$cf_config_suffix,;t t
29783 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
29784 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
29785 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
29786 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
29787 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
29788 s,@SET_MAKE@,$SET_MAKE,;t t
29789 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
29790 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
29791 s,@CTAGS@,$CTAGS,;t t
29792 s,@ETAGS@,$ETAGS,;t t
29793 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
29794 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
29795 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
29796 s,@RANLIB@,$RANLIB,;t t
29797 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
29798 s,@LD@,$LD,;t t
29799 s,@ac_ct_LD@,$ac_ct_LD,;t t
29800 s,@AR@,$AR,;t t
29801 s,@ac_ct_AR@,$ac_ct_AR,;t t
29802 s,@NM@,$NM,;t t
29803 s,@ac_ct_NM@,$ac_ct_NM,;t t
29804 s,@ARFLAGS@,$ARFLAGS,;t t
29805 s,@DESTDIR@,$DESTDIR,;t t
29806 s,@BUILD_CC@,$BUILD_CC,;t t
29807 s,@BUILD_CPP@,$BUILD_CPP,;t t
29808 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
29809 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
29810 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
29811 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
29812 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
29813 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
29814 s,@cf_list_models@,$cf_list_models,;t t
29815 s,@ABI_VERSION@,$ABI_VERSION,;t t
29816 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
29817 s,@LIBTOOL@,$LIBTOOL,;t t
29818 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
29819 s,@LT_UNDEF@,$LT_UNDEF,;t t
29820 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
29821 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
29822 s,@LIB_CREATE@,$LIB_CREATE,;t t
29823 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
29824 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
29825 s,@LIB_PREP@,$LIB_PREP,;t t
29826 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
29827 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
29828 s,@LIB_LINK@,$LIB_LINK,;t t
29829 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
29830 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
29831 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
29832 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
29833 s,@TICS_NAME@,$TICS_NAME,;t t
29834 s,@TINFO_NAME@,$TINFO_NAME,;t t
29835 s,@LIB_NAME@,$LIB_NAME,;t t
29836 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
29837 s,@CC_G_OPT@,$CC_G_OPT,;t t
29838 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
29839 s,@LD_MODEL@,$LD_MODEL,;t t
29840 s,@shlibdir@,$shlibdir,;t t
29841 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
29842 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
29843 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
29844 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
29845 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
29846 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
29847 s,@LINK_PROGS@,$LINK_PROGS,;t t
29848 s,@LINK_TESTS@,$LINK_TESTS,;t t
29849 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
29850 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
29851 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
29852 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
29853 s,@RPATH_LIST@,$RPATH_LIST,;t t
29854 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
29855 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
29856 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
29857 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
29858 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
29859 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
29860 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
29861 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
29862 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
29863 s,@TIC@,$TIC,;t t
29864 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
29865 s,@INFOCMP@,$INFOCMP,;t t
29866 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
29867 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
29868 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
29869 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
29870 s,@XTERM_KBS@,$XTERM_KBS,;t t
29871 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
29872 s,@TERMINFO@,$TERMINFO,;t t
29873 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
29874 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
29875 s,@TERMPATH@,$TERMPATH,;t t
29876 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
29877 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
29878 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
29879 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
29880 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
29881 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
29882 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
29883 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
29884 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
29885 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
29886 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
29887 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
29888 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
29889 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
29890 s,@RGB_PATH@,$RGB_PATH,;t t
29891 s,@no_x11_rgb@,$no_x11_rgb,;t t
29892 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
29893 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
29894 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
29895 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
29896 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
29897 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
29898 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
29899 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
29900 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
29901 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
29902 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
29903 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
29904 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
29905 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
29906 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
29907 s,@PTHREAD@,$PTHREAD,;t t
29908 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
29909 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
29910 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
29911 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
29912 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
29913 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
29914 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
29915 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
29916 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
29917 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
29918 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
29919 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
29920 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
29921 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
29922 s,@ECHO_LT@,$ECHO_LT,;t t
29923 s,@ECHO_LD@,$ECHO_LD,;t t
29924 s,@RULE_CC@,$RULE_CC,;t t
29925 s,@SHOW_CC@,$SHOW_CC,;t t
29926 s,@ECHO_CC@,$ECHO_CC,;t t
29927 s,@ECHO_LINK@,$ECHO_LINK,;t t
29928 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
29929 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
29930 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
29931 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
29932 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
29933 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
29934 s,@ADAFLAGS@,$ADAFLAGS,;t t
29935 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
29936 s,@ADA_TRACE@,$ADA_TRACE,;t t
29937 s,@MATH_LIB@,$MATH_LIB,;t t
29938 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
29939 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
29940 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
29941 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
29942 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
29943 s,@TEST_LIBS@,$TEST_LIBS,;t t
29944 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
29945 s,@CXXCPP@,$CXXCPP,;t t
29946 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
29947 s,@CXX_AR@,$CXX_AR,;t t
29948 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
29949 s,@CXXLIBS@,$CXXLIBS,;t t
29950 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
29951 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
29952 s,@M4_exists@,$M4_exists,;t t
29953 s,@cf_ada_make@,$cf_ada_make,;t t
29954 s,@cf_ada_config@,$cf_ada_config,;t t
29955 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
29956 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
29957 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
29958 s,@cf_compile_generics@,$cf_compile_generics,;t t
29959 s,@cf_generic_objects@,$cf_generic_objects,;t t
29960 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
29961 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
29962 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
29963 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
29964 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
29965 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
29966 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
29967 s,@cf_ada_package@,$cf_ada_package,;t t
29968 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
29969 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
29970 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
29971 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
29972 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
29973 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
29974 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
29975 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
29976 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
29977 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
29978 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
29979 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
29980 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
29981 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
29982 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
29983 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
29984 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
29985 s,@TICS_LIBS@,$TICS_LIBS,;t t
29986 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
29987 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
29988 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
29989 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
29990 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
29991 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
29992 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
29993 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
29994 s,@includesubdir@,$includesubdir,;t t
29995 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
29996 s,@TICS_LIST@,$TICS_LIST,;t t
29997 s,@TINFO_LIST@,$TINFO_LIST,;t t
29998 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
29999 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
30000 s,@FORM_NAME@,$FORM_NAME,;t t
30001 s,@MENU_NAME@,$MENU_NAME,;t t
30002 s,@PANEL_NAME@,$PANEL_NAME,;t t
30003 s,@CXX_NAME@,$CXX_NAME,;t t
30004 s,@TEST_ARGS@,$TEST_ARGS,;t t
30005 s,@TEST_DEPS@,$TEST_DEPS,;t t
30006 s,@TEST_ARG2@,$TEST_ARG2,;t t
30007 s,@TEST_DEP2@,$TEST_DEP2,;t t
30008 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
30009 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
30010 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
30011 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
30012 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
30013 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
30014 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
30015 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
30016 s,@cross_compiling@,$cross_compiling,;t t
30017 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
30018 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
30019 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
30020 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
30021 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
30022 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
30023 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
30024 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
30025 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
30026 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
30027 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
30028 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
30029 CEOF
30030
30031 EOF
30032
30033   cat >>"$CONFIG_STATUS" <<\EOF
30034   # Split the substitutions into bite-sized pieces for seds with
30035   # small command number limits, like on Digital OSF/1 and HP-UX.
30036   ac_max_sed_lines=48
30037   ac_sed_frag=1 # Number of current file.
30038   ac_beg=1 # First line for current file.
30039   ac_end=$ac_max_sed_lines # Line after last line for current file.
30040   ac_more_lines=:
30041   ac_sed_cmds=
30042   while "$ac_more_lines"; do
30043     if test "$ac_beg" -gt 1; then
30044       sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30045     else
30046       sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30047     fi
30048     if test ! -s "$tmp"/subs.frag; then
30049       ac_more_lines=false
30050     else
30051       # The purpose of the label and of the branching condition is to
30052       # speed up the sed processing (if there are no `@' at all, there
30053       # is no need to browse any of the substitutions).
30054       # These are the two extra sed commands mentioned above.
30055       (echo ':t
30056   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
30057       # It is possible to make a multiline substitution using escaped newlines.
30058       # Ensure that we do not split the substitution between script fragments.
30059       ac_BEG=$ac_end
30060       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
30061       sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
30062       if test -s "$tmp"/subs.next; then
30063         grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit
30064         if test ! -s "$tmp"/subs.edit; then
30065           grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
30066           if test ! -s "$tmp"/subs.edit; then
30067             if test "$ac_beg" -gt 1; then
30068               ac_end=`expr "$ac_end" - 1`
30069               continue
30070             fi
30071           fi
30072         fi
30073       fi
30074
30075       if test -z "$ac_sed_cmds"; then
30076         ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30077       else
30078         ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30079       fi
30080       ac_sed_frag=`expr "$ac_sed_frag" + 1`
30081       ac_beg=$ac_end
30082       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
30083     fi
30084   done
30085   if test -z "$ac_sed_cmds"; then
30086     ac_sed_cmds="cat"
30087   fi
30088 fi # test -n "$CONFIG_FILES"
30089
30090 EOF
30091 cat >>"$CONFIG_STATUS" <<\EOF
30092 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
30093   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30094   case "$ac_file" in
30095   - | *:- | *:-:* ) # input from stdin
30096         cat >"$tmp"/stdin
30097         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30098         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30099   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30100         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30101   * )   ac_file_in=$ac_file.in ;;
30102   esac
30103
30104   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
30105   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30106          X"$ac_file" : 'X\(//\)[^/]' \| \
30107          X"$ac_file" : 'X\(//\)$' \| \
30108          X"$ac_file" : 'X\(/\)' \| \
30109          .     : '\(.\)' 2>/dev/null ||
30110 echo X"$ac_file" |
30111     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30112           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30113           /^X\(\/\/\)$/{ s//\1/; q; }
30114           /^X\(\/\).*/{ s//\1/; q; }
30115           s/.*/./; q'`
30116   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30117     { case "$ac_dir" in
30118   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30119   *)                      as_incr_dir=.;;
30120 esac
30121 as_dummy="$ac_dir"
30122 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30123   case $as_mkdir_dir in
30124     # Skip DOS drivespec
30125     ?:) as_incr_dir=$as_mkdir_dir ;;
30126     *)
30127       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30128       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30129     ;;
30130   esac
30131 done; }
30132
30133     ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
30134     # A "../" for each directory in $ac_dir_suffix.
30135     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
30136   else
30137     ac_dir_suffix= ac_dots=
30138   fi
30139
30140   case "$srcdir" in
30141   .)  ac_srcdir=.
30142       if test -z "$ac_dots"; then
30143          ac_top_srcdir=.
30144       else
30145          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
30146       fi ;;
30147   [\\/]* | ?:[\\/]* )
30148       ac_srcdir="$srcdir$ac_dir_suffix";
30149       ac_top_srcdir="$srcdir" ;;
30150   *) # Relative path.
30151     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
30152     ac_top_srcdir="$ac_dots$srcdir" ;;
30153   esac
30154
30155   case $INSTALL in
30156   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30157   *) ac_INSTALL=$ac_dots$INSTALL ;;
30158   esac
30159
30160   if test x"$ac_file" != x-; then
30161     { echo "$as_me:30161: creating $ac_file" >&5
30162 echo "$as_me: creating $ac_file" >&6;}
30163     rm -f "$ac_file"
30164   fi
30165   # Let's still pretend it is `configure' which instantiates (i.e., don't
30166   # use $as_me), people would be surprised to read:
30167   #    /* config.h.  Generated automatically by config.status.  */
30168   configure_input="Generated automatically from `echo $ac_file_in |
30169                                                  sed 's,.*/,,'` by configure."
30170
30171   # First look for the input files in the build tree, otherwise in the
30172   # src tree.
30173   ac_file_inputs=`IFS=:
30174     for f in $ac_file_in; do
30175       case $f in
30176       -) echo "$tmp"/stdin ;;
30177       [\\/$]*)
30178          # Absolute (can't be DOS-style, as IFS=:)
30179          test -f "$f" || { { echo "$as_me:30179: error: cannot find input file: $f" >&5
30180 echo "$as_me: error: cannot find input file: $f" >&2;}
30181    { (exit 1); exit 1; }; }
30182          echo "$f";;
30183       *) # Relative
30184          if test -f "$f"; then
30185            # Build tree
30186            echo "$f"
30187          elif test -f "$srcdir/$f"; then
30188            # Source tree
30189            echo "$srcdir/$f"
30190          else
30191            # /dev/null tree
30192            { { echo "$as_me:30192: error: cannot find input file: $f" >&5
30193 echo "$as_me: error: cannot find input file: $f" >&2;}
30194    { (exit 1); exit 1; }; }
30195          fi;;
30196       esac
30197     done` || { (exit 1); exit 1; }
30198 EOF
30199 cat >>"$CONFIG_STATUS" <<\EOF
30200   ac_warn_datarootdir=no
30201   if test x"$ac_file" != x-; then
30202     for ac_item in $ac_file_inputs
30203     do
30204       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
30205       if test -n "$ac_seen"; then
30206         ac_used=`grep '@datarootdir@' "$ac_item"`
30207         if test -z "$ac_used"; then
30208           { echo "$as_me:30208: WARNING: datarootdir was used implicitly but not set:
30209 $ac_seen" >&5
30210 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
30211 $ac_seen" >&2;}
30212           ac_warn_datarootdir=yes
30213         fi
30214       fi
30215       ac_seen=`grep '${datarootdir}' "$ac_item"`
30216       if test -n "$ac_seen"; then
30217         { echo "$as_me:30217: WARNING: datarootdir was used explicitly but not set:
30218 $ac_seen" >&5
30219 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
30220 $ac_seen" >&2;}
30221         ac_warn_datarootdir=yes
30222       fi
30223     done
30224   fi
30225
30226 if test "x$ac_warn_datarootdir" = xyes; then
30227   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
30228 fi
30229
30230 EOF
30231 cat >>"$CONFIG_STATUS" <<EOF
30232   sed "$ac_vpsub
30233 $extrasub
30234 EOF
30235 cat >>"$CONFIG_STATUS" <<\EOF
30236 :t
30237 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30238 s,@configure_input@,$configure_input,;t t
30239 s,@srcdir@,$ac_srcdir,;t t
30240 s,@top_srcdir@,$ac_top_srcdir,;t t
30241 s,@INSTALL@,$ac_INSTALL,;t t
30242 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
30243   rm -f "$tmp"/stdin
30244 EOF
30245 : "${FGREP:=grep -F}"
30246 : "${EGREP:=grep -E}"
30247 cat >>"$CONFIG_STATUS" <<EOF
30248   : "\${FGREP:=$FGREP}"
30249   : "\${EGREP:=$EGREP}"
30250 EOF
30251 cat >>"$CONFIG_STATUS" <<\EOF
30252   if test x"$ac_file" != x-; then
30253     cp "$tmp/out" "$ac_file"
30254
30255     for ac_name in prefix exec_prefix datarootdir
30256     do
30257         ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
30258         if test -n "$ac_seen"; then
30259             ac_init=`$EGREP '[  ]*'$ac_name'[   ]*=' "$ac_file"`
30260             if test -z "$ac_init"; then
30261               ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
30262               { echo "$as_me:30262: WARNING: Variable $ac_name is used but was not set:
30263 $ac_seen" >&5
30264 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
30265 $ac_seen" >&2;}
30266             fi
30267         fi
30268     done
30269     $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
30270     $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
30271     if test -s "$tmp"/out; then
30272       ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
30273       { echo "$as_me:30273: WARNING: Some variables may not be substituted:
30274 $ac_seen" >&5
30275 echo "$as_me: WARNING: Some variables may not be substituted:
30276 $ac_seen" >&2;}
30277     fi
30278   else
30279     cat "$tmp"/out
30280   fi
30281   rm -f "$tmp"/out
30282
30283 done
30284 EOF
30285 cat >>"$CONFIG_STATUS" <<\EOF
30286
30287 #
30288 # CONFIG_HEADER section.
30289 #
30290
30291 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
30292 # NAME is the cpp macro being defined and VALUE is the value it is being given.
30293 #
30294 # ac_d sets the value in "#define NAME VALUE" lines.
30295 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
30296 ac_dB='[        ].*$,\1#\2'
30297 ac_dC=' '
30298 ac_dD=',;t'
30299 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
30300 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30301 ac_iB='\([      ]\),\1#\2define\3'
30302 ac_iC=' '
30303 ac_iD='\4,;t'
30304 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
30305 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30306 ac_uB='$,\1#\2define\3'
30307 ac_uC=' '
30308 ac_uD=',;t'
30309
30310 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
30311   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30312   case "$ac_file" in
30313   - | *:- | *:-:* ) # input from stdin
30314         cat >"$tmp"/stdin
30315         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30316         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30317   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30318         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30319   * )   ac_file_in=$ac_file.in ;;
30320   esac
30321
30322   test x"$ac_file" != x- && { echo "$as_me:30322: creating $ac_file" >&5
30323 echo "$as_me: creating $ac_file" >&6;}
30324
30325   # First look for the input files in the build tree, otherwise in the
30326   # src tree.
30327   ac_file_inputs=`IFS=:
30328     for f in $ac_file_in; do
30329       case $f in
30330       -) echo "$tmp"/stdin ;;
30331       [\\/$]*)
30332          # Absolute (can't be DOS-style, as IFS=:)
30333          test -f "$f" || { { echo "$as_me:30333: error: cannot find input file: $f" >&5
30334 echo "$as_me: error: cannot find input file: $f" >&2;}
30335    { (exit 1); exit 1; }; }
30336          echo $f;;
30337       *) # Relative
30338          if test -f "$f"; then
30339            # Build tree
30340            echo $f
30341          elif test -f "$srcdir/$f"; then
30342            # Source tree
30343            echo "$srcdir/$f"
30344          else
30345            # /dev/null tree
30346            { { echo "$as_me:30346: error: cannot find input file: $f" >&5
30347 echo "$as_me: error: cannot find input file: $f" >&2;}
30348    { (exit 1); exit 1; }; }
30349          fi;;
30350       esac
30351     done` || { (exit 1); exit 1; }
30352   # Remove the trailing spaces.
30353   sed 's/[      ]*$//' $ac_file_inputs >"$tmp"/in
30354
30355 EOF
30356
30357 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
30358 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
30359 # be either 'cat' or 'sort'.
30360 cat confdefs.h | uniq >conftest.vals
30361
30362 # Break up conftest.vals because some shells have a limit on
30363 # the size of here documents, and old seds have small limits too.
30364
30365 rm -f conftest.tail
30366 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
30367 while grep . conftest.vals >/dev/null
30368 do
30369   # Write chunks of a limited-size here document to conftest.frag.
30370   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
30371   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
30372   echo 'CEOF' >> "$CONFIG_STATUS"
30373   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
30374   rm -f conftest.vals
30375   mv conftest.tail conftest.vals
30376 done
30377 rm -f conftest.vals
30378
30379 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
30380 # marker @DEFS@.
30381 echo '  cat >> conftest.edit <<CEOF
30382 /@DEFS@/r conftest.frag
30383 /@DEFS@/d
30384 CEOF
30385 sed -f conftest.edit "$tmp"/in > "$tmp"/out
30386 rm -f "$tmp"/in
30387 mv "$tmp"/out "$tmp"/in
30388 rm -f conftest.edit conftest.frag
30389 ' >> "$CONFIG_STATUS"
30390
30391 cat >>"$CONFIG_STATUS" <<\EOF
30392   # Let's still pretend it is `configure' which instantiates (i.e., don't
30393   # use $as_me), people would be surprised to read:
30394   #    /* config.h.  Generated automatically by config.status.  */
30395   if test x"$ac_file" = x-; then
30396     echo "/* Generated automatically by configure.  */" >"$tmp"/config.h
30397   else
30398     echo "/* $ac_file.  Generated automatically by configure.  */" >"$tmp"/config.h
30399   fi
30400   cat "$tmp"/in >>"$tmp"/config.h
30401   rm -f "$tmp"/in
30402   if test x"$ac_file" != x-; then
30403     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
30404       { echo "$as_me:30404: $ac_file is unchanged" >&5
30405 echo "$as_me: $ac_file is unchanged" >&6;}
30406     else
30407       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30408          X"$ac_file" : 'X\(//\)[^/]' \| \
30409          X"$ac_file" : 'X\(//\)$' \| \
30410          X"$ac_file" : 'X\(/\)' \| \
30411          .     : '\(.\)' 2>/dev/null ||
30412 echo X"$ac_file" |
30413     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30414           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30415           /^X\(\/\/\)$/{ s//\1/; q; }
30416           /^X\(\/\).*/{ s//\1/; q; }
30417           s/.*/./; q'`
30418       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30419         { case "$ac_dir" in
30420   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30421   *)                      as_incr_dir=.;;
30422 esac
30423 as_dummy="$ac_dir"
30424 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30425   case $as_mkdir_dir in
30426     # Skip DOS drivespec
30427     ?:) as_incr_dir=$as_mkdir_dir ;;
30428     *)
30429       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30430       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30431     ;;
30432   esac
30433 done; }
30434
30435       fi
30436       rm -f "$ac_file"
30437       mv "$tmp/config.h" "$ac_file"
30438     fi
30439   else
30440     cat "$tmp"/config.h
30441     rm -f "$tmp"/config.h
30442   fi
30443 done
30444 EOF
30445 cat >>"$CONFIG_STATUS" <<\EOF
30446 #
30447 # CONFIG_COMMANDS section.
30448 #
30449 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
30450   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
30451   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
30452
30453   case "$ac_dest" in
30454     default )
30455 if test "x$cf_with_tests" != xno ; then
30456
30457 for cf_dir in test
30458 do
30459         if test ! -d "$srcdir/$cf_dir" ; then
30460                 continue
30461         elif test -f "$srcdir/$cf_dir/programs" ; then
30462                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
30463         fi
30464 done
30465
30466 fi
30467
30468 cf_prefix=$LIB_PREFIX
30469
30470 case "$cf_cv_shlib_version" in
30471 (cygdll|msysdll|mingw|msvcdll)
30472         TINFO_NAME=$TINFO_ARG_SUFFIX
30473         TINFO_SUFFIX=.dll
30474         ;;
30475 esac
30476
30477 if test -n "$TINFO_SUFFIX" ; then
30478         case "$TINFO_SUFFIX" in
30479         (tw*)
30480                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
30481                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30482                 ;;
30483         (t*)
30484                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
30485                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
30486                 ;;
30487         (w*)
30488                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
30489                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
30490                 ;;
30491         esac
30492 fi
30493
30494 for cf_dir in $SRC_SUBDIRS
30495 do
30496         if test ! -d "$srcdir/$cf_dir" ; then
30497                 continue
30498         elif test -f "$srcdir/$cf_dir/modules" ; then
30499
30500                 SHARED_LIB=
30501                 Libs_To_Make=
30502                 cf_awk_program=
30503                 if test -n "${cf_cv_abi_default}" && test "x${cf_cv_abi_default}" != "x5"
30504                 then
30505                         cf_awk_program="$cf_awk_program\
30506 /deprecated in ABI${cf_cv_abi_default}/ { next; }\
30507 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_default}\"); }\
30508 "
30509                 fi
30510
30511                 if test "x$WILDCARD_SYMS" = xno
30512                 then
30513                         cf_awk_program="$cf_awk_program\
30514 /[      ]_\\*;/ { skip=1; next; }\
30515 "
30516                 fi
30517
30518                 if test "x$cf_awk_program" != "x"
30519                 then
30520                         cat >>$cf_dir/Makefile <<CF_EOF
30521
30522 # Generated by CF_LIB_RULES
30523 resulting.map: $UNALTERED_SYMS
30524         $AWK 'BEGIN { skip = 1; last=""; } \
30525 $cf_awk_program \
30526 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
30527  skip = 0; last = \$\$0; } \
30528 END { print last; }' < "$UNALTERED_SYMS" >\$@
30529
30530 distclean::
30531         rm -f resulting.map
30532 CF_EOF
30533                 fi
30534
30535                 for cf_item in $cf_LIST_MODELS
30536                 do
30537
30538         case X$cf_item in
30539         (Xlibtool)
30540                 cf_suffix='.la'
30541                 cf_depsuf=$cf_suffix
30542                 ;;
30543         (Xdebug)
30544                 case "$cf_cv_system_name" in
30545                 (*-msvc*)
30546                         cf_suffix='_g.lib'
30547                         ;;
30548                 (*)
30549                         cf_suffix='_g.a'
30550                         ;;
30551                 esac
30552                 cf_depsuf=$cf_suffix
30553                 ;;
30554         (Xprofile)
30555                 case "$cf_cv_system_name" in
30556                 (*-msvc*)
30557                         cf_suffix='_p.lib'
30558                         ;;
30559                 (*)
30560                         cf_suffix='_p.a'
30561                         ;;
30562                 esac
30563                 cf_depsuf=$cf_suffix
30564                 ;;
30565         (Xshared)
30566                 case "$cf_cv_system_name" in
30567                 (aix[5-7]*)
30568                         cf_suffix='.so'
30569                         cf_depsuf=$cf_suffix
30570                         ;;
30571                 (*-msvc*)
30572                         cf_suffix='.dll'
30573                         cf_depsuf='.dll.lib'
30574                         ;;
30575                 (cygwin*|msys*|mingw*)
30576                         cf_suffix='.dll'
30577                         cf_depsuf='.dll.a'
30578                         ;;
30579                 (darwin*)
30580                         cf_suffix='.dylib'
30581                         cf_depsuf=$cf_suffix
30582                         ;;
30583                 (hpux*)
30584                         case "$target" in
30585                         (ia64*)
30586                                 cf_suffix='.so'
30587                                 cf_depsuf=$cf_suffix
30588                                 ;;
30589                         (*)
30590                                 cf_suffix='.sl'
30591                                 cf_depsuf=$cf_suffix
30592                                 ;;
30593                         esac
30594                         ;;
30595                 (*)
30596                         cf_suffix='.so'
30597                         cf_depsuf=$cf_suffix
30598                         ;;
30599                 esac
30600                 ;;
30601         (*)
30602                 case "$target" in
30603                 (*-msvc*)
30604                         cf_suffix='.lib'
30605                         ;;
30606                 (*)
30607                         cf_suffix='.a'
30608                         ;;
30609                 esac
30610                 cf_depsuf=$cf_suffix
30611                 ;;
30612         esac
30613         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30614         then
30615                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30616                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30617         fi
30618
30619                         if test "$cf_dir" = "c++"
30620                         then
30621
30622 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30623
30624 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30625
30626                         else
30627
30628 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30629
30630 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30631
30632                         fi
30633                         test -z "$cf_libname" && cf_libname="$cf_dir"
30634                         if test "$cf_item" = shared ; then
30635                                 if test -n "${LIB_SUFFIX}"
30636                                 then
30637                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30638                                 else
30639                                         cf_shared_suffix="$cf_suffix"
30640                                 fi
30641                                 if test "$cf_cv_do_symlinks" = yes ; then
30642                                         cf_version_name=
30643
30644                                         case "$cf_cv_shlib_version" in
30645                                         (rel)
30646                                                 cf_version_name=REL_VERSION
30647                                                 ;;
30648                                         (abi)
30649                                                 cf_version_name=ABI_VERSION
30650                                                 ;;
30651                                         esac
30652
30653                                         if test -n "$cf_version_name"
30654                                         then
30655                                                 case "$cf_cv_system_name" in
30656                                                 (darwin*)
30657                                                         # "w", etc?
30658                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
30659                                                         ;;
30660                                                 (*)
30661                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
30662                                                         ;;
30663                                                 esac
30664                                         fi
30665                                         if test -n "${USE_LIB_SUFFIX}"
30666                                         then
30667                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30668                                         else
30669                                                 cf_shared_suffix="$cf_suffix"
30670                                         fi
30671                                 fi
30672                                 # cygwin needs import library, and has unique naming convention
30673                                 # use autodetected ${cf_prefix} for import lib and static lib, but
30674                                 # use 'cyg' prefix for shared lib.
30675                                 case "$cf_cv_shlib_version" in
30676                                 (cygdll)
30677                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30678                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
30679                                         ;;
30680                                 (msysdll)
30681                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30682                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
30683                                         ;;
30684                                 (mingw)
30685                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30686                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
30687                                         ;;
30688                                 (msvcdll)
30689                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30690                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
30691                                         ;;
30692                                 (*)
30693                                         cf_add_lib=
30694                                         ;;
30695                                 esac
30696                                 if test -n "$cf_add_lib"
30697                                 then
30698                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30699                                         continue
30700                                 fi
30701                         fi
30702                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
30703                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30704                 done
30705
30706                 if test "$cf_dir" = ncurses ; then
30707                         cf_subsets="$LIB_SUBSETS"
30708                         cf_r_parts="$cf_subsets"
30709                         cf_liblist="$Libs_To_Make"
30710
30711                         while test -n "$cf_r_parts"
30712                         do
30713                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
30714                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
30715                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
30716                                         cf_add_lib=
30717                                         case "$cf_l_parts" in
30718                                         (*termlib*)
30719                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
30720                                                 ;;
30721                                         (*ticlib*)
30722                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
30723                                                 ;;
30724                                         (*)
30725                                                 break
30726                                                 ;;
30727                                         esac
30728                                         if test -n "$cf_add_lib"; then
30729                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
30730                                         fi
30731                                 else
30732                                         break
30733                                 fi
30734                         done
30735                 else
30736                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
30737                 fi
30738
30739                 if test "$cf_dir" = c++; then
30740                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
30741                                 cf_list=
30742                                 for cf_item in $Libs_To_Make
30743                                 do
30744                                         case "$cf_item" in
30745                                         (*.a)
30746                                                 ;;
30747                                         (*)
30748                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
30749                                                 ;;
30750                                         esac
30751                                         for cf_test in $cf_list
30752                                         do
30753                                                 if test "$cf_test" = "$cf_item"
30754                                                 then
30755                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
30756                                                         cf_item=
30757                                                         break
30758                                                 fi
30759                                         done
30760                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
30761                                 done
30762                                 Libs_To_Make="$cf_list"
30763                         fi
30764                 fi
30765
30766                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
30767                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
30768                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
30769                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
30770
30771                 $AWK -f "$srcdir/mk-0th.awk" \
30772                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
30773                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30774
30775                 for cf_subset in $cf_subsets
30776                 do
30777                         cf_subdirs=
30778                         for cf_item in $cf_LIST_MODELS
30779                         do
30780
30781                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
30782
30783 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30784
30785                         CXX_MODEL=$cf_ITEM
30786                         if test "$CXX_MODEL" = SHARED; then
30787                                 case "$cf_cv_shlib_version" in
30788                                 (cygdll|msysdll|mingw|msvcdll)
30789                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
30790
30791 echo "${as_me:-configure}:30791: testing overriding CXX_MODEL to SHARED ..." 1>&5
30792
30793                                         with_shared_cxx=yes
30794                                         ;;
30795                                 (*)
30796                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
30797                                         ;;
30798                                 esac
30799                         fi
30800
30801         case X$cf_item in
30802         (Xlibtool)
30803                 cf_suffix='.la'
30804                 cf_depsuf=$cf_suffix
30805                 ;;
30806         (Xdebug)
30807                 case "$cf_cv_system_name" in
30808                 (*-msvc*)
30809                         cf_suffix='_g.lib'
30810                         ;;
30811                 (*)
30812                         cf_suffix='_g.a'
30813                         ;;
30814                 esac
30815                 cf_depsuf=$cf_suffix
30816                 ;;
30817         (Xprofile)
30818                 case "$cf_cv_system_name" in
30819                 (*-msvc*)
30820                         cf_suffix='_p.lib'
30821                         ;;
30822                 (*)
30823                         cf_suffix='_p.a'
30824                         ;;
30825                 esac
30826                 cf_depsuf=$cf_suffix
30827                 ;;
30828         (Xshared)
30829                 case "$cf_cv_system_name" in
30830                 (aix[5-7]*)
30831                         cf_suffix='.so'
30832                         cf_depsuf=$cf_suffix
30833                         ;;
30834                 (*-msvc*)
30835                         cf_suffix='.dll'
30836                         cf_depsuf='.dll.lib'
30837                         ;;
30838                 (cygwin*|msys*|mingw*)
30839                         cf_suffix='.dll'
30840                         cf_depsuf='.dll.a'
30841                         ;;
30842                 (darwin*)
30843                         cf_suffix='.dylib'
30844                         cf_depsuf=$cf_suffix
30845                         ;;
30846                 (hpux*)
30847                         case "$target" in
30848                         (ia64*)
30849                                 cf_suffix='.so'
30850                                 cf_depsuf=$cf_suffix
30851                                 ;;
30852                         (*)
30853                                 cf_suffix='.sl'
30854                                 cf_depsuf=$cf_suffix
30855                                 ;;
30856                         esac
30857                         ;;
30858                 (*)
30859                         cf_suffix='.so'
30860                         cf_depsuf=$cf_suffix
30861                         ;;
30862                 esac
30863                 ;;
30864         (*)
30865                 case "$target" in
30866                 (*-msvc*)
30867                         cf_suffix='.lib'
30868                         ;;
30869                 (*)
30870                         cf_suffix='.a'
30871                         ;;
30872                 esac
30873                 cf_depsuf=$cf_suffix
30874                 ;;
30875         esac
30876         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30877         then
30878                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30879                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30880         fi
30881
30882         case $cf_item in
30883         (libtool) cf_subdir='obj_lo'  ;;
30884         (normal)  cf_subdir='objects' ;;
30885         (debug)   cf_subdir='obj_g' ;;
30886         (profile) cf_subdir='obj_p' ;;
30887         (shared)
30888                 case "$cf_cv_system_name" in
30889                 (cygwin|msys)
30890                         cf_subdir='objects' ;;
30891                 (*)
30892                         cf_subdir='obj_s' ;;
30893                 esac
30894         esac
30895
30896                         # Test for case where we build libtinfo with a different name.
30897                         cf_libname=$cf_dir
30898                         if test "$cf_dir" = ncurses ; then
30899                                 case "$cf_subset" in
30900                                 (*base*)
30901                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
30902                                         ;;
30903                                 (*termlib*)
30904                                         cf_libname=$TINFO_LIB_SUFFIX
30905                                         ;;
30906                                 (ticlib*)
30907                                         cf_libname=$TICS_LIB_SUFFIX
30908                                         ;;
30909                                 esac
30910                         elif test "$cf_dir" = c++ ; then
30911
30912 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30913
30914 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30915
30916                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30917                         else
30918
30919 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30920
30921 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30922
30923                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30924                         fi
30925                         if test -n "${USE_ARG_SUFFIX}" ; then
30926                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
30927                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
30928                         fi
30929
30930                         # These dependencies really are for development, not
30931                         # builds, but they are useful in porting, too.
30932                         cf_depend="../include/ncurses_cfg.h"
30933                         if test "$srcdir" = "."; then
30934                                 cf_reldir="."
30935                         else
30936                                 cf_reldir="\${srcdir}"
30937                         fi
30938
30939                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
30940                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
30941                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
30942                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
30943                         fi
30944
30945                         cf_dir_suffix=
30946                         old_cf_suffix="$cf_suffix"
30947                         if test "$cf_cv_shlib_version_infix" = yes ; then
30948                         if test -n "$USE_LIB_SUFFIX" ; then
30949                                 case "$USE_LIB_SUFFIX" in
30950                                 (tw*)
30951                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
30952                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30953                                         cf_dir_suffix=tw$EXTRA_SUFFIX
30954                                         ;;
30955                                 (t*)
30956                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
30957                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
30958                                         cf_dir_suffix=t$EXTRA_SUFFIX
30959                                         ;;
30960                                 (w*)
30961                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
30962                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
30963                                         cf_dir_suffix=w$EXTRA_SUFFIX
30964                                         ;;
30965                                 (*)
30966                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
30967                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
30968                                         cf_dir_suffix=$EXTRA_SUFFIX
30969                                         ;;
30970                                 esac
30971                         fi
30972                         fi
30973
30974                         $AWK -f "$srcdir/mk-1st.awk" \
30975                                 name=${cf_libname}${cf_dir_suffix} \
30976                                 traces=$LIB_TRACING \
30977                                 MODEL=$cf_ITEM \
30978                                 CXX_MODEL=$CXX_MODEL \
30979                                 LIB_SUFFIX=$LIB_SUFFIX \
30980                                 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
30981                                 make_phony="${cf_cv_make_PHONY:-no}" \
30982                                 model=$cf_subdir \
30983                                 prefix=$cf_prefix \
30984                                 suffix=$cf_suffix \
30985                                 subset=$cf_subset \
30986                                 driver=$cf_cv_term_driver \
30987                                 SymLink="$LN_S" \
30988                                 TermlibRoot=$TINFO_NAME \
30989                                 TermlibSuffix=$TINFO_SUFFIX \
30990                                 ShlibVer=$cf_cv_shlib_version \
30991                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
30992                                 ReLink=${cf_cv_do_relink:-no} \
30993                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
30994                                 DoLinks=$cf_cv_do_symlinks \
30995                                 rmSoLocs=$cf_cv_rm_so_locs \
30996                                 ldconfig="$LDCONFIG" \
30997                                 overwrite=$WITH_OVERWRITE \
30998                                 depend="$cf_depend" \
30999                                 host="$host" \
31000                                 libtool_version="$LIBTOOL_VERSION" \
31001                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31002
31003                         cf_suffix="$old_cf_suffix"
31004
31005                         for cf_subdir2 in $cf_subdirs lib
31006                         do
31007                                 test "$cf_subdir" = "$cf_subdir2" && break
31008                         done
31009                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
31010                         $AWK -f "$srcdir/mk-2nd.awk" \
31011                                 name=$cf_dir \
31012                                 traces=$LIB_TRACING \
31013                                 MODEL=$cf_ITEM \
31014                                 model=$cf_subdir \
31015                                 subset=$cf_subset \
31016                                 srcdir=$srcdir \
31017                                 echo=$WITH_ECHO \
31018                                 crenames=$cf_cv_prog_CC_c_o \
31019                                 cxxrenames=$cf_cv_prog_CXX_c_o \
31020                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31021                         cf_subdirs="$cf_subdirs $cf_subdir"
31022                         done
31023                 done
31024         fi
31025
31026         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
31027 done
31028
31029 echo >> Makefile
31030 echo '# generated by CF_LIB_RULES' >> Makefile
31031
31032 if test "x$cf_cv_make_PHONY" = xyes ; then
31033         cat >> Makefile <<-CF_EOF
31034
31035         .PHONY :        libs
31036         .PHONY :        lintlib
31037         .PHONY :        install.includes
31038         .PHONY :        uninstall.includes
31039         .PHONY :        install.libs
31040         .PHONY :        uninstall.libs
31041 CF_EOF
31042 fi
31043
31044 for cf_dir in $SRC_SUBDIRS
31045 do
31046         if test ! -d "$srcdir/$cf_dir" ; then
31047                 continue
31048         fi
31049
31050         if test -f "$cf_dir/Makefile" ; then
31051                 case "$cf_dir" in
31052                 (Ada95)
31053                         echo 'libs \' >> Makefile
31054                         echo 'install.libs \' >> Makefile
31055                         echo 'uninstall.libs ::' >> Makefile
31056                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
31057                         ;;
31058                 esac
31059         fi
31060
31061         if test -f "$srcdir/$cf_dir/modules" ; then
31062
31063                 if test "x$cf_cv_make_PHONY" = xyes ; then
31064                         cat >> Makefile <<-CF_EOF
31065
31066                         .PHONY :        install.$cf_dir
31067                         .PHONY :        uninstall.$cf_dir
31068 CF_EOF
31069                 fi
31070
31071                 echo >> Makefile
31072                 if test -f "$srcdir/$cf_dir/headers" ; then
31073 cat >> Makefile <<CF_EOF
31074 install.includes \\
31075 uninstall.includes \\
31076 CF_EOF
31077                 fi
31078
31079 cat >> Makefile <<CF_EOF
31080 lint \\
31081 libs \\
31082 lintlib \\
31083 install.libs \\
31084 uninstall.libs \\
31085 install.$cf_dir \\
31086 uninstall.$cf_dir ::
31087         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31088 CF_EOF
31089         elif test -f "$srcdir/$cf_dir/headers" ; then
31090 cat >> Makefile <<CF_EOF
31091
31092 libs \\
31093 install.libs \\
31094 uninstall.libs \\
31095 install.includes \\
31096 uninstall.includes ::
31097         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31098 CF_EOF
31099 fi
31100 done
31101
31102 if test "x$cf_cv_make_PHONY" = xyes ; then
31103         cat >> Makefile <<-CF_EOF
31104
31105         .PHONY :        install.data
31106         .PHONY :        uninstall.data
31107 CF_EOF
31108 fi
31109
31110 if test "x$cf_with_db_install" = xyes; then
31111 cat >> Makefile <<CF_EOF
31112
31113 install.libs uninstall.libs \\
31114 install.data uninstall.data ::
31115 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31116 CF_EOF
31117 else
31118 cat >> Makefile <<CF_EOF
31119
31120 install.libs uninstall.libs ::
31121         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31122 CF_EOF
31123 fi
31124
31125 if test "x$cf_with_manpages" = xyes; then
31126
31127 if test "x$cf_cv_make_PHONY" = xyes ; then
31128         cat >> Makefile <<-CF_EOF
31129
31130         .PHONY :        install.man
31131         .PHONY :        uninstall.man
31132 CF_EOF
31133 fi
31134
31135 cat >> Makefile <<CF_EOF
31136
31137 install.man \\
31138 uninstall.man ::
31139         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
31140 CF_EOF
31141 fi
31142
31143 cat >> Makefile <<CF_EOF
31144
31145 distclean ::
31146         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
31147         rm -f headers.sh headers.sed mk_shared_lib.sh
31148         rm -f edit_man.* man_alias.*
31149         rm -rf \${DIRS_TO_MAKE}
31150 CF_EOF
31151
31152 # Special case: tack's manpage lives in its own directory.
31153 if test "x$cf_with_manpages" = xyes; then
31154 if test "x$cf_with_tack" = "xyes"; then
31155 cat >> Makefile <<CF_EOF
31156
31157 install.man \\
31158 uninstall.man ::
31159         ( cd tack && \${MAKE} \${TOP_MFLAGS} \$@ )
31160 CF_EOF
31161 fi
31162 fi
31163
31164 rm -f headers.sed headers.sh
31165
31166 echo creating headers.sh
31167 cat >headers.sh <<CF_EOF
31168 #! $SHELL
31169 # This shell script is generated by the 'configure' script.  It is invoked in a
31170 # subdirectory of the build tree.  It generates a sed-script in the parent
31171 # directory that is used to adjust includes for header files that reside in a
31172 # subdirectory of /usr/include, etc.
31173 PRG=""
31174 while test \$# != 3
31175 do
31176 PRG="\$PRG \$1"; shift
31177 done
31178 DST=\$1
31179 REF=\$2
31180 SRC=\$3
31181 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
31182 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
31183 echo installing \$SRC in \$DST
31184 CF_EOF
31185
31186 if test "$WITH_CURSES_H" = yes; then
31187         cat >>headers.sh <<CF_EOF
31188 case \$DST in
31189 (/*/include/*)
31190         END=\`basename \$DST\`
31191         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31192         do
31193                 NAME=\`basename \$i\`
31194                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31195         done
31196         ;;
31197 (*)
31198         echo "" >> \$TMPSED
31199         ;;
31200 esac
31201 CF_EOF
31202
31203 else
31204         cat >>headers.sh <<CF_EOF
31205 case \$DST in
31206 (/*/include/*)
31207         END=\`basename \$DST\`
31208         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31209         do
31210                 NAME=\`basename \$i\`
31211                 if test "\$NAME" = "curses.h"
31212                 then
31213                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31214                         NAME=ncurses.h
31215                 fi
31216                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31217         done
31218         ;;
31219 (*)
31220         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31221         ;;
31222 esac
31223 CF_EOF
31224 fi
31225 cat >>headers.sh <<CF_EOF
31226 rm -f \$TMPSRC
31227 sed -f \$TMPSED \$SRC > \$TMPSRC
31228 NAME=\`basename \$SRC\`
31229 CF_EOF
31230 if test "$WITH_CURSES_H" != yes; then
31231         cat >>headers.sh <<CF_EOF
31232 test "\$NAME" = "curses.h" && NAME=ncurses.h
31233 CF_EOF
31234 fi
31235 cat >>headers.sh <<CF_EOF
31236 # Just in case someone gzip'd manpages, remove the conflicting copy.
31237 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
31238
31239 eval \$PRG \$TMPSRC \$DST/\$NAME
31240 rm -f \$TMPSRC \$TMPSED
31241 CF_EOF
31242
31243 chmod 0755 headers.sh
31244
31245 for cf_dir in $SRC_SUBDIRS
31246 do
31247         if test ! -d "$srcdir/$cf_dir" ; then
31248                 continue
31249         fi
31250
31251         if test -f "$srcdir/$cf_dir/headers" ; then
31252                 $AWK -f "$srcdir/mk-hdr.awk" \
31253                         subset="$LIB_SUBSETS" \
31254                         compat="$WITH_CURSES_H" \
31255                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
31256         fi
31257
31258         if test -f "$srcdir/$cf_dir/modules" ; then
31259                 if test "$cf_dir" != "c++" ; then
31260                         if test "x$cf_cv_make_PHONY" = xyes ; then
31261                                 cat >> $cf_dir/Makefile <<-CF_EOF
31262
31263                                 .PHONY :        depend
31264 CF_EOF
31265                         fi
31266
31267                         cat >>$cf_dir/Makefile <<"CF_EOF"
31268 depend : ${AUTO_SRC}
31269         makedepend -- ${CPPFLAGS} -- ${C_SRC}
31270
31271 # DO NOT DELETE THIS LINE -- make depend depends on it.
31272 CF_EOF
31273                 fi
31274         fi
31275 done
31276
31277 if test "$MANPAGE_RENAMES" != no ; then
31278         # Construct a sed-script to perform renaming within man-pages
31279         test -n "$verbose" && echo "creating edit_man.sed"
31280         test ! -d man && mkdir man
31281         FGREP="${FGREP-grep -F}" $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
31282 fi
31283
31284 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
31285 if test -z "$USE_OLD_MAKERULES" ; then
31286         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
31287 fi
31288 fi
31289  ;;
31290   esac
31291 done
31292 EOF
31293
31294 cat >>"$CONFIG_STATUS" <<\EOF
31295
31296 { (exit 0); exit 0; }
31297 EOF
31298 chmod +x "$CONFIG_STATUS"
31299 ac_clean_files=$ac_clean_files_save
31300
31301 # configure is writing to config.log, and then calls config.status.
31302 # config.status does its own redirection, appending to config.log.
31303 # Unfortunately, on DOS this fails, as config.log is still kept open
31304 # by configure, so config.status won't be able to write to it; its
31305 # output is simply discarded.  So we exec the FD to /dev/null,
31306 # effectively closing config.log, so it can be properly (re)opened and
31307 # appended to by config.status.  When coming back to configure, we
31308 # need to make the FD available again.
31309 if test "$no_create" != yes; then
31310   ac_cs_success=:
31311   exec 5>/dev/null
31312   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
31313   exec 5>>config.log
31314   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31315   # would make configure fail if this is the last instruction.
31316   "$ac_cs_success" || { (exit 1); exit 1; }
31317 fi
31318 ${MAKE:-make} preinstall