]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
19890a68316e7c8cc9c988d4aae62f638abc7d54
[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 cf_manpage_format=no
14987 cf_manpage_inboth=no
14988 cf_manpage_so_strip=
14989 cf_manpage_compress=
14990
14991 for cf_item in $MANPAGE_FORMAT
14992 do
14993 case "$cf_item" in
14994 (catonly)
14995         cf_manpage_format=yes
14996         cf_manpage_inboth=no
14997         ;;
14998 (formatted)
14999         cf_manpage_format=yes
15000         cf_manpage_inboth=yes
15001         ;;
15002 (compress)
15003         cf_manpage_so_strip="Z"
15004         cf_manpage_compress=compress
15005         ;;
15006 (gzip)
15007         cf_manpage_so_strip="gz"
15008         cf_manpage_compress=gzip
15009         ;;
15010 (bzip2)
15011         cf_manpage_so_strip="bz2"
15012         cf_manpage_compress=bzip2
15013         ;;
15014 (xz)
15015         cf_manpage_so_strip="xz"
15016         cf_manpage_compress=xz
15017         ;;
15018 esac
15019 done
15020
15021 echo "$as_me:15021: checking for manpage renaming" >&5
15022 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
15023
15024 # Check whether --with-manpage-renames or --without-manpage-renames was given.
15025 if test "${with_manpage_renames+set}" = set; then
15026   withval="$with_manpage_renames"
15027   MANPAGE_RENAMES=$withval
15028 else
15029   MANPAGE_RENAMES=yes
15030 fi;
15031
15032 case ".$MANPAGE_RENAMES" in
15033 (.no)
15034         ;;
15035 (.|.yes)
15036         # Debian 'man' program?
15037         if test -f /etc/debian_version ; then
15038                 MANPAGE_RENAMES=man/man_db.renames
15039         else
15040                 MANPAGE_RENAMES=no
15041         fi
15042         ;;
15043 esac
15044
15045 if test "$MANPAGE_RENAMES" = man/man_db.renames ; then
15046         MANPAGE_RENAMES=`pwd`/$MANPAGE_RENAMES
15047 elif test "$MANPAGE_RENAMES" = no ; then
15048         :
15049 elif test ! -f "$MANPAGE_RENAMES" ; then
15050         { { echo "$as_me:15050: error: not a filename: $MANPAGE_RENAMES" >&5
15051 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
15052    { (exit 1); exit 1; }; }
15053 fi
15054
15055 echo "$as_me:15055: result: $MANPAGE_RENAMES" >&5
15056 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
15057
15058 echo "$as_me:15058: checking if manpage aliases will be installed" >&5
15059 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
15060
15061 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
15062 if test "${with_manpage_aliases+set}" = set; then
15063   withval="$with_manpage_aliases"
15064   MANPAGE_ALIASES=$withval
15065 else
15066   MANPAGE_ALIASES=yes
15067 fi;
15068
15069 echo "$as_me:15069: result: $MANPAGE_ALIASES" >&5
15070 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
15071
15072 case "x$LN_S" in
15073 (xln*)
15074         cf_use_symlinks=yes
15075         ;;
15076 (*)
15077         cf_use_symlinks=no
15078         ;;
15079 esac
15080
15081 MANPAGE_SYMLINKS=no
15082 if test "$MANPAGE_ALIASES" = yes ; then
15083 echo "$as_me:15083: checking if manpage symlinks should be used" >&5
15084 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
15085
15086 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
15087 if test "${with_manpage_symlinks+set}" = set; then
15088   withval="$with_manpage_symlinks"
15089   MANPAGE_SYMLINKS=$withval
15090 else
15091   MANPAGE_SYMLINKS=$cf_use_symlinks
15092 fi;
15093
15094 if test "$cf_use_symlinks" = no; then
15095 if test "$MANPAGE_SYMLINKS" = yes ; then
15096         { echo "$as_me:15096: WARNING: cannot make symlinks" >&5
15097 echo "$as_me: WARNING: cannot make symlinks" >&2;}
15098         MANPAGE_SYMLINKS=no
15099 fi
15100 fi
15101
15102 echo "$as_me:15102: result: $MANPAGE_SYMLINKS" >&5
15103 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
15104 fi
15105
15106 echo "$as_me:15106: checking for manpage tbl" >&5
15107 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
15108
15109 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
15110 if test "${with_manpage_tbl+set}" = set; then
15111   withval="$with_manpage_tbl"
15112   MANPAGE_TBL=$withval
15113 else
15114   MANPAGE_TBL=no
15115 fi;
15116
15117 echo "$as_me:15117: result: $MANPAGE_TBL" >&5
15118 echo "${ECHO_T}$MANPAGE_TBL" >&6
15119
15120 if test "$prefix" = "NONE" ; then
15121         cf_prefix="$ac_default_prefix"
15122 else
15123         cf_prefix="$prefix"
15124 fi
15125
15126 test ! -d man && mkdir man
15127
15128 cf_edit_man=./edit_man.sh
15129 cf_man_alias=`pwd`/man_alias.sed
15130
15131 cat >$cf_edit_man <<CF_EOF
15132 #! $SHELL
15133 # this script is generated by the configure-script CF_MAN_PAGES macro.
15134
15135 prefix="$cf_prefix"
15136 datarootdir="$datarootdir"
15137 datadir="$datadir"
15138
15139 NCURSES_MAJOR="$NCURSES_MAJOR"
15140 NCURSES_MINOR="$NCURSES_MINOR"
15141 NCURSES_PATCH="$NCURSES_PATCH"
15142
15143 NCURSES_OSPEED="$NCURSES_OSPEED"
15144 TERMINFO="$TERMINFO"
15145
15146 INSTALL="$INSTALL"
15147 INSTALL_DATA="$INSTALL_DATA"
15148
15149 transform="$program_transform_name"
15150
15151 TMP=\${TMPDIR:=/tmp}/man\$\$
15152 trap "rm -f \$TMP; exit 1" 1 2 3 15
15153 trap "rm -f \$TMP" 0
15154
15155 form=\$1
15156 shift || exit 1
15157
15158 verb=\$1
15159 shift || exit 1
15160
15161 mandir=\$1
15162 shift || exit 1
15163
15164 srcdir=\$1
15165 top_srcdir=\$srcdir/..
15166 shift || exit 1
15167
15168 if test "\$form" = normal ; then
15169         if test "$cf_manpage_format" = yes ; then
15170         if test "$cf_manpage_inboth" = no ; then
15171                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15172                 exit $?
15173         fi
15174         fi
15175         cf_subdir=\$mandir/man
15176         cf_tables=$MANPAGE_TBL
15177 else
15178         cf_subdir=\$mandir/cat
15179         cf_tables=yes
15180 fi
15181
15182 # process the list of source-files
15183 for i in "\$@" ; do
15184 case \$i in
15185 (*.orig|*.rej) ;;
15186 (*.[0-9]*)
15187         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
15188         if test "\$verb" = installing ; then
15189         if test ! -d "\$cf_subdir\${section}" ; then
15190                 mkdir -p "\$cf_subdir\$section"
15191         fi
15192         fi
15193
15194         # replace variables in man page
15195         if test ! -f "$cf_man_alias" ; then
15196 cat >>$cf_man_alias <<-CF_EOF2
15197                 s,@DATADIR@,\$datadir,g
15198                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
15199                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
15200                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
15201                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
15202                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
15203                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
15204 CF_EOF
15205
15206         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
15207         do
15208                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15209                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
15210 cat >>$cf_edit_man <<-CF_EOF
15211                 s,@$cf_NAME@,$cf_name,g
15212 CF_EOF
15213         done
15214
15215 cat >>$cf_edit_man <<CF_EOF
15216 CF_EOF2
15217                 echo "...made $cf_man_alias"
15218         fi
15219
15220         aliases=
15221         cf_source=\`basename "\$i"\`
15222         cf_full_alias=\$cf_source
15223         test ! -f "\$cf_full_alias" && cf_full_alias="\$srcdir/\$cf_full_alias"
15224         if test ! -f "\$cf_full_alias" ; then
15225                 echo ".. skipped \$cf_source"
15226                 continue
15227         fi
15228 CF_EOF
15229
15230 if test "$MANPAGE_ALIASES" != no ; then
15231 cat >>$cf_edit_man <<CF_EOF
15232         nCurses=ignore.3x
15233         cf_part_alias=\`echo \$cf_full_alias| sed -e 's,^.*/,,'\`
15234         test "$with_curses_h" = yes && nCurses=ncurses.3x
15235         aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$cf_full_alias" |sed -f "$cf_man_alias" | sort -u; test "\$cf_part_alias" = "\$nCurses" && echo curses\`
15236 CF_EOF
15237 fi
15238
15239 if test "$MANPAGE_RENAMES" = no ; then
15240 cat >>$cf_edit_man <<CF_EOF
15241         # perform program transformations for section 1 man pages
15242         if test \$section = 1 ; then
15243                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
15244         else
15245                 cf_target=\$cf_subdir\${section}/\$cf_source
15246         fi
15247 CF_EOF
15248 else
15249 cat >>$cf_edit_man <<CF_EOF
15250         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
15251         if test -z "\$cf_target" ; then
15252                 echo "? missing rename for \$cf_source"
15253                 cf_target="\$cf_source"
15254         fi
15255         cf_target="\$cf_subdir\${section}/\${cf_target}"
15256
15257 CF_EOF
15258 fi
15259
15260 cat >>$cf_edit_man <<CF_EOF
15261         sed     -f "$cf_man_alias" \\
15262 CF_EOF
15263
15264 if test "$MANPAGE_RENAMES" != no ; then
15265 cat >>$cf_edit_man <<CF_EOF
15266                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
15267 CF_EOF
15268 else
15269 cat >>$cf_edit_man <<CF_EOF
15270                 < "\$i" >\$TMP
15271 CF_EOF
15272 fi
15273
15274 cat >>$cf_edit_man <<CF_EOF
15275 if test \$cf_tables = yes ; then
15276         tbl \$TMP >\$TMP.out
15277         mv \$TMP.out \$TMP
15278 fi
15279 CF_EOF
15280
15281 if test "$with_overwrite" != yes ; then
15282 cat >>$cf_edit_man <<CF_EOF
15283         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
15284         mv \$TMP.out \$TMP
15285 CF_EOF
15286 fi
15287
15288 if test "$with_curses_h" != yes ; then
15289 cat >>$cf_edit_man <<CF_EOF
15290         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
15291         mv \$TMP.out \$TMP
15292 CF_EOF
15293 fi
15294
15295 cat >>$cf_edit_man <<CF_EOF
15296         if test "\$form" = format ; then
15297                 nroff -man \$TMP >\$TMP.out
15298                 mv \$TMP.out \$TMP
15299         fi
15300 CF_EOF
15301
15302 if test -n "$cf_manpage_compress" ; then
15303 cat >>$cf_edit_man <<CF_EOF
15304         if test "\$verb" = installing ; then
15305         if ( "$cf_manpage_compress" -f \$TMP )
15306         then
15307                 mv \$TMP.$cf_manpage_so_strip \$TMP
15308         fi
15309         fi
15310         cf_target="\$cf_target.$cf_manpage_so_strip"
15311 CF_EOF
15312 fi
15313
15314 case "$MANPAGE_FORMAT" in
15315 (*BSDI*)
15316 cat >>$cf_edit_man <<CF_EOF
15317         if test "\$form" = format ; then
15318                 # BSDI installs only .0 suffixes in the cat directories
15319                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
15320         fi
15321 CF_EOF
15322   ;;
15323 esac
15324
15325 cat >>$cf_edit_man <<CF_EOF
15326         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
15327         if test "\$verb" = installing ; then
15328                 echo "\$verb \$cf_target"
15329                 \$INSTALL_DATA \$TMP "\$cf_target"
15330                 test -d "\$cf_subdir\${section}" &&
15331                 test -n "\$aliases" && (
15332                         cd "\$cf_subdir\${section}" && (
15333                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
15334                                 test -n "$cf_manpage_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_manpage_so_strip\$%%'\`
15335                                 cf_target=\`basename "\$cf_target"\`
15336                                 for cf_alias in \$aliases
15337                                 do
15338                                         if test "\$section" = 1 ; then
15339                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15340                                         fi
15341
15342                                         if test "$MANPAGE_SYMLINKS" = yes ; then
15343                                                 if test -f "\$cf_alias\${suffix}" ; then
15344                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
15345                                                         then
15346                                                                 continue
15347                                                         fi
15348                                                 fi
15349                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15350 CF_EOF
15351 case "x$LN_S" in
15352 (*-f)
15353 cat >>$cf_edit_man <<CF_EOF
15354                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15355 CF_EOF
15356         ;;
15357 (*)
15358 cat >>$cf_edit_man <<CF_EOF
15359                                                 rm -f "\$cf_alias\${suffix}"
15360                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15361 CF_EOF
15362         ;;
15363 esac
15364 cat >>$cf_edit_man <<CF_EOF
15365                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
15366                                                 echo ".so \$cf_source" >\$TMP
15367 CF_EOF
15368 if test -n "$cf_manpage_compress" ; then
15369 cat >>$cf_edit_man <<CF_EOF
15370                                                 if test -n "$cf_manpage_so_strip" ; then
15371                                                         "$cf_manpage_compress" -f \$TMP
15372                                                         mv \$TMP.$cf_manpage_so_strip \$TMP
15373                                                 fi
15374 CF_EOF
15375 fi
15376 cat >>$cf_edit_man <<CF_EOF
15377                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15378                                                 rm -f "\$cf_alias\${suffix}"
15379                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
15380                                         fi
15381                                 done
15382                         )
15383                 )
15384         elif test "\$verb" = removing ; then
15385                 test -f "\$cf_target" && (
15386                         echo "\$verb \$cf_target"
15387                         rm -f "\$cf_target"
15388                 )
15389                 test -d "\$cf_subdir\${section}" &&
15390                 test -n "\$aliases" && (
15391                         cd "\$cf_subdir\${section}" && (
15392                                 for cf_alias in \$aliases
15393                                 do
15394                                         if test "\$section" = 1 ; then
15395                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15396                                         fi
15397
15398                                         echo ".. \$verb alias \$cf_alias\${suffix}"
15399                                         rm -f "\$cf_alias\${suffix}"
15400                                 done
15401                         )
15402                 )
15403         else
15404 #               echo ".hy 0"
15405                 cat \$TMP
15406         fi
15407         ;;
15408 esac
15409 done
15410
15411 if test "$cf_manpage_inboth" = yes ; then
15412 if test "\$form" != format ; then
15413         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15414 fi
15415 fi
15416
15417 exit 0
15418 CF_EOF
15419 chmod 755 "$cf_edit_man"
15420
15421 ###############################################################################
15422
15423 ### Note that some functions (such as const) are normally disabled anyway.
15424 echo "$as_me:15424: checking if you want to build with function extensions" >&5
15425 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15426
15427 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15428 if test "${enable_ext_funcs+set}" = set; then
15429   enableval="$enable_ext_funcs"
15430   with_ext_funcs=$enableval
15431 else
15432   with_ext_funcs=yes
15433 fi;
15434 echo "$as_me:15434: result: $with_ext_funcs" >&5
15435 echo "${ECHO_T}$with_ext_funcs" >&6
15436 if test "x$with_ext_funcs" = xyes ; then
15437         NCURSES_EXT_FUNCS=1
15438
15439 cat >>confdefs.h <<\EOF
15440 #define NCURSES_EXT_FUNCS 1
15441 EOF
15442
15443 cat >>confdefs.h <<\EOF
15444 #define HAVE_ASSUME_DEFAULT_COLORS 1
15445 EOF
15446
15447 cat >>confdefs.h <<\EOF
15448 #define HAVE_CURSES_VERSION 1
15449 EOF
15450
15451 cat >>confdefs.h <<\EOF
15452 #define HAVE_HAS_KEY 1
15453 EOF
15454
15455 cat >>confdefs.h <<\EOF
15456 #define HAVE_RESIZETERM 1
15457 EOF
15458
15459 cat >>confdefs.h <<\EOF
15460 #define HAVE_RESIZE_TERM 1
15461 EOF
15462
15463 cat >>confdefs.h <<\EOF
15464 #define HAVE_TERM_ENTRY_H 1
15465 EOF
15466
15467 cat >>confdefs.h <<\EOF
15468 #define HAVE_USE_DEFAULT_COLORS 1
15469 EOF
15470
15471 cat >>confdefs.h <<\EOF
15472 #define HAVE_USE_EXTENDED_NAMES 1
15473 EOF
15474
15475 cat >>confdefs.h <<\EOF
15476 #define HAVE_USE_SCREEN 1
15477 EOF
15478
15479 cat >>confdefs.h <<\EOF
15480 #define HAVE_USE_WINDOW 1
15481 EOF
15482
15483 cat >>confdefs.h <<\EOF
15484 #define HAVE_WRESIZE 1
15485 EOF
15486
15487         GENERATED_EXT_FUNCS=generated
15488         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
15489 else
15490         NCURSES_EXT_FUNCS=0
15491         GENERATED_EXT_FUNCS=
15492 fi
15493
15494 echo "$as_me:15494: checking if you want to build with SCREEN extensions" >&5
15495 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
15496
15497 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
15498 if test "${enable_sp_funcs+set}" = set; then
15499   enableval="$enable_sp_funcs"
15500   with_sp_funcs=$enableval
15501 else
15502   with_sp_funcs=$cf_dft_ext_spfuncs
15503 fi;
15504 echo "$as_me:15504: result: $with_sp_funcs" >&5
15505 echo "${ECHO_T}$with_sp_funcs" >&6
15506 if test "x$with_sp_funcs" = xyes ; then
15507         NCURSES_SP_FUNCS=1
15508
15509 cat >>confdefs.h <<\EOF
15510 #define NCURSES_SP_FUNCS 1
15511 EOF
15512
15513 cat >>confdefs.h <<\EOF
15514 #define HAVE_TPUTS_SP 1
15515 EOF
15516
15517         GENERATED_SP_FUNCS=generated
15518 else
15519         NCURSES_SP_FUNCS=0
15520         GENERATED_SP_FUNCS=
15521 fi
15522
15523 echo "$as_me:15523: checking if you want to build with terminal-driver" >&5
15524 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
15525
15526 # Check whether --enable-term-driver or --disable-term-driver was given.
15527 if test "${enable_term_driver+set}" = set; then
15528   enableval="$enable_term_driver"
15529   with_term_driver=$enableval
15530 else
15531   with_term_driver=no
15532 fi;
15533 echo "$as_me:15533: result: $with_term_driver" >&5
15534 echo "${ECHO_T}$with_term_driver" >&6
15535 if test "x$with_term_driver" = xyes ; then
15536
15537 cat >>confdefs.h <<\EOF
15538 #define USE_TERM_DRIVER 1
15539 EOF
15540
15541         if test "x$with_termlib" != xno ; then
15542                 { { echo "$as_me:15542: error: The term-driver option conflicts with the termlib option" >&5
15543 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15544    { (exit 1); exit 1; }; }
15545         fi
15546         if test "x$with_sp_funcs" != xyes ; then
15547                 { { echo "$as_me:15547: error: The term-driver option relies upon sp-funcs" >&5
15548 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15549    { (exit 1); exit 1; }; }
15550         fi
15551 fi
15552
15553 ###   use option --enable-const to turn on use of const beyond that in XSI.
15554 echo "$as_me:15554: checking for extended use of const keyword" >&5
15555 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15556
15557 # Check whether --enable-const or --disable-const was given.
15558 if test "${enable_const+set}" = set; then
15559   enableval="$enable_const"
15560   with_ext_const=$enableval
15561 else
15562   with_ext_const=$cf_dft_ext_const
15563 fi;
15564 echo "$as_me:15564: result: $with_ext_const" >&5
15565 echo "${ECHO_T}$with_ext_const" >&6
15566 NCURSES_CONST='/*nothing*/'
15567 if test "x$with_ext_const" = xyes ; then
15568         NCURSES_CONST=const
15569 fi
15570
15571 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
15572 echo "$as_me:15572: checking if you want to use extended colors" >&5
15573 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15574
15575 # Check whether --enable-ext-colors or --disable-ext-colors was given.
15576 if test "${enable_ext_colors+set}" = set; then
15577   enableval="$enable_ext_colors"
15578   with_ext_colors=$enableval
15579 else
15580   with_ext_colors=$cf_dft_ext_colors
15581 fi;
15582 echo "$as_me:15582: result: $with_ext_colors" >&5
15583 echo "${ECHO_T}$with_ext_colors" >&6
15584 NCURSES_EXT_COLORS=0
15585 if test "x$with_ext_colors" = xyes ; then
15586         if test "x$with_widec" != xyes ; then
15587                 { echo "$as_me:15587: WARNING: This option applies only to wide-character library" >&5
15588 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15589         else
15590                 # cannot be ABI 5 since it changes sizeof(cchar_t)
15591
15592 if test "${with_abi_version+set}" != set; then
15593         case "$cf_cv_rel_version" in
15594         (5.*)
15595                 cf_cv_rel_version=6.0
15596                 cf_cv_abi_version=6
15597                 cf_cv_abi_default=6
15598                 { echo "$as_me:15598: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15599 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
15600                 ;;
15601         esac
15602 fi
15603
15604                 NCURSES_EXT_COLORS=1
15605
15606 cat >>confdefs.h <<\EOF
15607 #define NCURSES_EXT_COLORS 1
15608 EOF
15609
15610 cat >>confdefs.h <<\EOF
15611 #define HAVE_ALLOC_PAIR 1
15612 EOF
15613
15614 cat >>confdefs.h <<\EOF
15615 #define HAVE_INIT_EXTENDED_COLOR 1
15616 EOF
15617
15618 cat >>confdefs.h <<\EOF
15619 #define HAVE_RESET_COLOR_PAIRS 1
15620 EOF
15621
15622         fi
15623 fi
15624
15625 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
15626 echo "$as_me:15626: checking if you want to use extended mouse encoding" >&5
15627 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15628
15629 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15630 if test "${enable_ext_mouse+set}" = set; then
15631   enableval="$enable_ext_mouse"
15632   with_ext_mouse=$enableval
15633 else
15634   with_ext_mouse=$cf_dft_ext_mouse
15635 fi;
15636 echo "$as_me:15636: result: $with_ext_mouse" >&5
15637 echo "${ECHO_T}$with_ext_mouse" >&6
15638 if test "x$with_ext_mouse" = xyes ; then
15639
15640 if test "${with_abi_version+set}" != set; then
15641         case "$cf_cv_rel_version" in
15642         (5.*)
15643                 cf_cv_rel_version=6.0
15644                 cf_cv_abi_version=6
15645                 cf_cv_abi_default=6
15646                 { echo "$as_me:15646: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15647 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
15648                 ;;
15649         esac
15650 fi
15651
15652 fi
15653
15654 case $cf_cv_abi_default in
15655 (5)
15656         NCURSES_MOUSE_VERSION=1
15657         ;;
15658 (6)
15659         NCURSES_MOUSE_VERSION=2
15660         ;;
15661 ([789])
15662         NCURSES_MOUSE_VERSION=3
15663         ;;
15664 esac
15665
15666 ###   use option --enable-ext-putwin to turn on extended screendumps
15667 echo "$as_me:15667: checking if you want to use extended putwin/screendump" >&5
15668 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15669
15670 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15671 if test "${enable_ext_putwin+set}" = set; then
15672   enableval="$enable_ext_putwin"
15673   with_ext_putwin=$enableval
15674 else
15675   with_ext_putwin=$cf_dft_ext_putwin
15676 fi;
15677 echo "$as_me:15677: result: $with_ext_putwin" >&5
15678 echo "${ECHO_T}$with_ext_putwin" >&6
15679 if test "x$with_ext_putwin" = xyes ; then
15680
15681 cat >>confdefs.h <<\EOF
15682 #define NCURSES_EXT_PUTWIN 1
15683 EOF
15684
15685 fi
15686
15687 echo "$as_me:15687: checking if you want \$NCURSES_NO_PADDING code" >&5
15688 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15689
15690 # Check whether --enable-no-padding or --disable-no-padding was given.
15691 if test "${enable_no_padding+set}" = set; then
15692   enableval="$enable_no_padding"
15693   with_no_padding=$enableval
15694 else
15695   with_no_padding=$with_ext_funcs
15696 fi;
15697 echo "$as_me:15697: result: $with_no_padding" >&5
15698 echo "${ECHO_T}$with_no_padding" >&6
15699 test "x$with_no_padding" = xyes &&
15700 cat >>confdefs.h <<\EOF
15701 #define NCURSES_NO_PADDING 1
15702 EOF
15703
15704 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15705 echo "$as_me:15705: checking if you want SIGWINCH handler" >&5
15706 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15707
15708 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15709 if test "${enable_sigwinch+set}" = set; then
15710   enableval="$enable_sigwinch"
15711   with_sigwinch=$enableval
15712 else
15713   with_sigwinch=$with_ext_funcs
15714 fi;
15715 echo "$as_me:15715: result: $with_sigwinch" >&5
15716 echo "${ECHO_T}$with_sigwinch" >&6
15717 test "x$with_sigwinch" = xyes &&
15718 cat >>confdefs.h <<\EOF
15719 #define USE_SIGWINCH 1
15720 EOF
15721
15722 ###   use option --enable-tcap-names to allow user to define new capabilities
15723 echo "$as_me:15723: checking if you want user-definable terminal capabilities like termcap" >&5
15724 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15725
15726 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15727 if test "${enable_tcap_names+set}" = set; then
15728   enableval="$enable_tcap_names"
15729   with_tcap_names=$enableval
15730 else
15731   with_tcap_names=$with_ext_funcs
15732 fi;
15733 echo "$as_me:15733: result: $with_tcap_names" >&5
15734 echo "${ECHO_T}$with_tcap_names" >&6
15735 NCURSES_XNAMES=0
15736 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
15737
15738 ##############################################################################
15739
15740 echo "$as_me:15740: checking if you want to link with the pthread library" >&5
15741 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15742
15743 # Check whether --with-pthread or --without-pthread was given.
15744 if test "${with_pthread+set}" = set; then
15745   withval="$with_pthread"
15746   with_pthread=$withval
15747 else
15748   with_pthread=no
15749 fi;
15750 echo "$as_me:15750: result: $with_pthread" >&5
15751 echo "${ECHO_T}$with_pthread" >&6
15752
15753 if test "$with_pthread" != no ; then
15754         echo "$as_me:15754: checking for pthread.h" >&5
15755 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15756 if test "${ac_cv_header_pthread_h+set}" = set; then
15757   echo $ECHO_N "(cached) $ECHO_C" >&6
15758 else
15759   cat >"conftest.$ac_ext" <<_ACEOF
15760 #line 15760 "configure"
15761 #include "confdefs.h"
15762 #include <pthread.h>
15763 _ACEOF
15764 if { (eval echo "$as_me:15764: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15765   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15766   ac_status=$?
15767   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15768   rm -f conftest.er1
15769   cat conftest.err >&5
15770   echo "$as_me:15770: \$? = $ac_status" >&5
15771   (exit "$ac_status"); } >/dev/null; then
15772   if test -s conftest.err; then
15773     ac_cpp_err=$ac_c_preproc_warn_flag
15774   else
15775     ac_cpp_err=
15776   fi
15777 else
15778   ac_cpp_err=yes
15779 fi
15780 if test -z "$ac_cpp_err"; then
15781   ac_cv_header_pthread_h=yes
15782 else
15783   echo "$as_me: failed program was:" >&5
15784   cat "conftest.$ac_ext" >&5
15785   ac_cv_header_pthread_h=no
15786 fi
15787 rm -f conftest.err "conftest.$ac_ext"
15788 fi
15789 echo "$as_me:15789: result: $ac_cv_header_pthread_h" >&5
15790 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15791 if test "$ac_cv_header_pthread_h" = yes; then
15792
15793 cat >>confdefs.h <<\EOF
15794 #define HAVE_PTHREADS_H 1
15795 EOF
15796
15797         for cf_lib_pthread in pthread c_r
15798         do
15799             echo "$as_me:15799: checking if we can link with the $cf_lib_pthread library" >&5
15800 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15801             cf_save_LIBS="$LIBS"
15802
15803 cf_add_libs="$LIBS"
15804 # reverse order
15805 cf_add_0lib=
15806 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15807 # filter duplicates
15808 for cf_add_1lib in $cf_add_0lib; do
15809         for cf_add_2lib in $cf_add_libs; do
15810                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15811                         cf_add_1lib=
15812                         break
15813                 fi
15814         done
15815         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15816 done
15817 LIBS="$cf_add_libs"
15818
15819             cat >"conftest.$ac_ext" <<_ACEOF
15820 #line 15820 "configure"
15821 #include "confdefs.h"
15822
15823 #include <pthread.h>
15824
15825 int
15826 main (void)
15827 {
15828
15829                 int rc = pthread_create(0,0,0,0);
15830                 int r2 = pthread_mutexattr_settype(0, 0);
15831
15832   ;
15833   return 0;
15834 }
15835 _ACEOF
15836 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15837 if { (eval echo "$as_me:15837: \"$ac_link\"") >&5
15838   (eval $ac_link) 2>&5
15839   ac_status=$?
15840   echo "$as_me:15840: \$? = $ac_status" >&5
15841   (exit "$ac_status"); } &&
15842          { ac_try='test -s "conftest$ac_exeext"'
15843   { (eval echo "$as_me:15843: \"$ac_try\"") >&5
15844   (eval $ac_try) 2>&5
15845   ac_status=$?
15846   echo "$as_me:15846: \$? = $ac_status" >&5
15847   (exit "$ac_status"); }; }; then
15848   with_pthread=yes
15849 else
15850   echo "$as_me: failed program was:" >&5
15851 cat "conftest.$ac_ext" >&5
15852 with_pthread=no
15853 fi
15854 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15855             LIBS="$cf_save_LIBS"
15856             echo "$as_me:15856: result: $with_pthread" >&5
15857 echo "${ECHO_T}$with_pthread" >&6
15858             test "$with_pthread" = yes && break
15859         done
15860
15861         if test "$with_pthread" = yes ; then
15862
15863 cf_add_libs="$LIBS"
15864 # reverse order
15865 cf_add_0lib=
15866 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15867 # filter duplicates
15868 for cf_add_1lib in $cf_add_0lib; do
15869         for cf_add_2lib in $cf_add_libs; do
15870                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15871                         cf_add_1lib=
15872                         break
15873                 fi
15874         done
15875         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15876 done
15877 LIBS="$cf_add_libs"
15878
15879 cat >>confdefs.h <<\EOF
15880 #define HAVE_LIBPTHREADS 1
15881 EOF
15882
15883         else
15884             { { echo "$as_me:15884: error: Cannot link with pthread library" >&5
15885 echo "$as_me: error: Cannot link with pthread library" >&2;}
15886    { (exit 1); exit 1; }; }
15887         fi
15888
15889 fi
15890
15891 fi
15892
15893 if test "x$with_pthread" != xno; then
15894         echo "$as_me:15894: checking for pthread_kill" >&5
15895 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15896 if test "${ac_cv_func_pthread_kill+set}" = set; then
15897   echo $ECHO_N "(cached) $ECHO_C" >&6
15898 else
15899   cat >"conftest.$ac_ext" <<_ACEOF
15900 #line 15900 "configure"
15901 #include "confdefs.h"
15902 #define pthread_kill autoconf_temporary
15903 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15904 #undef pthread_kill
15905
15906 #ifdef __cplusplus
15907 extern "C"
15908 #endif
15909
15910 /* We use char because int might match the return type of a gcc2
15911    builtin and then its argument prototype would still apply.  */
15912 char pthread_kill (void);
15913
15914 int
15915 main (void)
15916 {
15917
15918 /* The GNU C library defines stubs for functions which it implements
15919     to always fail with ENOSYS.  Some functions are actually named
15920     something starting with __ and the normal name is an alias.  */
15921 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15922 #error found stub for pthread_kill
15923 #endif
15924
15925         return pthread_kill ();
15926   ;
15927   return 0;
15928 }
15929 _ACEOF
15930 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15931 if { (eval echo "$as_me:15931: \"$ac_link\"") >&5
15932   (eval $ac_link) 2>&5
15933   ac_status=$?
15934   echo "$as_me:15934: \$? = $ac_status" >&5
15935   (exit "$ac_status"); } &&
15936          { ac_try='test -s "conftest$ac_exeext"'
15937   { (eval echo "$as_me:15937: \"$ac_try\"") >&5
15938   (eval $ac_try) 2>&5
15939   ac_status=$?
15940   echo "$as_me:15940: \$? = $ac_status" >&5
15941   (exit "$ac_status"); }; }; then
15942   ac_cv_func_pthread_kill=yes
15943 else
15944   echo "$as_me: failed program was:" >&5
15945 cat "conftest.$ac_ext" >&5
15946 ac_cv_func_pthread_kill=no
15947 fi
15948 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15949 fi
15950 echo "$as_me:15950: result: $ac_cv_func_pthread_kill" >&5
15951 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15952 if test "$ac_cv_func_pthread_kill" = yes; then
15953
15954                 echo "$as_me:15954: checking if you want to allow EINTR in wgetch with pthreads" >&5
15955 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15956
15957 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15958 if test "${enable_pthreads_eintr+set}" = set; then
15959   enableval="$enable_pthreads_eintr"
15960   use_pthreads_eintr=$enableval
15961 else
15962   use_pthreads_eintr=no
15963 fi;
15964                 echo "$as_me:15964: result: $use_pthreads_eintr" >&5
15965 echo "${ECHO_T}$use_pthreads_eintr" >&6
15966                 if test "x$use_pthreads_eintr" = xyes ; then
15967
15968 cat >>confdefs.h <<\EOF
15969 #define USE_PTHREADS_EINTR 1
15970 EOF
15971
15972                 fi
15973 fi
15974
15975         echo "$as_me:15975: checking if you want to use weak-symbols for pthreads" >&5
15976 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15977
15978 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15979 if test "${enable_weak_symbols+set}" = set; then
15980   enableval="$enable_weak_symbols"
15981   use_weak_symbols=$enableval
15982 else
15983   use_weak_symbols=no
15984 fi;
15985         echo "$as_me:15985: result: $use_weak_symbols" >&5
15986 echo "${ECHO_T}$use_weak_symbols" >&6
15987         if test "x$use_weak_symbols" = xyes ; then
15988
15989 echo "$as_me:15989: checking if $CC supports weak symbols" >&5
15990 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15991 if test "${cf_cv_weak_symbols+set}" = set; then
15992   echo $ECHO_N "(cached) $ECHO_C" >&6
15993 else
15994
15995 cat >"conftest.$ac_ext" <<_ACEOF
15996 #line 15996 "configure"
15997 #include "confdefs.h"
15998
15999 #include <stdio.h>
16000 int
16001 main (void)
16002 {
16003
16004 #if defined(__GNUC__)
16005 #  if defined __USE_ISOC99
16006 #    define _cat_pragma(exp)    _Pragma(#exp)
16007 #    define _weak_pragma(exp)   _cat_pragma(weak name)
16008 #  else
16009 #    define _weak_pragma(exp)
16010 #  endif
16011 #  define _declare(name)        __extension__ extern __typeof__(name) name
16012 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
16013 #endif
16014
16015 weak_symbol(fopen);
16016
16017   ;
16018   return 0;
16019 }
16020 _ACEOF
16021 rm -f "conftest.$ac_objext"
16022 if { (eval echo "$as_me:16022: \"$ac_compile\"") >&5
16023   (eval $ac_compile) 2>&5
16024   ac_status=$?
16025   echo "$as_me:16025: \$? = $ac_status" >&5
16026   (exit "$ac_status"); } &&
16027          { ac_try='test -s "conftest.$ac_objext"'
16028   { (eval echo "$as_me:16028: \"$ac_try\"") >&5
16029   (eval $ac_try) 2>&5
16030   ac_status=$?
16031   echo "$as_me:16031: \$? = $ac_status" >&5
16032   (exit "$ac_status"); }; }; then
16033   cf_cv_weak_symbols=yes
16034 else
16035   echo "$as_me: failed program was:" >&5
16036 cat "conftest.$ac_ext" >&5
16037 cf_cv_weak_symbols=no
16038 fi
16039 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16040
16041 fi
16042 echo "$as_me:16042: result: $cf_cv_weak_symbols" >&5
16043 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
16044
16045         else
16046                 cf_cv_weak_symbols=no
16047         fi
16048
16049         if test "x$cf_cv_weak_symbols" = xyes ; then
16050
16051 cat >>confdefs.h <<\EOF
16052 #define USE_WEAK_SYMBOLS 1
16053 EOF
16054
16055         fi
16056 fi
16057
16058 PTHREAD=
16059 if test "x$with_pthread" = "xyes" ; then
16060
16061 cat >>confdefs.h <<\EOF
16062 #define USE_PTHREADS 1
16063 EOF
16064
16065         enable_reentrant=yes
16066         if test "x$cf_cv_weak_symbols" = xyes ; then
16067                 PTHREAD=-lpthread
16068
16069 cf_add_libs="$PRIVATE_LIBS"
16070 # reverse order
16071 cf_add_0lib=
16072 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16073 # filter duplicates
16074 for cf_add_1lib in $cf_add_0lib; do
16075         for cf_add_2lib in $cf_add_libs; do
16076                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16077                         cf_add_1lib=
16078                         break
16079                 fi
16080         done
16081         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16082 done
16083 PRIVATE_LIBS="$cf_add_libs"
16084
16085         fi
16086 fi
16087
16088 # Reentrant code has to be opaque; there's little advantage to making ncurses
16089 # opaque outside of that, so there is no --enable-opaque option.  We can use
16090 # this option without --with-pthreads, but this will be always set for
16091 # pthreads.
16092 echo "$as_me:16092: checking if you want reentrant code" >&5
16093 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
16094
16095 # Check whether --enable-reentrant or --disable-reentrant was given.
16096 if test "${enable_reentrant+set}" = set; then
16097   enableval="$enable_reentrant"
16098   with_reentrant=$enableval
16099 else
16100   with_reentrant=no
16101 fi;
16102 echo "$as_me:16102: result: $with_reentrant" >&5
16103 echo "${ECHO_T}$with_reentrant" >&6
16104 if test "x$with_reentrant" = xyes ; then
16105         cf_cv_enable_reentrant=1
16106         cf_cv_enable_opaque="NCURSES_INTERNALS"
16107         NCURSES_SIZE_T=int
16108         if test "x$cf_cv_weak_symbols" = xyes ; then
16109
16110 # remove pthread library from $LIBS
16111 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
16112
16113 cf_add_libs="$TEST_LIBS"
16114 # reverse order
16115 cf_add_0lib=
16116 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16117 # filter duplicates
16118 for cf_add_1lib in $cf_add_0lib; do
16119         for cf_add_2lib in $cf_add_libs; do
16120                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16121                         cf_add_1lib=
16122                         break
16123                 fi
16124         done
16125         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16126 done
16127 TEST_LIBS="$cf_add_libs"
16128
16129 cf_add_libs="$TEST_LIBS2"
16130 # reverse order
16131 cf_add_0lib=
16132 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16133 # filter duplicates
16134 for cf_add_1lib in $cf_add_0lib; do
16135         for cf_add_2lib in $cf_add_libs; do
16136                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16137                         cf_add_1lib=
16138                         break
16139                 fi
16140         done
16141         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16142 done
16143 TEST_LIBS2="$cf_add_libs"
16144
16145 cf_add_libs="$PRIVATE_LIBS"
16146 # reverse order
16147 cf_add_0lib=
16148 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16149 # filter duplicates
16150 for cf_add_1lib in $cf_add_0lib; do
16151         for cf_add_2lib in $cf_add_libs; do
16152                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16153                         cf_add_1lib=
16154                         break
16155                 fi
16156         done
16157         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16158 done
16159 PRIVATE_LIBS="$cf_add_libs"
16160
16161         else
16162                 # when not using weak symbols but with_reentrant,
16163                 # add 't' to the library suffix on all platforms
16164                 # except cygwin, where we only do that if ALSO
16165                 # compiling with full thread support.
16166                 case "$host" in
16167                 (*cygwin* | *msys*)
16168                         if test "$with_pthread" = "yes" ; then
16169                                 if test "x$disable_lib_suffixes" = "xno" ; then
16170                                         LIB_SUFFIX="t${LIB_SUFFIX}"
16171                                 fi
16172                         fi ;;
16173                 (*)
16174                         if test "x$disable_lib_suffixes" = "xno" ; then
16175                                 LIB_SUFFIX="t${LIB_SUFFIX}"
16176                         fi
16177                         ;;
16178                 esac
16179         fi
16180
16181 cat >>confdefs.h <<\EOF
16182 #define USE_REENTRANT 1
16183 EOF
16184
16185 if test "${with_abi_version+set}" != set; then
16186         case "$cf_cv_rel_version" in
16187         (5.*)
16188                 cf_cv_rel_version=6.0
16189                 cf_cv_abi_version=6
16190                 cf_cv_abi_default=6
16191                 { echo "$as_me:16191: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
16192 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
16193                 ;;
16194         esac
16195 fi
16196
16197 else
16198         cf_cv_enable_reentrant=0
16199         cf_cv_enable_opaque="NCURSES_OPAQUE"
16200         NCURSES_SIZE_T=$cf_dft_ordinate_type
16201 fi
16202
16203 echo "$as_me:16203: checking if you want opaque curses-library structures" >&5
16204 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
16205
16206 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
16207 if test "${enable_opaque_curses+set}" = set; then
16208   enableval="$enable_opaque_curses"
16209   test "$enableval" != yes && enableval=no
16210         if test "$enableval" != "no" ; then
16211     enable_opaque_curses=yes
16212         else
16213
16214          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16215          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16216
16217         fi
16218 else
16219   enableval=no
16220
16221          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16222          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16223
16224 fi;
16225 echo "$as_me:16225: result: $enable_opaque_curses" >&5
16226 echo "${ECHO_T}$enable_opaque_curses" >&6
16227
16228 test "$cf_cv_enable_reentrant" = 1 && \
16229 test "$enable_opaque_curses" = no && \
16230 { { echo "$as_me:16230: error: reentrant configuration requires opaque library" >&5
16231 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
16232    { (exit 1); exit 1; }; }
16233
16234 echo "$as_me:16234: checking if you want opaque form-library structures" >&5
16235 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
16236
16237 # Check whether --enable-opaque-form or --disable-opaque-form was given.
16238 if test "${enable_opaque_form+set}" = set; then
16239   enableval="$enable_opaque_form"
16240   enable_opaque_form=yes
16241 else
16242   enable_opaque_form=no
16243 fi;
16244 echo "$as_me:16244: result: $enable_opaque_form" >&5
16245 echo "${ECHO_T}$enable_opaque_form" >&6
16246
16247 echo "$as_me:16247: checking if you want opaque menu-library structures" >&5
16248 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
16249
16250 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
16251 if test "${enable_opaque_menu+set}" = set; then
16252   enableval="$enable_opaque_menu"
16253   enable_opaque_menu=yes
16254 else
16255   enable_opaque_menu=no
16256 fi;
16257 echo "$as_me:16257: result: $enable_opaque_menu" >&5
16258 echo "${ECHO_T}$enable_opaque_menu" >&6
16259
16260 echo "$as_me:16260: checking if you want opaque panel-library structures" >&5
16261 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
16262
16263 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
16264 if test "${enable_opaque_panel+set}" = set; then
16265   enableval="$enable_opaque_panel"
16266   enable_opaque_panel=yes
16267 else
16268   enable_opaque_panel=no
16269 fi;
16270 echo "$as_me:16270: result: $enable_opaque_panel" >&5
16271 echo "${ECHO_T}$enable_opaque_panel" >&6
16272
16273 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
16274 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
16275 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
16276 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
16277
16278 ### Allow using a different wrap-prefix
16279 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
16280         echo "$as_me:16280: checking for prefix used to wrap public variables" >&5
16281 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
16282
16283 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
16284 if test "${with_wrap_prefix+set}" = set; then
16285   withval="$with_wrap_prefix"
16286   NCURSES_WRAP_PREFIX=$withval
16287 else
16288   NCURSES_WRAP_PREFIX=_nc_
16289 fi;
16290         echo "$as_me:16290: result: $NCURSES_WRAP_PREFIX" >&5
16291 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
16292 else
16293         NCURSES_WRAP_PREFIX=_nc_
16294 fi
16295
16296 cat >>confdefs.h <<EOF
16297 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
16298 EOF
16299
16300 ###############################################################################
16301 # These options are relatively safe to experiment with.
16302
16303 echo "$as_me:16303: checking if you want all development code" >&5
16304 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
16305
16306 # Check whether --with-develop or --without-develop was given.
16307 if test "${with_develop+set}" = set; then
16308   withval="$with_develop"
16309   with_develop=$withval
16310 else
16311   with_develop=no
16312 fi;
16313 echo "$as_me:16313: result: $with_develop" >&5
16314 echo "${ECHO_T}$with_develop" >&6
16315
16316 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
16317 echo "$as_me:16317: checking if you want hard-tabs code" >&5
16318 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
16319
16320 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
16321 if test "${enable_hard_tabs+set}" = set; then
16322   enableval="$enable_hard_tabs"
16323
16324 else
16325   enable_hard_tabs=$with_develop
16326 fi;
16327 echo "$as_me:16327: result: $enable_hard_tabs" >&5
16328 echo "${ECHO_T}$enable_hard_tabs" >&6
16329 test "x$enable_hard_tabs" = xyes &&
16330 cat >>confdefs.h <<\EOF
16331 #define USE_HARD_TABS 1
16332 EOF
16333
16334 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
16335 echo "$as_me:16335: checking if you want limited support for xmc" >&5
16336 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
16337
16338 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
16339 if test "${enable_xmc_glitch+set}" = set; then
16340   enableval="$enable_xmc_glitch"
16341
16342 else
16343   enable_xmc_glitch=$with_develop
16344 fi;
16345 echo "$as_me:16345: result: $enable_xmc_glitch" >&5
16346 echo "${ECHO_T}$enable_xmc_glitch" >&6
16347 test "x$enable_xmc_glitch" = xyes &&
16348 cat >>confdefs.h <<\EOF
16349 #define USE_XMC_SUPPORT 1
16350 EOF
16351
16352 ###############################################################################
16353 # These are just experimental, probably should not be in a package:
16354
16355 echo "$as_me:16355: checking if you do not want to assume colors are white-on-black" >&5
16356 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
16357
16358 # Check whether --enable-assumed-color or --disable-assumed-color was given.
16359 if test "${enable_assumed_color+set}" = set; then
16360   enableval="$enable_assumed_color"
16361   with_assumed_color=$enableval
16362 else
16363   with_assumed_color=yes
16364 fi;
16365 echo "$as_me:16365: result: $with_assumed_color" >&5
16366 echo "${ECHO_T}$with_assumed_color" >&6
16367 test "x$with_assumed_color" = xyes &&
16368 cat >>confdefs.h <<\EOF
16369 #define USE_ASSUMED_COLOR 1
16370 EOF
16371
16372 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
16373 echo "$as_me:16373: checking if you want hashmap scrolling-optimization code" >&5
16374 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
16375
16376 # Check whether --enable-hashmap or --disable-hashmap was given.
16377 if test "${enable_hashmap+set}" = set; then
16378   enableval="$enable_hashmap"
16379   with_hashmap=$enableval
16380 else
16381   with_hashmap=yes
16382 fi;
16383 echo "$as_me:16383: result: $with_hashmap" >&5
16384 echo "${ECHO_T}$with_hashmap" >&6
16385 test "x$with_hashmap" = xyes &&
16386 cat >>confdefs.h <<\EOF
16387 #define USE_HASHMAP 1
16388 EOF
16389
16390 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
16391 echo "$as_me:16391: checking if you want colorfgbg code" >&5
16392 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
16393
16394 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
16395 if test "${enable_colorfgbg+set}" = set; then
16396   enableval="$enable_colorfgbg"
16397   with_colorfgbg=$enableval
16398 else
16399   with_colorfgbg=no
16400 fi;
16401 echo "$as_me:16401: result: $with_colorfgbg" >&5
16402 echo "${ECHO_T}$with_colorfgbg" >&6
16403 test "x$with_colorfgbg" = xyes &&
16404 cat >>confdefs.h <<\EOF
16405 #define USE_COLORFGBG 1
16406 EOF
16407
16408 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
16409 echo "$as_me:16409: checking if you want to use gcc -fvisibility option" >&5
16410 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
16411
16412 # Check whether --enable-fvisibility or --disable-fvisibility was given.
16413 if test "${enable_fvisibility+set}" = set; then
16414   enableval="$enable_fvisibility"
16415   cf_with_fvisibility=$enableval
16416 else
16417   cf_with_fvisibility=no
16418 fi;
16419 echo "$as_me:16419: result: $cf_with_fvisibility" >&5
16420 echo "${ECHO_T}$cf_with_fvisibility" >&6
16421
16422 NCURSES_IMPEXP=
16423 NCURSES_CXX_IMPEXP=
16424 if test "x$cf_with_fvisibility" = xyes; then
16425
16426 echo "$as_me:16426: checking if $CC -fvisibility=hidden option works" >&5
16427 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
16428 if test "${cf_cv_fvisibility_hidden+set}" = set; then
16429   echo $ECHO_N "(cached) $ECHO_C" >&6
16430 else
16431
16432     cf_save_cflags="$CFLAGS"
16433     CFLAGS="$CFLAGS -fvisibility=hidden"
16434     cat >"conftest.$ac_ext" <<_ACEOF
16435 #line 16435 "configure"
16436 #include "confdefs.h"
16437
16438 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16439
16440 int
16441 main (void)
16442 {
16443
16444         if (somefunc()) return 1;
16445
16446   ;
16447   return 0;
16448 }
16449 _ACEOF
16450 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16451 if { (eval echo "$as_me:16451: \"$ac_link\"") >&5
16452   (eval $ac_link) 2>&5
16453   ac_status=$?
16454   echo "$as_me:16454: \$? = $ac_status" >&5
16455   (exit "$ac_status"); } &&
16456          { ac_try='test -s "conftest$ac_exeext"'
16457   { (eval echo "$as_me:16457: \"$ac_try\"") >&5
16458   (eval $ac_try) 2>&5
16459   ac_status=$?
16460   echo "$as_me:16460: \$? = $ac_status" >&5
16461   (exit "$ac_status"); }; }; then
16462   cf_cv_fvisibility_hidden=yes
16463 else
16464   echo "$as_me: failed program was:" >&5
16465 cat "conftest.$ac_ext" >&5
16466 cf_cv_fvisibility_hidden=no
16467 fi
16468 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16469     CFLAGS=$cf_save_cflags
16470
16471 fi
16472 echo "$as_me:16472: result: $cf_cv_fvisibility_hidden" >&5
16473 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
16474
16475         if test "x$cf_cv_fvisibility_hidden" = xyes
16476         then
16477
16478 cf_fix_cppflags=no
16479 cf_new_cflags=
16480 cf_new_cppflags=
16481 cf_new_extra_cppflags=
16482
16483 for cf_add_cflags in -fvisibility=hidden
16484 do
16485 case "$cf_fix_cppflags" in
16486 (no)
16487         case "$cf_add_cflags" in
16488         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16489                 case "$cf_add_cflags" in
16490                 (-D*)
16491                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16492
16493                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16494                                 && test -z "${cf_tst_cflags}" \
16495                                 && cf_fix_cppflags=yes
16496
16497                         if test "$cf_fix_cppflags" = yes ; then
16498
16499         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16500         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16501
16502                                 continue
16503                         elif test "${cf_tst_cflags}" = "\"'" ; then
16504
16505         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16506         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16507
16508                                 continue
16509                         fi
16510                         ;;
16511                 esac
16512                 case "$CPPFLAGS" in
16513                 (*$cf_add_cflags)
16514                         ;;
16515                 (*)
16516                         case "$cf_add_cflags" in
16517                         (-D*)
16518                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16519
16520 CPPFLAGS=`echo "$CPPFLAGS" | \
16521         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16522                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16523
16524                                 ;;
16525                         esac
16526
16527         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16528         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16529
16530                         ;;
16531                 esac
16532                 ;;
16533         (*)
16534
16535         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16536         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16537
16538                 ;;
16539         esac
16540         ;;
16541 (yes)
16542
16543         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16544         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16545
16546         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16547
16548         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16549                 && test -z "${cf_tst_cflags}" \
16550                 && cf_fix_cppflags=no
16551         ;;
16552 esac
16553 done
16554
16555 if test -n "$cf_new_cflags" ; then
16556
16557         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16558         CFLAGS="${CFLAGS}$cf_new_cflags"
16559
16560 fi
16561
16562 if test -n "$cf_new_cppflags" ; then
16563
16564         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16565         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16566
16567 fi
16568
16569 if test -n "$cf_new_extra_cppflags" ; then
16570
16571         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16572         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16573
16574 fi
16575
16576                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16577         fi
16578         if test -n "$CXX"
16579         then
16580                 ac_ext=cc
16581 ac_cpp='$CXXCPP $CPPFLAGS'
16582 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16583 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16584 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16585 ac_main_return="return"
16586
16587 echo "$as_me:16587: checking if $CXX -fvisibility=hidden option works" >&5
16588 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16589 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16590   echo $ECHO_N "(cached) $ECHO_C" >&6
16591 else
16592
16593     cf_save_cflags="$CXXFLAGS"
16594     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16595     cat >"conftest.$ac_ext" <<_ACEOF
16596 #line 16596 "configure"
16597 #include "confdefs.h"
16598
16599 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16600
16601 int
16602 main (void)
16603 {
16604
16605         if (somefunc()) return 1;
16606
16607   ;
16608   return 0;
16609 }
16610 _ACEOF
16611 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16612 if { (eval echo "$as_me:16612: \"$ac_link\"") >&5
16613   (eval $ac_link) 2>&5
16614   ac_status=$?
16615   echo "$as_me:16615: \$? = $ac_status" >&5
16616   (exit "$ac_status"); } &&
16617          { ac_try='test -s "conftest$ac_exeext"'
16618   { (eval echo "$as_me:16618: \"$ac_try\"") >&5
16619   (eval $ac_try) 2>&5
16620   ac_status=$?
16621   echo "$as_me:16621: \$? = $ac_status" >&5
16622   (exit "$ac_status"); }; }; then
16623   cf_cv_fvisibility_hidden2=yes
16624 else
16625   echo "$as_me: failed program was:" >&5
16626 cat "conftest.$ac_ext" >&5
16627 cf_cv_fvisibility_hidden2=no
16628 fi
16629 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16630     CXXFLAGS=$cf_save_cflags
16631
16632 fi
16633 echo "$as_me:16633: result: $cf_cv_fvisibility_hidden2" >&5
16634 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16635
16636                 if test "x$cf_cv_fvisibility_hidden2" = xyes
16637                 then
16638
16639 cf_save_CXXFLAGS="$CFLAGS"
16640 CFLAGS="$CXXFLAGS"
16641
16642 cf_fix_cppflags=no
16643 cf_new_cflags=
16644 cf_new_cppflags=
16645 cf_new_extra_cppflags=
16646
16647 for cf_add_cflags in -fvisibility=hidden
16648 do
16649 case "$cf_fix_cppflags" in
16650 (no)
16651         case "$cf_add_cflags" in
16652         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16653                 case "$cf_add_cflags" in
16654                 (-D*)
16655                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16656
16657                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16658                                 && test -z "${cf_tst_cflags}" \
16659                                 && cf_fix_cppflags=yes
16660
16661                         if test "$cf_fix_cppflags" = yes ; then
16662
16663         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16664         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16665
16666                                 continue
16667                         elif test "${cf_tst_cflags}" = "\"'" ; then
16668
16669         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16670         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16671
16672                                 continue
16673                         fi
16674                         ;;
16675                 esac
16676                 case "$CPPFLAGS" in
16677                 (*$cf_add_cflags)
16678                         ;;
16679                 (*)
16680                         case "$cf_add_cflags" in
16681                         (-D*)
16682                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16683
16684 CPPFLAGS=`echo "$CPPFLAGS" | \
16685         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16686                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16687
16688                                 ;;
16689                         esac
16690
16691         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16692         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16693
16694                         ;;
16695                 esac
16696                 ;;
16697         (*)
16698
16699         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16700         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16701
16702                 ;;
16703         esac
16704         ;;
16705 (yes)
16706
16707         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16708         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16709
16710         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16711
16712         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16713                 && test -z "${cf_tst_cflags}" \
16714                 && cf_fix_cppflags=no
16715         ;;
16716 esac
16717 done
16718
16719 if test -n "$cf_new_cflags" ; then
16720
16721         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16722         CFLAGS="${CFLAGS}$cf_new_cflags"
16723
16724 fi
16725
16726 if test -n "$cf_new_cppflags" ; then
16727
16728         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16729         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16730
16731 fi
16732
16733 if test -n "$cf_new_extra_cppflags" ; then
16734
16735         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16736         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16737
16738 fi
16739
16740 CXXFLAGS="$CFLAGS"
16741 CFLAGS="$cf_save_CXXFLAGS"
16742
16743                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16744                 fi
16745                 ac_ext=c
16746 ac_cpp='$CPP $CPPFLAGS'
16747 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16748 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16749 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16750 ac_main_return="return"
16751
16752         fi
16753 fi
16754
16755 ###   use option --enable-interop to turn on use of bindings used for interop
16756 echo "$as_me:16756: checking if you want interop bindings" >&5
16757 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16758
16759 # Check whether --enable-interop or --disable-interop was given.
16760 if test "${enable_interop+set}" = set; then
16761   enableval="$enable_interop"
16762   with_exp_interop=$enableval
16763 else
16764   with_exp_interop=$cf_dft_interop
16765 fi;
16766 echo "$as_me:16766: result: $with_exp_interop" >&5
16767 echo "${ECHO_T}$with_exp_interop" >&6
16768
16769 NCURSES_INTEROP_FUNCS=0
16770 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16771
16772 echo "$as_me:16772: checking if you want experimental safe-sprintf code" >&5
16773 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16774
16775 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16776 if test "${enable_safe_sprintf+set}" = set; then
16777   enableval="$enable_safe_sprintf"
16778   with_safe_sprintf=$enableval
16779 else
16780   with_safe_sprintf=no
16781 fi;
16782 echo "$as_me:16782: result: $with_safe_sprintf" >&5
16783 echo "${ECHO_T}$with_safe_sprintf" >&6
16784
16785 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16786 # when hashmap is used scroll hints are useless
16787 if test "$with_hashmap" = no ; then
16788 echo "$as_me:16788: checking if you want to experiment without scrolling-hints code" >&5
16789 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16790
16791 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16792 if test "${enable_scroll_hints+set}" = set; then
16793   enableval="$enable_scroll_hints"
16794   with_scroll_hints=$enableval
16795 else
16796   with_scroll_hints=yes
16797 fi;
16798 echo "$as_me:16798: result: $with_scroll_hints" >&5
16799 echo "${ECHO_T}$with_scroll_hints" >&6
16800 test "x$with_scroll_hints" = xyes &&
16801 cat >>confdefs.h <<\EOF
16802 #define USE_SCROLL_HINTS 1
16803 EOF
16804
16805 fi
16806
16807 echo "$as_me:16807: checking if you want wgetch-events code" >&5
16808 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16809
16810 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16811 if test "${enable_wgetch_events+set}" = set; then
16812   enableval="$enable_wgetch_events"
16813   with_wgetch_events=$enableval
16814 else
16815   with_wgetch_events=no
16816 fi;
16817 echo "$as_me:16817: result: $with_wgetch_events" >&5
16818 echo "${ECHO_T}$with_wgetch_events" >&6
16819 if test "x$with_wgetch_events" = xyes ; then
16820
16821 cat >>confdefs.h <<\EOF
16822 #define NCURSES_WGETCH_EVENTS 1
16823 EOF
16824
16825         NCURSES_WGETCH_EVENTS=1
16826 else
16827         NCURSES_WGETCH_EVENTS=0
16828 fi
16829
16830 case "$cf_cv_system_name" in
16831 (*mingw32*|*mingw64*|*-msvc*)
16832         echo "$as_me:16832: checking if you want experimental-Windows driver" >&5
16833 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16834
16835 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16836 if test "${enable_exp_win32+set}" = set; then
16837   enableval="$enable_exp_win32"
16838   with_exp_win32=$enableval
16839 else
16840   with_exp_win32=no
16841 fi;
16842         echo "$as_me:16842: result: $with_exp_win32" >&5
16843 echo "${ECHO_T}$with_exp_win32" >&6
16844         if test "x$with_exp_win32" = xyes
16845         then
16846
16847 cat >>confdefs.h <<\EOF
16848 #define EXP_WIN32_DRIVER 1
16849 EOF
16850
16851                 EXP_WIN32_DRIVER=1
16852                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16853         else
16854                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16855                 EXP_WIN32_DRIVER=0
16856         fi
16857         ;;
16858 (*)
16859         EXP_WIN32_DRIVER=0
16860         INTERNALS_HDR=
16861         ;;
16862 esac
16863
16864 ###############################################################################
16865
16866 ###     use option --disable-echo to suppress full display compiling commands
16867
16868 echo "$as_me:16868: checking if you want to see long compiling messages" >&5
16869 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16870
16871 # Check whether --enable-echo or --disable-echo was given.
16872 if test "${enable_echo+set}" = set; then
16873   enableval="$enable_echo"
16874   test "$enableval" != no && enableval=yes
16875         if test "$enableval" != "yes" ; then
16876
16877         ECHO_LT='--silent'
16878         ECHO_LD='@echo linking $@;'
16879         RULE_CC='@echo compiling $<'
16880         SHOW_CC='@echo compiling $@'
16881         ECHO_CC='@'
16882
16883         else
16884
16885         ECHO_LT=''
16886         ECHO_LD=''
16887         RULE_CC=''
16888         SHOW_CC=''
16889         ECHO_CC=''
16890
16891         fi
16892 else
16893   enableval=yes
16894
16895         ECHO_LT=''
16896         ECHO_LD=''
16897         RULE_CC=''
16898         SHOW_CC=''
16899         ECHO_CC=''
16900
16901 fi;
16902 echo "$as_me:16902: result: $enableval" >&5
16903 echo "${ECHO_T}$enableval" >&6
16904
16905 if test "x$enable_echo" = xyes; then
16906         ECHO_LINK=
16907 else
16908         ECHO_LINK='@ echo linking $@ ... ;'
16909         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16910         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16911 fi
16912
16913 # --disable-stripping is used for debugging
16914
16915 echo "$as_me:16915: checking if you want to install stripped executables" >&5
16916 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16917
16918 # Check whether --enable-stripping or --disable-stripping was given.
16919 if test "${enable_stripping+set}" = set; then
16920   enableval="$enable_stripping"
16921   test "$enableval" != no && enableval=yes
16922         if test "$enableval" != "yes" ; then
16923     enable_stripping=no
16924         else
16925                 enable_stripping=yes
16926         fi
16927 else
16928   enableval=yes
16929         enable_stripping=yes
16930
16931 fi;
16932 echo "$as_me:16932: result: $enable_stripping" >&5
16933 echo "${ECHO_T}$enable_stripping" >&6
16934
16935 if test "$enable_stripping" = yes
16936 then
16937         INSTALL_OPT_S="-s"
16938 else
16939         INSTALL_OPT_S=
16940 fi
16941
16942 : "${INSTALL:=install}"
16943 echo "$as_me:16943: checking if install accepts -p option" >&5
16944 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16945 if test "${cf_cv_install_p+set}" = set; then
16946   echo $ECHO_N "(cached) $ECHO_C" >&6
16947 else
16948
16949         rm -rf ./conftest*
16950         date >conftest.in
16951         mkdir conftest.out
16952         sleep 3
16953         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16954         then
16955                 if test -f conftest.out/conftest.in
16956                 then
16957                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16958                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16959                         if test -s conftest.err
16960                         then
16961                                 cf_cv_install_p=no
16962                         else
16963                                 cf_cv_install_p=yes
16964                         fi
16965                 else
16966                         cf_cv_install_p=no
16967                 fi
16968         else
16969                 cf_cv_install_p=no
16970         fi
16971         rm -rf ./conftest*
16972
16973 fi
16974 echo "$as_me:16974: result: $cf_cv_install_p" >&5
16975 echo "${ECHO_T}$cf_cv_install_p" >&6
16976
16977 echo "$as_me:16977: checking if install needs to be told about ownership" >&5
16978 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16979 case `$ac_config_guess` in
16980 (*minix)
16981         with_install_o=yes
16982         ;;
16983 (*)
16984         with_install_o=no
16985         ;;
16986 esac
16987
16988 echo "$as_me:16988: result: $with_install_o" >&5
16989 echo "${ECHO_T}$with_install_o" >&6
16990 if test "x$with_install_o" = xyes
16991 then
16992         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'`"
16993 else
16994         INSTALL_OPT_O=
16995 fi
16996
16997 # If we're avoiding relinking of shared libraries during install, that is to
16998 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16999 # the install program has "-p" (for preserving timestamps).
17000 cf_cv_do_reranlib=yes
17001 if test "x$cf_cv_install_p" = xyes
17002 then
17003         if test "x$cf_cv_do_relink" != xyes
17004         then
17005                 cf_cv_do_reranlib=no
17006                 INSTALL_OPT_P="-p"
17007                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
17008         fi
17009 fi
17010
17011 ###     use option --enable-warnings to turn on all gcc warnings
17012
17013 echo "$as_me:17013: checking if you want to use C11 _Noreturn feature" >&5
17014 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
17015
17016 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
17017 if test "${enable_stdnoreturn+set}" = set; then
17018   enableval="$enable_stdnoreturn"
17019   test "$enableval" != yes && enableval=no
17020         if test "$enableval" != "no" ; then
17021     enable_stdnoreturn=yes
17022         else
17023                 enable_stdnoreturn=no
17024         fi
17025 else
17026   enableval=no
17027         enable_stdnoreturn=no
17028
17029 fi;
17030 echo "$as_me:17030: result: $enable_stdnoreturn" >&5
17031 echo "${ECHO_T}$enable_stdnoreturn" >&6
17032
17033 if test $enable_stdnoreturn = yes; then
17034 echo "$as_me:17034: checking for C11 _Noreturn feature" >&5
17035 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
17036 if test "${cf_cv_c11_noreturn+set}" = set; then
17037   echo $ECHO_N "(cached) $ECHO_C" >&6
17038 else
17039   cat >"conftest.$ac_ext" <<_ACEOF
17040 #line 17040 "configure"
17041 #include "confdefs.h"
17042
17043 #include <stdio.h>
17044 #include <stdlib.h>
17045 #include <stdnoreturn.h>
17046 static _Noreturn void giveup(void) { exit(0); }
17047
17048 int
17049 main (void)
17050 {
17051 if (feof(stdin)) giveup()
17052   ;
17053   return 0;
17054 }
17055 _ACEOF
17056 rm -f "conftest.$ac_objext"
17057 if { (eval echo "$as_me:17057: \"$ac_compile\"") >&5
17058   (eval $ac_compile) 2>&5
17059   ac_status=$?
17060   echo "$as_me:17060: \$? = $ac_status" >&5
17061   (exit "$ac_status"); } &&
17062          { ac_try='test -s "conftest.$ac_objext"'
17063   { (eval echo "$as_me:17063: \"$ac_try\"") >&5
17064   (eval $ac_try) 2>&5
17065   ac_status=$?
17066   echo "$as_me:17066: \$? = $ac_status" >&5
17067   (exit "$ac_status"); }; }; then
17068   cf_cv_c11_noreturn=yes
17069 else
17070   echo "$as_me: failed program was:" >&5
17071 cat "conftest.$ac_ext" >&5
17072 cf_cv_c11_noreturn=no
17073 fi
17074 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17075
17076 fi
17077 echo "$as_me:17077: result: $cf_cv_c11_noreturn" >&5
17078 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
17079 else
17080         cf_cv_c11_noreturn=no,
17081 fi
17082
17083 if test "$cf_cv_c11_noreturn" = yes; then
17084
17085 cat >>confdefs.h <<\EOF
17086 #define HAVE_STDNORETURN_H 1
17087 EOF
17088
17089 cat >>confdefs.h <<EOF
17090 #define STDC_NORETURN _Noreturn
17091 EOF
17092
17093         HAVE_STDNORETURN_H=1
17094 else
17095         HAVE_STDNORETURN_H=0
17096 fi
17097
17098 if test "$GCC" = yes || test "$GXX" = yes
17099 then
17100
17101 if test "$GCC" = yes || test "$GXX" = yes
17102 then
17103         case $CFLAGS in
17104         (*-Werror=*)
17105                 cf_temp_flags=
17106                 for cf_temp_scan in $CFLAGS
17107                 do
17108                         case "x$cf_temp_scan" in
17109                         (x-Werror=format*)
17110
17111         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17112         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17113
17114                                 ;;
17115                         (x-Werror=*)
17116
17117         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17118         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17119
17120                                 ;;
17121                         (*)
17122
17123         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17124         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17125
17126                                 ;;
17127                         esac
17128                 done
17129                 if test "x$CFLAGS" != "x$cf_temp_flags"
17130                 then
17131                         test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
17132
17133 echo "${as_me:-configure}:17133: testing repairing CFLAGS: $CFLAGS ..." 1>&5
17134
17135                         CFLAGS="$cf_temp_flags"
17136                         test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
17137
17138 echo "${as_me:-configure}:17138: testing ... fixed $CFLAGS ..." 1>&5
17139
17140                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17141
17142 echo "${as_me:-configure}:17142: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17143
17144                 fi
17145                 ;;
17146         esac
17147 fi
17148
17149 if test "$GCC" = yes || test "$GXX" = yes
17150 then
17151         case $CPPFLAGS in
17152         (*-Werror=*)
17153                 cf_temp_flags=
17154                 for cf_temp_scan in $CPPFLAGS
17155                 do
17156                         case "x$cf_temp_scan" in
17157                         (x-Werror=format*)
17158
17159         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17160         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17161
17162                                 ;;
17163                         (x-Werror=*)
17164
17165         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17166         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17167
17168                                 ;;
17169                         (*)
17170
17171         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17172         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17173
17174                                 ;;
17175                         esac
17176                 done
17177                 if test "x$CPPFLAGS" != "x$cf_temp_flags"
17178                 then
17179                         test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
17180
17181 echo "${as_me:-configure}:17181: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
17182
17183                         CPPFLAGS="$cf_temp_flags"
17184                         test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
17185
17186 echo "${as_me:-configure}:17186: testing ... fixed $CPPFLAGS ..." 1>&5
17187
17188                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17189
17190 echo "${as_me:-configure}:17190: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17191
17192                 fi
17193                 ;;
17194         esac
17195 fi
17196
17197 if test "$GCC" = yes || test "$GXX" = yes
17198 then
17199         case $LDFLAGS in
17200         (*-Werror=*)
17201                 cf_temp_flags=
17202                 for cf_temp_scan in $LDFLAGS
17203                 do
17204                         case "x$cf_temp_scan" in
17205                         (x-Werror=format*)
17206
17207         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17208         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17209
17210                                 ;;
17211                         (x-Werror=*)
17212
17213         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17214         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17215
17216                                 ;;
17217                         (*)
17218
17219         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17220         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17221
17222                                 ;;
17223                         esac
17224                 done
17225                 if test "x$LDFLAGS" != "x$cf_temp_flags"
17226                 then
17227                         test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
17228
17229 echo "${as_me:-configure}:17229: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
17230
17231                         LDFLAGS="$cf_temp_flags"
17232                         test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
17233
17234 echo "${as_me:-configure}:17234: testing ... fixed $LDFLAGS ..." 1>&5
17235
17236                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17237
17238 echo "${as_me:-configure}:17238: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17239
17240                 fi
17241                 ;;
17242         esac
17243 fi
17244
17245 echo "$as_me:17245: checking if you want to turn on gcc warnings" >&5
17246 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
17247
17248 # Check whether --enable-warnings or --disable-warnings was given.
17249 if test "${enable_warnings+set}" = set; then
17250   enableval="$enable_warnings"
17251   test "$enableval" != yes && enableval=no
17252         if test "$enableval" != "no" ; then
17253     enable_warnings=yes
17254         else
17255                 enable_warnings=no
17256         fi
17257 else
17258   enableval=no
17259         enable_warnings=no
17260
17261 fi;
17262 echo "$as_me:17262: result: $enable_warnings" >&5
17263 echo "${ECHO_T}$enable_warnings" >&6
17264 if test "$enable_warnings" = "yes"
17265 then
17266
17267 if test "x$have_x" = xyes; then
17268
17269 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
17270 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
17271 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
17272 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
17273 for cf_X_CFLAGS in $X_CFLAGS
17274 do
17275         case "x$cf_X_CFLAGS" in
17276         x-[IUD]*)
17277                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
17278                 ;;
17279         *)
17280                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
17281                 ;;
17282         esac
17283 done
17284
17285 cat >"conftest.$ac_ext" <<_ACEOF
17286 #line 17286 "configure"
17287 #include "confdefs.h"
17288
17289 #include <stdlib.h>
17290 #include <X11/Intrinsic.h>
17291
17292 int
17293 main (void)
17294 {
17295 String foo = malloc(1); free((void*)foo)
17296   ;
17297   return 0;
17298 }
17299 _ACEOF
17300 rm -f "conftest.$ac_objext"
17301 if { (eval echo "$as_me:17301: \"$ac_compile\"") >&5
17302   (eval $ac_compile) 2>&5
17303   ac_status=$?
17304   echo "$as_me:17304: \$? = $ac_status" >&5
17305   (exit "$ac_status"); } &&
17306          { ac_try='test -s "conftest.$ac_objext"'
17307   { (eval echo "$as_me:17307: \"$ac_try\"") >&5
17308   (eval $ac_try) 2>&5
17309   ac_status=$?
17310   echo "$as_me:17310: \$? = $ac_status" >&5
17311   (exit "$ac_status"); }; }; then
17312
17313 echo "$as_me:17313: checking for X11/Xt const-feature" >&5
17314 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
17315 if test "${cf_cv_const_x_string+set}" = set; then
17316   echo $ECHO_N "(cached) $ECHO_C" >&6
17317 else
17318
17319         cat >"conftest.$ac_ext" <<_ACEOF
17320 #line 17320 "configure"
17321 #include "confdefs.h"
17322
17323 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
17324 #undef  XTSTRINGDEFINES /* X11R5 and later */
17325 #include <stdlib.h>
17326 #include <X11/Intrinsic.h>
17327
17328 int
17329 main (void)
17330 {
17331 String foo = malloc(1); *foo = 0
17332   ;
17333   return 0;
17334 }
17335 _ACEOF
17336 rm -f "conftest.$ac_objext"
17337 if { (eval echo "$as_me:17337: \"$ac_compile\"") >&5
17338   (eval $ac_compile) 2>&5
17339   ac_status=$?
17340   echo "$as_me:17340: \$? = $ac_status" >&5
17341   (exit "$ac_status"); } &&
17342          { ac_try='test -s "conftest.$ac_objext"'
17343   { (eval echo "$as_me:17343: \"$ac_try\"") >&5
17344   (eval $ac_try) 2>&5
17345   ac_status=$?
17346   echo "$as_me:17346: \$? = $ac_status" >&5
17347   (exit "$ac_status"); }; }; then
17348
17349                         cf_cv_const_x_string=no
17350
17351 else
17352   echo "$as_me: failed program was:" >&5
17353 cat "conftest.$ac_ext" >&5
17354
17355                         cf_cv_const_x_string=yes
17356
17357 fi
17358 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17359
17360 fi
17361 echo "$as_me:17361: result: $cf_cv_const_x_string" >&5
17362 echo "${ECHO_T}$cf_cv_const_x_string" >&6
17363
17364 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
17365 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
17366 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
17367
17368 case "$cf_cv_const_x_string" in
17369 (no)
17370
17371         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17372         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
17373
17374         ;;
17375 (*)
17376
17377         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17378         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
17379
17380         ;;
17381 esac
17382
17383 else
17384   echo "$as_me: failed program was:" >&5
17385 cat "conftest.$ac_ext" >&5
17386 fi
17387 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17388  fi
17389 cat > "conftest.$ac_ext" <<EOF
17390 #line 17390 "${as_me:-configure}"
17391 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17392 EOF
17393 if test "$INTEL_COMPILER" = yes
17394 then
17395 # The "-wdXXX" options suppress warnings:
17396 # remark #1419: external declaration in primary source file
17397 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17398 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17399 # remark #193: zero used for undefined preprocessing identifier
17400 # remark #593: variable "curs_sb_left_arrow" was set but never used
17401 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17402 # remark #869: parameter "tw" was never referenced
17403 # remark #981: operands are evaluated in unspecified order
17404 # warning #279: controlling expression is constant
17405
17406         { echo "$as_me:17406: checking for $CC warning options..." >&5
17407 echo "$as_me: checking for $CC warning options..." >&6;}
17408         cf_save_CFLAGS="$CFLAGS"
17409         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
17410         for cf_opt in \
17411                 wd1419 \
17412                 wd1683 \
17413                 wd1684 \
17414                 wd193 \
17415                 wd593 \
17416                 wd279 \
17417                 wd810 \
17418                 wd869 \
17419                 wd981
17420         do
17421                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17422                 if { (eval echo "$as_me:17422: \"$ac_compile\"") >&5
17423   (eval $ac_compile) 2>&5
17424   ac_status=$?
17425   echo "$as_me:17425: \$? = $ac_status" >&5
17426   (exit "$ac_status"); }; then
17427                         test -n "$verbose" && echo "$as_me:17427: result: ... -$cf_opt" >&5
17428 echo "${ECHO_T}... -$cf_opt" >&6
17429                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17430                 fi
17431         done
17432         CFLAGS="$cf_save_CFLAGS"
17433 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
17434 then
17435         { echo "$as_me:17435: checking for $CC warning options..." >&5
17436 echo "$as_me: checking for $CC warning options..." >&6;}
17437         cf_save_CFLAGS="$CFLAGS"
17438         cf_warn_CONST=""
17439         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17440         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17441         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17442         for cf_opt in W Wall \
17443                 Wbad-function-cast \
17444                 Wcast-align \
17445                 Wcast-qual \
17446                 Wdeclaration-after-statement \
17447                 Wextra \
17448                 Winline \
17449                 Wmissing-declarations \
17450                 Wmissing-prototypes \
17451                 Wnested-externs \
17452                 Wpointer-arith \
17453                 Wshadow \
17454                 Wstrict-prototypes \
17455                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
17456         do
17457                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17458                 if { (eval echo "$as_me:17458: \"$ac_compile\"") >&5
17459   (eval $ac_compile) 2>&5
17460   ac_status=$?
17461   echo "$as_me:17461: \$? = $ac_status" >&5
17462   (exit "$ac_status"); }; then
17463                         test -n "$verbose" && echo "$as_me:17463: result: ... -$cf_opt" >&5
17464 echo "${ECHO_T}... -$cf_opt" >&6
17465                         case "$cf_opt" in
17466                         (Winline)
17467                                 case "$GCC_VERSION" in
17468                                 ([34].*)
17469                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17470
17471 echo "${as_me:-configure}:17471: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17472
17473                                         continue;;
17474                                 esac
17475                                 ;;
17476                         (Wpointer-arith)
17477                                 case "$GCC_VERSION" in
17478                                 ([12].*)
17479                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17480
17481 echo "${as_me:-configure}:17481: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17482
17483                                         continue;;
17484                                 esac
17485                                 ;;
17486                         esac
17487                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17488                 fi
17489         done
17490         CFLAGS="$cf_save_CFLAGS"
17491 fi
17492 rm -rf ./conftest*
17493
17494 fi
17495
17496 if test "$GCC" = yes || test "$GXX" = yes
17497 then
17498 cat > conftest.i <<EOF
17499 #ifndef GCC_PRINTF
17500 #define GCC_PRINTF 0
17501 #endif
17502 #ifndef GCC_SCANF
17503 #define GCC_SCANF 0
17504 #endif
17505 #ifndef GCC_NORETURN
17506 #define GCC_NORETURN /* nothing */
17507 #endif
17508 #ifndef GCC_UNUSED
17509 #define GCC_UNUSED /* nothing */
17510 #endif
17511 EOF
17512 if test "$GCC" = yes
17513 then
17514         { echo "$as_me:17514: checking for $CC __attribute__ directives..." >&5
17515 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
17516 cat > "conftest.$ac_ext" <<EOF
17517 #line 17517 "${as_me:-configure}"
17518 #include <stdio.h>
17519 #include "confdefs.h"
17520 #include "conftest.h"
17521 #include "conftest.i"
17522 #if     GCC_PRINTF
17523 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17524 #else
17525 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17526 #endif
17527 #if     GCC_SCANF
17528 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
17529 #else
17530 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
17531 #endif
17532 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17533 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
17534 extern GCC_NORETURN void foo(void);
17535 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
17536 EOF
17537         cf_printf_attribute=no
17538         cf_scanf_attribute=no
17539         for cf_attribute in scanf printf unused noreturn
17540         do
17541
17542 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17543
17544                 cf_directive="__attribute__(($cf_attribute))"
17545                 echo "checking for $CC $cf_directive" 1>&5
17546
17547                 case "$cf_attribute" in
17548                 (printf)
17549                         cf_printf_attribute=yes
17550                         cat >conftest.h <<EOF
17551 #define GCC_$cf_ATTRIBUTE 1
17552 EOF
17553                         ;;
17554                 (scanf)
17555                         cf_scanf_attribute=yes
17556                         cat >conftest.h <<EOF
17557 #define GCC_$cf_ATTRIBUTE 1
17558 EOF
17559                         ;;
17560                 (*)
17561                         cat >conftest.h <<EOF
17562 #define GCC_$cf_ATTRIBUTE $cf_directive
17563 EOF
17564                         ;;
17565                 esac
17566
17567                 if { (eval echo "$as_me:17567: \"$ac_compile\"") >&5
17568   (eval $ac_compile) 2>&5
17569   ac_status=$?
17570   echo "$as_me:17570: \$? = $ac_status" >&5
17571   (exit "$ac_status"); }; then
17572                         test -n "$verbose" && echo "$as_me:17572: result: ... $cf_attribute" >&5
17573 echo "${ECHO_T}... $cf_attribute" >&6
17574                         cat conftest.h >>confdefs.h
17575                         case "$cf_attribute" in
17576                         (noreturn)
17577
17578 cat >>confdefs.h <<EOF
17579 #define GCC_NORETURN $cf_directive
17580 EOF
17581
17582                                 ;;
17583                         (printf)
17584                                 cf_value='/* nothing */'
17585                                 if test "$cf_printf_attribute" != no ; then
17586                                         cf_value='__attribute__((format(printf,fmt,var)))'
17587
17588 cat >>confdefs.h <<\EOF
17589 #define GCC_PRINTF 1
17590 EOF
17591
17592                                 fi
17593
17594 cat >>confdefs.h <<EOF
17595 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17596 EOF
17597
17598                                 ;;
17599                         (scanf)
17600                                 cf_value='/* nothing */'
17601                                 if test "$cf_scanf_attribute" != no ; then
17602                                         cf_value='__attribute__((format(scanf,fmt,var)))'
17603
17604 cat >>confdefs.h <<\EOF
17605 #define GCC_SCANF 1
17606 EOF
17607
17608                                 fi
17609
17610 cat >>confdefs.h <<EOF
17611 #define GCC_SCANFLIKE(fmt,var) $cf_value
17612 EOF
17613
17614                                 ;;
17615                         (unused)
17616
17617 cat >>confdefs.h <<EOF
17618 #define GCC_UNUSED $cf_directive
17619 EOF
17620
17621                                 ;;
17622                         esac
17623                 fi
17624         done
17625 else
17626         ${FGREP-fgrep} define conftest.i >>confdefs.h
17627 fi
17628 rm -rf ./conftest*
17629 fi
17630
17631 fi
17632
17633 if test "x$enable_warnings" = "xyes"; then
17634
17635         ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
17636
17637         if test "x$cf_with_cxx" = xyes ; then
17638
17639 INTEL_CPLUSPLUS=no
17640
17641 if test "$GCC" = yes ; then
17642         case "$host_os" in
17643         (linux*|gnu*)
17644                 echo "$as_me:17644: checking if this is really Intel C++ compiler" >&5
17645 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
17646                 cf_save_CFLAGS="$CXXFLAGS"
17647                 CXXFLAGS="$CXXFLAGS -no-gcc"
17648                 cat >"conftest.$ac_ext" <<_ACEOF
17649 #line 17649 "configure"
17650 #include "confdefs.h"
17651
17652 int
17653 main (void)
17654 {
17655
17656 #ifdef __INTEL_COMPILER
17657 #else
17658 make an error
17659 #endif
17660
17661   ;
17662   return 0;
17663 }
17664 _ACEOF
17665 rm -f "conftest.$ac_objext"
17666 if { (eval echo "$as_me:17666: \"$ac_compile\"") >&5
17667   (eval $ac_compile) 2>&5
17668   ac_status=$?
17669   echo "$as_me:17669: \$? = $ac_status" >&5
17670   (exit "$ac_status"); } &&
17671          { ac_try='test -s "conftest.$ac_objext"'
17672   { (eval echo "$as_me:17672: \"$ac_try\"") >&5
17673   (eval $ac_try) 2>&5
17674   ac_status=$?
17675   echo "$as_me:17675: \$? = $ac_status" >&5
17676   (exit "$ac_status"); }; }; then
17677   INTEL_CPLUSPLUS=yes
17678 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17679
17680 else
17681   echo "$as_me: failed program was:" >&5
17682 cat "conftest.$ac_ext" >&5
17683 fi
17684 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17685                 CXXFLAGS="$cf_save_CFLAGS"
17686                 echo "$as_me:17686: result: $INTEL_CPLUSPLUS" >&5
17687 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17688                 ;;
17689         esac
17690 fi
17691
17692 CLANG_CPLUSPLUS=no
17693
17694 if test "$GCC" = yes ; then
17695         echo "$as_me:17695: checking if this is really Clang C++ compiler" >&5
17696 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17697         cf_save_CFLAGS="$CXXFLAGS"
17698         cat >"conftest.$ac_ext" <<_ACEOF
17699 #line 17699 "configure"
17700 #include "confdefs.h"
17701
17702 int
17703 main (void)
17704 {
17705
17706 #ifdef __clang__
17707 #else
17708 make an error
17709 #endif
17710
17711   ;
17712   return 0;
17713 }
17714 _ACEOF
17715 rm -f "conftest.$ac_objext"
17716 if { (eval echo "$as_me:17716: \"$ac_compile\"") >&5
17717   (eval $ac_compile) 2>&5
17718   ac_status=$?
17719   echo "$as_me:17719: \$? = $ac_status" >&5
17720   (exit "$ac_status"); } &&
17721          { ac_try='test -s "conftest.$ac_objext"'
17722   { (eval echo "$as_me:17722: \"$ac_try\"") >&5
17723   (eval $ac_try) 2>&5
17724   ac_status=$?
17725   echo "$as_me:17725: \$? = $ac_status" >&5
17726   (exit "$ac_status"); }; }; then
17727   CLANG_CPLUSPLUS=yes
17728
17729 else
17730   echo "$as_me: failed program was:" >&5
17731 cat "conftest.$ac_ext" >&5
17732 fi
17733 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17734         CXXFLAGS="$cf_save_CFLAGS"
17735         echo "$as_me:17735: result: $CLANG_CPLUSPLUS" >&5
17736 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17737 fi
17738
17739 CLANG_VERSION=none
17740
17741 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17742         case "$CC" in
17743         (c[1-9][0-9]|*/c[1-9][0-9])
17744                 { echo "$as_me:17744: WARNING: replacing broken compiler alias $CC" >&5
17745 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17746                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17747                 CC=clang
17748                 ;;
17749         esac
17750
17751         echo "$as_me:17751: checking version of $CC" >&5
17752 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17753         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.].*//'`"
17754         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17755         echo "$as_me:17755: result: $CLANG_VERSION" >&5
17756 echo "${ECHO_T}$CLANG_VERSION" >&6
17757
17758         for cf_clang_opt in \
17759                 -Qunused-arguments \
17760                 -Wno-error=implicit-function-declaration
17761         do
17762                 echo "$as_me:17762: checking if option $cf_clang_opt works" >&5
17763 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17764                 cf_save_CFLAGS="$CFLAGS"
17765                 CFLAGS="$CFLAGS $cf_clang_opt"
17766                 cat >"conftest.$ac_ext" <<_ACEOF
17767 #line 17767 "configure"
17768 #include "confdefs.h"
17769
17770                         #include <stdio.h>
17771 int
17772 main (void)
17773 {
17774
17775                         printf("hello!\\n");
17776   ;
17777   return 0;
17778 }
17779 _ACEOF
17780 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17781 if { (eval echo "$as_me:17781: \"$ac_link\"") >&5
17782   (eval $ac_link) 2>&5
17783   ac_status=$?
17784   echo "$as_me:17784: \$? = $ac_status" >&5
17785   (exit "$ac_status"); } &&
17786          { ac_try='test -s "conftest$ac_exeext"'
17787   { (eval echo "$as_me:17787: \"$ac_try\"") >&5
17788   (eval $ac_try) 2>&5
17789   ac_status=$?
17790   echo "$as_me:17790: \$? = $ac_status" >&5
17791   (exit "$ac_status"); }; }; then
17792
17793                         cf_clang_optok=yes
17794 else
17795   echo "$as_me: failed program was:" >&5
17796 cat "conftest.$ac_ext" >&5
17797
17798                         cf_clang_optok=no
17799 fi
17800 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17801                 echo "$as_me:17801: result: $cf_clang_optok" >&5
17802 echo "${ECHO_T}$cf_clang_optok" >&6
17803                 CFLAGS="$cf_save_CFLAGS"
17804                 if test "$cf_clang_optok" = yes; then
17805                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17806
17807 echo "${as_me:-configure}:17807: testing adding option $cf_clang_opt ..." 1>&5
17808
17809         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17810         CFLAGS="${CFLAGS}$cf_clang_opt"
17811
17812                 fi
17813         done
17814 fi
17815
17816 ac_ext=cc
17817 ac_cpp='$CXXCPP $CPPFLAGS'
17818 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17819 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17820 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17821 ac_main_return="return"
17822
17823 cat > conftest.$ac_ext <<EOF
17824 #line 17824 "configure"
17825 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17826 EOF
17827
17828 if test "$INTEL_CPLUSPLUS" = yes
17829 then
17830 # The "-wdXXX" options suppress warnings:
17831 # remark #1419: external declaration in primary source file
17832 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17833 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17834 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17835 # remark #193: zero used for undefined preprocessing identifier
17836 # remark #593: variable "curs_sb_left_arrow" was set but never used
17837 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17838 # remark #869: parameter "tw" was never referenced
17839 # remark #981: operands are evaluated in unspecified order
17840 # warning #269: invalid format string conversion
17841
17842         { echo "$as_me:17842: checking for $CC warning options..." >&5
17843 echo "$as_me: checking for $CC warning options..." >&6;}
17844         cf_save_CXXFLAGS="$CXXFLAGS"
17845         EXTRA_CXXFLAGS="-Wall"
17846         for cf_opt in \
17847                 wd1419 \
17848                 wd1682 \
17849                 wd1683 \
17850                 wd1684 \
17851                 wd193 \
17852                 wd279 \
17853                 wd593 \
17854                 wd810 \
17855                 wd869 \
17856                 wd981
17857         do
17858                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17859                 if { (eval echo "$as_me:17859: \"$ac_compile\"") >&5
17860   (eval $ac_compile) 2>&5
17861   ac_status=$?
17862   echo "$as_me:17862: \$? = $ac_status" >&5
17863   (exit "$ac_status"); }; then
17864                         test -n "$verbose" && echo "$as_me:17864: result: ... -$cf_opt" >&5
17865 echo "${ECHO_T}... -$cf_opt" >&6
17866                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17867                 fi
17868         done
17869         CXXFLAGS="$cf_save_CXXFLAGS"
17870
17871 elif test "$GXX" = yes
17872 then
17873         { echo "$as_me:17873: checking for $CXX warning options..." >&5
17874 echo "$as_me: checking for $CXX warning options..." >&6;}
17875         cf_save_CXXFLAGS="$CXXFLAGS"
17876         EXTRA_CXXFLAGS="-W -Wall"
17877         cf_gxx_extra_warnings=""
17878         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17879         case "$GXX_VERSION" in
17880         ([1-2].*)
17881                 ;;
17882         (*)
17883                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17884                 ;;
17885         esac
17886         for cf_opt in \
17887                 Wabi \
17888                 fabi-version=0 \
17889                 Wextra \
17890                 Wignored-qualifiers \
17891                 Wlogical-op \
17892                 Woverloaded-virtual \
17893                 Wsign-promo \
17894                 Wsynth \
17895                 Wold-style-cast \
17896                 Wcast-align \
17897                 Wcast-qual \
17898                 Wpointer-arith \
17899                 Wshadow \
17900                 Wundef $cf_gxx_extra_warnings Wno-unused
17901         do
17902                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17903                 if { (eval echo "$as_me:17903: \"$ac_compile\"") >&5
17904   (eval $ac_compile) 2>&5
17905   ac_status=$?
17906   echo "$as_me:17906: \$? = $ac_status" >&5
17907   (exit "$ac_status"); }; then
17908                         test -n "$verbose" && echo "$as_me:17908: result: ... -$cf_opt" >&5
17909 echo "${ECHO_T}... -$cf_opt" >&6
17910                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17911                 else
17912                         test -n "$verbose" && echo "$as_me:17912: result: ... no -$cf_opt" >&5
17913 echo "${ECHO_T}... no -$cf_opt" >&6
17914                 fi
17915         done
17916         CXXFLAGS="$cf_save_CXXFLAGS"
17917 fi
17918
17919 rm -rf ./conftest*
17920 ac_ext=c
17921 ac_cpp='$CPP $CPPFLAGS'
17922 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17923 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17924 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17925 ac_main_return="return"
17926
17927         fi
17928 fi
17929
17930 echo "$as_me:17930: checking if you want to work around bogus compiler/loader warnings" >&5
17931 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17932
17933 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17934 if test "${enable_string_hacks+set}" = set; then
17935   enableval="$enable_string_hacks"
17936   enable_string_hacks=$enableval
17937 else
17938   enable_string_hacks=no
17939 fi;
17940 echo "$as_me:17940: result: $enable_string_hacks" >&5
17941 echo "${ECHO_T}$enable_string_hacks" >&6
17942
17943 if test "x$enable_string_hacks" = "xyes"; then
17944
17945 cat >>confdefs.h <<\EOF
17946 #define USE_STRING_HACKS 1
17947 EOF
17948
17949         { echo "$as_me:17949: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
17950 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17951         echo "$as_me:17951: checking for strlcat" >&5
17952 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17953 if test "${ac_cv_func_strlcat+set}" = set; then
17954   echo $ECHO_N "(cached) $ECHO_C" >&6
17955 else
17956   cat >"conftest.$ac_ext" <<_ACEOF
17957 #line 17957 "configure"
17958 #include "confdefs.h"
17959 #define strlcat autoconf_temporary
17960 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17961 #undef strlcat
17962
17963 #ifdef __cplusplus
17964 extern "C"
17965 #endif
17966
17967 /* We use char because int might match the return type of a gcc2
17968    builtin and then its argument prototype would still apply.  */
17969 char strlcat (void);
17970
17971 int
17972 main (void)
17973 {
17974
17975 /* The GNU C library defines stubs for functions which it implements
17976     to always fail with ENOSYS.  Some functions are actually named
17977     something starting with __ and the normal name is an alias.  */
17978 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17979 #error found stub for strlcat
17980 #endif
17981
17982         return strlcat ();
17983   ;
17984   return 0;
17985 }
17986 _ACEOF
17987 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17988 if { (eval echo "$as_me:17988: \"$ac_link\"") >&5
17989   (eval $ac_link) 2>&5
17990   ac_status=$?
17991   echo "$as_me:17991: \$? = $ac_status" >&5
17992   (exit "$ac_status"); } &&
17993          { ac_try='test -s "conftest$ac_exeext"'
17994   { (eval echo "$as_me:17994: \"$ac_try\"") >&5
17995   (eval $ac_try) 2>&5
17996   ac_status=$?
17997   echo "$as_me:17997: \$? = $ac_status" >&5
17998   (exit "$ac_status"); }; }; then
17999   ac_cv_func_strlcat=yes
18000 else
18001   echo "$as_me: failed program was:" >&5
18002 cat "conftest.$ac_ext" >&5
18003 ac_cv_func_strlcat=no
18004 fi
18005 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18006 fi
18007 echo "$as_me:18007: result: $ac_cv_func_strlcat" >&5
18008 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
18009 if test "$ac_cv_func_strlcat" = yes; then
18010
18011 cat >>confdefs.h <<\EOF
18012 #define HAVE_STRLCAT 1
18013 EOF
18014
18015 else
18016
18017                 echo "$as_me:18017: checking for strlcat in -lbsd" >&5
18018 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
18019 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
18020   echo $ECHO_N "(cached) $ECHO_C" >&6
18021 else
18022   ac_check_lib_save_LIBS=$LIBS
18023 LIBS="-lbsd  $LIBS"
18024 cat >"conftest.$ac_ext" <<_ACEOF
18025 #line 18025 "configure"
18026 #include "confdefs.h"
18027
18028 /* Override any gcc2 internal prototype to avoid an error.  */
18029 #ifdef __cplusplus
18030 extern "C"
18031 #endif
18032 /* We use char because int might match the return type of a gcc2
18033    builtin and then its argument prototype would still apply.  */
18034 char strlcat ();
18035 int
18036 main (void)
18037 {
18038 strlcat ();
18039   ;
18040   return 0;
18041 }
18042 _ACEOF
18043 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18044 if { (eval echo "$as_me:18044: \"$ac_link\"") >&5
18045   (eval $ac_link) 2>&5
18046   ac_status=$?
18047   echo "$as_me:18047: \$? = $ac_status" >&5
18048   (exit "$ac_status"); } &&
18049          { ac_try='test -s "conftest$ac_exeext"'
18050   { (eval echo "$as_me:18050: \"$ac_try\"") >&5
18051   (eval $ac_try) 2>&5
18052   ac_status=$?
18053   echo "$as_me:18053: \$? = $ac_status" >&5
18054   (exit "$ac_status"); }; }; then
18055   ac_cv_lib_bsd_strlcat=yes
18056 else
18057   echo "$as_me: failed program was:" >&5
18058 cat "conftest.$ac_ext" >&5
18059 ac_cv_lib_bsd_strlcat=no
18060 fi
18061 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18062 LIBS=$ac_check_lib_save_LIBS
18063 fi
18064 echo "$as_me:18064: result: $ac_cv_lib_bsd_strlcat" >&5
18065 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
18066 if test "$ac_cv_lib_bsd_strlcat" = yes; then
18067
18068 cf_add_libs="$LIBS"
18069 # reverse order
18070 cf_add_0lib=
18071 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18072 # filter duplicates
18073 for cf_add_1lib in $cf_add_0lib; do
18074         for cf_add_2lib in $cf_add_libs; do
18075                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18076                         cf_add_1lib=
18077                         break
18078                 fi
18079         done
18080         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18081 done
18082 LIBS="$cf_add_libs"
18083
18084 for ac_header in bsd/string.h
18085 do
18086 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18087 echo "$as_me:18087: checking for $ac_header" >&5
18088 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18089 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18090   echo $ECHO_N "(cached) $ECHO_C" >&6
18091 else
18092   cat >"conftest.$ac_ext" <<_ACEOF
18093 #line 18093 "configure"
18094 #include "confdefs.h"
18095 #include <$ac_header>
18096 _ACEOF
18097 if { (eval echo "$as_me:18097: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18098   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18099   ac_status=$?
18100   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18101   rm -f conftest.er1
18102   cat conftest.err >&5
18103   echo "$as_me:18103: \$? = $ac_status" >&5
18104   (exit "$ac_status"); } >/dev/null; then
18105   if test -s conftest.err; then
18106     ac_cpp_err=$ac_c_preproc_warn_flag
18107   else
18108     ac_cpp_err=
18109   fi
18110 else
18111   ac_cpp_err=yes
18112 fi
18113 if test -z "$ac_cpp_err"; then
18114   eval "$as_ac_Header=yes"
18115 else
18116   echo "$as_me: failed program was:" >&5
18117   cat "conftest.$ac_ext" >&5
18118   eval "$as_ac_Header=no"
18119 fi
18120 rm -f conftest.err "conftest.$ac_ext"
18121 fi
18122 echo "$as_me:18122: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18123 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18124 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18125   cat >>confdefs.h <<EOF
18126 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18127 EOF
18128
18129 fi
18130 done
18131
18132 cat >>confdefs.h <<\EOF
18133 #define HAVE_STRLCAT 1
18134 EOF
18135
18136 fi
18137
18138 fi
18139
18140 for ac_func in strlcpy snprintf
18141 do
18142 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18143 echo "$as_me:18143: checking for $ac_func" >&5
18144 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18145 if eval "test \"\${$as_ac_var+set}\" = set"; then
18146   echo $ECHO_N "(cached) $ECHO_C" >&6
18147 else
18148   cat >"conftest.$ac_ext" <<_ACEOF
18149 #line 18149 "configure"
18150 #include "confdefs.h"
18151 #define $ac_func autoconf_temporary
18152 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18153 #undef $ac_func
18154
18155 #ifdef __cplusplus
18156 extern "C"
18157 #endif
18158
18159 /* We use char because int might match the return type of a gcc2
18160    builtin and then its argument prototype would still apply.  */
18161 char $ac_func (void);
18162
18163 int
18164 main (void)
18165 {
18166
18167 /* The GNU C library defines stubs for functions which it implements
18168     to always fail with ENOSYS.  Some functions are actually named
18169     something starting with __ and the normal name is an alias.  */
18170 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18171 #error found stub for $ac_func
18172 #endif
18173
18174         return $ac_func ();
18175   ;
18176   return 0;
18177 }
18178 _ACEOF
18179 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18180 if { (eval echo "$as_me:18180: \"$ac_link\"") >&5
18181   (eval $ac_link) 2>&5
18182   ac_status=$?
18183   echo "$as_me:18183: \$? = $ac_status" >&5
18184   (exit "$ac_status"); } &&
18185          { ac_try='test -s "conftest$ac_exeext"'
18186   { (eval echo "$as_me:18186: \"$ac_try\"") >&5
18187   (eval $ac_try) 2>&5
18188   ac_status=$?
18189   echo "$as_me:18189: \$? = $ac_status" >&5
18190   (exit "$ac_status"); }; }; then
18191   eval "$as_ac_var=yes"
18192 else
18193   echo "$as_me: failed program was:" >&5
18194 cat "conftest.$ac_ext" >&5
18195 eval "$as_ac_var=no"
18196 fi
18197 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18198 fi
18199 echo "$as_me:18199: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18200 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18201 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18202   cat >>confdefs.h <<EOF
18203 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18204 EOF
18205
18206 fi
18207 done
18208
18209 fi
18210
18211 ###     use option --enable-assertions to turn on generation of assertion code
18212 echo "$as_me:18212: checking if you want to enable runtime assertions" >&5
18213 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
18214
18215 # Check whether --enable-assertions or --disable-assertions was given.
18216 if test "${enable_assertions+set}" = set; then
18217   enableval="$enable_assertions"
18218   with_assertions=$enableval
18219 else
18220   with_assertions=no
18221 fi;
18222 echo "$as_me:18222: result: $with_assertions" >&5
18223 echo "${ECHO_T}$with_assertions" >&6
18224 if test -n "$GCC"
18225 then
18226         if test "$with_assertions" = no
18227         then
18228                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
18229         else
18230
18231         ADAFLAGS="$ADAFLAGS -gnata"
18232
18233         fi
18234 fi
18235
18236 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
18237
18238 echo "$as_me:18238: checking if you want to use dmalloc for testing" >&5
18239 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
18240
18241 # Check whether --with-dmalloc or --without-dmalloc was given.
18242 if test "${with_dmalloc+set}" = set; then
18243   withval="$with_dmalloc"
18244   case "x$withval" in
18245         (x|xno) ;;
18246         (*)
18247                 : "${with_cflags:=-g}"
18248                 : "${enable_leaks:=no}"
18249                 with_dmalloc=yes
18250
18251 cat >>confdefs.h <<EOF
18252 #define USE_DMALLOC 1
18253 EOF
18254
18255                 ;;
18256         esac
18257 else
18258   with_dmalloc=
18259 fi;
18260 echo "$as_me:18260: result: ${with_dmalloc:-no}" >&5
18261 echo "${ECHO_T}${with_dmalloc:-no}" >&6
18262
18263 case ".$with_cflags" in
18264 (.*-g*)
18265         case .$CFLAGS in
18266         (.*-g*)
18267                 ;;
18268         (*)
18269
18270 cf_fix_cppflags=no
18271 cf_new_cflags=
18272 cf_new_cppflags=
18273 cf_new_extra_cppflags=
18274
18275 for cf_add_cflags in -g
18276 do
18277 case "$cf_fix_cppflags" in
18278 (no)
18279         case "$cf_add_cflags" in
18280         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18281                 case "$cf_add_cflags" in
18282                 (-D*)
18283                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18284
18285                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18286                                 && test -z "${cf_tst_cflags}" \
18287                                 && cf_fix_cppflags=yes
18288
18289                         if test "$cf_fix_cppflags" = yes ; then
18290
18291         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18292         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18293
18294                                 continue
18295                         elif test "${cf_tst_cflags}" = "\"'" ; then
18296
18297         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18298         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18299
18300                                 continue
18301                         fi
18302                         ;;
18303                 esac
18304                 case "$CPPFLAGS" in
18305                 (*$cf_add_cflags)
18306                         ;;
18307                 (*)
18308                         case "$cf_add_cflags" in
18309                         (-D*)
18310                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18311
18312 CPPFLAGS=`echo "$CPPFLAGS" | \
18313         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18314                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18315
18316                                 ;;
18317                         esac
18318
18319         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18320         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18321
18322                         ;;
18323                 esac
18324                 ;;
18325         (*)
18326
18327         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18328         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18329
18330                 ;;
18331         esac
18332         ;;
18333 (yes)
18334
18335         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18336         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18337
18338         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18339
18340         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18341                 && test -z "${cf_tst_cflags}" \
18342                 && cf_fix_cppflags=no
18343         ;;
18344 esac
18345 done
18346
18347 if test -n "$cf_new_cflags" ; then
18348
18349         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18350         CFLAGS="${CFLAGS}$cf_new_cflags"
18351
18352 fi
18353
18354 if test -n "$cf_new_cppflags" ; then
18355
18356         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18357         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18358
18359 fi
18360
18361 if test -n "$cf_new_extra_cppflags" ; then
18362
18363         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18364         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18365
18366 fi
18367
18368                 ;;
18369         esac
18370         ;;
18371 esac
18372
18373 if test "$with_dmalloc" = yes ; then
18374         echo "$as_me:18374: checking for dmalloc.h" >&5
18375 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
18376 if test "${ac_cv_header_dmalloc_h+set}" = set; then
18377   echo $ECHO_N "(cached) $ECHO_C" >&6
18378 else
18379   cat >"conftest.$ac_ext" <<_ACEOF
18380 #line 18380 "configure"
18381 #include "confdefs.h"
18382 #include <dmalloc.h>
18383 _ACEOF
18384 if { (eval echo "$as_me:18384: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18385   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18386   ac_status=$?
18387   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18388   rm -f conftest.er1
18389   cat conftest.err >&5
18390   echo "$as_me:18390: \$? = $ac_status" >&5
18391   (exit "$ac_status"); } >/dev/null; then
18392   if test -s conftest.err; then
18393     ac_cpp_err=$ac_c_preproc_warn_flag
18394   else
18395     ac_cpp_err=
18396   fi
18397 else
18398   ac_cpp_err=yes
18399 fi
18400 if test -z "$ac_cpp_err"; then
18401   ac_cv_header_dmalloc_h=yes
18402 else
18403   echo "$as_me: failed program was:" >&5
18404   cat "conftest.$ac_ext" >&5
18405   ac_cv_header_dmalloc_h=no
18406 fi
18407 rm -f conftest.err "conftest.$ac_ext"
18408 fi
18409 echo "$as_me:18409: result: $ac_cv_header_dmalloc_h" >&5
18410 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
18411 if test "$ac_cv_header_dmalloc_h" = yes; then
18412
18413 echo "$as_me:18413: checking for dmalloc_debug in -ldmalloc" >&5
18414 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
18415 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
18416   echo $ECHO_N "(cached) $ECHO_C" >&6
18417 else
18418   ac_check_lib_save_LIBS=$LIBS
18419 LIBS="-ldmalloc  $LIBS"
18420 cat >"conftest.$ac_ext" <<_ACEOF
18421 #line 18421 "configure"
18422 #include "confdefs.h"
18423
18424 /* Override any gcc2 internal prototype to avoid an error.  */
18425 #ifdef __cplusplus
18426 extern "C"
18427 #endif
18428 /* We use char because int might match the return type of a gcc2
18429    builtin and then its argument prototype would still apply.  */
18430 char dmalloc_debug ();
18431 int
18432 main (void)
18433 {
18434 dmalloc_debug ();
18435   ;
18436   return 0;
18437 }
18438 _ACEOF
18439 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18440 if { (eval echo "$as_me:18440: \"$ac_link\"") >&5
18441   (eval $ac_link) 2>&5
18442   ac_status=$?
18443   echo "$as_me:18443: \$? = $ac_status" >&5
18444   (exit "$ac_status"); } &&
18445          { ac_try='test -s "conftest$ac_exeext"'
18446   { (eval echo "$as_me:18446: \"$ac_try\"") >&5
18447   (eval $ac_try) 2>&5
18448   ac_status=$?
18449   echo "$as_me:18449: \$? = $ac_status" >&5
18450   (exit "$ac_status"); }; }; then
18451   ac_cv_lib_dmalloc_dmalloc_debug=yes
18452 else
18453   echo "$as_me: failed program was:" >&5
18454 cat "conftest.$ac_ext" >&5
18455 ac_cv_lib_dmalloc_dmalloc_debug=no
18456 fi
18457 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18458 LIBS=$ac_check_lib_save_LIBS
18459 fi
18460 echo "$as_me:18460: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18461 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18462 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
18463   cat >>confdefs.h <<EOF
18464 #define HAVE_LIBDMALLOC 1
18465 EOF
18466
18467   LIBS="-ldmalloc $LIBS"
18468
18469 fi
18470
18471 fi
18472
18473 fi
18474
18475 echo "$as_me:18475: checking if you want to use dbmalloc for testing" >&5
18476 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18477
18478 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18479 if test "${with_dbmalloc+set}" = set; then
18480   withval="$with_dbmalloc"
18481   case "x$withval" in
18482         (x|xno) ;;
18483         (*)
18484                 : "${with_cflags:=-g}"
18485                 : "${enable_leaks:=no}"
18486                 with_dbmalloc=yes
18487
18488 cat >>confdefs.h <<EOF
18489 #define USE_DBMALLOC 1
18490 EOF
18491
18492                 ;;
18493         esac
18494 else
18495   with_dbmalloc=
18496 fi;
18497 echo "$as_me:18497: result: ${with_dbmalloc:-no}" >&5
18498 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18499
18500 case ".$with_cflags" in
18501 (.*-g*)
18502         case .$CFLAGS in
18503         (.*-g*)
18504                 ;;
18505         (*)
18506
18507 cf_fix_cppflags=no
18508 cf_new_cflags=
18509 cf_new_cppflags=
18510 cf_new_extra_cppflags=
18511
18512 for cf_add_cflags in -g
18513 do
18514 case "$cf_fix_cppflags" in
18515 (no)
18516         case "$cf_add_cflags" in
18517         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18518                 case "$cf_add_cflags" in
18519                 (-D*)
18520                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18521
18522                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18523                                 && test -z "${cf_tst_cflags}" \
18524                                 && cf_fix_cppflags=yes
18525
18526                         if test "$cf_fix_cppflags" = yes ; then
18527
18528         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18529         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18530
18531                                 continue
18532                         elif test "${cf_tst_cflags}" = "\"'" ; then
18533
18534         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18535         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18536
18537                                 continue
18538                         fi
18539                         ;;
18540                 esac
18541                 case "$CPPFLAGS" in
18542                 (*$cf_add_cflags)
18543                         ;;
18544                 (*)
18545                         case "$cf_add_cflags" in
18546                         (-D*)
18547                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18548
18549 CPPFLAGS=`echo "$CPPFLAGS" | \
18550         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18551                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18552
18553                                 ;;
18554                         esac
18555
18556         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18557         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18558
18559                         ;;
18560                 esac
18561                 ;;
18562         (*)
18563
18564         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18565         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18566
18567                 ;;
18568         esac
18569         ;;
18570 (yes)
18571
18572         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18573         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18574
18575         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18576
18577         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18578                 && test -z "${cf_tst_cflags}" \
18579                 && cf_fix_cppflags=no
18580         ;;
18581 esac
18582 done
18583
18584 if test -n "$cf_new_cflags" ; then
18585
18586         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18587         CFLAGS="${CFLAGS}$cf_new_cflags"
18588
18589 fi
18590
18591 if test -n "$cf_new_cppflags" ; then
18592
18593         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18594         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18595
18596 fi
18597
18598 if test -n "$cf_new_extra_cppflags" ; then
18599
18600         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18601         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18602
18603 fi
18604
18605                 ;;
18606         esac
18607         ;;
18608 esac
18609
18610 if test "$with_dbmalloc" = yes ; then
18611         echo "$as_me:18611: checking for dbmalloc.h" >&5
18612 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18613 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18614   echo $ECHO_N "(cached) $ECHO_C" >&6
18615 else
18616   cat >"conftest.$ac_ext" <<_ACEOF
18617 #line 18617 "configure"
18618 #include "confdefs.h"
18619 #include <dbmalloc.h>
18620 _ACEOF
18621 if { (eval echo "$as_me:18621: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18622   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18623   ac_status=$?
18624   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18625   rm -f conftest.er1
18626   cat conftest.err >&5
18627   echo "$as_me:18627: \$? = $ac_status" >&5
18628   (exit "$ac_status"); } >/dev/null; then
18629   if test -s conftest.err; then
18630     ac_cpp_err=$ac_c_preproc_warn_flag
18631   else
18632     ac_cpp_err=
18633   fi
18634 else
18635   ac_cpp_err=yes
18636 fi
18637 if test -z "$ac_cpp_err"; then
18638   ac_cv_header_dbmalloc_h=yes
18639 else
18640   echo "$as_me: failed program was:" >&5
18641   cat "conftest.$ac_ext" >&5
18642   ac_cv_header_dbmalloc_h=no
18643 fi
18644 rm -f conftest.err "conftest.$ac_ext"
18645 fi
18646 echo "$as_me:18646: result: $ac_cv_header_dbmalloc_h" >&5
18647 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18648 if test "$ac_cv_header_dbmalloc_h" = yes; then
18649
18650 echo "$as_me:18650: checking for debug_malloc in -ldbmalloc" >&5
18651 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18652 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18653   echo $ECHO_N "(cached) $ECHO_C" >&6
18654 else
18655   ac_check_lib_save_LIBS=$LIBS
18656 LIBS="-ldbmalloc  $LIBS"
18657 cat >"conftest.$ac_ext" <<_ACEOF
18658 #line 18658 "configure"
18659 #include "confdefs.h"
18660
18661 /* Override any gcc2 internal prototype to avoid an error.  */
18662 #ifdef __cplusplus
18663 extern "C"
18664 #endif
18665 /* We use char because int might match the return type of a gcc2
18666    builtin and then its argument prototype would still apply.  */
18667 char debug_malloc ();
18668 int
18669 main (void)
18670 {
18671 debug_malloc ();
18672   ;
18673   return 0;
18674 }
18675 _ACEOF
18676 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18677 if { (eval echo "$as_me:18677: \"$ac_link\"") >&5
18678   (eval $ac_link) 2>&5
18679   ac_status=$?
18680   echo "$as_me:18680: \$? = $ac_status" >&5
18681   (exit "$ac_status"); } &&
18682          { ac_try='test -s "conftest$ac_exeext"'
18683   { (eval echo "$as_me:18683: \"$ac_try\"") >&5
18684   (eval $ac_try) 2>&5
18685   ac_status=$?
18686   echo "$as_me:18686: \$? = $ac_status" >&5
18687   (exit "$ac_status"); }; }; then
18688   ac_cv_lib_dbmalloc_debug_malloc=yes
18689 else
18690   echo "$as_me: failed program was:" >&5
18691 cat "conftest.$ac_ext" >&5
18692 ac_cv_lib_dbmalloc_debug_malloc=no
18693 fi
18694 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18695 LIBS=$ac_check_lib_save_LIBS
18696 fi
18697 echo "$as_me:18697: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18698 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18699 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
18700   cat >>confdefs.h <<EOF
18701 #define HAVE_LIBDBMALLOC 1
18702 EOF
18703
18704   LIBS="-ldbmalloc $LIBS"
18705
18706 fi
18707
18708 fi
18709
18710 fi
18711
18712 echo "$as_me:18712: checking if you want to use valgrind for testing" >&5
18713 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18714
18715 # Check whether --with-valgrind or --without-valgrind was given.
18716 if test "${with_valgrind+set}" = set; then
18717   withval="$with_valgrind"
18718   case "x$withval" in
18719         (x|xno) ;;
18720         (*)
18721                 : "${with_cflags:=-g}"
18722                 : "${enable_leaks:=no}"
18723                 with_valgrind=yes
18724
18725 cat >>confdefs.h <<EOF
18726 #define USE_VALGRIND 1
18727 EOF
18728
18729                 ;;
18730         esac
18731 else
18732   with_valgrind=
18733 fi;
18734 echo "$as_me:18734: result: ${with_valgrind:-no}" >&5
18735 echo "${ECHO_T}${with_valgrind:-no}" >&6
18736
18737 case ".$with_cflags" in
18738 (.*-g*)
18739         case .$CFLAGS in
18740         (.*-g*)
18741                 ;;
18742         (*)
18743
18744 cf_fix_cppflags=no
18745 cf_new_cflags=
18746 cf_new_cppflags=
18747 cf_new_extra_cppflags=
18748
18749 for cf_add_cflags in -g
18750 do
18751 case "$cf_fix_cppflags" in
18752 (no)
18753         case "$cf_add_cflags" in
18754         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18755                 case "$cf_add_cflags" in
18756                 (-D*)
18757                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18758
18759                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18760                                 && test -z "${cf_tst_cflags}" \
18761                                 && cf_fix_cppflags=yes
18762
18763                         if test "$cf_fix_cppflags" = yes ; then
18764
18765         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18766         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18767
18768                                 continue
18769                         elif test "${cf_tst_cflags}" = "\"'" ; then
18770
18771         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18772         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18773
18774                                 continue
18775                         fi
18776                         ;;
18777                 esac
18778                 case "$CPPFLAGS" in
18779                 (*$cf_add_cflags)
18780                         ;;
18781                 (*)
18782                         case "$cf_add_cflags" in
18783                         (-D*)
18784                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18785
18786 CPPFLAGS=`echo "$CPPFLAGS" | \
18787         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18788                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18789
18790                                 ;;
18791                         esac
18792
18793         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18794         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18795
18796                         ;;
18797                 esac
18798                 ;;
18799         (*)
18800
18801         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18802         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18803
18804                 ;;
18805         esac
18806         ;;
18807 (yes)
18808
18809         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18810         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18811
18812         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18813
18814         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18815                 && test -z "${cf_tst_cflags}" \
18816                 && cf_fix_cppflags=no
18817         ;;
18818 esac
18819 done
18820
18821 if test -n "$cf_new_cflags" ; then
18822
18823         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18824         CFLAGS="${CFLAGS}$cf_new_cflags"
18825
18826 fi
18827
18828 if test -n "$cf_new_cppflags" ; then
18829
18830         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18831         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18832
18833 fi
18834
18835 if test -n "$cf_new_extra_cppflags" ; then
18836
18837         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18838         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18839
18840 fi
18841
18842                 ;;
18843         esac
18844         ;;
18845 esac
18846
18847 echo "$as_me:18847: checking if you want to perform memory-leak testing" >&5
18848 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18849
18850 # Check whether --enable-leaks or --disable-leaks was given.
18851 if test "${enable_leaks+set}" = set; then
18852   enableval="$enable_leaks"
18853   enable_leaks=$enableval
18854 else
18855   enable_leaks=yes
18856 fi;
18857 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18858 echo "$as_me:18858: result: $with_no_leaks" >&5
18859 echo "${ECHO_T}$with_no_leaks" >&6
18860
18861 if test "$enable_leaks" = no ; then
18862
18863 cat >>confdefs.h <<\EOF
18864 #define NO_LEAKS 1
18865 EOF
18866
18867 cat >>confdefs.h <<\EOF
18868 #define YY_NO_LEAKS 1
18869 EOF
18870
18871 fi
18872
18873 cat >>confdefs.h <<\EOF
18874 #define HAVE_NC_ALLOC_H 1
18875 EOF
18876
18877 ###     use option --enable-expanded to generate certain macros as functions
18878
18879 # Check whether --enable-expanded or --disable-expanded was given.
18880 if test "${enable_expanded+set}" = set; then
18881   enableval="$enable_expanded"
18882   test "x$enableval" = xyes &&
18883 cat >>confdefs.h <<\EOF
18884 #define NCURSES_EXPANDED 1
18885 EOF
18886
18887 fi;
18888
18889 ###     use option --disable-macros to suppress macros in favor of functions
18890
18891 # Check whether --enable-macros or --disable-macros was given.
18892 if test "${enable_macros+set}" = set; then
18893   enableval="$enable_macros"
18894   test "$enableval" = no &&
18895 cat >>confdefs.h <<\EOF
18896 #define NCURSES_NOMACROS 1
18897 EOF
18898
18899 fi;
18900
18901 # Normally we only add trace() to the debug-library.  Allow this to be
18902 # extended to all models of the ncurses library:
18903 cf_all_traces=no
18904 case "$CFLAGS $CPPFLAGS" in
18905 (*-DTRACE*)
18906         cf_all_traces=yes
18907         ;;
18908 esac
18909
18910 echo "$as_me:18910: checking whether to add trace feature to all models" >&5
18911 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18912
18913 # Check whether --with-trace or --without-trace was given.
18914 if test "${with_trace+set}" = set; then
18915   withval="$with_trace"
18916   cf_with_trace=$withval
18917 else
18918   cf_with_trace=$cf_all_traces
18919 fi;
18920 echo "$as_me:18920: result: $cf_with_trace" >&5
18921 echo "${ECHO_T}$cf_with_trace" >&6
18922
18923 if test "x$cf_with_trace" = xyes ; then
18924         LIB_TRACING=all
18925         ADA_TRACE=TRUE
18926
18927 cf_fix_cppflags=no
18928 cf_new_cflags=
18929 cf_new_cppflags=
18930 cf_new_extra_cppflags=
18931
18932 for cf_add_cflags in -DTRACE
18933 do
18934 case "$cf_fix_cppflags" in
18935 (no)
18936         case "$cf_add_cflags" in
18937         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18938                 case "$cf_add_cflags" in
18939                 (-D*)
18940                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18941
18942                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18943                                 && test -z "${cf_tst_cflags}" \
18944                                 && cf_fix_cppflags=yes
18945
18946                         if test "$cf_fix_cppflags" = yes ; then
18947
18948         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18949         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18950
18951                                 continue
18952                         elif test "${cf_tst_cflags}" = "\"'" ; then
18953
18954         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18955         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18956
18957                                 continue
18958                         fi
18959                         ;;
18960                 esac
18961                 case "$CPPFLAGS" in
18962                 (*$cf_add_cflags)
18963                         ;;
18964                 (*)
18965                         case "$cf_add_cflags" in
18966                         (-D*)
18967                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18968
18969 CPPFLAGS=`echo "$CPPFLAGS" | \
18970         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18971                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18972
18973                                 ;;
18974                         esac
18975
18976         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18977         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18978
18979                         ;;
18980                 esac
18981                 ;;
18982         (*)
18983
18984         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18985         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18986
18987                 ;;
18988         esac
18989         ;;
18990 (yes)
18991
18992         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18993         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18994
18995         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18996
18997         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18998                 && test -z "${cf_tst_cflags}" \
18999                 && cf_fix_cppflags=no
19000         ;;
19001 esac
19002 done
19003
19004 if test -n "$cf_new_cflags" ; then
19005
19006         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19007         CFLAGS="${CFLAGS}$cf_new_cflags"
19008
19009 fi
19010
19011 if test -n "$cf_new_cppflags" ; then
19012
19013         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19014         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19015
19016 fi
19017
19018 if test -n "$cf_new_extra_cppflags" ; then
19019
19020         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19021         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19022
19023 fi
19024
19025 cat >>confdefs.h <<\EOF
19026 #define HAVE__TRACEF 1
19027 EOF
19028
19029 else
19030         LIB_TRACING=DEBUG
19031         ADA_TRACE=FALSE
19032 fi
19033
19034 echo "$as_me:19034: checking if we want to use GNAT projects" >&5
19035 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
19036
19037 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
19038 if test "${enable_gnat_projects+set}" = set; then
19039   enableval="$enable_gnat_projects"
19040   test "$enableval" != no && enableval=yes
19041         if test "$enableval" != "yes" ; then
19042     enable_gnat_projects=no
19043         else
19044                 enable_gnat_projects=yes
19045         fi
19046 else
19047   enableval=yes
19048         enable_gnat_projects=yes
19049
19050 fi;
19051 echo "$as_me:19051: result: $enable_gnat_projects" >&5
19052 echo "${ECHO_T}$enable_gnat_projects" >&6
19053
19054 ###     Checks for libraries.
19055 case "$cf_cv_system_name" in
19056 (*mingw32*|*mingw64*)
19057         # Note: WINVER may be a problem with Windows 10
19058         if test "x$with_exp_win32" = xyes ; then
19059                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
19060         else
19061                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
19062         fi
19063
19064 echo "$as_me:19064: checking if ssp library is needed" >&5
19065 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
19066 if test "${cf_cv_need_libssp+set}" = set; then
19067   echo $ECHO_N "(cached) $ECHO_C" >&6
19068 else
19069
19070 cat >"conftest.$ac_ext" <<_ACEOF
19071 #line 19071 "configure"
19072 #include "confdefs.h"
19073
19074 #include <sys/types.h>
19075 #include <dirent.h>
19076
19077 int
19078 main (void)
19079 {
19080
19081        DIR *dp = opendir(".");
19082
19083   ;
19084   return 0;
19085 }
19086 _ACEOF
19087 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19088 if { (eval echo "$as_me:19088: \"$ac_link\"") >&5
19089   (eval $ac_link) 2>&5
19090   ac_status=$?
19091   echo "$as_me:19091: \$? = $ac_status" >&5
19092   (exit "$ac_status"); } &&
19093          { ac_try='test -s "conftest$ac_exeext"'
19094   { (eval echo "$as_me:19094: \"$ac_try\"") >&5
19095   (eval $ac_try) 2>&5
19096   ac_status=$?
19097   echo "$as_me:19097: \$? = $ac_status" >&5
19098   (exit "$ac_status"); }; }; then
19099   cf_cv_need_libssp=no
19100 else
19101   echo "$as_me: failed program was:" >&5
19102 cat "conftest.$ac_ext" >&5
19103
19104         cf_save_LIBS="$LIBS"
19105         LIBS="$LIBS -lssp"
19106         cat >"conftest.$ac_ext" <<_ACEOF
19107 #line 19107 "configure"
19108 #include "confdefs.h"
19109
19110 #include <sys/types.h>
19111 #include <dirent.h>
19112
19113 int
19114 main (void)
19115 {
19116
19117                    DIR *dp = opendir(".");
19118
19119   ;
19120   return 0;
19121 }
19122 _ACEOF
19123 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19124 if { (eval echo "$as_me:19124: \"$ac_link\"") >&5
19125   (eval $ac_link) 2>&5
19126   ac_status=$?
19127   echo "$as_me:19127: \$? = $ac_status" >&5
19128   (exit "$ac_status"); } &&
19129          { ac_try='test -s "conftest$ac_exeext"'
19130   { (eval echo "$as_me:19130: \"$ac_try\"") >&5
19131   (eval $ac_try) 2>&5
19132   ac_status=$?
19133   echo "$as_me:19133: \$? = $ac_status" >&5
19134   (exit "$ac_status"); }; }; then
19135   cf_cv_need_libssp=yes
19136 else
19137   echo "$as_me: failed program was:" >&5
19138 cat "conftest.$ac_ext" >&5
19139 cf_cv_need_libssp=maybe
19140 fi
19141 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19142         LIBS="$cf_save_LIBS"
19143
19144 fi
19145 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19146 fi
19147 echo "$as_me:19147: result: $cf_cv_need_libssp" >&5
19148 echo "${ECHO_T}$cf_cv_need_libssp" >&6
19149
19150 if test "x$cf_cv_need_libssp" = xyes
19151 then
19152
19153 cf_add_libs="$LIBS"
19154 # reverse order
19155 cf_add_0lib=
19156 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19157 # filter duplicates
19158 for cf_add_1lib in $cf_add_0lib; do
19159         for cf_add_2lib in $cf_add_libs; do
19160                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19161                         cf_add_1lib=
19162                         break
19163                 fi
19164         done
19165         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19166 done
19167 LIBS="$cf_add_libs"
19168
19169 fi
19170
19171         ;;
19172 (*)
19173 echo "$as_me:19173: checking for gettimeofday" >&5
19174 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
19175 if test "${ac_cv_func_gettimeofday+set}" = set; then
19176   echo $ECHO_N "(cached) $ECHO_C" >&6
19177 else
19178   cat >"conftest.$ac_ext" <<_ACEOF
19179 #line 19179 "configure"
19180 #include "confdefs.h"
19181 #define gettimeofday autoconf_temporary
19182 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19183 #undef gettimeofday
19184
19185 #ifdef __cplusplus
19186 extern "C"
19187 #endif
19188
19189 /* We use char because int might match the return type of a gcc2
19190    builtin and then its argument prototype would still apply.  */
19191 char gettimeofday (void);
19192
19193 int
19194 main (void)
19195 {
19196
19197 /* The GNU C library defines stubs for functions which it implements
19198     to always fail with ENOSYS.  Some functions are actually named
19199     something starting with __ and the normal name is an alias.  */
19200 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
19201 #error found stub for gettimeofday
19202 #endif
19203
19204         return gettimeofday ();
19205   ;
19206   return 0;
19207 }
19208 _ACEOF
19209 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19210 if { (eval echo "$as_me:19210: \"$ac_link\"") >&5
19211   (eval $ac_link) 2>&5
19212   ac_status=$?
19213   echo "$as_me:19213: \$? = $ac_status" >&5
19214   (exit "$ac_status"); } &&
19215          { ac_try='test -s "conftest$ac_exeext"'
19216   { (eval echo "$as_me:19216: \"$ac_try\"") >&5
19217   (eval $ac_try) 2>&5
19218   ac_status=$?
19219   echo "$as_me:19219: \$? = $ac_status" >&5
19220   (exit "$ac_status"); }; }; then
19221   ac_cv_func_gettimeofday=yes
19222 else
19223   echo "$as_me: failed program was:" >&5
19224 cat "conftest.$ac_ext" >&5
19225 ac_cv_func_gettimeofday=no
19226 fi
19227 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19228 fi
19229 echo "$as_me:19229: result: $ac_cv_func_gettimeofday" >&5
19230 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
19231 if test "$ac_cv_func_gettimeofday" = yes; then
19232
19233 cat >>confdefs.h <<\EOF
19234 #define HAVE_GETTIMEOFDAY 1
19235 EOF
19236
19237 else
19238
19239 echo "$as_me:19239: checking for gettimeofday in -lbsd" >&5
19240 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
19241 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
19242   echo $ECHO_N "(cached) $ECHO_C" >&6
19243 else
19244   ac_check_lib_save_LIBS=$LIBS
19245 LIBS="-lbsd  $LIBS"
19246 cat >"conftest.$ac_ext" <<_ACEOF
19247 #line 19247 "configure"
19248 #include "confdefs.h"
19249
19250 /* Override any gcc2 internal prototype to avoid an error.  */
19251 #ifdef __cplusplus
19252 extern "C"
19253 #endif
19254 /* We use char because int might match the return type of a gcc2
19255    builtin and then its argument prototype would still apply.  */
19256 char gettimeofday ();
19257 int
19258 main (void)
19259 {
19260 gettimeofday ();
19261   ;
19262   return 0;
19263 }
19264 _ACEOF
19265 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19266 if { (eval echo "$as_me:19266: \"$ac_link\"") >&5
19267   (eval $ac_link) 2>&5
19268   ac_status=$?
19269   echo "$as_me:19269: \$? = $ac_status" >&5
19270   (exit "$ac_status"); } &&
19271          { ac_try='test -s "conftest$ac_exeext"'
19272   { (eval echo "$as_me:19272: \"$ac_try\"") >&5
19273   (eval $ac_try) 2>&5
19274   ac_status=$?
19275   echo "$as_me:19275: \$? = $ac_status" >&5
19276   (exit "$ac_status"); }; }; then
19277   ac_cv_lib_bsd_gettimeofday=yes
19278 else
19279   echo "$as_me: failed program was:" >&5
19280 cat "conftest.$ac_ext" >&5
19281 ac_cv_lib_bsd_gettimeofday=no
19282 fi
19283 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19284 LIBS=$ac_check_lib_save_LIBS
19285 fi
19286 echo "$as_me:19286: result: $ac_cv_lib_bsd_gettimeofday" >&5
19287 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
19288 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
19289
19290 cat >>confdefs.h <<\EOF
19291 #define HAVE_GETTIMEOFDAY 1
19292 EOF
19293
19294 cf_add_libs="$LIBS"
19295 # reverse order
19296 cf_add_0lib=
19297 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19298 # filter duplicates
19299 for cf_add_1lib in $cf_add_0lib; do
19300         for cf_add_2lib in $cf_add_libs; do
19301                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19302                         cf_add_1lib=
19303                         break
19304                 fi
19305         done
19306         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19307 done
19308 LIBS="$cf_add_libs"
19309
19310 fi
19311
19312 fi
19313         ;;
19314 esac
19315
19316 echo "$as_me:19316: checking if -lm needed for math functions" >&5
19317 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
19318 if test "${cf_cv_need_libm+set}" = set; then
19319   echo $ECHO_N "(cached) $ECHO_C" >&6
19320 else
19321
19322         cat >"conftest.$ac_ext" <<_ACEOF
19323 #line 19323 "configure"
19324 #include "confdefs.h"
19325
19326                 #include <stdio.h>
19327                 #include <stdlib.h>
19328                 #include <math.h>
19329
19330 int
19331 main (void)
19332 {
19333 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19334   ;
19335   return 0;
19336 }
19337 _ACEOF
19338 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19339 if { (eval echo "$as_me:19339: \"$ac_link\"") >&5
19340   (eval $ac_link) 2>&5
19341   ac_status=$?
19342   echo "$as_me:19342: \$? = $ac_status" >&5
19343   (exit "$ac_status"); } &&
19344          { ac_try='test -s "conftest$ac_exeext"'
19345   { (eval echo "$as_me:19345: \"$ac_try\"") >&5
19346   (eval $ac_try) 2>&5
19347   ac_status=$?
19348   echo "$as_me:19348: \$? = $ac_status" >&5
19349   (exit "$ac_status"); }; }; then
19350   cf_cv_need_libm=no
19351 else
19352   echo "$as_me: failed program was:" >&5
19353 cat "conftest.$ac_ext" >&5
19354 cf_cv_need_libm=yes
19355 fi
19356 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19357 fi
19358 echo "$as_me:19358: result: $cf_cv_need_libm" >&5
19359 echo "${ECHO_T}$cf_cv_need_libm" >&6
19360
19361 if test "$cf_cv_need_libm" = yes
19362 then
19363
19364         cf_save_LIBS="$LIBS"
19365         LIBS="$LIBS -lm"
19366         echo "$as_me:19366: checking if -lm is available for math functions" >&5
19367 echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6
19368 if test "${cf_cv_have_libm+set}" = set; then
19369   echo $ECHO_N "(cached) $ECHO_C" >&6
19370 else
19371
19372         cat >"conftest.$ac_ext" <<_ACEOF
19373 #line 19373 "configure"
19374 #include "confdefs.h"
19375
19376                 #include <stdio.h>
19377                 #include <stdlib.h>
19378                 #include <math.h>
19379
19380 int
19381 main (void)
19382 {
19383 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19384   ;
19385   return 0;
19386 }
19387 _ACEOF
19388 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19389 if { (eval echo "$as_me:19389: \"$ac_link\"") >&5
19390   (eval $ac_link) 2>&5
19391   ac_status=$?
19392   echo "$as_me:19392: \$? = $ac_status" >&5
19393   (exit "$ac_status"); } &&
19394          { ac_try='test -s "conftest$ac_exeext"'
19395   { (eval echo "$as_me:19395: \"$ac_try\"") >&5
19396   (eval $ac_try) 2>&5
19397   ac_status=$?
19398   echo "$as_me:19398: \$? = $ac_status" >&5
19399   (exit "$ac_status"); }; }; then
19400   cf_cv_have_libm=yes
19401 else
19402   echo "$as_me: failed program was:" >&5
19403 cat "conftest.$ac_ext" >&5
19404 cf_cv_have_libm=no
19405 fi
19406 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19407 fi
19408 echo "$as_me:19408: result: $cf_cv_have_libm" >&5
19409 echo "${ECHO_T}$cf_cv_have_libm" >&6
19410         LIBS="$cf_save_LIBS"
19411
19412         if test "$cf_cv_have_libm" = yes
19413         then
19414                 MATH_LIB=-lm
19415         fi
19416 else
19417         cf_cv_have_libm=yes
19418 fi
19419
19420 if test "$cf_cv_have_libm" = yes
19421 then
19422
19423 cat >>confdefs.h <<\EOF
19424 #define HAVE_MATH_FUNCS 1
19425 EOF
19426
19427 fi
19428
19429 ###     Checks for header files.
19430 echo "$as_me:19430: checking whether time.h and sys/time.h may both be included" >&5
19431 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
19432 if test "${ac_cv_header_time+set}" = set; then
19433   echo $ECHO_N "(cached) $ECHO_C" >&6
19434 else
19435   cat >"conftest.$ac_ext" <<_ACEOF
19436 #line 19436 "configure"
19437 #include "confdefs.h"
19438 #include <sys/types.h>
19439 #include <sys/time.h>
19440 #include <time.h>
19441
19442 int
19443 main (void)
19444 {
19445 if ((struct tm *) 0)
19446 return 0;
19447   ;
19448   return 0;
19449 }
19450 _ACEOF
19451 rm -f "conftest.$ac_objext"
19452 if { (eval echo "$as_me:19452: \"$ac_compile\"") >&5
19453   (eval $ac_compile) 2>&5
19454   ac_status=$?
19455   echo "$as_me:19455: \$? = $ac_status" >&5
19456   (exit "$ac_status"); } &&
19457          { ac_try='test -s "conftest.$ac_objext"'
19458   { (eval echo "$as_me:19458: \"$ac_try\"") >&5
19459   (eval $ac_try) 2>&5
19460   ac_status=$?
19461   echo "$as_me:19461: \$? = $ac_status" >&5
19462   (exit "$ac_status"); }; }; then
19463   ac_cv_header_time=yes
19464 else
19465   echo "$as_me: failed program was:" >&5
19466 cat "conftest.$ac_ext" >&5
19467 ac_cv_header_time=no
19468 fi
19469 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19470 fi
19471 echo "$as_me:19471: result: $ac_cv_header_time" >&5
19472 echo "${ECHO_T}$ac_cv_header_time" >&6
19473 if test $ac_cv_header_time = yes; then
19474
19475 cat >>confdefs.h <<\EOF
19476 #define TIME_WITH_SYS_TIME 1
19477 EOF
19478
19479 fi
19480
19481 cf_regex_func=no
19482 cf_regex_libs=
19483 case "$host_os" in
19484 (mingw*)
19485         # -lsystre -ltre -lintl -liconv
19486         echo "$as_me:19486: checking for regcomp in -lsystre" >&5
19487 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19488 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
19489   echo $ECHO_N "(cached) $ECHO_C" >&6
19490 else
19491   ac_check_lib_save_LIBS=$LIBS
19492 LIBS="-lsystre  $LIBS"
19493 cat >"conftest.$ac_ext" <<_ACEOF
19494 #line 19494 "configure"
19495 #include "confdefs.h"
19496
19497 /* Override any gcc2 internal prototype to avoid an error.  */
19498 #ifdef __cplusplus
19499 extern "C"
19500 #endif
19501 /* We use char because int might match the return type of a gcc2
19502    builtin and then its argument prototype would still apply.  */
19503 char regcomp ();
19504 int
19505 main (void)
19506 {
19507 regcomp ();
19508   ;
19509   return 0;
19510 }
19511 _ACEOF
19512 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19513 if { (eval echo "$as_me:19513: \"$ac_link\"") >&5
19514   (eval $ac_link) 2>&5
19515   ac_status=$?
19516   echo "$as_me:19516: \$? = $ac_status" >&5
19517   (exit "$ac_status"); } &&
19518          { ac_try='test -s "conftest$ac_exeext"'
19519   { (eval echo "$as_me:19519: \"$ac_try\"") >&5
19520   (eval $ac_try) 2>&5
19521   ac_status=$?
19522   echo "$as_me:19522: \$? = $ac_status" >&5
19523   (exit "$ac_status"); }; }; then
19524   ac_cv_lib_systre_regcomp=yes
19525 else
19526   echo "$as_me: failed program was:" >&5
19527 cat "conftest.$ac_ext" >&5
19528 ac_cv_lib_systre_regcomp=no
19529 fi
19530 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19531 LIBS=$ac_check_lib_save_LIBS
19532 fi
19533 echo "$as_me:19533: result: $ac_cv_lib_systre_regcomp" >&5
19534 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19535 if test "$ac_cv_lib_systre_regcomp" = yes; then
19536
19537                 echo "$as_me:19537: checking for libiconv_open in -liconv" >&5
19538 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19539 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19540   echo $ECHO_N "(cached) $ECHO_C" >&6
19541 else
19542   ac_check_lib_save_LIBS=$LIBS
19543 LIBS="-liconv  $LIBS"
19544 cat >"conftest.$ac_ext" <<_ACEOF
19545 #line 19545 "configure"
19546 #include "confdefs.h"
19547
19548 /* Override any gcc2 internal prototype to avoid an error.  */
19549 #ifdef __cplusplus
19550 extern "C"
19551 #endif
19552 /* We use char because int might match the return type of a gcc2
19553    builtin and then its argument prototype would still apply.  */
19554 char libiconv_open ();
19555 int
19556 main (void)
19557 {
19558 libiconv_open ();
19559   ;
19560   return 0;
19561 }
19562 _ACEOF
19563 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19564 if { (eval echo "$as_me:19564: \"$ac_link\"") >&5
19565   (eval $ac_link) 2>&5
19566   ac_status=$?
19567   echo "$as_me:19567: \$? = $ac_status" >&5
19568   (exit "$ac_status"); } &&
19569          { ac_try='test -s "conftest$ac_exeext"'
19570   { (eval echo "$as_me:19570: \"$ac_try\"") >&5
19571   (eval $ac_try) 2>&5
19572   ac_status=$?
19573   echo "$as_me:19573: \$? = $ac_status" >&5
19574   (exit "$ac_status"); }; }; then
19575   ac_cv_lib_iconv_libiconv_open=yes
19576 else
19577   echo "$as_me: failed program was:" >&5
19578 cat "conftest.$ac_ext" >&5
19579 ac_cv_lib_iconv_libiconv_open=no
19580 fi
19581 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19582 LIBS=$ac_check_lib_save_LIBS
19583 fi
19584 echo "$as_me:19584: result: $ac_cv_lib_iconv_libiconv_open" >&5
19585 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19586 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19587
19588 cf_add_libs="$LIBS"
19589 # reverse order
19590 cf_add_0lib=
19591 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19592 # filter duplicates
19593 for cf_add_1lib in $cf_add_0lib; do
19594         for cf_add_2lib in $cf_add_libs; do
19595                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19596                         cf_add_1lib=
19597                         break
19598                 fi
19599         done
19600         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19601 done
19602 LIBS="$cf_add_libs"
19603
19604 fi
19605
19606                 echo "$as_me:19606: checking for libintl_gettext in -lintl" >&5
19607 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19608 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19609   echo $ECHO_N "(cached) $ECHO_C" >&6
19610 else
19611   ac_check_lib_save_LIBS=$LIBS
19612 LIBS="-lintl  $LIBS"
19613 cat >"conftest.$ac_ext" <<_ACEOF
19614 #line 19614 "configure"
19615 #include "confdefs.h"
19616
19617 /* Override any gcc2 internal prototype to avoid an error.  */
19618 #ifdef __cplusplus
19619 extern "C"
19620 #endif
19621 /* We use char because int might match the return type of a gcc2
19622    builtin and then its argument prototype would still apply.  */
19623 char libintl_gettext ();
19624 int
19625 main (void)
19626 {
19627 libintl_gettext ();
19628   ;
19629   return 0;
19630 }
19631 _ACEOF
19632 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19633 if { (eval echo "$as_me:19633: \"$ac_link\"") >&5
19634   (eval $ac_link) 2>&5
19635   ac_status=$?
19636   echo "$as_me:19636: \$? = $ac_status" >&5
19637   (exit "$ac_status"); } &&
19638          { ac_try='test -s "conftest$ac_exeext"'
19639   { (eval echo "$as_me:19639: \"$ac_try\"") >&5
19640   (eval $ac_try) 2>&5
19641   ac_status=$?
19642   echo "$as_me:19642: \$? = $ac_status" >&5
19643   (exit "$ac_status"); }; }; then
19644   ac_cv_lib_intl_libintl_gettext=yes
19645 else
19646   echo "$as_me: failed program was:" >&5
19647 cat "conftest.$ac_ext" >&5
19648 ac_cv_lib_intl_libintl_gettext=no
19649 fi
19650 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19651 LIBS=$ac_check_lib_save_LIBS
19652 fi
19653 echo "$as_me:19653: result: $ac_cv_lib_intl_libintl_gettext" >&5
19654 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19655 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19656
19657 cf_add_libs="$LIBS"
19658 # reverse order
19659 cf_add_0lib=
19660 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19661 # filter duplicates
19662 for cf_add_1lib in $cf_add_0lib; do
19663         for cf_add_2lib in $cf_add_libs; do
19664                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19665                         cf_add_1lib=
19666                         break
19667                 fi
19668         done
19669         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19670 done
19671 LIBS="$cf_add_libs"
19672
19673 fi
19674
19675                 echo "$as_me:19675: checking for tre_regcomp in -ltre" >&5
19676 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19677 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19678   echo $ECHO_N "(cached) $ECHO_C" >&6
19679 else
19680   ac_check_lib_save_LIBS=$LIBS
19681 LIBS="-ltre  $LIBS"
19682 cat >"conftest.$ac_ext" <<_ACEOF
19683 #line 19683 "configure"
19684 #include "confdefs.h"
19685
19686 /* Override any gcc2 internal prototype to avoid an error.  */
19687 #ifdef __cplusplus
19688 extern "C"
19689 #endif
19690 /* We use char because int might match the return type of a gcc2
19691    builtin and then its argument prototype would still apply.  */
19692 char tre_regcomp ();
19693 int
19694 main (void)
19695 {
19696 tre_regcomp ();
19697   ;
19698   return 0;
19699 }
19700 _ACEOF
19701 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19702 if { (eval echo "$as_me:19702: \"$ac_link\"") >&5
19703   (eval $ac_link) 2>&5
19704   ac_status=$?
19705   echo "$as_me:19705: \$? = $ac_status" >&5
19706   (exit "$ac_status"); } &&
19707          { ac_try='test -s "conftest$ac_exeext"'
19708   { (eval echo "$as_me:19708: \"$ac_try\"") >&5
19709   (eval $ac_try) 2>&5
19710   ac_status=$?
19711   echo "$as_me:19711: \$? = $ac_status" >&5
19712   (exit "$ac_status"); }; }; then
19713   ac_cv_lib_tre_tre_regcomp=yes
19714 else
19715   echo "$as_me: failed program was:" >&5
19716 cat "conftest.$ac_ext" >&5
19717 ac_cv_lib_tre_tre_regcomp=no
19718 fi
19719 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19720 LIBS=$ac_check_lib_save_LIBS
19721 fi
19722 echo "$as_me:19722: result: $ac_cv_lib_tre_tre_regcomp" >&5
19723 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19724 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19725
19726 cf_add_libs="$LIBS"
19727 # reverse order
19728 cf_add_0lib=
19729 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19730 # filter duplicates
19731 for cf_add_1lib in $cf_add_0lib; do
19732         for cf_add_2lib in $cf_add_libs; do
19733                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19734                         cf_add_1lib=
19735                         break
19736                 fi
19737         done
19738         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19739 done
19740 LIBS="$cf_add_libs"
19741
19742 fi
19743
19744 cf_add_libs="$LIBS"
19745 # reverse order
19746 cf_add_0lib=
19747 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19748 # filter duplicates
19749 for cf_add_1lib in $cf_add_0lib; do
19750         for cf_add_2lib in $cf_add_libs; do
19751                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19752                         cf_add_1lib=
19753                         break
19754                 fi
19755         done
19756         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19757 done
19758 LIBS="$cf_add_libs"
19759
19760                 cf_regex_func=regcomp
19761
19762 else
19763
19764                 echo "$as_me:19764: checking for regcomp in -lgnurx" >&5
19765 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19766 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19767   echo $ECHO_N "(cached) $ECHO_C" >&6
19768 else
19769   ac_check_lib_save_LIBS=$LIBS
19770 LIBS="-lgnurx  $LIBS"
19771 cat >"conftest.$ac_ext" <<_ACEOF
19772 #line 19772 "configure"
19773 #include "confdefs.h"
19774
19775 /* Override any gcc2 internal prototype to avoid an error.  */
19776 #ifdef __cplusplus
19777 extern "C"
19778 #endif
19779 /* We use char because int might match the return type of a gcc2
19780    builtin and then its argument prototype would still apply.  */
19781 char regcomp ();
19782 int
19783 main (void)
19784 {
19785 regcomp ();
19786   ;
19787   return 0;
19788 }
19789 _ACEOF
19790 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19791 if { (eval echo "$as_me:19791: \"$ac_link\"") >&5
19792   (eval $ac_link) 2>&5
19793   ac_status=$?
19794   echo "$as_me:19794: \$? = $ac_status" >&5
19795   (exit "$ac_status"); } &&
19796          { ac_try='test -s "conftest$ac_exeext"'
19797   { (eval echo "$as_me:19797: \"$ac_try\"") >&5
19798   (eval $ac_try) 2>&5
19799   ac_status=$?
19800   echo "$as_me:19800: \$? = $ac_status" >&5
19801   (exit "$ac_status"); }; }; then
19802   ac_cv_lib_gnurx_regcomp=yes
19803 else
19804   echo "$as_me: failed program was:" >&5
19805 cat "conftest.$ac_ext" >&5
19806 ac_cv_lib_gnurx_regcomp=no
19807 fi
19808 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19809 LIBS=$ac_check_lib_save_LIBS
19810 fi
19811 echo "$as_me:19811: result: $ac_cv_lib_gnurx_regcomp" >&5
19812 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19813 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19814
19815 cf_add_libs="$LIBS"
19816 # reverse order
19817 cf_add_0lib=
19818 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19819 # filter duplicates
19820 for cf_add_1lib in $cf_add_0lib; do
19821         for cf_add_2lib in $cf_add_libs; do
19822                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19823                         cf_add_1lib=
19824                         break
19825                 fi
19826         done
19827         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19828 done
19829 LIBS="$cf_add_libs"
19830
19831                         cf_regex_func=regcomp
19832 fi
19833
19834 fi
19835
19836         ;;
19837 (*)
19838         cf_regex_libs="regex re"
19839         echo "$as_me:19839: checking for regcomp" >&5
19840 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19841 if test "${ac_cv_func_regcomp+set}" = set; then
19842   echo $ECHO_N "(cached) $ECHO_C" >&6
19843 else
19844   cat >"conftest.$ac_ext" <<_ACEOF
19845 #line 19845 "configure"
19846 #include "confdefs.h"
19847 #define regcomp autoconf_temporary
19848 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19849 #undef regcomp
19850
19851 #ifdef __cplusplus
19852 extern "C"
19853 #endif
19854
19855 /* We use char because int might match the return type of a gcc2
19856    builtin and then its argument prototype would still apply.  */
19857 char regcomp (void);
19858
19859 int
19860 main (void)
19861 {
19862
19863 /* The GNU C library defines stubs for functions which it implements
19864     to always fail with ENOSYS.  Some functions are actually named
19865     something starting with __ and the normal name is an alias.  */
19866 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19867 #error found stub for regcomp
19868 #endif
19869
19870         return regcomp ();
19871   ;
19872   return 0;
19873 }
19874 _ACEOF
19875 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19876 if { (eval echo "$as_me:19876: \"$ac_link\"") >&5
19877   (eval $ac_link) 2>&5
19878   ac_status=$?
19879   echo "$as_me:19879: \$? = $ac_status" >&5
19880   (exit "$ac_status"); } &&
19881          { ac_try='test -s "conftest$ac_exeext"'
19882   { (eval echo "$as_me:19882: \"$ac_try\"") >&5
19883   (eval $ac_try) 2>&5
19884   ac_status=$?
19885   echo "$as_me:19885: \$? = $ac_status" >&5
19886   (exit "$ac_status"); }; }; then
19887   ac_cv_func_regcomp=yes
19888 else
19889   echo "$as_me: failed program was:" >&5
19890 cat "conftest.$ac_ext" >&5
19891 ac_cv_func_regcomp=no
19892 fi
19893 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19894 fi
19895 echo "$as_me:19895: result: $ac_cv_func_regcomp" >&5
19896 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19897 if test "$ac_cv_func_regcomp" = yes; then
19898   cf_regex_func=regcomp
19899 else
19900
19901                 for cf_regex_lib in $cf_regex_libs
19902                 do
19903                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19904 echo "$as_me:19904: checking for regcomp in -l$cf_regex_lib" >&5
19905 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19906 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19907   echo $ECHO_N "(cached) $ECHO_C" >&6
19908 else
19909   ac_check_lib_save_LIBS=$LIBS
19910 LIBS="-l$cf_regex_lib  $LIBS"
19911 cat >"conftest.$ac_ext" <<_ACEOF
19912 #line 19912 "configure"
19913 #include "confdefs.h"
19914
19915 /* Override any gcc2 internal prototype to avoid an error.  */
19916 #ifdef __cplusplus
19917 extern "C"
19918 #endif
19919 /* We use char because int might match the return type of a gcc2
19920    builtin and then its argument prototype would still apply.  */
19921 char regcomp ();
19922 int
19923 main (void)
19924 {
19925 regcomp ();
19926   ;
19927   return 0;
19928 }
19929 _ACEOF
19930 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19931 if { (eval echo "$as_me:19931: \"$ac_link\"") >&5
19932   (eval $ac_link) 2>&5
19933   ac_status=$?
19934   echo "$as_me:19934: \$? = $ac_status" >&5
19935   (exit "$ac_status"); } &&
19936          { ac_try='test -s "conftest$ac_exeext"'
19937   { (eval echo "$as_me:19937: \"$ac_try\"") >&5
19938   (eval $ac_try) 2>&5
19939   ac_status=$?
19940   echo "$as_me:19940: \$? = $ac_status" >&5
19941   (exit "$ac_status"); }; }; then
19942   eval "$as_ac_Lib=yes"
19943 else
19944   echo "$as_me: failed program was:" >&5
19945 cat "conftest.$ac_ext" >&5
19946 eval "$as_ac_Lib=no"
19947 fi
19948 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19949 LIBS=$ac_check_lib_save_LIBS
19950 fi
19951 echo "$as_me:19951: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19952 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19953 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19954
19955 cf_add_libs="$LIBS"
19956 # reverse order
19957 cf_add_0lib=
19958 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19959 # filter duplicates
19960 for cf_add_1lib in $cf_add_0lib; do
19961         for cf_add_2lib in $cf_add_libs; do
19962                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19963                         cf_add_1lib=
19964                         break
19965                 fi
19966         done
19967         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19968 done
19969 LIBS="$cf_add_libs"
19970
19971                                         cf_regex_func=regcomp
19972                                         break
19973 fi
19974
19975                 done
19976
19977 fi
19978
19979         ;;
19980 esac
19981
19982 if test "$cf_regex_func" = no ; then
19983         echo "$as_me:19983: checking for compile" >&5
19984 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19985 if test "${ac_cv_func_compile+set}" = set; then
19986   echo $ECHO_N "(cached) $ECHO_C" >&6
19987 else
19988   cat >"conftest.$ac_ext" <<_ACEOF
19989 #line 19989 "configure"
19990 #include "confdefs.h"
19991 #define compile autoconf_temporary
19992 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19993 #undef compile
19994
19995 #ifdef __cplusplus
19996 extern "C"
19997 #endif
19998
19999 /* We use char because int might match the return type of a gcc2
20000    builtin and then its argument prototype would still apply.  */
20001 char compile (void);
20002
20003 int
20004 main (void)
20005 {
20006
20007 /* The GNU C library defines stubs for functions which it implements
20008     to always fail with ENOSYS.  Some functions are actually named
20009     something starting with __ and the normal name is an alias.  */
20010 #if defined (__stub_compile) || defined (__stub___compile)
20011 #error found stub for compile
20012 #endif
20013
20014         return compile ();
20015   ;
20016   return 0;
20017 }
20018 _ACEOF
20019 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20020 if { (eval echo "$as_me:20020: \"$ac_link\"") >&5
20021   (eval $ac_link) 2>&5
20022   ac_status=$?
20023   echo "$as_me:20023: \$? = $ac_status" >&5
20024   (exit "$ac_status"); } &&
20025          { ac_try='test -s "conftest$ac_exeext"'
20026   { (eval echo "$as_me:20026: \"$ac_try\"") >&5
20027   (eval $ac_try) 2>&5
20028   ac_status=$?
20029   echo "$as_me:20029: \$? = $ac_status" >&5
20030   (exit "$ac_status"); }; }; then
20031   ac_cv_func_compile=yes
20032 else
20033   echo "$as_me: failed program was:" >&5
20034 cat "conftest.$ac_ext" >&5
20035 ac_cv_func_compile=no
20036 fi
20037 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20038 fi
20039 echo "$as_me:20039: result: $ac_cv_func_compile" >&5
20040 echo "${ECHO_T}$ac_cv_func_compile" >&6
20041 if test "$ac_cv_func_compile" = yes; then
20042   cf_regex_func=compile
20043 else
20044
20045                 echo "$as_me:20045: checking for compile in -lgen" >&5
20046 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
20047 if test "${ac_cv_lib_gen_compile+set}" = set; then
20048   echo $ECHO_N "(cached) $ECHO_C" >&6
20049 else
20050   ac_check_lib_save_LIBS=$LIBS
20051 LIBS="-lgen  $LIBS"
20052 cat >"conftest.$ac_ext" <<_ACEOF
20053 #line 20053 "configure"
20054 #include "confdefs.h"
20055
20056 /* Override any gcc2 internal prototype to avoid an error.  */
20057 #ifdef __cplusplus
20058 extern "C"
20059 #endif
20060 /* We use char because int might match the return type of a gcc2
20061    builtin and then its argument prototype would still apply.  */
20062 char compile ();
20063 int
20064 main (void)
20065 {
20066 compile ();
20067   ;
20068   return 0;
20069 }
20070 _ACEOF
20071 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20072 if { (eval echo "$as_me:20072: \"$ac_link\"") >&5
20073   (eval $ac_link) 2>&5
20074   ac_status=$?
20075   echo "$as_me:20075: \$? = $ac_status" >&5
20076   (exit "$ac_status"); } &&
20077          { ac_try='test -s "conftest$ac_exeext"'
20078   { (eval echo "$as_me:20078: \"$ac_try\"") >&5
20079   (eval $ac_try) 2>&5
20080   ac_status=$?
20081   echo "$as_me:20081: \$? = $ac_status" >&5
20082   (exit "$ac_status"); }; }; then
20083   ac_cv_lib_gen_compile=yes
20084 else
20085   echo "$as_me: failed program was:" >&5
20086 cat "conftest.$ac_ext" >&5
20087 ac_cv_lib_gen_compile=no
20088 fi
20089 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20090 LIBS=$ac_check_lib_save_LIBS
20091 fi
20092 echo "$as_me:20092: result: $ac_cv_lib_gen_compile" >&5
20093 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
20094 if test "$ac_cv_lib_gen_compile" = yes; then
20095
20096 cf_add_libs="$LIBS"
20097 # reverse order
20098 cf_add_0lib=
20099 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20100 # filter duplicates
20101 for cf_add_1lib in $cf_add_0lib; do
20102         for cf_add_2lib in $cf_add_libs; do
20103                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20104                         cf_add_1lib=
20105                         break
20106                 fi
20107         done
20108         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20109 done
20110 LIBS="$cf_add_libs"
20111
20112                                 cf_regex_func=compile
20113 fi
20114
20115 fi
20116
20117 fi
20118
20119 if test "$cf_regex_func" = no ; then
20120         { echo "$as_me:20120: WARNING: cannot find regular expression library" >&5
20121 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
20122 fi
20123
20124 echo "$as_me:20124: checking for regular-expression headers" >&5
20125 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
20126 if test "${cf_cv_regex_hdrs+set}" = set; then
20127   echo $ECHO_N "(cached) $ECHO_C" >&6
20128 else
20129
20130 cf_cv_regex_hdrs=no
20131 case "$cf_regex_func" in
20132 (compile)
20133         for cf_regex_hdr in regexp.h regexpr.h
20134         do
20135                 cat >"conftest.$ac_ext" <<_ACEOF
20136 #line 20136 "configure"
20137 #include "confdefs.h"
20138 #include <$cf_regex_hdr>
20139 int
20140 main (void)
20141 {
20142
20143                         char *p = compile("", "", "", 0);
20144                         int x = step("", "");
20145                         (void)p;
20146                         (void)x;
20147
20148   ;
20149   return 0;
20150 }
20151 _ACEOF
20152 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20153 if { (eval echo "$as_me:20153: \"$ac_link\"") >&5
20154   (eval $ac_link) 2>&5
20155   ac_status=$?
20156   echo "$as_me:20156: \$? = $ac_status" >&5
20157   (exit "$ac_status"); } &&
20158          { ac_try='test -s "conftest$ac_exeext"'
20159   { (eval echo "$as_me:20159: \"$ac_try\"") >&5
20160   (eval $ac_try) 2>&5
20161   ac_status=$?
20162   echo "$as_me:20162: \$? = $ac_status" >&5
20163   (exit "$ac_status"); }; }; then
20164
20165                         cf_cv_regex_hdrs=$cf_regex_hdr
20166                         break
20167
20168 else
20169   echo "$as_me: failed program was:" >&5
20170 cat "conftest.$ac_ext" >&5
20171 fi
20172 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20173         done
20174         ;;
20175 (*)
20176         for cf_regex_hdr in regex.h
20177         do
20178                 cat >"conftest.$ac_ext" <<_ACEOF
20179 #line 20179 "configure"
20180 #include "confdefs.h"
20181 #include <sys/types.h>
20182 #include <$cf_regex_hdr>
20183 int
20184 main (void)
20185 {
20186
20187                         regex_t *p = 0;
20188                         int x = regcomp(p, "", 0);
20189                         int y = regexec(p, "", 0, 0, 0);
20190                         (void)x;
20191                         (void)y;
20192                         regfree(p);
20193
20194   ;
20195   return 0;
20196 }
20197 _ACEOF
20198 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20199 if { (eval echo "$as_me:20199: \"$ac_link\"") >&5
20200   (eval $ac_link) 2>&5
20201   ac_status=$?
20202   echo "$as_me:20202: \$? = $ac_status" >&5
20203   (exit "$ac_status"); } &&
20204          { ac_try='test -s "conftest$ac_exeext"'
20205   { (eval echo "$as_me:20205: \"$ac_try\"") >&5
20206   (eval $ac_try) 2>&5
20207   ac_status=$?
20208   echo "$as_me:20208: \$? = $ac_status" >&5
20209   (exit "$ac_status"); }; }; then
20210
20211                         cf_cv_regex_hdrs=$cf_regex_hdr
20212                         break
20213
20214 else
20215   echo "$as_me: failed program was:" >&5
20216 cat "conftest.$ac_ext" >&5
20217 fi
20218 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20219         done
20220         ;;
20221 esac
20222
20223 fi
20224 echo "$as_me:20224: result: $cf_cv_regex_hdrs" >&5
20225 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
20226
20227 case "$cf_cv_regex_hdrs" in
20228         (no)            { echo "$as_me:20228: WARNING: no regular expression header found" >&5
20229 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
20230         (regex.h)
20231 cat >>confdefs.h <<\EOF
20232 #define HAVE_REGEX_H_FUNCS 1
20233 EOF
20234  ;;
20235         (regexp.h)
20236 cat >>confdefs.h <<\EOF
20237 #define HAVE_REGEXP_H_FUNCS 1
20238 EOF
20239  ;;
20240         (regexpr.h)
20241 cat >>confdefs.h <<\EOF
20242 #define HAVE_REGEXPR_H_FUNCS 1
20243 EOF
20244  ;;
20245 esac
20246
20247 for ac_header in \
20248 fcntl.h \
20249 getopt.h \
20250 limits.h \
20251 locale.h \
20252 math.h \
20253 poll.h \
20254 sys/ioctl.h \
20255 sys/param.h \
20256 sys/poll.h \
20257 sys/select.h \
20258 sys/time.h \
20259 sys/times.h \
20260 unistd.h \
20261 wctype.h \
20262
20263 do
20264 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20265 echo "$as_me:20265: checking for $ac_header" >&5
20266 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20267 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20268   echo $ECHO_N "(cached) $ECHO_C" >&6
20269 else
20270   cat >"conftest.$ac_ext" <<_ACEOF
20271 #line 20271 "configure"
20272 #include "confdefs.h"
20273 #include <$ac_header>
20274 _ACEOF
20275 if { (eval echo "$as_me:20275: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20276   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20277   ac_status=$?
20278   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20279   rm -f conftest.er1
20280   cat conftest.err >&5
20281   echo "$as_me:20281: \$? = $ac_status" >&5
20282   (exit "$ac_status"); } >/dev/null; then
20283   if test -s conftest.err; then
20284     ac_cpp_err=$ac_c_preproc_warn_flag
20285   else
20286     ac_cpp_err=
20287   fi
20288 else
20289   ac_cpp_err=yes
20290 fi
20291 if test -z "$ac_cpp_err"; then
20292   eval "$as_ac_Header=yes"
20293 else
20294   echo "$as_me: failed program was:" >&5
20295   cat "conftest.$ac_ext" >&5
20296   eval "$as_ac_Header=no"
20297 fi
20298 rm -f conftest.err "conftest.$ac_ext"
20299 fi
20300 echo "$as_me:20300: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20301 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20302 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20303   cat >>confdefs.h <<EOF
20304 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20305 EOF
20306
20307 fi
20308 done
20309
20310 for ac_header in unistd.h getopt.h
20311 do
20312 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20313 echo "$as_me:20313: checking for $ac_header" >&5
20314 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20315 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20316   echo $ECHO_N "(cached) $ECHO_C" >&6
20317 else
20318   cat >"conftest.$ac_ext" <<_ACEOF
20319 #line 20319 "configure"
20320 #include "confdefs.h"
20321 #include <$ac_header>
20322 _ACEOF
20323 if { (eval echo "$as_me:20323: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20324   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20325   ac_status=$?
20326   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20327   rm -f conftest.er1
20328   cat conftest.err >&5
20329   echo "$as_me:20329: \$? = $ac_status" >&5
20330   (exit "$ac_status"); } >/dev/null; then
20331   if test -s conftest.err; then
20332     ac_cpp_err=$ac_c_preproc_warn_flag
20333   else
20334     ac_cpp_err=
20335   fi
20336 else
20337   ac_cpp_err=yes
20338 fi
20339 if test -z "$ac_cpp_err"; then
20340   eval "$as_ac_Header=yes"
20341 else
20342   echo "$as_me: failed program was:" >&5
20343   cat "conftest.$ac_ext" >&5
20344   eval "$as_ac_Header=no"
20345 fi
20346 rm -f conftest.err "conftest.$ac_ext"
20347 fi
20348 echo "$as_me:20348: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20349 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20350 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20351   cat >>confdefs.h <<EOF
20352 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20353 EOF
20354
20355 fi
20356 done
20357
20358 echo "$as_me:20358: checking for header declaring getopt variables" >&5
20359 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
20360 if test "${cf_cv_getopt_header+set}" = set; then
20361   echo $ECHO_N "(cached) $ECHO_C" >&6
20362 else
20363
20364 cf_cv_getopt_header=none
20365 for cf_header in stdio.h stdlib.h unistd.h getopt.h
20366 do
20367 cat >"conftest.$ac_ext" <<_ACEOF
20368 #line 20368 "configure"
20369 #include "confdefs.h"
20370
20371 #include <$cf_header>
20372 int
20373 main (void)
20374 {
20375 int x = optind; char *y = optarg; (void)x; (void)y
20376   ;
20377   return 0;
20378 }
20379 _ACEOF
20380 rm -f "conftest.$ac_objext"
20381 if { (eval echo "$as_me:20381: \"$ac_compile\"") >&5
20382   (eval $ac_compile) 2>&5
20383   ac_status=$?
20384   echo "$as_me:20384: \$? = $ac_status" >&5
20385   (exit "$ac_status"); } &&
20386          { ac_try='test -s "conftest.$ac_objext"'
20387   { (eval echo "$as_me:20387: \"$ac_try\"") >&5
20388   (eval $ac_try) 2>&5
20389   ac_status=$?
20390   echo "$as_me:20390: \$? = $ac_status" >&5
20391   (exit "$ac_status"); }; }; then
20392   cf_cv_getopt_header=$cf_header
20393  break
20394 else
20395   echo "$as_me: failed program was:" >&5
20396 cat "conftest.$ac_ext" >&5
20397 fi
20398 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20399 done
20400
20401 fi
20402 echo "$as_me:20402: result: $cf_cv_getopt_header" >&5
20403 echo "${ECHO_T}$cf_cv_getopt_header" >&6
20404 if test "$cf_cv_getopt_header" != none ; then
20405
20406 cat >>confdefs.h <<\EOF
20407 #define HAVE_GETOPT_HEADER 1
20408 EOF
20409
20410 fi
20411 if test "$cf_cv_getopt_header" = getopt.h ; then
20412
20413 cat >>confdefs.h <<\EOF
20414 #define NEED_GETOPT_H 1
20415 EOF
20416
20417 fi
20418
20419 echo "$as_me:20419: checking if external environ is declared" >&5
20420 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
20421 if test "${cf_cv_dcl_environ+set}" = set; then
20422   echo $ECHO_N "(cached) $ECHO_C" >&6
20423 else
20424
20425     cat >"conftest.$ac_ext" <<_ACEOF
20426 #line 20426 "configure"
20427 #include "confdefs.h"
20428
20429 #ifdef HAVE_STDLIB_H
20430 #include <stdlib.h>
20431 #endif
20432 #include <unistd.h>
20433 int
20434 main (void)
20435 {
20436 void* x = (void*) environ; (void)x
20437   ;
20438   return 0;
20439 }
20440 _ACEOF
20441 rm -f "conftest.$ac_objext"
20442 if { (eval echo "$as_me:20442: \"$ac_compile\"") >&5
20443   (eval $ac_compile) 2>&5
20444   ac_status=$?
20445   echo "$as_me:20445: \$? = $ac_status" >&5
20446   (exit "$ac_status"); } &&
20447          { ac_try='test -s "conftest.$ac_objext"'
20448   { (eval echo "$as_me:20448: \"$ac_try\"") >&5
20449   (eval $ac_try) 2>&5
20450   ac_status=$?
20451   echo "$as_me:20451: \$? = $ac_status" >&5
20452   (exit "$ac_status"); }; }; then
20453   cf_cv_dcl_environ=yes
20454 else
20455   echo "$as_me: failed program was:" >&5
20456 cat "conftest.$ac_ext" >&5
20457 cf_cv_dcl_environ=no
20458 fi
20459 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20460
20461 fi
20462 echo "$as_me:20462: result: $cf_cv_dcl_environ" >&5
20463 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20464
20465 if test "$cf_cv_dcl_environ" = no ; then
20466
20467 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20468
20469     cat >>confdefs.h <<EOF
20470 #define $cf_result 1
20471 EOF
20472
20473 fi
20474
20475 # It's possible (for near-UNIX clones) that the data doesn't exist
20476
20477 echo "$as_me:20477: checking if external environ exists" >&5
20478 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20479 if test "${cf_cv_have_environ+set}" = set; then
20480   echo $ECHO_N "(cached) $ECHO_C" >&6
20481 else
20482
20483         cat >"conftest.$ac_ext" <<_ACEOF
20484 #line 20484 "configure"
20485 #include "confdefs.h"
20486
20487 #undef environ
20488 extern int environ;
20489
20490 int
20491 main (void)
20492 {
20493 environ = 2
20494   ;
20495   return 0;
20496 }
20497 _ACEOF
20498 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20499 if { (eval echo "$as_me:20499: \"$ac_link\"") >&5
20500   (eval $ac_link) 2>&5
20501   ac_status=$?
20502   echo "$as_me:20502: \$? = $ac_status" >&5
20503   (exit "$ac_status"); } &&
20504          { ac_try='test -s "conftest$ac_exeext"'
20505   { (eval echo "$as_me:20505: \"$ac_try\"") >&5
20506   (eval $ac_try) 2>&5
20507   ac_status=$?
20508   echo "$as_me:20508: \$? = $ac_status" >&5
20509   (exit "$ac_status"); }; }; then
20510   cf_cv_have_environ=yes
20511 else
20512   echo "$as_me: failed program was:" >&5
20513 cat "conftest.$ac_ext" >&5
20514 cf_cv_have_environ=no
20515 fi
20516 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20517
20518 fi
20519 echo "$as_me:20519: result: $cf_cv_have_environ" >&5
20520 echo "${ECHO_T}$cf_cv_have_environ" >&6
20521
20522 if test "$cf_cv_have_environ" = yes ; then
20523
20524 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20525
20526         cat >>confdefs.h <<EOF
20527 #define $cf_result 1
20528 EOF
20529
20530 fi
20531
20532 echo "$as_me:20532: checking for getenv" >&5
20533 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20534 if test "${ac_cv_func_getenv+set}" = set; then
20535   echo $ECHO_N "(cached) $ECHO_C" >&6
20536 else
20537   cat >"conftest.$ac_ext" <<_ACEOF
20538 #line 20538 "configure"
20539 #include "confdefs.h"
20540 #define getenv autoconf_temporary
20541 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20542 #undef getenv
20543
20544 #ifdef __cplusplus
20545 extern "C"
20546 #endif
20547
20548 /* We use char because int might match the return type of a gcc2
20549    builtin and then its argument prototype would still apply.  */
20550 char getenv (void);
20551
20552 int
20553 main (void)
20554 {
20555
20556 /* The GNU C library defines stubs for functions which it implements
20557     to always fail with ENOSYS.  Some functions are actually named
20558     something starting with __ and the normal name is an alias.  */
20559 #if defined (__stub_getenv) || defined (__stub___getenv)
20560 #error found stub for getenv
20561 #endif
20562
20563         return getenv ();
20564   ;
20565   return 0;
20566 }
20567 _ACEOF
20568 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20569 if { (eval echo "$as_me:20569: \"$ac_link\"") >&5
20570   (eval $ac_link) 2>&5
20571   ac_status=$?
20572   echo "$as_me:20572: \$? = $ac_status" >&5
20573   (exit "$ac_status"); } &&
20574          { ac_try='test -s "conftest$ac_exeext"'
20575   { (eval echo "$as_me:20575: \"$ac_try\"") >&5
20576   (eval $ac_try) 2>&5
20577   ac_status=$?
20578   echo "$as_me:20578: \$? = $ac_status" >&5
20579   (exit "$ac_status"); }; }; then
20580   ac_cv_func_getenv=yes
20581 else
20582   echo "$as_me: failed program was:" >&5
20583 cat "conftest.$ac_ext" >&5
20584 ac_cv_func_getenv=no
20585 fi
20586 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20587 fi
20588 echo "$as_me:20588: result: $ac_cv_func_getenv" >&5
20589 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20590
20591 for ac_func in putenv setenv strdup
20592 do
20593 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20594 echo "$as_me:20594: checking for $ac_func" >&5
20595 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20596 if eval "test \"\${$as_ac_var+set}\" = set"; then
20597   echo $ECHO_N "(cached) $ECHO_C" >&6
20598 else
20599   cat >"conftest.$ac_ext" <<_ACEOF
20600 #line 20600 "configure"
20601 #include "confdefs.h"
20602 #define $ac_func autoconf_temporary
20603 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20604 #undef $ac_func
20605
20606 #ifdef __cplusplus
20607 extern "C"
20608 #endif
20609
20610 /* We use char because int might match the return type of a gcc2
20611    builtin and then its argument prototype would still apply.  */
20612 char $ac_func (void);
20613
20614 int
20615 main (void)
20616 {
20617
20618 /* The GNU C library defines stubs for functions which it implements
20619     to always fail with ENOSYS.  Some functions are actually named
20620     something starting with __ and the normal name is an alias.  */
20621 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20622 #error found stub for $ac_func
20623 #endif
20624
20625         return $ac_func ();
20626   ;
20627   return 0;
20628 }
20629 _ACEOF
20630 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20631 if { (eval echo "$as_me:20631: \"$ac_link\"") >&5
20632   (eval $ac_link) 2>&5
20633   ac_status=$?
20634   echo "$as_me:20634: \$? = $ac_status" >&5
20635   (exit "$ac_status"); } &&
20636          { ac_try='test -s "conftest$ac_exeext"'
20637   { (eval echo "$as_me:20637: \"$ac_try\"") >&5
20638   (eval $ac_try) 2>&5
20639   ac_status=$?
20640   echo "$as_me:20640: \$? = $ac_status" >&5
20641   (exit "$ac_status"); }; }; then
20642   eval "$as_ac_var=yes"
20643 else
20644   echo "$as_me: failed program was:" >&5
20645 cat "conftest.$ac_ext" >&5
20646 eval "$as_ac_var=no"
20647 fi
20648 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20649 fi
20650 echo "$as_me:20650: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20651 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20652 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20653   cat >>confdefs.h <<EOF
20654 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20655 EOF
20656
20657 fi
20658 done
20659
20660 echo "$as_me:20660: checking if getenv returns consistent values" >&5
20661 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20662 if test "${cf_cv_consistent_getenv+set}" = set; then
20663   echo $ECHO_N "(cached) $ECHO_C" >&6
20664 else
20665
20666 if test "$cross_compiling" = yes; then
20667   cf_cv_consistent_getenv=unknown
20668 else
20669   cat >"conftest.$ac_ext" <<_ACEOF
20670 #line 20670 "configure"
20671 #include "confdefs.h"
20672
20673 $ac_includes_default
20674
20675 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20676 extern char **environ;  /* POSIX, but some systems are not... */
20677 #endif
20678
20679 #if defined(HAVE_STRDUP)
20680 #define str_alloc(s) strdup(s)
20681 #else
20682 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20683 #endif
20684
20685 static void set_value(const char *name, const char *value)
20686 {
20687 #if defined(HAVE_SETENV)
20688         setenv(name, value, 1);
20689 #elif defined(HAVE_PUTENV)
20690         char buffer[1024];
20691         sprintf(buffer, "%s=%s", name, value);
20692         putenv(str_alloc(buffer));
20693 #else
20694 #error neither putenv/setenv found
20695 #endif
20696 }
20697 int main(void)
20698 {
20699         int pass;
20700         size_t numenv, limit, j;
20701         char **mynames;
20702         char **myvalues;
20703         char **mypointer;
20704         char *equals;
20705         for (numenv = 0; environ[numenv]; ++numenv) ;
20706         limit = numenv + 10;
20707         mynames = (char **) calloc(limit + 1, sizeof(char *));
20708         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20709         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20710 #if defined(HAVE_ENVIRON)
20711         for (j = 0; environ[j]; ++j) {
20712                 mynames[j] = str_alloc(environ[j]);
20713                 equals = strchr(mynames[j], '=');
20714                 if (equals != 0) {
20715                         *equals++ = '\\0';
20716                         myvalues[j] = str_alloc(equals);
20717                 } else {
20718                         myvalues[j] = str_alloc("");
20719                 }
20720         }
20721 #endif
20722         for (j = numenv; j < limit; ++j) {
20723                 char name[80];
20724                 char value[80];
20725                 size_t found;
20726                 size_t k = 0;
20727                 do {
20728                         size_t jk;
20729                         found = 0;
20730                         sprintf(name, "TERM%lu", (unsigned long) k);
20731                         for (jk = 0; jk < j; ++jk) {
20732                                 if (!strcmp(name, mynames[jk])) {
20733                                         found = 1;
20734                                         ++k;
20735                                         break;
20736                                 }
20737                         }
20738                 } while (found);
20739                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20740                 set_value(name, value);
20741                 mynames[j] = str_alloc(name);
20742                 myvalues[j] = str_alloc(value);
20743         }
20744         for (pass = 0; pass < 3; ++pass) {
20745                 for (j = 0; j < limit; ++j) {
20746                         char *value = getenv(mynames[j]);
20747                         if (pass) {
20748                                 if (value == 0) {
20749                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20750                                         ${cf_cv_main_return:-return}(1);
20751                                 } else if (value != mypointer[j]) {
20752                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20753                                         ${cf_cv_main_return:-return}(1);
20754                                 } else if (strcmp(value, myvalues[j])) {
20755                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20756                                         ${cf_cv_main_return:-return}(1);
20757                                 }
20758                         } else {
20759                                 size_t k;
20760                                 mypointer[j] = value;
20761                                 for (k = 0; k < j; ++k) {
20762                                         if (mypointer[j] == mypointer[k]) {
20763                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20764                                                 ${cf_cv_main_return:-return}(1);
20765                                         }
20766                                 }
20767                         }
20768                 }
20769         }
20770         ${cf_cv_main_return:-return}(0);
20771 }
20772
20773 _ACEOF
20774 rm -f "conftest$ac_exeext"
20775 if { (eval echo "$as_me:20775: \"$ac_link\"") >&5
20776   (eval $ac_link) 2>&5
20777   ac_status=$?
20778   echo "$as_me:20778: \$? = $ac_status" >&5
20779   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20780   { (eval echo "$as_me:20780: \"$ac_try\"") >&5
20781   (eval $ac_try) 2>&5
20782   ac_status=$?
20783   echo "$as_me:20783: \$? = $ac_status" >&5
20784   (exit "$ac_status"); }; }; then
20785   cf_cv_consistent_getenv=yes
20786 else
20787   echo "$as_me: program exited with status $ac_status" >&5
20788 echo "$as_me: failed program was:" >&5
20789 cat "conftest.$ac_ext" >&5
20790 cf_cv_consistent_getenv=no
20791 fi
20792 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20793 fi
20794
20795 fi
20796 echo "$as_me:20796: result: $cf_cv_consistent_getenv" >&5
20797 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20798
20799 if test "x$cf_cv_consistent_getenv" = xno
20800 then
20801
20802 cat >>confdefs.h <<\EOF
20803 #define HAVE_CONSISTENT_GETENV 1
20804 EOF
20805
20806 fi
20807
20808 if test "x$cf_cv_consistent_getenv" = xno && \
20809         test "x$cf_with_trace" = xyes
20810 then
20811         { echo "$as_me:20811: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20812 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20813 fi
20814
20815 echo "$as_me:20815: checking if sys/time.h works with sys/select.h" >&5
20816 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20817 if test "${cf_cv_sys_time_select+set}" = set; then
20818   echo $ECHO_N "(cached) $ECHO_C" >&6
20819 else
20820
20821 cat >"conftest.$ac_ext" <<_ACEOF
20822 #line 20822 "configure"
20823 #include "confdefs.h"
20824
20825 #include <sys/types.h>
20826 #ifdef HAVE_SYS_TIME_H
20827 #include <sys/time.h>
20828 #endif
20829 #ifdef HAVE_SYS_SELECT_H
20830 #include <sys/select.h>
20831 #endif
20832
20833 int
20834 main (void)
20835 {
20836
20837   ;
20838   return 0;
20839 }
20840 _ACEOF
20841 rm -f "conftest.$ac_objext"
20842 if { (eval echo "$as_me:20842: \"$ac_compile\"") >&5
20843   (eval $ac_compile) 2>&5
20844   ac_status=$?
20845   echo "$as_me:20845: \$? = $ac_status" >&5
20846   (exit "$ac_status"); } &&
20847          { ac_try='test -s "conftest.$ac_objext"'
20848   { (eval echo "$as_me:20848: \"$ac_try\"") >&5
20849   (eval $ac_try) 2>&5
20850   ac_status=$?
20851   echo "$as_me:20851: \$? = $ac_status" >&5
20852   (exit "$ac_status"); }; }; then
20853   cf_cv_sys_time_select=yes
20854 else
20855   echo "$as_me: failed program was:" >&5
20856 cat "conftest.$ac_ext" >&5
20857 cf_cv_sys_time_select=no
20858 fi
20859 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20860
20861 fi
20862
20863 echo "$as_me:20863: result: $cf_cv_sys_time_select" >&5
20864 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20865 test "$cf_cv_sys_time_select" = yes &&
20866 cat >>confdefs.h <<\EOF
20867 #define HAVE_SYS_TIME_SELECT 1
20868 EOF
20869
20870 ###     checks for compiler characteristics
20871 ac_ext=c
20872 ac_cpp='$CPP $CPPFLAGS'
20873 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20874 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20875 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20876 ac_main_return="return"
20877
20878 echo "$as_me:20878: checking for an ANSI C-conforming const" >&5
20879 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20880 if test "${ac_cv_c_const+set}" = set; then
20881   echo $ECHO_N "(cached) $ECHO_C" >&6
20882 else
20883   cat >"conftest.$ac_ext" <<_ACEOF
20884 #line 20884 "configure"
20885 #include "confdefs.h"
20886
20887 int
20888 main (void)
20889 {
20890 /* FIXME: Include the comments suggested by Paul. */
20891 #ifndef __cplusplus
20892   /* Ultrix mips cc rejects this.  */
20893   typedef int charset[2];
20894   const charset x;
20895   /* SunOS 4.1.1 cc rejects this.  */
20896   char const *const *ccp;
20897   char **p;
20898   /* NEC SVR4.0.2 mips cc rejects this.  */
20899   struct point {int x, y;};
20900   static struct point const zero = {0,0};
20901   /* AIX XL C 1.02.0.0 rejects this.
20902      It does not let you subtract one const X* pointer from another in
20903      an arm of an if-expression whose if-part is not a constant
20904      expression */
20905   const char *g = "string";
20906   ccp = &g + (g ? g-g : 0);
20907   /* HPUX 7.0 cc rejects these. */
20908   ++ccp;
20909   p = (char**) ccp;
20910   ccp = (char const *const *) p;
20911   { /* SCO 3.2v4 cc rejects this.  */
20912     char *t;
20913     char const *s = 0 ? (char *) 0 : (char const *) 0;
20914
20915     *t++ = 0;
20916   }
20917   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20918     int x[] = {25, 17};
20919     const int *foo = &x[0];
20920     ++foo;
20921   }
20922   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20923     typedef const int *iptr;
20924     iptr p = 0;
20925     ++p;
20926   }
20927   { /* AIX XL C 1.02.0.0 rejects this saying
20928        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20929     struct s { int j; const int *ap[3]; };
20930     struct s *b; b->j = 5;
20931   }
20932   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20933     const int foo = 10;
20934   }
20935 #endif
20936
20937   ;
20938   return 0;
20939 }
20940 _ACEOF
20941 rm -f "conftest.$ac_objext"
20942 if { (eval echo "$as_me:20942: \"$ac_compile\"") >&5
20943   (eval $ac_compile) 2>&5
20944   ac_status=$?
20945   echo "$as_me:20945: \$? = $ac_status" >&5
20946   (exit "$ac_status"); } &&
20947          { ac_try='test -s "conftest.$ac_objext"'
20948   { (eval echo "$as_me:20948: \"$ac_try\"") >&5
20949   (eval $ac_try) 2>&5
20950   ac_status=$?
20951   echo "$as_me:20951: \$? = $ac_status" >&5
20952   (exit "$ac_status"); }; }; then
20953   ac_cv_c_const=yes
20954 else
20955   echo "$as_me: failed program was:" >&5
20956 cat "conftest.$ac_ext" >&5
20957 ac_cv_c_const=no
20958 fi
20959 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20960 fi
20961 echo "$as_me:20961: result: $ac_cv_c_const" >&5
20962 echo "${ECHO_T}$ac_cv_c_const" >&6
20963 if test $ac_cv_c_const = no; then
20964
20965 cat >>confdefs.h <<\EOF
20966 #define const
20967 EOF
20968
20969 fi
20970
20971 echo "$as_me:20971: checking for inline" >&5
20972 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20973 if test "${ac_cv_c_inline+set}" = set; then
20974   echo $ECHO_N "(cached) $ECHO_C" >&6
20975 else
20976   ac_cv_c_inline=no
20977 for ac_kw in inline __inline__ __inline; do
20978   cat >"conftest.$ac_ext" <<_ACEOF
20979 #line 20979 "configure"
20980 #include "confdefs.h"
20981 #ifndef __cplusplus
20982 static $ac_kw int static_foo () {return 0; }
20983 $ac_kw int foo () {return 0; }
20984 #endif
20985
20986 _ACEOF
20987 rm -f "conftest.$ac_objext"
20988 if { (eval echo "$as_me:20988: \"$ac_compile\"") >&5
20989   (eval $ac_compile) 2>&5
20990   ac_status=$?
20991   echo "$as_me:20991: \$? = $ac_status" >&5
20992   (exit "$ac_status"); } &&
20993          { ac_try='test -s "conftest.$ac_objext"'
20994   { (eval echo "$as_me:20994: \"$ac_try\"") >&5
20995   (eval $ac_try) 2>&5
20996   ac_status=$?
20997   echo "$as_me:20997: \$? = $ac_status" >&5
20998   (exit "$ac_status"); }; }; then
20999   ac_cv_c_inline=$ac_kw; break
21000 else
21001   echo "$as_me: failed program was:" >&5
21002 cat "conftest.$ac_ext" >&5
21003 fi
21004 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21005 done
21006
21007 fi
21008 echo "$as_me:21008: result: $ac_cv_c_inline" >&5
21009 echo "${ECHO_T}$ac_cv_c_inline" >&6
21010 case $ac_cv_c_inline in
21011   inline | yes) ;;
21012   no)
21013 cat >>confdefs.h <<\EOF
21014 #define inline
21015 EOF
21016  ;;
21017   *)  cat >>confdefs.h <<EOF
21018 #define inline $ac_cv_c_inline
21019 EOF
21020  ;;
21021 esac
21022
21023 NCURSES_INLINE=
21024 if test "$ac_cv_c_inline" != no ; then
21025         NCURSES_INLINE=inline
21026         if test "$INTEL_COMPILER" = yes
21027         then
21028                 :
21029         elif test "$CLANG_COMPILER" = yes
21030         then
21031                 :
21032         elif test "$GCC" = yes
21033         then
21034                 echo "$as_me:21034: checking if $CC supports options to tune inlining" >&5
21035 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
21036 if test "${cf_cv_gcc_inline+set}" = set; then
21037   echo $ECHO_N "(cached) $ECHO_C" >&6
21038 else
21039
21040                 cf_save_CFLAGS=$CFLAGS
21041                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
21042                 cat >"conftest.$ac_ext" <<_ACEOF
21043 #line 21043 "configure"
21044 #include "confdefs.h"
21045 inline int foo(void) { return 1; }
21046 int
21047 main (void)
21048 {
21049 ${cf_cv_main_return:-return} foo()
21050   ;
21051   return 0;
21052 }
21053 _ACEOF
21054 rm -f "conftest.$ac_objext"
21055 if { (eval echo "$as_me:21055: \"$ac_compile\"") >&5
21056   (eval $ac_compile) 2>&5
21057   ac_status=$?
21058   echo "$as_me:21058: \$? = $ac_status" >&5
21059   (exit "$ac_status"); } &&
21060          { ac_try='test -s "conftest.$ac_objext"'
21061   { (eval echo "$as_me:21061: \"$ac_try\"") >&5
21062   (eval $ac_try) 2>&5
21063   ac_status=$?
21064   echo "$as_me:21064: \$? = $ac_status" >&5
21065   (exit "$ac_status"); }; }; then
21066   cf_cv_gcc_inline=yes
21067 else
21068   echo "$as_me: failed program was:" >&5
21069 cat "conftest.$ac_ext" >&5
21070 cf_cv_gcc_inline=no
21071 fi
21072 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21073                 CFLAGS=$cf_save_CFLAGS
21074
21075 fi
21076 echo "$as_me:21076: result: $cf_cv_gcc_inline" >&5
21077 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
21078                 if test "$cf_cv_gcc_inline" = yes ; then
21079
21080 cf_fix_cppflags=no
21081 cf_new_cflags=
21082 cf_new_cppflags=
21083 cf_new_extra_cppflags=
21084
21085 for cf_add_cflags in --param max-inline-insns-single=1200
21086 do
21087 case "$cf_fix_cppflags" in
21088 (no)
21089         case "$cf_add_cflags" in
21090         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21091                 case "$cf_add_cflags" in
21092                 (-D*)
21093                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21094
21095                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21096                                 && test -z "${cf_tst_cflags}" \
21097                                 && cf_fix_cppflags=yes
21098
21099                         if test "$cf_fix_cppflags" = yes ; then
21100
21101         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21102         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21103
21104                                 continue
21105                         elif test "${cf_tst_cflags}" = "\"'" ; then
21106
21107         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21108         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21109
21110                                 continue
21111                         fi
21112                         ;;
21113                 esac
21114                 case "$CPPFLAGS" in
21115                 (*$cf_add_cflags)
21116                         ;;
21117                 (*)
21118                         case "$cf_add_cflags" in
21119                         (-D*)
21120                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21121
21122 CPPFLAGS=`echo "$CPPFLAGS" | \
21123         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21124                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21125
21126                                 ;;
21127                         esac
21128
21129         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21130         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21131
21132                         ;;
21133                 esac
21134                 ;;
21135         (*)
21136
21137         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21138         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21139
21140                 ;;
21141         esac
21142         ;;
21143 (yes)
21144
21145         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21146         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21147
21148         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21149
21150         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21151                 && test -z "${cf_tst_cflags}" \
21152                 && cf_fix_cppflags=no
21153         ;;
21154 esac
21155 done
21156
21157 if test -n "$cf_new_cflags" ; then
21158
21159         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21160         CFLAGS="${CFLAGS}$cf_new_cflags"
21161
21162 fi
21163
21164 if test -n "$cf_new_cppflags" ; then
21165
21166         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21167         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21168
21169 fi
21170
21171 if test -n "$cf_new_extra_cppflags" ; then
21172
21173         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21174         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21175
21176 fi
21177
21178                 fi
21179         fi
21180 fi
21181
21182 echo "$as_me:21182: checking for signal global datatype" >&5
21183 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
21184 if test "${cf_cv_sig_atomic_t+set}" = set; then
21185   echo $ECHO_N "(cached) $ECHO_C" >&6
21186 else
21187
21188         for cf_type in \
21189                 "volatile sig_atomic_t" \
21190                 "sig_atomic_t" \
21191                 "int"
21192         do
21193         cat >"conftest.$ac_ext" <<_ACEOF
21194 #line 21194 "configure"
21195 #include "confdefs.h"
21196
21197 #include <sys/types.h>
21198 #include <signal.h>
21199 #include <stdio.h>
21200
21201 extern $cf_type x;
21202 $cf_type x;
21203 static void handler(int sig)
21204 {
21205         (void)sig;
21206         x = 5;
21207 }
21208 int
21209 main (void)
21210 {
21211 signal(SIGINT, handler);
21212                  x = 1
21213   ;
21214   return 0;
21215 }
21216 _ACEOF
21217 rm -f "conftest.$ac_objext"
21218 if { (eval echo "$as_me:21218: \"$ac_compile\"") >&5
21219   (eval $ac_compile) 2>&5
21220   ac_status=$?
21221   echo "$as_me:21221: \$? = $ac_status" >&5
21222   (exit "$ac_status"); } &&
21223          { ac_try='test -s "conftest.$ac_objext"'
21224   { (eval echo "$as_me:21224: \"$ac_try\"") >&5
21225   (eval $ac_try) 2>&5
21226   ac_status=$?
21227   echo "$as_me:21227: \$? = $ac_status" >&5
21228   (exit "$ac_status"); }; }; then
21229   cf_cv_sig_atomic_t=$cf_type
21230 else
21231   echo "$as_me: failed program was:" >&5
21232 cat "conftest.$ac_ext" >&5
21233 cf_cv_sig_atomic_t=no
21234 fi
21235 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21236                 test "$cf_cv_sig_atomic_t" != no && break
21237         done
21238
21239 fi
21240
21241 echo "$as_me:21241: result: $cf_cv_sig_atomic_t" >&5
21242 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
21243 test "$cf_cv_sig_atomic_t" != no &&
21244 cat >>confdefs.h <<EOF
21245 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
21246 EOF
21247
21248 if test "$NCURSES_CHTYPE" = auto ; then
21249
21250 echo "$as_me:21250: checking for type of chtype" >&5
21251 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
21252 if test "${cf_cv_typeof_chtype+set}" = set; then
21253   echo $ECHO_N "(cached) $ECHO_C" >&6
21254 else
21255
21256                 if test "$cross_compiling" = yes; then
21257   cf_cv_typeof_chtype=long
21258 else
21259   cat >"conftest.$ac_ext" <<_ACEOF
21260 #line 21260 "configure"
21261 #include "confdefs.h"
21262
21263 $ac_includes_default
21264 #define WANT_BITS 31
21265 int main(void)
21266 {
21267         FILE *fp = fopen("cf_test.out", "w");
21268         if (fp != 0) {
21269                 char *result = "long";
21270                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
21271                         int n;
21272                         unsigned int x, y;
21273                         for (n = 0; n < WANT_BITS; n++) {
21274                                 x = (1 << n);
21275                                 y = (x >> n);
21276                                 if (y != 1 || x == 0) {
21277                                         x = 0;
21278                                         break;
21279                                 }
21280                         }
21281                         /*
21282                          * If x is nonzero, an int is big enough for the bits
21283                          * that we want.
21284                          */
21285                         result = (x != 0) ? "int" : "long";
21286                 }
21287                 fputs(result, fp);
21288                 fclose(fp);
21289         }
21290         ${cf_cv_main_return:-return}(0);
21291 }
21292
21293 _ACEOF
21294 rm -f "conftest$ac_exeext"
21295 if { (eval echo "$as_me:21295: \"$ac_link\"") >&5
21296   (eval $ac_link) 2>&5
21297   ac_status=$?
21298   echo "$as_me:21298: \$? = $ac_status" >&5
21299   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21300   { (eval echo "$as_me:21300: \"$ac_try\"") >&5
21301   (eval $ac_try) 2>&5
21302   ac_status=$?
21303   echo "$as_me:21303: \$? = $ac_status" >&5
21304   (exit "$ac_status"); }; }; then
21305   cf_cv_typeof_chtype=`cat cf_test.out`
21306 else
21307   echo "$as_me: program exited with status $ac_status" >&5
21308 echo "$as_me: failed program was:" >&5
21309 cat "conftest.$ac_ext" >&5
21310 cf_cv_typeof_chtype=long
21311 fi
21312 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21313 fi
21314                 rm -f cf_test.out
21315
21316 fi
21317
21318 echo "$as_me:21318: result: $cf_cv_typeof_chtype" >&5
21319 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
21320
21321 cat >>confdefs.h <<EOF
21322 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
21323 EOF
21324
21325 else
21326         cf_cv_typeof_chtype=$NCURSES_CHTYPE
21327 fi
21328 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
21329
21330 echo "$as_me:21330: checking if unsigned literals are legal" >&5
21331 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
21332 if test "${cf_cv_unsigned_literals+set}" = set; then
21333   echo $ECHO_N "(cached) $ECHO_C" >&6
21334 else
21335
21336         cat >"conftest.$ac_ext" <<_ACEOF
21337 #line 21337 "configure"
21338 #include "confdefs.h"
21339
21340 int
21341 main (void)
21342 {
21343 long x = 1L + 1UL + 1U + 1
21344   ;
21345   return 0;
21346 }
21347 _ACEOF
21348 rm -f "conftest.$ac_objext"
21349 if { (eval echo "$as_me:21349: \"$ac_compile\"") >&5
21350   (eval $ac_compile) 2>&5
21351   ac_status=$?
21352   echo "$as_me:21352: \$? = $ac_status" >&5
21353   (exit "$ac_status"); } &&
21354          { ac_try='test -s "conftest.$ac_objext"'
21355   { (eval echo "$as_me:21355: \"$ac_try\"") >&5
21356   (eval $ac_try) 2>&5
21357   ac_status=$?
21358   echo "$as_me:21358: \$? = $ac_status" >&5
21359   (exit "$ac_status"); }; }; then
21360   cf_cv_unsigned_literals=yes
21361 else
21362   echo "$as_me: failed program was:" >&5
21363 cat "conftest.$ac_ext" >&5
21364 cf_cv_unsigned_literals=no
21365 fi
21366 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21367
21368 fi
21369
21370 echo "$as_me:21370: result: $cf_cv_unsigned_literals" >&5
21371 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
21372
21373 cf_cv_1UL="1"
21374 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
21375 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
21376
21377 if test "$NCURSES_MMASK_T" = auto ; then
21378         cf_cv_typeof_mmask_t=long
21379 else
21380         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
21381 fi
21382 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
21383
21384 ###     Checks for external-data
21385
21386 echo "$as_me:21386: checking if external errno is declared" >&5
21387 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
21388 if test "${cf_cv_dcl_errno+set}" = set; then
21389   echo $ECHO_N "(cached) $ECHO_C" >&6
21390 else
21391
21392         cat >"conftest.$ac_ext" <<_ACEOF
21393 #line 21393 "configure"
21394 #include "confdefs.h"
21395
21396 #ifdef HAVE_STDLIB_H
21397 #include <stdlib.h>
21398 #endif
21399 #include <stdio.h>
21400 #include <sys/types.h>
21401 #include <errno.h>
21402 int
21403 main (void)
21404 {
21405 int x = (int) errno; (void)x
21406   ;
21407   return 0;
21408 }
21409 _ACEOF
21410 rm -f "conftest.$ac_objext"
21411 if { (eval echo "$as_me:21411: \"$ac_compile\"") >&5
21412   (eval $ac_compile) 2>&5
21413   ac_status=$?
21414   echo "$as_me:21414: \$? = $ac_status" >&5
21415   (exit "$ac_status"); } &&
21416          { ac_try='test -s "conftest.$ac_objext"'
21417   { (eval echo "$as_me:21417: \"$ac_try\"") >&5
21418   (eval $ac_try) 2>&5
21419   ac_status=$?
21420   echo "$as_me:21420: \$? = $ac_status" >&5
21421   (exit "$ac_status"); }; }; then
21422   cf_cv_dcl_errno=yes
21423 else
21424   echo "$as_me: failed program was:" >&5
21425 cat "conftest.$ac_ext" >&5
21426 cf_cv_dcl_errno=no
21427 fi
21428 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21429
21430 fi
21431 echo "$as_me:21431: result: $cf_cv_dcl_errno" >&5
21432 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
21433
21434 if test "$cf_cv_dcl_errno" = no ; then
21435
21436 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21437
21438         cat >>confdefs.h <<EOF
21439 #define $cf_result 1
21440 EOF
21441
21442 fi
21443
21444 # It's possible (for near-UNIX clones) that the data doesn't exist
21445
21446 echo "$as_me:21446: checking if external errno exists" >&5
21447 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21448 if test "${cf_cv_have_errno+set}" = set; then
21449   echo $ECHO_N "(cached) $ECHO_C" >&6
21450 else
21451
21452         cat >"conftest.$ac_ext" <<_ACEOF
21453 #line 21453 "configure"
21454 #include "confdefs.h"
21455
21456 #undef errno
21457 extern int errno;
21458
21459 int
21460 main (void)
21461 {
21462 errno = 2
21463   ;
21464   return 0;
21465 }
21466 _ACEOF
21467 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21468 if { (eval echo "$as_me:21468: \"$ac_link\"") >&5
21469   (eval $ac_link) 2>&5
21470   ac_status=$?
21471   echo "$as_me:21471: \$? = $ac_status" >&5
21472   (exit "$ac_status"); } &&
21473          { ac_try='test -s "conftest$ac_exeext"'
21474   { (eval echo "$as_me:21474: \"$ac_try\"") >&5
21475   (eval $ac_try) 2>&5
21476   ac_status=$?
21477   echo "$as_me:21477: \$? = $ac_status" >&5
21478   (exit "$ac_status"); }; }; then
21479   cf_cv_have_errno=yes
21480 else
21481   echo "$as_me: failed program was:" >&5
21482 cat "conftest.$ac_ext" >&5
21483 cf_cv_have_errno=no
21484 fi
21485 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21486
21487 fi
21488 echo "$as_me:21488: result: $cf_cv_have_errno" >&5
21489 echo "${ECHO_T}$cf_cv_have_errno" >&6
21490
21491 if test "$cf_cv_have_errno" = yes ; then
21492
21493 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21494
21495         cat >>confdefs.h <<EOF
21496 #define $cf_result 1
21497 EOF
21498
21499 fi
21500
21501 echo "$as_me:21501: checking if data-only library module links" >&5
21502 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21503 if test "${cf_cv_link_dataonly+set}" = set; then
21504   echo $ECHO_N "(cached) $ECHO_C" >&6
21505 else
21506
21507         rm -f conftest.a
21508         cat >conftest.$ac_ext <<EOF
21509 #line 21509 "configure"
21510 int     testdata[3] = { 123, 456, 789 };
21511 EOF
21512         if { (eval echo "$as_me:21512: \"$ac_compile\"") >&5
21513   (eval $ac_compile) 2>&5
21514   ac_status=$?
21515   echo "$as_me:21515: \$? = $ac_status" >&5
21516   (exit "$ac_status"); } ; then
21517                 mv conftest.o data.o && \
21518                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
21519         fi
21520         rm -f conftest.$ac_ext data.o
21521         cat >conftest.$ac_ext <<EOF
21522 #line 21522 "configure"
21523 int     testfunc(void)
21524 {
21525 #if defined(NeXT)
21526         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
21527 #else
21528         extern int testdata[3];
21529         return testdata[0] == 123
21530            &&  testdata[1] == 456
21531            &&  testdata[2] == 789;
21532 #endif
21533 }
21534 EOF
21535         if { (eval echo "$as_me:21535: \"$ac_compile\"") >&5
21536   (eval $ac_compile) 2>&5
21537   ac_status=$?
21538   echo "$as_me:21538: \$? = $ac_status" >&5
21539   (exit "$ac_status"); }; then
21540                 mv conftest.o func.o && \
21541                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
21542         fi
21543         rm -f conftest.$ac_ext func.o
21544         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21545         cf_saveLIBS="$LIBS"
21546         LIBS="conftest.a $LIBS"
21547         if test "$cross_compiling" = yes; then
21548   cf_cv_link_dataonly=unknown
21549 else
21550   cat >"conftest.$ac_ext" <<_ACEOF
21551 #line 21551 "configure"
21552 #include "confdefs.h"
21553
21554         int main(void)
21555         {
21556                 extern int testfunc();
21557                 ${cf_cv_main_return:-return} (!testfunc());
21558         }
21559
21560 _ACEOF
21561 rm -f "conftest$ac_exeext"
21562 if { (eval echo "$as_me:21562: \"$ac_link\"") >&5
21563   (eval $ac_link) 2>&5
21564   ac_status=$?
21565   echo "$as_me:21565: \$? = $ac_status" >&5
21566   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21567   { (eval echo "$as_me:21567: \"$ac_try\"") >&5
21568   (eval $ac_try) 2>&5
21569   ac_status=$?
21570   echo "$as_me:21570: \$? = $ac_status" >&5
21571   (exit "$ac_status"); }; }; then
21572   cf_cv_link_dataonly=yes
21573 else
21574   echo "$as_me: program exited with status $ac_status" >&5
21575 echo "$as_me: failed program was:" >&5
21576 cat "conftest.$ac_ext" >&5
21577 cf_cv_link_dataonly=no
21578 fi
21579 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21580 fi
21581         LIBS="$cf_saveLIBS"
21582
21583 fi
21584
21585 echo "$as_me:21585: result: $cf_cv_link_dataonly" >&5
21586 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21587
21588 if test "$cf_cv_link_dataonly" = no ; then
21589
21590 cat >>confdefs.h <<\EOF
21591 #define BROKEN_LINKER 1
21592 EOF
21593
21594         BROKEN_LINKER=1
21595 fi
21596
21597 ###     Checks for library functions.
21598
21599 for ac_func in \
21600 fpathconf \
21601 getcwd \
21602 getegid \
21603 geteuid \
21604 getopt \
21605 issetugid \
21606 localeconv \
21607 poll \
21608 putenv \
21609 remove \
21610 select \
21611 setbuf \
21612 setbuffer \
21613 setenv \
21614 setfsuid \
21615 setvbuf \
21616 sigaction \
21617 sigvec \
21618 snprintf \
21619 strdup \
21620 strstr \
21621 sysconf \
21622 tcgetpgrp \
21623 times \
21624 tsearch \
21625 vsnprintf \
21626
21627 do
21628 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21629 echo "$as_me:21629: checking for $ac_func" >&5
21630 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21631 if eval "test \"\${$as_ac_var+set}\" = set"; then
21632   echo $ECHO_N "(cached) $ECHO_C" >&6
21633 else
21634   cat >"conftest.$ac_ext" <<_ACEOF
21635 #line 21635 "configure"
21636 #include "confdefs.h"
21637 #define $ac_func autoconf_temporary
21638 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21639 #undef $ac_func
21640
21641 #ifdef __cplusplus
21642 extern "C"
21643 #endif
21644
21645 /* We use char because int might match the return type of a gcc2
21646    builtin and then its argument prototype would still apply.  */
21647 char $ac_func (void);
21648
21649 int
21650 main (void)
21651 {
21652
21653 /* The GNU C library defines stubs for functions which it implements
21654     to always fail with ENOSYS.  Some functions are actually named
21655     something starting with __ and the normal name is an alias.  */
21656 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21657 #error found stub for $ac_func
21658 #endif
21659
21660         return $ac_func ();
21661   ;
21662   return 0;
21663 }
21664 _ACEOF
21665 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21666 if { (eval echo "$as_me:21666: \"$ac_link\"") >&5
21667   (eval $ac_link) 2>&5
21668   ac_status=$?
21669   echo "$as_me:21669: \$? = $ac_status" >&5
21670   (exit "$ac_status"); } &&
21671          { ac_try='test -s "conftest$ac_exeext"'
21672   { (eval echo "$as_me:21672: \"$ac_try\"") >&5
21673   (eval $ac_try) 2>&5
21674   ac_status=$?
21675   echo "$as_me:21675: \$? = $ac_status" >&5
21676   (exit "$ac_status"); }; }; then
21677   eval "$as_ac_var=yes"
21678 else
21679   echo "$as_me: failed program was:" >&5
21680 cat "conftest.$ac_ext" >&5
21681 eval "$as_ac_var=no"
21682 fi
21683 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21684 fi
21685 echo "$as_me:21685: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21686 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21687 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21688   cat >>confdefs.h <<EOF
21689 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21690 EOF
21691
21692 fi
21693 done
21694
21695 echo "$as_me:21695: checking if _PATH_TTYS is defined in ttyent.h" >&5
21696 echo $ECHO_N "checking if _PATH_TTYS is defined in ttyent.h... $ECHO_C" >&6
21697 if test "${cf_cv_PATH_TTYS+set}" = set; then
21698   echo $ECHO_N "(cached) $ECHO_C" >&6
21699 else
21700
21701 cat >"conftest.$ac_ext" <<_ACEOF
21702 #line 21702 "configure"
21703 #include "confdefs.h"
21704
21705 #include <stdio.h>
21706 #include <ttyent.h>
21707 int
21708 main (void)
21709 {
21710
21711 FILE *fp = fopen(_PATH_TTYS, "r"); (void)fp
21712   ;
21713   return 0;
21714 }
21715 _ACEOF
21716 rm -f "conftest.$ac_objext"
21717 if { (eval echo "$as_me:21717: \"$ac_compile\"") >&5
21718   (eval $ac_compile) 2>&5
21719   ac_status=$?
21720   echo "$as_me:21720: \$? = $ac_status" >&5
21721   (exit "$ac_status"); } &&
21722          { ac_try='test -s "conftest.$ac_objext"'
21723   { (eval echo "$as_me:21723: \"$ac_try\"") >&5
21724   (eval $ac_try) 2>&5
21725   ac_status=$?
21726   echo "$as_me:21726: \$? = $ac_status" >&5
21727   (exit "$ac_status"); }; }; then
21728   cf_cv_PATH_TTYS=yes
21729 else
21730   echo "$as_me: failed program was:" >&5
21731 cat "conftest.$ac_ext" >&5
21732 cf_cv_PATH_TTYS=no
21733 fi
21734 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21735 fi
21736 echo "$as_me:21736: result: $cf_cv_PATH_TTYS" >&5
21737 echo "${ECHO_T}$cf_cv_PATH_TTYS" >&6
21738
21739 if test $cf_cv_PATH_TTYS = no
21740 then
21741         for cf_ttys in /etc/ttytype /etc/ttys
21742         do
21743                 if test -f $cf_ttys
21744                 then
21745                         cf_cv_PATH_TTYS=maybe
21746
21747 cat >>confdefs.h <<\EOF
21748 #define _PATH_TTYS $cf_ttys
21749 EOF
21750
21751                         break
21752                 fi
21753         done
21754 fi
21755
21756 if test $cf_cv_PATH_TTYS != no
21757 then
21758         echo "$as_me:21758: checking if _PATH_TTYS file exists" >&5
21759 echo $ECHO_N "checking if _PATH_TTYS file exists... $ECHO_C" >&6
21760 if test "${cf_cv_have_PATH_TTYS+set}" = set; then
21761   echo $ECHO_N "(cached) $ECHO_C" >&6
21762 else
21763
21764                 if test "$cross_compiling" = yes; then
21765   cf_cv_have_PATH_TTYS=unknown
21766 else
21767   cat >"conftest.$ac_ext" <<_ACEOF
21768 #line 21768 "configure"
21769 #include "confdefs.h"
21770
21771 $ac_includes_default
21772
21773 #include <ttyent.h>
21774
21775 int main(void) {
21776         FILE *fp = fopen(_PATH_TTYS, "r");
21777         ${cf_cv_main_return:-return} (fp == 0);
21778 }
21779 _ACEOF
21780 rm -f "conftest$ac_exeext"
21781 if { (eval echo "$as_me:21781: \"$ac_link\"") >&5
21782   (eval $ac_link) 2>&5
21783   ac_status=$?
21784   echo "$as_me:21784: \$? = $ac_status" >&5
21785   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21786   { (eval echo "$as_me:21786: \"$ac_try\"") >&5
21787   (eval $ac_try) 2>&5
21788   ac_status=$?
21789   echo "$as_me:21789: \$? = $ac_status" >&5
21790   (exit "$ac_status"); }; }; then
21791   cf_cv_have_PATH_TTYS=yes
21792 else
21793   echo "$as_me: program exited with status $ac_status" >&5
21794 echo "$as_me: failed program was:" >&5
21795 cat "conftest.$ac_ext" >&5
21796 cf_cv_have_PATH_TTYS=no
21797 fi
21798 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21799 fi
21800 fi
21801 echo "$as_me:21801: result: $cf_cv_have_PATH_TTYS" >&5
21802 echo "${ECHO_T}$cf_cv_have_PATH_TTYS" >&6
21803         test "$cf_cv_have_PATH_TTYS" = no && cf_cv_PATH_TTYS=no
21804 fi
21805
21806 if test $cf_cv_PATH_TTYS != no
21807 then
21808
21809 cat >>confdefs.h <<\EOF
21810 #define HAVE_PATH_TTYS 1
21811 EOF
21812
21813         echo "$as_me:21813: checking for getttynam" >&5
21814 echo $ECHO_N "checking for getttynam... $ECHO_C" >&6
21815 if test "${cf_cv_func_getttynam+set}" = set; then
21816   echo $ECHO_N "(cached) $ECHO_C" >&6
21817 else
21818
21819                 cat >"conftest.$ac_ext" <<_ACEOF
21820 #line 21820 "configure"
21821 #include "confdefs.h"
21822 #include <ttyent.h>
21823 int
21824 main (void)
21825 {
21826 struct ttyent *fp = getttynam("/dev/tty"); (void)fp
21827   ;
21828   return 0;
21829 }
21830 _ACEOF
21831 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21832 if { (eval echo "$as_me:21832: \"$ac_link\"") >&5
21833   (eval $ac_link) 2>&5
21834   ac_status=$?
21835   echo "$as_me:21835: \$? = $ac_status" >&5
21836   (exit "$ac_status"); } &&
21837          { ac_try='test -s "conftest$ac_exeext"'
21838   { (eval echo "$as_me:21838: \"$ac_try\"") >&5
21839   (eval $ac_try) 2>&5
21840   ac_status=$?
21841   echo "$as_me:21841: \$? = $ac_status" >&5
21842   (exit "$ac_status"); }; }; then
21843   cf_cv_func_getttynam=yes
21844 else
21845   echo "$as_me: failed program was:" >&5
21846 cat "conftest.$ac_ext" >&5
21847 cf_cv_func_getttynam=no
21848 fi
21849 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21850 fi
21851 echo "$as_me:21851: result: $cf_cv_func_getttynam" >&5
21852 echo "${ECHO_T}$cf_cv_func_getttynam" >&6
21853         test "$cf_cv_func_getttynam" = yes && cat >>confdefs.h <<\EOF
21854 #define HAVE_GETTTYNAM 1
21855 EOF
21856
21857 fi
21858
21859 if test "x$ac_cv_func_getopt" = xno && \
21860    test "x$cf_with_progs$cf_with_tests" != xnono; then
21861         { { echo "$as_me:21861: error: getopt is required for building programs" >&5
21862 echo "$as_me: error: getopt is required for building programs" >&2;}
21863    { (exit 1); exit 1; }; }
21864 fi
21865
21866 if test "x$with_safe_sprintf" = xyes
21867 then
21868         if test "x$ac_cv_func_vsnprintf" = xyes
21869         then
21870                 { echo "$as_me:21870: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
21871 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
21872         else
21873
21874 cat >>confdefs.h <<\EOF
21875 #define USE_SAFE_SPRINTF 1
21876 EOF
21877
21878         fi
21879 fi
21880
21881 if test "x$with_getcap" = "xyes" ; then
21882
21883 echo "$as_me:21883: checking for terminal-capability database functions" >&5
21884 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
21885 if test "${cf_cv_cgetent+set}" = set; then
21886   echo $ECHO_N "(cached) $ECHO_C" >&6
21887 else
21888
21889 cat >"conftest.$ac_ext" <<_ACEOF
21890 #line 21890 "configure"
21891 #include "confdefs.h"
21892
21893 #include <stdlib.h>
21894 int
21895 main (void)
21896 {
21897
21898         char temp[128];
21899         char *buf = temp;
21900         char *db_array = temp;
21901         cgetent(&buf, &db_array, "vt100");
21902         cgetcap(buf, "tc", '=');
21903         cgetmatch(buf, "tc");
21904
21905   ;
21906   return 0;
21907 }
21908 _ACEOF
21909 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21910 if { (eval echo "$as_me:21910: \"$ac_link\"") >&5
21911   (eval $ac_link) 2>&5
21912   ac_status=$?
21913   echo "$as_me:21913: \$? = $ac_status" >&5
21914   (exit "$ac_status"); } &&
21915          { ac_try='test -s "conftest$ac_exeext"'
21916   { (eval echo "$as_me:21916: \"$ac_try\"") >&5
21917   (eval $ac_try) 2>&5
21918   ac_status=$?
21919   echo "$as_me:21919: \$? = $ac_status" >&5
21920   (exit "$ac_status"); }; }; then
21921   cf_cv_cgetent=yes
21922 else
21923   echo "$as_me: failed program was:" >&5
21924 cat "conftest.$ac_ext" >&5
21925 cf_cv_cgetent=no
21926 fi
21927 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21928
21929 fi
21930 echo "$as_me:21930: result: $cf_cv_cgetent" >&5
21931 echo "${ECHO_T}$cf_cv_cgetent" >&6
21932
21933 if test "$cf_cv_cgetent" = yes
21934 then
21935
21936 cat >>confdefs.h <<\EOF
21937 #define HAVE_BSD_CGETENT 1
21938 EOF
21939
21940 echo "$as_me:21940: checking if cgetent uses const parameter" >&5
21941 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
21942 if test "${cf_cv_cgetent_const+set}" = set; then
21943   echo $ECHO_N "(cached) $ECHO_C" >&6
21944 else
21945
21946 cat >"conftest.$ac_ext" <<_ACEOF
21947 #line 21947 "configure"
21948 #include "confdefs.h"
21949
21950 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
21951 #include <stdlib.h>
21952 int
21953 main (void)
21954 {
21955
21956         char temp[128];
21957         char *buf = temp;
21958 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
21959         const char *db_array = temp;
21960         cgetent(&buf, &db_array, "vt100");
21961 #endif
21962         cgetcap(buf, "tc", '=');
21963         cgetmatch(buf, "tc");
21964
21965   ;
21966   return 0;
21967 }
21968 _ACEOF
21969 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21970 if { (eval echo "$as_me:21970: \"$ac_link\"") >&5
21971   (eval $ac_link) 2>&5
21972   ac_status=$?
21973   echo "$as_me:21973: \$? = $ac_status" >&5
21974   (exit "$ac_status"); } &&
21975          { ac_try='test -s "conftest$ac_exeext"'
21976   { (eval echo "$as_me:21976: \"$ac_try\"") >&5
21977   (eval $ac_try) 2>&5
21978   ac_status=$?
21979   echo "$as_me:21979: \$? = $ac_status" >&5
21980   (exit "$ac_status"); }; }; then
21981   cf_cv_cgetent_const=yes
21982 else
21983   echo "$as_me: failed program was:" >&5
21984 cat "conftest.$ac_ext" >&5
21985 cf_cv_cgetent_const=no
21986 fi
21987 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21988
21989 fi
21990 echo "$as_me:21990: result: $cf_cv_cgetent_const" >&5
21991 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
21992         if test "$cf_cv_cgetent_const" = yes
21993         then
21994
21995 cat >>confdefs.h <<EOF
21996 #define CGETENT_CONST const
21997 EOF
21998
21999         fi
22000 fi
22001
22002 fi
22003
22004 echo "$as_me:22004: checking for isascii" >&5
22005 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
22006 if test "${cf_cv_have_isascii+set}" = set; then
22007   echo $ECHO_N "(cached) $ECHO_C" >&6
22008 else
22009
22010         cat >"conftest.$ac_ext" <<_ACEOF
22011 #line 22011 "configure"
22012 #include "confdefs.h"
22013 #include <ctype.h>
22014 int
22015 main (void)
22016 {
22017 int x = isascii(' ')
22018   ;
22019   return 0;
22020 }
22021 _ACEOF
22022 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22023 if { (eval echo "$as_me:22023: \"$ac_link\"") >&5
22024   (eval $ac_link) 2>&5
22025   ac_status=$?
22026   echo "$as_me:22026: \$? = $ac_status" >&5
22027   (exit "$ac_status"); } &&
22028          { ac_try='test -s "conftest$ac_exeext"'
22029   { (eval echo "$as_me:22029: \"$ac_try\"") >&5
22030   (eval $ac_try) 2>&5
22031   ac_status=$?
22032   echo "$as_me:22032: \$? = $ac_status" >&5
22033   (exit "$ac_status"); }; }; then
22034   cf_cv_have_isascii=yes
22035 else
22036   echo "$as_me: failed program was:" >&5
22037 cat "conftest.$ac_ext" >&5
22038 cf_cv_have_isascii=no
22039 fi
22040 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22041
22042 fi
22043 echo "$as_me:22043: result: $cf_cv_have_isascii" >&5
22044 echo "${ECHO_T}$cf_cv_have_isascii" >&6
22045 test "$cf_cv_have_isascii" = yes &&
22046 cat >>confdefs.h <<\EOF
22047 #define HAVE_ISASCII 1
22048 EOF
22049
22050 if test "$ac_cv_func_sigaction" = yes; then
22051 echo "$as_me:22051: checking whether sigaction needs _POSIX_SOURCE" >&5
22052 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
22053 cat >"conftest.$ac_ext" <<_ACEOF
22054 #line 22054 "configure"
22055 #include "confdefs.h"
22056
22057 #include <sys/types.h>
22058 #include <signal.h>
22059 int
22060 main (void)
22061 {
22062 struct sigaction act
22063   ;
22064   return 0;
22065 }
22066 _ACEOF
22067 rm -f "conftest.$ac_objext"
22068 if { (eval echo "$as_me:22068: \"$ac_compile\"") >&5
22069   (eval $ac_compile) 2>&5
22070   ac_status=$?
22071   echo "$as_me:22071: \$? = $ac_status" >&5
22072   (exit "$ac_status"); } &&
22073          { ac_try='test -s "conftest.$ac_objext"'
22074   { (eval echo "$as_me:22074: \"$ac_try\"") >&5
22075   (eval $ac_try) 2>&5
22076   ac_status=$?
22077   echo "$as_me:22077: \$? = $ac_status" >&5
22078   (exit "$ac_status"); }; }; then
22079   sigact_bad=no
22080 else
22081   echo "$as_me: failed program was:" >&5
22082 cat "conftest.$ac_ext" >&5
22083
22084 cat >"conftest.$ac_ext" <<_ACEOF
22085 #line 22085 "configure"
22086 #include "confdefs.h"
22087
22088 #define _POSIX_SOURCE
22089 #include <sys/types.h>
22090 #include <signal.h>
22091 int
22092 main (void)
22093 {
22094 struct sigaction act
22095   ;
22096   return 0;
22097 }
22098 _ACEOF
22099 rm -f "conftest.$ac_objext"
22100 if { (eval echo "$as_me:22100: \"$ac_compile\"") >&5
22101   (eval $ac_compile) 2>&5
22102   ac_status=$?
22103   echo "$as_me:22103: \$? = $ac_status" >&5
22104   (exit "$ac_status"); } &&
22105          { ac_try='test -s "conftest.$ac_objext"'
22106   { (eval echo "$as_me:22106: \"$ac_try\"") >&5
22107   (eval $ac_try) 2>&5
22108   ac_status=$?
22109   echo "$as_me:22109: \$? = $ac_status" >&5
22110   (exit "$ac_status"); }; }; then
22111   sigact_bad=yes
22112
22113 cat >>confdefs.h <<\EOF
22114 #define _POSIX_SOURCE 1
22115 EOF
22116
22117 else
22118   echo "$as_me: failed program was:" >&5
22119 cat "conftest.$ac_ext" >&5
22120 sigact_bad=unknown
22121 fi
22122 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22123 fi
22124 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22125 echo "$as_me:22125: result: $sigact_bad" >&5
22126 echo "${ECHO_T}$sigact_bad" >&6
22127 fi
22128
22129 echo "$as_me:22129: checking if nanosleep really works" >&5
22130 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
22131 if test "${cf_cv_func_nanosleep+set}" = set; then
22132   echo $ECHO_N "(cached) $ECHO_C" >&6
22133 else
22134
22135 if test "$cross_compiling" = yes; then
22136   cf_cv_func_nanosleep=unknown
22137 else
22138   cat >"conftest.$ac_ext" <<_ACEOF
22139 #line 22139 "configure"
22140 #include "confdefs.h"
22141
22142 $ac_includes_default
22143
22144 #include <errno.h>
22145 #include <time.h>
22146
22147 #ifdef HAVE_SYS_TIME_H
22148 #include <sys/time.h>
22149 #endif
22150
22151 int main(void) {
22152         struct timespec ts1, ts2;
22153         int code;
22154         ts1.tv_sec  = 0;
22155         ts1.tv_nsec = 750000000;
22156         ts2.tv_sec  = 0;
22157         ts2.tv_nsec = 0;
22158         errno = 0;
22159         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
22160         ${cf_cv_main_return:-return}(code != 0);
22161 }
22162
22163 _ACEOF
22164 rm -f "conftest$ac_exeext"
22165 if { (eval echo "$as_me:22165: \"$ac_link\"") >&5
22166   (eval $ac_link) 2>&5
22167   ac_status=$?
22168   echo "$as_me:22168: \$? = $ac_status" >&5
22169   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22170   { (eval echo "$as_me:22170: \"$ac_try\"") >&5
22171   (eval $ac_try) 2>&5
22172   ac_status=$?
22173   echo "$as_me:22173: \$? = $ac_status" >&5
22174   (exit "$ac_status"); }; }; then
22175   cf_cv_func_nanosleep=yes
22176 else
22177   echo "$as_me: program exited with status $ac_status" >&5
22178 echo "$as_me: failed program was:" >&5
22179 cat "conftest.$ac_ext" >&5
22180 cf_cv_func_nanosleep=no
22181 fi
22182 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22183 fi
22184 fi
22185 echo "$as_me:22185: result: $cf_cv_func_nanosleep" >&5
22186 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
22187
22188 test "$cf_cv_func_nanosleep" = "yes" &&
22189 cat >>confdefs.h <<\EOF
22190 #define HAVE_NANOSLEEP 1
22191 EOF
22192
22193 for ac_header in \
22194 termio.h \
22195 termios.h \
22196 unistd.h \
22197 sys/ioctl.h \
22198 sys/termio.h \
22199
22200 do
22201 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22202 echo "$as_me:22202: checking for $ac_header" >&5
22203 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22204 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22205   echo $ECHO_N "(cached) $ECHO_C" >&6
22206 else
22207   cat >"conftest.$ac_ext" <<_ACEOF
22208 #line 22208 "configure"
22209 #include "confdefs.h"
22210 #include <$ac_header>
22211 _ACEOF
22212 if { (eval echo "$as_me:22212: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22213   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22214   ac_status=$?
22215   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22216   rm -f conftest.er1
22217   cat conftest.err >&5
22218   echo "$as_me:22218: \$? = $ac_status" >&5
22219   (exit "$ac_status"); } >/dev/null; then
22220   if test -s conftest.err; then
22221     ac_cpp_err=$ac_c_preproc_warn_flag
22222   else
22223     ac_cpp_err=
22224   fi
22225 else
22226   ac_cpp_err=yes
22227 fi
22228 if test -z "$ac_cpp_err"; then
22229   eval "$as_ac_Header=yes"
22230 else
22231   echo "$as_me: failed program was:" >&5
22232   cat "conftest.$ac_ext" >&5
22233   eval "$as_ac_Header=no"
22234 fi
22235 rm -f conftest.err "conftest.$ac_ext"
22236 fi
22237 echo "$as_me:22237: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22238 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22239 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22240   cat >>confdefs.h <<EOF
22241 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22242 EOF
22243
22244 fi
22245 done
22246
22247 if test "$ac_cv_header_termios_h" = yes ; then
22248         case "$CFLAGS $CPPFLAGS" in
22249         (*-D_POSIX_SOURCE*)
22250                 termios_bad=dunno ;;
22251         (*)     termios_bad=maybe ;;
22252         esac
22253         if test "$termios_bad" = maybe ; then
22254         echo "$as_me:22254: checking whether termios.h needs _POSIX_SOURCE" >&5
22255 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
22256         cat >"conftest.$ac_ext" <<_ACEOF
22257 #line 22257 "configure"
22258 #include "confdefs.h"
22259 #include <termios.h>
22260 int
22261 main (void)
22262 {
22263 struct termios foo; int x = foo.c_iflag = 1; (void)x
22264   ;
22265   return 0;
22266 }
22267 _ACEOF
22268 rm -f "conftest.$ac_objext"
22269 if { (eval echo "$as_me:22269: \"$ac_compile\"") >&5
22270   (eval $ac_compile) 2>&5
22271   ac_status=$?
22272   echo "$as_me:22272: \$? = $ac_status" >&5
22273   (exit "$ac_status"); } &&
22274          { ac_try='test -s "conftest.$ac_objext"'
22275   { (eval echo "$as_me:22275: \"$ac_try\"") >&5
22276   (eval $ac_try) 2>&5
22277   ac_status=$?
22278   echo "$as_me:22278: \$? = $ac_status" >&5
22279   (exit "$ac_status"); }; }; then
22280   termios_bad=no
22281 else
22282   echo "$as_me: failed program was:" >&5
22283 cat "conftest.$ac_ext" >&5
22284
22285                 cat >"conftest.$ac_ext" <<_ACEOF
22286 #line 22286 "configure"
22287 #include "confdefs.h"
22288
22289 #define _POSIX_SOURCE
22290 #include <termios.h>
22291 int
22292 main (void)
22293 {
22294 struct termios foo; int x = foo.c_iflag = 2; (void)x
22295   ;
22296   return 0;
22297 }
22298 _ACEOF
22299 rm -f "conftest.$ac_objext"
22300 if { (eval echo "$as_me:22300: \"$ac_compile\"") >&5
22301   (eval $ac_compile) 2>&5
22302   ac_status=$?
22303   echo "$as_me:22303: \$? = $ac_status" >&5
22304   (exit "$ac_status"); } &&
22305          { ac_try='test -s "conftest.$ac_objext"'
22306   { (eval echo "$as_me:22306: \"$ac_try\"") >&5
22307   (eval $ac_try) 2>&5
22308   ac_status=$?
22309   echo "$as_me:22309: \$? = $ac_status" >&5
22310   (exit "$ac_status"); }; }; then
22311   termios_bad=unknown
22312 else
22313   echo "$as_me: failed program was:" >&5
22314 cat "conftest.$ac_ext" >&5
22315 termios_bad=yes
22316 cat >>confdefs.h <<\EOF
22317 #define _POSIX_SOURCE 1
22318 EOF
22319
22320 fi
22321 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22322
22323 fi
22324 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22325         echo "$as_me:22325: result: $termios_bad" >&5
22326 echo "${ECHO_T}$termios_bad" >&6
22327         fi
22328 fi
22329
22330 echo "$as_me:22330: checking for tcgetattr" >&5
22331 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
22332 if test "${cf_cv_have_tcgetattr+set}" = set; then
22333   echo $ECHO_N "(cached) $ECHO_C" >&6
22334 else
22335
22336 cat >"conftest.$ac_ext" <<_ACEOF
22337 #line 22337 "configure"
22338 #include "confdefs.h"
22339
22340 #include <sys/types.h>
22341 #ifdef HAVE_UNISTD_H
22342 #include <unistd.h>
22343 #endif
22344 #ifdef HAVE_TERMIOS_H
22345 #include <termios.h>
22346 #define TTY struct termios
22347 #else
22348 #ifdef HAVE_TERMIO_H
22349 #include <termio.h>
22350 #define TTY struct termio
22351 #endif
22352 #endif
22353
22354 int
22355 main (void)
22356 {
22357
22358 TTY foo;
22359 tcgetattr(1, &foo);
22360   ;
22361   return 0;
22362 }
22363 _ACEOF
22364 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22365 if { (eval echo "$as_me:22365: \"$ac_link\"") >&5
22366   (eval $ac_link) 2>&5
22367   ac_status=$?
22368   echo "$as_me:22368: \$? = $ac_status" >&5
22369   (exit "$ac_status"); } &&
22370          { ac_try='test -s "conftest$ac_exeext"'
22371   { (eval echo "$as_me:22371: \"$ac_try\"") >&5
22372   (eval $ac_try) 2>&5
22373   ac_status=$?
22374   echo "$as_me:22374: \$? = $ac_status" >&5
22375   (exit "$ac_status"); }; }; then
22376   cf_cv_have_tcgetattr=yes
22377 else
22378   echo "$as_me: failed program was:" >&5
22379 cat "conftest.$ac_ext" >&5
22380 cf_cv_have_tcgetattr=no
22381 fi
22382 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22383 fi
22384 echo "$as_me:22384: result: $cf_cv_have_tcgetattr" >&5
22385 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
22386 test "$cf_cv_have_tcgetattr" = yes &&
22387 cat >>confdefs.h <<\EOF
22388 #define HAVE_TCGETATTR 1
22389 EOF
22390
22391 echo "$as_me:22391: checking for vsscanf function or workaround" >&5
22392 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
22393 if test "${cf_cv_func_vsscanf+set}" = set; then
22394   echo $ECHO_N "(cached) $ECHO_C" >&6
22395 else
22396
22397 cat >"conftest.$ac_ext" <<_ACEOF
22398 #line 22398 "configure"
22399 #include "confdefs.h"
22400
22401 #include <stdarg.h>
22402 #include <stdio.h>
22403 int
22404 main (void)
22405 {
22406
22407         va_list ap;
22408         vsscanf("from", "%d", ap)
22409   ;
22410   return 0;
22411 }
22412 _ACEOF
22413 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22414 if { (eval echo "$as_me:22414: \"$ac_link\"") >&5
22415   (eval $ac_link) 2>&5
22416   ac_status=$?
22417   echo "$as_me:22417: \$? = $ac_status" >&5
22418   (exit "$ac_status"); } &&
22419          { ac_try='test -s "conftest$ac_exeext"'
22420   { (eval echo "$as_me:22420: \"$ac_try\"") >&5
22421   (eval $ac_try) 2>&5
22422   ac_status=$?
22423   echo "$as_me:22423: \$? = $ac_status" >&5
22424   (exit "$ac_status"); }; }; then
22425   cf_cv_func_vsscanf=vsscanf
22426 else
22427   echo "$as_me: failed program was:" >&5
22428 cat "conftest.$ac_ext" >&5
22429
22430 cat >"conftest.$ac_ext" <<_ACEOF
22431 #line 22431 "configure"
22432 #include "confdefs.h"
22433
22434 #include <stdarg.h>
22435 #include <stdio.h>
22436 int
22437 main (void)
22438 {
22439
22440         FILE strbuf;
22441         char *str = "from";
22442
22443         strbuf._flag = _IOREAD;
22444         strbuf._ptr = strbuf._base = (unsigned char *) str;
22445         strbuf._cnt = strlen(str);
22446         strbuf._file = _NFILE;
22447         return (vfscanf(&strbuf, "%d", ap))
22448   ;
22449   return 0;
22450 }
22451 _ACEOF
22452 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22453 if { (eval echo "$as_me:22453: \"$ac_link\"") >&5
22454   (eval $ac_link) 2>&5
22455   ac_status=$?
22456   echo "$as_me:22456: \$? = $ac_status" >&5
22457   (exit "$ac_status"); } &&
22458          { ac_try='test -s "conftest$ac_exeext"'
22459   { (eval echo "$as_me:22459: \"$ac_try\"") >&5
22460   (eval $ac_try) 2>&5
22461   ac_status=$?
22462   echo "$as_me:22462: \$? = $ac_status" >&5
22463   (exit "$ac_status"); }; }; then
22464   cf_cv_func_vsscanf=vfscanf
22465 else
22466   echo "$as_me: failed program was:" >&5
22467 cat "conftest.$ac_ext" >&5
22468
22469 cat >"conftest.$ac_ext" <<_ACEOF
22470 #line 22470 "configure"
22471 #include "confdefs.h"
22472
22473 #include <stdarg.h>
22474 #include <stdio.h>
22475 int
22476 main (void)
22477 {
22478
22479         FILE strbuf;
22480         char *str = "from";
22481
22482         strbuf._flag = _IOREAD;
22483         strbuf._ptr = strbuf._base = (unsigned char *) str;
22484         strbuf._cnt = strlen(str);
22485         strbuf._file = _NFILE;
22486         return (_doscan(&strbuf, "%d", ap))
22487   ;
22488   return 0;
22489 }
22490 _ACEOF
22491 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22492 if { (eval echo "$as_me:22492: \"$ac_link\"") >&5
22493   (eval $ac_link) 2>&5
22494   ac_status=$?
22495   echo "$as_me:22495: \$? = $ac_status" >&5
22496   (exit "$ac_status"); } &&
22497          { ac_try='test -s "conftest$ac_exeext"'
22498   { (eval echo "$as_me:22498: \"$ac_try\"") >&5
22499   (eval $ac_try) 2>&5
22500   ac_status=$?
22501   echo "$as_me:22501: \$? = $ac_status" >&5
22502   (exit "$ac_status"); }; }; then
22503   cf_cv_func_vsscanf=_doscan
22504 else
22505   echo "$as_me: failed program was:" >&5
22506 cat "conftest.$ac_ext" >&5
22507
22508 cf_cv_func_vsscanf=no
22509 fi
22510 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22511 fi
22512 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22513 fi
22514 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22515 fi
22516 echo "$as_me:22516: result: $cf_cv_func_vsscanf" >&5
22517 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
22518
22519 case "$cf_cv_func_vsscanf" in
22520 (vsscanf)
22521 cat >>confdefs.h <<\EOF
22522 #define HAVE_VSSCANF 1
22523 EOF
22524 ;;
22525 (vfscanf)
22526 cat >>confdefs.h <<\EOF
22527 #define HAVE_VFSCANF 1
22528 EOF
22529 ;;
22530 (_doscan)
22531 cat >>confdefs.h <<\EOF
22532 #define HAVE__DOSCAN 1
22533 EOF
22534 ;;
22535 esac
22536
22537 for ac_header in \
22538 unistd.h \
22539
22540 do
22541 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22542 echo "$as_me:22542: checking for $ac_header" >&5
22543 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22544 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22545   echo $ECHO_N "(cached) $ECHO_C" >&6
22546 else
22547   cat >"conftest.$ac_ext" <<_ACEOF
22548 #line 22548 "configure"
22549 #include "confdefs.h"
22550 #include <$ac_header>
22551 _ACEOF
22552 if { (eval echo "$as_me:22552: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22553   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22554   ac_status=$?
22555   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22556   rm -f conftest.er1
22557   cat conftest.err >&5
22558   echo "$as_me:22558: \$? = $ac_status" >&5
22559   (exit "$ac_status"); } >/dev/null; then
22560   if test -s conftest.err; then
22561     ac_cpp_err=$ac_c_preproc_warn_flag
22562   else
22563     ac_cpp_err=
22564   fi
22565 else
22566   ac_cpp_err=yes
22567 fi
22568 if test -z "$ac_cpp_err"; then
22569   eval "$as_ac_Header=yes"
22570 else
22571   echo "$as_me: failed program was:" >&5
22572   cat "conftest.$ac_ext" >&5
22573   eval "$as_ac_Header=no"
22574 fi
22575 rm -f conftest.err "conftest.$ac_ext"
22576 fi
22577 echo "$as_me:22577: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22578 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22579 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22580   cat >>confdefs.h <<EOF
22581 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22582 EOF
22583
22584 fi
22585 done
22586
22587 echo "$as_me:22587: checking for working mkstemp" >&5
22588 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
22589 if test "${cf_cv_func_mkstemp+set}" = set; then
22590   echo $ECHO_N "(cached) $ECHO_C" >&6
22591 else
22592
22593 rm -rf ./conftest*
22594 if test "$cross_compiling" = yes; then
22595   cf_cv_func_mkstemp=maybe
22596 else
22597   cat >"conftest.$ac_ext" <<_ACEOF
22598 #line 22598 "configure"
22599 #include "confdefs.h"
22600
22601 $ac_includes_default
22602
22603 int main(void)
22604 {
22605         char *tmpl = "conftestXXXXXX";
22606         char name[2][80];
22607         int n;
22608         int result = 0;
22609         int fd;
22610         struct stat sb;
22611
22612         umask(077);
22613         for (n = 0; n < 2; ++n) {
22614                 strcpy(name[n], tmpl);
22615                 if ((fd = mkstemp(name[n])) >= 0) {
22616                         if (!strcmp(name[n], tmpl)
22617                          || stat(name[n], &sb) != 0
22618                          || (sb.st_mode & S_IFMT) != S_IFREG
22619                          || (sb.st_mode & 077) != 0) {
22620                                 result = 1;
22621                         }
22622                         close(fd);
22623                 }
22624         }
22625         if (result == 0
22626          && !strcmp(name[0], name[1]))
22627                 result = 1;
22628         ${cf_cv_main_return:-return}(result);
22629 }
22630
22631 _ACEOF
22632 rm -f "conftest$ac_exeext"
22633 if { (eval echo "$as_me:22633: \"$ac_link\"") >&5
22634   (eval $ac_link) 2>&5
22635   ac_status=$?
22636   echo "$as_me:22636: \$? = $ac_status" >&5
22637   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22638   { (eval echo "$as_me:22638: \"$ac_try\"") >&5
22639   (eval $ac_try) 2>&5
22640   ac_status=$?
22641   echo "$as_me:22641: \$? = $ac_status" >&5
22642   (exit "$ac_status"); }; }; then
22643   cf_cv_func_mkstemp=yes
22644
22645 else
22646   echo "$as_me: program exited with status $ac_status" >&5
22647 echo "$as_me: failed program was:" >&5
22648 cat "conftest.$ac_ext" >&5
22649 cf_cv_func_mkstemp=no
22650
22651 fi
22652 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22653 fi
22654
22655 fi
22656 echo "$as_me:22656: result: $cf_cv_func_mkstemp" >&5
22657 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
22658 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
22659         echo "$as_me:22659: checking for mkstemp" >&5
22660 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
22661 if test "${ac_cv_func_mkstemp+set}" = set; then
22662   echo $ECHO_N "(cached) $ECHO_C" >&6
22663 else
22664   cat >"conftest.$ac_ext" <<_ACEOF
22665 #line 22665 "configure"
22666 #include "confdefs.h"
22667 #define mkstemp autoconf_temporary
22668 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22669 #undef mkstemp
22670
22671 #ifdef __cplusplus
22672 extern "C"
22673 #endif
22674
22675 /* We use char because int might match the return type of a gcc2
22676    builtin and then its argument prototype would still apply.  */
22677 char mkstemp (void);
22678
22679 int
22680 main (void)
22681 {
22682
22683 /* The GNU C library defines stubs for functions which it implements
22684     to always fail with ENOSYS.  Some functions are actually named
22685     something starting with __ and the normal name is an alias.  */
22686 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
22687 #error found stub for mkstemp
22688 #endif
22689
22690         return mkstemp ();
22691   ;
22692   return 0;
22693 }
22694 _ACEOF
22695 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22696 if { (eval echo "$as_me:22696: \"$ac_link\"") >&5
22697   (eval $ac_link) 2>&5
22698   ac_status=$?
22699   echo "$as_me:22699: \$? = $ac_status" >&5
22700   (exit "$ac_status"); } &&
22701          { ac_try='test -s "conftest$ac_exeext"'
22702   { (eval echo "$as_me:22702: \"$ac_try\"") >&5
22703   (eval $ac_try) 2>&5
22704   ac_status=$?
22705   echo "$as_me:22705: \$? = $ac_status" >&5
22706   (exit "$ac_status"); }; }; then
22707   ac_cv_func_mkstemp=yes
22708 else
22709   echo "$as_me: failed program was:" >&5
22710 cat "conftest.$ac_ext" >&5
22711 ac_cv_func_mkstemp=no
22712 fi
22713 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22714 fi
22715 echo "$as_me:22715: result: $ac_cv_func_mkstemp" >&5
22716 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22717
22718 fi
22719 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22720
22721 cat >>confdefs.h <<\EOF
22722 #define HAVE_MKSTEMP 1
22723 EOF
22724
22725 fi
22726
22727 # setup for prototype of fallback for vsscanf()
22728
22729 if test "$cf_cv_func_vsscanf" = vsscanf ; then
22730         HAVE_VSSCANF=1
22731 else
22732         HAVE_VSSCANF=0
22733 fi
22734
22735 if test "x$cross_compiling" = xyes ; then
22736         { echo "$as_me:22736: WARNING: cross compiling: assume setvbuf params not reversed" >&5
22737 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22738 else
22739         echo "$as_me:22739: checking whether setvbuf arguments are reversed" >&5
22740 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22741 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22742   echo $ECHO_N "(cached) $ECHO_C" >&6
22743 else
22744   if test "$cross_compiling" = yes; then
22745   { { echo "$as_me:22745: error: cannot run test program while cross compiling" >&5
22746 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22747    { (exit 1); exit 1; }; }
22748 else
22749   cat >"conftest.$ac_ext" <<_ACEOF
22750 #line 22750 "configure"
22751 #include "confdefs.h"
22752 #include <stdio.h>
22753 /* If setvbuf has the reversed format, exit 0. */
22754 int
22755 main (void)
22756 {
22757   /* This call has the arguments reversed.
22758      A reversed system may check and see that the address of main
22759      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
22760   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22761     $ac_main_return(1);
22762   putc('\r', stdout);
22763   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22764 }
22765 _ACEOF
22766 rm -f "conftest$ac_exeext"
22767 if { (eval echo "$as_me:22767: \"$ac_link\"") >&5
22768   (eval $ac_link) 2>&5
22769   ac_status=$?
22770   echo "$as_me:22770: \$? = $ac_status" >&5
22771   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22772   { (eval echo "$as_me:22772: \"$ac_try\"") >&5
22773   (eval $ac_try) 2>&5
22774   ac_status=$?
22775   echo "$as_me:22775: \$? = $ac_status" >&5
22776   (exit "$ac_status"); }; }; then
22777   ac_cv_func_setvbuf_reversed=yes
22778 else
22779   echo "$as_me: program exited with status $ac_status" >&5
22780 echo "$as_me: failed program was:" >&5
22781 cat "conftest.$ac_ext" >&5
22782 ac_cv_func_setvbuf_reversed=no
22783 fi
22784 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22785 fi
22786 rm -f core ./core.* ./*.core
22787 fi
22788 echo "$as_me:22788: result: $ac_cv_func_setvbuf_reversed" >&5
22789 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
22790 if test $ac_cv_func_setvbuf_reversed = yes; then
22791
22792 cat >>confdefs.h <<\EOF
22793 #define SETVBUF_REVERSED 1
22794 EOF
22795
22796 fi
22797
22798 fi
22799 echo "$as_me:22799: checking for intptr_t" >&5
22800 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
22801 if test "${ac_cv_type_intptr_t+set}" = set; then
22802   echo $ECHO_N "(cached) $ECHO_C" >&6
22803 else
22804   cat >"conftest.$ac_ext" <<_ACEOF
22805 #line 22805 "configure"
22806 #include "confdefs.h"
22807 $ac_includes_default
22808 int
22809 main (void)
22810 {
22811 if ((intptr_t *) 0)
22812   return 0;
22813 if (sizeof (intptr_t))
22814   return 0;
22815   ;
22816   return 0;
22817 }
22818 _ACEOF
22819 rm -f "conftest.$ac_objext"
22820 if { (eval echo "$as_me:22820: \"$ac_compile\"") >&5
22821   (eval $ac_compile) 2>&5
22822   ac_status=$?
22823   echo "$as_me:22823: \$? = $ac_status" >&5
22824   (exit "$ac_status"); } &&
22825          { ac_try='test -s "conftest.$ac_objext"'
22826   { (eval echo "$as_me:22826: \"$ac_try\"") >&5
22827   (eval $ac_try) 2>&5
22828   ac_status=$?
22829   echo "$as_me:22829: \$? = $ac_status" >&5
22830   (exit "$ac_status"); }; }; then
22831   ac_cv_type_intptr_t=yes
22832 else
22833   echo "$as_me: failed program was:" >&5
22834 cat "conftest.$ac_ext" >&5
22835 ac_cv_type_intptr_t=no
22836 fi
22837 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22838 fi
22839 echo "$as_me:22839: result: $ac_cv_type_intptr_t" >&5
22840 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
22841 if test "$ac_cv_type_intptr_t" = yes; then
22842   :
22843 else
22844
22845 cat >>confdefs.h <<EOF
22846 #define intptr_t long
22847 EOF
22848
22849 fi
22850
22851 echo "$as_me:22851: checking for ssize_t" >&5
22852 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22853 if test "${ac_cv_type_ssize_t+set}" = set; then
22854   echo $ECHO_N "(cached) $ECHO_C" >&6
22855 else
22856   cat >"conftest.$ac_ext" <<_ACEOF
22857 #line 22857 "configure"
22858 #include "confdefs.h"
22859 $ac_includes_default
22860 int
22861 main (void)
22862 {
22863 if ((ssize_t *) 0)
22864   return 0;
22865 if (sizeof (ssize_t))
22866   return 0;
22867   ;
22868   return 0;
22869 }
22870 _ACEOF
22871 rm -f "conftest.$ac_objext"
22872 if { (eval echo "$as_me:22872: \"$ac_compile\"") >&5
22873   (eval $ac_compile) 2>&5
22874   ac_status=$?
22875   echo "$as_me:22875: \$? = $ac_status" >&5
22876   (exit "$ac_status"); } &&
22877          { ac_try='test -s "conftest.$ac_objext"'
22878   { (eval echo "$as_me:22878: \"$ac_try\"") >&5
22879   (eval $ac_try) 2>&5
22880   ac_status=$?
22881   echo "$as_me:22881: \$? = $ac_status" >&5
22882   (exit "$ac_status"); }; }; then
22883   ac_cv_type_ssize_t=yes
22884 else
22885   echo "$as_me: failed program was:" >&5
22886 cat "conftest.$ac_ext" >&5
22887 ac_cv_type_ssize_t=no
22888 fi
22889 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22890 fi
22891 echo "$as_me:22891: result: $ac_cv_type_ssize_t" >&5
22892 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
22893 if test "$ac_cv_type_ssize_t" = yes; then
22894   :
22895 else
22896
22897 cat >>confdefs.h <<EOF
22898 #define ssize_t int
22899 EOF
22900
22901 fi
22902
22903 echo "$as_me:22903: checking for type sigaction_t" >&5
22904 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
22905 if test "${cf_cv_type_sigaction+set}" = set; then
22906   echo $ECHO_N "(cached) $ECHO_C" >&6
22907 else
22908
22909         cat >"conftest.$ac_ext" <<_ACEOF
22910 #line 22910 "configure"
22911 #include "confdefs.h"
22912
22913 #include <signal.h>
22914 int
22915 main (void)
22916 {
22917 sigaction_t x
22918   ;
22919   return 0;
22920 }
22921 _ACEOF
22922 rm -f "conftest.$ac_objext"
22923 if { (eval echo "$as_me:22923: \"$ac_compile\"") >&5
22924   (eval $ac_compile) 2>&5
22925   ac_status=$?
22926   echo "$as_me:22926: \$? = $ac_status" >&5
22927   (exit "$ac_status"); } &&
22928          { ac_try='test -s "conftest.$ac_objext"'
22929   { (eval echo "$as_me:22929: \"$ac_try\"") >&5
22930   (eval $ac_try) 2>&5
22931   ac_status=$?
22932   echo "$as_me:22932: \$? = $ac_status" >&5
22933   (exit "$ac_status"); }; }; then
22934   cf_cv_type_sigaction=yes
22935 else
22936   echo "$as_me: failed program was:" >&5
22937 cat "conftest.$ac_ext" >&5
22938 cf_cv_type_sigaction=no
22939 fi
22940 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22941 fi
22942
22943 echo "$as_me:22943: result: $cf_cv_type_sigaction" >&5
22944 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
22945 test "$cf_cv_type_sigaction" = yes &&
22946 cat >>confdefs.h <<\EOF
22947 #define HAVE_TYPE_SIGACTION 1
22948 EOF
22949
22950 echo "$as_me:22950: checking declaration of size-change" >&5
22951 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
22952 if test "${cf_cv_sizechange+set}" = set; then
22953   echo $ECHO_N "(cached) $ECHO_C" >&6
22954 else
22955
22956         cf_cv_sizechange=unknown
22957         cf_save_CPPFLAGS="$CPPFLAGS"
22958
22959 for cf_opts in "" "NEED_PTEM_H"
22960 do
22961
22962         CPPFLAGS="$cf_save_CPPFLAGS"
22963         if test -n "$cf_opts"
22964         then
22965
22966         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22967         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
22968
22969         fi
22970         cat >"conftest.$ac_ext" <<_ACEOF
22971 #line 22971 "configure"
22972 #include "confdefs.h"
22973 #include <sys/types.h>
22974 #ifdef HAVE_TERMIOS_H
22975 #include <termios.h>
22976 #else
22977 #ifdef HAVE_TERMIO_H
22978 #include <termio.h>
22979 #endif
22980 #endif
22981
22982 #ifdef NEED_PTEM_H
22983 /* This is a workaround for SCO:  they neglected to define struct winsize in
22984  * termios.h -- it is only in termio.h and ptem.h
22985  */
22986 #include <sys/stream.h>
22987 #include <sys/ptem.h>
22988 #endif
22989
22990 #ifdef HAVE_SYS_IOCTL_H
22991 #include <sys/ioctl.h>
22992 #endif
22993
22994 int
22995 main (void)
22996 {
22997
22998 #ifdef TIOCGSIZE
22999         struct ttysize win;     /* SunOS 3.0... */
23000         int y = win.ts_lines = 2;
23001         int x = win.ts_cols = 1;
23002         (void)y;
23003         (void)x;
23004 #else
23005 #ifdef TIOCGWINSZ
23006         struct winsize win;     /* everything else */
23007         int y = win.ws_row = 2;
23008         int x = win.ws_col = 1;
23009         (void)y;
23010         (void)x;
23011 #else
23012         no TIOCGSIZE or TIOCGWINSZ
23013 #endif /* TIOCGWINSZ */
23014 #endif /* TIOCGSIZE */
23015
23016   ;
23017   return 0;
23018 }
23019 _ACEOF
23020 rm -f "conftest.$ac_objext"
23021 if { (eval echo "$as_me:23021: \"$ac_compile\"") >&5
23022   (eval $ac_compile) 2>&5
23023   ac_status=$?
23024   echo "$as_me:23024: \$? = $ac_status" >&5
23025   (exit "$ac_status"); } &&
23026          { ac_try='test -s "conftest.$ac_objext"'
23027   { (eval echo "$as_me:23027: \"$ac_try\"") >&5
23028   (eval $ac_try) 2>&5
23029   ac_status=$?
23030   echo "$as_me:23030: \$? = $ac_status" >&5
23031   (exit "$ac_status"); }; }; then
23032   cf_cv_sizechange=yes
23033 else
23034   echo "$as_me: failed program was:" >&5
23035 cat "conftest.$ac_ext" >&5
23036 cf_cv_sizechange=no
23037 fi
23038 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23039
23040         CPPFLAGS="$cf_save_CPPFLAGS"
23041         if test "$cf_cv_sizechange" = yes ; then
23042                 echo "size-change succeeded ($cf_opts)" >&5
23043                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
23044                 break
23045         fi
23046 done
23047
23048 fi
23049 echo "$as_me:23049: result: $cf_cv_sizechange" >&5
23050 echo "${ECHO_T}$cf_cv_sizechange" >&6
23051 if test "$cf_cv_sizechange" != no ; then
23052
23053 cat >>confdefs.h <<\EOF
23054 #define HAVE_SIZECHANGE 1
23055 EOF
23056
23057         case "$cf_cv_sizechange" in
23058         (NEED*)
23059                 cat >>confdefs.h <<EOF
23060 #define $cf_cv_sizechange  1
23061 EOF
23062
23063                 ;;
23064         esac
23065 fi
23066
23067 echo "$as_me:23067: checking for memmove" >&5
23068 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
23069 if test "${ac_cv_func_memmove+set}" = set; then
23070   echo $ECHO_N "(cached) $ECHO_C" >&6
23071 else
23072   cat >"conftest.$ac_ext" <<_ACEOF
23073 #line 23073 "configure"
23074 #include "confdefs.h"
23075 #define memmove autoconf_temporary
23076 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23077 #undef memmove
23078
23079 #ifdef __cplusplus
23080 extern "C"
23081 #endif
23082
23083 /* We use char because int might match the return type of a gcc2
23084    builtin and then its argument prototype would still apply.  */
23085 char memmove (void);
23086
23087 int
23088 main (void)
23089 {
23090
23091 /* The GNU C library defines stubs for functions which it implements
23092     to always fail with ENOSYS.  Some functions are actually named
23093     something starting with __ and the normal name is an alias.  */
23094 #if defined (__stub_memmove) || defined (__stub___memmove)
23095 #error found stub for memmove
23096 #endif
23097
23098         return memmove ();
23099   ;
23100   return 0;
23101 }
23102 _ACEOF
23103 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23104 if { (eval echo "$as_me:23104: \"$ac_link\"") >&5
23105   (eval $ac_link) 2>&5
23106   ac_status=$?
23107   echo "$as_me:23107: \$? = $ac_status" >&5
23108   (exit "$ac_status"); } &&
23109          { ac_try='test -s "conftest$ac_exeext"'
23110   { (eval echo "$as_me:23110: \"$ac_try\"") >&5
23111   (eval $ac_try) 2>&5
23112   ac_status=$?
23113   echo "$as_me:23113: \$? = $ac_status" >&5
23114   (exit "$ac_status"); }; }; then
23115   ac_cv_func_memmove=yes
23116 else
23117   echo "$as_me: failed program was:" >&5
23118 cat "conftest.$ac_ext" >&5
23119 ac_cv_func_memmove=no
23120 fi
23121 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23122 fi
23123 echo "$as_me:23123: result: $ac_cv_func_memmove" >&5
23124 echo "${ECHO_T}$ac_cv_func_memmove" >&6
23125 if test "$ac_cv_func_memmove" = yes; then
23126   :
23127 else
23128
23129 echo "$as_me:23129: checking for bcopy" >&5
23130 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
23131 if test "${ac_cv_func_bcopy+set}" = set; then
23132   echo $ECHO_N "(cached) $ECHO_C" >&6
23133 else
23134   cat >"conftest.$ac_ext" <<_ACEOF
23135 #line 23135 "configure"
23136 #include "confdefs.h"
23137 #define bcopy autoconf_temporary
23138 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23139 #undef bcopy
23140
23141 #ifdef __cplusplus
23142 extern "C"
23143 #endif
23144
23145 /* We use char because int might match the return type of a gcc2
23146    builtin and then its argument prototype would still apply.  */
23147 char bcopy (void);
23148
23149 int
23150 main (void)
23151 {
23152
23153 /* The GNU C library defines stubs for functions which it implements
23154     to always fail with ENOSYS.  Some functions are actually named
23155     something starting with __ and the normal name is an alias.  */
23156 #if defined (__stub_bcopy) || defined (__stub___bcopy)
23157 #error found stub for bcopy
23158 #endif
23159
23160         return bcopy ();
23161   ;
23162   return 0;
23163 }
23164 _ACEOF
23165 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23166 if { (eval echo "$as_me:23166: \"$ac_link\"") >&5
23167   (eval $ac_link) 2>&5
23168   ac_status=$?
23169   echo "$as_me:23169: \$? = $ac_status" >&5
23170   (exit "$ac_status"); } &&
23171          { ac_try='test -s "conftest$ac_exeext"'
23172   { (eval echo "$as_me:23172: \"$ac_try\"") >&5
23173   (eval $ac_try) 2>&5
23174   ac_status=$?
23175   echo "$as_me:23175: \$? = $ac_status" >&5
23176   (exit "$ac_status"); }; }; then
23177   ac_cv_func_bcopy=yes
23178 else
23179   echo "$as_me: failed program was:" >&5
23180 cat "conftest.$ac_ext" >&5
23181 ac_cv_func_bcopy=no
23182 fi
23183 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23184 fi
23185 echo "$as_me:23185: result: $ac_cv_func_bcopy" >&5
23186 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
23187 if test "$ac_cv_func_bcopy" = yes; then
23188
23189         echo "$as_me:23189: checking if bcopy does overlapping moves" >&5
23190 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
23191 if test "${cf_cv_good_bcopy+set}" = set; then
23192   echo $ECHO_N "(cached) $ECHO_C" >&6
23193 else
23194
23195                 if test "$cross_compiling" = yes; then
23196   cf_cv_good_bcopy=unknown
23197 else
23198   cat >"conftest.$ac_ext" <<_ACEOF
23199 #line 23199 "configure"
23200 #include "confdefs.h"
23201
23202 $ac_includes_default
23203
23204 int main(void) {
23205         static char data[] = "abcdefghijklmnopqrstuwwxyz";
23206         char temp[40];
23207         bcopy(data, temp, sizeof(data));
23208         bcopy(temp+10, temp, 15);
23209         bcopy(temp+5, temp+15, 10);
23210         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
23211 }
23212
23213 _ACEOF
23214 rm -f "conftest$ac_exeext"
23215 if { (eval echo "$as_me:23215: \"$ac_link\"") >&5
23216   (eval $ac_link) 2>&5
23217   ac_status=$?
23218   echo "$as_me:23218: \$? = $ac_status" >&5
23219   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23220   { (eval echo "$as_me:23220: \"$ac_try\"") >&5
23221   (eval $ac_try) 2>&5
23222   ac_status=$?
23223   echo "$as_me:23223: \$? = $ac_status" >&5
23224   (exit "$ac_status"); }; }; then
23225   cf_cv_good_bcopy=yes
23226 else
23227   echo "$as_me: program exited with status $ac_status" >&5
23228 echo "$as_me: failed program was:" >&5
23229 cat "conftest.$ac_ext" >&5
23230 cf_cv_good_bcopy=no
23231 fi
23232 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23233 fi
23234
23235 fi
23236 echo "$as_me:23236: result: $cf_cv_good_bcopy" >&5
23237 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
23238
23239 else
23240   cf_cv_good_bcopy=no
23241 fi
23242
23243         if test "$cf_cv_good_bcopy" = yes ; then
23244
23245 cat >>confdefs.h <<\EOF
23246 #define USE_OK_BCOPY 1
23247 EOF
23248
23249         else
23250
23251 cat >>confdefs.h <<\EOF
23252 #define USE_MY_MEMMOVE 1
23253 EOF
23254
23255         fi
23256
23257 fi
23258
23259 tty >/dev/null 2>&1 || {
23260 for ac_func in posix_openpt
23261 do
23262 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23263 echo "$as_me:23263: checking for $ac_func" >&5
23264 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23265 if eval "test \"\${$as_ac_var+set}\" = set"; then
23266   echo $ECHO_N "(cached) $ECHO_C" >&6
23267 else
23268   cat >"conftest.$ac_ext" <<_ACEOF
23269 #line 23269 "configure"
23270 #include "confdefs.h"
23271 #define $ac_func autoconf_temporary
23272 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23273 #undef $ac_func
23274
23275 #ifdef __cplusplus
23276 extern "C"
23277 #endif
23278
23279 /* We use char because int might match the return type of a gcc2
23280    builtin and then its argument prototype would still apply.  */
23281 char $ac_func (void);
23282
23283 int
23284 main (void)
23285 {
23286
23287 /* The GNU C library defines stubs for functions which it implements
23288     to always fail with ENOSYS.  Some functions are actually named
23289     something starting with __ and the normal name is an alias.  */
23290 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23291 #error found stub for $ac_func
23292 #endif
23293
23294         return $ac_func ();
23295   ;
23296   return 0;
23297 }
23298 _ACEOF
23299 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23300 if { (eval echo "$as_me:23300: \"$ac_link\"") >&5
23301   (eval $ac_link) 2>&5
23302   ac_status=$?
23303   echo "$as_me:23303: \$? = $ac_status" >&5
23304   (exit "$ac_status"); } &&
23305          { ac_try='test -s "conftest$ac_exeext"'
23306   { (eval echo "$as_me:23306: \"$ac_try\"") >&5
23307   (eval $ac_try) 2>&5
23308   ac_status=$?
23309   echo "$as_me:23309: \$? = $ac_status" >&5
23310   (exit "$ac_status"); }; }; then
23311   eval "$as_ac_var=yes"
23312 else
23313   echo "$as_me: failed program was:" >&5
23314 cat "conftest.$ac_ext" >&5
23315 eval "$as_ac_var=no"
23316 fi
23317 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23318 fi
23319 echo "$as_me:23319: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23320 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23321 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23322   cat >>confdefs.h <<EOF
23323 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23324 EOF
23325
23326 fi
23327 done
23328  }
23329 echo "$as_me:23329: checking if poll really works" >&5
23330 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
23331 if test "${cf_cv_working_poll+set}" = set; then
23332   echo $ECHO_N "(cached) $ECHO_C" >&6
23333 else
23334
23335 if test "$cross_compiling" = yes; then
23336   cf_cv_working_poll=unknown
23337 else
23338   cat >"conftest.$ac_ext" <<_ACEOF
23339 #line 23339 "configure"
23340 #include "confdefs.h"
23341
23342 $ac_includes_default
23343
23344 #include <fcntl.h>
23345
23346 #ifdef HAVE_POLL_H
23347 #include <poll.h>
23348 #else
23349 #include <sys/poll.h>
23350 #endif
23351
23352 int main(void) {
23353         struct pollfd myfds;
23354         int ret;
23355
23356         /* check for Darwin bug with respect to "devices" */
23357         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
23358         if (myfds.fd < 0)
23359                 myfds.fd = 0;
23360         myfds.events = POLLIN;
23361         myfds.revents = 0;
23362
23363         ret = poll(&myfds, 1, 100);
23364
23365         if (ret < 0 || (myfds.revents & POLLNVAL)) {
23366                 ret = -1;
23367         } else {
23368                 int fd = 0;
23369                 if (!isatty(fd)) {
23370                         fd = open("/dev/tty", 2);       /* O_RDWR */
23371                 }
23372 #ifdef HAVE_POSIX_OPENPT
23373                 if (fd < 0) {
23374                         fd = posix_openpt(O_RDWR);
23375                 }
23376 #endif
23377
23378                 if (fd >= 0) {
23379                         /* also check with standard input */
23380                         myfds.fd = fd;
23381                         myfds.events = POLLIN;
23382                         myfds.revents = 0;
23383                         ret = poll(&myfds, 1, 100);
23384                 } else {
23385                         ret = -1;
23386                 }
23387         }
23388         ${cf_cv_main_return:-return}(ret < 0);
23389 }
23390 _ACEOF
23391 rm -f "conftest$ac_exeext"
23392 if { (eval echo "$as_me:23392: \"$ac_link\"") >&5
23393   (eval $ac_link) 2>&5
23394   ac_status=$?
23395   echo "$as_me:23395: \$? = $ac_status" >&5
23396   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23397   { (eval echo "$as_me:23397: \"$ac_try\"") >&5
23398   (eval $ac_try) 2>&5
23399   ac_status=$?
23400   echo "$as_me:23400: \$? = $ac_status" >&5
23401   (exit "$ac_status"); }; }; then
23402   cf_cv_working_poll=yes
23403 else
23404   echo "$as_me: program exited with status $ac_status" >&5
23405 echo "$as_me: failed program was:" >&5
23406 cat "conftest.$ac_ext" >&5
23407 cf_cv_working_poll=no
23408 fi
23409 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23410 fi
23411 fi
23412 echo "$as_me:23412: result: $cf_cv_working_poll" >&5
23413 echo "${ECHO_T}$cf_cv_working_poll" >&6
23414 test "$cf_cv_working_poll" = "yes" &&
23415 cat >>confdefs.h <<\EOF
23416 #define HAVE_WORKING_POLL 1
23417 EOF
23418
23419 echo "$as_me:23419: checking for va_copy" >&5
23420 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
23421 if test "${cf_cv_have_va_copy+set}" = set; then
23422   echo $ECHO_N "(cached) $ECHO_C" >&6
23423 else
23424
23425 cat >"conftest.$ac_ext" <<_ACEOF
23426 #line 23426 "configure"
23427 #include "confdefs.h"
23428
23429 #include <stdarg.h>
23430
23431 int
23432 main (void)
23433 {
23434
23435         static va_list dst;
23436         static va_list src;
23437         va_copy(dst, src)
23438   ;
23439   return 0;
23440 }
23441 _ACEOF
23442 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23443 if { (eval echo "$as_me:23443: \"$ac_link\"") >&5
23444   (eval $ac_link) 2>&5
23445   ac_status=$?
23446   echo "$as_me:23446: \$? = $ac_status" >&5
23447   (exit "$ac_status"); } &&
23448          { ac_try='test -s "conftest$ac_exeext"'
23449   { (eval echo "$as_me:23449: \"$ac_try\"") >&5
23450   (eval $ac_try) 2>&5
23451   ac_status=$?
23452   echo "$as_me:23452: \$? = $ac_status" >&5
23453   (exit "$ac_status"); }; }; then
23454   cf_cv_have_va_copy=yes
23455 else
23456   echo "$as_me: failed program was:" >&5
23457 cat "conftest.$ac_ext" >&5
23458 cf_cv_have_va_copy=no
23459 fi
23460 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23461 fi
23462 echo "$as_me:23462: result: $cf_cv_have_va_copy" >&5
23463 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
23464
23465 if test "$cf_cv_have_va_copy" = yes;
23466 then
23467
23468 cat >>confdefs.h <<\EOF
23469 #define HAVE_VA_COPY 1
23470 EOF
23471
23472 else # !cf_cv_have_va_copy
23473
23474 echo "$as_me:23474: checking for __va_copy" >&5
23475 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
23476 if test "${cf_cv_have___va_copy+set}" = set; then
23477   echo $ECHO_N "(cached) $ECHO_C" >&6
23478 else
23479
23480 cat >"conftest.$ac_ext" <<_ACEOF
23481 #line 23481 "configure"
23482 #include "confdefs.h"
23483
23484 #include <stdarg.h>
23485
23486 int
23487 main (void)
23488 {
23489
23490         static va_list dst;
23491         static va_list src;
23492         __va_copy(dst, src)
23493   ;
23494   return 0;
23495 }
23496 _ACEOF
23497 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23498 if { (eval echo "$as_me:23498: \"$ac_link\"") >&5
23499   (eval $ac_link) 2>&5
23500   ac_status=$?
23501   echo "$as_me:23501: \$? = $ac_status" >&5
23502   (exit "$ac_status"); } &&
23503          { ac_try='test -s "conftest$ac_exeext"'
23504   { (eval echo "$as_me:23504: \"$ac_try\"") >&5
23505   (eval $ac_try) 2>&5
23506   ac_status=$?
23507   echo "$as_me:23507: \$? = $ac_status" >&5
23508   (exit "$ac_status"); }; }; then
23509   cf_cv_have___va_copy=yes
23510 else
23511   echo "$as_me: failed program was:" >&5
23512 cat "conftest.$ac_ext" >&5
23513 cf_cv_have___va_copy=no
23514 fi
23515 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23516 fi
23517 echo "$as_me:23517: result: $cf_cv_have___va_copy" >&5
23518 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
23519
23520 if test "$cf_cv_have___va_copy" = yes
23521 then
23522
23523 cat >>confdefs.h <<\EOF
23524 #define HAVE___VA_COPY 1
23525 EOF
23526
23527 else # !cf_cv_have___va_copy
23528
23529 echo "$as_me:23529: checking for __builtin_va_copy" >&5
23530 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
23531 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
23532   echo $ECHO_N "(cached) $ECHO_C" >&6
23533 else
23534
23535 cat >"conftest.$ac_ext" <<_ACEOF
23536 #line 23536 "configure"
23537 #include "confdefs.h"
23538
23539 #include <stdarg.h>
23540
23541 int
23542 main (void)
23543 {
23544
23545         static va_list dst;
23546         static va_list src;
23547         __builtin_va_copy(dst, src)
23548   ;
23549   return 0;
23550 }
23551 _ACEOF
23552 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23553 if { (eval echo "$as_me:23553: \"$ac_link\"") >&5
23554   (eval $ac_link) 2>&5
23555   ac_status=$?
23556   echo "$as_me:23556: \$? = $ac_status" >&5
23557   (exit "$ac_status"); } &&
23558          { ac_try='test -s "conftest$ac_exeext"'
23559   { (eval echo "$as_me:23559: \"$ac_try\"") >&5
23560   (eval $ac_try) 2>&5
23561   ac_status=$?
23562   echo "$as_me:23562: \$? = $ac_status" >&5
23563   (exit "$ac_status"); }; }; then
23564   cf_cv_have___builtin_va_copy=yes
23565 else
23566   echo "$as_me: failed program was:" >&5
23567 cat "conftest.$ac_ext" >&5
23568 cf_cv_have___builtin_va_copy=no
23569 fi
23570 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23571 fi
23572 echo "$as_me:23572: result: $cf_cv_have___builtin_va_copy" >&5
23573 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
23574
23575 test "$cf_cv_have___builtin_va_copy" = yes &&
23576
23577 cat >>confdefs.h <<\EOF
23578 #define HAVE___BUILTIN_VA_COPY 1
23579 EOF
23580
23581 fi # cf_cv_have___va_copy
23582
23583 fi # cf_cv_have_va_copy
23584
23585 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
23586 (*yes*)
23587         ;;
23588
23589 (*)
23590         echo "$as_me:23590: checking if we can simply copy va_list" >&5
23591 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
23592 if test "${cf_cv_pointer_va_list+set}" = set; then
23593   echo $ECHO_N "(cached) $ECHO_C" >&6
23594 else
23595
23596 cat >"conftest.$ac_ext" <<_ACEOF
23597 #line 23597 "configure"
23598 #include "confdefs.h"
23599
23600 #include <stdarg.h>
23601
23602 int
23603 main (void)
23604 {
23605
23606         va_list dst;
23607         va_list src;
23608         dst = src
23609   ;
23610   return 0;
23611 }
23612 _ACEOF
23613 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23614 if { (eval echo "$as_me:23614: \"$ac_link\"") >&5
23615   (eval $ac_link) 2>&5
23616   ac_status=$?
23617   echo "$as_me:23617: \$? = $ac_status" >&5
23618   (exit "$ac_status"); } &&
23619          { ac_try='test -s "conftest$ac_exeext"'
23620   { (eval echo "$as_me:23620: \"$ac_try\"") >&5
23621   (eval $ac_try) 2>&5
23622   ac_status=$?
23623   echo "$as_me:23623: \$? = $ac_status" >&5
23624   (exit "$ac_status"); }; }; then
23625   cf_cv_pointer_va_list=yes
23626 else
23627   echo "$as_me: failed program was:" >&5
23628 cat "conftest.$ac_ext" >&5
23629 cf_cv_pointer_va_list=no
23630 fi
23631 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23632 fi
23633 echo "$as_me:23633: result: $cf_cv_pointer_va_list" >&5
23634 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
23635
23636         if test "$cf_cv_pointer_va_list" = no
23637         then
23638                 echo "$as_me:23638: checking if we can copy va_list indirectly" >&5
23639 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
23640 if test "${cf_cv_array_va_list+set}" = set; then
23641   echo $ECHO_N "(cached) $ECHO_C" >&6
23642 else
23643
23644 cat >"conftest.$ac_ext" <<_ACEOF
23645 #line 23645 "configure"
23646 #include "confdefs.h"
23647
23648 #include <stdarg.h>
23649
23650 int
23651 main (void)
23652 {
23653
23654         va_list dst;
23655         va_list src;
23656         *dst = *src
23657   ;
23658   return 0;
23659 }
23660 _ACEOF
23661 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23662 if { (eval echo "$as_me:23662: \"$ac_link\"") >&5
23663   (eval $ac_link) 2>&5
23664   ac_status=$?
23665   echo "$as_me:23665: \$? = $ac_status" >&5
23666   (exit "$ac_status"); } &&
23667          { ac_try='test -s "conftest$ac_exeext"'
23668   { (eval echo "$as_me:23668: \"$ac_try\"") >&5
23669   (eval $ac_try) 2>&5
23670   ac_status=$?
23671   echo "$as_me:23671: \$? = $ac_status" >&5
23672   (exit "$ac_status"); }; }; then
23673   cf_cv_array_va_list=yes
23674 else
23675   echo "$as_me: failed program was:" >&5
23676 cat "conftest.$ac_ext" >&5
23677 cf_cv_array_va_list=no
23678 fi
23679 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23680 fi
23681 echo "$as_me:23681: result: $cf_cv_array_va_list" >&5
23682 echo "${ECHO_T}$cf_cv_array_va_list" >&6
23683                 test "$cf_cv_array_va_list" = yes &&
23684 cat >>confdefs.h <<\EOF
23685 #define ARRAY_VA_LIST 1
23686 EOF
23687
23688         fi
23689         ;;
23690 esac
23691
23692 echo "$as_me:23692: checking for pid_t" >&5
23693 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23694 if test "${ac_cv_type_pid_t+set}" = set; then
23695   echo $ECHO_N "(cached) $ECHO_C" >&6
23696 else
23697   cat >"conftest.$ac_ext" <<_ACEOF
23698 #line 23698 "configure"
23699 #include "confdefs.h"
23700 $ac_includes_default
23701 int
23702 main (void)
23703 {
23704 if ((pid_t *) 0)
23705   return 0;
23706 if (sizeof (pid_t))
23707   return 0;
23708   ;
23709   return 0;
23710 }
23711 _ACEOF
23712 rm -f "conftest.$ac_objext"
23713 if { (eval echo "$as_me:23713: \"$ac_compile\"") >&5
23714   (eval $ac_compile) 2>&5
23715   ac_status=$?
23716   echo "$as_me:23716: \$? = $ac_status" >&5
23717   (exit "$ac_status"); } &&
23718          { ac_try='test -s "conftest.$ac_objext"'
23719   { (eval echo "$as_me:23719: \"$ac_try\"") >&5
23720   (eval $ac_try) 2>&5
23721   ac_status=$?
23722   echo "$as_me:23722: \$? = $ac_status" >&5
23723   (exit "$ac_status"); }; }; then
23724   ac_cv_type_pid_t=yes
23725 else
23726   echo "$as_me: failed program was:" >&5
23727 cat "conftest.$ac_ext" >&5
23728 ac_cv_type_pid_t=no
23729 fi
23730 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23731 fi
23732 echo "$as_me:23732: result: $ac_cv_type_pid_t" >&5
23733 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
23734 if test "$ac_cv_type_pid_t" = yes; then
23735   :
23736 else
23737
23738 cat >>confdefs.h <<EOF
23739 #define pid_t int
23740 EOF
23741
23742 fi
23743
23744 for ac_header in unistd.h vfork.h
23745 do
23746 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23747 echo "$as_me:23747: checking for $ac_header" >&5
23748 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23749 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23750   echo $ECHO_N "(cached) $ECHO_C" >&6
23751 else
23752   cat >"conftest.$ac_ext" <<_ACEOF
23753 #line 23753 "configure"
23754 #include "confdefs.h"
23755 #include <$ac_header>
23756 _ACEOF
23757 if { (eval echo "$as_me:23757: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23758   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23759   ac_status=$?
23760   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23761   rm -f conftest.er1
23762   cat conftest.err >&5
23763   echo "$as_me:23763: \$? = $ac_status" >&5
23764   (exit "$ac_status"); } >/dev/null; then
23765   if test -s conftest.err; then
23766     ac_cpp_err=$ac_c_preproc_warn_flag
23767   else
23768     ac_cpp_err=
23769   fi
23770 else
23771   ac_cpp_err=yes
23772 fi
23773 if test -z "$ac_cpp_err"; then
23774   eval "$as_ac_Header=yes"
23775 else
23776   echo "$as_me: failed program was:" >&5
23777   cat "conftest.$ac_ext" >&5
23778   eval "$as_ac_Header=no"
23779 fi
23780 rm -f conftest.err "conftest.$ac_ext"
23781 fi
23782 echo "$as_me:23782: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23783 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23784 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23785   cat >>confdefs.h <<EOF
23786 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23787 EOF
23788
23789 fi
23790 done
23791
23792 for ac_func in fork vfork
23793 do
23794 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23795 echo "$as_me:23795: checking for $ac_func" >&5
23796 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23797 if eval "test \"\${$as_ac_var+set}\" = set"; then
23798   echo $ECHO_N "(cached) $ECHO_C" >&6
23799 else
23800   cat >"conftest.$ac_ext" <<_ACEOF
23801 #line 23801 "configure"
23802 #include "confdefs.h"
23803 #define $ac_func autoconf_temporary
23804 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23805 #undef $ac_func
23806
23807 #ifdef __cplusplus
23808 extern "C"
23809 #endif
23810
23811 /* We use char because int might match the return type of a gcc2
23812    builtin and then its argument prototype would still apply.  */
23813 char $ac_func (void);
23814
23815 int
23816 main (void)
23817 {
23818
23819 /* The GNU C library defines stubs for functions which it implements
23820     to always fail with ENOSYS.  Some functions are actually named
23821     something starting with __ and the normal name is an alias.  */
23822 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23823 #error found stub for $ac_func
23824 #endif
23825
23826         return $ac_func ();
23827   ;
23828   return 0;
23829 }
23830 _ACEOF
23831 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23832 if { (eval echo "$as_me:23832: \"$ac_link\"") >&5
23833   (eval $ac_link) 2>&5
23834   ac_status=$?
23835   echo "$as_me:23835: \$? = $ac_status" >&5
23836   (exit "$ac_status"); } &&
23837          { ac_try='test -s "conftest$ac_exeext"'
23838   { (eval echo "$as_me:23838: \"$ac_try\"") >&5
23839   (eval $ac_try) 2>&5
23840   ac_status=$?
23841   echo "$as_me:23841: \$? = $ac_status" >&5
23842   (exit "$ac_status"); }; }; then
23843   eval "$as_ac_var=yes"
23844 else
23845   echo "$as_me: failed program was:" >&5
23846 cat "conftest.$ac_ext" >&5
23847 eval "$as_ac_var=no"
23848 fi
23849 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23850 fi
23851 echo "$as_me:23851: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23852 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23853 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23854   cat >>confdefs.h <<EOF
23855 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23856 EOF
23857
23858 fi
23859 done
23860
23861 ac_cv_func_fork_works=$ac_cv_func_fork
23862 if test "x$ac_cv_func_fork" = xyes; then
23863   echo "$as_me:23863: checking for working fork" >&5
23864 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23865 if test "${ac_cv_func_fork_works+set}" = set; then
23866   echo $ECHO_N "(cached) $ECHO_C" >&6
23867 else
23868   if test "$cross_compiling" = yes; then
23869   ac_cv_func_fork_works=cross
23870 else
23871   cat >"conftest.$ac_ext" <<_ACEOF
23872 /* By Rüdiger Kuhlmann. */
23873       #include <sys/types.h>
23874       #if HAVE_UNISTD_H
23875       # include <unistd.h>
23876       #endif
23877       /* Some systems only have a dummy stub for fork() */
23878       int main (void)
23879       {
23880         if (fork() < 0)
23881           $ac_main_return (1);
23882         $ac_main_return (0);
23883       }
23884 _ACEOF
23885 rm -f "conftest$ac_exeext"
23886 if { (eval echo "$as_me:23886: \"$ac_link\"") >&5
23887   (eval $ac_link) 2>&5
23888   ac_status=$?
23889   echo "$as_me:23889: \$? = $ac_status" >&5
23890   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23891   { (eval echo "$as_me:23891: \"$ac_try\"") >&5
23892   (eval $ac_try) 2>&5
23893   ac_status=$?
23894   echo "$as_me:23894: \$? = $ac_status" >&5
23895   (exit "$ac_status"); }; }; then
23896   ac_cv_func_fork_works=yes
23897 else
23898   echo "$as_me: program exited with status $ac_status" >&5
23899 echo "$as_me: failed program was:" >&5
23900 cat "conftest.$ac_ext" >&5
23901 ac_cv_func_fork_works=no
23902 fi
23903 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23904 fi
23905 fi
23906 echo "$as_me:23906: result: $ac_cv_func_fork_works" >&5
23907 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
23908
23909 fi
23910 if test "x$ac_cv_func_fork_works" = xcross; then
23911   case $host in
23912     *-*-amigaos* | *-*-msdosdjgpp*)
23913       # Override, as these systems have only a dummy fork() stub
23914       ac_cv_func_fork_works=no
23915       ;;
23916     *)
23917       ac_cv_func_fork_works=yes
23918       ;;
23919   esac
23920   { echo "$as_me:23920: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
23921 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
23922 fi
23923 ac_cv_func_vfork_works=$ac_cv_func_vfork
23924 if test "x$ac_cv_func_vfork" = xyes; then
23925   echo "$as_me:23925: checking for working vfork" >&5
23926 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
23927 if test "${ac_cv_func_vfork_works+set}" = set; then
23928   echo $ECHO_N "(cached) $ECHO_C" >&6
23929 else
23930   if test "$cross_compiling" = yes; then
23931   ac_cv_func_vfork_works=cross
23932 else
23933   cat >"conftest.$ac_ext" <<_ACEOF
23934 #line 23934 "configure"
23935 #include "confdefs.h"
23936 /* Thanks to Paul Eggert for this test.  */
23937 #include <stdio.h>
23938 #include <sys/types.h>
23939 #include <sys/stat.h>
23940 #if HAVE_UNISTD_H
23941 # include <unistd.h>
23942 #endif
23943 #if HAVE_VFORK_H
23944 # include <vfork.h>
23945 #endif
23946 /* On some sparc systems, changes by the child to local and incoming
23947    argument registers are propagated back to the parent.  The compiler
23948    is told about this with #include <vfork.h>, but some compilers
23949    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
23950    static variable whose address is put into a register that is
23951    clobbered by the vfork.  */
23952 static
23953 #ifdef __cplusplus
23954 sparc_address_test (int arg)
23955 # else
23956 sparc_address_test (arg) int arg;
23957 #endif
23958 {
23959   static pid_t child;
23960   if (!child) {
23961     child = vfork ();
23962     if (child < 0) {
23963       perror ("vfork");
23964       _exit(2);
23965     }
23966     if (!child) {
23967       arg = getpid();
23968       write(-1, "", 0);
23969       _exit (arg);
23970     }
23971   }
23972 }
23973
23974 int
23975 main (void)
23976 {
23977   pid_t parent = getpid ();
23978   pid_t child;
23979
23980   sparc_address_test ();
23981
23982   child = vfork ();
23983
23984   if (child == 0) {
23985     /* Here is another test for sparc vfork register problems.  This
23986        test uses lots of local variables, at least as many local
23987        variables as main has allocated so far including compiler
23988        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
23989        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
23990        reuse the register of parent for one of the local variables,
23991        since it will think that parent can't possibly be used any more
23992        in this routine.  Assigning to the local variable will thus
23993        munge parent in the parent process.  */
23994     pid_t
23995       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23996       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23997     /* Convince the compiler that p..p7 are live; otherwise, it might
23998        use the same hardware register for all 8 local variables.  */
23999     if (p != p1 || p != p2 || p != p3 || p != p4
24000         || p != p5 || p != p6 || p != p7)
24001       _exit(1);
24002
24003     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
24004        from child file descriptors.  If the child closes a descriptor
24005        before it execs or exits, this munges the parent's descriptor
24006        as well.  Test for this by closing stdout in the child.  */
24007     _exit(close(fileno(stdout)) != 0);
24008   } else {
24009     int status;
24010     struct stat st;
24011
24012     while (wait(&status) != child)
24013       ;
24014     $ac_main_return(
24015          /* Was there some problem with vforking?  */
24016          child < 0
24017
24018          /* Did the child fail?  (This shouldn't happen.)  */
24019          || status
24020
24021          /* Did the vfork/compiler bug occur?  */
24022          || parent != getpid()
24023
24024          /* Did the file descriptor bug occur?  */
24025          || fstat(fileno(stdout), &st) != 0
24026          );
24027   }
24028 }
24029 _ACEOF
24030 rm -f "conftest$ac_exeext"
24031 if { (eval echo "$as_me:24031: \"$ac_link\"") >&5
24032   (eval $ac_link) 2>&5
24033   ac_status=$?
24034   echo "$as_me:24034: \$? = $ac_status" >&5
24035   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24036   { (eval echo "$as_me:24036: \"$ac_try\"") >&5
24037   (eval $ac_try) 2>&5
24038   ac_status=$?
24039   echo "$as_me:24039: \$? = $ac_status" >&5
24040   (exit "$ac_status"); }; }; then
24041   ac_cv_func_vfork_works=yes
24042 else
24043   echo "$as_me: program exited with status $ac_status" >&5
24044 echo "$as_me: failed program was:" >&5
24045 cat "conftest.$ac_ext" >&5
24046 ac_cv_func_vfork_works=no
24047 fi
24048 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24049 fi
24050 fi
24051 echo "$as_me:24051: result: $ac_cv_func_vfork_works" >&5
24052 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
24053
24054 fi;
24055 if test "x$ac_cv_func_fork_works" = xcross; then
24056   ac_cv_func_vfork_works=ac_cv_func_vfork
24057   { echo "$as_me:24057: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
24058 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
24059 fi
24060
24061 if test "x$ac_cv_func_vfork_works" = xyes; then
24062
24063 cat >>confdefs.h <<\EOF
24064 #define HAVE_WORKING_VFORK 1
24065 EOF
24066
24067 else
24068
24069 cat >>confdefs.h <<\EOF
24070 #define vfork fork
24071 EOF
24072
24073 fi
24074 if test "x$ac_cv_func_fork_works" = xyes; then
24075
24076 cat >>confdefs.h <<\EOF
24077 #define HAVE_WORKING_FORK 1
24078 EOF
24079
24080 fi
24081
24082 echo "$as_me:24082: checking if fopen accepts explicit binary mode" >&5
24083 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
24084 if test "${cf_cv_fopen_bin_r+set}" = set; then
24085   echo $ECHO_N "(cached) $ECHO_C" >&6
24086 else
24087
24088         if test "$cross_compiling" = yes; then
24089   cf_cv_fopen_bin_r=unknown
24090 else
24091   cat >"conftest.$ac_ext" <<_ACEOF
24092 #line 24092 "configure"
24093 #include "confdefs.h"
24094
24095 $ac_includes_default
24096
24097 int main(void)
24098 {
24099         FILE *fp = fopen("conftest.tmp", "wb");
24100         int rc = 0;
24101         if (fp != 0) {
24102                 int p, q;
24103                 for (p = 0; p < 256; ++p) {
24104                         fputc(p, fp);
24105                 }
24106                 fclose(fp);
24107                 fp = fopen("conftest.tmp", "rb");
24108                 if (fp != 0) {
24109                         for (p = 0; p < 256; ++p) {
24110                                 q = fgetc(fp);
24111                                 if (q != p) {
24112                                         rc = 1;
24113                                         break;
24114                                 }
24115                         }
24116                 } else {
24117                         rc = 1;
24118                 }
24119         } else {
24120                 rc = 1;
24121         }
24122         ${cf_cv_main_return:-return} (rc);
24123 }
24124
24125 _ACEOF
24126 rm -f "conftest$ac_exeext"
24127 if { (eval echo "$as_me:24127: \"$ac_link\"") >&5
24128   (eval $ac_link) 2>&5
24129   ac_status=$?
24130   echo "$as_me:24130: \$? = $ac_status" >&5
24131   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24132   { (eval echo "$as_me:24132: \"$ac_try\"") >&5
24133   (eval $ac_try) 2>&5
24134   ac_status=$?
24135   echo "$as_me:24135: \$? = $ac_status" >&5
24136   (exit "$ac_status"); }; }; then
24137   cf_cv_fopen_bin_r=yes
24138 else
24139   echo "$as_me: program exited with status $ac_status" >&5
24140 echo "$as_me: failed program was:" >&5
24141 cat "conftest.$ac_ext" >&5
24142 cf_cv_fopen_bin_r=no
24143 fi
24144 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24145 fi
24146
24147 fi
24148 echo "$as_me:24148: result: $cf_cv_fopen_bin_r" >&5
24149 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
24150 test "x$cf_cv_fopen_bin_r" != xno &&
24151 cat >>confdefs.h <<\EOF
24152 #define USE_FOPEN_BIN_R 1
24153 EOF
24154
24155 # special check for test/ditto.c
24156
24157 echo "$as_me:24157: checking for openpty in -lutil" >&5
24158 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
24159 if test "${ac_cv_lib_util_openpty+set}" = set; then
24160   echo $ECHO_N "(cached) $ECHO_C" >&6
24161 else
24162   ac_check_lib_save_LIBS=$LIBS
24163 LIBS="-lutil  $LIBS"
24164 cat >"conftest.$ac_ext" <<_ACEOF
24165 #line 24165 "configure"
24166 #include "confdefs.h"
24167
24168 /* Override any gcc2 internal prototype to avoid an error.  */
24169 #ifdef __cplusplus
24170 extern "C"
24171 #endif
24172 /* We use char because int might match the return type of a gcc2
24173    builtin and then its argument prototype would still apply.  */
24174 char openpty ();
24175 int
24176 main (void)
24177 {
24178 openpty ();
24179   ;
24180   return 0;
24181 }
24182 _ACEOF
24183 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24184 if { (eval echo "$as_me:24184: \"$ac_link\"") >&5
24185   (eval $ac_link) 2>&5
24186   ac_status=$?
24187   echo "$as_me:24187: \$? = $ac_status" >&5
24188   (exit "$ac_status"); } &&
24189          { ac_try='test -s "conftest$ac_exeext"'
24190   { (eval echo "$as_me:24190: \"$ac_try\"") >&5
24191   (eval $ac_try) 2>&5
24192   ac_status=$?
24193   echo "$as_me:24193: \$? = $ac_status" >&5
24194   (exit "$ac_status"); }; }; then
24195   ac_cv_lib_util_openpty=yes
24196 else
24197   echo "$as_me: failed program was:" >&5
24198 cat "conftest.$ac_ext" >&5
24199 ac_cv_lib_util_openpty=no
24200 fi
24201 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24202 LIBS=$ac_check_lib_save_LIBS
24203 fi
24204 echo "$as_me:24204: result: $ac_cv_lib_util_openpty" >&5
24205 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
24206 if test "$ac_cv_lib_util_openpty" = yes; then
24207   cf_cv_lib_util=yes
24208 else
24209   cf_cv_lib_util=no
24210 fi
24211
24212 echo "$as_me:24212: checking for openpty header" >&5
24213 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
24214 if test "${cf_cv_func_openpty+set}" = set; then
24215   echo $ECHO_N "(cached) $ECHO_C" >&6
24216 else
24217
24218         cf_save_LIBS="$LIBS"
24219         test "$cf_cv_lib_util" = yes && {
24220 cf_add_libs="$LIBS"
24221 # reverse order
24222 cf_add_0lib=
24223 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24224 # filter duplicates
24225 for cf_add_1lib in $cf_add_0lib; do
24226         for cf_add_2lib in $cf_add_libs; do
24227                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24228                         cf_add_1lib=
24229                         break
24230                 fi
24231         done
24232         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24233 done
24234 LIBS="$cf_add_libs"
24235  }
24236         for cf_header in pty.h libutil.h util.h
24237         do
24238         cat >"conftest.$ac_ext" <<_ACEOF
24239 #line 24239 "configure"
24240 #include "confdefs.h"
24241
24242 #include <$cf_header>
24243
24244 int
24245 main (void)
24246 {
24247
24248         int x = openpty((int *)0, (int *)0, (char *)0,
24249                                    (struct termios *)0, (struct winsize *)0);
24250
24251   ;
24252   return 0;
24253 }
24254 _ACEOF
24255 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24256 if { (eval echo "$as_me:24256: \"$ac_link\"") >&5
24257   (eval $ac_link) 2>&5
24258   ac_status=$?
24259   echo "$as_me:24259: \$? = $ac_status" >&5
24260   (exit "$ac_status"); } &&
24261          { ac_try='test -s "conftest$ac_exeext"'
24262   { (eval echo "$as_me:24262: \"$ac_try\"") >&5
24263   (eval $ac_try) 2>&5
24264   ac_status=$?
24265   echo "$as_me:24265: \$? = $ac_status" >&5
24266   (exit "$ac_status"); }; }; then
24267
24268                 cf_cv_func_openpty=$cf_header
24269                 break
24270
24271 else
24272   echo "$as_me: failed program was:" >&5
24273 cat "conftest.$ac_ext" >&5
24274
24275                 cf_cv_func_openpty=no
24276
24277 fi
24278 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24279         done
24280         LIBS="$cf_save_LIBS"
24281
24282 fi
24283 echo "$as_me:24283: result: $cf_cv_func_openpty" >&5
24284 echo "${ECHO_T}$cf_cv_func_openpty" >&6
24285
24286 if test "$cf_cv_func_openpty" != no ; then
24287
24288 cat >>confdefs.h <<EOF
24289 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
24290 EOF
24291
24292 cat >>confdefs.h <<\EOF
24293 #define USE_XTERM_PTY 1
24294 EOF
24295
24296         if test "x$cf_cv_lib_util" = xyes ; then
24297
24298 cf_add_libs="$TEST_LIBS"
24299 # reverse order
24300 cf_add_0lib=
24301 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24302 # filter duplicates
24303 for cf_add_1lib in $cf_add_0lib; do
24304         for cf_add_2lib in $cf_add_libs; do
24305                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24306                         cf_add_1lib=
24307                         break
24308                 fi
24309         done
24310         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24311 done
24312 TEST_LIBS="$cf_add_libs"
24313
24314         fi
24315 fi
24316
24317 if test "$with_hashed_db" != no ; then
24318
24319 cat >>confdefs.h <<\EOF
24320 #define USE_HASHED_DB 1
24321 EOF
24322
24323 case $with_hashed_db in
24324 (yes|*able*)
24325         ;;
24326 (*)
24327         if test -d "$with_hashed_db" ; then
24328
24329 if test -n "$with_hashed_db/include" ; then
24330   for cf_add_incdir in $with_hashed_db/include
24331   do
24332         while test "$cf_add_incdir" != /usr/include
24333         do
24334           if test -d "$cf_add_incdir"
24335           then
24336                 cf_have_incdir=no
24337                 if test -n "$CFLAGS$CPPFLAGS" ; then
24338                   # a loop is needed to ensure we can add subdirs of existing dirs
24339                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24340                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24341                           cf_have_incdir=yes; break
24342                         fi
24343                   done
24344                 fi
24345
24346                 if test "$cf_have_incdir" = no ; then
24347                   if test "$cf_add_incdir" = /usr/local/include ; then
24348                         if test "$GCC" = yes
24349                         then
24350                           cf_save_CPPFLAGS=$CPPFLAGS
24351
24352         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24353         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24354
24355                           cat >"conftest.$ac_ext" <<_ACEOF
24356 #line 24356 "configure"
24357 #include "confdefs.h"
24358 #include <stdio.h>
24359 int
24360 main (void)
24361 {
24362 printf("Hello")
24363   ;
24364   return 0;
24365 }
24366 _ACEOF
24367 rm -f "conftest.$ac_objext"
24368 if { (eval echo "$as_me:24368: \"$ac_compile\"") >&5
24369   (eval $ac_compile) 2>&5
24370   ac_status=$?
24371   echo "$as_me:24371: \$? = $ac_status" >&5
24372   (exit "$ac_status"); } &&
24373          { ac_try='test -s "conftest.$ac_objext"'
24374   { (eval echo "$as_me:24374: \"$ac_try\"") >&5
24375   (eval $ac_try) 2>&5
24376   ac_status=$?
24377   echo "$as_me:24377: \$? = $ac_status" >&5
24378   (exit "$ac_status"); }; }; then
24379   :
24380 else
24381   echo "$as_me: failed program was:" >&5
24382 cat "conftest.$ac_ext" >&5
24383 cf_have_incdir=yes
24384 fi
24385 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24386                           CPPFLAGS=$cf_save_CPPFLAGS
24387                         fi
24388                   fi
24389                 fi
24390
24391                 if test "$cf_have_incdir" = no ; then
24392                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24393
24394 echo "${as_me:-configure}:24394: testing adding $cf_add_incdir to include-path ..." 1>&5
24395
24396                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24397
24398                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24399                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24400                   cf_add_incdir="$cf_top_incdir"
24401                 else
24402                   break
24403                 fi
24404           else
24405                 break
24406           fi
24407         done
24408   done
24409 fi
24410
24411 if test -n "$with_hashed_db/lib" ; then
24412         for cf_add_libdir in $with_hashed_db/lib
24413         do
24414                 if test "$cf_add_libdir" = /usr/lib ; then
24415                         :
24416                 elif test -d "$cf_add_libdir"
24417                 then
24418                         cf_have_libdir=no
24419                         if test -n "$LDFLAGS$LIBS" ; then
24420                                 # a loop is needed to ensure we can add subdirs of existing dirs
24421                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24422                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24423                                                 cf_have_libdir=yes; break
24424                                         fi
24425                                 done
24426                         fi
24427                         if test "$cf_have_libdir" = no ; then
24428                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24429
24430 echo "${as_me:-configure}:24430: testing adding $cf_add_libdir to library-path ..." 1>&5
24431
24432                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24433                         fi
24434                 fi
24435         done
24436 fi
24437
24438         else
24439                 case "$with_hashed_db" in
24440                 (./*|../*|/*)
24441                         { echo "$as_me:24441: WARNING: no such directory $with_hashed_db" >&5
24442 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
24443                         ;;
24444                 (*)
24445
24446 cf_search=
24447
24448 test "x$prefix" != "xNONE" && \
24449 test -d "$prefix" && \
24450  {
24451         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
24452         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
24453         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
24454         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
24455         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
24456         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
24457 }
24458
24459 for cf_subdir_prefix in \
24460         /usr \
24461         /usr/local \
24462         /usr/pkg \
24463         /opt \
24464         /opt/local \
24465         $HOME
24466 do
24467
24468 test "x$cf_subdir_prefix" != "x$prefix" && \
24469 test -d "$cf_subdir_prefix" && \
24470 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24471         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
24472         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
24473         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
24474         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
24475         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
24476         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"
24477 }
24478
24479 done
24480
24481         for cf_item in $cf_search
24482         do
24483                 case "$cf_item" in
24484                 (*/$with_hashed_db)
24485
24486 if test -n "$cf_item" ; then
24487   for cf_add_incdir in $cf_item
24488   do
24489         while test "$cf_add_incdir" != /usr/include
24490         do
24491           if test -d "$cf_add_incdir"
24492           then
24493                 cf_have_incdir=no
24494                 if test -n "$CFLAGS$CPPFLAGS" ; then
24495                   # a loop is needed to ensure we can add subdirs of existing dirs
24496                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24497                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24498                           cf_have_incdir=yes; break
24499                         fi
24500                   done
24501                 fi
24502
24503                 if test "$cf_have_incdir" = no ; then
24504                   if test "$cf_add_incdir" = /usr/local/include ; then
24505                         if test "$GCC" = yes
24506                         then
24507                           cf_save_CPPFLAGS=$CPPFLAGS
24508
24509         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24510         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24511
24512                           cat >"conftest.$ac_ext" <<_ACEOF
24513 #line 24513 "configure"
24514 #include "confdefs.h"
24515 #include <stdio.h>
24516 int
24517 main (void)
24518 {
24519 printf("Hello")
24520   ;
24521   return 0;
24522 }
24523 _ACEOF
24524 rm -f "conftest.$ac_objext"
24525 if { (eval echo "$as_me:24525: \"$ac_compile\"") >&5
24526   (eval $ac_compile) 2>&5
24527   ac_status=$?
24528   echo "$as_me:24528: \$? = $ac_status" >&5
24529   (exit "$ac_status"); } &&
24530          { ac_try='test -s "conftest.$ac_objext"'
24531   { (eval echo "$as_me:24531: \"$ac_try\"") >&5
24532   (eval $ac_try) 2>&5
24533   ac_status=$?
24534   echo "$as_me:24534: \$? = $ac_status" >&5
24535   (exit "$ac_status"); }; }; then
24536   :
24537 else
24538   echo "$as_me: failed program was:" >&5
24539 cat "conftest.$ac_ext" >&5
24540 cf_have_incdir=yes
24541 fi
24542 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24543                           CPPFLAGS=$cf_save_CPPFLAGS
24544                         fi
24545                   fi
24546                 fi
24547
24548                 if test "$cf_have_incdir" = no ; then
24549                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24550
24551 echo "${as_me:-configure}:24551: testing adding $cf_add_incdir to include-path ..." 1>&5
24552
24553                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24554
24555                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24556                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24557                   cf_add_incdir="$cf_top_incdir"
24558                 else
24559                   break
24560                 fi
24561           else
24562                 break
24563           fi
24564         done
24565   done
24566 fi
24567
24568                         ;;
24569                 esac
24570         done
24571
24572 cf_search=
24573
24574 test "x$prefix" != "xNONE" && \
24575 test -d "$prefix" && \
24576  {
24577         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
24578         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
24579         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
24580         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
24581         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
24582         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
24583 }
24584
24585 for cf_subdir_prefix in \
24586         /usr \
24587         /usr/local \
24588         /usr/pkg \
24589         /opt \
24590         /opt/local \
24591         $HOME
24592 do
24593
24594 test "x$cf_subdir_prefix" != "x$prefix" && \
24595 test -d "$cf_subdir_prefix" && \
24596 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24597         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
24598         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
24599         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
24600         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
24601         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
24602         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"
24603 }
24604
24605 done
24606
24607         for cf_item in $cf_search
24608         do
24609                 case "$cf_item" in
24610                 (*/$with_hashed_db)
24611
24612 if test -n "$cf_item" ; then
24613         for cf_add_libdir in $cf_item
24614         do
24615                 if test "$cf_add_libdir" = /usr/lib ; then
24616                         :
24617                 elif test -d "$cf_add_libdir"
24618                 then
24619                         cf_have_libdir=no
24620                         if test -n "$LDFLAGS$LIBS" ; then
24621                                 # a loop is needed to ensure we can add subdirs of existing dirs
24622                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24623                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24624                                                 cf_have_libdir=yes; break
24625                                         fi
24626                                 done
24627                         fi
24628                         if test "$cf_have_libdir" = no ; then
24629                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24630
24631 echo "${as_me:-configure}:24631: testing adding $cf_add_libdir to library-path ..." 1>&5
24632
24633                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24634                         fi
24635                 fi
24636         done
24637 fi
24638
24639                         ;;
24640                 esac
24641         done
24642
24643                         ;;
24644                 esac
24645         fi
24646 esac
24647
24648 echo "$as_me:24648: checking for db.h" >&5
24649 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
24650 if test "${ac_cv_header_db_h+set}" = set; then
24651   echo $ECHO_N "(cached) $ECHO_C" >&6
24652 else
24653   cat >"conftest.$ac_ext" <<_ACEOF
24654 #line 24654 "configure"
24655 #include "confdefs.h"
24656 #include <db.h>
24657 _ACEOF
24658 if { (eval echo "$as_me:24658: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24659   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24660   ac_status=$?
24661   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24662   rm -f conftest.er1
24663   cat conftest.err >&5
24664   echo "$as_me:24664: \$? = $ac_status" >&5
24665   (exit "$ac_status"); } >/dev/null; then
24666   if test -s conftest.err; then
24667     ac_cpp_err=$ac_c_preproc_warn_flag
24668   else
24669     ac_cpp_err=
24670   fi
24671 else
24672   ac_cpp_err=yes
24673 fi
24674 if test -z "$ac_cpp_err"; then
24675   ac_cv_header_db_h=yes
24676 else
24677   echo "$as_me: failed program was:" >&5
24678   cat "conftest.$ac_ext" >&5
24679   ac_cv_header_db_h=no
24680 fi
24681 rm -f conftest.err "conftest.$ac_ext"
24682 fi
24683 echo "$as_me:24683: result: $ac_cv_header_db_h" >&5
24684 echo "${ECHO_T}$ac_cv_header_db_h" >&6
24685 if test "$ac_cv_header_db_h" = yes; then
24686
24687 echo "$as_me:24687: checking for version of db" >&5
24688 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
24689 if test "${cf_cv_hashed_db_version+set}" = set; then
24690   echo $ECHO_N "(cached) $ECHO_C" >&6
24691 else
24692
24693 cf_cv_hashed_db_version=unknown
24694
24695 for cf_db_version in 1 2 3 4 5 6
24696 do
24697
24698 echo "${as_me:-configure}:24698: testing checking for db version $cf_db_version ..." 1>&5
24699
24700         cat >"conftest.$ac_ext" <<_ACEOF
24701 #line 24701 "configure"
24702 #include "confdefs.h"
24703
24704 $ac_includes_default
24705 #include <db.h>
24706
24707 #ifdef DB_VERSION_MAJOR
24708         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
24709 #if $cf_db_version == DB_VERSION_MAJOR
24710         /* ok */
24711 #else
24712         make an error
24713 #endif
24714 #else
24715 #if $cf_db_version == 1
24716         /* ok: assuming this is DB 1.8.5 */
24717 #else
24718         make an error
24719 #endif
24720 #endif
24721
24722 int
24723 main (void)
24724 {
24725 DBT *foo = 0
24726   ;
24727   return 0;
24728 }
24729 _ACEOF
24730 rm -f "conftest.$ac_objext"
24731 if { (eval echo "$as_me:24731: \"$ac_compile\"") >&5
24732   (eval $ac_compile) 2>&5
24733   ac_status=$?
24734   echo "$as_me:24734: \$? = $ac_status" >&5
24735   (exit "$ac_status"); } &&
24736          { ac_try='test -s "conftest.$ac_objext"'
24737   { (eval echo "$as_me:24737: \"$ac_try\"") >&5
24738   (eval $ac_try) 2>&5
24739   ac_status=$?
24740   echo "$as_me:24740: \$? = $ac_status" >&5
24741   (exit "$ac_status"); }; }; then
24742
24743         cf_cv_hashed_db_version=$cf_db_version
24744         break
24745
24746 else
24747   echo "$as_me: failed program was:" >&5
24748 cat "conftest.$ac_ext" >&5
24749 fi
24750 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24751 done
24752
24753 fi
24754 echo "$as_me:24754: result: $cf_cv_hashed_db_version" >&5
24755 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
24756
24757 if test "$cf_cv_hashed_db_version" = unknown ; then
24758         { { echo "$as_me:24758: error: Cannot determine version of db" >&5
24759 echo "$as_me: error: Cannot determine version of db" >&2;}
24760    { (exit 1); exit 1; }; }
24761 else
24762
24763 echo "$as_me:24763: checking for db libraries" >&5
24764 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
24765 if test "${cf_cv_hashed_db_libs+set}" = set; then
24766   echo $ECHO_N "(cached) $ECHO_C" >&6
24767 else
24768
24769 cf_cv_hashed_db_libs=unknown
24770 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
24771 do
24772         cf_save_libs="$LIBS"
24773         if test -n "$cf_db_libs"; then
24774
24775 cf_add_libs="$LIBS"
24776 # reverse order
24777 cf_add_0lib=
24778 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24779 # filter duplicates
24780 for cf_add_1lib in $cf_add_0lib; do
24781         for cf_add_2lib in $cf_add_libs; do
24782                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24783                         cf_add_1lib=
24784                         break
24785                 fi
24786         done
24787         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24788 done
24789 LIBS="$cf_add_libs"
24790
24791         fi
24792
24793 echo "${as_me:-configure}:24793: testing checking for library $cf_db_libs ..." 1>&5
24794
24795         cat >"conftest.$ac_ext" <<_ACEOF
24796 #line 24796 "configure"
24797 #include "confdefs.h"
24798
24799 $ac_includes_default
24800 #include <db.h>
24801
24802 int
24803 main (void)
24804 {
24805
24806         char *path = "/tmp/foo";
24807 #ifdef DB_VERSION_MAJOR
24808 #if DB_VERSION_MAJOR >= 4
24809         DB *result = 0;
24810         db_create(&result, NULL, 0);
24811         result->open(result,
24812                 NULL,
24813                 path,
24814                 path,
24815                 DB_HASH,
24816                 DB_CREATE,
24817                 0644);
24818 #elif DB_VERSION_MAJOR >= 3
24819         DB *result = 0;
24820         db_create(&result, NULL, 0);
24821         result->open(result,
24822                 path,
24823                 path,
24824                 DB_HASH,
24825                 DB_CREATE,
24826                 0644);
24827 #elif DB_VERSION_MAJOR >= 2
24828         DB *result = 0;
24829         db_open(path,
24830                 DB_HASH,
24831                 DB_CREATE,
24832                 0644,
24833                 (DB_ENV *) 0,
24834                 (DB_INFO *) 0,
24835                 &result);
24836 #endif /* DB_VERSION_MAJOR */
24837 #else
24838         DB *result = dbopen(path,
24839                      2,
24840                      0644,
24841                      DB_HASH,
24842                      0);
24843 #endif
24844         ${cf_cv_main_return:-return}(result != 0)
24845
24846   ;
24847   return 0;
24848 }
24849 _ACEOF
24850 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24851 if { (eval echo "$as_me:24851: \"$ac_link\"") >&5
24852   (eval $ac_link) 2>&5
24853   ac_status=$?
24854   echo "$as_me:24854: \$? = $ac_status" >&5
24855   (exit "$ac_status"); } &&
24856          { ac_try='test -s "conftest$ac_exeext"'
24857   { (eval echo "$as_me:24857: \"$ac_try\"") >&5
24858   (eval $ac_try) 2>&5
24859   ac_status=$?
24860   echo "$as_me:24860: \$? = $ac_status" >&5
24861   (exit "$ac_status"); }; }; then
24862
24863         if test -n "$cf_db_libs" ; then
24864                 cf_cv_hashed_db_libs=$cf_db_libs
24865         else
24866                 cf_cv_hashed_db_libs=default
24867         fi
24868         LIBS="$cf_save_libs"
24869         break
24870
24871 else
24872   echo "$as_me: failed program was:" >&5
24873 cat "conftest.$ac_ext" >&5
24874 fi
24875 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24876         LIBS="$cf_save_libs"
24877 done
24878
24879 fi
24880 echo "$as_me:24880: result: $cf_cv_hashed_db_libs" >&5
24881 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
24882
24883         if test "$cf_cv_hashed_db_libs" = unknown ; then
24884                 { { echo "$as_me:24884: error: Cannot determine library for db" >&5
24885 echo "$as_me: error: Cannot determine library for db" >&2;}
24886    { (exit 1); exit 1; }; }
24887         elif test "$cf_cv_hashed_db_libs" != default ; then
24888
24889 cf_add_libs="$LIBS"
24890 # reverse order
24891 cf_add_0lib=
24892 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24893 # filter duplicates
24894 for cf_add_1lib in $cf_add_0lib; do
24895         for cf_add_2lib in $cf_add_libs; do
24896                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24897                         cf_add_1lib=
24898                         break
24899                 fi
24900         done
24901         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24902 done
24903 LIBS="$cf_add_libs"
24904
24905         fi
24906 fi
24907
24908 else
24909
24910         { { echo "$as_me:24910: error: Cannot find db.h" >&5
24911 echo "$as_me: error: Cannot find db.h" >&2;}
24912    { (exit 1); exit 1; }; }
24913
24914 fi
24915
24916 fi
24917
24918 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
24919         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24920         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24921 fi
24922
24923 # Just in case, check if the C compiler has a bool type.
24924
24925 echo "$as_me:24925: checking if we should include stdbool.h" >&5
24926 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24927
24928 if test "${cf_cv_header_stdbool_h+set}" = set; then
24929   echo $ECHO_N "(cached) $ECHO_C" >&6
24930 else
24931
24932         cat >"conftest.$ac_ext" <<_ACEOF
24933 #line 24933 "configure"
24934 #include "confdefs.h"
24935
24936 int
24937 main (void)
24938 {
24939 bool foo = false
24940   ;
24941   return 0;
24942 }
24943 _ACEOF
24944 rm -f "conftest.$ac_objext"
24945 if { (eval echo "$as_me:24945: \"$ac_compile\"") >&5
24946   (eval $ac_compile) 2>&5
24947   ac_status=$?
24948   echo "$as_me:24948: \$? = $ac_status" >&5
24949   (exit "$ac_status"); } &&
24950          { ac_try='test -s "conftest.$ac_objext"'
24951   { (eval echo "$as_me:24951: \"$ac_try\"") >&5
24952   (eval $ac_try) 2>&5
24953   ac_status=$?
24954   echo "$as_me:24954: \$? = $ac_status" >&5
24955   (exit "$ac_status"); }; }; then
24956   cf_cv_header_stdbool_h=0
24957 else
24958   echo "$as_me: failed program was:" >&5
24959 cat "conftest.$ac_ext" >&5
24960 cat >"conftest.$ac_ext" <<_ACEOF
24961 #line 24961 "configure"
24962 #include "confdefs.h"
24963
24964 #ifndef __BEOS__
24965 #include <stdbool.h>
24966 #endif
24967
24968 int
24969 main (void)
24970 {
24971 bool foo = false
24972   ;
24973   return 0;
24974 }
24975 _ACEOF
24976 rm -f "conftest.$ac_objext"
24977 if { (eval echo "$as_me:24977: \"$ac_compile\"") >&5
24978   (eval $ac_compile) 2>&5
24979   ac_status=$?
24980   echo "$as_me:24980: \$? = $ac_status" >&5
24981   (exit "$ac_status"); } &&
24982          { ac_try='test -s "conftest.$ac_objext"'
24983   { (eval echo "$as_me:24983: \"$ac_try\"") >&5
24984   (eval $ac_try) 2>&5
24985   ac_status=$?
24986   echo "$as_me:24986: \$? = $ac_status" >&5
24987   (exit "$ac_status"); }; }; then
24988   cf_cv_header_stdbool_h=1
24989 else
24990   echo "$as_me: failed program was:" >&5
24991 cat "conftest.$ac_ext" >&5
24992 cf_cv_header_stdbool_h=0
24993 fi
24994 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24995 fi
24996 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24997 fi
24998
24999 if test "$cf_cv_header_stdbool_h" = 1
25000 then    echo "$as_me:25000: result: yes" >&5
25001 echo "${ECHO_T}yes" >&6
25002 else    echo "$as_me:25002: result: no" >&5
25003 echo "${ECHO_T}no" >&6
25004 fi
25005
25006 echo "$as_me:25006: checking for builtin bool type" >&5
25007 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25008
25009 if test "${cf_cv_cc_bool_type+set}" = set; then
25010   echo $ECHO_N "(cached) $ECHO_C" >&6
25011 else
25012
25013         cat >"conftest.$ac_ext" <<_ACEOF
25014 #line 25014 "configure"
25015 #include "confdefs.h"
25016
25017 #include <stdio.h>
25018 #include <sys/types.h>
25019
25020 int
25021 main (void)
25022 {
25023 bool x = false
25024   ;
25025   return 0;
25026 }
25027 _ACEOF
25028 rm -f "conftest.$ac_objext"
25029 if { (eval echo "$as_me:25029: \"$ac_compile\"") >&5
25030   (eval $ac_compile) 2>&5
25031   ac_status=$?
25032   echo "$as_me:25032: \$? = $ac_status" >&5
25033   (exit "$ac_status"); } &&
25034          { ac_try='test -s "conftest.$ac_objext"'
25035   { (eval echo "$as_me:25035: \"$ac_try\"") >&5
25036   (eval $ac_try) 2>&5
25037   ac_status=$?
25038   echo "$as_me:25038: \$? = $ac_status" >&5
25039   (exit "$ac_status"); }; }; then
25040   cf_cv_cc_bool_type=1
25041 else
25042   echo "$as_me: failed program was:" >&5
25043 cat "conftest.$ac_ext" >&5
25044 cf_cv_cc_bool_type=0
25045 fi
25046 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25047
25048 fi
25049
25050 if test "$cf_cv_cc_bool_type" = 1
25051 then    echo "$as_me:25051: result: yes" >&5
25052 echo "${ECHO_T}yes" >&6
25053 else    echo "$as_me:25053: result: no" >&5
25054 echo "${ECHO_T}no" >&6
25055 fi
25056
25057 # Check for C++ compiler characteristics (and ensure that it's there!)
25058 if test -n "$CXX" ; then
25059         ac_ext=cc
25060 ac_cpp='$CXXCPP $CPPFLAGS'
25061 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25062 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25063 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25064 ac_main_return="return"
25065
25066 if test -n "$GXX" ; then
25067
25068         cf_save="$LIBS"
25069         LIBS="$LIBS $CXXLIBS"
25070         echo "$as_me:25070: checking if we already have C++ library" >&5
25071 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
25072         cat >"conftest.$ac_ext" <<_ACEOF
25073 #line 25073 "configure"
25074 #include "confdefs.h"
25075
25076                         #include <iostream>
25077 int
25078 main (void)
25079 {
25080
25081                         std::cout << "Hello World!" << std::endl;
25082   ;
25083   return 0;
25084 }
25085 _ACEOF
25086 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25087 if { (eval echo "$as_me:25087: \"$ac_link\"") >&5
25088   (eval $ac_link) 2>&5
25089   ac_status=$?
25090   echo "$as_me:25090: \$? = $ac_status" >&5
25091   (exit "$ac_status"); } &&
25092          { ac_try='test -s "conftest$ac_exeext"'
25093   { (eval echo "$as_me:25093: \"$ac_try\"") >&5
25094   (eval $ac_try) 2>&5
25095   ac_status=$?
25096   echo "$as_me:25096: \$? = $ac_status" >&5
25097   (exit "$ac_status"); }; }; then
25098   cf_have_libstdcpp=yes
25099 else
25100   echo "$as_me: failed program was:" >&5
25101 cat "conftest.$ac_ext" >&5
25102 cf_have_libstdcpp=no
25103 fi
25104 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25105         echo "$as_me:25105: result: $cf_have_libstdcpp" >&5
25106 echo "${ECHO_T}$cf_have_libstdcpp" >&6
25107         LIBS="$cf_save"
25108
25109         if test "$cf_have_libstdcpp" != yes
25110         then
25111                 case "$cf_cv_system_name" in
25112                 (os2*)
25113                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
25114                                 cf_stdcpp_libname=stdcpp
25115                         else
25116                                 cf_stdcpp_libname=stdc++
25117                         fi
25118                         ;;
25119                 (*)
25120                         cf_stdcpp_libname=stdc++
25121                         ;;
25122                 esac
25123
25124                 echo "$as_me:25124: checking for library $cf_stdcpp_libname" >&5
25125 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
25126 if test "${cf_cv_libstdcpp+set}" = set; then
25127   echo $ECHO_N "(cached) $ECHO_C" >&6
25128 else
25129
25130                         cf_save="$LIBS"
25131                         LIBS="$LIBS $CXXLIBS"
25132
25133 cf_add_libs="$LIBS"
25134 # reverse order
25135 cf_add_0lib=
25136 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25137 # filter duplicates
25138 for cf_add_1lib in $cf_add_0lib; do
25139         for cf_add_2lib in $cf_add_libs; do
25140                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25141                         cf_add_1lib=
25142                         break
25143                 fi
25144         done
25145         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25146 done
25147 LIBS="$cf_add_libs"
25148
25149                 cat >"conftest.$ac_ext" <<_ACEOF
25150 #line 25150 "configure"
25151 #include "confdefs.h"
25152
25153                                 #include <iostream>
25154 int
25155 main (void)
25156 {
25157
25158                                 std::cout << "Hello World!" << std::endl;
25159   ;
25160   return 0;
25161 }
25162 _ACEOF
25163 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25164 if { (eval echo "$as_me:25164: \"$ac_link\"") >&5
25165   (eval $ac_link) 2>&5
25166   ac_status=$?
25167   echo "$as_me:25167: \$? = $ac_status" >&5
25168   (exit "$ac_status"); } &&
25169          { ac_try='test -s "conftest$ac_exeext"'
25170   { (eval echo "$as_me:25170: \"$ac_try\"") >&5
25171   (eval $ac_try) 2>&5
25172   ac_status=$?
25173   echo "$as_me:25173: \$? = $ac_status" >&5
25174   (exit "$ac_status"); }; }; then
25175   cf_cv_libstdcpp=yes
25176 else
25177   echo "$as_me: failed program was:" >&5
25178 cat "conftest.$ac_ext" >&5
25179 cf_cv_libstdcpp=no
25180 fi
25181 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25182                         LIBS="$cf_save"
25183
25184 fi
25185 echo "$as_me:25185: result: $cf_cv_libstdcpp" >&5
25186 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
25187                 test "$cf_cv_libstdcpp" = yes && {
25188 cf_add_libs="$CXXLIBS"
25189 # reverse order
25190 cf_add_0lib=
25191 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25192 # filter duplicates
25193 for cf_add_1lib in $cf_add_0lib; do
25194         for cf_add_2lib in $cf_add_libs; do
25195                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25196                         cf_add_1lib=
25197                         break
25198                 fi
25199         done
25200         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25201 done
25202 CXXLIBS="$cf_add_libs"
25203  }
25204         fi
25205 fi
25206
25207         echo "$as_me:25207: checking whether $CXX understands -c and -o together" >&5
25208 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
25209 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
25210   echo $ECHO_N "(cached) $ECHO_C" >&6
25211 else
25212
25213 cat > conftest.$ac_ext <<CF_EOF
25214 int main(void)
25215 {
25216         ${cf_cv_main_return:-return}(0);
25217 }
25218 CF_EOF
25219 # We do the test twice because some compilers refuse to overwrite an
25220 # existing .o file with -o, though they will create one.
25221 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
25222 if { (eval echo "$as_me:25222: \"$ac_try\"") >&5
25223   (eval $ac_try) 2>&5
25224   ac_status=$?
25225   echo "$as_me:25225: \$? = $ac_status" >&5
25226   (exit "$ac_status"); } &&
25227   test -f conftest2.$ac_objext && { (eval echo "$as_me:25227: \"$ac_try\"") >&5
25228   (eval $ac_try) 2>&5
25229   ac_status=$?
25230   echo "$as_me:25230: \$? = $ac_status" >&5
25231   (exit "$ac_status"); };
25232 then
25233   eval cf_cv_prog_CXX_c_o=yes
25234 else
25235   eval cf_cv_prog_CXX_c_o=no
25236 fi
25237 rm -rf ./conftest*
25238
25239 fi
25240 if test "$cf_cv_prog_CXX_c_o" = yes; then
25241   echo "$as_me:25241: result: yes" >&5
25242 echo "${ECHO_T}yes" >&6
25243 else
25244   echo "$as_me:25244: result: no" >&5
25245 echo "${ECHO_T}no" >&6
25246 fi
25247
25248         case "$GXX_VERSION" in
25249         (1.*|2.[0-6]*|[1-9][0-9].*)
25250                 cf_cxx_library=yes
25251                 ;;
25252         (*-2.7*|2.7*)
25253
25254 cf_cxx_library=unknown
25255 case "$cf_cv_system_name" in
25256 (os2*)
25257         cf_gpp_libname=gpp
25258         ;;
25259 (*)
25260         cf_gpp_libname=g++
25261         ;;
25262 esac
25263 if test "$GXX" = yes; then
25264         echo "$as_me:25264: checking for lib$cf_gpp_libname" >&5
25265 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
25266         cf_save="$LIBS"
25267
25268 cf_add_libs="$LIBS"
25269 # reverse order
25270 cf_add_0lib=
25271 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25272 # filter duplicates
25273 for cf_add_1lib in $cf_add_0lib; do
25274         for cf_add_2lib in $cf_add_libs; do
25275                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25276                         cf_add_1lib=
25277                         break
25278                 fi
25279         done
25280         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25281 done
25282 LIBS="$cf_add_libs"
25283
25284         cat >"conftest.$ac_ext" <<_ACEOF
25285 #line 25285 "configure"
25286 #include "confdefs.h"
25287
25288 #include <$cf_gpp_libname/builtin.h>
25289
25290 int
25291 main (void)
25292 {
25293 two_arg_error_handler_t foo2 = lib_error_handler
25294   ;
25295   return 0;
25296 }
25297 _ACEOF
25298 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25299 if { (eval echo "$as_me:25299: \"$ac_link\"") >&5
25300   (eval $ac_link) 2>&5
25301   ac_status=$?
25302   echo "$as_me:25302: \$? = $ac_status" >&5
25303   (exit "$ac_status"); } &&
25304          { ac_try='test -s "conftest$ac_exeext"'
25305   { (eval echo "$as_me:25305: \"$ac_try\"") >&5
25306   (eval $ac_try) 2>&5
25307   ac_status=$?
25308   echo "$as_me:25308: \$? = $ac_status" >&5
25309   (exit "$ac_status"); }; }; then
25310   cf_cxx_library=yes
25311
25312 cf_add_libs="$CXXLIBS"
25313 # reverse order
25314 cf_add_0lib=
25315 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25316 # filter duplicates
25317 for cf_add_1lib in $cf_add_0lib; do
25318         for cf_add_2lib in $cf_add_libs; do
25319                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25320                         cf_add_1lib=
25321                         break
25322                 fi
25323         done
25324         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25325 done
25326 CXXLIBS="$cf_add_libs"
25327
25328          if test "$cf_gpp_libname" = cpp ; then
25329
25330 cat >>confdefs.h <<\EOF
25331 #define HAVE_GPP_BUILTIN_H 1
25332 EOF
25333
25334          else
25335
25336 cat >>confdefs.h <<\EOF
25337 #define HAVE_GXX_BUILTIN_H 1
25338 EOF
25339
25340          fi
25341 else
25342   echo "$as_me: failed program was:" >&5
25343 cat "conftest.$ac_ext" >&5
25344 cat >"conftest.$ac_ext" <<_ACEOF
25345 #line 25345 "configure"
25346 #include "confdefs.h"
25347
25348 #include <builtin.h>
25349
25350 int
25351 main (void)
25352 {
25353 two_arg_error_handler_t foo2 = lib_error_handler
25354   ;
25355   return 0;
25356 }
25357 _ACEOF
25358 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25359 if { (eval echo "$as_me:25359: \"$ac_link\"") >&5
25360   (eval $ac_link) 2>&5
25361   ac_status=$?
25362   echo "$as_me:25362: \$? = $ac_status" >&5
25363   (exit "$ac_status"); } &&
25364          { ac_try='test -s "conftest$ac_exeext"'
25365   { (eval echo "$as_me:25365: \"$ac_try\"") >&5
25366   (eval $ac_try) 2>&5
25367   ac_status=$?
25368   echo "$as_me:25368: \$? = $ac_status" >&5
25369   (exit "$ac_status"); }; }; then
25370   cf_cxx_library=yes
25371
25372 cf_add_libs="$CXXLIBS"
25373 # reverse order
25374 cf_add_0lib=
25375 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25376 # filter duplicates
25377 for cf_add_1lib in $cf_add_0lib; do
25378         for cf_add_2lib in $cf_add_libs; do
25379                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25380                         cf_add_1lib=
25381                         break
25382                 fi
25383         done
25384         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25385 done
25386 CXXLIBS="$cf_add_libs"
25387
25388 cat >>confdefs.h <<\EOF
25389 #define HAVE_BUILTIN_H 1
25390 EOF
25391
25392 else
25393   echo "$as_me: failed program was:" >&5
25394 cat "conftest.$ac_ext" >&5
25395 cf_cxx_library=no
25396 fi
25397 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25398 fi
25399 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25400         LIBS="$cf_save"
25401         echo "$as_me:25401: result: $cf_cxx_library" >&5
25402 echo "${ECHO_T}$cf_cxx_library" >&6
25403 fi
25404
25405                 ;;
25406         (*)
25407                 cf_cxx_library=no
25408                 ;;
25409         esac
25410
25411         ac_ext=cc
25412 ac_cpp='$CXXCPP $CPPFLAGS'
25413 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25414 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25415 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25416 ac_main_return="return"
25417 echo "$as_me:25417: checking how to run the C++ preprocessor" >&5
25418 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
25419 if test -z "$CXXCPP"; then
25420   if test "${ac_cv_prog_CXXCPP+set}" = set; then
25421   echo $ECHO_N "(cached) $ECHO_C" >&6
25422 else
25423       # Double quotes because CXXCPP needs to be expanded
25424     for CXXCPP in "$CXX -E" "/lib/cpp"
25425     do
25426       ac_preproc_ok=false
25427 for ac_cxx_preproc_warn_flag in '' yes
25428 do
25429   # Use a header file that comes with gcc, so configuring glibc
25430   # with a fresh cross-compiler works.
25431   # On the NeXT, cc -E runs the code through the compiler's parser,
25432   # not just through cpp. "Syntax error" is here to catch this case.
25433   cat >"conftest.$ac_ext" <<_ACEOF
25434 #line 25434 "configure"
25435 #include "confdefs.h"
25436 #include <assert.h>
25437                      Syntax error
25438 _ACEOF
25439 if { (eval echo "$as_me:25439: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25440   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25441   ac_status=$?
25442   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25443   rm -f conftest.er1
25444   cat conftest.err >&5
25445   echo "$as_me:25445: \$? = $ac_status" >&5
25446   (exit "$ac_status"); } >/dev/null; then
25447   if test -s conftest.err; then
25448     ac_cpp_err=$ac_cxx_preproc_warn_flag
25449   else
25450     ac_cpp_err=
25451   fi
25452 else
25453   ac_cpp_err=yes
25454 fi
25455 if test -z "$ac_cpp_err"; then
25456   :
25457 else
25458   echo "$as_me: failed program was:" >&5
25459   cat "conftest.$ac_ext" >&5
25460   # Broken: fails on valid input.
25461 continue
25462 fi
25463 rm -f conftest.err "conftest.$ac_ext"
25464
25465   # OK, works on sane cases.  Now check whether non-existent headers
25466   # can be detected and how.
25467   cat >"conftest.$ac_ext" <<_ACEOF
25468 #line 25468 "configure"
25469 #include "confdefs.h"
25470 #include <ac_nonexistent.h>
25471 _ACEOF
25472 if { (eval echo "$as_me:25472: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25473   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25474   ac_status=$?
25475   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25476   rm -f conftest.er1
25477   cat conftest.err >&5
25478   echo "$as_me:25478: \$? = $ac_status" >&5
25479   (exit "$ac_status"); } >/dev/null; then
25480   if test -s conftest.err; then
25481     ac_cpp_err=$ac_cxx_preproc_warn_flag
25482   else
25483     ac_cpp_err=
25484   fi
25485 else
25486   ac_cpp_err=yes
25487 fi
25488 if test -z "$ac_cpp_err"; then
25489   # Broken: success on invalid input.
25490 continue
25491 else
25492   echo "$as_me: failed program was:" >&5
25493   cat "conftest.$ac_ext" >&5
25494   # Passes both tests.
25495 ac_preproc_ok=:
25496 break
25497 fi
25498 rm -f conftest.err "conftest.$ac_ext"
25499
25500 done
25501 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25502 rm -f conftest.err "conftest.$ac_ext"
25503 if $ac_preproc_ok; then
25504   break
25505 fi
25506
25507     done
25508     ac_cv_prog_CXXCPP=$CXXCPP
25509
25510 fi
25511   CXXCPP=$ac_cv_prog_CXXCPP
25512 else
25513   ac_cv_prog_CXXCPP=$CXXCPP
25514 fi
25515 echo "$as_me:25515: result: $CXXCPP" >&5
25516 echo "${ECHO_T}$CXXCPP" >&6
25517 ac_preproc_ok=false
25518 for ac_cxx_preproc_warn_flag in '' yes
25519 do
25520   # Use a header file that comes with gcc, so configuring glibc
25521   # with a fresh cross-compiler works.
25522   # On the NeXT, cc -E runs the code through the compiler's parser,
25523   # not just through cpp. "Syntax error" is here to catch this case.
25524   cat >"conftest.$ac_ext" <<_ACEOF
25525 #line 25525 "configure"
25526 #include "confdefs.h"
25527 #include <assert.h>
25528                      Syntax error
25529 _ACEOF
25530 if { (eval echo "$as_me:25530: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25531   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25532   ac_status=$?
25533   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25534   rm -f conftest.er1
25535   cat conftest.err >&5
25536   echo "$as_me:25536: \$? = $ac_status" >&5
25537   (exit "$ac_status"); } >/dev/null; then
25538   if test -s conftest.err; then
25539     ac_cpp_err=$ac_cxx_preproc_warn_flag
25540   else
25541     ac_cpp_err=
25542   fi
25543 else
25544   ac_cpp_err=yes
25545 fi
25546 if test -z "$ac_cpp_err"; then
25547   :
25548 else
25549   echo "$as_me: failed program was:" >&5
25550   cat "conftest.$ac_ext" >&5
25551   # Broken: fails on valid input.
25552 continue
25553 fi
25554 rm -f conftest.err "conftest.$ac_ext"
25555
25556   # OK, works on sane cases.  Now check whether non-existent headers
25557   # can be detected and how.
25558   cat >"conftest.$ac_ext" <<_ACEOF
25559 #line 25559 "configure"
25560 #include "confdefs.h"
25561 #include <ac_nonexistent.h>
25562 _ACEOF
25563 if { (eval echo "$as_me:25563: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25564   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25565   ac_status=$?
25566   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25567   rm -f conftest.er1
25568   cat conftest.err >&5
25569   echo "$as_me:25569: \$? = $ac_status" >&5
25570   (exit "$ac_status"); } >/dev/null; then
25571   if test -s conftest.err; then
25572     ac_cpp_err=$ac_cxx_preproc_warn_flag
25573   else
25574     ac_cpp_err=
25575   fi
25576 else
25577   ac_cpp_err=yes
25578 fi
25579 if test -z "$ac_cpp_err"; then
25580   # Broken: success on invalid input.
25581 continue
25582 else
25583   echo "$as_me: failed program was:" >&5
25584   cat "conftest.$ac_ext" >&5
25585   # Passes both tests.
25586 ac_preproc_ok=:
25587 break
25588 fi
25589 rm -f conftest.err "conftest.$ac_ext"
25590
25591 done
25592 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25593 rm -f conftest.err "conftest.$ac_ext"
25594 if $ac_preproc_ok; then
25595   :
25596 else
25597   { { echo "$as_me:25597: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
25598 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
25599    { (exit 1); exit 1; }; }
25600 fi
25601
25602 ac_ext=cc
25603 ac_cpp='$CXXCPP $CPPFLAGS'
25604 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25605 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25606 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25607 ac_main_return="return"
25608
25609 for ac_header in typeinfo
25610 do
25611 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25612 echo "$as_me:25612: checking for $ac_header" >&5
25613 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25614 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25615   echo $ECHO_N "(cached) $ECHO_C" >&6
25616 else
25617   cat >"conftest.$ac_ext" <<_ACEOF
25618 #line 25618 "configure"
25619 #include "confdefs.h"
25620 #include <$ac_header>
25621 _ACEOF
25622 if { (eval echo "$as_me:25622: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25623   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25624   ac_status=$?
25625   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25626   rm -f conftest.er1
25627   cat conftest.err >&5
25628   echo "$as_me:25628: \$? = $ac_status" >&5
25629   (exit "$ac_status"); } >/dev/null; then
25630   if test -s conftest.err; then
25631     ac_cpp_err=$ac_cxx_preproc_warn_flag
25632   else
25633     ac_cpp_err=
25634   fi
25635 else
25636   ac_cpp_err=yes
25637 fi
25638 if test -z "$ac_cpp_err"; then
25639   eval "$as_ac_Header=yes"
25640 else
25641   echo "$as_me: failed program was:" >&5
25642   cat "conftest.$ac_ext" >&5
25643   eval "$as_ac_Header=no"
25644 fi
25645 rm -f conftest.err "conftest.$ac_ext"
25646 fi
25647 echo "$as_me:25647: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25648 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25649 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25650   cat >>confdefs.h <<EOF
25651 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25652 EOF
25653
25654 fi
25655 done
25656
25657 for ac_header in iostream
25658 do
25659 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25660 echo "$as_me:25660: checking for $ac_header" >&5
25661 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25662 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25663   echo $ECHO_N "(cached) $ECHO_C" >&6
25664 else
25665   cat >"conftest.$ac_ext" <<_ACEOF
25666 #line 25666 "configure"
25667 #include "confdefs.h"
25668 #include <$ac_header>
25669 _ACEOF
25670 if { (eval echo "$as_me:25670: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25671   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25672   ac_status=$?
25673   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25674   rm -f conftest.er1
25675   cat conftest.err >&5
25676   echo "$as_me:25676: \$? = $ac_status" >&5
25677   (exit "$ac_status"); } >/dev/null; then
25678   if test -s conftest.err; then
25679     ac_cpp_err=$ac_cxx_preproc_warn_flag
25680   else
25681     ac_cpp_err=
25682   fi
25683 else
25684   ac_cpp_err=yes
25685 fi
25686 if test -z "$ac_cpp_err"; then
25687   eval "$as_ac_Header=yes"
25688 else
25689   echo "$as_me: failed program was:" >&5
25690   cat "conftest.$ac_ext" >&5
25691   eval "$as_ac_Header=no"
25692 fi
25693 rm -f conftest.err "conftest.$ac_ext"
25694 fi
25695 echo "$as_me:25695: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25696 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25697 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25698   cat >>confdefs.h <<EOF
25699 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25700 EOF
25701
25702 fi
25703 done
25704
25705 if test x"$ac_cv_header_iostream" = xyes ; then
25706         echo "$as_me:25706: checking if iostream uses std-namespace" >&5
25707 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
25708         cat >"conftest.$ac_ext" <<_ACEOF
25709 #line 25709 "configure"
25710 #include "confdefs.h"
25711
25712 #include <iostream>
25713 using std::endl;
25714 using std::cerr;
25715 int
25716 main (void)
25717 {
25718
25719 cerr << "testing" << endl;
25720
25721   ;
25722   return 0;
25723 }
25724 _ACEOF
25725 rm -f "conftest.$ac_objext"
25726 if { (eval echo "$as_me:25726: \"$ac_compile\"") >&5
25727   (eval $ac_compile) 2>&5
25728   ac_status=$?
25729   echo "$as_me:25729: \$? = $ac_status" >&5
25730   (exit "$ac_status"); } &&
25731          { ac_try='test -s "conftest.$ac_objext"'
25732   { (eval echo "$as_me:25732: \"$ac_try\"") >&5
25733   (eval $ac_try) 2>&5
25734   ac_status=$?
25735   echo "$as_me:25735: \$? = $ac_status" >&5
25736   (exit "$ac_status"); }; }; then
25737   cf_iostream_namespace=yes
25738 else
25739   echo "$as_me: failed program was:" >&5
25740 cat "conftest.$ac_ext" >&5
25741 cf_iostream_namespace=no
25742 fi
25743 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25744         echo "$as_me:25744: result: $cf_iostream_namespace" >&5
25745 echo "${ECHO_T}$cf_iostream_namespace" >&6
25746         if test "$cf_iostream_namespace" = yes ; then
25747
25748 cat >>confdefs.h <<\EOF
25749 #define IOSTREAM_NAMESPACE 1
25750 EOF
25751
25752         fi
25753 fi
25754
25755 echo "$as_me:25755: checking if we should include stdbool.h" >&5
25756 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25757
25758 if test "${cf_cv_header_stdbool_h+set}" = set; then
25759   echo $ECHO_N "(cached) $ECHO_C" >&6
25760 else
25761
25762         cat >"conftest.$ac_ext" <<_ACEOF
25763 #line 25763 "configure"
25764 #include "confdefs.h"
25765
25766 int
25767 main (void)
25768 {
25769 bool foo = false
25770   ;
25771   return 0;
25772 }
25773 _ACEOF
25774 rm -f "conftest.$ac_objext"
25775 if { (eval echo "$as_me:25775: \"$ac_compile\"") >&5
25776   (eval $ac_compile) 2>&5
25777   ac_status=$?
25778   echo "$as_me:25778: \$? = $ac_status" >&5
25779   (exit "$ac_status"); } &&
25780          { ac_try='test -s "conftest.$ac_objext"'
25781   { (eval echo "$as_me:25781: \"$ac_try\"") >&5
25782   (eval $ac_try) 2>&5
25783   ac_status=$?
25784   echo "$as_me:25784: \$? = $ac_status" >&5
25785   (exit "$ac_status"); }; }; then
25786   cf_cv_header_stdbool_h=0
25787 else
25788   echo "$as_me: failed program was:" >&5
25789 cat "conftest.$ac_ext" >&5
25790 cat >"conftest.$ac_ext" <<_ACEOF
25791 #line 25791 "configure"
25792 #include "confdefs.h"
25793
25794 #ifndef __BEOS__
25795 #include <stdbool.h>
25796 #endif
25797
25798 int
25799 main (void)
25800 {
25801 bool foo = false
25802   ;
25803   return 0;
25804 }
25805 _ACEOF
25806 rm -f "conftest.$ac_objext"
25807 if { (eval echo "$as_me:25807: \"$ac_compile\"") >&5
25808   (eval $ac_compile) 2>&5
25809   ac_status=$?
25810   echo "$as_me:25810: \$? = $ac_status" >&5
25811   (exit "$ac_status"); } &&
25812          { ac_try='test -s "conftest.$ac_objext"'
25813   { (eval echo "$as_me:25813: \"$ac_try\"") >&5
25814   (eval $ac_try) 2>&5
25815   ac_status=$?
25816   echo "$as_me:25816: \$? = $ac_status" >&5
25817   (exit "$ac_status"); }; }; then
25818   cf_cv_header_stdbool_h=1
25819 else
25820   echo "$as_me: failed program was:" >&5
25821 cat "conftest.$ac_ext" >&5
25822 cf_cv_header_stdbool_h=0
25823 fi
25824 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25825 fi
25826 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25827 fi
25828
25829 if test "$cf_cv_header_stdbool_h" = 1
25830 then    echo "$as_me:25830: result: yes" >&5
25831 echo "${ECHO_T}yes" >&6
25832 else    echo "$as_me:25832: result: no" >&5
25833 echo "${ECHO_T}no" >&6
25834 fi
25835
25836 echo "$as_me:25836: checking for builtin bool type" >&5
25837 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25838
25839 if test "${cf_cv_builtin_bool+set}" = set; then
25840   echo $ECHO_N "(cached) $ECHO_C" >&6
25841 else
25842
25843         cat >"conftest.$ac_ext" <<_ACEOF
25844 #line 25844 "configure"
25845 #include "confdefs.h"
25846
25847 #include <stdio.h>
25848 #include <sys/types.h>
25849
25850 int
25851 main (void)
25852 {
25853 bool x = false
25854   ;
25855   return 0;
25856 }
25857 _ACEOF
25858 rm -f "conftest.$ac_objext"
25859 if { (eval echo "$as_me:25859: \"$ac_compile\"") >&5
25860   (eval $ac_compile) 2>&5
25861   ac_status=$?
25862   echo "$as_me:25862: \$? = $ac_status" >&5
25863   (exit "$ac_status"); } &&
25864          { ac_try='test -s "conftest.$ac_objext"'
25865   { (eval echo "$as_me:25865: \"$ac_try\"") >&5
25866   (eval $ac_try) 2>&5
25867   ac_status=$?
25868   echo "$as_me:25868: \$? = $ac_status" >&5
25869   (exit "$ac_status"); }; }; then
25870   cf_cv_builtin_bool=1
25871 else
25872   echo "$as_me: failed program was:" >&5
25873 cat "conftest.$ac_ext" >&5
25874 cf_cv_builtin_bool=0
25875 fi
25876 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25877
25878 fi
25879
25880 if test "$cf_cv_builtin_bool" = 1
25881 then    echo "$as_me:25881: result: yes" >&5
25882 echo "${ECHO_T}yes" >&6
25883 else    echo "$as_me:25883: result: no" >&5
25884 echo "${ECHO_T}no" >&6
25885 fi
25886
25887 echo "$as_me:25887: checking for bool" >&5
25888 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25889 if test "${ac_cv_type_bool+set}" = set; then
25890   echo $ECHO_N "(cached) $ECHO_C" >&6
25891 else
25892   cat >"conftest.$ac_ext" <<_ACEOF
25893 #line 25893 "configure"
25894 #include "confdefs.h"
25895
25896 #include <stdlib.h>
25897 #include <stdio.h>
25898
25899 #if defined(__cplusplus)
25900
25901 #ifdef HAVE_GXX_BUILTIN_H
25902 #include <g++/builtin.h>
25903 #elif HAVE_GPP_BUILTIN_H
25904 #include <gpp/builtin.h>
25905 #elif HAVE_BUILTIN_H
25906 #include <builtin.h>
25907 #endif
25908
25909 #else
25910
25911 #if $cf_cv_header_stdbool_h
25912 #include <stdbool.h>
25913 #endif
25914
25915 #endif
25916
25917 int
25918 main (void)
25919 {
25920 if ((bool *) 0)
25921   return 0;
25922 if (sizeof (bool))
25923   return 0;
25924   ;
25925   return 0;
25926 }
25927 _ACEOF
25928 rm -f "conftest.$ac_objext"
25929 if { (eval echo "$as_me:25929: \"$ac_compile\"") >&5
25930   (eval $ac_compile) 2>&5
25931   ac_status=$?
25932   echo "$as_me:25932: \$? = $ac_status" >&5
25933   (exit "$ac_status"); } &&
25934          { ac_try='test -s "conftest.$ac_objext"'
25935   { (eval echo "$as_me:25935: \"$ac_try\"") >&5
25936   (eval $ac_try) 2>&5
25937   ac_status=$?
25938   echo "$as_me:25938: \$? = $ac_status" >&5
25939   (exit "$ac_status"); }; }; then
25940   ac_cv_type_bool=yes
25941 else
25942   echo "$as_me: failed program was:" >&5
25943 cat "conftest.$ac_ext" >&5
25944 ac_cv_type_bool=no
25945 fi
25946 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25947 fi
25948 echo "$as_me:25948: result: $ac_cv_type_bool" >&5
25949 echo "${ECHO_T}$ac_cv_type_bool" >&6
25950
25951 echo "$as_me:25951: checking size of bool" >&5
25952 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25953 if test "${ac_cv_sizeof_bool+set}" = set; then
25954   echo $ECHO_N "(cached) $ECHO_C" >&6
25955 else
25956   if test "$ac_cv_type_bool" = yes; then
25957   if test "$cross_compiling" = yes; then
25958   # Depending upon the size, compute the lo and hi bounds.
25959 cat >"conftest.$ac_ext" <<_ACEOF
25960 #line 25960 "configure"
25961 #include "confdefs.h"
25962
25963 #include <stdlib.h>
25964 #include <stdio.h>
25965
25966 #if defined(__cplusplus)
25967
25968 #ifdef HAVE_GXX_BUILTIN_H
25969 #include <g++/builtin.h>
25970 #elif HAVE_GPP_BUILTIN_H
25971 #include <gpp/builtin.h>
25972 #elif HAVE_BUILTIN_H
25973 #include <builtin.h>
25974 #endif
25975
25976 #else
25977
25978 #if $cf_cv_header_stdbool_h
25979 #include <stdbool.h>
25980 #endif
25981
25982 #endif
25983
25984 int
25985 main (void)
25986 {
25987 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25988   ;
25989   return 0;
25990 }
25991 _ACEOF
25992 rm -f "conftest.$ac_objext"
25993 if { (eval echo "$as_me:25993: \"$ac_compile\"") >&5
25994   (eval $ac_compile) 2>&5
25995   ac_status=$?
25996   echo "$as_me:25996: \$? = $ac_status" >&5
25997   (exit "$ac_status"); } &&
25998          { ac_try='test -s "conftest.$ac_objext"'
25999   { (eval echo "$as_me:25999: \"$ac_try\"") >&5
26000   (eval $ac_try) 2>&5
26001   ac_status=$?
26002   echo "$as_me:26002: \$? = $ac_status" >&5
26003   (exit "$ac_status"); }; }; then
26004   ac_lo=0 ac_mid=0
26005   while :; do
26006     cat >"conftest.$ac_ext" <<_ACEOF
26007 #line 26007 "configure"
26008 #include "confdefs.h"
26009
26010 #include <stdlib.h>
26011 #include <stdio.h>
26012
26013 #if defined(__cplusplus)
26014
26015 #ifdef HAVE_GXX_BUILTIN_H
26016 #include <g++/builtin.h>
26017 #elif HAVE_GPP_BUILTIN_H
26018 #include <gpp/builtin.h>
26019 #elif HAVE_BUILTIN_H
26020 #include <builtin.h>
26021 #endif
26022
26023 #else
26024
26025 #if $cf_cv_header_stdbool_h
26026 #include <stdbool.h>
26027 #endif
26028
26029 #endif
26030
26031 int
26032 main (void)
26033 {
26034 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26035   ;
26036   return 0;
26037 }
26038 _ACEOF
26039 rm -f "conftest.$ac_objext"
26040 if { (eval echo "$as_me:26040: \"$ac_compile\"") >&5
26041   (eval $ac_compile) 2>&5
26042   ac_status=$?
26043   echo "$as_me:26043: \$? = $ac_status" >&5
26044   (exit "$ac_status"); } &&
26045          { ac_try='test -s "conftest.$ac_objext"'
26046   { (eval echo "$as_me:26046: \"$ac_try\"") >&5
26047   (eval $ac_try) 2>&5
26048   ac_status=$?
26049   echo "$as_me:26049: \$? = $ac_status" >&5
26050   (exit "$ac_status"); }; }; then
26051   ac_hi=$ac_mid; break
26052 else
26053   echo "$as_me: failed program was:" >&5
26054 cat "conftest.$ac_ext" >&5
26055 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26056 fi
26057 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26058   done
26059 else
26060   echo "$as_me: failed program was:" >&5
26061 cat "conftest.$ac_ext" >&5
26062 ac_hi=-1 ac_mid=-1
26063   while :; do
26064     cat >"conftest.$ac_ext" <<_ACEOF
26065 #line 26065 "configure"
26066 #include "confdefs.h"
26067
26068 #include <stdlib.h>
26069 #include <stdio.h>
26070
26071 #if defined(__cplusplus)
26072
26073 #ifdef HAVE_GXX_BUILTIN_H
26074 #include <g++/builtin.h>
26075 #elif HAVE_GPP_BUILTIN_H
26076 #include <gpp/builtin.h>
26077 #elif HAVE_BUILTIN_H
26078 #include <builtin.h>
26079 #endif
26080
26081 #else
26082
26083 #if $cf_cv_header_stdbool_h
26084 #include <stdbool.h>
26085 #endif
26086
26087 #endif
26088
26089 int
26090 main (void)
26091 {
26092 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26093   ;
26094   return 0;
26095 }
26096 _ACEOF
26097 rm -f "conftest.$ac_objext"
26098 if { (eval echo "$as_me:26098: \"$ac_compile\"") >&5
26099   (eval $ac_compile) 2>&5
26100   ac_status=$?
26101   echo "$as_me:26101: \$? = $ac_status" >&5
26102   (exit "$ac_status"); } &&
26103          { ac_try='test -s "conftest.$ac_objext"'
26104   { (eval echo "$as_me:26104: \"$ac_try\"") >&5
26105   (eval $ac_try) 2>&5
26106   ac_status=$?
26107   echo "$as_me:26107: \$? = $ac_status" >&5
26108   (exit "$ac_status"); }; }; then
26109   ac_lo=$ac_mid; break
26110 else
26111   echo "$as_me: failed program was:" >&5
26112 cat "conftest.$ac_ext" >&5
26113 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26114 fi
26115 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26116   done
26117 fi
26118 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26119 # Binary search between lo and hi bounds.
26120 while test "x$ac_lo" != "x$ac_hi"; do
26121   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26122   cat >"conftest.$ac_ext" <<_ACEOF
26123 #line 26123 "configure"
26124 #include "confdefs.h"
26125
26126 #include <stdlib.h>
26127 #include <stdio.h>
26128
26129 #if defined(__cplusplus)
26130
26131 #ifdef HAVE_GXX_BUILTIN_H
26132 #include <g++/builtin.h>
26133 #elif HAVE_GPP_BUILTIN_H
26134 #include <gpp/builtin.h>
26135 #elif HAVE_BUILTIN_H
26136 #include <builtin.h>
26137 #endif
26138
26139 #else
26140
26141 #if $cf_cv_header_stdbool_h
26142 #include <stdbool.h>
26143 #endif
26144
26145 #endif
26146
26147 int
26148 main (void)
26149 {
26150 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26151   ;
26152   return 0;
26153 }
26154 _ACEOF
26155 rm -f "conftest.$ac_objext"
26156 if { (eval echo "$as_me:26156: \"$ac_compile\"") >&5
26157   (eval $ac_compile) 2>&5
26158   ac_status=$?
26159   echo "$as_me:26159: \$? = $ac_status" >&5
26160   (exit "$ac_status"); } &&
26161          { ac_try='test -s "conftest.$ac_objext"'
26162   { (eval echo "$as_me:26162: \"$ac_try\"") >&5
26163   (eval $ac_try) 2>&5
26164   ac_status=$?
26165   echo "$as_me:26165: \$? = $ac_status" >&5
26166   (exit "$ac_status"); }; }; then
26167   ac_hi=$ac_mid
26168 else
26169   echo "$as_me: failed program was:" >&5
26170 cat "conftest.$ac_ext" >&5
26171 ac_lo=`expr "$ac_mid" + 1`
26172 fi
26173 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26174 done
26175 ac_cv_sizeof_bool=$ac_lo
26176 else
26177   if test "$cross_compiling" = yes; then
26178   { { echo "$as_me:26178: error: cannot run test program while cross compiling" >&5
26179 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26180    { (exit 1); exit 1; }; }
26181 else
26182   cat >"conftest.$ac_ext" <<_ACEOF
26183 #line 26183 "configure"
26184 #include "confdefs.h"
26185
26186 #include <stdlib.h>
26187 #include <stdio.h>
26188
26189 #if defined(__cplusplus)
26190
26191 #ifdef HAVE_GXX_BUILTIN_H
26192 #include <g++/builtin.h>
26193 #elif HAVE_GPP_BUILTIN_H
26194 #include <gpp/builtin.h>
26195 #elif HAVE_BUILTIN_H
26196 #include <builtin.h>
26197 #endif
26198
26199 #else
26200
26201 #if $cf_cv_header_stdbool_h
26202 #include <stdbool.h>
26203 #endif
26204
26205 #endif
26206
26207 int
26208 main (void)
26209 {
26210 FILE *f = fopen ("conftest.val", "w");
26211 if (!f)
26212   $ac_main_return (1);
26213 fprintf (f, "%ld", (long)(sizeof (bool)));
26214 fclose (f);
26215   ;
26216   return 0;
26217 }
26218 _ACEOF
26219 rm -f "conftest$ac_exeext"
26220 if { (eval echo "$as_me:26220: \"$ac_link\"") >&5
26221   (eval $ac_link) 2>&5
26222   ac_status=$?
26223   echo "$as_me:26223: \$? = $ac_status" >&5
26224   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26225   { (eval echo "$as_me:26225: \"$ac_try\"") >&5
26226   (eval $ac_try) 2>&5
26227   ac_status=$?
26228   echo "$as_me:26228: \$? = $ac_status" >&5
26229   (exit "$ac_status"); }; }; then
26230   ac_cv_sizeof_bool=`cat conftest.val`
26231 else
26232   echo "$as_me: program exited with status $ac_status" >&5
26233 echo "$as_me: failed program was:" >&5
26234 cat "conftest.$ac_ext" >&5
26235 fi
26236 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26237 fi
26238 fi
26239 rm -f conftest.val
26240 else
26241   ac_cv_sizeof_bool=0
26242 fi
26243 fi
26244 echo "$as_me:26244: result: $ac_cv_sizeof_bool" >&5
26245 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26246 cat >>confdefs.h <<EOF
26247 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26248 EOF
26249
26250 echo "$as_me:26250: checking for type of bool" >&5
26251 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26252 if test "${cf_cv_type_of_bool+set}" = set; then
26253   echo $ECHO_N "(cached) $ECHO_C" >&6
26254 else
26255
26256         rm -f cf_test.out
26257         if test "$cross_compiling" = yes; then
26258
26259                 case x$ac_cv_sizeof_bool in
26260                 (x1) cf_cv_type_of_bool="unsigned char";;
26261                 (x2) cf_cv_type_of_bool="unsigned short";;
26262                 (x4) cf_cv_type_of_bool="unsigned int";;
26263                 (x8) cf_cv_type_of_bool="unsigned long";;
26264                 (*)  cf_cv_type_of_bool=unknown;;
26265                 esac
26266
26267 else
26268   cat >"conftest.$ac_ext" <<_ACEOF
26269 #line 26269 "configure"
26270 #include "confdefs.h"
26271
26272 $ac_includes_default
26273
26274 #if defined(__cplusplus)
26275
26276 #ifdef HAVE_GXX_BUILTIN_H
26277 #include <g++/builtin.h>
26278 #elif HAVE_GPP_BUILTIN_H
26279 #include <gpp/builtin.h>
26280 #elif HAVE_BUILTIN_H
26281 #include <builtin.h>
26282 #endif
26283
26284 #else
26285
26286 #if $cf_cv_header_stdbool_h
26287 #include <stdbool.h>
26288 #endif
26289
26290 #endif
26291
26292 int main(void)
26293 {
26294         FILE *fp = fopen("cf_test.out", "w");
26295         if (fp != 0) {
26296                 bool x = true;
26297                 if ((bool)(-x) >= 0)
26298                         fputs("unsigned ", fp);
26299                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26300                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26301                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26302                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26303                 fclose(fp);
26304         }
26305         ${cf_cv_main_return:-return}(0);
26306 }
26307
26308 _ACEOF
26309 rm -f "conftest$ac_exeext"
26310 if { (eval echo "$as_me:26310: \"$ac_link\"") >&5
26311   (eval $ac_link) 2>&5
26312   ac_status=$?
26313   echo "$as_me:26313: \$? = $ac_status" >&5
26314   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26315   { (eval echo "$as_me:26315: \"$ac_try\"") >&5
26316   (eval $ac_try) 2>&5
26317   ac_status=$?
26318   echo "$as_me:26318: \$? = $ac_status" >&5
26319   (exit "$ac_status"); }; }; then
26320   cf_cv_type_of_bool=`cat cf_test.out`
26321                  if test -z "$cf_cv_type_of_bool"; then
26322                    cf_cv_type_of_bool=unknown
26323                  fi
26324 else
26325   echo "$as_me: program exited with status $ac_status" >&5
26326 echo "$as_me: failed program was:" >&5
26327 cat "conftest.$ac_ext" >&5
26328 cf_cv_type_of_bool=unknown
26329 fi
26330 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26331 fi
26332         rm -f cf_test.out
26333
26334 fi
26335 echo "$as_me:26335: result: $cf_cv_type_of_bool" >&5
26336 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26337
26338 if test "$cf_cv_type_of_bool" = unknown ; then
26339         case .$NCURSES_BOOL in
26340         (.auto|.) NCURSES_BOOL=unsigned;;
26341         esac
26342         { echo "$as_me:26342: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26343 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26344         cf_cv_type_of_bool=$NCURSES_BOOL
26345 fi
26346
26347 echo "$as_me:26347: checking for special defines needed for etip.h" >&5
26348 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
26349 cf_save_CXXFLAGS="$CXXFLAGS"
26350 cf_result="none"
26351
26352 # etip.h includes ncurses.h which includes ncurses_dll.h
26353 # But ncurses_dll.h is generated - fix here.
26354 test -d include || mkdir include
26355 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
26356
26357 for cf_math in "" MATH_H
26358 do
26359 for cf_excp in "" MATH_EXCEPTION
26360 do
26361         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
26362         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
26363         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
26364 cat >"conftest.$ac_ext" <<_ACEOF
26365 #line 26365 "configure"
26366 #include "confdefs.h"
26367
26368 #include <etip.h.in>
26369
26370 int
26371 main (void)
26372 {
26373
26374   ;
26375   return 0;
26376 }
26377 _ACEOF
26378 rm -f "conftest.$ac_objext"
26379 if { (eval echo "$as_me:26379: \"$ac_compile\"") >&5
26380   (eval $ac_compile) 2>&5
26381   ac_status=$?
26382   echo "$as_me:26382: \$? = $ac_status" >&5
26383   (exit "$ac_status"); } &&
26384          { ac_try='test -s "conftest.$ac_objext"'
26385   { (eval echo "$as_me:26385: \"$ac_try\"") >&5
26386   (eval $ac_try) 2>&5
26387   ac_status=$?
26388   echo "$as_me:26388: \$? = $ac_status" >&5
26389   (exit "$ac_status"); }; }; then
26390
26391         test -n "$cf_math" && cat >>confdefs.h <<EOF
26392 #define ETIP_NEEDS_${cf_math} 1
26393 EOF
26394
26395         test -n "$cf_excp" && cat >>confdefs.h <<EOF
26396 #define ETIP_NEEDS_${cf_excp} 1
26397 EOF
26398
26399         cf_result="$cf_math $cf_excp"
26400         break 2
26401
26402 else
26403   echo "$as_me: failed program was:" >&5
26404 cat "conftest.$ac_ext" >&5
26405 fi
26406 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26407 done
26408 done
26409 echo "$as_me:26409: result: $cf_result" >&5
26410 echo "${ECHO_T}$cf_result" >&6
26411 CXXFLAGS="$cf_save_CXXFLAGS"
26412
26413 if test -n "$CXX"; then
26414 echo "$as_me:26414: checking if $CXX accepts override keyword" >&5
26415 echo $ECHO_N "checking if $CXX accepts override keyword... $ECHO_C" >&6
26416 if test "${cf_cv_cpp_override+set}" = set; then
26417   echo $ECHO_N "(cached) $ECHO_C" >&6
26418 else
26419
26420         ac_ext=cc
26421 ac_cpp='$CXXCPP $CPPFLAGS'
26422 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26423 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26424 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26425 ac_main_return="return"
26426
26427         if test "$cross_compiling" = yes; then
26428   cf_cv_cpp_override=unknown
26429 else
26430   cat >"conftest.$ac_ext" <<_ACEOF
26431 #line 26431 "configure"
26432 #include "confdefs.h"
26433
26434 class base
26435 {
26436 public:
26437         virtual int foo(float x) = 0;
26438 };
26439
26440 class derived: public base
26441 {
26442 public:
26443         int foo(float x) override { return x != 0.0 ? 1 : 0; }
26444 };
26445
26446 int main(void) { }
26447
26448 _ACEOF
26449 rm -f "conftest$ac_exeext"
26450 if { (eval echo "$as_me:26450: \"$ac_link\"") >&5
26451   (eval $ac_link) 2>&5
26452   ac_status=$?
26453   echo "$as_me:26453: \$? = $ac_status" >&5
26454   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26455   { (eval echo "$as_me:26455: \"$ac_try\"") >&5
26456   (eval $ac_try) 2>&5
26457   ac_status=$?
26458   echo "$as_me:26458: \$? = $ac_status" >&5
26459   (exit "$ac_status"); }; }; then
26460   cf_cv_cpp_override=yes
26461 else
26462   echo "$as_me: program exited with status $ac_status" >&5
26463 echo "$as_me: failed program was:" >&5
26464 cat "conftest.$ac_ext" >&5
26465 cf_cv_cpp_override=no
26466 fi
26467 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26468 fi
26469         ac_ext=cc
26470 ac_cpp='$CXXCPP $CPPFLAGS'
26471 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26472 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26473 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26474 ac_main_return="return"
26475
26476 fi
26477 echo "$as_me:26477: result: $cf_cv_cpp_override" >&5
26478 echo "${ECHO_T}$cf_cv_cpp_override" >&6
26479 fi
26480 test "$cf_cv_cpp_override" = yes &&
26481 cat >>confdefs.h <<\EOF
26482 #define CPP_HAS_OVERRIDE 1
26483 EOF
26484
26485 if test -n "$CXX"; then
26486 echo "$as_me:26486: checking if $CXX accepts parameter initialization" >&5
26487 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
26488 if test "${cf_cv_cpp_param_init+set}" = set; then
26489   echo $ECHO_N "(cached) $ECHO_C" >&6
26490 else
26491
26492         ac_ext=cc
26493 ac_cpp='$CXXCPP $CPPFLAGS'
26494 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26495 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26496 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26497 ac_main_return="return"
26498
26499         if test "$cross_compiling" = yes; then
26500   cf_cv_cpp_param_init=unknown
26501 else
26502   cat >"conftest.$ac_ext" <<_ACEOF
26503 #line 26503 "configure"
26504 #include "confdefs.h"
26505
26506 class TEST {
26507 private:
26508         int value;
26509 public:
26510         TEST(int x = 1);
26511         ~TEST();
26512 };
26513
26514 TEST::TEST(int x = 1)   // some compilers do not like second initializer
26515 {
26516         value = x;
26517 }
26518 int main(void) { }
26519
26520 _ACEOF
26521 rm -f "conftest$ac_exeext"
26522 if { (eval echo "$as_me:26522: \"$ac_link\"") >&5
26523   (eval $ac_link) 2>&5
26524   ac_status=$?
26525   echo "$as_me:26525: \$? = $ac_status" >&5
26526   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26527   { (eval echo "$as_me:26527: \"$ac_try\"") >&5
26528   (eval $ac_try) 2>&5
26529   ac_status=$?
26530   echo "$as_me:26530: \$? = $ac_status" >&5
26531   (exit "$ac_status"); }; }; then
26532   cf_cv_cpp_param_init=yes
26533 else
26534   echo "$as_me: program exited with status $ac_status" >&5
26535 echo "$as_me: failed program was:" >&5
26536 cat "conftest.$ac_ext" >&5
26537 cf_cv_cpp_param_init=no
26538 fi
26539 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26540 fi
26541         ac_ext=cc
26542 ac_cpp='$CXXCPP $CPPFLAGS'
26543 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26544 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26545 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26546 ac_main_return="return"
26547
26548 fi
26549 echo "$as_me:26549: result: $cf_cv_cpp_param_init" >&5
26550 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
26551 fi
26552 test "$cf_cv_cpp_param_init" = yes &&
26553 cat >>confdefs.h <<\EOF
26554 #define CPP_HAS_PARAM_INIT 1
26555 EOF
26556
26557 if test -n "$CXX"; then
26558
26559 echo "$as_me:26559: checking if $CXX accepts static_cast" >&5
26560 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
26561 if test "${cf_cv_cpp_static_cast+set}" = set; then
26562   echo $ECHO_N "(cached) $ECHO_C" >&6
26563 else
26564
26565         ac_ext=cc
26566 ac_cpp='$CXXCPP $CPPFLAGS'
26567 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26568 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26569 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26570 ac_main_return="return"
26571
26572         cat >"conftest.$ac_ext" <<_ACEOF
26573 #line 26573 "configure"
26574 #include "confdefs.h"
26575
26576 class NCursesPanel
26577 {
26578 public:
26579   NCursesPanel(int nlines,
26580                int ncols,
26581                int begin_y = 0,
26582                int begin_x = 0)
26583   {
26584   }
26585   NCursesPanel();
26586   ~NCursesPanel();
26587 };
26588
26589 template<class T> class NCursesUserPanel : public NCursesPanel
26590 {
26591 public:
26592   NCursesUserPanel (int nlines,
26593                     int ncols,
26594                     int begin_y = 0,
26595                     int begin_x = 0,
26596                     const T* p_UserData = static_cast<T*>(0))
26597     : NCursesPanel (nlines, ncols, begin_y, begin_x)
26598   {
26599   };
26600   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
26601   {
26602   };
26603
26604   virtual ~NCursesUserPanel() {};
26605 };
26606
26607 int
26608 main (void)
26609 {
26610
26611         const char* p_UserData = static_cast<char*>(0)
26612   ;
26613   return 0;
26614 }
26615 _ACEOF
26616 rm -f "conftest.$ac_objext"
26617 if { (eval echo "$as_me:26617: \"$ac_compile\"") >&5
26618   (eval $ac_compile) 2>&5
26619   ac_status=$?
26620   echo "$as_me:26620: \$? = $ac_status" >&5
26621   (exit "$ac_status"); } &&
26622          { ac_try='test -s "conftest.$ac_objext"'
26623   { (eval echo "$as_me:26623: \"$ac_try\"") >&5
26624   (eval $ac_try) 2>&5
26625   ac_status=$?
26626   echo "$as_me:26626: \$? = $ac_status" >&5
26627   (exit "$ac_status"); }; }; then
26628   cf_cv_cpp_static_cast=yes
26629 else
26630   echo "$as_me: failed program was:" >&5
26631 cat "conftest.$ac_ext" >&5
26632 cf_cv_cpp_static_cast=no
26633 fi
26634 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26635
26636         ac_ext=cc
26637 ac_cpp='$CXXCPP $CPPFLAGS'
26638 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26639 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26640 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26641 ac_main_return="return"
26642
26643 fi
26644 echo "$as_me:26644: result: $cf_cv_cpp_static_cast" >&5
26645 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
26646
26647 fi
26648
26649 test "$cf_cv_cpp_static_cast" = yes &&
26650 cat >>confdefs.h <<\EOF
26651 #define CPP_HAS_STATIC_CAST 1
26652 EOF
26653
26654         CXX_AR='$(AR)'
26655         CXX_ARFLAGS='$(ARFLAGS)'
26656         case "$cf_cv_system_name" in
26657         (irix*)
26658             if test "$GXX" != yes ; then
26659                 CXX_AR='$(CXX)'
26660                 CXX_ARFLAGS='-ar -o'
26661             fi
26662             ;;
26663         (sco3.2v5*)
26664             CXXLDFLAGS="-u main"
26665             ;;
26666         (solaris2*)
26667             if test "$GXX" != yes ; then
26668                 CXX_AR='$(CXX)'
26669                 CXX_ARFLAGS='-xar -o'
26670             fi
26671             ;;
26672         esac
26673
26674 else
26675         cf_cxx_library=no
26676         cf_cv_builtin_bool=1
26677
26678         # Just because we are not configuring against C++ right now does not
26679         # mean that a user will not want to use C++.  Some distributors disable
26680         # the C++ portion of this configuration as a shortcut (or just to avoid
26681         # compiling the demo in the c++ directory).  So we need a reasonable
26682         # default for the 'bool' type.
26683         #
26684         # Caveat: since the storage of the bool type is not standardized, it
26685         # may change.
26686
26687         if test "$NCURSES_BOOL" != auto ; then
26688                 cf_cv_type_of_bool=$NCURSES_BOOL
26689                 cf_cv_header_stdbool_h=0
26690         else
26691                 if test "$cf_cv_header_stdbool_h" = 1 ; then
26692
26693 echo "$as_me:26693: checking for bool" >&5
26694 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26695 if test "${ac_cv_type_bool+set}" = set; then
26696   echo $ECHO_N "(cached) $ECHO_C" >&6
26697 else
26698   cat >"conftest.$ac_ext" <<_ACEOF
26699 #line 26699 "configure"
26700 #include "confdefs.h"
26701
26702 #include <stdlib.h>
26703 #include <stdio.h>
26704
26705 #if defined(__cplusplus)
26706
26707 #ifdef HAVE_GXX_BUILTIN_H
26708 #include <g++/builtin.h>
26709 #elif HAVE_GPP_BUILTIN_H
26710 #include <gpp/builtin.h>
26711 #elif HAVE_BUILTIN_H
26712 #include <builtin.h>
26713 #endif
26714
26715 #else
26716
26717 #if $cf_cv_header_stdbool_h
26718 #include <stdbool.h>
26719 #endif
26720
26721 #endif
26722
26723 int
26724 main (void)
26725 {
26726 if ((bool *) 0)
26727   return 0;
26728 if (sizeof (bool))
26729   return 0;
26730   ;
26731   return 0;
26732 }
26733 _ACEOF
26734 rm -f "conftest.$ac_objext"
26735 if { (eval echo "$as_me:26735: \"$ac_compile\"") >&5
26736   (eval $ac_compile) 2>&5
26737   ac_status=$?
26738   echo "$as_me:26738: \$? = $ac_status" >&5
26739   (exit "$ac_status"); } &&
26740          { ac_try='test -s "conftest.$ac_objext"'
26741   { (eval echo "$as_me:26741: \"$ac_try\"") >&5
26742   (eval $ac_try) 2>&5
26743   ac_status=$?
26744   echo "$as_me:26744: \$? = $ac_status" >&5
26745   (exit "$ac_status"); }; }; then
26746   ac_cv_type_bool=yes
26747 else
26748   echo "$as_me: failed program was:" >&5
26749 cat "conftest.$ac_ext" >&5
26750 ac_cv_type_bool=no
26751 fi
26752 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26753 fi
26754 echo "$as_me:26754: result: $ac_cv_type_bool" >&5
26755 echo "${ECHO_T}$ac_cv_type_bool" >&6
26756
26757 echo "$as_me:26757: checking size of bool" >&5
26758 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26759 if test "${ac_cv_sizeof_bool+set}" = set; then
26760   echo $ECHO_N "(cached) $ECHO_C" >&6
26761 else
26762   if test "$ac_cv_type_bool" = yes; then
26763   if test "$cross_compiling" = yes; then
26764   # Depending upon the size, compute the lo and hi bounds.
26765 cat >"conftest.$ac_ext" <<_ACEOF
26766 #line 26766 "configure"
26767 #include "confdefs.h"
26768
26769 #include <stdlib.h>
26770 #include <stdio.h>
26771
26772 #if defined(__cplusplus)
26773
26774 #ifdef HAVE_GXX_BUILTIN_H
26775 #include <g++/builtin.h>
26776 #elif HAVE_GPP_BUILTIN_H
26777 #include <gpp/builtin.h>
26778 #elif HAVE_BUILTIN_H
26779 #include <builtin.h>
26780 #endif
26781
26782 #else
26783
26784 #if $cf_cv_header_stdbool_h
26785 #include <stdbool.h>
26786 #endif
26787
26788 #endif
26789
26790 int
26791 main (void)
26792 {
26793 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26794   ;
26795   return 0;
26796 }
26797 _ACEOF
26798 rm -f "conftest.$ac_objext"
26799 if { (eval echo "$as_me:26799: \"$ac_compile\"") >&5
26800   (eval $ac_compile) 2>&5
26801   ac_status=$?
26802   echo "$as_me:26802: \$? = $ac_status" >&5
26803   (exit "$ac_status"); } &&
26804          { ac_try='test -s "conftest.$ac_objext"'
26805   { (eval echo "$as_me:26805: \"$ac_try\"") >&5
26806   (eval $ac_try) 2>&5
26807   ac_status=$?
26808   echo "$as_me:26808: \$? = $ac_status" >&5
26809   (exit "$ac_status"); }; }; then
26810   ac_lo=0 ac_mid=0
26811   while :; do
26812     cat >"conftest.$ac_ext" <<_ACEOF
26813 #line 26813 "configure"
26814 #include "confdefs.h"
26815
26816 #include <stdlib.h>
26817 #include <stdio.h>
26818
26819 #if defined(__cplusplus)
26820
26821 #ifdef HAVE_GXX_BUILTIN_H
26822 #include <g++/builtin.h>
26823 #elif HAVE_GPP_BUILTIN_H
26824 #include <gpp/builtin.h>
26825 #elif HAVE_BUILTIN_H
26826 #include <builtin.h>
26827 #endif
26828
26829 #else
26830
26831 #if $cf_cv_header_stdbool_h
26832 #include <stdbool.h>
26833 #endif
26834
26835 #endif
26836
26837 int
26838 main (void)
26839 {
26840 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26841   ;
26842   return 0;
26843 }
26844 _ACEOF
26845 rm -f "conftest.$ac_objext"
26846 if { (eval echo "$as_me:26846: \"$ac_compile\"") >&5
26847   (eval $ac_compile) 2>&5
26848   ac_status=$?
26849   echo "$as_me:26849: \$? = $ac_status" >&5
26850   (exit "$ac_status"); } &&
26851          { ac_try='test -s "conftest.$ac_objext"'
26852   { (eval echo "$as_me:26852: \"$ac_try\"") >&5
26853   (eval $ac_try) 2>&5
26854   ac_status=$?
26855   echo "$as_me:26855: \$? = $ac_status" >&5
26856   (exit "$ac_status"); }; }; then
26857   ac_hi=$ac_mid; break
26858 else
26859   echo "$as_me: failed program was:" >&5
26860 cat "conftest.$ac_ext" >&5
26861 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26862 fi
26863 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26864   done
26865 else
26866   echo "$as_me: failed program was:" >&5
26867 cat "conftest.$ac_ext" >&5
26868 ac_hi=-1 ac_mid=-1
26869   while :; do
26870     cat >"conftest.$ac_ext" <<_ACEOF
26871 #line 26871 "configure"
26872 #include "confdefs.h"
26873
26874 #include <stdlib.h>
26875 #include <stdio.h>
26876
26877 #if defined(__cplusplus)
26878
26879 #ifdef HAVE_GXX_BUILTIN_H
26880 #include <g++/builtin.h>
26881 #elif HAVE_GPP_BUILTIN_H
26882 #include <gpp/builtin.h>
26883 #elif HAVE_BUILTIN_H
26884 #include <builtin.h>
26885 #endif
26886
26887 #else
26888
26889 #if $cf_cv_header_stdbool_h
26890 #include <stdbool.h>
26891 #endif
26892
26893 #endif
26894
26895 int
26896 main (void)
26897 {
26898 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26899   ;
26900   return 0;
26901 }
26902 _ACEOF
26903 rm -f "conftest.$ac_objext"
26904 if { (eval echo "$as_me:26904: \"$ac_compile\"") >&5
26905   (eval $ac_compile) 2>&5
26906   ac_status=$?
26907   echo "$as_me:26907: \$? = $ac_status" >&5
26908   (exit "$ac_status"); } &&
26909          { ac_try='test -s "conftest.$ac_objext"'
26910   { (eval echo "$as_me:26910: \"$ac_try\"") >&5
26911   (eval $ac_try) 2>&5
26912   ac_status=$?
26913   echo "$as_me:26913: \$? = $ac_status" >&5
26914   (exit "$ac_status"); }; }; then
26915   ac_lo=$ac_mid; break
26916 else
26917   echo "$as_me: failed program was:" >&5
26918 cat "conftest.$ac_ext" >&5
26919 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26920 fi
26921 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26922   done
26923 fi
26924 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26925 # Binary search between lo and hi bounds.
26926 while test "x$ac_lo" != "x$ac_hi"; do
26927   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26928   cat >"conftest.$ac_ext" <<_ACEOF
26929 #line 26929 "configure"
26930 #include "confdefs.h"
26931
26932 #include <stdlib.h>
26933 #include <stdio.h>
26934
26935 #if defined(__cplusplus)
26936
26937 #ifdef HAVE_GXX_BUILTIN_H
26938 #include <g++/builtin.h>
26939 #elif HAVE_GPP_BUILTIN_H
26940 #include <gpp/builtin.h>
26941 #elif HAVE_BUILTIN_H
26942 #include <builtin.h>
26943 #endif
26944
26945 #else
26946
26947 #if $cf_cv_header_stdbool_h
26948 #include <stdbool.h>
26949 #endif
26950
26951 #endif
26952
26953 int
26954 main (void)
26955 {
26956 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26957   ;
26958   return 0;
26959 }
26960 _ACEOF
26961 rm -f "conftest.$ac_objext"
26962 if { (eval echo "$as_me:26962: \"$ac_compile\"") >&5
26963   (eval $ac_compile) 2>&5
26964   ac_status=$?
26965   echo "$as_me:26965: \$? = $ac_status" >&5
26966   (exit "$ac_status"); } &&
26967          { ac_try='test -s "conftest.$ac_objext"'
26968   { (eval echo "$as_me:26968: \"$ac_try\"") >&5
26969   (eval $ac_try) 2>&5
26970   ac_status=$?
26971   echo "$as_me:26971: \$? = $ac_status" >&5
26972   (exit "$ac_status"); }; }; then
26973   ac_hi=$ac_mid
26974 else
26975   echo "$as_me: failed program was:" >&5
26976 cat "conftest.$ac_ext" >&5
26977 ac_lo=`expr "$ac_mid" + 1`
26978 fi
26979 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26980 done
26981 ac_cv_sizeof_bool=$ac_lo
26982 else
26983   if test "$cross_compiling" = yes; then
26984   { { echo "$as_me:26984: error: cannot run test program while cross compiling" >&5
26985 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26986    { (exit 1); exit 1; }; }
26987 else
26988   cat >"conftest.$ac_ext" <<_ACEOF
26989 #line 26989 "configure"
26990 #include "confdefs.h"
26991
26992 #include <stdlib.h>
26993 #include <stdio.h>
26994
26995 #if defined(__cplusplus)
26996
26997 #ifdef HAVE_GXX_BUILTIN_H
26998 #include <g++/builtin.h>
26999 #elif HAVE_GPP_BUILTIN_H
27000 #include <gpp/builtin.h>
27001 #elif HAVE_BUILTIN_H
27002 #include <builtin.h>
27003 #endif
27004
27005 #else
27006
27007 #if $cf_cv_header_stdbool_h
27008 #include <stdbool.h>
27009 #endif
27010
27011 #endif
27012
27013 int
27014 main (void)
27015 {
27016 FILE *f = fopen ("conftest.val", "w");
27017 if (!f)
27018   $ac_main_return (1);
27019 fprintf (f, "%ld", (long)(sizeof (bool)));
27020 fclose (f);
27021   ;
27022   return 0;
27023 }
27024 _ACEOF
27025 rm -f "conftest$ac_exeext"
27026 if { (eval echo "$as_me:27026: \"$ac_link\"") >&5
27027   (eval $ac_link) 2>&5
27028   ac_status=$?
27029   echo "$as_me:27029: \$? = $ac_status" >&5
27030   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27031   { (eval echo "$as_me:27031: \"$ac_try\"") >&5
27032   (eval $ac_try) 2>&5
27033   ac_status=$?
27034   echo "$as_me:27034: \$? = $ac_status" >&5
27035   (exit "$ac_status"); }; }; then
27036   ac_cv_sizeof_bool=`cat conftest.val`
27037 else
27038   echo "$as_me: program exited with status $ac_status" >&5
27039 echo "$as_me: failed program was:" >&5
27040 cat "conftest.$ac_ext" >&5
27041 fi
27042 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27043 fi
27044 fi
27045 rm -f conftest.val
27046 else
27047   ac_cv_sizeof_bool=0
27048 fi
27049 fi
27050 echo "$as_me:27050: result: $ac_cv_sizeof_bool" >&5
27051 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
27052 cat >>confdefs.h <<EOF
27053 #define SIZEOF_BOOL $ac_cv_sizeof_bool
27054 EOF
27055
27056 echo "$as_me:27056: checking for type of bool" >&5
27057 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
27058 if test "${cf_cv_type_of_bool+set}" = set; then
27059   echo $ECHO_N "(cached) $ECHO_C" >&6
27060 else
27061
27062         rm -f cf_test.out
27063         if test "$cross_compiling" = yes; then
27064
27065                 case x$ac_cv_sizeof_bool in
27066                 (x1) cf_cv_type_of_bool="unsigned char";;
27067                 (x2) cf_cv_type_of_bool="unsigned short";;
27068                 (x4) cf_cv_type_of_bool="unsigned int";;
27069                 (x8) cf_cv_type_of_bool="unsigned long";;
27070                 (*)  cf_cv_type_of_bool=unknown;;
27071                 esac
27072
27073 else
27074   cat >"conftest.$ac_ext" <<_ACEOF
27075 #line 27075 "configure"
27076 #include "confdefs.h"
27077
27078 $ac_includes_default
27079
27080 #if defined(__cplusplus)
27081
27082 #ifdef HAVE_GXX_BUILTIN_H
27083 #include <g++/builtin.h>
27084 #elif HAVE_GPP_BUILTIN_H
27085 #include <gpp/builtin.h>
27086 #elif HAVE_BUILTIN_H
27087 #include <builtin.h>
27088 #endif
27089
27090 #else
27091
27092 #if $cf_cv_header_stdbool_h
27093 #include <stdbool.h>
27094 #endif
27095
27096 #endif
27097
27098 int main(void)
27099 {
27100         FILE *fp = fopen("cf_test.out", "w");
27101         if (fp != 0) {
27102                 bool x = true;
27103                 if ((bool)(-x) >= 0)
27104                         fputs("unsigned ", fp);
27105                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
27106                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
27107                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
27108                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
27109                 fclose(fp);
27110         }
27111         ${cf_cv_main_return:-return}(0);
27112 }
27113
27114 _ACEOF
27115 rm -f "conftest$ac_exeext"
27116 if { (eval echo "$as_me:27116: \"$ac_link\"") >&5
27117   (eval $ac_link) 2>&5
27118   ac_status=$?
27119   echo "$as_me:27119: \$? = $ac_status" >&5
27120   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27121   { (eval echo "$as_me:27121: \"$ac_try\"") >&5
27122   (eval $ac_try) 2>&5
27123   ac_status=$?
27124   echo "$as_me:27124: \$? = $ac_status" >&5
27125   (exit "$ac_status"); }; }; then
27126   cf_cv_type_of_bool=`cat cf_test.out`
27127                  if test -z "$cf_cv_type_of_bool"; then
27128                    cf_cv_type_of_bool=unknown
27129                  fi
27130 else
27131   echo "$as_me: program exited with status $ac_status" >&5
27132 echo "$as_me: failed program was:" >&5
27133 cat "conftest.$ac_ext" >&5
27134 cf_cv_type_of_bool=unknown
27135 fi
27136 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27137 fi
27138         rm -f cf_test.out
27139
27140 fi
27141 echo "$as_me:27141: result: $cf_cv_type_of_bool" >&5
27142 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27143
27144 if test "$cf_cv_type_of_bool" = unknown ; then
27145         case .$NCURSES_BOOL in
27146         (.auto|.) NCURSES_BOOL=unsigned;;
27147         esac
27148         { echo "$as_me:27148: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
27149 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
27150         cf_cv_type_of_bool=$NCURSES_BOOL
27151 fi
27152
27153                 else
27154                         echo "$as_me:27154: checking for fallback type of bool" >&5
27155 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
27156                         case "$host_cpu" in
27157                         (i?86)  cf_cv_type_of_bool=char ;;
27158                         (*)     cf_cv_type_of_bool=int  ;;
27159                         esac
27160                         echo "$as_me:27160: result: $cf_cv_type_of_bool" >&5
27161 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27162                 fi
27163         fi
27164 fi
27165
27166 # If the C compiler did not declare bool, and we did not determine that the C++
27167 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
27168 # ncurses library use the same type as C++ bool.  Note that this allows one to
27169 # specify the type of bool in a configure-script option and postpone
27170 # integration with the C++ compiler provided that the types are compatible.
27171 USE_CXX_BOOL=1
27172 if test "$cf_cv_cc_bool_type" = 1
27173 then
27174         # oops: C has a bool.  Unlikely, but C++ could differ.
27175         USE_CXX_BOOL=0
27176 elif test "$cf_cv_builtin_bool" = 0
27177 then
27178         # C++ has no bool
27179         USE_CXX_BOOL=0
27180 else
27181         # this is the normal case
27182         USE_CXX_BOOL='defined(__cplusplus)'
27183 fi
27184
27185 if test -f "${srcdir}/Ada95/Makefile.in" ; then
27186
27187         if test "$cf_with_ada" != "no" ; then
27188                 if test "$with_libtool" != "no"; then
27189                         { echo "$as_me:27189: WARNING: libtool does not support Ada - disabling feature" >&5
27190 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
27191                         cf_with_ada=no
27192                 fi
27193         fi
27194
27195         if test "$cf_with_ada" != "no" ; then
27196
27197 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
27198 do
27199
27200 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27201
27202         unset ac_cv_path_cf_TEMP_gnat
27203         unset cf_TEMP_gnat
27204         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
27205 set dummy $cf_prog_gnat; ac_word=$2
27206 echo "$as_me:27206: checking for $ac_word" >&5
27207 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27208 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
27209   echo $ECHO_N "(cached) $ECHO_C" >&6
27210 else
27211   case $cf_TEMP_gnat in
27212   [\\/]* | ?:[\\/]*)
27213   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
27214   ;;
27215   *)
27216   ac_save_IFS=$IFS; IFS=$ac_path_separator
27217 ac_dummy="$PATH"
27218 for ac_dir in $ac_dummy; do
27219   IFS=$ac_save_IFS
27220   test -z "$ac_dir" && ac_dir=.
27221   if $as_executable_p "$ac_dir/$ac_word"; then
27222    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
27223    echo "$as_me:27223: found $ac_dir/$ac_word" >&5
27224    break
27225 fi
27226 done
27227
27228   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
27229   ;;
27230 esac
27231 fi
27232 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
27233
27234 if test -n "$cf_TEMP_gnat"; then
27235   echo "$as_me:27235: result: $cf_TEMP_gnat" >&5
27236 echo "${ECHO_T}$cf_TEMP_gnat" >&6
27237 else
27238   echo "$as_me:27238: result: no" >&5
27239 echo "${ECHO_T}no" >&6
27240 fi
27241
27242         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
27243
27244         if test "x$cf_TEMP_gnat" != xno; then
27245                 unset cf_cv_gnat_version
27246                 unset cf_TEMP_gnat
27247
27248 echo "$as_me:27248: checking for $cf_prog_gnat version" >&5
27249 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
27250 if test "${cf_cv_gnat_version+set}" = set; then
27251   echo $ECHO_N "(cached) $ECHO_C" >&6
27252 else
27253
27254 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
27255         grep '[0-9].[0-9][0-9]*' |\
27256         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27257
27258 fi
27259 echo "$as_me:27259: result: $cf_cv_gnat_version" >&5
27260 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27261 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27262 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
27263
27264         fi
27265         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
27266
27267         unset cf_TEMP_gnat
27268         unset cf_cv_gnat_version
27269         unset ac_cv_path_cf_TEMP_gnat
27270 done
27271
27272 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
27273         cf_ada_make=
27274         cf_cv_prog_gnat_correct=no
27275 else
27276         cf_ada_make=gnatmake
27277         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
27278                 # gprconfig is newer than gnatmake; we can continue...
27279                 cf_ada_config="##"
27280         else
27281                 rm -rf ./conftest* ./*~conftest*
27282                 if mkdir conftest.src
27283                 then
27284                         cf_ada_config=""
27285                         cd conftest.src
27286                         for cf_gprconfig in Ada C
27287                         do
27288                                 echo "$as_me:27288: checking for gprconfig name for $cf_gprconfig" >&5
27289 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
27290                                 if test "$cf_gprconfig" = C
27291                                 then
27292                                         for cf_gprconfig_param in \
27293                                                 "$cf_gprconfig,,,,GNATGCC" \
27294                                                 "$cf_gprconfig,,,,GCC" \
27295                                                 "$cf_gprconfig"
27296                                         do
27297                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27298                                                 test -n "$cf_gprconfig_value" && break
27299                                         done
27300                                 else
27301                                         cf_gprconfig_param=$cf_gprconfig
27302                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27303                                 fi
27304                                 if test -n "$cf_gprconfig_value"
27305                                 then
27306                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
27307                                         echo "$as_me:27307: result: $cf_gprconfig_value" >&5
27308 echo "${ECHO_T}$cf_gprconfig_value" >&6
27309                                 else
27310                                         echo "$as_me:27310: result: missing" >&5
27311 echo "${ECHO_T}missing" >&6
27312                                         cf_ada_config="#"
27313                                         break
27314                                 fi
27315                         done
27316                         cd ..
27317                         rm -rf ./conftest* ./*~conftest*
27318                 fi
27319         fi
27320         if test "x$cf_ada_config" != "x#"
27321         then
27322
27323 echo "$as_me:27323: checking for gnat version" >&5
27324 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
27325 if test "${cf_cv_gnat_version+set}" = set; then
27326   echo $ECHO_N "(cached) $ECHO_C" >&6
27327 else
27328
27329 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
27330         grep '[0-9].[0-9][0-9]*' |\
27331         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27332
27333 fi
27334 echo "$as_me:27334: result: $cf_cv_gnat_version" >&5
27335 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27336 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27337
27338 case "$cf_cv_gnat_version" in
27339 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27340         cf_cv_prog_gnat_correct=yes
27341         ;;
27342 (*)
27343         { echo "$as_me:27343: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
27344 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
27345         cf_cv_prog_gnat_correct=no
27346         ;;
27347 esac
27348
27349                 # Extract the first word of "m4", so it can be a program name with args.
27350 set dummy m4; ac_word=$2
27351 echo "$as_me:27351: checking for $ac_word" >&5
27352 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27353 if test "${ac_cv_prog_M4_exists+set}" = set; then
27354   echo $ECHO_N "(cached) $ECHO_C" >&6
27355 else
27356   if test -n "$M4_exists"; then
27357   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
27358 else
27359   ac_save_IFS=$IFS; IFS=$ac_path_separator
27360 ac_dummy="$PATH"
27361 for ac_dir in $ac_dummy; do
27362   IFS=$ac_save_IFS
27363   test -z "$ac_dir" && ac_dir=.
27364   $as_executable_p "$ac_dir/$ac_word" || continue
27365 ac_cv_prog_M4_exists="yes"
27366 echo "$as_me:27366: found $ac_dir/$ac_word" >&5
27367 break
27368 done
27369
27370   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
27371 fi
27372 fi
27373 M4_exists=$ac_cv_prog_M4_exists
27374 if test -n "$M4_exists"; then
27375   echo "$as_me:27375: result: $M4_exists" >&5
27376 echo "${ECHO_T}$M4_exists" >&6
27377 else
27378   echo "$as_me:27378: result: no" >&5
27379 echo "${ECHO_T}no" >&6
27380 fi
27381
27382                 if test "$ac_cv_prog_M4_exists" = no; then
27383                         cf_cv_prog_gnat_correct=no
27384                         { echo "$as_me:27384: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
27385 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
27386                 fi
27387                 if test "$cf_cv_prog_gnat_correct" = yes; then
27388                         echo "$as_me:27388: checking if GNAT works" >&5
27389 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
27390
27391 rm -rf ./conftest* ./*~conftest*
27392 cat >>conftest.ads <<CF_EOF
27393 procedure conftest;
27394 CF_EOF
27395 cat >>conftest.adb <<CF_EOF
27396 with Text_IO;
27397 with GNAT.OS_Lib;
27398 procedure conftest is
27399 begin
27400    Text_IO.Put ("Hello World");
27401    Text_IO.New_Line;
27402    GNAT.OS_Lib.OS_Exit (0);
27403 end conftest;
27404 CF_EOF
27405 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27406    if ( ./conftest 1>&5 2>&1 ) ; then
27407       cf_cv_prog_gnat_correct=yes
27408    else
27409       cf_cv_prog_gnat_correct=no
27410    fi
27411 else
27412    cf_cv_prog_gnat_correct=no
27413 fi
27414 rm -rf ./conftest* ./*~conftest*
27415
27416                         echo "$as_me:27416: result: $cf_cv_prog_gnat_correct" >&5
27417 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
27418                 fi
27419         else
27420                 cf_cv_prog_gnat_correct=no
27421         fi
27422 fi
27423
27424                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
27425
27426         ADAFLAGS="$ADAFLAGS -gnatpn"
27427
27428         echo "$as_me:27428: checking optimization options for ADAFLAGS" >&5
27429 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
27430         case "$CFLAGS" in
27431         (*-g*)
27432
27433         ADAFLAGS="$ADAFLAGS -g"
27434
27435                 ;;
27436         esac
27437         case "$CFLAGS" in
27438         (*-O*)
27439                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
27440
27441         ADAFLAGS="$ADAFLAGS $cf_O_flag"
27442
27443                 ;;
27444         esac
27445         echo "$as_me:27445: result: $ADAFLAGS" >&5
27446 echo "${ECHO_T}$ADAFLAGS" >&6
27447
27448 echo "$as_me:27448: checking if GNATPREP supports -T option" >&5
27449 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
27450 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
27451   echo $ECHO_N "(cached) $ECHO_C" >&6
27452 else
27453
27454 cf_cv_gnatprep_opt_t=no
27455 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
27456
27457 fi
27458 echo "$as_me:27458: result: $cf_cv_gnatprep_opt_t" >&5
27459 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
27460 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
27461
27462 echo "$as_me:27462: checking if GNAT supports generics" >&5
27463 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
27464 case "$cf_cv_gnat_version" in
27465 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27466         cf_gnat_generics=yes
27467         ;;
27468 (*)
27469         cf_gnat_generics=no
27470         ;;
27471 esac
27472 echo "$as_me:27472: result: $cf_gnat_generics" >&5
27473 echo "${ECHO_T}$cf_gnat_generics" >&6
27474
27475 if test "$cf_gnat_generics" = yes
27476 then
27477         cf_compile_generics=generics
27478         cf_generic_objects="\${GENOBJS}"
27479 else
27480         cf_compile_generics=
27481         cf_generic_objects=
27482 fi
27483
27484 echo "$as_me:27484: checking if GNAT supports SIGINT" >&5
27485 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
27486 if test "${cf_cv_gnat_sigint+set}" = set; then
27487   echo $ECHO_N "(cached) $ECHO_C" >&6
27488 else
27489
27490 rm -rf ./conftest* ./*~conftest*
27491 cat >>conftest.ads <<CF_EOF
27492 with Ada.Interrupts.Names;
27493
27494 package ConfTest is
27495
27496    pragma Warnings (Off);  --  the next pragma exists since 3.11p
27497    pragma Unreserve_All_Interrupts;
27498    pragma Warnings (On);
27499
27500    protected Process is
27501       procedure Stop;
27502       function Continue return Boolean;
27503       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
27504    private
27505       Done : Boolean := False;
27506    end Process;
27507
27508 end ConfTest;
27509 CF_EOF
27510 cat >>conftest.adb <<CF_EOF
27511 package body ConfTest is
27512    protected body Process is
27513       procedure Stop is
27514       begin
27515          Done := True;
27516       end Stop;
27517       function Continue return Boolean is
27518       begin
27519          return not Done;
27520       end Continue;
27521    end Process;
27522 end ConfTest;
27523 CF_EOF
27524 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27525       cf_cv_gnat_sigint=yes
27526 else
27527    cf_cv_gnat_sigint=no
27528 fi
27529 rm -rf ./conftest* ./*~conftest*
27530
27531 fi
27532 echo "$as_me:27532: result: $cf_cv_gnat_sigint" >&5
27533 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
27534
27535 if test "$cf_cv_gnat_sigint" = yes ; then
27536         USE_GNAT_SIGINT=""
27537 else
27538         USE_GNAT_SIGINT="#"
27539 fi
27540
27541 cf_gnat_libraries=no
27542 cf_gnat_projects=no
27543
27544 if test "$enable_gnat_projects" != no ; then
27545 echo "$as_me:27545: checking if GNAT supports project files" >&5
27546 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
27547 case "$cf_cv_gnat_version" in
27548 (3.[0-9]*)
27549         ;;
27550 (*)
27551         case "$cf_cv_system_name" in
27552         (cygwin*|msys*)
27553                 ;;
27554         (*)
27555                 rm -rf ./conftest* ./*~conftest*
27556                 if mkdir conftest.src conftest.bin conftest.lib
27557                 then
27558                         cd conftest.src
27559                         rm -rf ./conftest* ./*~conftest*
27560                         cat >>library.gpr <<CF_EOF
27561 project Library is
27562   Kind := External ("LIB_KIND");
27563   for Library_Name use "ConfTest";
27564   for Object_Dir use ".";
27565   for Library_ALI_Dir use External("LIBRARY_DIR");
27566   for Library_Version use External ("SONAME");
27567   for Library_Kind use Kind;
27568   for Library_Dir use External("BUILD_DIR");
27569   Source_Dir := External ("SOURCE_DIR");
27570   for Source_Dirs use (Source_Dir);
27571 end Library;
27572 CF_EOF
27573                         cat >>confpackage.ads <<CF_EOF
27574 package ConfPackage is
27575    procedure conftest;
27576 end ConfPackage;
27577 CF_EOF
27578                         cat >>confpackage.adb <<CF_EOF
27579 with Text_IO;
27580 package body ConfPackage is
27581    procedure conftest is
27582    begin
27583       Text_IO.Put ("Hello World");
27584       Text_IO.New_Line;
27585    end conftest;
27586 end ConfPackage;
27587 CF_EOF
27588                         if ( "$cf_ada_make" $ADAFLAGS \
27589                                         -Plibrary.gpr \
27590                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
27591                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
27592                                         -XSOURCE_DIR="`pwd`" \
27593                                         -XSONAME=libConfTest.so.1 \
27594                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
27595                                 cf_gnat_projects=yes
27596                         fi
27597                         cd ..
27598                 fi
27599                 if test -f conftest.lib/confpackage.ali
27600                 then
27601                         cf_gnat_libraries=yes
27602                 fi
27603                 rm -rf ./conftest* ./*~conftest*
27604                 ;;
27605         esac
27606         ;;
27607 esac
27608 echo "$as_me:27608: result: $cf_gnat_projects" >&5
27609 echo "${ECHO_T}$cf_gnat_projects" >&6
27610 fi # enable_gnat_projects
27611
27612 if test "$cf_gnat_projects" = yes
27613 then
27614         echo "$as_me:27614: checking if GNAT supports libraries" >&5
27615 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
27616         echo "$as_me:27616: result: $cf_gnat_libraries" >&5
27617 echo "${ECHO_T}$cf_gnat_libraries" >&6
27618 fi
27619
27620 USE_OLD_MAKERULES=""
27621 USE_GNAT_PROJECTS="#"
27622 USE_GNAT_MAKE_GPR="#"
27623 USE_GNAT_GPRBUILD="#"
27624
27625 if test "$cf_gnat_projects" = yes
27626 then
27627         USE_OLD_MAKERULES="#"
27628         USE_GNAT_PROJECTS=""
27629         if test "$cf_cv_VERSION_GPRBUILD" != no
27630         then
27631                 USE_GNAT_GPRBUILD=""
27632         elif test "$cf_cv_VERSION_GNATMAKE" != no
27633         then
27634                 USE_GNAT_MAKE_GPR=""
27635         else
27636                 { echo "$as_me:27636: WARNING: use old makefile rules since tools are missing" >&5
27637 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
27638         fi
27639 fi
27640
27641 if test "$cf_gnat_libraries" = yes
27642 then
27643         USE_GNAT_LIBRARIES=""
27644 else
27645         USE_GNAT_LIBRARIES="#"
27646 fi
27647
27648 echo "$as_me:27648: checking for ada-compiler" >&5
27649 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
27650
27651 # Check whether --with-ada-compiler or --without-ada-compiler was given.
27652 if test "${with_ada_compiler+set}" = set; then
27653   withval="$with_ada_compiler"
27654   cf_ada_compiler=$withval
27655 else
27656   cf_ada_compiler=gnatmake
27657 fi;
27658
27659 echo "$as_me:27659: result: $cf_ada_compiler" >&5
27660 echo "${ECHO_T}$cf_ada_compiler" >&6
27661
27662                         cf_ada_package=terminal_interface
27663
27664 echo "$as_me:27664: checking for ada-include" >&5
27665 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
27666
27667 # Check whether --with-ada-include or --without-ada-include was given.
27668 if test "${with_ada_include+set}" = set; then
27669   withval="$with_ada_include"
27670
27671 else
27672   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
27673 fi; if test -n "$prefix/share/ada/adainclude" ; then
27674
27675 if test "x$prefix" != xNONE; then
27676         cf_path_syntax="$prefix"
27677 else
27678         cf_path_syntax="$ac_default_prefix"
27679 fi
27680
27681 case ".$withval" in
27682 (.\$\(*\)*|.\'*\'*)
27683         ;;
27684 (..|./*|.\\*)
27685         ;;
27686 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27687         ;;
27688 (.\$\{*prefix\}*|.\$\{*dir\}*)
27689         eval withval="$withval"
27690         case ".$withval" in
27691         (.NONE/*)
27692                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27693                 ;;
27694         esac
27695         ;;
27696 (.no|.NONE/*)
27697         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27698         ;;
27699 (*)
27700         { { echo "$as_me:27700: error: expected a pathname, not \"$withval\"" >&5
27701 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27702    { (exit 1); exit 1; }; }
27703         ;;
27704 esac
27705
27706 fi
27707 eval ADA_INCLUDE="$withval"
27708
27709 echo "$as_me:27709: result: $ADA_INCLUDE" >&5
27710 echo "${ECHO_T}$ADA_INCLUDE" >&6
27711
27712 echo "$as_me:27712: checking for ada-objects" >&5
27713 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
27714
27715 # Check whether --with-ada-objects or --without-ada-objects was given.
27716 if test "${with_ada_objects+set}" = set; then
27717   withval="$with_ada_objects"
27718
27719 else
27720   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
27721 fi; if test -n "$prefix/lib/ada/adalib" ; then
27722
27723 if test "x$prefix" != xNONE; then
27724         cf_path_syntax="$prefix"
27725 else
27726         cf_path_syntax="$ac_default_prefix"
27727 fi
27728
27729 case ".$withval" in
27730 (.\$\(*\)*|.\'*\'*)
27731         ;;
27732 (..|./*|.\\*)
27733         ;;
27734 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27735         ;;
27736 (.\$\{*prefix\}*|.\$\{*dir\}*)
27737         eval withval="$withval"
27738         case ".$withval" in
27739         (.NONE/*)
27740                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27741                 ;;
27742         esac
27743         ;;
27744 (.no|.NONE/*)
27745         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27746         ;;
27747 (*)
27748         { { echo "$as_me:27748: error: expected a pathname, not \"$withval\"" >&5
27749 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27750    { (exit 1); exit 1; }; }
27751         ;;
27752 esac
27753
27754 fi
27755 eval ADA_OBJECTS="$withval"
27756
27757 echo "$as_me:27757: result: $ADA_OBJECTS" >&5
27758 echo "${ECHO_T}$ADA_OBJECTS" >&6
27759
27760 echo "$as_me:27760: checking if an Ada95 shared-library should be built" >&5
27761 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
27762
27763 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
27764 if test "${with_ada_sharedlib+set}" = set; then
27765   withval="$with_ada_sharedlib"
27766   with_ada_sharedlib=$withval
27767 else
27768   with_ada_sharedlib=no
27769 fi;
27770 echo "$as_me:27770: result: $with_ada_sharedlib" >&5
27771 echo "${ECHO_T}$with_ada_sharedlib" >&6
27772
27773 if test "x$with_ada_sharedlib" != xno
27774 then
27775         if test "x$cf_gnat_projects" != xyes
27776         then
27777                 { echo "$as_me:27777: WARNING: disabling shared-library since GNAT projects are not supported" >&5
27778 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
27779                 with_ada_sharedlib=no
27780         fi
27781 fi
27782
27783 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
27784 MAKE_ADA_SHAREDLIB="#"
27785
27786 if test "x$with_ada_sharedlib" != xno
27787 then
27788         MAKE_ADA_SHAREDLIB=
27789         if test "x$with_ada_sharedlib" != xyes
27790         then
27791                 ADA_SHAREDLIB="$with_ada_sharedlib"
27792         fi
27793 fi
27794
27795                         # allow the Ada binding to be renamed
27796
27797 echo "$as_me:27797: checking for ada-libname" >&5
27798 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
27799
27800 # Check whether --with-ada-libname or --without-ada-libname was given.
27801 if test "${with_ada_libname+set}" = set; then
27802   withval="$with_ada_libname"
27803   ADA_LIBNAME=$withval
27804 else
27805   ADA_LIBNAME=AdaCurses
27806 fi;
27807 case "x$ADA_LIBNAME" in
27808 (x|xyes|xno)
27809         ADA_LIBNAME=AdaCurses
27810         ;;
27811 esac
27812
27813 echo "$as_me:27813: result: $ADA_LIBNAME" >&5
27814 echo "${ECHO_T}$ADA_LIBNAME" >&6
27815
27816                 fi
27817         fi
27818 else
27819         cf_with_ada=no
27820 fi
27821
27822 # do this "late" to avoid conflict with header-checks
27823 if test "x$with_widec" = xyes ; then
27824         echo "$as_me:27824: checking for wchar_t" >&5
27825 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
27826 if test "${ac_cv_type_wchar_t+set}" = set; then
27827   echo $ECHO_N "(cached) $ECHO_C" >&6
27828 else
27829   cat >"conftest.$ac_ext" <<_ACEOF
27830 #line 27830 "configure"
27831 #include "confdefs.h"
27832 $ac_includes_default
27833 int
27834 main (void)
27835 {
27836 if ((wchar_t *) 0)
27837   return 0;
27838 if (sizeof (wchar_t))
27839   return 0;
27840   ;
27841   return 0;
27842 }
27843 _ACEOF
27844 rm -f "conftest.$ac_objext"
27845 if { (eval echo "$as_me:27845: \"$ac_compile\"") >&5
27846   (eval $ac_compile) 2>&5
27847   ac_status=$?
27848   echo "$as_me:27848: \$? = $ac_status" >&5
27849   (exit "$ac_status"); } &&
27850          { ac_try='test -s "conftest.$ac_objext"'
27851   { (eval echo "$as_me:27851: \"$ac_try\"") >&5
27852   (eval $ac_try) 2>&5
27853   ac_status=$?
27854   echo "$as_me:27854: \$? = $ac_status" >&5
27855   (exit "$ac_status"); }; }; then
27856   ac_cv_type_wchar_t=yes
27857 else
27858   echo "$as_me: failed program was:" >&5
27859 cat "conftest.$ac_ext" >&5
27860 ac_cv_type_wchar_t=no
27861 fi
27862 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27863 fi
27864 echo "$as_me:27864: result: $ac_cv_type_wchar_t" >&5
27865 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
27866
27867 echo "$as_me:27867: checking size of wchar_t" >&5
27868 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
27869 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
27870   echo $ECHO_N "(cached) $ECHO_C" >&6
27871 else
27872   if test "$ac_cv_type_wchar_t" = yes; then
27873   if test "$cross_compiling" = yes; then
27874   # Depending upon the size, compute the lo and hi bounds.
27875 cat >"conftest.$ac_ext" <<_ACEOF
27876 #line 27876 "configure"
27877 #include "confdefs.h"
27878 $ac_includes_default
27879 int
27880 main (void)
27881 {
27882 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
27883   ;
27884   return 0;
27885 }
27886 _ACEOF
27887 rm -f "conftest.$ac_objext"
27888 if { (eval echo "$as_me:27888: \"$ac_compile\"") >&5
27889   (eval $ac_compile) 2>&5
27890   ac_status=$?
27891   echo "$as_me:27891: \$? = $ac_status" >&5
27892   (exit "$ac_status"); } &&
27893          { ac_try='test -s "conftest.$ac_objext"'
27894   { (eval echo "$as_me:27894: \"$ac_try\"") >&5
27895   (eval $ac_try) 2>&5
27896   ac_status=$?
27897   echo "$as_me:27897: \$? = $ac_status" >&5
27898   (exit "$ac_status"); }; }; then
27899   ac_lo=0 ac_mid=0
27900   while :; do
27901     cat >"conftest.$ac_ext" <<_ACEOF
27902 #line 27902 "configure"
27903 #include "confdefs.h"
27904 $ac_includes_default
27905 int
27906 main (void)
27907 {
27908 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27909   ;
27910   return 0;
27911 }
27912 _ACEOF
27913 rm -f "conftest.$ac_objext"
27914 if { (eval echo "$as_me:27914: \"$ac_compile\"") >&5
27915   (eval $ac_compile) 2>&5
27916   ac_status=$?
27917   echo "$as_me:27917: \$? = $ac_status" >&5
27918   (exit "$ac_status"); } &&
27919          { ac_try='test -s "conftest.$ac_objext"'
27920   { (eval echo "$as_me:27920: \"$ac_try\"") >&5
27921   (eval $ac_try) 2>&5
27922   ac_status=$?
27923   echo "$as_me:27923: \$? = $ac_status" >&5
27924   (exit "$ac_status"); }; }; then
27925   ac_hi=$ac_mid; break
27926 else
27927   echo "$as_me: failed program was:" >&5
27928 cat "conftest.$ac_ext" >&5
27929 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27930 fi
27931 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27932   done
27933 else
27934   echo "$as_me: failed program was:" >&5
27935 cat "conftest.$ac_ext" >&5
27936 ac_hi=-1 ac_mid=-1
27937   while :; do
27938     cat >"conftest.$ac_ext" <<_ACEOF
27939 #line 27939 "configure"
27940 #include "confdefs.h"
27941 $ac_includes_default
27942 int
27943 main (void)
27944 {
27945 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
27946   ;
27947   return 0;
27948 }
27949 _ACEOF
27950 rm -f "conftest.$ac_objext"
27951 if { (eval echo "$as_me:27951: \"$ac_compile\"") >&5
27952   (eval $ac_compile) 2>&5
27953   ac_status=$?
27954   echo "$as_me:27954: \$? = $ac_status" >&5
27955   (exit "$ac_status"); } &&
27956          { ac_try='test -s "conftest.$ac_objext"'
27957   { (eval echo "$as_me:27957: \"$ac_try\"") >&5
27958   (eval $ac_try) 2>&5
27959   ac_status=$?
27960   echo "$as_me:27960: \$? = $ac_status" >&5
27961   (exit "$ac_status"); }; }; then
27962   ac_lo=$ac_mid; break
27963 else
27964   echo "$as_me: failed program was:" >&5
27965 cat "conftest.$ac_ext" >&5
27966 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27967 fi
27968 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27969   done
27970 fi
27971 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27972 # Binary search between lo and hi bounds.
27973 while test "x$ac_lo" != "x$ac_hi"; do
27974   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27975   cat >"conftest.$ac_ext" <<_ACEOF
27976 #line 27976 "configure"
27977 #include "confdefs.h"
27978 $ac_includes_default
27979 int
27980 main (void)
27981 {
27982 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27983   ;
27984   return 0;
27985 }
27986 _ACEOF
27987 rm -f "conftest.$ac_objext"
27988 if { (eval echo "$as_me:27988: \"$ac_compile\"") >&5
27989   (eval $ac_compile) 2>&5
27990   ac_status=$?
27991   echo "$as_me:27991: \$? = $ac_status" >&5
27992   (exit "$ac_status"); } &&
27993          { ac_try='test -s "conftest.$ac_objext"'
27994   { (eval echo "$as_me:27994: \"$ac_try\"") >&5
27995   (eval $ac_try) 2>&5
27996   ac_status=$?
27997   echo "$as_me:27997: \$? = $ac_status" >&5
27998   (exit "$ac_status"); }; }; then
27999   ac_hi=$ac_mid
28000 else
28001   echo "$as_me: failed program was:" >&5
28002 cat "conftest.$ac_ext" >&5
28003 ac_lo=`expr "$ac_mid" + 1`
28004 fi
28005 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28006 done
28007 ac_cv_sizeof_wchar_t=$ac_lo
28008 else
28009   if test "$cross_compiling" = yes; then
28010   { { echo "$as_me:28010: error: cannot run test program while cross compiling" >&5
28011 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
28012    { (exit 1); exit 1; }; }
28013 else
28014   cat >"conftest.$ac_ext" <<_ACEOF
28015 #line 28015 "configure"
28016 #include "confdefs.h"
28017 $ac_includes_default
28018 int
28019 main (void)
28020 {
28021 FILE *f = fopen ("conftest.val", "w");
28022 if (!f)
28023   $ac_main_return (1);
28024 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
28025 fclose (f);
28026   ;
28027   return 0;
28028 }
28029 _ACEOF
28030 rm -f "conftest$ac_exeext"
28031 if { (eval echo "$as_me:28031: \"$ac_link\"") >&5
28032   (eval $ac_link) 2>&5
28033   ac_status=$?
28034   echo "$as_me:28034: \$? = $ac_status" >&5
28035   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
28036   { (eval echo "$as_me:28036: \"$ac_try\"") >&5
28037   (eval $ac_try) 2>&5
28038   ac_status=$?
28039   echo "$as_me:28039: \$? = $ac_status" >&5
28040   (exit "$ac_status"); }; }; then
28041   ac_cv_sizeof_wchar_t=`cat conftest.val`
28042 else
28043   echo "$as_me: program exited with status $ac_status" >&5
28044 echo "$as_me: failed program was:" >&5
28045 cat "conftest.$ac_ext" >&5
28046 fi
28047 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
28048 fi
28049 fi
28050 rm -f conftest.val
28051 else
28052   ac_cv_sizeof_wchar_t=0
28053 fi
28054 fi
28055 echo "$as_me:28055: result: $ac_cv_sizeof_wchar_t" >&5
28056 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
28057 cat >>confdefs.h <<EOF
28058 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
28059 EOF
28060
28061         # cross-compiling to mingw can run into the problem that attempting to
28062         # link with the regex library fails, causing the test to not set this to
28063         # a number.  "recent" autoconf does not address this problem either -TD
28064         if test -z "$ac_cv_sizeof_wchar_t"
28065         then
28066                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
28067
28068 echo "${as_me:-configure}:28068: testing test failed (assume 2) ..." 1>&5
28069
28070                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
28071                 mv confdefs.tmp confdefs.h
28072                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
28073         fi
28074 fi
28075
28076 ### Construct the ncurses library-subsets, if any, from this set of keywords:
28077 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
28078 ###
28079 ### ticlib modules may be a separate library, otherwise contained in termlib.
28080 ### termlib modules may be a separate library, otherwise contained in ncurses.
28081 ###
28082 ### The of "+" or " " between the tokens controls the way the script
28083 ### chooses to split module lists into libraries.
28084 ###
28085 ### (see CF_LIB_RULES).
28086 echo "$as_me:28086: checking for library subsets" >&5
28087 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
28088 LIB_SUBSETS=
28089
28090 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
28091         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
28092         if test "$with_ticlib" != no ; then
28093                 LIB_SUBSETS="${LIB_SUBSETS} "
28094         else
28095                 LIB_SUBSETS="${LIB_SUBSETS}+"
28096         fi
28097 fi
28098
28099 LIB_SUBSETS="${LIB_SUBSETS}termlib"
28100 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
28101
28102 if test "$with_termlib" != no ; then
28103         LIB_SUBSETS="${LIB_SUBSETS} "
28104 else
28105         LIB_SUBSETS="${LIB_SUBSETS}+"
28106 fi
28107
28108 LIB_SUBSETS="${LIB_SUBSETS}base"
28109
28110 # Most term-driver calls are to tinfo, but some like init_pair are to the
28111 # base library (so it resides in base).
28112 if test "$with_term_driver" != no ; then
28113         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
28114         case "$cf_cv_system_name" in
28115         (*mingw32*|*mingw64*)
28116                 if test "x$with_exp_win32" = xyes ; then
28117                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
28118                 else
28119                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
28120                 fi
28121                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
28122                 ;;
28123         (*)
28124                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
28125                 ;;
28126         esac
28127 elif test "x$with_exp_win32" = xyes ; then
28128         case "$cf_cv_system_name" in
28129         (*mingw32*|*mingw64*)
28130                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
28131                 ;;
28132         (*)
28133                 ;;
28134         esac
28135 fi
28136
28137 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
28138 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
28139
28140 echo "$as_me:28140: result: $LIB_SUBSETS" >&5
28141 echo "${ECHO_T}$LIB_SUBSETS" >&6
28142
28143 ### Construct the list of include-directories to be generated
28144
28145 if test "$srcdir" != "."; then
28146         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
28147 fi
28148 CPPFLAGS="-I../include $CPPFLAGS"
28149 if test "$srcdir" != "."; then
28150         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
28151 fi
28152 CPPFLAGS="-I. $CPPFLAGS"
28153
28154 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
28155 if test "$srcdir" != "."; then
28156         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
28157 fi
28158 if test "$GCC" != yes; then
28159         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28160 elif test "$includedir" != "/usr/include"; then
28161         if test "$includedir" = '${prefix}/include' ; then
28162                 if test x$prefix != x/usr ; then
28163                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28164                 fi
28165         else
28166                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28167         fi
28168 fi
28169
28170 ### Build up pieces for makefile rules
28171 echo "$as_me:28171: checking default library suffix" >&5
28172 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
28173
28174         case $DFT_LWR_MODEL in
28175         (libtool) DFT_ARG_SUFFIX=''   ;;
28176         (normal)  DFT_ARG_SUFFIX=''   ;;
28177         (debug)   DFT_ARG_SUFFIX='_g' ;;
28178         (profile) DFT_ARG_SUFFIX='_p' ;;
28179         (shared)  DFT_ARG_SUFFIX=''   ;;
28180         esac
28181         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
28182 echo "$as_me:28182: result: $DFT_ARG_SUFFIX" >&5
28183 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
28184
28185 echo "$as_me:28185: checking default library-dependency suffix" >&5
28186 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
28187
28188         case X$DFT_LWR_MODEL in
28189         (Xlibtool)
28190                 DFT_LIB_SUFFIX='.la'
28191                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28192                 ;;
28193         (Xdebug)
28194                 case "$cf_cv_system_name" in
28195                 (*-msvc*)
28196                         DFT_LIB_SUFFIX='_g.lib'
28197                         ;;
28198                 (*)
28199                         DFT_LIB_SUFFIX='_g.a'
28200                         ;;
28201                 esac
28202                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28203                 ;;
28204         (Xprofile)
28205                 case "$cf_cv_system_name" in
28206                 (*-msvc*)
28207                         DFT_LIB_SUFFIX='_p.lib'
28208                         ;;
28209                 (*)
28210                         DFT_LIB_SUFFIX='_p.a'
28211                         ;;
28212                 esac
28213                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28214                 ;;
28215         (Xshared)
28216                 case "$cf_cv_system_name" in
28217                 (aix[5-7]*)
28218                         DFT_LIB_SUFFIX='.so'
28219                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28220                         ;;
28221                 (*-msvc*)
28222                         DFT_LIB_SUFFIX='.dll'
28223                         DFT_DEP_SUFFIX='.dll.lib'
28224                         ;;
28225                 (cygwin*|msys*|mingw*)
28226                         DFT_LIB_SUFFIX='.dll'
28227                         DFT_DEP_SUFFIX='.dll.a'
28228                         ;;
28229                 (darwin*)
28230                         DFT_LIB_SUFFIX='.dylib'
28231                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28232                         ;;
28233                 (hpux*)
28234                         case "$target" in
28235                         (ia64*)
28236                                 DFT_LIB_SUFFIX='.so'
28237                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28238                                 ;;
28239                         (*)
28240                                 DFT_LIB_SUFFIX='.sl'
28241                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28242                                 ;;
28243                         esac
28244                         ;;
28245                 (*)
28246                         DFT_LIB_SUFFIX='.so'
28247                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28248                         ;;
28249                 esac
28250                 ;;
28251         (*)
28252                 case "$target" in
28253                 (*-msvc*)
28254                         DFT_LIB_SUFFIX='.lib'
28255                         ;;
28256                 (*)
28257                         DFT_LIB_SUFFIX='.a'
28258                         ;;
28259                 esac
28260                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28261                 ;;
28262         esac
28263         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28264         then
28265                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
28266                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
28267         fi
28268 echo "$as_me:28268: result: $DFT_DEP_SUFFIX" >&5
28269 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
28270
28271 echo "$as_me:28271: checking default object directory" >&5
28272 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
28273
28274         case $DFT_LWR_MODEL in
28275         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
28276         (normal)  DFT_OBJ_SUBDIR='objects' ;;
28277         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
28278         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
28279         (shared)
28280                 case "$cf_cv_system_name" in
28281                 (cygwin|msys)
28282                         DFT_OBJ_SUBDIR='objects' ;;
28283                 (*)
28284                         DFT_OBJ_SUBDIR='obj_s' ;;
28285                 esac
28286         esac
28287 echo "$as_me:28287: result: $DFT_OBJ_SUBDIR" >&5
28288 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
28289
28290 if test "x$cf_with_cxx" = xyes ; then
28291 echo "$as_me:28291: checking c++ library-dependency suffix" >&5
28292 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
28293 if test "$with_libtool" != "no"; then
28294         # libtool thinks it can make c++ shared libraries (perhaps only g++)
28295         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28296 elif test "$with_shared_cxx" != "no"; then
28297         # also for g++ users...
28298         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28299 else
28300         # we normally make a static library because C/C++ library rules differ
28301
28302         case Xnormal in
28303         (Xlibtool)
28304                 CXX_LIB_SUFFIX='.la'
28305                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28306                 ;;
28307         (Xdebug)
28308                 case "$cf_cv_system_name" in
28309                 (*-msvc*)
28310                         CXX_LIB_SUFFIX='_g.lib'
28311                         ;;
28312                 (*)
28313                         CXX_LIB_SUFFIX='_g.a'
28314                         ;;
28315                 esac
28316                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28317                 ;;
28318         (Xprofile)
28319                 case "$cf_cv_system_name" in
28320                 (*-msvc*)
28321                         CXX_LIB_SUFFIX='_p.lib'
28322                         ;;
28323                 (*)
28324                         CXX_LIB_SUFFIX='_p.a'
28325                         ;;
28326                 esac
28327                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28328                 ;;
28329         (Xshared)
28330                 case "$cf_cv_system_name" in
28331                 (aix[5-7]*)
28332                         CXX_LIB_SUFFIX='.so'
28333                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28334                         ;;
28335                 (*-msvc*)
28336                         CXX_LIB_SUFFIX='.dll'
28337                         CXX_DEP_SUFFIX='.dll.lib'
28338                         ;;
28339                 (cygwin*|msys*|mingw*)
28340                         CXX_LIB_SUFFIX='.dll'
28341                         CXX_DEP_SUFFIX='.dll.a'
28342                         ;;
28343                 (darwin*)
28344                         CXX_LIB_SUFFIX='.dylib'
28345                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28346                         ;;
28347                 (hpux*)
28348                         case "$target" in
28349                         (ia64*)
28350                                 CXX_LIB_SUFFIX='.so'
28351                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28352                                 ;;
28353                         (*)
28354                                 CXX_LIB_SUFFIX='.sl'
28355                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28356                                 ;;
28357                         esac
28358                         ;;
28359                 (*)
28360                         CXX_LIB_SUFFIX='.so'
28361                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28362                         ;;
28363                 esac
28364                 ;;
28365         (*)
28366                 case "$target" in
28367                 (*-msvc*)
28368                         CXX_LIB_SUFFIX='.lib'
28369                         ;;
28370                 (*)
28371                         CXX_LIB_SUFFIX='.a'
28372                         ;;
28373                 esac
28374                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28375                 ;;
28376         esac
28377         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28378         then
28379                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
28380                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
28381         fi
28382
28383 fi
28384 echo "$as_me:28384: result: $CXX_LIB_SUFFIX" >&5
28385 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
28386
28387 fi
28388
28389 # do not want -ldl in build except as needed for -lncurses dependency
28390 if test "x$with_dlsym" = xyes ; then
28391 if test "$DFT_LWR_MODEL" = shared || \
28392    test "$DFT_LWR_MODEL" = libtool ; then
28393
28394 # remove dl library from $LIBS
28395 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
28396
28397 fi
28398 fi
28399 ### Set up low-level terminfo dependencies for makefiles.
28400
28401 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
28402 # do not need libdl
28403 TICS_LIST=
28404 if test "x$with_dlsym" = xyes ; then
28405
28406 # remove dl library from $SHLIB_LIST
28407 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
28408
28409 fi
28410
28411 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
28412 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
28413 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
28414 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
28415 then
28416         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
28417 fi
28418
28419 if test "$with_ticlib" != no ; then
28420
28421         if test "x$with_ticlib" != xyes ; then
28422                 TICS_NAME=$with_ticlib
28423                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28424                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28425                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28426                 TICS_LIB_SUFFIX="${with_ticlib}"
28427         else
28428                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
28429                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
28430                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
28431                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
28432         fi
28433         TICS_LDFLAGS="-L${LIB_DIR}"
28434         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
28435 else
28436         TICS_SUFFIX=${DFT_LIB_SUFFIX}
28437         TICS_LDFLAGS="-L${LIB_DIR}"
28438         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28439 fi
28440
28441 if test "$with_termlib" != no ; then
28442
28443         if test "x$with_termlib" != xyes ; then
28444                 TINFO_NAME=$with_termlib
28445                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28446                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28447                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28448                 TINFO_LIB_SUFFIX="${with_termlib}"
28449         else
28450                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28451                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
28452                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
28453                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
28454         fi
28455
28456         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28457         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28458         if test "$DFT_LWR_MODEL" = "libtool"; then
28459                 TEST_ARGS="${TEST_DEPS}"
28460                 TEST_ARG2="${TEST_DEP2}"
28461                 TINFO_LDFLAGS="-L${LIB_DIR}"
28462                 TINFO_LIBS="$TEST_ARGS"
28463                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
28464                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
28465         else
28466                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
28467                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
28468                 if test "x$with_term_driver" != xno ; then
28469                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28470                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
28471                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28472                 else
28473                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28474                         TINFO_LIBS="$TEST_ARGS"
28475                 fi
28476                 TINFO_LDFLAGS="-L${LIB_DIR}"
28477                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28478         fi
28479 else
28480         # the next lines are needed for linking libtic over libncurses
28481         TINFO_NAME=${LIB_NAME}
28482         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28483         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
28484         if test "x$with_tic_depends" = xyes ; then
28485                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28486         else
28487                 TICS_LIST="$SHLIB_LIST"
28488         fi
28489
28490         TINFO_LDFLAGS="-L${LIB_DIR}"
28491         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28492 fi
28493
28494 if test "$DFT_LWR_MODEL" = shared ; then
28495         case "$cf_cv_system_name" in
28496         (cygwin*|msys*)
28497                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
28498                 TINFO_SUFFIX=.dll
28499                 ;;
28500         esac
28501 fi
28502
28503 if test "x$with_dlsym" = xyes ; then
28504
28505 # remove dl library from $TICS_LIST
28506 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
28507
28508 fi
28509
28510 if test "$DFT_LWR_MODEL" = "libtool"; then
28511         OBJEXT=lo
28512 fi
28513
28514 # needed for Ada95
28515 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
28516
28517 case "$DFT_LWR_MODEL" in
28518 (normal|debug|profile)
28519
28520 if test "$GCC" = yes ; then
28521         case "$cf_cv_system_name" in
28522         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
28523                 LDFLAGS_STATIC=
28524                 LDFLAGS_SHARED=
28525                 ;;
28526         (*)     # normally, except when broken
28527                 LDFLAGS_STATIC=-static
28528                 LDFLAGS_SHARED=-dynamic
28529                 ;;
28530         esac
28531 else
28532         case "$cf_cv_system_name" in
28533         (aix[4-7]*)     # from ld manpage
28534                 LDFLAGS_STATIC=-bstatic
28535                 LDFLAGS_SHARED=-bdynamic
28536                 ;;
28537         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
28538                 # We could also use just "archive" and "shared".
28539                 LDFLAGS_STATIC=-Wl,-a,archive_shared
28540                 LDFLAGS_SHARED=-Wl,-a,shared_archive
28541                 ;;
28542         (irix*)         # from ld manpage IRIX64
28543                 LDFLAGS_STATIC=-Bstatic
28544                 LDFLAGS_SHARED=-Bdynamic
28545                 ;;
28546         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
28547                 # alternative "-oldstyle_liblookup" (not in cc manpage)
28548                 LDFLAGS_STATIC=-noso
28549                 LDFLAGS_SHARED=-so_archive
28550                 ;;
28551         (solaris2*)
28552                 LDFLAGS_STATIC=-Bstatic
28553                 LDFLAGS_SHARED=-Bdynamic
28554                 ;;
28555         esac
28556 fi
28557
28558 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
28559 then
28560         echo "$as_me:28560: checking if linker supports switching between static/dynamic" >&5
28561 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
28562
28563         rm -f libconftest.a
28564         cat >conftest.$ac_ext <<EOF
28565 #line 28565 "configure"
28566 #include <stdio.h>
28567 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
28568 EOF
28569         if { (eval echo "$as_me:28569: \"$ac_compile\"") >&5
28570   (eval $ac_compile) 2>&5
28571   ac_status=$?
28572   echo "$as_me:28572: \$? = $ac_status" >&5
28573   (exit "$ac_status"); } ; then
28574                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
28575                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
28576         fi
28577         rm -f conftest.*
28578
28579         cf_save_LIBS="$LIBS"
28580
28581         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
28582         cat >"conftest.$ac_ext" <<_ACEOF
28583 #line 28583 "configure"
28584 #include "confdefs.h"
28585
28586 #line 28586 "configure"
28587 #include <stdio.h>
28588 int cf_ldflags_static(FILE *fp);
28589
28590 int
28591 main (void)
28592 {
28593
28594         return cf_ldflags_static(stdin);
28595
28596   ;
28597   return 0;
28598 }
28599 _ACEOF
28600 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28601 if { (eval echo "$as_me:28601: \"$ac_link\"") >&5
28602   (eval $ac_link) 2>&5
28603   ac_status=$?
28604   echo "$as_me:28604: \$? = $ac_status" >&5
28605   (exit "$ac_status"); } &&
28606          { ac_try='test -s "conftest$ac_exeext"'
28607   { (eval echo "$as_me:28607: \"$ac_try\"") >&5
28608   (eval $ac_try) 2>&5
28609   ac_status=$?
28610   echo "$as_me:28610: \$? = $ac_status" >&5
28611   (exit "$ac_status"); }; }; then
28612
28613         # some linkers simply ignore the -dynamic
28614         case x`file "conftest$ac_exeext" 2>/dev/null` in
28615         (*static*)
28616                 cf_ldflags_static=no
28617                 ;;
28618         (*)
28619                 cf_ldflags_static=yes
28620                 ;;
28621         esac
28622
28623 else
28624   echo "$as_me: failed program was:" >&5
28625 cat "conftest.$ac_ext" >&5
28626 cf_ldflags_static=no
28627 fi
28628 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28629
28630         rm -f libconftest.*
28631         LIBS="$cf_save_LIBS"
28632
28633         echo "$as_me:28633: result: $cf_ldflags_static" >&5
28634 echo "${ECHO_T}$cf_ldflags_static" >&6
28635
28636         if test "$cf_ldflags_static" != yes
28637         then
28638                 LDFLAGS_STATIC=
28639                 LDFLAGS_SHARED=
28640         fi
28641 else
28642         LDFLAGS_STATIC=
28643         LDFLAGS_SHARED=
28644 fi
28645
28646         ;;
28647 esac
28648
28649 echo "$as_me:28649: checking where we will install curses.h" >&5
28650 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
28651
28652 includesubdir=
28653 if test "$with_overwrite" = no && \
28654  { test "x$includedir" = 'x${prefix}/include' || \
28655    test "x$includedir" = "x${prefix}/include"; }
28656 then
28657         includesubdir="/ncurses${USE_LIB_SUFFIX}"
28658 fi
28659 echo "$as_me:28659: result: ${includedir}${includesubdir}" >&5
28660 echo "${ECHO_T}${includedir}${includesubdir}" >&6
28661
28662 ### Resolve a conflict between normal and wide-curses by forcing applications
28663 ### that will need libutf8 to add it to their configure script.
28664 if test "$with_overwrite" != no ; then
28665 if test "$NCURSES_LIBUTF8" = 1 ; then
28666         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
28667         { echo "$as_me:28667: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
28668 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
28669 fi
28670 fi
28671 WITH_OVERWRITE=$with_overwrite
28672
28673 ### At least on MinGW a shared library build without libtool
28674 ### requires adding the additional libs to the link list.
28675 case "$cf_cv_system_name" in
28676 (*mingw32*|*mingw64*)
28677         if test "$DFT_LWR_MODEL" != "libtool"; then
28678            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
28679         fi
28680         ;;
28681 *)      ;;
28682 esac
28683
28684 # used to separate tack out of the tree
28685 NCURSES_TREE=
28686
28687 ### predefined stuff for the test programs
28688
28689 cat >>confdefs.h <<\EOF
28690 #define HAVE_SLK_COLOR 1
28691 EOF
28692
28693 # pkgsrc uses these
28694
28695 echo "$as_me:28695: checking for desired basename for form library" >&5
28696 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
28697
28698 # Check whether --with-form-libname or --without-form-libname was given.
28699 if test "${with_form_libname+set}" = set; then
28700   withval="$with_form_libname"
28701   with_lib_basename=$withval
28702 else
28703   with_lib_basename=form
28704 fi;
28705 FORM_NAME="$with_lib_basename"
28706
28707 case "x$FORM_NAME" in
28708 (x|xno|xnone|xyes)
28709         FORM_NAME=form
28710         ;;
28711 (*)
28712         ;;
28713 esac
28714
28715 echo "$as_me:28715: result: $FORM_NAME" >&5
28716 echo "${ECHO_T}$FORM_NAME" >&6
28717
28718 echo "$as_me:28718: checking for desired basename for menu library" >&5
28719 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
28720
28721 # Check whether --with-menu-libname or --without-menu-libname was given.
28722 if test "${with_menu_libname+set}" = set; then
28723   withval="$with_menu_libname"
28724   with_lib_basename=$withval
28725 else
28726   with_lib_basename=menu
28727 fi;
28728 MENU_NAME="$with_lib_basename"
28729
28730 case "x$MENU_NAME" in
28731 (x|xno|xnone|xyes)
28732         MENU_NAME=menu
28733         ;;
28734 (*)
28735         ;;
28736 esac
28737
28738 echo "$as_me:28738: result: $MENU_NAME" >&5
28739 echo "${ECHO_T}$MENU_NAME" >&6
28740
28741 echo "$as_me:28741: checking for desired basename for panel library" >&5
28742 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
28743
28744 # Check whether --with-panel-libname or --without-panel-libname was given.
28745 if test "${with_panel_libname+set}" = set; then
28746   withval="$with_panel_libname"
28747   with_lib_basename=$withval
28748 else
28749   with_lib_basename=panel
28750 fi;
28751 PANEL_NAME="$with_lib_basename"
28752
28753 case "x$PANEL_NAME" in
28754 (x|xno|xnone|xyes)
28755         PANEL_NAME=panel
28756         ;;
28757 (*)
28758         ;;
28759 esac
28760
28761 echo "$as_me:28761: result: $PANEL_NAME" >&5
28762 echo "${ECHO_T}$PANEL_NAME" >&6
28763
28764 echo "$as_me:28764: checking for desired basename for cxx library" >&5
28765 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
28766
28767 # Check whether --with-cxx-libname or --without-cxx-libname was given.
28768 if test "${with_cxx_libname+set}" = set; then
28769   withval="$with_cxx_libname"
28770   with_lib_basename=$withval
28771 else
28772   with_lib_basename=ncurses++
28773 fi;
28774 CXX_NAME="$with_lib_basename"
28775
28776 case "x$CXX_NAME" in
28777 (x|xno|xnone|xyes)
28778         CXX_NAME=ncurses++
28779         ;;
28780 (*)
28781         ;;
28782 esac
28783
28784 echo "$as_me:28784: result: $CXX_NAME" >&5
28785 echo "${ECHO_T}$CXX_NAME" >&6
28786
28787 ### Construct the list of subdirectories for which we'll customize makefiles
28788 ### with the appropriate compile-rules.
28789
28790 echo "$as_me:28790: checking for src modules" >&5
28791 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
28792
28793 # dependencies and linker-arguments for test-programs
28794 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
28795 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
28796 if test "$DFT_LWR_MODEL" = "libtool"; then
28797         TEST_ARGS="${TEST_DEPS}"
28798         TEST_ARG2="${TEST_DEP2}"
28799 else
28800         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28801         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
28802 fi
28803
28804 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
28805 cf_cv_src_modules=
28806 for cf_dir in $modules_to_build
28807 do
28808         if test -f "$srcdir/$cf_dir/modules" ; then
28809
28810                 # We may/may not have tack in the distribution, though the
28811                 # makefile is.
28812                 if test "$cf_dir" = tack ; then
28813                         if test "x$cf_with_tack" != "xyes"; then
28814                                 continue
28815                         fi
28816                 fi
28817
28818                 if test -z "$cf_cv_src_modules"; then
28819                         cf_cv_src_modules=$cf_dir
28820                 else
28821                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
28822                 fi
28823
28824                 # Make the ncurses_cfg.h file record the library interface files as
28825                 # well.  These are header files that are the same name as their
28826                 # directory.  Ncurses is the only library that does not follow
28827                 # that pattern.
28828                 if test "$cf_dir" = tack ; then
28829                         continue
28830                 elif test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
28831
28832 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28833
28834                         cat >>confdefs.h <<EOF
28835 #define HAVE_${cf_have_include}_H 1
28836 EOF
28837
28838                         cat >>confdefs.h <<EOF
28839 #define HAVE_LIB${cf_have_include} 1
28840 EOF
28841
28842 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28843
28844 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28845
28846                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28847                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
28848                         if test "$DFT_LWR_MODEL" = "libtool"; then
28849                                 TEST_ARGS="${TEST_DEPS}"
28850                                 TEST_ARG2="${TEST_DEP2}"
28851                         else
28852                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
28853                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
28854                         fi
28855                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
28856                 fi
28857         fi
28858 done
28859 echo "$as_me:28859: result: $cf_cv_src_modules" >&5
28860 echo "${ECHO_T}$cf_cv_src_modules" >&6
28861
28862 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
28863 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
28864
28865 SRC_SUBDIRS=
28866 if test "x$cf_with_manpages" != xno ; then
28867         SRC_SUBDIRS="$SRC_SUBDIRS man"
28868 fi
28869 SRC_SUBDIRS="$SRC_SUBDIRS include"
28870 for cf_dir in $cf_cv_src_modules
28871 do
28872         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
28873 done
28874 if test "x$cf_with_tests" != "xno" ; then
28875         SRC_SUBDIRS="$SRC_SUBDIRS test"
28876 fi
28877 # always make this, to install the ncurses-config script
28878 SRC_SUBDIRS="$SRC_SUBDIRS misc"
28879 if test "$cf_with_cxx_binding" != no; then
28880         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
28881         SRC_SUBDIRS="$SRC_SUBDIRS c++"
28882 fi
28883
28884 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
28885 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
28886
28887 ADA_SUBDIRS=
28888 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
28889         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
28890         ADA_SUBDIRS="gen src"
28891         if test "x$cf_with_tests" != "xno" ; then
28892                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
28893         fi
28894 fi
28895
28896 SUB_MAKEFILES=
28897 for cf_dir in $SRC_SUBDIRS
28898 do
28899         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
28900 done
28901
28902 if test -n "$ADA_SUBDIRS"; then
28903         for cf_dir in $ADA_SUBDIRS
28904         do
28905                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
28906         done
28907
28908 fi
28909
28910 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28911    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
28912    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
28913    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
28914 fi
28915
28916 DIRS_TO_MAKE="lib"
28917 for cf_item in $cf_list_models
28918 do
28919
28920         case $cf_item in
28921         (libtool) cf_subdir='obj_lo'  ;;
28922         (normal)  cf_subdir='objects' ;;
28923         (debug)   cf_subdir='obj_g' ;;
28924         (profile) cf_subdir='obj_p' ;;
28925         (shared)
28926                 case "$cf_cv_system_name" in
28927                 (cygwin|msys)
28928                         cf_subdir='objects' ;;
28929                 (*)
28930                         cf_subdir='obj_s' ;;
28931                 esac
28932         esac
28933
28934         for cf_item2 in $DIRS_TO_MAKE
28935         do
28936                 test "$cf_item2" = "$cf_subdir" && break
28937         done
28938         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
28939 done
28940 for cf_dir in $DIRS_TO_MAKE
28941 do
28942         test ! -d "$cf_dir" && mkdir "$cf_dir"
28943 done
28944
28945 # symbols that differ when compiling Ada95 by itself.
28946 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
28947
28948 # values to use as strings
28949
28950 cat >>confdefs.h <<EOF
28951 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
28952 EOF
28953
28954 cat >>confdefs.h <<EOF
28955 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
28956 EOF
28957
28958 ### Define substitutions for header files to avoid name-pollution
28959
28960 if test "x$cf_cv_have_tcgetattr" = xyes ; then
28961         HAVE_TCGETATTR=1
28962 else
28963         HAVE_TCGETATTR=0
28964 fi
28965
28966 if test "x$ac_cv_header_stdint_h" = xyes ; then
28967         HAVE_STDINT_H=1
28968 else
28969         HAVE_STDINT_H=0
28970 fi
28971
28972 if test "x$ac_cv_header_termio_h" = xyes ; then
28973         HAVE_TERMIO_H=1
28974 else
28975         HAVE_TERMIO_H=0
28976 fi
28977
28978 if test "x$ac_cv_header_termios_h" = xyes ; then
28979         HAVE_TERMIOS_H=1
28980 else
28981         HAVE_TERMIOS_H=0
28982 fi
28983
28984 ################################################################################
28985 test "x$use_database" = xyes && \
28986 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
28987
28988 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
28989 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
28990
28991 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
28992 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
28993 fi
28994
28995 if test "x$cf_with_tests" != xno ; then
28996         MAKE_TESTS=
28997 else
28998         MAKE_TESTS="#"
28999 fi
29000
29001 ADAHTML_DIR=../../doc/html/ada
29002
29003 # workaround for OS/2 (20151017)
29004 case "$cf_cv_system_name" in
29005 (os2*)
29006         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
29007         ;;
29008 (*)
29009         LIBTOOL_OPTS_CXX=
29010         ;;
29011 esac
29012
29013 # workaround for g++ versus Solaris (20131116)
29014 case "$cf_cv_system_name" in
29015 (solaris2*)
29016         case "x$CPPFLAGS" in
29017         (*-D_XOPEN_SOURCE_EXTENDED*)
29018                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
29019
29020 echo "${as_me:-configure}:29020: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
29021
29022                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
29023                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
29024                 ;;
29025         esac
29026         ;;
29027 esac
29028
29029 # Help to automatically enable the extended curses features when using either
29030 # the *-config or the ".pc" files by adding defines.
29031 echo "$as_me:29031: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
29032 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
29033 PKG_CFLAGS=
29034 for cf_loop1 in $CPPFLAGS_after_XOPEN
29035 do
29036         cf_found=no
29037         for cf_loop2 in $CPPFLAGS_before_XOPEN
29038         do
29039                 if test "x$cf_loop1" = "x$cf_loop2"
29040                 then
29041                         cf_found=yes
29042                         break
29043                 fi
29044         done
29045         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
29046 done
29047 echo "$as_me:29047: result: $PKG_CFLAGS" >&5
29048 echo "${ECHO_T}$PKG_CFLAGS" >&6
29049
29050 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
29051 case "x$NCURSES_OSPEED" in
29052 (*short*)
29053         cf_compatible=1
29054         ;;
29055 (*)
29056         cf_compatible=0
29057         ;;
29058 esac
29059
29060 cat >>confdefs.h <<EOF
29061 #define NCURSES_OSPEED_COMPAT $cf_compatible
29062 EOF
29063
29064 case "x$cf_cv_typeof_chtype" in
29065 (xshort|xint|xlong)
29066         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
29067         ;;
29068 esac
29069
29070 case "x$cf_cv_typeof_mmask_t" in
29071 (xshort|xint|xlong)
29072         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
29073         ;;
29074 esac
29075
29076 # substitute into misc/Makefile to suppress
29077 # (un)install.data from the
29078 # (un)install rules.
29079 if test "x$cf_with_db_install" = "xno"; then
29080         MISC_INSTALL_DATA=
29081         MISC_UNINSTALL_DATA=
29082 else
29083         MISC_INSTALL_DATA=install.data
29084         MISC_UNINSTALL_DATA=uninstall.data
29085 fi
29086
29087 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
29088         MAKE_DATABASE="#"
29089 else
29090         MAKE_DATABASE="$MAKE_TERMINFO"
29091 fi
29092
29093 if test -n "$PACKAGE"
29094 then
29095         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
29096         export PACKAGE
29097         echo "package: $PACKAGE"
29098 fi
29099
29100 UNALTERED_SYMS=
29101 cf_filter_syms=no
29102
29103 if test -n "$RESULTING_SYMS"
29104 then
29105         cf_filter_syms=$cf_dft_filter_syms
29106         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_default" 1>&6
29107
29108 echo "${as_me:-configure}:29108: testing will map symbols to ABI=$cf_cv_abi_default ..." 1>&5
29109
29110 fi
29111
29112 if test "x$WILDCARD_SYMS" = xno
29113 then
29114         cf_filter_syms=yes
29115 fi
29116
29117 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
29118
29119 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
29120 if test "$cf_filter_syms" = yes
29121 then
29122         RESULTING_SYMS=resulting.map
29123 fi
29124
29125 if test "x$cross_compiling" = xyes ; then
29126         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
29127         CHECK_BUILD="#"
29128 else
29129         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
29130         CHECK_BUILD=
29131 fi
29132
29133 # This is used for the *-config script and *.pc data files.
29134
29135 echo "$as_me:29135: checking for linker search path" >&5
29136 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
29137 if test "${cf_cv_ld_searchpath+set}" = set; then
29138   echo $ECHO_N "(cached) $ECHO_C" >&6
29139 else
29140
29141 if test "$cross_compiling" != yes ; then
29142
29143 # GNU binutils' ld does not involve permissions which may stop ldconfig.
29144 cf_pathlist=`${LD:-ld} --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
29145
29146 # The -NX options tell newer versions of Linux ldconfig to not attempt to
29147 # update the cache, which makes it run faster.
29148 test -z "$cf_pathlist" && \
29149         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
29150
29151 test -z "$cf_pathlist" &&
29152         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
29153
29154 # This works with OpenBSD 6.5, which lists only filenames
29155 test -z "$cf_pathlist" &&
29156         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
29157
29158 if test -z "$cf_pathlist"
29159 then
29160         # dyld default path with MacOS
29161         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
29162         then
29163                 # do this to bypass check
29164                 cf_cv_ld_searchpath='$HOME/lib'
29165                 cf_pathlist="/usr/local/lib /lib /usr/lib"
29166         fi
29167 fi
29168
29169 if test -z "$cf_pathlist"
29170 then
29171         # Solaris is "SunOS"
29172         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
29173         then
29174                 case x`(isainfo -b)` in
29175                 (x64)
29176                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
29177                         ;;
29178                 (x32)
29179                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
29180                         cf_pathlist="$cf_pathlist /lib /usr/lib"
29181                         ;;
29182                 (*)
29183                         { echo "$as_me:29183: WARNING: problem with Solaris architecture" >&5
29184 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
29185                         ;;
29186                 esac
29187         fi
29188 fi
29189
29190 if test -z "$cf_pathlist"
29191 then
29192         # HP-UX
29193         if test x"`uname -s`" = xHP-UX
29194         then
29195                 case x`getconf LONG_BIT` in
29196                 (x64)
29197                         cf_pathlist="/usr/lib/hpux64"
29198                         ;;
29199                 (x*)
29200                         cf_pathlist="/usr/lib/hpux32"
29201                         ;;
29202                 esac
29203         fi
29204 fi
29205
29206 fi
29207
29208 # If nothing else, assume it is conventional
29209 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
29210
29211 # Finally, check that this is only directories
29212 for cf_path in $0 $cf_pathlist
29213 do
29214         if test -d "$cf_path"; then
29215                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
29216                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
29217         fi
29218 done
29219
29220 # Ensure that it is nonempty
29221 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
29222
29223 fi
29224 echo "$as_me:29224: result: $cf_cv_ld_searchpath" >&5
29225 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
29226
29227 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
29228
29229 cat >>confdefs.h <<\EOF
29230 #define HAVE_CURSES_DATA_BOOLNAMES 1
29231 EOF
29232
29233 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"
29234 ac_config_commands="$ac_config_commands default"
29235 cat >confcache <<\_ACEOF
29236 # This file is a shell script that caches the results of configure
29237 # tests run on this system so they can be shared between configure
29238 # scripts and configure runs, see configure's option --config-cache.
29239 # It is not useful on other systems.  If it contains results you don't
29240 # want to keep, you may remove or edit it.
29241 #
29242 # config.status only pays attention to the cache file if you give it
29243 # the --recheck option to rerun configure.
29244 #
29245 # `ac_cv_env_foo' variables (set or unset) will be overriden when
29246 # loading this file, other *unset* `ac_cv_foo' will be assigned the
29247 # following values.
29248
29249 _ACEOF
29250
29251 # The following way of writing the cache mishandles newlines in values,
29252 # but we know of no workaround that is simple, portable, and efficient.
29253 # So, don't put newlines in cache variables' values.
29254 # Ultrix sh set writes to stderr and can't be redirected directly,
29255 # and sets the high bit in the cache file unless we assign to the vars.
29256 {
29257   (set) 2>&1 |
29258     case `(ac_space=' '; set | grep ac_space) 2>&1` in
29259     *ac_space=\ *)
29260       # `set' does not quote correctly, so add quotes (double-quote
29261       # substitution turns \\\\ into \\, and sed turns \\ into \).
29262       sed -n \
29263         "s/'/'\\\\''/g;
29264           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29265       ;;
29266     *)
29267       # `set' quotes correctly as required by POSIX, so do not add quotes.
29268       sed -n \
29269         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
29270       ;;
29271     esac;
29272 } |
29273   sed '
29274      t clear
29275      : clear
29276      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29277      t end
29278      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29279      : end' >>confcache
29280 if cmp -s $cache_file confcache; then :; else
29281   if test -w $cache_file; then
29282     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
29283     cat confcache >$cache_file
29284   else
29285     echo "not updating unwritable cache $cache_file"
29286   fi
29287 fi
29288 rm -f confcache
29289
29290 test "x$prefix" = xNONE && prefix=$ac_default_prefix
29291 # Let make expand exec_prefix.
29292 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29293
29294 # VPATH may cause trouble with some makes, so we remove $(srcdir),
29295 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
29296 # trailing colons and then remove the whole line if VPATH becomes empty
29297 # (actually we leave an empty line to preserve line numbers).
29298 if test "x$srcdir" = x.; then
29299   ac_vpsub='/^[         ]*VPATH[        ]*=/{
29300 s/:*\$(srcdir):*/:/;
29301 s/:*\${srcdir}:*/:/;
29302 s/:*@srcdir@:*/:/;
29303 s/^\([^=]*=[    ]*\):*/\1/;
29304 s/:*$//;
29305 s/^[^=]*=[      ]*$//;
29306 }'
29307 fi
29308
29309 DEFS=-DHAVE_CONFIG_H
29310
29311 : "${CONFIG_STATUS=./config.status}"
29312 ac_clean_files_save=$ac_clean_files
29313 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29314 { echo "$as_me:29314: creating $CONFIG_STATUS" >&5
29315 echo "$as_me: creating $CONFIG_STATUS" >&6;}
29316 cat >"$CONFIG_STATUS" <<_ACEOF
29317 #! $SHELL
29318 # Generated automatically by configure.
29319 # Run this file to recreate the current configuration.
29320 # Compiler output produced by configure, useful for debugging
29321 # configure, is in config.log if it exists.
29322
29323 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
29324
29325 debug=false
29326 SHELL=\${CONFIG_SHELL-$SHELL}
29327 ac_cs_invocation="\$0 \$@"
29328
29329 CLICOLOR_FORCE= GREP_OPTIONS=
29330 unset CLICOLOR_FORCE GREP_OPTIONS
29331 _ACEOF
29332
29333 cat >>"$CONFIG_STATUS" <<\_ACEOF
29334 # Be Bourne compatible
29335 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29336   emulate sh
29337   NULLCMD=:
29338 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29339   set -o posix
29340 fi
29341
29342 # Name of the executable.
29343 as_me=`echo "$0" |sed 's,.*[\\/],,'`
29344
29345 if expr a : '\(a\)' >/dev/null 2>&1; then
29346   as_expr="expr"
29347 else
29348   as_expr="false"
29349 fi
29350
29351 rm -f conf$$ conf$$.exe conf$$.file
29352 echo >conf$$.file
29353 if ln -s conf$$.file conf$$ 2>/dev/null; then
29354   # We could just check for DJGPP; but this test a) works b) is more generic
29355   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
29356   if test -f conf$$.exe; then
29357     # Don't use ln at all; we don't have any links
29358     as_ln_s='cp -p'
29359   else
29360     as_ln_s='ln -s'
29361   fi
29362 elif ln conf$$.file conf$$ 2>/dev/null; then
29363   as_ln_s='ln'
29364 else
29365   as_ln_s='cp -p'
29366 fi
29367 rm -f conf$$ conf$$.exe conf$$.file
29368
29369 as_executable_p="test -f"
29370
29371 # Support unset when possible.
29372 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
29373   as_unset="unset"
29374 else
29375   as_unset="false"
29376 fi
29377
29378 # NLS nuisances.
29379 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
29380 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
29381 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
29382 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
29383 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
29384 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
29385 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
29386 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
29387
29388 # IFS
29389 # We need space, tab and new line, in precisely that order.
29390 as_nl='
29391 '
29392 IFS="   $as_nl"
29393
29394 # CDPATH.
29395 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
29396
29397 exec 6>&1
29398
29399 _ACEOF
29400
29401 # Files that config.status was made for.
29402 if test -n "$ac_config_files"; then
29403   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
29404 fi
29405
29406 if test -n "$ac_config_headers"; then
29407   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
29408 fi
29409
29410 if test -n "$ac_config_links"; then
29411   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
29412 fi
29413
29414 if test -n "$ac_config_commands"; then
29415   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
29416 fi
29417
29418 cat >>"$CONFIG_STATUS" <<\EOF
29419
29420 ac_cs_usage="\
29421 \`$as_me' instantiates files from templates according to the
29422 current configuration.
29423
29424 Usage: $0 [OPTIONS] [FILE]...
29425
29426   -h, --help       print this help, then exit
29427   -V, --version    print version number, then exit
29428   -d, --debug      don't remove temporary files
29429       --recheck    update $as_me by reconfiguring in the same conditions
29430   --file=FILE[:TEMPLATE]
29431                    instantiate the configuration file FILE
29432   --header=FILE[:TEMPLATE]
29433                    instantiate the configuration header FILE
29434
29435 Configuration files:
29436 $config_files
29437
29438 Configuration headers:
29439 $config_headers
29440
29441 Configuration commands:
29442 $config_commands
29443
29444 Report bugs to <dickey@invisible-island.net>."
29445 EOF
29446
29447 cat >>"$CONFIG_STATUS" <<EOF
29448 ac_cs_version="\\
29449 config.status
29450 configured by $0, generated by GNU Autoconf 2.52.20230114,
29451   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
29452
29453 Copyright 2003-2022,2023        Thomas E. Dickey
29454 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
29455 Free Software Foundation, Inc.
29456 This config.status script is free software; the Free Software Foundation
29457 gives unlimited permission to copy, distribute and modify it."
29458 srcdir="$srcdir"
29459 INSTALL="$INSTALL"
29460 EOF
29461
29462 cat >>"$CONFIG_STATUS" <<\EOF
29463 # If no file are specified by the user, then we need to provide default
29464 # value.  By we need to know if files were specified by the user.
29465 ac_need_defaults=:
29466 while test $# != 0
29467 do
29468   case $1 in
29469   --*=*)
29470     ac_option=`expr "x$1" : 'x\([^=]*\)='`
29471     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
29472     shift
29473     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
29474     shift
29475     ;;
29476   -*);;
29477   *) # This is not an option, so the user has probably given explicit
29478      # arguments.
29479      ac_need_defaults=false;;
29480   esac
29481
29482   case $1 in
29483   # Handling of the options.
29484 EOF
29485 cat >>"$CONFIG_STATUS" <<EOF
29486   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29487     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
29488     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
29489 EOF
29490 cat >>"$CONFIG_STATUS" <<\EOF
29491   --version | --vers* | -V )
29492     echo "$ac_cs_version"; exit 0 ;;
29493   --he | --h)
29494     # Conflict between --help and --header
29495     { { echo "$as_me:29495: error: ambiguous option: $1
29496 Try \`$0 --help' for more information." >&5
29497 echo "$as_me: error: ambiguous option: $1
29498 Try \`$0 --help' for more information." >&2;}
29499    { (exit 1); exit 1; }; };;
29500   --help | --hel | -h )
29501     echo "$ac_cs_usage"; exit 0 ;;
29502   --debug | --d* | -d )
29503     debug=: ;;
29504   --file | --fil | --fi | --f )
29505     shift
29506     CONFIG_FILES="$CONFIG_FILES $1"
29507     ac_need_defaults=false;;
29508   --header | --heade | --head | --hea )
29509     shift
29510     CONFIG_HEADERS="$CONFIG_HEADERS $1"
29511     ac_need_defaults=false;;
29512
29513   # This is an error.
29514   -*) { { echo "$as_me:29514: error: unrecognized option: $1
29515 Try \`$0 --help' for more information." >&5
29516 echo "$as_me: error: unrecognized option: $1
29517 Try \`$0 --help' for more information." >&2;}
29518    { (exit 1); exit 1; }; } ;;
29519
29520   *) ac_config_targets="$ac_config_targets $1" ;;
29521
29522   esac
29523   shift
29524 done
29525
29526 exec 5>>config.log
29527 cat >&5 << _ACEOF
29528
29529 ## ----------------------- ##
29530 ## Running config.status.  ##
29531 ## ----------------------- ##
29532
29533 This file was extended by $as_me 2.52.20230114, executed with
29534   CONFIG_FILES    = $CONFIG_FILES
29535   CONFIG_HEADERS  = $CONFIG_HEADERS
29536   CONFIG_LINKS    = $CONFIG_LINKS
29537   CONFIG_COMMANDS = $CONFIG_COMMANDS
29538   > "$ac_cs_invocation"
29539 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29540
29541 _ACEOF
29542 EOF
29543
29544 cat >>"$CONFIG_STATUS" <<EOF
29545 #
29546 # INIT-COMMANDS section.
29547 #
29548
29549 ### Special initialization commands, used to pass information from the
29550 ### configuration-run into config.status
29551
29552 ALTERNATE_SYMS="$ALTERNATE_SYMS"
29553 AWK="$AWK"
29554 CXX_NAME="$CXX_NAME"
29555 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
29556 DFT_LWR_MODEL="$DFT_LWR_MODEL"
29557 ECHO_LD="$ECHO_LD"
29558 EXTRA_SUFFIX="$EXTRA_SUFFIX"
29559 FORM_NAME="$FORM_NAME"
29560 LDCONFIG="$LDCONFIG"
29561 LIBTOOL_VERSION="$LIBTOOL_VERSION"
29562 LIB_NAME="$LIB_NAME"
29563 LIB_PREFIX="$LIB_PREFIX"
29564 LIB_SUBSETS="$LIB_SUBSETS"
29565 LIB_SUFFIX="$LIB_SUFFIX"
29566 LIB_TRACING="$LIB_TRACING"
29567 LN_S="$LN_S"
29568 MAKE_TERMINFO="$MAKE_TERMINFO"
29569 MANPAGE_RENAMES="$MANPAGE_RENAMES"
29570 MENU_NAME="$MENU_NAME"
29571 NCURSES_MAJOR="$NCURSES_MAJOR"
29572 NCURSES_MINOR="$NCURSES_MINOR"
29573 NCURSES_OSPEED="$NCURSES_OSPEED"
29574 NCURSES_PATCH="$NCURSES_PATCH"
29575 PANEL_NAME="$PANEL_NAME"
29576 SRC_SUBDIRS="$SRC_SUBDIRS"
29577 TERMINFO="$TERMINFO"
29578 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
29579 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
29580 TICS_NAME="$TICS_NAME"
29581 TICS_SUFFIX="$TICS_SUFFIX"
29582 TIC_PATH="$TIC_PATH"
29583 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
29584 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
29585 TINFO_NAME="$TINFO_NAME"
29586 TINFO_SUFFIX="$TINFO_SUFFIX"
29587 UNALTERED_SYMS="$UNALTERED_SYMS"
29588 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
29589 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
29590 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
29591 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
29592 WILDCARD_SYMS="$WILDCARD_SYMS"
29593 WITH_CURSES_H="$with_curses_h"
29594 WITH_ECHO="${enable_echo:=yes}"
29595 WITH_OVERWRITE="$with_overwrite"
29596 cf_LIST_MODELS="$cf_list_models"
29597 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
29598 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
29599 cf_cv_abi_default="$cf_cv_abi_default"
29600 cf_cv_abi_version="$cf_cv_abi_version"
29601 cf_cv_do_relink="$cf_cv_do_relink"
29602 cf_cv_do_reranlib="$cf_cv_do_reranlib"
29603 cf_cv_do_symlinks="$cf_cv_do_symlinks"
29604 cf_cv_enable_lp64="$cf_cv_enable_lp64"
29605 cf_cv_enable_opaque="$cf_cv_enable_opaque"
29606 cf_cv_make_PHONY="$cf_cv_make_PHONY"
29607 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
29608 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
29609 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
29610 cf_cv_rel_version="$cf_cv_rel_version"
29611 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
29612 cf_cv_shared_soname='$cf_cv_shared_soname'
29613 cf_cv_shlib_version="$cf_cv_shlib_version"
29614 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
29615 cf_cv_system_name="$cf_cv_system_name"
29616 cf_cv_term_driver="$with_term_driver"
29617 cf_with_ada="$cf_with_ada"
29618 cf_with_cxx_binding="$cf_with_cxx_binding"
29619 cf_with_db_install="$cf_with_db_install"
29620 cf_with_manpages="$cf_with_manpages"
29621 cf_with_tests="$cf_with_tests"
29622 host="$host"
29623 target="$target"
29624 verbose="$verbose"
29625 with_shared_cxx="$with_shared_cxx"
29626
29627 EOF
29628
29629 cat >>"$CONFIG_STATUS" <<\EOF
29630 for ac_config_target in $ac_config_targets
29631 do
29632   case "$ac_config_target" in
29633   # Handling of arguments.
29634   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
29635   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
29636   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
29637   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
29638   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
29639   "man/man_db.renames" ) CONFIG_FILES="$CONFIG_FILES man/man_db.renames" ;;
29640   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
29641   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29642   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29643   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
29644   *) { { echo "$as_me:29644: error: invalid argument: $ac_config_target" >&5
29645 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
29646    { (exit 1); exit 1; }; };;
29647   esac
29648 done
29649
29650 # If the user did not use the arguments to specify the items to instantiate,
29651 # then the envvar interface is used.  Set only those that are not.
29652 # We use the long form for the default assignment because of an extremely
29653 # bizarre bug on SunOS 4.1.3.
29654 if "$ac_need_defaults"; then
29655   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29656   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29657   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29658 fi
29659
29660 # Create a temporary directory, and hook for its removal unless debugging.
29661 $debug ||
29662 {
29663   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
29664   trap '{ (exit 1); exit 1; }' 1 2 13 15
29665 }
29666
29667 # Create a (secure) tmp directory for tmp files.
29668 : "${TMPDIR=/tmp}"
29669 {
29670   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
29671   test -n "$tmp" && test -d "$tmp"
29672 }  ||
29673 {
29674   tmp=$TMPDIR/cs$$-$RANDOM
29675   (umask 077 && mkdir "$tmp")
29676 } ||
29677 {
29678    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
29679    { (exit 1); exit 1; }
29680 }
29681
29682 EOF
29683
29684 cat >>"$CONFIG_STATUS" <<EOF
29685
29686 #
29687 # CONFIG_FILES section.
29688 #
29689
29690 # No need to generate the scripts if there are no CONFIG_FILES.
29691 # This happens for instance when ./config.status config.h
29692 if test -n "\$CONFIG_FILES"; then
29693   # Protect against being on the right side of a sed subst in config.status.
29694   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
29695    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
29696 s,@SHELL@,$SHELL,;t t
29697 s,@exec_prefix@,$exec_prefix,;t t
29698 s,@prefix@,$prefix,;t t
29699 s,@program_transform_name@,$program_transform_name,;t t
29700 s,@bindir@,$bindir,;t t
29701 s,@sbindir@,$sbindir,;t t
29702 s,@libexecdir@,$libexecdir,;t t
29703 s,@datarootdir@,$datarootdir,;t t
29704 s,@datadir@,$datadir,;t t
29705 s,@sysconfdir@,$sysconfdir,;t t
29706 s,@sharedstatedir@,$sharedstatedir,;t t
29707 s,@localstatedir@,$localstatedir,;t t
29708 s,@runstatedir@,$runstatedir,;t t
29709 s,@libdir@,$libdir,;t t
29710 s,@includedir@,$includedir,;t t
29711 s,@oldincludedir@,$oldincludedir,;t t
29712 s,@infodir@,$infodir,;t t
29713 s,@mandir@,$mandir,;t t
29714 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
29715 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
29716 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
29717 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
29718 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
29719 s,@build_alias@,$build_alias,;t t
29720 s,@host_alias@,$host_alias,;t t
29721 s,@target_alias@,$target_alias,;t t
29722 s,@ECHO_C@,$ECHO_C,;t t
29723 s,@ECHO_N@,$ECHO_N,;t t
29724 s,@ECHO_T@,$ECHO_T,;t t
29725 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
29726 s,@DEFS@,$DEFS,;t t
29727 s,@LIBS@,$LIBS,;t t
29728 s,@top_builddir@,$top_builddir,;t t
29729 s,@GREP@,$GREP,;t t
29730 s,@EGREP@,$EGREP,;t t
29731 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
29732 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
29733 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
29734 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
29735 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
29736 s,@cf_cv_abi_default@,$cf_cv_abi_default,;t t
29737 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
29738 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
29739 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
29740 s,@VERSION@,$VERSION,;t t
29741 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
29742 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
29743 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
29744 s,@PACKAGE@,$PACKAGE,;t t
29745 s,@build@,$build,;t t
29746 s,@build_cpu@,$build_cpu,;t t
29747 s,@build_vendor@,$build_vendor,;t t
29748 s,@build_os@,$build_os,;t t
29749 s,@host@,$host,;t t
29750 s,@host_cpu@,$host_cpu,;t t
29751 s,@host_vendor@,$host_vendor,;t t
29752 s,@host_os@,$host_os,;t t
29753 s,@target@,$target,;t t
29754 s,@target_cpu@,$target_cpu,;t t
29755 s,@target_vendor@,$target_vendor,;t t
29756 s,@target_os@,$target_os,;t t
29757 s,@FGREP@,$FGREP,;t t
29758 s,@CC@,$CC,;t t
29759 s,@CFLAGS@,$CFLAGS,;t t
29760 s,@LDFLAGS@,$LDFLAGS,;t t
29761 s,@CPPFLAGS@,$CPPFLAGS,;t t
29762 s,@ac_ct_CC@,$ac_ct_CC,;t t
29763 s,@EXEEXT@,$EXEEXT,;t t
29764 s,@OBJEXT@,$OBJEXT,;t t
29765 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
29766 s,@CPP@,$CPP,;t t
29767 s,@LDCONFIG@,$LDCONFIG,;t t
29768 s,@CXX@,$CXX,;t t
29769 s,@CXXFLAGS@,$CXXFLAGS,;t t
29770 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
29771 s,@AWK@,$AWK,;t t
29772 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
29773 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
29774 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
29775 s,@LINT@,$LINT,;t t
29776 s,@LINT_OPTS@,$LINT_OPTS,;t t
29777 s,@LINT_LIBS@,$LINT_LIBS,;t t
29778 s,@LN_S@,$LN_S,;t t
29779 s,@cf_config_suffix@,$cf_config_suffix,;t t
29780 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
29781 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
29782 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
29783 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
29784 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
29785 s,@SET_MAKE@,$SET_MAKE,;t t
29786 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
29787 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
29788 s,@CTAGS@,$CTAGS,;t t
29789 s,@ETAGS@,$ETAGS,;t t
29790 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
29791 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
29792 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
29793 s,@RANLIB@,$RANLIB,;t t
29794 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
29795 s,@LD@,$LD,;t t
29796 s,@ac_ct_LD@,$ac_ct_LD,;t t
29797 s,@AR@,$AR,;t t
29798 s,@ac_ct_AR@,$ac_ct_AR,;t t
29799 s,@NM@,$NM,;t t
29800 s,@ac_ct_NM@,$ac_ct_NM,;t t
29801 s,@ARFLAGS@,$ARFLAGS,;t t
29802 s,@DESTDIR@,$DESTDIR,;t t
29803 s,@BUILD_CC@,$BUILD_CC,;t t
29804 s,@BUILD_CPP@,$BUILD_CPP,;t t
29805 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
29806 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
29807 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
29808 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
29809 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
29810 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
29811 s,@cf_list_models@,$cf_list_models,;t t
29812 s,@ABI_VERSION@,$ABI_VERSION,;t t
29813 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
29814 s,@LIBTOOL@,$LIBTOOL,;t t
29815 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
29816 s,@LT_UNDEF@,$LT_UNDEF,;t t
29817 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
29818 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
29819 s,@LIB_CREATE@,$LIB_CREATE,;t t
29820 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
29821 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
29822 s,@LIB_PREP@,$LIB_PREP,;t t
29823 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
29824 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
29825 s,@LIB_LINK@,$LIB_LINK,;t t
29826 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
29827 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
29828 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
29829 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
29830 s,@TICS_NAME@,$TICS_NAME,;t t
29831 s,@TINFO_NAME@,$TINFO_NAME,;t t
29832 s,@LIB_NAME@,$LIB_NAME,;t t
29833 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
29834 s,@CC_G_OPT@,$CC_G_OPT,;t t
29835 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
29836 s,@LD_MODEL@,$LD_MODEL,;t t
29837 s,@shlibdir@,$shlibdir,;t t
29838 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
29839 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
29840 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
29841 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
29842 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
29843 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
29844 s,@LINK_PROGS@,$LINK_PROGS,;t t
29845 s,@LINK_TESTS@,$LINK_TESTS,;t t
29846 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
29847 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
29848 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
29849 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
29850 s,@RPATH_LIST@,$RPATH_LIST,;t t
29851 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
29852 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
29853 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
29854 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
29855 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
29856 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
29857 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
29858 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
29859 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
29860 s,@TIC@,$TIC,;t t
29861 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
29862 s,@INFOCMP@,$INFOCMP,;t t
29863 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
29864 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
29865 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
29866 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
29867 s,@XTERM_KBS@,$XTERM_KBS,;t t
29868 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
29869 s,@TERMINFO@,$TERMINFO,;t t
29870 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
29871 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
29872 s,@TERMPATH@,$TERMPATH,;t t
29873 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
29874 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
29875 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
29876 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
29877 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
29878 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
29879 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
29880 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
29881 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
29882 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
29883 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
29884 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
29885 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
29886 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
29887 s,@RGB_PATH@,$RGB_PATH,;t t
29888 s,@no_x11_rgb@,$no_x11_rgb,;t t
29889 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
29890 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
29891 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
29892 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
29893 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
29894 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
29895 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
29896 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
29897 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
29898 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
29899 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
29900 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
29901 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
29902 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
29903 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
29904 s,@PTHREAD@,$PTHREAD,;t t
29905 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
29906 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
29907 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
29908 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
29909 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
29910 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
29911 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
29912 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
29913 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
29914 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
29915 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
29916 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
29917 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
29918 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
29919 s,@ECHO_LT@,$ECHO_LT,;t t
29920 s,@ECHO_LD@,$ECHO_LD,;t t
29921 s,@RULE_CC@,$RULE_CC,;t t
29922 s,@SHOW_CC@,$SHOW_CC,;t t
29923 s,@ECHO_CC@,$ECHO_CC,;t t
29924 s,@ECHO_LINK@,$ECHO_LINK,;t t
29925 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
29926 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
29927 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
29928 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
29929 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
29930 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
29931 s,@ADAFLAGS@,$ADAFLAGS,;t t
29932 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
29933 s,@ADA_TRACE@,$ADA_TRACE,;t t
29934 s,@MATH_LIB@,$MATH_LIB,;t t
29935 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
29936 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
29937 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
29938 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
29939 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
29940 s,@TEST_LIBS@,$TEST_LIBS,;t t
29941 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
29942 s,@CXXCPP@,$CXXCPP,;t t
29943 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
29944 s,@CXX_AR@,$CXX_AR,;t t
29945 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
29946 s,@CXXLIBS@,$CXXLIBS,;t t
29947 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
29948 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
29949 s,@M4_exists@,$M4_exists,;t t
29950 s,@cf_ada_make@,$cf_ada_make,;t t
29951 s,@cf_ada_config@,$cf_ada_config,;t t
29952 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
29953 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
29954 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
29955 s,@cf_compile_generics@,$cf_compile_generics,;t t
29956 s,@cf_generic_objects@,$cf_generic_objects,;t t
29957 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
29958 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
29959 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
29960 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
29961 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
29962 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
29963 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
29964 s,@cf_ada_package@,$cf_ada_package,;t t
29965 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
29966 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
29967 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
29968 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
29969 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
29970 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
29971 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
29972 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
29973 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
29974 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
29975 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
29976 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
29977 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
29978 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
29979 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
29980 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
29981 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
29982 s,@TICS_LIBS@,$TICS_LIBS,;t t
29983 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
29984 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
29985 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
29986 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
29987 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
29988 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
29989 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
29990 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
29991 s,@includesubdir@,$includesubdir,;t t
29992 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
29993 s,@TICS_LIST@,$TICS_LIST,;t t
29994 s,@TINFO_LIST@,$TINFO_LIST,;t t
29995 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
29996 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
29997 s,@FORM_NAME@,$FORM_NAME,;t t
29998 s,@MENU_NAME@,$MENU_NAME,;t t
29999 s,@PANEL_NAME@,$PANEL_NAME,;t t
30000 s,@CXX_NAME@,$CXX_NAME,;t t
30001 s,@TEST_ARGS@,$TEST_ARGS,;t t
30002 s,@TEST_DEPS@,$TEST_DEPS,;t t
30003 s,@TEST_ARG2@,$TEST_ARG2,;t t
30004 s,@TEST_DEP2@,$TEST_DEP2,;t t
30005 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
30006 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
30007 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
30008 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
30009 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
30010 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
30011 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
30012 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
30013 s,@cross_compiling@,$cross_compiling,;t t
30014 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
30015 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
30016 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
30017 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
30018 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
30019 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
30020 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
30021 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
30022 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
30023 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
30024 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
30025 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
30026 CEOF
30027
30028 EOF
30029
30030   cat >>"$CONFIG_STATUS" <<\EOF
30031   # Split the substitutions into bite-sized pieces for seds with
30032   # small command number limits, like on Digital OSF/1 and HP-UX.
30033   ac_max_sed_lines=48
30034   ac_sed_frag=1 # Number of current file.
30035   ac_beg=1 # First line for current file.
30036   ac_end=$ac_max_sed_lines # Line after last line for current file.
30037   ac_more_lines=:
30038   ac_sed_cmds=
30039   while "$ac_more_lines"; do
30040     if test "$ac_beg" -gt 1; then
30041       sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30042     else
30043       sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30044     fi
30045     if test ! -s "$tmp"/subs.frag; then
30046       ac_more_lines=false
30047     else
30048       # The purpose of the label and of the branching condition is to
30049       # speed up the sed processing (if there are no `@' at all, there
30050       # is no need to browse any of the substitutions).
30051       # These are the two extra sed commands mentioned above.
30052       (echo ':t
30053   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
30054       # It is possible to make a multiline substitution using escaped newlines.
30055       # Ensure that we do not split the substitution between script fragments.
30056       ac_BEG=$ac_end
30057       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
30058       sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
30059       if test -s "$tmp"/subs.next; then
30060         grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit
30061         if test ! -s "$tmp"/subs.edit; then
30062           grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
30063           if test ! -s "$tmp"/subs.edit; then
30064             if test "$ac_beg" -gt 1; then
30065               ac_end=`expr "$ac_end" - 1`
30066               continue
30067             fi
30068           fi
30069         fi
30070       fi
30071
30072       if test -z "$ac_sed_cmds"; then
30073         ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30074       else
30075         ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30076       fi
30077       ac_sed_frag=`expr "$ac_sed_frag" + 1`
30078       ac_beg=$ac_end
30079       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
30080     fi
30081   done
30082   if test -z "$ac_sed_cmds"; then
30083     ac_sed_cmds="cat"
30084   fi
30085 fi # test -n "$CONFIG_FILES"
30086
30087 EOF
30088 cat >>"$CONFIG_STATUS" <<\EOF
30089 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
30090   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30091   case "$ac_file" in
30092   - | *:- | *:-:* ) # input from stdin
30093         cat >"$tmp"/stdin
30094         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30095         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30096   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30097         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30098   * )   ac_file_in=$ac_file.in ;;
30099   esac
30100
30101   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
30102   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30103          X"$ac_file" : 'X\(//\)[^/]' \| \
30104          X"$ac_file" : 'X\(//\)$' \| \
30105          X"$ac_file" : 'X\(/\)' \| \
30106          .     : '\(.\)' 2>/dev/null ||
30107 echo X"$ac_file" |
30108     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30109           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30110           /^X\(\/\/\)$/{ s//\1/; q; }
30111           /^X\(\/\).*/{ s//\1/; q; }
30112           s/.*/./; q'`
30113   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30114     { case "$ac_dir" in
30115   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30116   *)                      as_incr_dir=.;;
30117 esac
30118 as_dummy="$ac_dir"
30119 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30120   case $as_mkdir_dir in
30121     # Skip DOS drivespec
30122     ?:) as_incr_dir=$as_mkdir_dir ;;
30123     *)
30124       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30125       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30126     ;;
30127   esac
30128 done; }
30129
30130     ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
30131     # A "../" for each directory in $ac_dir_suffix.
30132     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
30133   else
30134     ac_dir_suffix= ac_dots=
30135   fi
30136
30137   case "$srcdir" in
30138   .)  ac_srcdir=.
30139       if test -z "$ac_dots"; then
30140          ac_top_srcdir=.
30141       else
30142          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
30143       fi ;;
30144   [\\/]* | ?:[\\/]* )
30145       ac_srcdir="$srcdir$ac_dir_suffix";
30146       ac_top_srcdir="$srcdir" ;;
30147   *) # Relative path.
30148     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
30149     ac_top_srcdir="$ac_dots$srcdir" ;;
30150   esac
30151
30152   case $INSTALL in
30153   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30154   *) ac_INSTALL=$ac_dots$INSTALL ;;
30155   esac
30156
30157   if test x"$ac_file" != x-; then
30158     { echo "$as_me:30158: creating $ac_file" >&5
30159 echo "$as_me: creating $ac_file" >&6;}
30160     rm -f "$ac_file"
30161   fi
30162   # Let's still pretend it is `configure' which instantiates (i.e., don't
30163   # use $as_me), people would be surprised to read:
30164   #    /* config.h.  Generated automatically by config.status.  */
30165   configure_input="Generated automatically from `echo $ac_file_in |
30166                                                  sed 's,.*/,,'` by configure."
30167
30168   # First look for the input files in the build tree, otherwise in the
30169   # src tree.
30170   ac_file_inputs=`IFS=:
30171     for f in $ac_file_in; do
30172       case $f in
30173       -) echo "$tmp"/stdin ;;
30174       [\\/$]*)
30175          # Absolute (can't be DOS-style, as IFS=:)
30176          test -f "$f" || { { echo "$as_me:30176: error: cannot find input file: $f" >&5
30177 echo "$as_me: error: cannot find input file: $f" >&2;}
30178    { (exit 1); exit 1; }; }
30179          echo "$f";;
30180       *) # Relative
30181          if test -f "$f"; then
30182            # Build tree
30183            echo "$f"
30184          elif test -f "$srcdir/$f"; then
30185            # Source tree
30186            echo "$srcdir/$f"
30187          else
30188            # /dev/null tree
30189            { { echo "$as_me:30189: error: cannot find input file: $f" >&5
30190 echo "$as_me: error: cannot find input file: $f" >&2;}
30191    { (exit 1); exit 1; }; }
30192          fi;;
30193       esac
30194     done` || { (exit 1); exit 1; }
30195 EOF
30196 cat >>"$CONFIG_STATUS" <<\EOF
30197   ac_warn_datarootdir=no
30198   if test x"$ac_file" != x-; then
30199     for ac_item in $ac_file_inputs
30200     do
30201       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
30202       if test -n "$ac_seen"; then
30203         ac_used=`grep '@datarootdir@' "$ac_item"`
30204         if test -z "$ac_used"; then
30205           { echo "$as_me:30205: WARNING: datarootdir was used implicitly but not set:
30206 $ac_seen" >&5
30207 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
30208 $ac_seen" >&2;}
30209           ac_warn_datarootdir=yes
30210         fi
30211       fi
30212       ac_seen=`grep '${datarootdir}' "$ac_item"`
30213       if test -n "$ac_seen"; then
30214         { echo "$as_me:30214: WARNING: datarootdir was used explicitly but not set:
30215 $ac_seen" >&5
30216 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
30217 $ac_seen" >&2;}
30218         ac_warn_datarootdir=yes
30219       fi
30220     done
30221   fi
30222
30223 if test "x$ac_warn_datarootdir" = xyes; then
30224   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
30225 fi
30226
30227 EOF
30228 cat >>"$CONFIG_STATUS" <<EOF
30229   sed "$ac_vpsub
30230 $extrasub
30231 EOF
30232 cat >>"$CONFIG_STATUS" <<\EOF
30233 :t
30234 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30235 s,@configure_input@,$configure_input,;t t
30236 s,@srcdir@,$ac_srcdir,;t t
30237 s,@top_srcdir@,$ac_top_srcdir,;t t
30238 s,@INSTALL@,$ac_INSTALL,;t t
30239 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
30240   rm -f "$tmp"/stdin
30241 EOF
30242 : "${FGREP:=grep -F}"
30243 : "${EGREP:=grep -E}"
30244 cat >>"$CONFIG_STATUS" <<EOF
30245   : "\${FGREP:=$FGREP}"
30246   : "\${EGREP:=$EGREP}"
30247 EOF
30248 cat >>"$CONFIG_STATUS" <<\EOF
30249   if test x"$ac_file" != x-; then
30250     cp "$tmp/out" "$ac_file"
30251
30252     for ac_name in prefix exec_prefix datarootdir
30253     do
30254         ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
30255         if test -n "$ac_seen"; then
30256             ac_init=`$EGREP '[  ]*'$ac_name'[   ]*=' "$ac_file"`
30257             if test -z "$ac_init"; then
30258               ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
30259               { echo "$as_me:30259: WARNING: Variable $ac_name is used but was not set:
30260 $ac_seen" >&5
30261 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
30262 $ac_seen" >&2;}
30263             fi
30264         fi
30265     done
30266     $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
30267     $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
30268     if test -s "$tmp"/out; then
30269       ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
30270       { echo "$as_me:30270: WARNING: Some variables may not be substituted:
30271 $ac_seen" >&5
30272 echo "$as_me: WARNING: Some variables may not be substituted:
30273 $ac_seen" >&2;}
30274     fi
30275   else
30276     cat "$tmp"/out
30277   fi
30278   rm -f "$tmp"/out
30279
30280 done
30281 EOF
30282 cat >>"$CONFIG_STATUS" <<\EOF
30283
30284 #
30285 # CONFIG_HEADER section.
30286 #
30287
30288 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
30289 # NAME is the cpp macro being defined and VALUE is the value it is being given.
30290 #
30291 # ac_d sets the value in "#define NAME VALUE" lines.
30292 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
30293 ac_dB='[        ].*$,\1#\2'
30294 ac_dC=' '
30295 ac_dD=',;t'
30296 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
30297 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30298 ac_iB='\([      ]\),\1#\2define\3'
30299 ac_iC=' '
30300 ac_iD='\4,;t'
30301 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
30302 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30303 ac_uB='$,\1#\2define\3'
30304 ac_uC=' '
30305 ac_uD=',;t'
30306
30307 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
30308   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30309   case "$ac_file" in
30310   - | *:- | *:-:* ) # input from stdin
30311         cat >"$tmp"/stdin
30312         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30313         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30314   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30315         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30316   * )   ac_file_in=$ac_file.in ;;
30317   esac
30318
30319   test x"$ac_file" != x- && { echo "$as_me:30319: creating $ac_file" >&5
30320 echo "$as_me: creating $ac_file" >&6;}
30321
30322   # First look for the input files in the build tree, otherwise in the
30323   # src tree.
30324   ac_file_inputs=`IFS=:
30325     for f in $ac_file_in; do
30326       case $f in
30327       -) echo "$tmp"/stdin ;;
30328       [\\/$]*)
30329          # Absolute (can't be DOS-style, as IFS=:)
30330          test -f "$f" || { { echo "$as_me:30330: error: cannot find input file: $f" >&5
30331 echo "$as_me: error: cannot find input file: $f" >&2;}
30332    { (exit 1); exit 1; }; }
30333          echo $f;;
30334       *) # Relative
30335          if test -f "$f"; then
30336            # Build tree
30337            echo $f
30338          elif test -f "$srcdir/$f"; then
30339            # Source tree
30340            echo "$srcdir/$f"
30341          else
30342            # /dev/null tree
30343            { { echo "$as_me:30343: error: cannot find input file: $f" >&5
30344 echo "$as_me: error: cannot find input file: $f" >&2;}
30345    { (exit 1); exit 1; }; }
30346          fi;;
30347       esac
30348     done` || { (exit 1); exit 1; }
30349   # Remove the trailing spaces.
30350   sed 's/[      ]*$//' $ac_file_inputs >"$tmp"/in
30351
30352 EOF
30353
30354 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
30355 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
30356 # be either 'cat' or 'sort'.
30357 cat confdefs.h | uniq >conftest.vals
30358
30359 # Break up conftest.vals because some shells have a limit on
30360 # the size of here documents, and old seds have small limits too.
30361
30362 rm -f conftest.tail
30363 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
30364 while grep . conftest.vals >/dev/null
30365 do
30366   # Write chunks of a limited-size here document to conftest.frag.
30367   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
30368   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
30369   echo 'CEOF' >> "$CONFIG_STATUS"
30370   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
30371   rm -f conftest.vals
30372   mv conftest.tail conftest.vals
30373 done
30374 rm -f conftest.vals
30375
30376 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
30377 # marker @DEFS@.
30378 echo '  cat >> conftest.edit <<CEOF
30379 /@DEFS@/r conftest.frag
30380 /@DEFS@/d
30381 CEOF
30382 sed -f conftest.edit "$tmp"/in > "$tmp"/out
30383 rm -f "$tmp"/in
30384 mv "$tmp"/out "$tmp"/in
30385 rm -f conftest.edit conftest.frag
30386 ' >> "$CONFIG_STATUS"
30387
30388 cat >>"$CONFIG_STATUS" <<\EOF
30389   # Let's still pretend it is `configure' which instantiates (i.e., don't
30390   # use $as_me), people would be surprised to read:
30391   #    /* config.h.  Generated automatically by config.status.  */
30392   if test x"$ac_file" = x-; then
30393     echo "/* Generated automatically by configure.  */" >"$tmp"/config.h
30394   else
30395     echo "/* $ac_file.  Generated automatically by configure.  */" >"$tmp"/config.h
30396   fi
30397   cat "$tmp"/in >>"$tmp"/config.h
30398   rm -f "$tmp"/in
30399   if test x"$ac_file" != x-; then
30400     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
30401       { echo "$as_me:30401: $ac_file is unchanged" >&5
30402 echo "$as_me: $ac_file is unchanged" >&6;}
30403     else
30404       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30405          X"$ac_file" : 'X\(//\)[^/]' \| \
30406          X"$ac_file" : 'X\(//\)$' \| \
30407          X"$ac_file" : 'X\(/\)' \| \
30408          .     : '\(.\)' 2>/dev/null ||
30409 echo X"$ac_file" |
30410     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30411           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30412           /^X\(\/\/\)$/{ s//\1/; q; }
30413           /^X\(\/\).*/{ s//\1/; q; }
30414           s/.*/./; q'`
30415       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30416         { case "$ac_dir" in
30417   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30418   *)                      as_incr_dir=.;;
30419 esac
30420 as_dummy="$ac_dir"
30421 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30422   case $as_mkdir_dir in
30423     # Skip DOS drivespec
30424     ?:) as_incr_dir=$as_mkdir_dir ;;
30425     *)
30426       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30427       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30428     ;;
30429   esac
30430 done; }
30431
30432       fi
30433       rm -f "$ac_file"
30434       mv "$tmp/config.h" "$ac_file"
30435     fi
30436   else
30437     cat "$tmp"/config.h
30438     rm -f "$tmp"/config.h
30439   fi
30440 done
30441 EOF
30442 cat >>"$CONFIG_STATUS" <<\EOF
30443 #
30444 # CONFIG_COMMANDS section.
30445 #
30446 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
30447   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
30448   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
30449
30450   case "$ac_dest" in
30451     default )
30452 if test "x$cf_with_tests" != xno ; then
30453
30454 for cf_dir in test
30455 do
30456         if test ! -d "$srcdir/$cf_dir" ; then
30457                 continue
30458         elif test -f "$srcdir/$cf_dir/programs" ; then
30459                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
30460         fi
30461 done
30462
30463 fi
30464
30465 cf_prefix=$LIB_PREFIX
30466
30467 case "$cf_cv_shlib_version" in
30468 (cygdll|msysdll|mingw|msvcdll)
30469         TINFO_NAME=$TINFO_ARG_SUFFIX
30470         TINFO_SUFFIX=.dll
30471         ;;
30472 esac
30473
30474 if test -n "$TINFO_SUFFIX" ; then
30475         case "$TINFO_SUFFIX" in
30476         (tw*)
30477                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
30478                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30479                 ;;
30480         (t*)
30481                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
30482                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
30483                 ;;
30484         (w*)
30485                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
30486                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
30487                 ;;
30488         esac
30489 fi
30490
30491 for cf_dir in $SRC_SUBDIRS
30492 do
30493         if test ! -d "$srcdir/$cf_dir" ; then
30494                 continue
30495         elif test -f "$srcdir/$cf_dir/modules" ; then
30496
30497                 SHARED_LIB=
30498                 Libs_To_Make=
30499                 cf_awk_program=
30500                 if test -n "${cf_cv_abi_default}" && test "x${cf_cv_abi_default}" != "x5"
30501                 then
30502                         cf_awk_program="$cf_awk_program\
30503 /deprecated in ABI${cf_cv_abi_default}/ { next; }\
30504 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_default}\"); }\
30505 "
30506                 fi
30507
30508                 if test "x$WILDCARD_SYMS" = xno
30509                 then
30510                         cf_awk_program="$cf_awk_program\
30511 /[      ]_\\*;/ { skip=1; next; }\
30512 "
30513                 fi
30514
30515                 if test "x$cf_awk_program" != "x"
30516                 then
30517                         cat >>$cf_dir/Makefile <<CF_EOF
30518
30519 # Generated by CF_LIB_RULES
30520 resulting.map: $UNALTERED_SYMS
30521         $AWK 'BEGIN { skip = 1; last=""; } \
30522 $cf_awk_program \
30523 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
30524  skip = 0; last = \$\$0; } \
30525 END { print last; }' < "$UNALTERED_SYMS" >\$@
30526
30527 distclean::
30528         rm -f resulting.map
30529 CF_EOF
30530                 fi
30531
30532                 for cf_item in $cf_LIST_MODELS
30533                 do
30534
30535         case X$cf_item in
30536         (Xlibtool)
30537                 cf_suffix='.la'
30538                 cf_depsuf=$cf_suffix
30539                 ;;
30540         (Xdebug)
30541                 case "$cf_cv_system_name" in
30542                 (*-msvc*)
30543                         cf_suffix='_g.lib'
30544                         ;;
30545                 (*)
30546                         cf_suffix='_g.a'
30547                         ;;
30548                 esac
30549                 cf_depsuf=$cf_suffix
30550                 ;;
30551         (Xprofile)
30552                 case "$cf_cv_system_name" in
30553                 (*-msvc*)
30554                         cf_suffix='_p.lib'
30555                         ;;
30556                 (*)
30557                         cf_suffix='_p.a'
30558                         ;;
30559                 esac
30560                 cf_depsuf=$cf_suffix
30561                 ;;
30562         (Xshared)
30563                 case "$cf_cv_system_name" in
30564                 (aix[5-7]*)
30565                         cf_suffix='.so'
30566                         cf_depsuf=$cf_suffix
30567                         ;;
30568                 (*-msvc*)
30569                         cf_suffix='.dll'
30570                         cf_depsuf='.dll.lib'
30571                         ;;
30572                 (cygwin*|msys*|mingw*)
30573                         cf_suffix='.dll'
30574                         cf_depsuf='.dll.a'
30575                         ;;
30576                 (darwin*)
30577                         cf_suffix='.dylib'
30578                         cf_depsuf=$cf_suffix
30579                         ;;
30580                 (hpux*)
30581                         case "$target" in
30582                         (ia64*)
30583                                 cf_suffix='.so'
30584                                 cf_depsuf=$cf_suffix
30585                                 ;;
30586                         (*)
30587                                 cf_suffix='.sl'
30588                                 cf_depsuf=$cf_suffix
30589                                 ;;
30590                         esac
30591                         ;;
30592                 (*)
30593                         cf_suffix='.so'
30594                         cf_depsuf=$cf_suffix
30595                         ;;
30596                 esac
30597                 ;;
30598         (*)
30599                 case "$target" in
30600                 (*-msvc*)
30601                         cf_suffix='.lib'
30602                         ;;
30603                 (*)
30604                         cf_suffix='.a'
30605                         ;;
30606                 esac
30607                 cf_depsuf=$cf_suffix
30608                 ;;
30609         esac
30610         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30611         then
30612                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30613                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30614         fi
30615
30616                         if test "$cf_dir" = "c++"
30617                         then
30618
30619 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30620
30621 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30622
30623                         else
30624
30625 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30626
30627 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30628
30629                         fi
30630                         test -z "$cf_libname" && cf_libname="$cf_dir"
30631                         if test "$cf_item" = shared ; then
30632                                 if test -n "${LIB_SUFFIX}"
30633                                 then
30634                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30635                                 else
30636                                         cf_shared_suffix="$cf_suffix"
30637                                 fi
30638                                 if test "$cf_cv_do_symlinks" = yes ; then
30639                                         cf_version_name=
30640
30641                                         case "$cf_cv_shlib_version" in
30642                                         (rel)
30643                                                 cf_version_name=REL_VERSION
30644                                                 ;;
30645                                         (abi)
30646                                                 cf_version_name=ABI_VERSION
30647                                                 ;;
30648                                         esac
30649
30650                                         if test -n "$cf_version_name"
30651                                         then
30652                                                 case "$cf_cv_system_name" in
30653                                                 (darwin*)
30654                                                         # "w", etc?
30655                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
30656                                                         ;;
30657                                                 (*)
30658                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
30659                                                         ;;
30660                                                 esac
30661                                         fi
30662                                         if test -n "${USE_LIB_SUFFIX}"
30663                                         then
30664                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30665                                         else
30666                                                 cf_shared_suffix="$cf_suffix"
30667                                         fi
30668                                 fi
30669                                 # cygwin needs import library, and has unique naming convention
30670                                 # use autodetected ${cf_prefix} for import lib and static lib, but
30671                                 # use 'cyg' prefix for shared lib.
30672                                 case "$cf_cv_shlib_version" in
30673                                 (cygdll)
30674                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30675                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
30676                                         ;;
30677                                 (msysdll)
30678                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30679                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
30680                                         ;;
30681                                 (mingw)
30682                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30683                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
30684                                         ;;
30685                                 (msvcdll)
30686                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30687                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
30688                                         ;;
30689                                 (*)
30690                                         cf_add_lib=
30691                                         ;;
30692                                 esac
30693                                 if test -n "$cf_add_lib"
30694                                 then
30695                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30696                                         continue
30697                                 fi
30698                         fi
30699                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
30700                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30701                 done
30702
30703                 if test "$cf_dir" = ncurses ; then
30704                         cf_subsets="$LIB_SUBSETS"
30705                         cf_r_parts="$cf_subsets"
30706                         cf_liblist="$Libs_To_Make"
30707
30708                         while test -n "$cf_r_parts"
30709                         do
30710                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
30711                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
30712                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
30713                                         cf_add_lib=
30714                                         case "$cf_l_parts" in
30715                                         (*termlib*)
30716                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
30717                                                 ;;
30718                                         (*ticlib*)
30719                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
30720                                                 ;;
30721                                         (*)
30722                                                 break
30723                                                 ;;
30724                                         esac
30725                                         if test -n "$cf_add_lib"; then
30726                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
30727                                         fi
30728                                 else
30729                                         break
30730                                 fi
30731                         done
30732                 else
30733                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
30734                 fi
30735
30736                 if test "$cf_dir" = c++; then
30737                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
30738                                 cf_list=
30739                                 for cf_item in $Libs_To_Make
30740                                 do
30741                                         case "$cf_item" in
30742                                         (*.a)
30743                                                 ;;
30744                                         (*)
30745                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
30746                                                 ;;
30747                                         esac
30748                                         for cf_test in $cf_list
30749                                         do
30750                                                 if test "$cf_test" = "$cf_item"
30751                                                 then
30752                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
30753                                                         cf_item=
30754                                                         break
30755                                                 fi
30756                                         done
30757                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
30758                                 done
30759                                 Libs_To_Make="$cf_list"
30760                         fi
30761                 fi
30762
30763                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
30764                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
30765                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
30766                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
30767
30768                 $AWK -f "$srcdir/mk-0th.awk" \
30769                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
30770                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30771
30772                 for cf_subset in $cf_subsets
30773                 do
30774                         cf_subdirs=
30775                         for cf_item in $cf_LIST_MODELS
30776                         do
30777
30778                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
30779
30780 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30781
30782                         CXX_MODEL=$cf_ITEM
30783                         if test "$CXX_MODEL" = SHARED; then
30784                                 case "$cf_cv_shlib_version" in
30785                                 (cygdll|msysdll|mingw|msvcdll)
30786                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
30787
30788 echo "${as_me:-configure}:30788: testing overriding CXX_MODEL to SHARED ..." 1>&5
30789
30790                                         with_shared_cxx=yes
30791                                         ;;
30792                                 (*)
30793                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
30794                                         ;;
30795                                 esac
30796                         fi
30797
30798         case X$cf_item in
30799         (Xlibtool)
30800                 cf_suffix='.la'
30801                 cf_depsuf=$cf_suffix
30802                 ;;
30803         (Xdebug)
30804                 case "$cf_cv_system_name" in
30805                 (*-msvc*)
30806                         cf_suffix='_g.lib'
30807                         ;;
30808                 (*)
30809                         cf_suffix='_g.a'
30810                         ;;
30811                 esac
30812                 cf_depsuf=$cf_suffix
30813                 ;;
30814         (Xprofile)
30815                 case "$cf_cv_system_name" in
30816                 (*-msvc*)
30817                         cf_suffix='_p.lib'
30818                         ;;
30819                 (*)
30820                         cf_suffix='_p.a'
30821                         ;;
30822                 esac
30823                 cf_depsuf=$cf_suffix
30824                 ;;
30825         (Xshared)
30826                 case "$cf_cv_system_name" in
30827                 (aix[5-7]*)
30828                         cf_suffix='.so'
30829                         cf_depsuf=$cf_suffix
30830                         ;;
30831                 (*-msvc*)
30832                         cf_suffix='.dll'
30833                         cf_depsuf='.dll.lib'
30834                         ;;
30835                 (cygwin*|msys*|mingw*)
30836                         cf_suffix='.dll'
30837                         cf_depsuf='.dll.a'
30838                         ;;
30839                 (darwin*)
30840                         cf_suffix='.dylib'
30841                         cf_depsuf=$cf_suffix
30842                         ;;
30843                 (hpux*)
30844                         case "$target" in
30845                         (ia64*)
30846                                 cf_suffix='.so'
30847                                 cf_depsuf=$cf_suffix
30848                                 ;;
30849                         (*)
30850                                 cf_suffix='.sl'
30851                                 cf_depsuf=$cf_suffix
30852                                 ;;
30853                         esac
30854                         ;;
30855                 (*)
30856                         cf_suffix='.so'
30857                         cf_depsuf=$cf_suffix
30858                         ;;
30859                 esac
30860                 ;;
30861         (*)
30862                 case "$target" in
30863                 (*-msvc*)
30864                         cf_suffix='.lib'
30865                         ;;
30866                 (*)
30867                         cf_suffix='.a'
30868                         ;;
30869                 esac
30870                 cf_depsuf=$cf_suffix
30871                 ;;
30872         esac
30873         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30874         then
30875                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30876                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30877         fi
30878
30879         case $cf_item in
30880         (libtool) cf_subdir='obj_lo'  ;;
30881         (normal)  cf_subdir='objects' ;;
30882         (debug)   cf_subdir='obj_g' ;;
30883         (profile) cf_subdir='obj_p' ;;
30884         (shared)
30885                 case "$cf_cv_system_name" in
30886                 (cygwin|msys)
30887                         cf_subdir='objects' ;;
30888                 (*)
30889                         cf_subdir='obj_s' ;;
30890                 esac
30891         esac
30892
30893                         # Test for case where we build libtinfo with a different name.
30894                         cf_libname=$cf_dir
30895                         if test "$cf_dir" = ncurses ; then
30896                                 case "$cf_subset" in
30897                                 (*base*)
30898                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
30899                                         ;;
30900                                 (*termlib*)
30901                                         cf_libname=$TINFO_LIB_SUFFIX
30902                                         ;;
30903                                 (ticlib*)
30904                                         cf_libname=$TICS_LIB_SUFFIX
30905                                         ;;
30906                                 esac
30907                         elif test "$cf_dir" = c++ ; then
30908
30909 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30910
30911 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30912
30913                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30914                         else
30915
30916 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30917
30918 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30919
30920                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30921                         fi
30922                         if test -n "${USE_ARG_SUFFIX}" ; then
30923                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
30924                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
30925                         fi
30926
30927                         # These dependencies really are for development, not
30928                         # builds, but they are useful in porting, too.
30929                         cf_depend="../include/ncurses_cfg.h"
30930                         if test "$srcdir" = "."; then
30931                                 cf_reldir="."
30932                         else
30933                                 cf_reldir="\${srcdir}"
30934                         fi
30935
30936                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
30937                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
30938                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
30939                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
30940                         fi
30941
30942                         cf_dir_suffix=
30943                         old_cf_suffix="$cf_suffix"
30944                         if test "$cf_cv_shlib_version_infix" = yes ; then
30945                         if test -n "$USE_LIB_SUFFIX" ; then
30946                                 case "$USE_LIB_SUFFIX" in
30947                                 (tw*)
30948                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
30949                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30950                                         cf_dir_suffix=tw$EXTRA_SUFFIX
30951                                         ;;
30952                                 (t*)
30953                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
30954                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
30955                                         cf_dir_suffix=t$EXTRA_SUFFIX
30956                                         ;;
30957                                 (w*)
30958                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
30959                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
30960                                         cf_dir_suffix=w$EXTRA_SUFFIX
30961                                         ;;
30962                                 (*)
30963                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
30964                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
30965                                         cf_dir_suffix=$EXTRA_SUFFIX
30966                                         ;;
30967                                 esac
30968                         fi
30969                         fi
30970
30971                         $AWK -f "$srcdir/mk-1st.awk" \
30972                                 name=${cf_libname}${cf_dir_suffix} \
30973                                 traces=$LIB_TRACING \
30974                                 MODEL=$cf_ITEM \
30975                                 CXX_MODEL=$CXX_MODEL \
30976                                 LIB_SUFFIX=$LIB_SUFFIX \
30977                                 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
30978                                 make_phony="${cf_cv_make_PHONY:-no}" \
30979                                 model=$cf_subdir \
30980                                 prefix=$cf_prefix \
30981                                 suffix=$cf_suffix \
30982                                 subset=$cf_subset \
30983                                 driver=$cf_cv_term_driver \
30984                                 SymLink="$LN_S" \
30985                                 TermlibRoot=$TINFO_NAME \
30986                                 TermlibSuffix=$TINFO_SUFFIX \
30987                                 ShlibVer=$cf_cv_shlib_version \
30988                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
30989                                 ReLink=${cf_cv_do_relink:-no} \
30990                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
30991                                 DoLinks=$cf_cv_do_symlinks \
30992                                 rmSoLocs=$cf_cv_rm_so_locs \
30993                                 ldconfig="$LDCONFIG" \
30994                                 overwrite=$WITH_OVERWRITE \
30995                                 depend="$cf_depend" \
30996                                 host="$host" \
30997                                 libtool_version="$LIBTOOL_VERSION" \
30998                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30999
31000                         cf_suffix="$old_cf_suffix"
31001
31002                         for cf_subdir2 in $cf_subdirs lib
31003                         do
31004                                 test "$cf_subdir" = "$cf_subdir2" && break
31005                         done
31006                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
31007                         $AWK -f "$srcdir/mk-2nd.awk" \
31008                                 name=$cf_dir \
31009                                 traces=$LIB_TRACING \
31010                                 MODEL=$cf_ITEM \
31011                                 model=$cf_subdir \
31012                                 subset=$cf_subset \
31013                                 srcdir=$srcdir \
31014                                 echo=$WITH_ECHO \
31015                                 crenames=$cf_cv_prog_CC_c_o \
31016                                 cxxrenames=$cf_cv_prog_CXX_c_o \
31017                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31018                         cf_subdirs="$cf_subdirs $cf_subdir"
31019                         done
31020                 done
31021         fi
31022
31023         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
31024 done
31025
31026 echo >> Makefile
31027 echo '# generated by CF_LIB_RULES' >> Makefile
31028
31029 if test "x$cf_cv_make_PHONY" = xyes ; then
31030         cat >> Makefile <<-CF_EOF
31031
31032         .PHONY :        libs
31033         .PHONY :        lintlib
31034         .PHONY :        install.includes
31035         .PHONY :        uninstall.includes
31036         .PHONY :        install.libs
31037         .PHONY :        uninstall.libs
31038 CF_EOF
31039 fi
31040
31041 for cf_dir in $SRC_SUBDIRS
31042 do
31043         if test ! -d "$srcdir/$cf_dir" ; then
31044                 continue
31045         fi
31046
31047         if test -f "$cf_dir/Makefile" ; then
31048                 case "$cf_dir" in
31049                 (Ada95)
31050                         echo 'libs \' >> Makefile
31051                         echo 'install.libs \' >> Makefile
31052                         echo 'uninstall.libs ::' >> Makefile
31053                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
31054                         ;;
31055                 esac
31056         fi
31057
31058         if test -f "$srcdir/$cf_dir/modules" ; then
31059
31060                 if test "x$cf_cv_make_PHONY" = xyes ; then
31061                         cat >> Makefile <<-CF_EOF
31062
31063                         .PHONY :        install.$cf_dir
31064                         .PHONY :        uninstall.$cf_dir
31065 CF_EOF
31066                 fi
31067
31068                 echo >> Makefile
31069                 if test -f "$srcdir/$cf_dir/headers" ; then
31070 cat >> Makefile <<CF_EOF
31071 install.includes \\
31072 uninstall.includes \\
31073 CF_EOF
31074                 fi
31075
31076 cat >> Makefile <<CF_EOF
31077 lint \\
31078 libs \\
31079 lintlib \\
31080 install.libs \\
31081 uninstall.libs \\
31082 install.$cf_dir \\
31083 uninstall.$cf_dir ::
31084         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31085 CF_EOF
31086         elif test -f "$srcdir/$cf_dir/headers" ; then
31087 cat >> Makefile <<CF_EOF
31088
31089 libs \\
31090 install.libs \\
31091 uninstall.libs \\
31092 install.includes \\
31093 uninstall.includes ::
31094         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31095 CF_EOF
31096 fi
31097 done
31098
31099 if test "x$cf_cv_make_PHONY" = xyes ; then
31100         cat >> Makefile <<-CF_EOF
31101
31102         .PHONY :        install.data
31103         .PHONY :        uninstall.data
31104 CF_EOF
31105 fi
31106
31107 if test "x$cf_with_db_install" = xyes; then
31108 cat >> Makefile <<CF_EOF
31109
31110 install.libs uninstall.libs \\
31111 install.data uninstall.data ::
31112 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31113 CF_EOF
31114 else
31115 cat >> Makefile <<CF_EOF
31116
31117 install.libs uninstall.libs ::
31118         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31119 CF_EOF
31120 fi
31121
31122 if test "x$cf_with_manpages" = xyes; then
31123
31124 if test "x$cf_cv_make_PHONY" = xyes ; then
31125         cat >> Makefile <<-CF_EOF
31126
31127         .PHONY :        install.man
31128         .PHONY :        uninstall.man
31129 CF_EOF
31130 fi
31131
31132 cat >> Makefile <<CF_EOF
31133
31134 install.man \\
31135 uninstall.man ::
31136         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
31137 CF_EOF
31138 fi
31139
31140 cat >> Makefile <<CF_EOF
31141
31142 distclean ::
31143         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
31144         rm -f headers.sh headers.sed mk_shared_lib.sh
31145         rm -f edit_man.* man_alias.*
31146         rm -rf \${DIRS_TO_MAKE}
31147 CF_EOF
31148
31149 # Special case: tack's manpage lives in its own directory.
31150 if test "x$cf_with_manpages" = xyes; then
31151 if test "x$cf_with_tack" = "xyes"; then
31152 cat >> Makefile <<CF_EOF
31153
31154 install.man \\
31155 uninstall.man ::
31156         ( cd tack && \${MAKE} \${TOP_MFLAGS} \$@ )
31157 CF_EOF
31158 fi
31159 fi
31160
31161 rm -f headers.sed headers.sh
31162
31163 echo creating headers.sh
31164 cat >headers.sh <<CF_EOF
31165 #! $SHELL
31166 # This shell script is generated by the 'configure' script.  It is invoked in a
31167 # subdirectory of the build tree.  It generates a sed-script in the parent
31168 # directory that is used to adjust includes for header files that reside in a
31169 # subdirectory of /usr/include, etc.
31170 PRG=""
31171 while test \$# != 3
31172 do
31173 PRG="\$PRG \$1"; shift
31174 done
31175 DST=\$1
31176 REF=\$2
31177 SRC=\$3
31178 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
31179 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
31180 echo installing \$SRC in \$DST
31181 CF_EOF
31182
31183 if test "$WITH_CURSES_H" = yes; then
31184         cat >>headers.sh <<CF_EOF
31185 case \$DST in
31186 (/*/include/*)
31187         END=\`basename \$DST\`
31188         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31189         do
31190                 NAME=\`basename \$i\`
31191                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31192         done
31193         ;;
31194 (*)
31195         echo "" >> \$TMPSED
31196         ;;
31197 esac
31198 CF_EOF
31199
31200 else
31201         cat >>headers.sh <<CF_EOF
31202 case \$DST in
31203 (/*/include/*)
31204         END=\`basename \$DST\`
31205         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31206         do
31207                 NAME=\`basename \$i\`
31208                 if test "\$NAME" = "curses.h"
31209                 then
31210                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31211                         NAME=ncurses.h
31212                 fi
31213                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31214         done
31215         ;;
31216 (*)
31217         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31218         ;;
31219 esac
31220 CF_EOF
31221 fi
31222 cat >>headers.sh <<CF_EOF
31223 rm -f \$TMPSRC
31224 sed -f \$TMPSED \$SRC > \$TMPSRC
31225 NAME=\`basename \$SRC\`
31226 CF_EOF
31227 if test "$WITH_CURSES_H" != yes; then
31228         cat >>headers.sh <<CF_EOF
31229 test "\$NAME" = "curses.h" && NAME=ncurses.h
31230 CF_EOF
31231 fi
31232 cat >>headers.sh <<CF_EOF
31233 # Just in case someone gzip'd manpages, remove the conflicting copy.
31234 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
31235
31236 eval \$PRG \$TMPSRC \$DST/\$NAME
31237 rm -f \$TMPSRC \$TMPSED
31238 CF_EOF
31239
31240 chmod 0755 headers.sh
31241
31242 for cf_dir in $SRC_SUBDIRS
31243 do
31244         if test ! -d "$srcdir/$cf_dir" ; then
31245                 continue
31246         fi
31247
31248         if test -f "$srcdir/$cf_dir/headers" ; then
31249                 $AWK -f "$srcdir/mk-hdr.awk" \
31250                         subset="$LIB_SUBSETS" \
31251                         compat="$WITH_CURSES_H" \
31252                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
31253         fi
31254
31255         if test -f "$srcdir/$cf_dir/modules" ; then
31256                 if test "$cf_dir" != "c++" ; then
31257                         if test "x$cf_cv_make_PHONY" = xyes ; then
31258                                 cat >> $cf_dir/Makefile <<-CF_EOF
31259
31260                                 .PHONY :        depend
31261 CF_EOF
31262                         fi
31263
31264                         cat >>$cf_dir/Makefile <<"CF_EOF"
31265 depend : ${AUTO_SRC}
31266         makedepend -- ${CPPFLAGS} -- ${C_SRC}
31267
31268 # DO NOT DELETE THIS LINE -- make depend depends on it.
31269 CF_EOF
31270                 fi
31271         fi
31272 done
31273
31274 if test "$MANPAGE_RENAMES" != no ; then
31275         # Construct a sed-script to perform renaming within man-pages
31276         test -n "$verbose" && echo "creating edit_man.sed"
31277         test ! -d man && mkdir man
31278         FGREP="${FGREP-grep -F}" $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
31279 fi
31280
31281 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
31282 if test -z "$USE_OLD_MAKERULES" ; then
31283         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
31284 fi
31285 fi
31286  ;;
31287   esac
31288 done
31289 EOF
31290
31291 cat >>"$CONFIG_STATUS" <<\EOF
31292
31293 { (exit 0); exit 0; }
31294 EOF
31295 chmod +x "$CONFIG_STATUS"
31296 ac_clean_files=$ac_clean_files_save
31297
31298 # configure is writing to config.log, and then calls config.status.
31299 # config.status does its own redirection, appending to config.log.
31300 # Unfortunately, on DOS this fails, as config.log is still kept open
31301 # by configure, so config.status won't be able to write to it; its
31302 # output is simply discarded.  So we exec the FD to /dev/null,
31303 # effectively closing config.log, so it can be properly (re)opened and
31304 # appended to by config.status.  When coming back to configure, we
31305 # need to make the FD available again.
31306 if test "$no_create" != yes; then
31307   ac_cs_success=:
31308   exec 5>/dev/null
31309   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
31310   exec 5>>config.log
31311   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31312   # would make configure fail if this is the last instruction.
31313   "$ac_cs_success" || { (exit 1); exit 1; }
31314 fi
31315 ${MAKE:-make} preinstall